summaryrefslogtreecommitdiff
path: root/libpurple
diff options
context:
space:
mode:
authorAnkit Vani <a@nevitus.org>2014-01-31 20:02:40 +0530
committerAnkit Vani <a@nevitus.org>2014-01-31 20:02:40 +0530
commitcbfcf14ad46782d4da398475a4ebc238306b2440 (patch)
tree8c8aa91a88a91f4ea28c0b33fc0c46b50fb4c79c /libpurple
parentb294247fe67eafdfae55dd90b79ea706225e19b4 (diff)
downloadpidgin-cbfcf14ad46782d4da398475a4ebc238306b2440.tar.gz
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Diffstat (limited to 'libpurple')
-rw-r--r--libpurple/buddyicon.h174
-rw-r--r--libpurple/buddylist.h184
-rw-r--r--libpurple/certificate.h269
-rw-r--r--libpurple/cipher.h115
-rw-r--r--libpurple/circularbuffer.h53
-rw-r--r--libpurple/cmds.h138
-rw-r--r--libpurple/connection.h304
-rw-r--r--libpurple/conversation.h407
-rw-r--r--libpurple/conversations.h49
-rw-r--r--libpurple/conversationtypes.h364
-rw-r--r--libpurple/core.h37
-rw-r--r--libpurple/dbus-server.h136
-rw-r--r--libpurple/debug.h101
-rw-r--r--libpurple/desktopitem.h25
-rw-r--r--libpurple/dnsquery.h49
-rw-r--r--libpurple/dnssrv.h52
-rw-r--r--libpurple/e2ee.h83
-rw-r--r--libpurple/eventloop.h117
-rw-r--r--libpurple/http.h368
-rw-r--r--libpurple/idle.h17
-rw-r--r--libpurple/imgstore.h103
-rw-r--r--libpurple/internal.h66
-rw-r--r--libpurple/keyring.h215
-rw-r--r--libpurple/log.h281
-rw-r--r--libpurple/media-gst.h101
-rw-r--r--libpurple/media.h180
-rw-r--r--libpurple/mediamanager.h88
-rw-r--r--libpurple/mime.h101
-rw-r--r--libpurple/nat-pmp.h15
-rw-r--r--libpurple/network.h131
-rw-r--r--libpurple/notify.h344
-rw-r--r--libpurple/ntlm.h19
-rw-r--r--libpurple/pluginpref.h132
-rw-r--r--libpurple/pounce.h192
-rw-r--r--libpurple/prefs.h169
-rw-r--r--libpurple/presence.h149
-rw-r--r--libpurple/proxy.h146
-rw-r--r--libpurple/version.h.in36
38 files changed, 3519 insertions, 1991 deletions
diff --git a/libpurple/buddyicon.h b/libpurple/buddyicon.h
index c0f36273c9..5451d8b423 100644
--- a/libpurple/buddyicon.h
+++ b/libpurple/buddyicon.h
@@ -28,10 +28,13 @@
#define PURPLE_TYPE_BUDDY_ICON (purple_buddy_icon_get_type())
-/** An opaque structure representing a buddy icon for a particular user on a
- * particular #PurpleAccount. Instances are reference-counted; use
- * purple_buddy_icon_ref() and purple_buddy_icon_unref() to take and release
- * references.
+/**
+ * PurpleBuddyIcon:
+ *
+ * An opaque structure representing a buddy icon for a particular user on a
+ * particular #PurpleAccount. Instances are reference-counted; use
+ * purple_buddy_icon_ref() and purple_buddy_icon_unref() to take and release
+ * references.
*/
typedef struct _PurpleBuddyIcon PurpleBuddyIcon;
@@ -49,21 +52,24 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_buddy_icon_get_type:
+ *
* Returns the GType for the PurpleBuddyIcon boxed structure.
*/
GType purple_buddy_icon_get_type(void);
/**
- * Creates a new buddy icon structure and populates it.
- *
- * If an icon for this account+username already exists, you'll get a reference
- * to that structure, which will have been updated with the data supplied.
- *
+ * purple_buddy_icon_new:
* @account: The account the user is on.
* @username: The username the icon belongs to.
* @icon_data: The buddy icon data.
* @icon_len: The buddy icon length.
- * @checksum: A protocol checksum from the prpl or %NULL.
+ * @checksum: A protocol checksum from the protocol or %NULL.
+ *
+ * Creates a new buddy icon structure and populates it.
+ *
+ * If an icon for this account+username already exists, you'll get a reference
+ * to that structure, which will have been updated with the data supplied.
*
* Returns: The buddy icon structure, with a reference for the caller.
*/
@@ -72,94 +78,106 @@ PurpleBuddyIcon *purple_buddy_icon_new(PurpleAccount *account, const char *usern
const char *checksum);
/**
- * Increments the reference count on a buddy icon.
- *
+ * purple_buddy_icon_ref:
* @icon: The buddy icon.
*
- * Returns: @a icon.
+ * Increments the reference count on a buddy icon.
+ *
+ * Returns: @icon.
*/
PurpleBuddyIcon *purple_buddy_icon_ref(PurpleBuddyIcon *icon);
/**
+ * purple_buddy_icon_unref:
+ * @icon: The buddy icon.
+ *
* Decrements the reference count on a buddy icon.
*
* If the reference count reaches 0, the icon will be destroyed.
- *
- * @icon: The buddy icon.
*/
void purple_buddy_icon_unref(PurpleBuddyIcon *icon);
/**
- * Updates every instance of this icon.
- *
+ * purple_buddy_icon_update:
* @icon: The buddy icon.
+ *
+ * Updates every instance of this icon.
*/
void purple_buddy_icon_update(PurpleBuddyIcon *icon);
/**
- * Sets the buddy icon's data.
- *
+ * purple_buddy_icon_set_data:
* @icon: The buddy icon.
* @data: The buddy icon data, which the buddy icon code
* takes ownership of and will free.
* @len: The length of the data in @a data.
- * @checksum: A protocol checksum from the prpl or %NULL.
+ * @checksum: A protocol checksum from the protocol or %NULL.
+ *
+ * Sets the buddy icon's data.
*/
void
purple_buddy_icon_set_data(PurpleBuddyIcon *icon, guchar *data,
size_t len, const char *checksum);
/**
- * Returns the buddy icon's account.
- *
+ * purple_buddy_icon_get_account:
* @icon: The buddy icon.
*
+ * Returns the buddy icon's account.
+ *
* Returns: The account.
*/
PurpleAccount *purple_buddy_icon_get_account(const PurpleBuddyIcon *icon);
/**
- * Returns the buddy icon's username.
- *
+ * purple_buddy_icon_get_username:
* @icon: The buddy icon.
*
+ * Returns the buddy icon's username.
+ *
* Returns: The username.
*/
const char *purple_buddy_icon_get_username(const PurpleBuddyIcon *icon);
/**
- * Returns the buddy icon's checksum.
+ * purple_buddy_icon_get_checksum:
+ * @icon: The buddy icon.
*
- * This function is really only for prpl use.
+ * Returns the buddy icon's checksum.
*
- * @icon: The buddy icon.
+ * This function is really only for protocol use.
*
* Returns: The checksum.
*/
const char *purple_buddy_icon_get_checksum(const PurpleBuddyIcon *icon);
/**
- * Returns the buddy icon's data.
- *
+ * purple_buddy_icon_get_data:
* @icon: The buddy icon.
* @len: If not %NULL, the length of the icon data returned will be
* set in the location pointed to by this.
*
+ * Returns the buddy icon's data.
+ *
* Returns: A pointer to the icon data.
*/
gconstpointer purple_buddy_icon_get_data(const PurpleBuddyIcon *icon, size_t *len);
/**
- * Returns an extension corresponding to the buddy icon's file type.
- *
+ * purple_buddy_icon_get_extension:
* @icon: The buddy icon.
*
+ * Returns an extension corresponding to the buddy icon's file type.
+ *
* Returns: The icon's extension, "icon" if unknown, or %NULL if
* the image data has disappeared.
*/
const char *purple_buddy_icon_get_extension(const PurpleBuddyIcon *icon);
/**
+ * purple_buddy_icon_get_full_path:
+ * @icon: The buddy icon
+ *
* Returns a full path to an icon.
*
* If the icon has data and the file exists in the cache, this will return
@@ -169,8 +187,6 @@ const char *purple_buddy_icon_get_extension(const PurpleBuddyIcon *icon);
* directly. If you find yourself wanting to use this function, think
* very long and hard about it, and then don't.
*
- * @icon: The buddy icon
- *
* Returns: A full path to the file, or %NULL under various conditions.
*/
char *purple_buddy_icon_get_full_path(PurpleBuddyIcon *icon);
@@ -183,14 +199,15 @@ char *purple_buddy_icon_get_full_path(PurpleBuddyIcon *icon);
/*@{*/
/**
- * Sets a buddy icon for a user.
- *
+ * purple_buddy_icons_set_for_user:
* @account: The account the user is on.
* @username: The username of the user.
* @icon_data: The buddy icon data, which the buddy icon code
* takes ownership of and will free.
* @icon_len: The length of the icon data.
- * @checksum: A protocol checksum from the prpl or %NULL.
+ * @checksum: A protocol checksum from the protocol or %NULL.
+ *
+ * Sets a buddy icon for a user.
*/
void
purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
@@ -198,24 +215,26 @@ purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
const char *checksum);
/**
+ * purple_buddy_icons_get_checksum_for_user:
+ * @buddy: The buddy
+ *
* Returns the checksum for the buddy icon of a specified buddy.
*
* This avoids loading the icon image data from the cache if it's
* not already loaded for some other reason.
*
- * @buddy: The buddy
- *
* Returns: The checksum.
*/
const char *
purple_buddy_icons_get_checksum_for_user(PurpleBuddy *buddy);
/**
- * Returns the buddy icon information for a user.
- *
+ * purple_buddy_icons_find:
* @account: The account the user is on.
* @username: The username of the user.
*
+ * Returns the buddy icon information for a user.
+ *
* Returns: The icon (with a reference for the caller) if found, or %NULL if
* not found.
*/
@@ -223,6 +242,9 @@ PurpleBuddyIcon *
purple_buddy_icons_find(PurpleAccount *account, const char *username);
/**
+ * purple_buddy_icons_find_account_icon:
+ * @account: The account
+ *
* Returns the buddy icon image for an account.
*
* The caller owns a reference to the image in the store, and must dereference
@@ -232,24 +254,23 @@ purple_buddy_icons_find(PurpleAccount *account, const char *username);
* needed, so it should be called in any case where you want the
* appropriate icon.
*
- * @account: The account
- *
* Returns: The account's buddy icon image.
*/
PurpleStoredImage *
purple_buddy_icons_find_account_icon(PurpleAccount *account);
/**
+ * purple_buddy_icons_set_account_icon:
+ * @account: The account for which to set a custom icon.
+ * @icon_data: The image data of the icon, which the
+ * buddy icon code will free.
+ * @icon_len: The length of the data in @icon_data.
+ *
* Sets a buddy icon for an account.
*
* This function will deal with saving a record of the icon,
* caching the data, etc.
*
- * @account: The account for which to set a custom icon.
- * @icon_data: The image data of the icon, which the
- * buddy icon code will free.
- * @icon_len: The length of the data in @a icon_data.
- *
* Returns: The icon that was set. The caller does NOT own
* a reference to this, and must call purple_imgstore_ref()
* if it wants one.
@@ -259,29 +280,34 @@ purple_buddy_icons_set_account_icon(PurpleAccount *account,
guchar *icon_data, size_t icon_len);
/**
+ * purple_buddy_icons_get_account_icon_timestamp:
+ * @account: The account
+ *
* Returns the timestamp of when the icon was set.
*
* This is intended for use in protocols that require a timestamp for
* buddy icon update reasons.
*
- * @account: The account
- *
* Returns: The time the icon was set, or 0 if an error occurred.
*/
time_t
purple_buddy_icons_get_account_icon_timestamp(PurpleAccount *account);
/**
- * Returns a boolean indicating if a given blist node has a custom buddy icon.
- *
+ * purple_buddy_icons_node_has_custom_icon:
* @node: The blist node.
*
- * Returns: A boolean indicating if @a node has a custom buddy icon.
+ * Returns a boolean indicating if a given blist node has a custom buddy icon.
+ *
+ * Returns: A boolean indicating if @node has a custom buddy icon.
*/
gboolean
purple_buddy_icons_node_has_custom_icon(PurpleBlistNode *node);
/**
+ * purple_buddy_icons_node_find_custom_icon:
+ * @node: The node.
+ *
* Returns the custom buddy icon image for a blist node.
*
* The caller owns a reference to the image in the store, and must dereference
@@ -291,24 +317,23 @@ purple_buddy_icons_node_has_custom_icon(PurpleBlistNode *node);
* needed, so it should be called in any case where you want the
* appropriate icon.
*
- * @node: The node.
- *
* Returns: The custom buddy icon.
*/
PurpleStoredImage *
purple_buddy_icons_node_find_custom_icon(PurpleBlistNode *node);
/**
+ * purple_buddy_icons_node_set_custom_icon:
+ * @node: The blist node for which to set a custom icon.
+ * @icon_data: The image data of the icon, which the buddy icon code will
+ * free. Use NULL to unset the icon.
+ * @icon_len: The length of the data in @icon_data.
+ *
* Sets a custom buddy icon for a blist node.
*
* This function will deal with saving a record of the icon, caching the data,
* etc.
*
- * @node: The blist node for which to set a custom icon.
- * @icon_data: The image data of the icon, which the buddy icon code will
- * free. Use NULL to unset the icon.
- * @icon_len: The length of the data in @a icon_data.
- *
* Returns: The icon that was set. The caller does NOT own a reference to this,
* and must call purple_imgstore_ref() if it wants one.
*/
@@ -317,15 +342,16 @@ purple_buddy_icons_node_set_custom_icon(PurpleBlistNode *node,
guchar *icon_data, size_t icon_len);
/**
+ * purple_buddy_icons_node_set_custom_icon_from_file:
+ * @node: The blist node for which to set a custom icon.
+ * @filename: The path to the icon to set for the blist node. Use NULL
+ * to unset the custom icon.
+ *
* Sets a custom buddy icon for a blist node.
*
* Convenience wrapper around purple_buddy_icons_node_set_custom_icon.
* @see purple_buddy_icons_node_set_custom_icon()
*
- * @node: The blist node for which to set a custom icon.
- * @filename: The path to the icon to set for the blist node. Use NULL
- * to unset the custom icon.
- *
* Returns: The icon that was set. The caller does NOT own a reference to this,
* and must call purple_imgstore_ref() if it wants one.
*/
@@ -334,14 +360,17 @@ purple_buddy_icons_node_set_custom_icon_from_file(PurpleBlistNode *node,
const gchar *filename);
/**
- * Sets whether or not buddy icon caching is enabled.
- *
+ * purple_buddy_icons_set_caching:
* @caching: TRUE if buddy icon caching should be enabled, or
* FALSE otherwise.
+ *
+ * Sets whether or not buddy icon caching is enabled.
*/
void purple_buddy_icons_set_caching(gboolean caching);
/**
+ * purple_buddy_icons_is_caching:
+ *
* Returns whether or not buddy icon caching should be enabled.
*
* The default is TRUE, unless otherwise specified by
@@ -352,13 +381,16 @@ void purple_buddy_icons_set_caching(gboolean caching);
gboolean purple_buddy_icons_is_caching(void);
/**
- * Sets the directory used to store buddy icon cache files.
- *
+ * purple_buddy_icons_set_cache_dir:
* @cache_dir: The directory to store buddy icon cache files to.
+ *
+ * Sets the directory used to store buddy icon cache files.
*/
void purple_buddy_icons_set_cache_dir(const char *cache_dir);
/**
+ * purple_buddy_icons_get_cache_dir:
+ *
* Returns the directory used to store buddy icon cache files.
*
* The default directory is PURPLEDIR/icons, unless otherwise specified
@@ -369,6 +401,8 @@ void purple_buddy_icons_set_cache_dir(const char *cache_dir);
const char *purple_buddy_icons_get_cache_dir(void);
/**
+ * purple_buddy_icons_get_handle:
+ *
* Returns the buddy icon subsystem handle.
*
* Returns: The subsystem handle.
@@ -376,11 +410,15 @@ const char *purple_buddy_icons_get_cache_dir(void);
void *purple_buddy_icons_get_handle(void);
/**
+ * purple_buddy_icons_init:
+ *
* Initializes the buddy icon subsystem.
*/
void purple_buddy_icons_init(void);
/**
+ * purple_buddy_icons_uninit:
+ *
* Uninitializes the buddy icon subsystem.
*/
void purple_buddy_icons_uninit(void);
@@ -393,6 +431,8 @@ void purple_buddy_icons_uninit(void);
/*@{*/
/**
+ * purple_buddy_icon_get_scale_size:
+ *
* Gets display size for a buddy icon
*/
void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height);
diff --git a/libpurple/buddylist.h b/libpurple/buddylist.h
index c3b3ec1572..c2f04266ed 100644
--- a/libpurple/buddylist.h
+++ b/libpurple/buddylist.h
@@ -38,33 +38,34 @@
#define PURPLE_IS_BUDDY_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_BUDDY_LIST))
#define PURPLE_BUDDY_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_BUDDY_LIST, PurpleBuddyListClass))
-/** @copydoc _PurpleBuddyList */
typedef struct _PurpleBuddyList PurpleBuddyList;
-/** @copydoc _PurpleBuddyList */
typedef struct _PurpleBuddyListClass PurpleBuddyListClass;
-/** @copydoc _PurpleBlistUiOps */
typedef struct _PurpleBlistUiOps PurpleBlistUiOps;
/**************************************************************************/
/* Data Structures */
/**************************************************************************/
/**
+ * PurpleBuddyList:
+ * @root: The first node in the buddy list
+ * @ui_data: The UI data associated with this buddy list. This is a convenience
+ * field provided to the UIs -- it is not used by the libpurple core.
+ *
* The Buddy List
*/
struct _PurpleBuddyList {
GObject gparent;
- /** The first node in the buddy list */
PurpleBlistNode *root;
-
- /** The UI data associated with this buddy list. This is a convenience
- * field provided to the UIs -- it is not used by the libpurple core.
- */
gpointer ui_data;
};
-/** The base class for all #PurpleBuddyList's. */
+/**
+ * PurpleBuddyListClass:
+ *
+ * The base class for all #PurpleBuddyList's.
+ */
struct _PurpleBuddyListClass {
GObjectClass gparent_class;
@@ -76,6 +77,8 @@ struct _PurpleBuddyListClass {
};
/**
+ * PurpleBlistUiOps:
+ *
* Buddy list UI operations.
*
* Any UI representing a buddy list must assign a filled-out PurpleBlistUiOps
@@ -152,11 +155,15 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_buddy_list_get_type:
+ *
* Returns the GType for the PurpleBuddyList object.
*/
GType purple_buddy_list_get_type(void);
/**
+ * purple_blist_get_buddy_list:
+ *
* Returns the main buddy list.
*
* Returns: The main buddy list.
@@ -164,6 +171,8 @@ GType purple_buddy_list_get_type(void);
PurpleBuddyList *purple_blist_get_buddy_list(void);
/**
+ * purple_blist_get_root:
+ *
* Returns the root node of the main buddy list.
*
* Returns: The root node.
@@ -171,6 +180,8 @@ PurpleBuddyList *purple_blist_get_buddy_list(void);
PurpleBlistNode *purple_blist_get_root(void);
/**
+ * purple_blist_get_buddies:
+ *
* Returns a list of every buddy in the list. Use of this function is
* discouraged if you do not actually need every buddy in the list. Use
* purple_blist_find_buddies instead.
@@ -183,6 +194,8 @@ PurpleBlistNode *purple_blist_get_root(void);
GSList *purple_blist_get_buddies(void);
/**
+ * purple_blist_get_ui_data:
+ *
* Returns the UI data for the list.
*
* Returns: The UI data for the list.
@@ -190,157 +203,176 @@ GSList *purple_blist_get_buddies(void);
gpointer purple_blist_get_ui_data(void);
/**
- * Sets the UI data for the list.
- *
+ * purple_blist_set_ui_data:
* @ui_data: The UI data for the list.
+ *
+ * Sets the UI data for the list.
*/
void purple_blist_set_ui_data(gpointer ui_data);
/**
+ * purple_blist_show:
+ *
* Shows the buddy list, creating a new one if necessary.
*/
void purple_blist_show(void);
/**
- * Hides or unhides the buddy list.
- *
+ * purple_blist_set_visible:
* @show: Whether or not to show the buddy list
+ *
+ * Hides or unhides the buddy list.
*/
void purple_blist_set_visible(gboolean show);
/**
+ * purple_blist_update_buddies_cache:
+ * @buddy: The buddy whose name will be changed.
+ * @name: The new name of the buddy.
+ *
* Updates the buddies hash table when a buddy has been renamed. This only
* updates the cache, the caller is responsible for the actual renaming of
* the buddy after updating the cache.
- *
- * @buddy: The buddy whose name will be changed.
- * @name: The new name of the buddy.
*/
void purple_blist_update_buddies_cache(PurpleBuddy *buddy, const char *new_name);
/**
+ * purple_blist_update_groups_cache:
+ * @group: The group whose name will be changed.
+ * @name: The new name of the group.
+ *
* Updates the groups hash table when a group has been renamed. This only
* updates the cache, the caller is responsible for the actual renaming of
* the group after updating the cache.
- *
- * @group: The group whose name will be changed.
- * @name: The new name of the group.
*/
void purple_blist_update_groups_cache(PurpleGroup *group, const char *new_name);
/**
+ * purple_blist_add_chat:
+ * @chat: The new chat who gets added
+ * @group: The group to add the new chat to.
+ * @node: The insertion point
+ *
* Adds a new chat to the buddy list.
*
* The chat will be inserted right after node or appended to the end
* of group if node is NULL. If both are NULL, the buddy will be added to
* the "Chats" group.
- *
- * @chat: The new chat who gets added
- * @group: The group to add the new chat to.
- * @node: The insertion point
*/
void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node);
/**
- * Adds a new buddy to the buddy list.
- *
- * The buddy will be inserted right after node or prepended to the
- * group if node is NULL. If both are NULL, the buddy will be added to
- * the "Buddies" group.
- *
+ * purple_blist_add_buddy:
* @buddy: The new buddy who gets added
* @contact: The optional contact to place the buddy in.
* @group: The group to add the new buddy to.
* @node: The insertion point. Pass in NULL to add the node as
* the first child in the given group.
+ *
+ * Adds a new buddy to the buddy list.
+ *
+ * The buddy will be inserted right after node or prepended to the
+ * group if node is NULL. If both are NULL, the buddy will be added to
+ * the "Buddies" group.
*/
void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node);
/**
+ * purple_blist_add_group:
+ * @group: The group
+ * @node: The insertion point
+ *
* Adds a new group to the buddy list.
*
* The new group will be inserted after insert or prepended to the list if
* node is NULL.
- *
- * @group: The group
- * @node: The insertion point
*/
void purple_blist_add_group(PurpleGroup *group, PurpleBlistNode *node);
/**
+ * purple_blist_add_contact:
+ * @contact: The contact
+ * @group: The group to add the contact to
+ * @node: The insertion point
+ *
* Adds a new contact to the buddy list.
*
* The new contact will be inserted after insert or prepended to the list if
* node is NULL.
- *
- * @contact: The contact
- * @group: The group to add the contact to
- * @node: The insertion point
*/
void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node);
/**
+ * purple_blist_remove_buddy:
+ * @buddy: The buddy to be removed
+ *
* Removes a buddy from the buddy list and frees the memory allocated to it.
* This doesn't actually try to remove the buddy from the server list.
*
- * @buddy: The buddy to be removed
- *
* @see purple_account_remove_buddy
*/
void purple_blist_remove_buddy(PurpleBuddy *buddy);
/**
+ * purple_blist_remove_contact:
+ * @contact: The contact to be removed
+ *
* Removes a contact, and any buddies it contains, and frees the memory
* allocated to it. This calls purple_blist_remove_buddy and therefore
* doesn't remove the buddies from the server list.
*
- * @contact: The contact to be removed
- *
* @see purple_blist_remove_buddy
*/
void purple_blist_remove_contact(PurpleContact *contact);
/**
- * Removes a chat from the buddy list and frees the memory allocated to it.
- *
+ * purple_blist_remove_chat:
* @chat: The chat to be removed
+ *
+ * Removes a chat from the buddy list and frees the memory allocated to it.
*/
void purple_blist_remove_chat(PurpleChat *chat);
/**
+ * purple_blist_remove_group:
+ * @group: The group to be removed
+ *
* Removes a group from the buddy list and frees the memory allocated to it and to
* its children
- *
- * @group: The group to be removed
*/
void purple_blist_remove_group(PurpleGroup *group);
/**
- * Finds the buddy struct given a name and an account
- *
+ * purple_blist_find_buddy:
* @account: The account this buddy belongs to
* @name: The buddy's name
+ *
+ * Finds the buddy struct given a name and an account
+ *
* Returns: The buddy or NULL if the buddy does not exist
*/
PurpleBuddy *purple_blist_find_buddy(PurpleAccount *account, const char *name);
/**
- * Finds the buddy struct given a name, an account, and a group
- *
+ * purple_blist_find_buddy_in_group:
* @account: The account this buddy belongs to
* @name: The buddy's name
* @group: The group to look in
+ *
+ * Finds the buddy struct given a name, an account, and a group
+ *
* Returns: The buddy or NULL if the buddy does not exist in the group
*/
PurpleBuddy *purple_blist_find_buddy_in_group(PurpleAccount *account, const char *name,
PurpleGroup *group);
/**
- * Finds all PurpleBuddy structs given a name and an account
- *
+ * purple_blist_find_buddies:
* @account: The account this buddy belongs to
* @name: The buddy's name (or NULL to return all buddies for the account)
*
+ * Finds all PurpleBuddy structs given a name and an account
+ *
* Returns: NULL if the buddy doesn't exist, or a GSList of
* PurpleBuddy structs. You must free the GSList using
* g_slist_free. Do not free the PurpleBuddy structs that
@@ -349,36 +381,41 @@ PurpleBuddy *purple_blist_find_buddy_in_group(PurpleAccount *account, const char
GSList *purple_blist_find_buddies(PurpleAccount *account, const char *name);
/**
+ * purple_blist_find_group:
+ * @name: The group's name
+ *
* Finds a group by name
*
- * @name: The group's name
* Returns: The group or NULL if the group does not exist
*/
PurpleGroup *purple_blist_find_group(const char *name);
/**
- * Finds a chat by name.
- *
+ * purple_blist_find_chat:
* @account: The chat's account.
* @name: The chat's name.
*
+ * Finds a chat by name.
+ *
* Returns: The chat, or %NULL if the chat does not exist.
*/
PurpleChat *purple_blist_find_chat(PurpleAccount *account, const char *name);
/**
+ * purple_blist_add_account:
+ * @account: The account
+ *
* Called when an account connects. Tells the UI to update all the
* buddies.
- *
- * @account: The account
*/
void purple_blist_add_account(PurpleAccount *account);
/**
+ * purple_blist_remove_account:
+ * @account: The account
+ *
* Called when an account disconnects. Sets the presence of all the buddies to 0
* and tells the UI to update them.
- *
- * @account: The account
*/
void purple_blist_remove_account(PurpleAccount *account);
@@ -389,6 +426,8 @@ void purple_blist_remove_account(PurpleAccount *account);
/****************************************************************************************/
/**
+ * purple_blist_schedule_save:
+ *
* Schedule a save of the blist.xml file. This is used by the privacy
* API whenever the privacy settings are changed. If you make a change
* to blist.xml using one of the functions in the buddy list API, then
@@ -398,30 +437,34 @@ void purple_blist_remove_account(PurpleAccount *account);
void purple_blist_schedule_save(void);
/**
- * Requests from the user information needed to add a buddy to the
- * buddy list.
- *
+ * purple_blist_request_add_buddy:
* @account: The account the buddy is added to.
* @username: The username of the buddy.
* @group: The name of the group to place the buddy in.
* @alias: The optional alias for the buddy.
+ *
+ * Requests from the user information needed to add a buddy to the
+ * buddy list.
*/
void purple_blist_request_add_buddy(PurpleAccount *account, const char *username,
const char *group, const char *alias);
/**
- * Requests from the user information needed to add a chat to the
- * buddy list.
- *
+ * purple_blist_request_add_chat:
* @account: The account the buddy is added to.
* @group: The optional group to add the chat to.
* @alias: The optional alias for the chat.
* @name: The required chat name.
+ *
+ * Requests from the user information needed to add a chat to the
+ * buddy list.
*/
void purple_blist_request_add_chat(PurpleAccount *account, PurpleGroup *group,
const char *alias, const char *name);
/**
+ * purple_blist_request_add_group:
+ *
* Requests from the user information needed to add a group to the
* buddy list.
*/
@@ -433,13 +476,16 @@ void purple_blist_request_add_group(void);
/*@{*/
/**
- * Sets the UI operations structure to be used for the buddy list.
- *
+ * purple_blist_set_ui_ops:
* @ops: The ops struct.
+ *
+ * Sets the UI operations structure to be used for the buddy list.
*/
void purple_blist_set_ui_ops(PurpleBlistUiOps *ops);
/**
+ * purple_blist_get_ui_ops:
+ *
* Returns the UI operations structure to be used for the buddy list.
*
* Returns: The UI operations structure.
@@ -454,6 +500,8 @@ PurpleBlistUiOps *purple_blist_get_ui_ops(void);
/*@{*/
/**
+ * purple_blist_get_handle:
+ *
* Returns the handle for the buddy list subsystem.
*
* Returns: The buddy list subsystem handle.
@@ -461,11 +509,15 @@ PurpleBlistUiOps *purple_blist_get_ui_ops(void);
void *purple_blist_get_handle(void);
/**
+ * purple_blist_init:
+ *
* Initializes the buddy list subsystem.
*/
void purple_blist_init(void);
/**
+ * purple_blist_boot:
+ *
* Loads the buddy list.
*
* You shouldn't call this. purple_core_init() will do it for you.
@@ -473,6 +525,8 @@ void purple_blist_init(void);
void purple_blist_boot(void);
/**
+ * purple_blist_uninit:
+ *
* Uninitializes the buddy list subsystem.
*/
void purple_blist_uninit(void);
diff --git a/libpurple/certificate.h b/libpurple/certificate.h
index 04e9c44e8a..b4dedfe6e3 100644
--- a/libpurple/certificate.h
+++ b/libpurple/certificate.h
@@ -92,32 +92,39 @@ typedef struct _PurpleCertificateVerifier PurpleCertificateVerifier;
typedef struct _PurpleCertificateVerificationRequest PurpleCertificateVerificationRequest;
/**
- * Callback function for the results of a verification check
+ * PurpleCertificateVerifiedCallback:
* @st: Status code
* @userdata: User-defined data
+ *
+ * Callback function for the results of a verification check
*/
typedef void (*PurpleCertificateVerifiedCallback)
(PurpleCertificateVerificationStatus st,
gpointer userdata);
-/** A certificate instance
+/**
+ * PurpleCertificate:
+ * @scheme: Scheme this certificate is under
+ * @data: Opaque pointer to internal data
+ *
+ * A certificate instance
*
* An opaque data structure representing a single certificate under some
* CertificateScheme
*/
struct _PurpleCertificate
{
- /** Scheme this certificate is under */
PurpleCertificateScheme * scheme;
- /** Opaque pointer to internal data */
gpointer data;
};
/**
- * Database for retrieval or storage of Certificates
+ * PurpleCertificatePool:
+ *
+ * Database for retrieval or storage of Certificates
*
- * More or less a hash table; all lookups and writes are controlled by a string
- * key.
+ * More or less a hash table; all lookups and writes are controlled by a string
+ * key.
*/
struct _PurpleCertificatePool
{
@@ -174,7 +181,10 @@ struct _PurpleCertificatePool
void (*_purple_reserved4)(void);
};
-/** A certificate type
+/**
+ * PurpleCertificateScheme:
+ *
+ * A certificate type
*
* A CertificateScheme must implement all of the fields in the structure,
* and register it using purple_certificate_register_scheme()
@@ -320,8 +330,11 @@ struct _PurpleCertificateScheme
void (*_purple_reserved1)(void);
};
-/** A set of operations used to provide logic for verifying a Certificate's
- * authenticity.
+/**
+ * PurpleCertificateVerifier:
+ *
+ * A set of operations used to provide logic for verifying a Certificate's
+ * authenticity.
*
* A Verifier provider must fill out these fields, then register it using
* purple_certificate_register_verifier()
@@ -370,7 +383,10 @@ struct _PurpleCertificateVerifier
void (*_purple_reserved4)(void);
};
-/** Structure for a single certificate request
+/**
+ * PurpleCertificateVerificationRequest:
+ *
+ * Structure for a single certificate request
*
* Useful for keeping track of the state of a verification that involves
* several steps
@@ -416,27 +432,25 @@ G_BEGIN_DECLS
/*@{*/
/**
- * Constructs a verification request and passed control to the specified Verifier
- *
- * It is possible that the callback will be called immediately upon calling
- * this function. Plan accordingly.
- *
+ * purple_certificate_verify:
* @verifier: Verification logic to use.
* @see purple_certificate_find_verifier()
- *
* @subject_name: Name that should match the first certificate in the
* chain for the certificate to be valid. Will be strdup'd
* into the Request struct
- *
* @cert_chain: Certificate chain to check. If there is more than one
* certificate in the chain (X.509), the peer's
* certificate comes first, then the issuer/signer's
* certificate, etc. The whole list is duplicated into the
* Request struct.
- *
* @cb: Callback function to be called with whether the
* certificate was approved or not.
* @cb_data: User-defined data for the above.
+ *
+ * Constructs a verification request and passed control to the specified Verifier
+ *
+ * It is possible that the callback will be called immediately upon calling
+ * this function. Plan accordingly.
*/
void
purple_certificate_verify (PurpleCertificateVerifier *verifier,
@@ -445,11 +459,12 @@ purple_certificate_verify (PurpleCertificateVerifier *verifier,
gpointer cb_data);
/**
- * Completes and destroys a VerificationRequest
- *
+ * purple_certificate_verify_complete:
* @vrq: Request to conclude
* @st: Success/failure code to pass to the request's
* completion callback.
+ *
+ * Completes and destroys a VerificationRequest
*/
void
purple_certificate_verify_complete(PurpleCertificateVerificationRequest *vrq,
@@ -463,50 +478,59 @@ purple_certificate_verify_complete(PurpleCertificateVerificationRequest *vrq,
/*@{*/
/**
+ * purple_certificate_get_type:
+ *
* Returns the GType for the PurpleCertificate boxed structure.
*/
GType purple_certificate_get_type(void);
/**
+ * purple_certificate_copy:
+ * @crt: Instance to duplicate
+ *
* Makes a duplicate of a certificate
*
- * @crt: Instance to duplicate
* Returns: Pointer to new instance
*/
PurpleCertificate *
purple_certificate_copy(PurpleCertificate *crt);
/**
+ * purple_certificate_copy_list:
+ * @crt_list: List to duplicate
+ *
* Duplicates an entire list of certificates
*
- * @crt_list: List to duplicate
* Returns: New list copy
*/
GList *
purple_certificate_copy_list(GList *crt_list);
/**
- * Destroys and free()'s a Certificate
- *
+ * purple_certificate_destroy:
* @crt: Instance to destroy. May be NULL.
+ *
+ * Destroys and free()'s a Certificate
*/
void
purple_certificate_destroy (PurpleCertificate *crt);
/**
- * Destroy an entire list of Certificate instances and the containing list
- *
+ * purple_certificate_destroy_list:
* @crt_list: List of certificates to destroy. May be NULL.
+ *
+ * Destroy an entire list of Certificate instances and the containing list
*/
void
purple_certificate_destroy_list (GList * crt_list);
/**
- * Check whether 'crt' has a valid signature made by 'issuer'
- *
+ * purple_certificate_signed_by:
* @crt: Certificate instance to check signature of
* @issuer: Certificate thought to have signed 'crt'
*
+ * Check whether 'crt' has a valid signature made by 'issuer'
+ *
* Returns: TRUE if 'crt' has a valid signature made by 'issuer',
* otherwise FALSE
* @todo Find a way to give the reason (bad signature, not the issuer, etc.)
@@ -515,17 +539,19 @@ gboolean
purple_certificate_signed_by(PurpleCertificate *crt, PurpleCertificate *issuer);
/**
+ * purple_certificate_check_signature_chain:
+ * @chain: List of PurpleCertificate instances comprising the chain,
+ * in the order certificate, issuer, issuer's issuer, etc.
+ * @failing: A pointer to a PurpleCertificate*. If not NULL, if the
+ * chain fails to validate, this will be set to the
+ * certificate whose signature could not be validated.
+ *
* Check that a certificate chain is valid and, if not, the failing certificate.
*
* Uses purple_certificate_signed_by() to verify that each PurpleCertificate
* in the chain carries a valid signature from the next. A single-certificate
* chain is considered to be valid.
*
- * @chain: List of PurpleCertificate instances comprising the chain,
- * in the order certificate, issuer, issuer's issuer, etc.
- * @failing: A pointer to a PurpleCertificate*. If not NULL, if the
- * chain fails to validate, this will be set to the
- * certificate whose signature could not be validated.
* Returns: TRUE if the chain is valid. See description.
*/
gboolean
@@ -533,30 +559,36 @@ purple_certificate_check_signature_chain(GList *chain,
PurpleCertificate **failing);
/**
- * Imports a PurpleCertificate from a file
- *
+ * purple_certificate_import:
* @scheme: Scheme to import under
* @filename: File path to import from
+ *
+ * Imports a PurpleCertificate from a file
+ *
* Returns: Pointer to a new PurpleCertificate, or NULL on failure
*/
PurpleCertificate *
purple_certificate_import(PurpleCertificateScheme *scheme, const gchar *filename);
/**
- * Imports a list of PurpleCertificates from a file
- *
+ * purple_certificates_import:
* @scheme: Scheme to import under
* @filename: File path to import from
+ *
+ * Imports a list of PurpleCertificates from a file
+ *
* Returns: Pointer to a GSList of new PurpleCertificates, or NULL on failure
*/
GSList *
purple_certificates_import(PurpleCertificateScheme *scheme, const gchar *filename);
/**
- * Exports a PurpleCertificate to a file
- *
+ * purple_certificate_export:
* @filename: File to export the certificate to
* @crt: Certificate to export
+ *
+ * Exports a PurpleCertificate to a file
+ *
* Returns: TRUE if the export succeeded, otherwise FALSE
*/
gboolean
@@ -564,9 +596,11 @@ purple_certificate_export(const gchar *filename, PurpleCertificate *crt);
/**
+ * purple_certificate_get_fingerprint_sha1:
+ * @crt: Certificate instance
+ *
* Retrieves the certificate public key fingerprint using SHA1.
*
- * @crt: Certificate instance
* Returns: Binary representation of the hash. You are responsible for free()ing
* this.
* @see purple_base16_encode_chunked()
@@ -575,18 +609,22 @@ GByteArray *
purple_certificate_get_fingerprint_sha1(PurpleCertificate *crt);
/**
+ * purple_certificate_get_unique_id:
+ * @crt: Certificate instance
+ *
* Get a unique identifier for the certificate
*
- * @crt: Certificate instance
* Returns: String representing the certificate uniquely. Must be g_free()'ed
*/
gchar *
purple_certificate_get_unique_id(PurpleCertificate *crt);
/**
+ * purple_certificate_get_issuer_unique_id:
+ * @crt: Certificate instance
+ *
* Get a unique identifier for the certificate's issuer
*
- * @crt: Certificate instance
* Returns: String representing the certificate's issuer uniquely. Must be
* g_free()'ed
*/
@@ -594,44 +632,52 @@ gchar *
purple_certificate_get_issuer_unique_id(PurpleCertificate *crt);
/**
+ * purple_certificate_get_subject_name:
+ * @crt: Certificate instance
+ *
* Gets the certificate subject's name
*
* For X.509, this is the "Common Name" field, as we're only using it
* for hostname verification at the moment
*
- * @crt: Certificate instance
* Returns: Newly allocated string with the certificate subject.
*/
gchar *
purple_certificate_get_subject_name(PurpleCertificate *crt);
/**
- * Check the subject name against that on the certificate
+ * purple_certificate_check_subject_name:
* @crt: Certificate instance
* @name: Name to check.
+ *
+ * Check the subject name against that on the certificate
+ *
* Returns: TRUE if it is a match, else FALSE
*/
gboolean
purple_certificate_check_subject_name(PurpleCertificate *crt, const gchar *name);
/**
- * Get the expiration/activation times.
- *
+ * purple_certificate_get_times:
* @crt: Certificate instance
* @activation: Reference to store the activation time at. May be NULL
* if you don't actually want it.
* @expiration: Reference to store the expiration time at. May be NULL
* if you don't actually want it.
+ *
+ * Get the expiration/activation times.
+ *
* Returns: TRUE if the requested values were obtained, otherwise FALSE.
*/
gboolean
purple_certificate_get_times(PurpleCertificate *crt, gint64 *activation, gint64 *expiration);
/**
- * Retrieves the certificate data in DER form.
- *
+ * purple_certificate_get_der_data:
* @crt: Certificate instance
*
+ * Retrieves the certificate data in DER form.
+ *
* Returns: Binary DER representation of the certificate - must be freed using
* g_byte_array_free().
*/
@@ -639,10 +685,11 @@ GByteArray *
purple_certificate_get_der_data(PurpleCertificate *crt);
/**
- * Retrieves a string suitable for displaying a certificate to the user.
- *
+ * purple_certificate_get_display_string:
* @crt: Certificate instance
*
+ * Retrieves a string suitable for displaying a certificate to the user.
+ *
* Returns: String representing the certificate that may be displayed to the user
* - must be freed using g_free().
*/
@@ -657,6 +704,8 @@ purple_certificate_get_display_string(PurpleCertificate *crt);
/*@{*/
/**
+ * purple_certificate_pool_get_type:
+ *
* Returns the GType for the PurpleCertificatePool boxed structure.
* TODO Boxing of PurpleCertificatePool is a temporary solution to having a
* GType for certificate pools. This should rather be a GObject instead of
@@ -665,13 +714,15 @@ purple_certificate_get_display_string(PurpleCertificate *crt);
GType purple_certificate_pool_get_type(void);
/**
+ * purple_certificate_pool_mkpath:
+ * @pool: CertificatePool to build a path for
+ * @id: Key to look up a Certificate by. May be NULL.
+ *
* Helper function for generating file paths in ~/.purple/certificates for
* CertificatePools that use them.
*
* All components will be escaped for filesystem friendliness.
*
- * @pool: CertificatePool to build a path for
- * @id: Key to look up a Certificate by. May be NULL.
* Returns: A newly allocated path of the form
* ~/.purple/certificates/scheme_name/pool_name/unique_id
*/
@@ -679,22 +730,24 @@ gchar *
purple_certificate_pool_mkpath(PurpleCertificatePool *pool, const gchar *id);
/**
+ * purple_certificate_pool_usable:
+ * @pool: Pool to check
+ *
* Determines whether a pool can be used.
*
* Checks whether the associated CertificateScheme is loaded.
*
- * @pool: Pool to check
- *
* Returns: TRUE if the pool can be used, otherwise FALSE
*/
gboolean
purple_certificate_pool_usable(PurpleCertificatePool *pool);
/**
- * Looks up the scheme the pool operates under
- *
+ * purple_certificate_pool_get_scheme:
* @pool: Pool to get the scheme of
*
+ * Looks up the scheme the pool operates under
+ *
* Returns: Pointer to the pool's scheme, or NULL if it isn't loaded.
* @see purple_certificate_pool_usable()
*/
@@ -702,50 +755,62 @@ PurpleCertificateScheme *
purple_certificate_pool_get_scheme(PurpleCertificatePool *pool);
/**
- * Check for presence of an ID in a pool.
+ * purple_certificate_pool_contains:
* @pool: Pool to look in
* @id: ID to look for
+ *
+ * Check for presence of an ID in a pool.
+ *
* Returns: TRUE if the ID is in the pool, else FALSE
*/
gboolean
purple_certificate_pool_contains(PurpleCertificatePool *pool, const gchar *id);
/**
- * Retrieve a certificate from a pool.
+ * purple_certificate_pool_retrieve:
* @pool: Pool to fish in
* @id: ID to look up
+ *
+ * Retrieve a certificate from a pool.
+ *
* Returns: Retrieved certificate, or NULL if it wasn't there
*/
PurpleCertificate *
purple_certificate_pool_retrieve(PurpleCertificatePool *pool, const gchar *id);
/**
+ * purple_certificate_pool_store:
+ * @pool: Pool to add to
+ * @id: ID to store the certificate with
+ * @crt: Certificate to store
+ *
* Add a certificate to a pool
*
* Any pre-existing certificate of the same ID will be overwritten.
*
- * @pool: Pool to add to
- * @id: ID to store the certificate with
- * @crt: Certificate to store
* Returns: TRUE if the operation succeeded, otherwise FALSE
*/
gboolean
purple_certificate_pool_store(PurpleCertificatePool *pool, const gchar *id, PurpleCertificate *crt);
/**
- * Remove a certificate from a pool
- *
+ * purple_certificate_pool_delete:
* @pool: Pool to remove from
* @id: ID to remove
+ *
+ * Remove a certificate from a pool
+ *
* Returns: TRUE if the operation succeeded, otherwise FALSE
*/
gboolean
purple_certificate_pool_delete(PurpleCertificatePool *pool, const gchar *id);
/**
+ * purple_certificate_pool_get_idlist:
+ * @pool: Pool to enumerate
+ *
* Get the list of IDs currently in the pool.
*
- * @pool: Pool to enumerate
* Returns: GList pointing to newly-allocated id strings. Free using
* purple_certificate_pool_destroy_idlist()
*/
@@ -753,9 +818,10 @@ GList *
purple_certificate_pool_get_idlist(PurpleCertificatePool *pool);
/**
- * Destroys the result given by purple_certificate_pool_get_idlist()
- *
+ * purple_certificate_pool_destroy_idlist:
* @idlist: ID List to destroy
+ *
+ * Destroys the result given by purple_certificate_pool_get_idlist()
*/
void
purple_certificate_pool_destroy_idlist(GList *idlist);
@@ -768,31 +834,43 @@ purple_certificate_pool_destroy_idlist(GList *idlist);
/*@{*/
/**
+ * purple_certificate_init:
+ *
* Initialize the certificate system
*/
void
purple_certificate_init(void);
/**
+ * purple_certificate_uninit:
+ *
* Un-initialize the certificate system
*/
void
purple_certificate_uninit(void);
/**
+ * purple_certificate_get_handle:
+ *
* Get the Certificate subsystem handle for signalling purposes
*/
gpointer
purple_certificate_get_handle(void);
-/** Look up a registered CertificateScheme by name
+/**
+ * purple_certificate_find_scheme:
* @name: The scheme name. Case insensitive.
+ *
+ * Look up a registered CertificateScheme by name
+ *
* Returns: Pointer to the located Scheme, or NULL if it isn't found.
*/
PurpleCertificateScheme *
purple_certificate_find_scheme(const gchar *name);
/**
+ * purple_certificate_get_schemes:
+ *
* Get all registered CertificateSchemes
*
* Returns: GList pointing to all registered CertificateSchemes . This value
@@ -801,36 +879,47 @@ purple_certificate_find_scheme(const gchar *name);
GList *
purple_certificate_get_schemes(void);
-/** Register a CertificateScheme with libpurple
+/**
+ * purple_certificate_register_scheme:
+ * @scheme: Pointer to the scheme to register.
+ *
+ * Register a CertificateScheme with libpurple
*
* No two schemes can be registered with the same name; this function enforces
* that.
*
- * @scheme: Pointer to the scheme to register.
* Returns: TRUE if the scheme was successfully added, otherwise FALSE
*/
gboolean
purple_certificate_register_scheme(PurpleCertificateScheme *scheme);
-/** Unregister a CertificateScheme from libpurple
- *
+/**
+ * purple_certificate_unregister_scheme:
* @scheme: Scheme to unregister.
* If the scheme is not registered, this is a no-op.
*
+ * Unregister a CertificateScheme from libpurple
+ *
* Returns: TRUE if the unregister completed successfully
*/
gboolean
purple_certificate_unregister_scheme(PurpleCertificateScheme *scheme);
-/** Look up a registered PurpleCertificateVerifier by scheme and name
+/**
+ * purple_certificate_find_verifier:
* @scheme_name: Scheme name. Case insensitive.
* @ver_name: The verifier name. Case insensitive.
+ *
+ * Look up a registered PurpleCertificateVerifier by scheme and name
+ *
* Returns: Pointer to the located Verifier, or NULL if it isn't found.
*/
PurpleCertificateVerifier *
purple_certificate_find_verifier(const gchar *scheme_name, const gchar *ver_name);
/**
+ * purple_certificate_get_verifiers:
+ *
* Get the list of registered CertificateVerifiers
*
* Returns: GList of all registered PurpleCertificateVerifier. This value
@@ -840,32 +929,42 @@ GList *
purple_certificate_get_verifiers(void);
/**
+ * purple_certificate_register_verifier:
+ * @vr: Verifier to register.
+ *
* Register a CertificateVerifier with libpurple
*
- * @vr: Verifier to register.
* Returns: TRUE if register succeeded, otherwise FALSE
*/
gboolean
purple_certificate_register_verifier(PurpleCertificateVerifier *vr);
/**
+ * purple_certificate_unregister_verifier:
+ * @vr: Verifier to unregister.
+ *
* Unregister a CertificateVerifier with libpurple
*
- * @vr: Verifier to unregister.
* Returns: TRUE if unregister succeeded, otherwise FALSE
*/
gboolean
purple_certificate_unregister_verifier(PurpleCertificateVerifier *vr);
-/** Look up a registered PurpleCertificatePool by scheme and name
+/**
+ * purple_certificate_find_pool:
* @scheme_name: Scheme name. Case insensitive.
* @pool_name: Pool name. Case insensitive.
+ *
+ * Look up a registered PurpleCertificatePool by scheme and name
+ *
* Returns: Pointer to the located Pool, or NULL if it isn't found.
*/
PurpleCertificatePool *
purple_certificate_find_pool(const gchar *scheme_name, const gchar *pool_name);
/**
+ * purple_certificate_get_pools:
+ *
* Get the list of registered Pools
*
* Returns: GList of all registered PurpleCertificatePool s. This value
@@ -875,33 +974,37 @@ GList *
purple_certificate_get_pools(void);
/**
+ * purple_certificate_register_pool:
+ * @pool: Pool to register.
+ *
* Register a CertificatePool with libpurple and call its init function
*
- * @pool: Pool to register.
* Returns: TRUE if the register succeeded, otherwise FALSE
*/
gboolean
purple_certificate_register_pool(PurpleCertificatePool *pool);
/**
+ * purple_certificate_unregister_pool:
+ * @pool: Pool to unregister.
+ *
* Unregister a CertificatePool with libpurple and call its uninit function
*
- * @pool: Pool to unregister.
* Returns: TRUE if the unregister succeeded, otherwise FALSE
*/
gboolean
purple_certificate_unregister_pool(PurpleCertificatePool *pool);
-/*@}*/
-
-
/**
- * Add a search path for certificates.
- *
+ * purple_certificate_add_ca_search_path:
* @path: Path to search for certificates.
+ *
+ * Add a search path for certificates.
*/
void purple_certificate_add_ca_search_path(const char *path);
+/*@}*/
+
G_END_DECLS
#endif /* _PURPLE_CERTIFICATE_H */
diff --git a/libpurple/cipher.h b/libpurple/cipher.h
index bd3e9bf8ea..b0cdce0186 100644
--- a/libpurple/cipher.h
+++ b/libpurple/cipher.h
@@ -178,151 +178,167 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_cipher_get_type:
+ *
* Returns the GType for the Cipher object.
*/
GType purple_cipher_get_type(void);
/**
+ * purple_cipher_reset:
+ * @cipher: The cipher
+ *
* Resets a cipher to it's default value
* Note: If you have set an IV you will have to set it after resetting
- *
- * @cipher: The cipher
*/
void purple_cipher_reset(PurpleCipher *cipher);
/**
+ * purple_cipher_reset_state:
+ * @cipher: The cipher
+ *
* Resets a cipher state to it's default value, but doesn't touch stateless
* configuration.
*
* That means, IV and digest will be wiped out, but keys, ops or salt
* will remain untouched.
- *
- * @cipher: The cipher
*/
void purple_cipher_reset_state(PurpleCipher *cipher);
/**
- * Sets the initialization vector for a cipher
- * Note: This should only be called right after a cipher is created or reset
- *
+ * purple_cipher_set_iv:
* @cipher: The cipher
* @iv: The initialization vector to set
* @len: The len of the IV
+ *
+ * Sets the initialization vector for a cipher
+ * Note: This should only be called right after a cipher is created or reset
*/
void purple_cipher_set_iv(PurpleCipher *cipher, guchar *iv, size_t len);
/**
- * Appends data to the cipher context
- *
+ * purple_cipher_append:
* @cipher: The cipher
* @data: The data to append
* @len: The length of the data
+ *
+ * Appends data to the cipher context
*/
void purple_cipher_append(PurpleCipher *cipher, const guchar *data, size_t len);
/**
- * Digests a cipher context
- *
+ * purple_cipher_digest:
* @cipher: The cipher
* @digest: The return buffer for the digest
* @len: The length of the buffer
+ *
+ * Digests a cipher context
*/
gboolean purple_cipher_digest(PurpleCipher *cipher, guchar digest[], size_t len);
/**
- * Converts a guchar digest into a hex string
- *
+ * purple_cipher_digest_to_str:
* @cipher: The cipher
* @digest_s: The return buffer for the string digest
* @len: The length of the buffer
+ *
+ * Converts a guchar digest into a hex string
*/
gboolean purple_cipher_digest_to_str(PurpleCipher *cipher, gchar digest_s[], size_t len);
/**
- * Gets the digest size of a cipher
- *
+ * purple_cipher_get_digest_size:
* @cipher: The cipher whose digest size to get
*
+ * Gets the digest size of a cipher
+ *
* Returns: The digest size of the cipher
*/
size_t purple_cipher_get_digest_size(PurpleCipher *cipher);
/**
- * Encrypts data using the cipher
- *
+ * purple_cipher_encrypt:
* @cipher: The cipher
* @input: The data to encrypt
* @in_len: The length of the data
* @output: The output buffer
* @out_size: The size of the output buffer
*
+ * Encrypts data using the cipher
+ *
* Returns: A length of data that was outputed or -1, if failed
*/
ssize_t purple_cipher_encrypt(PurpleCipher *cipher, const guchar input[], size_t in_len, guchar output[], size_t out_size);
/**
- * Decrypts data using the cipher
- *
+ * purple_cipher_decrypt:
* @cipher: The cipher
* @input: The data to encrypt
* @in_len: The length of the returned value
* @output: The output buffer
* @out_size: The size of the output buffer
*
+ * Decrypts data using the cipher
+ *
* Returns: A length of data that was outputed or -1, if failed
*/
ssize_t purple_cipher_decrypt(PurpleCipher *cipher, const guchar input[], size_t in_len, guchar output[], size_t out_size);
/**
- * Sets the salt on a cipher
- *
+ * purple_cipher_set_salt:
* @cipher: The cipher whose salt to set
* @salt: The salt
* @len: The length of the salt
+ *
+ * Sets the salt on a cipher
*/
void purple_cipher_set_salt(PurpleCipher *cipher, const guchar *salt, size_t len);
/**
- * Sets the key on a cipher
- *
+ * purple_cipher_set_key:
* @cipher: The cipher whose key to set
* @key: The key
* @len: The size of the key
+ *
+ * Sets the key on a cipher
*/
void purple_cipher_set_key(PurpleCipher *cipher, const guchar *key, size_t len);
/**
- * Gets the size of the key if the cipher supports it
- *
+ * purple_cipher_get_key_size:
* @cipher: The cipher whose key size to get
*
+ * Gets the size of the key if the cipher supports it
+ *
* Returns: The size of the key
*/
size_t purple_cipher_get_key_size(PurpleCipher *cipher);
/**
- * Sets the batch mode of a cipher
- *
+ * purple_cipher_set_batch_mode:
* @cipher: The cipher whose batch mode to set
* @mode: The batch mode under which the cipher should operate
*
+ * Sets the batch mode of a cipher
*/
void purple_cipher_set_batch_mode(PurpleCipher *cipher, PurpleCipherBatchMode mode);
/**
- * Gets the batch mode of a cipher
- *
+ * purple_cipher_get_batch_mode:
* @cipher: The cipher whose batch mode to get
*
+ * Gets the batch mode of a cipher
+ *
* Returns: The batch mode under which the cipher is operating
*/
PurpleCipherBatchMode purple_cipher_get_batch_mode(PurpleCipher *cipher);
/**
- * Gets the block size of a cipher
- *
+ * purple_cipher_get_block_size:
* @cipher: The cipher whose block size to get
*
+ * Gets the block size of a cipher
+ *
* Returns: The block size of the cipher
*/
size_t purple_cipher_get_block_size(PurpleCipher *cipher);
@@ -335,70 +351,79 @@ size_t purple_cipher_get_block_size(PurpleCipher *cipher);
/*@{*/
/**
+ * purple_hash_get_type:
+ *
* Returns the GType for the Hash object.
*/
GType purple_hash_get_type(void);
/**
+ * purple_hash_reset:
+ * @hash: The hash
+ *
* Resets a hash to it's default value
* Note: If you have set an IV you will have to set it after resetting
- *
- * @hash: The hash
*/
void purple_hash_reset(PurpleHash *hash);
/**
+ * purple_hash_reset_state:
+ * @hash: The hash
+ *
* Resets a hash state to it's default value, but doesn't touch stateless
* configuration.
*
* That means, IV and digest will be wiped out, but keys, ops or salt
* will remain untouched.
- *
- * @hash: The hash
*/
void purple_hash_reset_state(PurpleHash *hash);
/**
- * Appends data to the hash context
- *
+ * purple_hash_append:
* @hash: The hash
* @data: The data to append
* @len: The length of the data
+ *
+ * Appends data to the hash context
*/
void purple_hash_append(PurpleHash *hash, const guchar *data, size_t len);
/**
- * Digests a hash context
- *
+ * purple_hash_digest:
* @hash: The hash
* @digest: The return buffer for the digest
* @len: The length of the buffer
+ *
+ * Digests a hash context
*/
gboolean purple_hash_digest(PurpleHash *hash, guchar digest[], size_t len);
/**
- * Converts a guchar digest into a hex string
- *
+ * purple_hash_digest_to_str:
* @hash: The hash
* @digest_s: The return buffer for the string digest
* @len: The length of the buffer
+ *
+ * Converts a guchar digest into a hex string
*/
gboolean purple_hash_digest_to_str(PurpleHash *hash, gchar digest_s[], size_t len);
/**
- * Gets the digest size of a hash
- *
+ * purple_hash_get_digest_size:
* @hash: The hash whose digest size to get
*
+ * Gets the digest size of a hash
+ *
* Returns: The digest size of the hash
*/
size_t purple_hash_get_digest_size(PurpleHash *hash);
/**
- * Gets the block size of a hash
- *
+ * purple_hash_get_block_size:
* @hash: The hash whose block size to get
*
+ * Gets the block size of a hash
+ *
* Returns: The block size of the hash
*/
size_t purple_hash_get_block_size(PurpleHash *hash);
diff --git a/libpurple/circularbuffer.h b/libpurple/circularbuffer.h
index a185e94b9b..4b83c5d39c 100644
--- a/libpurple/circularbuffer.h
+++ b/libpurple/circularbuffer.h
@@ -62,96 +62,105 @@ G_BEGIN_DECLS
GType purple_circular_buffer_get_type(void);
/**
- * Creates a new circular buffer. This will not allocate any memory for the
- * actual buffer until data is appended to it.
- *
+ * purple_circular_buffer_new:
* @growsize: The amount that the buffer should grow the first time data
* is appended and every time more space is needed. Pass in
* "0" to use the default of 256 bytes.
*
+ * Creates a new circular buffer. This will not allocate any memory for the
+ * actual buffer until data is appended to it.
+ *
* Returns: The new PurpleCircularBuffer.
*/
PurpleCircularBuffer *purple_circular_buffer_new(gsize growsize);
/**
- * Append data to the PurpleCircularBuffer. This will grow the internal
- * buffer to fit the added data, if needed.
- *
+ * purple_circular_buffer_append:
* @buf: The PurpleCircularBuffer to which to append the data
* @src: pointer to the data to copy into the buffer
* @len: number of bytes to copy into the buffer
+ *
+ * Append data to the PurpleCircularBuffer. This will grow the internal
+ * buffer to fit the added data, if needed.
*/
void purple_circular_buffer_append(PurpleCircularBuffer *buf, gconstpointer src, gsize len);
/**
+ * purple_circular_buffer_get_max_read:
+ * @buf: the PurpleCircularBuffer for which to determine the maximum
+ * contiguous bytes that can be read.
+ *
* Determine the maximum number of contiguous bytes that can be read from the
* PurpleCircularBuffer.
* Note: This may not be the total number of bytes that are buffered - a
* subsequent call after calling purple_circular_buffer_mark_read() may indicate
* more data is available to read.
*
- * @buf: the PurpleCircularBuffer for which to determine the maximum
- * contiguous bytes that can be read.
- *
* Returns: the number of bytes that can be read from the PurpleCircularBuffer
*/
gsize purple_circular_buffer_get_max_read(const PurpleCircularBuffer *buf);
/**
- * Mark the number of bytes that have been read from the buffer.
- *
+ * purple_circular_buffer_mark_read:
* @buf: The PurpleCircularBuffer to mark bytes read from
* @len: The number of bytes to mark as read
*
+ * Mark the number of bytes that have been read from the buffer.
+ *
* Returns: TRUE if we successfully marked the bytes as having been read, FALSE
* otherwise.
*/
gboolean purple_circular_buffer_mark_read(PurpleCircularBuffer *buf, gsize len);
/**
- * Increases the buffer size by a multiple of grow size, so that it can hold at
- * least 'len' bytes.
- *
+ * purple_circular_buffer_grow:
* @buffer: The PurpleCircularBuffer to grow.
* @len: The number of bytes the buffer should be able to hold.
+ *
+ * Increases the buffer size by a multiple of grow size, so that it can hold at
+ * least 'len' bytes.
*/
void purple_circular_buffer_grow(PurpleCircularBuffer *buffer, gsize len);
/**
+ * purple_circular_buffer_get_grow_size:
+ * @buffer: The PurpleCircularBuffer from which to get grow size.
+ *
* Returns the number of bytes by which the buffer grows when more space is
* needed.
*
- * @buffer: The PurpleCircularBuffer from which to get grow size.
- *
* Returns: The grow size of the buffer.
*/
gsize purple_circular_buffer_get_grow_size(const PurpleCircularBuffer *buffer);
/**
- * Returns the number of bytes of this buffer that contain unread data.
- *
+ * purple_circular_buffer_get_used:
* @buffer: The PurpleCircularBuffer from which to get used count.
*
+ * Returns the number of bytes of this buffer that contain unread data.
+ *
* Returns: The number of bytes that contain unread data.
*/
gsize purple_circular_buffer_get_used(const PurpleCircularBuffer *buffer);
/**
+ * purple_circular_buffer_get_output:
+ * @buffer: The PurpleCircularBuffer from which to get the output pointer.
+ *
* Returns the output pointer of the buffer, where unread data is available.
* Use purple_circular_buffer_get_max_read() to determine the number of
* contiguous bytes that can be read from this output. After reading the data,
* call purple_circular_buffer_mark_read() to mark the retrieved data as read.
*
- * @buffer: The PurpleCircularBuffer from which to get the output pointer.
- *
* Returns: The output pointer for the buffer.
*/
const gchar *purple_circular_buffer_get_output(const PurpleCircularBuffer *buffer);
/**
- * Resets the buffer contents.
- *
+ * purple_circular_buffer_reset:
* @buffer: The PurpleCircularBuffer to reset.
+ *
+ * Resets the buffer contents.
*/
void purple_circular_buffer_reset(PurpleCircularBuffer *buffer);
diff --git a/libpurple/cmds.h b/libpurple/cmds.h
index 43ccdd0c80..2e452bf363 100644
--- a/libpurple/cmds.h
+++ b/libpurple/cmds.h
@@ -31,7 +31,11 @@
/**************************************************************************/
/*@{*/
-/** The possible results of running a command with purple_cmd_do_command(). */
+/**
+ * PurpleCmdStatus:
+ *
+ * The possible results of running a command with purple_cmd_do_command().
+ */
typedef enum {
PURPLE_CMD_STATUS_OK,
PURPLE_CMD_STATUS_FAILED,
@@ -41,30 +45,44 @@ typedef enum {
PURPLE_CMD_STATUS_WRONG_TYPE
} PurpleCmdStatus;
-/** Commands registered with the core return one of these values when run.
- * Normally, a command will want to return one of the first two; in some
- * unusual cases, you might want to have several functions called for a
- * particular command; in this case, they should return
- * #PURPLE_CMD_RET_CONTINUE to cause the core to fall through to other
- * commands with the same name.
+/**
+ * PurpleCmdRet:
+ * @PURPLE_CMD_RET_OK: Everything's okay; Don't look for another command
+ * to call.
+ * @PURPLE_CMD_RET_FAILED: The command failed, but stop looking.
+ * @PURPLE_CMD_RET_CONTINUE: Continue, looking for other commands with the same
+ * name to call.
+ *
+ * Commands registered with the core return one of these values when run.
+ * Normally, a command will want to return one of the first two; in some
+ * unusual cases, you might want to have several functions called for a
+ * particular command; in this case, they should return
+ * #PURPLE_CMD_RET_CONTINUE to cause the core to fall through to other
+ * commands with the same name.
*/
typedef enum {
- PURPLE_CMD_RET_OK, /**< Everything's okay; Don't look for another command to call. */
- PURPLE_CMD_RET_FAILED, /**< The command failed, but stop looking.*/
- PURPLE_CMD_RET_CONTINUE /**< Continue, looking for other commands with the same name to call. */
+ PURPLE_CMD_RET_OK,
+ PURPLE_CMD_RET_FAILED,
+ PURPLE_CMD_RET_CONTINUE
} PurpleCmdRet;
#define PURPLE_CMD_FUNC(func) ((PurpleCmdFunc)func)
-/** A function implementing a command, as passed to purple_cmd_register().
+/**
+ * PurpleCmdFunc:
+ *
+ * A function implementing a command, as passed to purple_cmd_register().
*
- * @todo document the arguments to these functions.
- * */
+ * @todo document the arguments to these functions.
+ */
typedef PurpleCmdRet (*PurpleCmdFunc)(PurpleConversation *, const gchar *cmd,
gchar **args, gchar **error, void *data);
-/** A unique integer representing a command registered with
- * purple_cmd_register(), which can subsequently be passed to
- * purple_cmd_unregister() to unregister that command.
+/**
+ * PurpleCmdId:
+ *
+ * A unique integer representing a command registered with
+ * purple_cmd_register(), which can subsequently be passed to
+ * purple_cmd_unregister() to unregister that command.
*/
typedef guint PurpleCmdId;
@@ -79,20 +97,25 @@ typedef enum {
PURPLE_CMD_P_VERY_HIGH = 6000
} PurpleCmdPriority;
-/** Flags used to set various properties of commands. Every command should
- * have at least one of #PURPLE_CMD_FLAG_IM and #PURPLE_CMD_FLAG_CHAT set in
- * order to be even slighly useful.
+/**
+ * PurpleCmdFlag:
+ * @PURPLE_CMD_FLAG_IM: Command is usable in IMs.
+ * @PURPLE_CMD_FLAG_CHAT: Command is usable in multi-user chats.
+ * @PURPLE_CMD_FLAG_PRPL_ONLY: Command is usable only for a particular
+ * protocol.
+ * @PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS: Incorrect arguments to this command
+ * should be accepted anyway.
+ *
+ * Flags used to set various properties of commands. Every command should
+ * have at least one of #PURPLE_CMD_FLAG_IM and #PURPLE_CMD_FLAG_CHAT set in
+ * order to be even slighly useful.
*
- * @see purple_cmd_register
+ * @see purple_cmd_register
*/
typedef enum {
- /** Command is usable in IMs. */
PURPLE_CMD_FLAG_IM = 0x01,
- /** Command is usable in multi-user chats. */
PURPLE_CMD_FLAG_CHAT = 0x02,
- /** Command is usable only for a particular prpl. */
PURPLE_CMD_FLAG_PRPL_ONLY = 0x04,
- /** Incorrect arguments to this command should be accepted anyway. */
PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS = 0x08
} PurpleCmdFlag;
@@ -107,17 +130,13 @@ G_BEGIN_DECLS
/*@{*/
/**
- * Register a new command with the core.
- *
- * The command will only happen if commands are enabled,
- * which is a UI pref. UIs don't have to support commands at all.
- *
+ * purple_cmd_register:
* @cmd: The command. This should be a UTF-8 (or ASCII) string, with no spaces
* or other white space.
* @args: A string of characters describing to libpurple how to parse this
* command's arguments. If what the user types doesn't match this
* pattern, libpurple will keep looking for another command, unless
- * the flag #PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS is passed in @a f.
+ * the flag #PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS is passed in @f.
* This string should contain no whitespace, and use a single
* character for each argument. The recognized characters are:
* <ul>
@@ -128,7 +147,7 @@ G_BEGIN_DECLS
* <li><tt>'S'</tt>: Same as <tt>'s'</tt> but with formatting.</li>
* </ul>
* If args is the empty string, then the command accepts no arguments.
- * The args passed to the callback @a func will be a %NULL
+ * The args passed to the callback @func will be a %NULL
* terminated array of %NULL terminated strings, and will always
* match the number of arguments asked for, unless
* #PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS is passed.
@@ -139,8 +158,8 @@ G_BEGIN_DECLS
* <tt>|</tt> (bitwise OR). You need to at least pass one of
* #PURPLE_CMD_FLAG_IM or #PURPLE_CMD_FLAG_CHAT (you may pass both) in
* order for the command to ever actually be called.
- * @prpl_id: If the #PURPLE_CMD_FLAG_PRPL_ONLY flag is set, this is the id
- * of the prpl to which the command applies (such as
+ * @protocol_id: If the #PURPLE_CMD_FLAG_PRPL_ONLY flag is set, this is the id
+ * of the protocol to which the command applies (such as
* <tt>"prpl-msn"</tt>). If the flag is not set, this parameter
* is ignored; pass %NULL (or a humourous string of your
* choice!).
@@ -152,30 +171,33 @@ G_BEGIN_DECLS
* followed by a colon, two spaces, and a description of the
* command in sentence form. Do not include a slash before the
* command name.
- * @data: User defined data to pass to the #PurpleCmdFunc @a f.
+ * @data: User defined data to pass to the #PurpleCmdFunc @f.
+ *
+ * Register a new command with the core.
+ *
+ * The command will only happen if commands are enabled,
+ * which is a UI pref. UIs don't have to support commands at all.
+ *
* Returns: A #PurpleCmdId, which is only used for calling
- * #purple_cmd_unregister, or @a 0 on failure.
+ * #purple_cmd_unregister, or 0 on failure.
*/
PurpleCmdId purple_cmd_register(const gchar *cmd, const gchar *args, PurpleCmdPriority p, PurpleCmdFlag f,
- const gchar *prpl_id, PurpleCmdFunc func, const gchar *helpstr, void *data);
+ const gchar *protocol_id, PurpleCmdFunc func, const gchar *helpstr, void *data);
/**
+ * purple_cmd_unregister:
+ * @id: The #PurpleCmdId to unregister, as returned by #purple_cmd_register.
+ *
* Unregister a command with the core.
*
* All registered commands must be unregistered, if they're registered by a plugin
* or something else that might go away. Normally this is called when the plugin
* unloads itself.
- *
- * @id: The #PurpleCmdId to unregister, as returned by #purple_cmd_register.
*/
void purple_cmd_unregister(PurpleCmdId id);
/**
- * Do a command.
- *
- * Normally the UI calls this to perform a command. This might also be useful
- * if aliases are ever implemented.
- *
+ * purple_cmd_do_command:
* @conv: The conversation the command was typed in.
* @cmdline: The command the user typed (including all arguments) as a single string.
* The caller doesn't have to do any parsing, except removing the command
@@ -186,52 +208,68 @@ void purple_cmd_unregister(PurpleCmdId id);
* include both the default formatting and any extra manual formatting.
* @errormsg: If the command failed errormsg is filled in with the appropriate error
* message. It must be freed by the caller with g_free().
+ *
+ * Do a command.
+ *
+ * Normally the UI calls this to perform a command. This might also be useful
+ * if aliases are ever implemented.
+ *
* Returns: A #PurpleCmdStatus indicating if the command succeeded or failed.
*/
PurpleCmdStatus purple_cmd_do_command(PurpleConversation *conv, const gchar *cmdline,
const gchar *markup, gchar **errormsg);
/**
+ * purple_cmd_list:
+ * @conv: The conversation, or %NULL.
+ *
* List registered commands.
*
* Returns a <tt>GList</tt> (which must be freed by the caller) of all commands
- * that are valid in the context of @a conv, or all commands, if @a conv is @c
- * NULL. Don't keep this list around past the main loop, or anything else that
+ * that are valid in the context of @conv, or all commands, if @conv is
+ * %NULL. Don't keep this list around past the main loop, or anything else that
* might unregister a command, as the <tt>const char *</tt>'s used get freed
* then.
*
- * @conv: The conversation, or %NULL.
- * Returns: A @c GList of <tt>const char *</tt>, which must be freed with
+ * Returns: A #GList of <tt>const char *</tt>, which must be freed with
* <tt>g_list_free()</tt>.
*/
GList *purple_cmd_list(PurpleConversation *conv);
/**
+ * purple_cmd_help:
+ * @conv: The conversation, or %NULL for no context.
+ * @cmd: The command. No wildcards accepted, but returns help for all
+ * commands if %NULL.
+ *
* Get the help string for a command.
*
* Returns the help strings for a given command in the form of a GList,
* one node for each matching command.
*
- * @conv: The conversation, or %NULL for no context.
- * @cmd: The command. No wildcards accepted, but returns help for all
- * commands if %NULL.
* Returns: A <tt>GList</tt> of <tt>const char *</tt>s, which is the help string
* for that command.
*/
GList *purple_cmd_help(PurpleConversation *conv, const gchar *cmd);
/**
+ * purple_cmds_get_handle:
+ *
* Get the handle for the commands API
* Returns: The handle
*/
gpointer purple_cmds_get_handle(void);
/**
+ * purple_cmds_init:
+ *
* Initialize the commands subsystem.
*/
void purple_cmds_init(void);
/**
+ * purple_cmds_uninit:
+ *
* Uninitialize the commands subsystem.
*/
void purple_cmds_uninit(void);
diff --git a/libpurple/connection.h b/libpurple/connection.h
index 07358ba620..422471e78a 100644
--- a/libpurple/connection.h
+++ b/libpurple/connection.h
@@ -36,106 +36,129 @@
#define PURPLE_TYPE_CONNECTION_ERROR_INFO (purple_connection_error_info_get_type())
-/** @copydoc _PurpleConnection */
typedef struct _PurpleConnection PurpleConnection;
-/** @copydoc _PurpleConnectionClass */
typedef struct _PurpleConnectionClass PurpleConnectionClass;
/**
+ * PurpleConnectionFlags:
+ * @PURPLE_CONNECTION_FLAG_HTML: Connection sends/receives in 'HTML'
+ * @PURPLE_CONNECTION_FLAG_NO_BGCOLOR: Connection does not send/receive
+ * background colors
+ * @PURPLE_CONNECTION_FLAG_AUTO_RESP: Send auto responses when away
+ * @PURPLE_CONNECTION_FLAG_FORMATTING_WBFO: The text buffer must be formatted
+ * as a whole
+ * @PURPLE_CONNECTION_FLAG_NO_NEWLINES: No new lines are allowed in outgoing
+ * messages
+ * @PURPLE_CONNECTION_FLAG_NO_FONTSIZE: Connection does not send/receive font
+ * sizes
+ * @PURPLE_CONNECTION_FLAG_NO_URLDESC: Connection does not support descriptions
+ * with links
+ * @PURPLE_CONNECTION_FLAG_NO_IMAGES: Connection does not support sending of
+ * images
+ * @PURPLE_CONNECTION_FLAG_ALLOW_CUSTOM_SMILEY: Connection supports sending
+ * and receiving custom smileys
+ * @PURPLE_CONNECTION_FLAG_SUPPORT_MOODS: Connection supports setting moods
+ * @PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES: Connection supports setting
+ * a message on moods
+ *
* Flags to change behavior of the client for a given connection.
*/
typedef enum /*< flags >*/
{
- PURPLE_CONNECTION_FLAG_HTML = 0x0001, /**< Connection sends/receives in 'HTML' */
- PURPLE_CONNECTION_FLAG_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive background colors */
- PURPLE_CONNECTION_FLAG_AUTO_RESP = 0x0004, /**< Send auto responses when away */
- PURPLE_CONNECTION_FLAG_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */
- PURPLE_CONNECTION_FLAG_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */
- PURPLE_CONNECTION_FLAG_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */
- PURPLE_CONNECTION_FLAG_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */
- PURPLE_CONNECTION_FLAG_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */
- PURPLE_CONNECTION_FLAG_ALLOW_CUSTOM_SMILEY = 0x0100, /**< Connection supports sending and receiving custom smileys */
- PURPLE_CONNECTION_FLAG_SUPPORT_MOODS = 0x0200, /**< Connection supports setting moods */
- PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES = 0x0400 /**< Connection supports setting a message on moods */
+ PURPLE_CONNECTION_FLAG_HTML = 0x0001,
+ PURPLE_CONNECTION_FLAG_NO_BGCOLOR = 0x0002,
+ PURPLE_CONNECTION_FLAG_AUTO_RESP = 0x0004,
+ PURPLE_CONNECTION_FLAG_FORMATTING_WBFO = 0x0008,
+ PURPLE_CONNECTION_FLAG_NO_NEWLINES = 0x0010,
+ PURPLE_CONNECTION_FLAG_NO_FONTSIZE = 0x0020,
+ PURPLE_CONNECTION_FLAG_NO_URLDESC = 0x0040,
+ PURPLE_CONNECTION_FLAG_NO_IMAGES = 0x0080,
+ PURPLE_CONNECTION_FLAG_ALLOW_CUSTOM_SMILEY = 0x0100,
+ PURPLE_CONNECTION_FLAG_SUPPORT_MOODS = 0x0200,
+ PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES = 0x0400
} PurpleConnectionFlags;
+/**
+ * PurpleConnectionState:
+ * @PURPLE_CONNECTION_DISCONNECTED: Disconnected.
+ * @PURPLE_CONNECTION_CONNECTED: Connected.
+ * @PURPLE_CONNECTION_CONNECTING: Connecting.
+ */
typedef enum
{
- PURPLE_CONNECTION_DISCONNECTED = 0, /**< Disconnected. */
- PURPLE_CONNECTION_CONNECTED, /**< Connected. */
- PURPLE_CONNECTION_CONNECTING /**< Connecting. */
-
+ PURPLE_CONNECTION_DISCONNECTED = 0,
+ PURPLE_CONNECTION_CONNECTED,
+ PURPLE_CONNECTION_CONNECTING
} PurpleConnectionState;
/**
+ * PurpleConnectionError:
+ * @PURPLE_CONNECTION_ERROR_NETWORK_ERROR: There was an error sending or
+ * receiving on the network socket, or there was some protocol error
+ * (such as the server sending malformed data).
+ * @PURPLE_CONNECTION_ERROR_INVALID_USERNAME: The username supplied was not
+ * valid.
+ * @PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED: The username, password or
+ * some other credential was incorrect. Use
+ * #PURPLE_CONNECTION_ERROR_INVALID_USERNAME instead if the username
+ * is known to be invalid.
+ * @PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE: libpurple doesn't speak
+ * any of the authentication methods the server offered.
+ * @PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT: libpurple was built without SSL
+ * support, and the connection needs SSL.
+ * @PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR: There was an error negotiating
+ * SSL on this connection, or the server does not support encryption
+ * but an account option was set to require it.
+ * @PURPLE_CONNECTION_ERROR_NAME_IN_USE: Someone is already connected to the
+ * server using the name you are trying to connect with.
+ * @PURPLE_CONNECTION_ERROR_INVALID_SETTINGS: The username/server/other
+ * preference for the account isn't valid. For instance, on IRC the
+ * username cannot contain white space. This reason should not be used
+ * for incorrect passwords etc: use
+ * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that.
+ * @todo This reason really shouldn't be necessary. Usernames and
+ * other account preferences should be validated when the
+ * account is created.
+ * @PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED: The server did not provide a
+ * SSL certificate.
+ * @PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED: The server's SSL certificate could
+ * not be trusted.
+ * @PURPLE_CONNECTION_ERROR_CERT_EXPIRED: The server's SSL certificate has
+ * expired.
+ * @PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED: The server's SSL certificate is
+ * not yet valid.
+ * @PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH: The server's SSL
+ * certificate did not match its hostname.
+ * @PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH: The server's SSL
+ * certificate does not have the expected fingerprint.
+ * @PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED: The server's SSL certificate is
+ * self-signed.
+ * @PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR: There was some other error
+ * validating the server's SSL certificate.
+ * @PURPLE_CONNECTION_ERROR_OTHER_ERROR: Some other error occurred which fits
+ * into none of the other categories.
+ *
* Possible errors that can cause a connection to be closed.
*/
typedef enum
{
- /** There was an error sending or receiving on the network socket, or
- * there was some protocol error (such as the server sending malformed
- * data).
- */
PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0,
- /** The username supplied was not valid. */
PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1,
- /** The username, password or some other credential was incorrect. Use
- * #PURPLE_CONNECTION_ERROR_INVALID_USERNAME instead if the username
- * is known to be invalid.
- */
PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 2,
- /** libpurple doesn't speak any of the authentication methods the
- * server offered.
- */
PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 3,
- /** libpurple was built without SSL support, and the connection needs
- * SSL.
- */
PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 4,
- /** There was an error negotiating SSL on this connection, or the
- * server does not support encryption but an account option was set to
- * require it.
- */
PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 5,
- /** Someone is already connected to the server using the name you are
- * trying to connect with.
- */
PURPLE_CONNECTION_ERROR_NAME_IN_USE = 6,
-
- /** The username/server/other preference for the account isn't valid.
- * For instance, on IRC the username cannot contain white space.
- * This reason should not be used for incorrect passwords etc: use
- * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that.
- *
- * @todo This reason really shouldn't be necessary. Usernames and
- * other account preferences should be validated when the
- * account is created.
- */
PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 7,
-
- /** The server did not provide a SSL certificate. */
PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 8,
- /** The server's SSL certificate could not be trusted. */
PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 9,
- /** The server's SSL certificate has expired. */
PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 10,
- /** The server's SSL certificate is not yet valid. */
PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 11,
- /** The server's SSL certificate did not match its hostname. */
PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 12,
- /** The server's SSL certificate does not have the expected
- * fingerprint.
- */
PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 13,
- /** The server's SSL certificate is self-signed. */
PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 14,
- /** There was some other error validating the server's SSL certificate.
- */
PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 15,
- /** Some other error occurred which fits into none of the other
- * categories.
- */
/* purple_connection_error() in connection.c uses the fact that
* this is the last member of the enum when sanity-checking; if other
* reasons are added after it, the check must be updated.
@@ -143,12 +166,16 @@ typedef enum
PURPLE_CONNECTION_ERROR_OTHER_ERROR = 16
} PurpleConnectionError;
-/** Holds the type of an error along with its description. */
+/**
+ * PurpleConnectionErrorInfo:
+ * @type: The type of error.
+ * @description: A localised, human-readable description of the error.
+ *
+ * Holds the type of an error along with its description.
+ */
typedef struct
{
- /** The type of error. */
PurpleConnectionError type;
- /** A localised, human-readable description of the error. */
char *description;
} PurpleConnectionErrorInfo;
@@ -160,6 +187,8 @@ typedef struct
#include "sslconn.h"
/**
+ * PurpleConnectionUiOps:
+ *
* Connection UI operations. Used to notify the user of changes to
* connections, such as being disconnected, and to respond to the
* underlying network connection appearing and disappearing. UIs should
@@ -237,6 +266,8 @@ typedef struct
} PurpleConnectionUiOps;
/**
+ * PurpleConnection:
+ *
* Represents an active connection on an account.
*/
struct _PurpleConnection
@@ -244,7 +275,11 @@ struct _PurpleConnection
GObject gparent;
};
-/** Base class for all #PurpleConnection's */
+/**
+ * PurpleConnectionClass:
+ *
+ * Base class for all #PurpleConnection's
+ */
struct _PurpleConnectionClass {
GObjectClass parent_class;
@@ -263,70 +298,82 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_connection_get_type:
+ *
* Returns the GType for the Connection object.
*/
GType purple_connection_get_type(void);
/**
+ * purple_connection_error_info_get_type:
+ *
* Returns the GType for the PurpleConnectionErrorInfo boxed structure.
*/
GType purple_connection_error_info_get_type(void);
/**
- * Sets the connection state. PRPLs should call this and pass in
+ * purple_connection_set_state:
+ * @gc: The connection.
+ * @state: The connection state.
+ *
+ * Sets the connection state. Protocols should call this and pass in
* the state #PURPLE_CONNECTION_CONNECTED when the account is completely
* signed on. What does it mean to be completely signed on? If
- * the core can call prpl->set_status, and it successfully changes
+ * the core can call protocol's set_status, and it successfully changes
* your status, then the account is online.
- *
- * @gc: The connection.
- * @state: The connection state.
*/
void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state);
/**
- * Sets the connection flags.
- *
+ * purple_connection_set_flags:
* @gc: The connection.
* @flags: The flags.
+ *
+ * Sets the connection flags.
*/
void purple_connection_set_flags(PurpleConnection *gc, PurpleConnectionFlags flags);
/**
- * Sets the connection's displayed name.
- *
+ * purple_connection_set_display_name:
* @gc: The connection.
* @name: The displayed name.
+ *
+ * Sets the connection's displayed name.
*/
void purple_connection_set_display_name(PurpleConnection *gc, const char *name);
/**
- * Sets the protocol data for a connection.
- *
+ * purple_connection_set_protocol_data:
* @connection: The PurpleConnection.
* @proto_data: The protocol data to set for the connection.
+ *
+ * Sets the protocol data for a connection.
*/
void purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data);
/**
- * Returns the connection state.
- *
+ * purple_connection_get_state:
* @gc: The connection.
*
+ * Returns the connection state.
+ *
* Returns: The connection state.
*/
PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc);
/**
- * Returns the connection flags.
- *
+ * purple_connection_get_flags:
* @gc: The connection.
*
+ * Returns the connection flags.
+ *
* Returns: The connection flags.
*/
PurpleConnectionFlags purple_connection_get_flags(const PurpleConnection *gc);
/**
+ * PURPLE_CONNECTION_IS_CONNECTED:
+ *
* Returns TRUE if the account is connected, otherwise returns FALSE.
*
* Returns: TRUE if the account is connected, otherwise returns FALSE.
@@ -335,85 +382,94 @@ PurpleConnectionFlags purple_connection_get_flags(const PurpleConnection *gc);
(purple_connection_get_state(gc) == PURPLE_CONNECTION_CONNECTED)
/**
- * Returns the connection's account.
- *
+ * purple_connection_get_account:
* @gc: The connection.
*
+ * Returns the connection's account.
+ *
* Returns: The connection's account.
*/
PurpleAccount *purple_connection_get_account(const PurpleConnection *gc);
/**
- * Returns the protocol plugin managing a connection.
- *
+ * purple_connection_get_prpl:
* @gc: The connection.
*
+ * Returns the protocol plugin managing a connection.
+ *
* Returns: The protocol plugin.
*/
-PurplePlugin * purple_connection_get_prpl(const PurpleConnection *gc);
+PurplePlugin *purple_connection_get_prpl(const PurpleConnection *gc);
/**
- * Returns the connection's password.
- *
+ * purple_connection_get_password:
* @gc: The connection.
*
+ * Returns the connection's password.
+ *
* Returns: The connection's password.
*/
const char *purple_connection_get_password(const PurpleConnection *gc);
/**
- * Returns a list of active chat conversations on a connection.
- *
+ * purple_connection_get_active_chats:
* @gc: The connection.
*
+ * Returns a list of active chat conversations on a connection.
+ *
* Returns: The active chats on the connection.
*/
GSList *purple_connection_get_active_chats(const PurpleConnection *gc);
/**
- * Returns the connection's displayed name.
- *
+ * purple_connection_get_display_name:
* @gc: The connection.
*
+ * Returns the connection's displayed name.
+ *
* Returns: The connection's displayed name.
*/
const char *purple_connection_get_display_name(const PurpleConnection *gc);
/**
- * Gets the protocol data from a connection.
+ * purple_connection_get_protocol_data:
+ * @gc: The PurpleConnection.
*
- * @connection: The PurpleConnection.
+ * Gets the protocol data from a connection.
*
* Returns: The protocol data for the connection.
*/
void *purple_connection_get_protocol_data(const PurpleConnection *gc);
/**
- * Updates the connection progress.
- *
+ * purple_connection_update_progress:
* @gc: The connection.
* @text: Information on the current step.
* @step: The current step.
* @count: The total number of steps.
+ *
+ * Updates the connection progress.
*/
void purple_connection_update_progress(PurpleConnection *gc, const char *text,
size_t step, size_t count);
/**
- * Displays a connection-specific notice.
- *
+ * purple_connection_notice:
* @gc: The connection.
* @text: The notice text.
+ *
+ * Displays a connection-specific notice.
*/
void purple_connection_notice(PurpleConnection *gc, const char *text);
/**
- * Closes a connection with an error and a human-readable description of the
- * error.
- *
+ * purple_connection_error:
* @gc: the connection which is closing.
* @reason: why the connection is closing.
* @description: a localized description of the error (not %NULL ).
+ *
+ * Closes a connection with an error and a human-readable description of the
+ * error.
*/
void
purple_connection_error(PurpleConnection *gc,
@@ -421,11 +477,12 @@ purple_connection_error(PurpleConnection *gc,
const char *description);
/**
+ * purple_connection_get_error_info:
+ * @gc: The connection.
+ *
* Returns the #PurpleConnectionErrorInfo instance of a connection if an
* error exists.
*
- * @gc: The connection.
- *
* Returns: The #PurpleConnectionErrorInfo instance of the connection if an
* error exists, %NULL otherwise.
*/
@@ -433,6 +490,8 @@ PurpleConnectionErrorInfo *
purple_connection_get_error_info(const PurpleConnection *gc);
/**
+ * purple_connection_ssl_error:
+ *
* Closes a connection due to an SSL error; this is basically a shortcut to
* turning the #PurpleSslErrorType into a #PurpleConnectionError and a
* human-readable string and then calling purple_connection_error().
@@ -442,6 +501,8 @@ purple_connection_ssl_error (PurpleConnection *gc,
PurpleSslErrorType ssl_error);
/**
+ * purple_connection_error_is_fatal:
+ *
* Reports whether a disconnection reason is fatal (in which case the account
* should probably not be automatically reconnected) or transient (so
* auto-reconnection is a good idea).
@@ -461,10 +522,11 @@ gboolean
purple_connection_error_is_fatal (PurpleConnectionError reason);
/**
- * Indicate that a packet was received on the connection.
- * Set by the prpl to avoid sending unneeded keepalives.
- *
+ * purple_connection_update_last_received:
* @gc: The connection.
+ *
+ * Indicate that a packet was received on the connection.
+ * Set by the protocol to avoid sending unneeded keepalives.
*/
void purple_connection_update_last_received(PurpleConnection *gc);
@@ -476,11 +538,15 @@ void purple_connection_update_last_received(PurpleConnection *gc);
/*@{*/
/**
+ * purple_connections_disconnect_all:
+ *
* Disconnects from all connections.
*/
void purple_connections_disconnect_all(void);
/**
+ * purple_connections_get_all:
+ *
* Returns a list of all active connections. This does not
* include connections that are in the process of connecting.
*
@@ -489,6 +555,8 @@ void purple_connections_disconnect_all(void);
GList *purple_connections_get_all(void);
/**
+ * purple_connections_get_connecting:
+ *
* Returns a list of all connections in the process of connecting.
*
* Returns: (transfer none): A list of connecting connections.
@@ -496,18 +564,21 @@ GList *purple_connections_get_all(void);
GList *purple_connections_get_connecting(void);
/**
+ * PURPLE_CONNECTION_IS_VALID:
+ *
* Checks if gc is still a valid pointer to a gc.
*
* Returns: %TRUE if gc is valid.
*
- * @deprecated Do not use this. Instead, cancel your asynchronous request
+ * Deprecated: Do not use this. Instead, cancel your asynchronous request
* when the PurpleConnection is destroyed.
*/
/*
* TODO: Eventually this bad boy will be removed, because it is
* a gross fix for a crashy problem.
*/
-#define PURPLE_CONNECTION_IS_VALID(gc) (g_list_find(purple_connections_get_all(), (gc)) != NULL)
+#define PURPLE_CONNECTION_IS_VALID(gc) \
+ (g_list_find(purple_connections_get_all(), (gc)) != NULL)
/*@}*/
@@ -517,13 +588,16 @@ GList *purple_connections_get_connecting(void);
/*@{*/
/**
- * Sets the UI operations structure to be used for connections.
- *
+ * purple_connections_set_ui_ops:
* @ops: The UI operations structure.
+ *
+ * Sets the UI operations structure to be used for connections.
*/
void purple_connections_set_ui_ops(PurpleConnectionUiOps *ops);
/**
+ * purple_connections_get_ui_ops:
+ *
* Returns the UI operations structure used for connections.
*
* Returns: The UI operations structure in use.
@@ -538,16 +612,22 @@ PurpleConnectionUiOps *purple_connections_get_ui_ops(void);
/*@{*/
/**
+ * purple_connections_init:
+ *
* Initializes the connections subsystem.
*/
void purple_connections_init(void);
/**
+ * purple_connections_uninit:
+ *
* Uninitializes the connections subsystem.
*/
void purple_connections_uninit(void);
/**
+ * purple_connections_get_handle:
+ *
* Returns the handle to the connections subsystem.
*
* Returns: The connections subsystem handle.
diff --git a/libpurple/conversation.h b/libpurple/conversation.h
index 326952f63b..22e209c96a 100644
--- a/libpurple/conversation.h
+++ b/libpurple/conversation.h
@@ -39,77 +39,103 @@
/** Data Structures */
/**************************************************************************/
-/** @copydoc _PurpleConversation */
typedef struct _PurpleConversation PurpleConversation;
-/** @copydoc _PurpleConversation */
typedef struct _PurpleConversationClass PurpleConversationClass;
-/** @copydoc _PurpleConversationUiOps */
typedef struct _PurpleConversationUiOps PurpleConversationUiOps;
-/** @copydoc _PurpleConversationMessage */
+
typedef struct _PurpleConversationMessage PurpleConversationMessage;
/**
+ * PurpleConversationUpdateType:
+ * @PURPLE_CONVERSATION_UPDATE_ADD: The buddy associated with the
+ * conversation was added.
+ * @PURPLE_CONVERSATION_UPDATE_REMOVE: The buddy associated with the
+ * conversation was removed.
+ * @PURPLE_CONVERSATION_UPDATE_ACCOUNT: The purple_account was changed.
+ * @PURPLE_CONVERSATION_UPDATE_TYPING: The typing state was updated.
+ * @PURPLE_CONVERSATION_UPDATE_UNSEEN: The unseen state was updated.
+ * @PURPLE_CONVERSATION_UPDATE_LOGGING: Logging for this conversation was
+ * enabled or disabled.
+ * @PURPLE_CONVERSATION_UPDATE_TOPIC: The topic for a chat was updated.
+ * @PURPLE_CONVERSATION_UPDATE_E2EE: The End-to-end encryption state was
+ * updated.
+ * @PURPLE_CONVERSATION_ACCOUNT_ONLINE: One of the user's accounts went online.
+ * @PURPLE_CONVERSATION_ACCOUNT_OFFLINE: One of the user's accounts went
+ * offline.
+ * @PURPLE_CONVERSATION_UPDATE_AWAY: The other user went away.
+ * @PURPLE_CONVERSATION_UPDATE_ICON: The other user's buddy icon changed.
+ * @PURPLE_CONVERSATION_UPDATE_FEATURES: The features for a chat have changed.
+ *
* Conversation update type.
*/
typedef enum
{
- PURPLE_CONVERSATION_UPDATE_ADD = 0, /**< The buddy associated with the conversation
- was added. */
- PURPLE_CONVERSATION_UPDATE_REMOVE, /**< The buddy associated with the conversation
- was removed. */
- PURPLE_CONVERSATION_UPDATE_ACCOUNT, /**< The purple_account was changed. */
- PURPLE_CONVERSATION_UPDATE_TYPING, /**< The typing state was updated. */
- PURPLE_CONVERSATION_UPDATE_UNSEEN, /**< The unseen state was updated. */
- PURPLE_CONVERSATION_UPDATE_LOGGING, /**< Logging for this conversation was
- enabled or disabled. */
- PURPLE_CONVERSATION_UPDATE_TOPIC, /**< The topic for a chat was updated. */
- PURPLE_CONVERSATION_UPDATE_E2EE, /**< The End-to-end encryption state was
- updated. */
+ PURPLE_CONVERSATION_UPDATE_ADD = 0,
+ PURPLE_CONVERSATION_UPDATE_REMOVE,
+ PURPLE_CONVERSATION_UPDATE_ACCOUNT,
+ PURPLE_CONVERSATION_UPDATE_TYPING,
+ PURPLE_CONVERSATION_UPDATE_UNSEEN,
+ PURPLE_CONVERSATION_UPDATE_LOGGING,
+ PURPLE_CONVERSATION_UPDATE_TOPIC,
+ PURPLE_CONVERSATION_UPDATE_E2EE,
+
/*
* XXX These need to go when we implement a more generic core/UI event
* system.
*/
- PURPLE_CONVERSATION_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */
- PURPLE_CONVERSATION_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */
- PURPLE_CONVERSATION_UPDATE_AWAY, /**< The other user went away. */
- PURPLE_CONVERSATION_UPDATE_ICON, /**< The other user's buddy icon changed. */
+ PURPLE_CONVERSATION_ACCOUNT_ONLINE,
+ PURPLE_CONVERSATION_ACCOUNT_OFFLINE,
+ PURPLE_CONVERSATION_UPDATE_AWAY,
+ PURPLE_CONVERSATION_UPDATE_ICON,
PURPLE_CONVERSATION_UPDATE_NAME,
PURPLE_CONVERSATION_UPDATE_TITLE,
PURPLE_CONVERSATION_UPDATE_CHATLEFT,
- PURPLE_CONVERSATION_UPDATE_FEATURES /**< The features for a chat have changed */
+ PURPLE_CONVERSATION_UPDATE_FEATURES
} PurpleConversationUpdateType;
/**
+ * PurpleMessageFlags:
+ * @PURPLE_MESSAGE_SEND: Outgoing message.
+ * @PURPLE_MESSAGE_RECV: Incoming message.
+ * @PURPLE_MESSAGE_SYSTEM: System message.
+ * @PURPLE_MESSAGE_AUTO_RESP: Auto response.
+ * @PURPLE_MESSAGE_ACTIVE_ONLY: Hint to the UI that this message should not be
+ * shown in conversations which are only open for
+ * internal UI purposes (e.g. for contact-aware
+ * conversations).
+ * @PURPLE_MESSAGE_NICK: Contains your nick.
+ * @PURPLE_MESSAGE_NO_LOG: Do not log.
+ * @PURPLE_MESSAGE_WHISPER: Whispered message.
+ * @PURPLE_MESSAGE_ERROR: Error message.
+ * @PURPLE_MESSAGE_DELAYED: Delayed message.
+ * @PURPLE_MESSAGE_RAW: "Raw" message - don't apply formatting
+ * @PURPLE_MESSAGE_IMAGES: Message contains images
+ * @PURPLE_MESSAGE_NOTIFY: Message is a notification
+ * @PURPLE_MESSAGE_NO_LINKIFY: Message should not be auto-linkified
+ * @PURPLE_MESSAGE_INVISIBLE: Message should not be displayed
+ *
* Flags applicable to a message. Most will have send, recv or system.
*/
typedef enum /*< flags >*/
{
- PURPLE_MESSAGE_SEND = 0x0001, /**< Outgoing message. */
- PURPLE_MESSAGE_RECV = 0x0002, /**< Incoming message. */
- PURPLE_MESSAGE_SYSTEM = 0x0004, /**< System message. */
- PURPLE_MESSAGE_AUTO_RESP = 0x0008, /**< Auto response. */
- PURPLE_MESSAGE_ACTIVE_ONLY = 0x0010, /**< Hint to the UI that this
- message should not be
- shown in conversations
- which are only open for
- internal UI purposes
- (e.g. for contact-aware
- conversations). */
- PURPLE_MESSAGE_NICK = 0x0020, /**< Contains your nick. */
- PURPLE_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */
- PURPLE_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */
- PURPLE_MESSAGE_ERROR = 0x0200, /**< Error message. */
- PURPLE_MESSAGE_DELAYED = 0x0400, /**< Delayed message. */
- PURPLE_MESSAGE_RAW = 0x0800, /**< "Raw" message - don't
- apply formatting */
- PURPLE_MESSAGE_IMAGES = 0x1000, /**< Message contains images */
- PURPLE_MESSAGE_NOTIFY = 0x2000, /**< Message is a notification */
- PURPLE_MESSAGE_NO_LINKIFY = 0x4000, /**< Message should not be auto-
- linkified */
- PURPLE_MESSAGE_INVISIBLE = 0x8000 /**< Message should not be displayed */
+ PURPLE_MESSAGE_SEND = 0x0001,
+ PURPLE_MESSAGE_RECV = 0x0002,
+ PURPLE_MESSAGE_SYSTEM = 0x0004,
+ PURPLE_MESSAGE_AUTO_RESP = 0x0008,
+ PURPLE_MESSAGE_ACTIVE_ONLY = 0x0010,
+ PURPLE_MESSAGE_NICK = 0x0020,
+ PURPLE_MESSAGE_NO_LOG = 0x0040,
+ PURPLE_MESSAGE_WHISPER = 0x0080,
+ PURPLE_MESSAGE_ERROR = 0x0200,
+ PURPLE_MESSAGE_DELAYED = 0x0400,
+ PURPLE_MESSAGE_RAW = 0x0800,
+ PURPLE_MESSAGE_IMAGES = 0x1000,
+ PURPLE_MESSAGE_NOTIFY = 0x2000,
+ PURPLE_MESSAGE_NO_LINKIFY = 0x4000,
+ PURPLE_MESSAGE_INVISIBLE = 0x8000
} PurpleMessageFlags;
#include <glib.h>
@@ -119,6 +145,11 @@ typedef enum /*< flags >*/
/** PurpleConversation */
/**************************************************************************/
/**
+ * PurpleConversation:
+ * @ui_data: The UI data associated with this conversation. This is a
+ * convenience field provided to the UIs -- it is not used by the
+ * libpurple core.
+ *
* A core representation of a conversation between two or more people.
*
* The conversation can be an IM or a chat.
@@ -132,13 +163,14 @@ struct _PurpleConversation
{
GObject gparent;
- /** The UI data associated with this conversation. This is a convenience
- * field provided to the UIs -- it is not used by the libpurple core.
- */
gpointer ui_data;
};
-/** Base class for all #PurpleConversation's */
+/**
+ * PurpleConversationClass:
+ *
+ * Base class for all #PurpleConversation's
+ */
struct _PurpleConversationClass {
GObjectClass parent_class;
@@ -164,6 +196,8 @@ struct _PurpleConversationClass {
/** PurpleConversationUiOps */
/**************************************************************************/
/**
+ * PurpleConversationUiOps:
+ *
* Conversation operations and events.
*
* Any UI representing a conversation must assign a filled-out
@@ -171,12 +205,12 @@ struct _PurpleConversationClass {
*/
struct _PurpleConversationUiOps
{
- /** Called when @a conv is created (but before the @ref
+ /** Called when @conv is created (but before the @ref
* conversation-created signal is emitted).
*/
void (*create_conversation)(PurpleConversation *conv);
- /** Called just before @a conv is freed. */
+ /** Called just before @conv is freed. */
void (*destroy_conversation)(PurpleConversation *conv);
/** Write a message to a chat. If this field is %NULL, libpurple will
* fall back to using #write_conv.
@@ -207,8 +241,8 @@ struct _PurpleConversationUiOps
PurpleMessageFlags flags,
time_t mtime);
- /** Add @a cbuddies to a chat.
- * @cbuddies: A @c GList of #PurpleChatUser structs.
+ /** Add @cbuddies to a chat.
+ * @cbuddies: A GList of #PurpleChatUser structs.
* @new_arrivals: Whether join notices should be shown.
* (Join notices are actually written to the
* conversation by
@@ -217,15 +251,15 @@ struct _PurpleConversationUiOps
void (*chat_add_users)(PurpleChatConversation *chat,
GList *cbuddies,
gboolean new_arrivals);
- /** Rename the user in this chat named @a old_name to @a new_name. (The
+ /** Rename the user in this chat named @old_name to @new_name. (The
* rename message is written to the conversation by libpurple.)
- * @new_alias: @a new_name's new alias, if they have one.
+ * @new_alias: @new_name's new alias, if they have one.
* @see purple_chat_conversation_add_users()
*/
void (*chat_rename_user)(PurpleChatConversation *chat, const char *old_name,
const char *new_name, const char *new_alias);
- /** Remove @a users from a chat.
- * @users: A @c GList of <tt>const char *</tt>s.
+ /** Remove @users from a chat.
+ * @users: A GList of <tt>const char *</tt>s.
* @see purple_chat_conversation_rename_user()
*/
void (*chat_remove_users)(PurpleChatConversation *chat, GList *users);
@@ -252,7 +286,7 @@ struct _PurpleConversationUiOps
const guchar *data, gsize size);
void (*custom_smiley_close)(PurpleConversation *conv, const char *smile);
- /** Prompt the user for confirmation to send @a message. This function
+ /** Prompt the user for confirmation to send @message. This function
* should arrange for the message to be sent if the user accepts. If
* this field is %NULL, libpurple will fall back to using
* #purple_request_action().
@@ -274,162 +308,188 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_conversation_get_type:
+ *
* Returns the GType for the Conversation object.
*/
GType purple_conversation_get_type(void);
/**
+ * purple_conversation_present:
+ * @conv: The conversation to present
+ *
* Present a conversation to the user. This allows core code to initiate a
* conversation by displaying the IM dialog.
- * @conv: The conversation to present
*/
void purple_conversation_present(PurpleConversation *conv);
/**
- * Sets the specified conversation's UI operations structure.
- *
+ * purple_conversation_set_ui_ops:
* @conv: The conversation.
* @ops: The UI conversation operations structure.
+ *
+ * Sets the specified conversation's UI operations structure.
*/
void purple_conversation_set_ui_ops(PurpleConversation *conv,
PurpleConversationUiOps *ops);
/**
- * Returns the specified conversation's UI operations structure.
- *
+ * purple_conversation_get_ui_ops:
* @conv: The conversation.
*
+ * Returns the specified conversation's UI operations structure.
+ *
* Returns: The operations structure.
*/
PurpleConversationUiOps *purple_conversation_get_ui_ops(const PurpleConversation *conv);
/**
+ * purple_conversation_set_account:
+ * @conv: The conversation.
+ * @account: The purple_account.
+ *
* Sets the specified conversation's purple_account.
*
* This purple_account represents the user using purple, not the person the user
* is having a conversation/chat/flame with.
- *
- * @conv: The conversation.
- * @account: The purple_account.
*/
void purple_conversation_set_account(PurpleConversation *conv,
PurpleAccount *account);
/**
+ * purple_conversation_get_account:
+ * @conv: The conversation.
+ *
* Returns the specified conversation's purple_account.
*
* This purple_account represents the user using purple, not the person the user
* is having a conversation/chat/flame with.
*
- * @conv: The conversation.
- *
* Returns: The conversation's purple_account.
*/
PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv);
/**
- * Returns the specified conversation's purple_connection.
- *
+ * purple_conversation_get_connection:
* @conv: The conversation.
*
+ * Returns the specified conversation's purple_connection.
+ *
* Returns: The conversation's purple_connection.
*/
PurpleConnection *purple_conversation_get_connection(const PurpleConversation *conv);
/**
- * Sets the specified conversation's title.
- *
+ * purple_conversation_set_title:
* @conv: The conversation.
* @title: The title.
+ *
+ * Sets the specified conversation's title.
*/
void purple_conversation_set_title(PurpleConversation *conv, const char *title);
/**
- * Returns the specified conversation's title.
- *
+ * purple_conversation_get_title:
* @conv: The conversation.
*
+ * Returns the specified conversation's title.
+ *
* Returns: The title.
*/
const char *purple_conversation_get_title(const PurpleConversation *conv);
/**
+ * purple_conversation_autoset_title:
+ * @conv: The conversation.
+ *
* Automatically sets the specified conversation's title.
*
* This function takes OPT_IM_ALIAS_TAB into account, as well as the
* user's alias.
- *
- * @conv: The conversation.
*/
void purple_conversation_autoset_title(PurpleConversation *conv);
/**
- * Sets the specified conversation's name.
- *
+ * purple_conversation_set_name:
* @conv: The conversation.
* @name: The conversation's name.
+ *
+ * Sets the specified conversation's name.
*/
void purple_conversation_set_name(PurpleConversation *conv, const char *name);
/**
- * Returns the specified conversation's name.
- *
+ * purple_conversation_get_name:
* @conv: The conversation.
*
- * Returns: The conversation's name. If the conversation is an IM with a PurpleBuddy,
- * then it's the name of the PurpleBuddy.
+ * Returns the specified conversation's name.
+ *
+ * Returns: The conversation's name. If the conversation is an IM with a
+ * PurpleBuddy, then it's the name of the PurpleBuddy.
*/
const char *purple_conversation_get_name(const PurpleConversation *conv);
/**
- * Sets current E2EE state for the conversation.
- *
+ * purple_conversation_set_e2ee_state:
* @conv: The conversation.
* @state: The E2EE state.
+ *
+ * Sets current E2EE state for the conversation.
*/
void
purple_conversation_set_e2ee_state(PurpleConversation *conv,
PurpleE2eeState *state);
/**
- * Gets current conversation's E2EE state.
- *
+ * purple_conversation_get_e2ee_state:
* @conv: The conversation.
*
+ * Gets current conversation's E2EE state.
+ *
* Returns: Current E2EE state for conversation.
*/
PurpleE2eeState *
purple_conversation_get_e2ee_state(PurpleConversation *conv);
/**
- * Enables or disables logging for this conversation.
- *
+ * purple_conversation_set_logging:
* @conv: The conversation.
* @log: %TRUE if logging should be enabled, or %FALSE otherwise.
+ *
+ * Enables or disables logging for this conversation.
*/
void purple_conversation_set_logging(PurpleConversation *conv, gboolean log);
/**
- * Returns whether or not logging is enabled for this conversation.
- *
+ * purple_conversation_is_logging:
* @conv: The conversation.
*
+ * Returns whether or not logging is enabled for this conversation.
+ *
* Returns: %TRUE if logging is enabled, or %FALSE otherwise.
*/
gboolean purple_conversation_is_logging(const PurpleConversation *conv);
/**
+ * purple_conversation_close_logs:
+ * @conv: The conversation.
+ *
* Closes any open logs for this conversation.
*
* Note that new logs will be opened as necessary (e.g. upon receipt of a
* message, if the conversation has logging enabled. To disable logging for
* the remainder of the conversation, use purple_conversation_set_logging().
- *
- * @conv: The conversation.
*/
void purple_conversation_close_logs(PurpleConversation *conv);
/**
+ * purple_conversation_write:
+ * @conv: The conversation.
+ * @who: The user who sent the message.
+ * @message: The message.
+ * @flags: The message flags.
+ * @mtime: The time the message was sent.
+ *
* Writes to a conversation window.
*
* This function should not be used to write IM or chat messages. Use
@@ -441,12 +501,6 @@ void purple_conversation_close_logs(PurpleConversation *conv);
* This can be used to write generic messages, such as "so and so closed
* the conversation window."
*
- * @conv: The conversation.
- * @who: The user who sent the message.
- * @message: The message.
- * @flags: The message flags.
- * @mtime: The time the message was sent.
- *
* @see purple_conversation_write_message()
*/
void purple_conversation_write(PurpleConversation *conv, const char *who,
@@ -454,102 +508,115 @@ void purple_conversation_write(PurpleConversation *conv, const char *who,
time_t mtime);
/**
- * Writes to a chat or an IM.
- *
+ * purple_conversation_write_message:
* @conv: The conversation.
* @who: The user who sent the message.
* @message: The message to write.
* @flags: The message flags.
* @mtime: The time the message was sent.
+ *
+ * Writes to a chat or an IM.
*/
void purple_conversation_write_message(PurpleConversation *conv,
const char *who, const char *message,
PurpleMessageFlags flags, time_t mtime);
/**
- * Sends a message to this conversation. This function calls
- * purple_conversation_send_with_flags() with no additional flags.
- *
+ * purple_conversation_send:
* @conv: The conversation.
* @message: The message to send.
+ *
+ * Sends a message to this conversation. This function calls
+ * purple_conversation_send_with_flags() with no additional flags.
*/
void purple_conversation_send(PurpleConversation *conv, const char *message);
/**
- * Sends a message to this conversation with specified flags.
- *
+ * purple_conversation_send_with_flags:
* @conv: The conversation.
* @message: The message to send.
* @flags: The PurpleMessageFlags flags to use in addition to
- * PURPLE_MESSAGE_SEND.
+ * PURPLE_MESSAGE_SEND.
+ *
+ * Sends a message to this conversation with specified flags.
*/
void purple_conversation_send_with_flags(PurpleConversation *conv, const char *message,
PurpleMessageFlags flags);
/**
- Set the features as supported for the given conversation.
- @conv: The conversation
- @features: Bitset defining supported features
-*/
+ * purple_conversation_set_features:
+ * @conv: The conversation
+ * @features: Bitset defining supported features
+ *
+ * Set the features as supported for the given conversation.
+ */
void purple_conversation_set_features(PurpleConversation *conv,
PurpleConnectionFlags features);
/**
- Get the features supported by the given conversation.
- @conv: The conversation
-*/
+ * purple_conversation_get_features:
+ * @conv: The conversation
+ *
+ * Get the features supported by the given conversation.
+ */
PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv);
/**
- * Determines if a conversation has focus
- *
+ * purple_conversation_has_focus:
* @conv: The conversation.
*
+ * Determines if a conversation has focus
+ *
* Returns: %TRUE if the conversation has focus, %FALSE if
* it does not or the UI does not have a concept of conversation focus
*/
gboolean purple_conversation_has_focus(PurpleConversation *conv);
/**
- * Updates the visual status and UI of a conversation.
- *
+ * purple_conversation_update:
* @conv: The conversation.
* @type: The update type.
+ *
+ * Updates the visual status and UI of a conversation.
*/
void purple_conversation_update(PurpleConversation *conv, PurpleConversationUpdateType type);
/**
- * Retrieve the message history of a conversation.
- *
+ * purple_conversation_get_message_history:
* @conv: The conversation
*
- * Returns: A GList of PurpleConversationMessage's. The must not modify the list or the data within.
- * The list contains the newest message at the beginning, and the oldest message at
- * the end.
+ * Retrieve the message history of a conversation.
+ *
+ * Returns: A GList of PurpleConversationMessage's. The must not modify the
+ * list or the data within. The list contains the newest message at
+ * the beginning, and the oldest message at the end.
*/
GList *purple_conversation_get_message_history(PurpleConversation *conv);
/**
- * Clear the message history of a conversation.
- *
+ * purple_conversation_clear_message_history:
* @conv: The conversation
+ *
+ * Clear the message history of a conversation.
*/
void purple_conversation_clear_message_history(PurpleConversation *conv);
/**
- * Set the UI data associated with this conversation.
- *
+ * purple_conversation_set_ui_data:
* @conv: The conversation.
* @ui_data: A pointer to associate with this conversation.
+ *
+ * Set the UI data associated with this conversation.
*/
void purple_conversation_set_ui_data(PurpleConversation *conv, gpointer ui_data);
/**
- * Get the UI data associated with this conversation.
- *
+ * purple_conversation_get_ui_data:
* @conv: The conversation.
*
+ * Get the UI data associated with this conversation.
+ *
* Returns: The UI data associated with this conversation. This is a
* convenience field provided to the UIs--it is not
* used by the libpurple core.
@@ -557,6 +624,10 @@ void purple_conversation_set_ui_data(PurpleConversation *conv, gpointer ui_data)
gpointer purple_conversation_get_ui_data(const PurpleConversation *conv);
/**
+ * purple_conversation_send_confirm:
+ * @conv: The conversation.
+ * @message: The message to send.
+ *
* Sends a message to a conversation after confirming with
* the user.
*
@@ -564,13 +635,17 @@ gpointer purple_conversation_get_ui_data(const PurpleConversation *conv);
* hasn't explicitly and knowingly caused a message to be sent.
* The confirmation ensures that the user isn't sending a
* message by mistake.
- *
- * @conv: The conversation.
- * @message: The message to send.
*/
void purple_conversation_send_confirm(PurpleConversation *conv, const char *message);
/**
+ * purple_conversation_custom_smiley_add:
+ * @conv: The conversation to associate the smiley with.
+ * @smile: The text associated with the smiley
+ * @cksum_type: The type of checksum.
+ * @chksum: The checksum, as a NUL terminated base64 string.
+ * @remote: %TRUE if the custom smiley is set by the remote user (buddy).
+ *
* Adds a smiley to the conversation's smiley tree. If this returns
* %TRUE you should call purple_conversation_custom_smiley_write() one or more
* times, and then purple_conversation_custom_smiley_close(). If this returns
@@ -578,11 +653,6 @@ void purple_conversation_send_confirm(PurpleConversation *conv, const char *mess
* found in the cache. In either case, calling write or close would
* be an error.
*
- * @conv: The conversation to associate the smiley with.
- * @smile: The text associated with the smiley
- * @cksum_type: The type of checksum.
- * @chksum: The checksum, as a NUL terminated base64 string.
- * @remote: %TRUE if the custom smiley is set by the remote user (buddy).
* Returns: %TRUE if an icon is expected, else FALSE. Note that
* it is an error to never call purple_conversation_custom_smiley_close if
* this function returns %TRUE, but an error to call it if
@@ -594,12 +664,13 @@ gboolean purple_conversation_custom_smiley_add(PurpleConversation *conv, const c
gboolean remote);
/**
- * Updates the image associated with the current smiley.
- *
+ * purple_conversation_custom_smiley_write:
* @conv: The conversation associated with the smiley.
* @smile: The text associated with the smiley.
* @data: The actual image data.
* @size: The length of the data.
+ *
+ * Updates the image associated with the current smiley.
*/
void purple_conversation_custom_smiley_write(PurpleConversation *conv,
@@ -608,21 +679,23 @@ void purple_conversation_custom_smiley_write(PurpleConversation *conv,
gsize size);
/**
+ * purple_conversation_custom_smiley_close:
+ * @conv: The purple conversation associated with the smiley.
+ * @smile: The text associated with the smiley
+ *
* Close the custom smiley, all data has been written with
* purple_conversation_custom_smiley_write, and it is no longer valid
* to call that function on that smiley.
- *
- * @conv: The purple conversation associated with the smiley.
- * @smile: The text associated with the smiley
*/
void purple_conversation_custom_smiley_close(PurpleConversation *conv, const char *smile);
/**
- * Retrieves the extended menu items for the conversation.
- *
+ * purple_conversation_get_extended_menu:
* @conv: The conversation.
*
+ * Retrieves the extended menu items for the conversation.
+ *
* Returns: A list of PurpleMenuAction items, harvested by the
* chat-extended-menu signal. The list and the menuaction
* items should be freed by the caller.
@@ -630,26 +703,28 @@ void purple_conversation_custom_smiley_close(PurpleConversation *conv, const cha
GList * purple_conversation_get_extended_menu(PurpleConversation *conv);
/**
- * Perform a command in a conversation. Similar to @see purple_cmd_do_command
- *
+ * purple_conversation_do_command:
* @conv: The conversation.
* @cmdline: The entire command including the arguments.
* @markup: %NULL, or the formatted command line.
* @error: If the command failed errormsg is filled in with the appropriate error
* message, if not %NULL. It must be freed by the caller with g_free().
*
+ * Perform a command in a conversation. Similar to @see purple_cmd_do_command
+ *
* Returns: %TRUE if the command was executed successfully, %FALSE otherwise.
*/
gboolean purple_conversation_do_command(PurpleConversation *conv,
const gchar *cmdline, const gchar *markup, gchar **error);
/**
+ * purple_conversation_get_max_message_size:
+ * @conv: The conversation to query.
+ *
* Gets the maximum message size in bytes for the conversation.
*
* @see PurplePluginProtocolInfo#get_max_message_size
*
- * @conv: The conversation to query.
- *
* Returns: Maximum message size, 0 if unspecified, -1 for infinite.
*/
gssize
@@ -663,6 +738,11 @@ purple_conversation_get_max_message_size(PurpleConversation *conv);
/*@{*/
/**
+ * purple_conversation_present_error:
+ * @who: The user this error is about
+ * @account: The account this error is on
+ * @what: The error
+ *
* Presents an IM-error to the user
*
* This is a helper function to find a conversation, write an error to it, and
@@ -670,9 +750,6 @@ purple_conversation_get_max_message_size(PurpleConversation *conv);
* the function will return FALSE and the calling function can attempt to present
* the error another way (purple_notify_error, most likely)
*
- * @who: The user this error is about
- * @account: The account this error is on
- * @what: The error
* Returns: TRUE if the error was presented, else FALSE
*/
gboolean purple_conversation_present_error(const char *who, PurpleAccount *account, const char *what);
@@ -685,60 +762,68 @@ gboolean purple_conversation_present_error(const char *who, PurpleAccount *accou
/*@{*/
/**
+ * purple_conversation_message_get_type:
+ *
* Returns the GType for the PurpleConversationMessage boxed structure.
*/
GType purple_conversation_message_get_type(void);
/**
- * Get the sender from a PurpleConversationMessage
- *
+ * purple_conversation_message_get_sender:
* @msg: A PurpleConversationMessage
*
+ * Get the sender from a PurpleConversationMessage
+ *
* Returns: The name of the sender of the message
*/
const char *purple_conversation_message_get_sender(const PurpleConversationMessage *msg);
/**
- * Get the message from a PurpleConversationMessage
- *
+ * purple_conversation_message_get_message:
* @msg: A PurpleConversationMessage
*
+ * Get the message from a PurpleConversationMessage
+ *
* Returns: The name of the sender of the message
*/
const char *purple_conversation_message_get_message(const PurpleConversationMessage *msg);
/**
- * Get the message-flags of a PurpleConversationMessage
- *
+ * purple_conversation_message_get_flags:
* @msg: A PurpleConversationMessage
*
+ * Get the message-flags of a PurpleConversationMessage
+ *
* Returns: The message flags
*/
PurpleMessageFlags purple_conversation_message_get_flags(const PurpleConversationMessage *msg);
/**
- * Get the timestamp of a PurpleConversationMessage
- *
+ * purple_conversation_message_get_timestamp:
* @msg: A PurpleConversationMessage
*
+ * Get the timestamp of a PurpleConversationMessage
+ *
* Returns: The timestamp of the message
*/
time_t purple_conversation_message_get_timestamp(const PurpleConversationMessage *msg);
/**
- * Get the alias from a PurpleConversationMessage
- *
+ * purple_conversation_message_get_alias:
* @msg: A PurpleConversationMessage
*
+ * Get the alias from a PurpleConversationMessage
+ *
* Returns: The alias of the sender of the message
*/
const char *purple_conversation_message_get_alias(const PurpleConversationMessage *msg);
/**
- * Get the conversation associated with the PurpleConversationMessage
- *
+ * purple_conversation_message_get_conversation:
* @msg: A PurpleConversationMessage
*
+ * Get the conversation associated with the PurpleConversationMessage
+ *
* Returns: The conversation
*/
PurpleConversation *purple_conversation_message_get_conversation(const PurpleConversationMessage *msg);
diff --git a/libpurple/conversations.h b/libpurple/conversations.h
index 41d0e8141f..1e41fa6ee0 100644
--- a/libpurple/conversations.h
+++ b/libpurple/conversations.h
@@ -38,20 +38,24 @@ G_BEGIN_DECLS
/*@{*/
/**
- * Adds a conversation to the list of conversations.
- *
+ * purple_conversations_add:
* @conv: The conversation.
+ *
+ * Adds a conversation to the list of conversations.
*/
void purple_conversations_add(PurpleConversation *conv);
/**
- * Removes a conversation from the list of conversations.
- *
+ * purple_conversations_remove:
* @conv: The conversation.
+ *
+ * Removes a conversation from the list of conversations.
*/
void purple_conversations_remove(PurpleConversation *conv);
/**
+ * purple_conversations_get_all:
+ *
* Returns a list of all conversations.
*
* This list includes both IMs and chats.
@@ -61,6 +65,8 @@ void purple_conversations_remove(PurpleConversation *conv);
GList *purple_conversations_get_all(void);
/**
+ * purple_conversations_get_ims:
+ *
* Returns a list of all IMs.
*
* Returns: (transfer none): A GList of all IMs.
@@ -68,6 +74,8 @@ GList *purple_conversations_get_all(void);
GList *purple_conversations_get_ims(void);
/**
+ * purple_conversations_get_chats:
+ *
* Returns a list of all chats.
*
* Returns: (transfer none): A GList of all chats.
@@ -75,56 +83,63 @@ GList *purple_conversations_get_ims(void);
GList *purple_conversations_get_chats(void);
/**
- * Finds a conversation of any type with the specified name and Purple account.
- *
+ * purple_conversations_find_with_account:
* @name: The name of the conversation.
* @account: The account associated with the conversation.
*
+ * Finds a conversation of any type with the specified name and Purple account.
+ *
* Returns: The conversation if found, or %NULL otherwise.
*/
PurpleConversation *purple_conversations_find_with_account(const char *name,
const PurpleAccount *account);
/**
- * Finds an IM with the specified name and Purple account.
- *
+ * purple_conversations_find_im_with_account:
* @name: The name of the conversation.
* @account: The account associated with the conversation.
*
+ * Finds an IM with the specified name and Purple account.
+ *
* Returns: The conversation if found, or %NULL otherwise.
*/
PurpleIMConversation *purple_conversations_find_im_with_account(const char *name,
const PurpleAccount *account);
/**
- * Finds a chat with the specified name and Purple account.
- *
+ * purple_conversations_find_chat_with_account:
* @name: The name of the conversation.
* @account: The account associated with the conversation.
*
+ * Finds a chat with the specified name and Purple account.
+ *
* Returns: The conversation if found, or %NULL otherwise.
*/
PurpleChatConversation *purple_conversations_find_chat_with_account(const char *name,
const PurpleAccount *account);
/**
- * Finds a chat with the specified chat ID.
- *
+ * purple_conversations_find_chat:
* @gc: The purple_connection.
* @id: The chat ID.
*
+ * Finds a chat with the specified chat ID.
+ *
* Returns: The chat conversation.
*/
PurpleChatConversation *purple_conversations_find_chat(const PurpleConnection *gc, int id);
/**
- * Sets the default conversation UI operations structure.
- *
+ * purple_conversations_set_ui_ops:
* @ops: The UI conversation operations structure.
+ *
+ * Sets the default conversation UI operations structure.
*/
void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops);
/**
+ * purple_conversations_get_ui_ops:
+ *
* Gets the default conversation UI operations structure.
*
* Returns: The UI conversation operations structure.
@@ -132,6 +147,8 @@ void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops);
PurpleConversationUiOps *purple_conversations_get_ui_ops(void);
/**
+ * purple_conversations_get_handle:
+ *
* Returns the conversation subsystem handle.
*
* Returns: The conversation subsystem handle.
@@ -139,11 +156,15 @@ PurpleConversationUiOps *purple_conversations_get_ui_ops(void);
void *purple_conversations_get_handle(void);
/**
+ * purple_conversations_init:
+ *
* Initializes the conversation subsystem.
*/
void purple_conversations_init(void);
/**
+ * purple_conversations_uninit:
+ *
* Uninitializes the conversation subsystem.
*/
void purple_conversations_uninit(void);
diff --git a/libpurple/conversationtypes.h b/libpurple/conversationtypes.h
index feb69e46c1..3261501c67 100644
--- a/libpurple/conversationtypes.h
+++ b/libpurple/conversationtypes.h
@@ -37,9 +37,7 @@
#define PURPLE_IS_IM_CONVERSATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_IM_CONVERSATION))
#define PURPLE_IM_CONVERSATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_IM_CONVERSATION, PurpleIMConversationClass))
-/** @copydoc _PurpleIMConversation */
typedef struct _PurpleIMConversation PurpleIMConversation;
-/** @copydoc _PurpleIMConversationClass */
typedef struct _PurpleIMConversationClass PurpleIMConversationClass;
#define PURPLE_TYPE_CHAT_CONVERSATION (purple_chat_conversation_get_type())
@@ -49,9 +47,7 @@ typedef struct _PurpleIMConversationClass PurpleIMConversationClass;
#define PURPLE_IS_CHAT_CONVERSATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_CHAT_CONVERSATION))
#define PURPLE_CHAT_CONVERSATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_CHAT_CONVERSATION, PurpleChatConversationClass))
-/** @copydoc _PurpleChatConversation */
typedef struct _PurpleChatConversation PurpleChatConversation;
-/** @copydoc _PurpleChatConversationClass */
typedef struct _PurpleChatConversationClass PurpleChatConversationClass;
#define PURPLE_TYPE_CHAT_USER (purple_chat_user_get_type())
@@ -61,34 +57,46 @@ typedef struct _PurpleChatConversationClass PurpleChatConversationClass;
#define PURPLE_IS_CHAT_USER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_CHAT_USER))
#define PURPLE_CHAT_USER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_CHAT_USER, PurpleChatUserClass))
-/** @copydoc _PurpleChatUser */
typedef struct _PurpleChatUser PurpleChatUser;
-/** @copydoc _PurpleChatUserClass */
typedef struct _PurpleChatUserClass PurpleChatUserClass;
/**
+ * PurpleIMTypingState:
+ * @PURPLE_IM_NOT_TYPING: Not typing.
+ * @PURPLE_IM_TYPING: Currently typing.
+ * @PURPLE_IM_TYPED: Stopped typing momentarily.
+ *
* The typing state of a user.
*/
typedef enum
{
- PURPLE_IM_NOT_TYPING = 0, /**< Not typing. */
- PURPLE_IM_TYPING, /**< Currently typing. */
- PURPLE_IM_TYPED /**< Stopped typing momentarily. */
+ PURPLE_IM_NOT_TYPING = 0,
+ PURPLE_IM_TYPING,
+ PURPLE_IM_TYPED
} PurpleIMTypingState;
/**
+ * PurpleChatUserFlags:
+ * @PURPLE_CHAT_USER_NONE: No flags
+ * @PURPLE_CHAT_USER_VOICE: Voiced user or "Participant"
+ * @PURPLE_CHAT_USER_HALFOP: Half-op
+ * @PURPLE_CHAT_USER_OP: Channel Op or Moderator
+ * @PURPLE_CHAT_USER_FOUNDER: Channel Founder
+ * @PURPLE_CHAT_USER_TYPING: Currently typing
+ * @PURPLE_CHAT_USER_AWAY: Currently away.
+ *
* Flags applicable to users in Chats.
*/
typedef enum /*< flags >*/
{
- PURPLE_CHAT_USER_NONE = 0x0000, /**< No flags */
- PURPLE_CHAT_USER_VOICE = 0x0001, /**< Voiced user or "Participant" */
- PURPLE_CHAT_USER_HALFOP = 0x0002, /**< Half-op */
- PURPLE_CHAT_USER_OP = 0x0004, /**< Channel Op or Moderator */
- PURPLE_CHAT_USER_FOUNDER = 0x0008, /**< Channel Founder */
- PURPLE_CHAT_USER_TYPING = 0x0010, /**< Currently typing */
- PURPLE_CHAT_USER_AWAY = 0x0020 /**< Currently away. */
+ PURPLE_CHAT_USER_NONE = 0x0000,
+ PURPLE_CHAT_USER_VOICE = 0x0001,
+ PURPLE_CHAT_USER_HALFOP = 0x0002,
+ PURPLE_CHAT_USER_OP = 0x0004,
+ PURPLE_CHAT_USER_FOUNDER = 0x0008,
+ PURPLE_CHAT_USER_TYPING = 0x0010,
+ PURPLE_CHAT_USER_AWAY = 0x0020
} PurpleChatUserFlags;
@@ -97,13 +105,21 @@ typedef enum /*< flags >*/
/**************************************************************************/
/** PurpleIMConversation */
/**************************************************************************/
-/** Structure representing an IM conversation instance. */
+/**
+ * PurpleIMConversation:
+ *
+ * Structure representing an IM conversation instance.
+ */
struct _PurpleIMConversation
{
PurpleConversation parent_object;
};
-/** Base class for all #PurpleIMConversation's */
+/**
+ * PurpleIMConversationClass:
+ *
+ * Base class for all #PurpleIMConversation's
+ */
struct _PurpleIMConversationClass {
PurpleConversationClass parent_class;
@@ -117,13 +133,21 @@ struct _PurpleIMConversationClass {
/**************************************************************************/
/** PurpleChatConversation */
/**************************************************************************/
-/** Structure representing a chat conversation instance. */
+/**
+ * PurpleChatConversation:
+ *
+ * Structure representing a chat conversation instance.
+ */
struct _PurpleChatConversation
{
PurpleConversation parent_object;
};
-/** Base class for all #PurpleChatConversation's */
+/**
+ * PurpleChatConversationClass:
+ *
+ * Base class for all #PurpleChatConversation's
+ */
struct _PurpleChatConversationClass {
PurpleConversationClass parent_class;
@@ -137,18 +161,25 @@ struct _PurpleChatConversationClass {
/**************************************************************************/
/** PurpleChatUser */
/**************************************************************************/
-/** Structure representing a chat user instance. */
+/**
+ * PurpleChatUser:
+ * @ui_data: The UI data associated with this chat user. This is a convenience
+ * field provided to the UIs -- it is not used by the libpurple core.
+ *
+ * Structure representing a chat user instance.
+ */
struct _PurpleChatUser
{
GObject gparent;
- /** The UI data associated with this chat user. This is a convenience
- * field provided to the UIs -- it is not used by the libpurple core.
- */
gpointer ui_data;
};
-/** Base class for all #PurpleChatUser's */
+/**
+ * PurpleChatUserClass:
+ *
+ * Base class for all #PurpleChatUser's
+ */
struct _PurpleChatUserClass {
GObjectClass parent_class;
@@ -167,136 +198,152 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_im_conversation_get_type:
+ *
* Returns the GType for the IMConversation object.
*/
GType purple_im_conversation_get_type(void);
/**
- * Creates a new IM conversation.
- *
+ * purple_im_conversation_new:
* @account: The account opening the conversation window on the purple
* user's end.
* @name: Name of the buddy.
*
+ * Creates a new IM conversation.
+ *
* Returns: The new conversation.
*/
PurpleIMConversation *purple_im_conversation_new(PurpleAccount *account,
const char *name);
/**
+ * purple_im_conversation_set_icon:
+ * @im: The IM.
+ * @icon: The buddy icon.
+ *
* Sets the IM's buddy icon.
*
* This should only be called from within Purple. You probably want to
* call purple_buddy_icon_set_data().
*
- * @im: The IM.
- * @icon: The buddy icon.
- *
* @see purple_buddy_icon_set_data()
*/
void purple_im_conversation_set_icon(PurpleIMConversation *im, PurpleBuddyIcon *icon);
/**
- * Returns the IM's buddy icon.
- *
+ * purple_im_conversation_get_icon:
* @im: The IM.
*
+ * Returns the IM's buddy icon.
+ *
* Returns: The buddy icon.
*/
PurpleBuddyIcon *purple_im_conversation_get_icon(const PurpleIMConversation *im);
/**
- * Sets the IM's typing state.
- *
+ * purple_im_conversation_set_typing_state:
* @im: The IM.
* @state: The typing state.
+ *
+ * Sets the IM's typing state.
*/
void purple_im_conversation_set_typing_state(PurpleIMConversation *im, PurpleIMTypingState state);
/**
- * Returns the IM's typing state.
- *
+ * purple_im_conversation_get_typing_state:
* @im: The IM.
*
+ * Returns the IM's typing state.
+ *
* Returns: The IM's typing state.
*/
PurpleIMTypingState purple_im_conversation_get_typing_state(const PurpleIMConversation *im);
/**
- * Starts the IM's typing timeout.
- *
+ * purple_im_conversation_start_typing_timeout:
* @im: The IM.
* @timeout: How long in seconds to wait before setting the typing state
* to PURPLE_IM_NOT_TYPING.
+ *
+ * Starts the IM's typing timeout.
*/
void purple_im_conversation_start_typing_timeout(PurpleIMConversation *im, int timeout);
/**
- * Stops the IM's typing timeout.
- *
+ * purple_im_conversation_stop_typing_timeout:
* @im: The IM.
+ *
+ * Stops the IM's typing timeout.
*/
void purple_im_conversation_stop_typing_timeout(PurpleIMConversation *im);
/**
- * Returns the IM's typing timeout.
- *
+ * purple_im_conversation_get_typing_timeout:
* @im: The IM.
*
+ * Returns the IM's typing timeout.
+ *
* Returns: The timeout.
*/
guint purple_im_conversation_get_typing_timeout(const PurpleIMConversation *im);
/**
- * Sets the quiet-time when no PURPLE_IM_TYPING messages will be sent.
- * Few protocols need this (maybe only MSN). If the user is still
- * typing after this quiet-period, then another PURPLE_IM_TYPING message
- * will be sent.
- *
+ * purple_im_conversation_set_type_again:
* @im: The IM.
* @val: The number of seconds to wait before allowing another
* PURPLE_IM_TYPING message to be sent to the user. Or 0 to
* not send another PURPLE_IM_TYPING message.
+ *
+ * Sets the quiet-time when no PURPLE_IM_TYPING messages will be sent.
+ * Few protocols need this (maybe only MSN). If the user is still
+ * typing after this quiet-period, then another PURPLE_IM_TYPING message
+ * will be sent.
*/
void purple_im_conversation_set_type_again(PurpleIMConversation *im, unsigned int val);
/**
- * Returns the time after which another PURPLE_IM_TYPING message should be sent.
- *
+ * purple_im_conversation_get_type_again:
* @im: The IM.
*
+ * Returns the time after which another PURPLE_IM_TYPING message should be sent.
+ *
* Returns: The time in seconds since the epoch. Or 0 if no additional
* PURPLE_IM_TYPING message should be sent.
*/
time_t purple_im_conversation_get_type_again(const PurpleIMConversation *im);
/**
- * Starts the IM's type again timeout.
- *
+ * purple_im_conversation_start_send_typed_timeout:
* @im: The IM.
+ *
+ * Starts the IM's type again timeout.
*/
void purple_im_conversation_start_send_typed_timeout(PurpleIMConversation *im);
/**
- * Stops the IM's type again timeout.
- *
+ * purple_im_conversation_stop_send_typed_timeout:
* @im: The IM.
+ *
+ * Stops the IM's type again timeout.
*/
void purple_im_conversation_stop_send_typed_timeout(PurpleIMConversation *im);
/**
- * Returns the IM's type again timeout interval.
- *
+ * purple_im_conversation_get_send_typed_timeout:
* @im: The IM.
*
+ * Returns the IM's type again timeout interval.
+ *
* Returns: The type again timeout interval.
*/
guint purple_im_conversation_get_send_typed_timeout(const PurpleIMConversation *im);
/**
- * Updates the visual typing notification for an IM conversation.
- *
+ * purple_im_conversation_update_typing:
* @im: The IM.
+ *
+ * Updates the visual typing notification for an IM conversation.
*/
void purple_im_conversation_update_typing(PurpleIMConversation *im);
@@ -308,68 +355,80 @@ void purple_im_conversation_update_typing(PurpleIMConversation *im);
/*@{*/
/**
+ * purple_chat_conversation_get_type:
+ *
* Returns the GType for the ChatConversation object.
*/
GType purple_chat_conversation_get_type(void);
/**
- * Creates a new chat conversation.
- *
+ * purple_chat_conversation_new:
* @account: The account opening the conversation window on the purple
* user's end.
* @name: The name of the conversation.
*
+ * Creates a new chat conversation.
+ *
* Returns: The new conversation.
*/
PurpleChatConversation *purple_chat_conversation_new(PurpleAccount *account,
const char *name);
/**
+ * purple_chat_conversation_get_users:
+ * @chat: The chat.
+ *
* Returns a list of users in the chat room. The members of the list
* are PurpleChatUser objects.
*
- * @chat: The chat.
- *
* Returns: (transfer none): The list of users.
*/
GList *purple_chat_conversation_get_users(const PurpleChatConversation *chat);
/**
- * Ignores a user in a chat room.
- *
+ * purple_chat_conversation_ignore:
* @chat: The chat.
* @name: The name of the user.
+ *
+ * Ignores a user in a chat room.
*/
void purple_chat_conversation_ignore(PurpleChatConversation *chat, const char *name);
/**
- * Unignores a user in a chat room.
- *
+ * purple_chat_conversation_unignore:
* @chat: The chat.
* @name: The name of the user.
+ *
+ * Unignores a user in a chat room.
*/
void purple_chat_conversation_unignore(PurpleChatConversation *chat, const char *name);
/**
- * Sets the list of ignored users in the chat room.
- *
+ * purple_chat_conversation_set_ignored:
* @chat: The chat.
* @ignored: The list of ignored users.
*
+ * Sets the list of ignored users in the chat room.
+ *
* Returns: The list passed.
*/
GList *purple_chat_conversation_set_ignored(PurpleChatConversation *chat, GList *ignored);
/**
- * Returns the list of ignored users in the chat room.
- *
+ * purple_chat_conversation_get_ignored:
* @chat: The chat.
*
+ * Returns the list of ignored users in the chat room.
+ *
* Returns: (transfer none): The list of ignored users.
*/
GList *purple_chat_conversation_get_ignored(const PurpleChatConversation *chat);
/**
+ * purple_chat_conversation_get_ignored_user:
+ * @chat: The chat.
+ * @user: The user to check in the ignore list.
+ *
* Returns the actual name of the specified ignored user, if it exists in
* the ignore list.
*
@@ -377,9 +436,6 @@ GList *purple_chat_conversation_get_ignored(const PurpleChatConversation *chat);
* returned. The username passed to the function does not have to have this
* formatting.
*
- * @chat: The chat.
- * @user: The user to check in the ignore list.
- *
* Returns: The ignored user if found, complete with prefixes, or %NULL
* if not found.
*/
@@ -387,198 +443,218 @@ const char *purple_chat_conversation_get_ignored_user(const PurpleChatConversati
const char *user);
/**
- * Returns %TRUE if the specified user is ignored.
- *
+ * purple_chat_conversation_is_ignored_user:
* @chat: The chat.
* @user: The user.
*
+ * Returns %TRUE if the specified user is ignored.
+ *
* Returns: %TRUE if the user is in the ignore list; %FALSE otherwise.
*/
gboolean purple_chat_conversation_is_ignored_user(const PurpleChatConversation *chat,
const char *user);
/**
- * Sets the chat room's topic.
- *
+ * purple_chat_conversation_set_topic:
* @chat: The chat.
* @who: The user that set the topic.
* @topic: The topic.
+ *
+ * Sets the chat room's topic.
*/
void purple_chat_conversation_set_topic(PurpleChatConversation *chat, const char *who,
const char *topic);
/**
- * Returns the chat room's topic.
- *
+ * purple_chat_conversation_get_topic:
* @chat: The chat.
*
+ * Returns the chat room's topic.
+ *
* Returns: The chat's topic.
*/
const char *purple_chat_conversation_get_topic(const PurpleChatConversation *chat);
/**
- * Returns who set the chat room's topic.
- *
+ * purple_chat_conversation_get_topic_who:
* @chat: The chat.
*
+ * Returns who set the chat room's topic.
+ *
* Returns: Who set the topic.
*/
const char *purple_chat_conversation_get_topic_who(const PurpleChatConversation *chat);
/**
- * Sets the chat room's ID.
- *
+ * purple_chat_conversation_set_id:
* @chat: The chat.
* @id: The ID.
+ *
+ * Sets the chat room's ID.
*/
void purple_chat_conversation_set_id(PurpleChatConversation *chat, int id);
/**
- * Returns the chat room's ID.
- *
+ * purple_chat_conversation_get_id:
* @chat: The chat.
*
+ * Returns the chat room's ID.
+ *
* Returns: The ID.
*/
int purple_chat_conversation_get_id(const PurpleChatConversation *chat);
/**
- * Adds a user to a chat.
- *
+ * purple_chat_conversation_add_user:
* @chat: The chat.
* @user: The user to add.
* @extra_msg: An extra message to display with the join message.
* @flags: The users flags
* @new_arrival: Decides whether or not to show a join notice.
+ *
+ * Adds a user to a chat.
*/
void purple_chat_conversation_add_user(PurpleChatConversation *chat, const char *user,
const char *extra_msg, PurpleChatUserFlags flags,
gboolean new_arrival);
/**
- * Adds a list of users to a chat.
- *
- * The data is copied from @a users, @a extra_msgs, and @a flags, so it is up to
- * the caller to free this list after calling this function.
- *
+ * purple_chat_conversation_add_users:
* @chat: The chat.
* @users: The list of users to add.
* @extra_msgs: An extra message to display with the join message for each
- * user. This list may be shorter than @a users, in which
+ * user. This list may be shorter than @users, in which
* case, the users after the end of extra_msgs will not have
* an extra message. By extension, this means that extra_msgs
* can simply be %NULL and none of the users will have an
* extra message.
* @flags: The list of flags for each user.
* @new_arrivals: Decides whether or not to show join notices.
+ *
+ * Adds a list of users to a chat.
+ *
+ * The data is copied from @users, @extra_msgs, and @flags, so it is up to
+ * the caller to free this list after calling this function.
*/
void purple_chat_conversation_add_users(PurpleChatConversation *chat,
GList *users, GList *extra_msgs, GList *flags, gboolean new_arrivals);
/**
- * Renames a user in a chat.
- *
+ * purple_chat_conversation_rename_user:
* @chat: The chat.
* @old_user: The old username.
* @new_user: The new username.
+ *
+ * Renames a user in a chat.
*/
void purple_chat_conversation_rename_user(PurpleChatConversation *chat,
const char *old_user, const char *new_user);
/**
- * Removes a user from a chat, optionally with a reason.
- *
- * It is up to the developer to free this list after calling this function.
- *
+ * purple_chat_conversation_remove_user:
* @chat: The chat.
* @user: The user that is being removed.
* @reason: The optional reason given for the removal. Can be %NULL.
+ *
+ * Removes a user from a chat, optionally with a reason.
+ *
+ * It is up to the developer to free this list after calling this function.
*/
void purple_chat_conversation_remove_user(PurpleChatConversation *chat,
const char *user, const char *reason);
/**
- * Removes a list of users from a chat, optionally with a single reason.
- *
+ * purple_chat_conversation_remove_users:
* @chat: The chat.
* @users: The users that are being removed.
* @reason: The optional reason given for the removal. Can be %NULL.
+ *
+ * Removes a list of users from a chat, optionally with a single reason.
*/
void purple_chat_conversation_remove_users(PurpleChatConversation *chat,
GList *users, const char *reason);
/**
- * Checks if a user is in a chat
- *
+ * purple_chat_conversation_has_user:
* @chat: The chat.
* @user: The user to look for.
*
+ * Checks if a user is in a chat
+ *
* Returns: TRUE if the user is in the chat, FALSE if not
*/
gboolean purple_chat_conversation_has_user(PurpleChatConversation *chat,
const char *user);
/**
- * Clears all users from a chat.
- *
+ * purple_chat_conversation_clear_users:
* @chat: The chat.
+ *
+ * Clears all users from a chat.
*/
void purple_chat_conversation_clear_users(PurpleChatConversation *chat);
/**
- * Sets your nickname (used for hilighting) for a chat.
- *
+ * purple_chat_conversation_set_nick:
* @chat: The chat.
* @nick: The nick.
+ *
+ * Sets your nickname (used for hilighting) for a chat.
*/
void purple_chat_conversation_set_nick(PurpleChatConversation *chat,
const char *nick);
/**
+ * purple_chat_conversation_get_nick:
+ * @chat: The chat.
+ *
* Gets your nickname (used for hilighting) for a chat.
*
- * @chat: The chat.
* Returns: The nick.
*/
const char *purple_chat_conversation_get_nick(PurpleChatConversation *chat);
/**
+ * purple_chat_conversation_leave:
+ * @chat: The chat.
+ *
* Lets the core know we left a chat, without destroying it.
* Called from serv_got_chat_left().
- *
- * @chat: The chat.
*/
void purple_chat_conversation_leave(PurpleChatConversation *chat);
/**
- * Find a chat user in a chat
- *
+ * purple_chat_conversation_find_user:
* @chat: The chat.
* @name: The name of the chat user to find.
+ *
+ * Find a chat user in a chat
*/
PurpleChatUser *purple_chat_conversation_find_user(PurpleChatConversation *chat,
const char *name);
/**
- * Invite a user to a chat.
- * The user will be prompted to enter the user's name or a message if one is
- * not given.
- *
+ * purple_chat_conversation_invite_user:
* @chat: The chat.
* @user: The user to invite to the chat.
* @message: The message to send with the invitation.
* @confirm: Prompt before sending the invitation. The user is always
- * prompted if either \a user or \a message is %NULL.
+ * prompted if either \a user or \a message is %NULL.
+ *
+ * Invite a user to a chat.
+ * The user will be prompted to enter the user's name or a message if one is
+ * not given.
*/
void purple_chat_conversation_invite_user(PurpleChatConversation *chat,
const char *user, const char *message, gboolean confirm);
/**
+ * purple_chat_conversation_has_left:
+ * @chat: The chat.
+ *
* Returns true if we're no longer in this chat,
* and just left the window open.
*
- * @chat: The chat.
- *
* Returns: %TRUE if we left the chat already, %FALSE if
* we're still there.
*/
@@ -592,54 +668,61 @@ gboolean purple_chat_conversation_has_left(PurpleChatConversation *chat);
/*@{*/
/**
+ * purple_chat_user_get_type:
+ *
* Returns the GType for the ChatConversationBuddy object.
*/
GType purple_chat_user_get_type(void);
/**
- * Set the chat conversation associated with this chat user.
- *
+ * purple_chat_user_set_chat:
* @cb: The chat user
* @chat: The chat conversation that the buddy belongs to.
+ *
+ * Set the chat conversation associated with this chat user.
*/
void purple_chat_user_set_chat(PurpleChatUser *cb,
PurpleChatConversation *chat);
/**
- * Get the chat conversation associated with this chat user.
- *
+ * purple_chat_user_get_chat:
* @cb: The chat user.
*
+ * Get the chat conversation associated with this chat user.
+ *
* Returns: The chat conversation that the buddy belongs to.
*/
PurpleChatConversation *purple_chat_user_get_chat(const PurpleChatUser *cb);
/**
- * Creates a new chat user
- *
+ * purple_chat_user_new:
* @chat: The chat that the buddy belongs to.
* @name: The name.
* @alias: The alias.
* @flags: The flags.
*
+ * Creates a new chat user
+ *
* Returns: The new chat user
*/
PurpleChatUser *purple_chat_user_new(PurpleChatConversation *chat,
const char *name, const char *alias, PurpleChatUserFlags flags);
/**
- * Set the UI data associated with this chat user.
- *
+ * purple_chat_user_set_ui_data:
* @cb: The chat user
* @ui_data: A pointer to associate with this chat user.
+ *
+ * Set the UI data associated with this chat user.
*/
void purple_chat_user_set_ui_data(PurpleChatUser *cb, gpointer ui_data);
/**
- * Get the UI data associated with this chat user.
- *
+ * purple_chat_user_get_ui_data:
* @cb: The chat user.
*
+ * Get the UI data associated with this chat user.
+ *
* Returns: The UI data associated with this chat user. This is a
* convenience field provided to the UIs--it is not
* used by the libpurple core.
@@ -647,45 +730,50 @@ void purple_chat_user_set_ui_data(PurpleChatUser *cb, gpointer ui_data);
gpointer purple_chat_user_get_ui_data(const PurpleChatUser *cb);
/**
- * Get the alias of a chat user
- *
+ * purple_chat_user_get_alias:
* @cb: The chat user.
*
+ * Get the alias of a chat user
+ *
* Returns: The alias of the chat user.
*/
const char *purple_chat_user_get_alias(const PurpleChatUser *cb);
/**
- * Get the name of a chat user
- *
+ * purple_chat_user_get_name:
* @cb: The chat user.
*
+ * Get the name of a chat user
+ *
* Returns: The name of the chat user.
*/
const char *purple_chat_user_get_name(const PurpleChatUser *cb);
/**
- * Set the flags of a chat user.
- *
+ * purple_chat_user_set_flags:
* @cb: The chat user.
* @flags: The new flags.
+ *
+ * Set the flags of a chat user.
*/
void purple_chat_user_set_flags(PurpleChatUser *cb, PurpleChatUserFlags flags);
/**
- * Get the flags of a chat user.
- *
+ * purple_chat_user_get_flags:
* @cb: The chat user.
*
+ * Get the flags of a chat user.
+ *
* Returns: The flags of the chat user.
*/
PurpleChatUserFlags purple_chat_user_get_flags(const PurpleChatUser *cb);
/**
- * Indicates if this chat user is on the buddy list.
- *
+ * purple_chat_user_is_buddy:
* @cb: The chat user.
*
+ * Indicates if this chat user is on the buddy list.
+ *
* Returns: TRUE if the chat user is on the buddy list.
*/
gboolean purple_chat_user_is_buddy(const PurpleChatUser *cb);
diff --git a/libpurple/core.h b/libpurple/core.h
index 59756b4397..3c8aa6fea6 100644
--- a/libpurple/core.h
+++ b/libpurple/core.h
@@ -41,9 +41,12 @@
typedef struct PurpleCore PurpleCore;
-/** Callbacks that fire at different points of the initialization and teardown
- * of libpurple, along with a hook to return descriptive information about the
- * UI.
+/**
+ * PurpleCoreUiOps:
+ *
+ * Callbacks that fire at different points of the initialization and teardown
+ * of libpurple, along with a hook to return descriptive information about the
+ * UI.
*/
typedef struct
{
@@ -83,24 +86,29 @@ typedef struct
G_BEGIN_DECLS
/**
+ * purple_core_init:
+ * @ui: The ID of the UI using the core. This should be a
+ * unique ID, registered with the purple team.
+ *
* Initializes the core of purple.
*
* This will setup preferences for all the core subsystems.
*
- * @ui: The ID of the UI using the core. This should be a
- * unique ID, registered with the purple team.
- *
* Returns: %TRUE if successful, or %FALSE otherwise.
*/
gboolean purple_core_init(const char *ui);
/**
+ * purple_core_quit:
+ *
* Quits the core of purple, which, depending on the UI, may quit the
* application using the purple core.
*/
void purple_core_quit(void);
/**
+ * purple_core_quit_cb:
+ *
* <p>
* Calls purple_core_quit(). This can be used as the function
* passed to purple_timeout_add() when you want to shutdown Purple
@@ -122,6 +130,8 @@ void purple_core_quit(void);
gboolean purple_core_quit_cb(gpointer unused);
/**
+ * purple_core_get_version:
+ *
* Returns the version of the core library.
*
* Returns: The version of the core library.
@@ -129,6 +139,8 @@ gboolean purple_core_quit_cb(gpointer unused);
const char *purple_core_get_version(void);
/**
+ * purple_core_get_ui:
+ *
* Returns the ID of the UI that is using the core, as passed to
* purple_core_init().
*
@@ -137,6 +149,8 @@ const char *purple_core_get_version(void);
const char *purple_core_get_ui(void);
/**
+ * purple_get_core:
+ *
* Returns a handle to the purple core.
*
* This is used to connect to @ref core-signals "core signals".
@@ -144,13 +158,16 @@ const char *purple_core_get_ui(void);
PurpleCore *purple_get_core(void);
/**
- * Sets the UI ops for the core.
- *
+ * purple_core_set_ui_ops:
* @ops: A UI ops structure for the core.
+ *
+ * Sets the UI ops for the core.
*/
void purple_core_set_ui_ops(PurpleCoreUiOps *ops);
/**
+ * purple_core_get_ui_ops:
+ *
* Returns the UI ops for the core.
*
* Returns: The core's UI ops structure.
@@ -158,6 +175,8 @@ void purple_core_set_ui_ops(PurpleCoreUiOps *ops);
PurpleCoreUiOps *purple_core_get_ui_ops(void);
/**
+ * purple_core_ensure_single_instance:
+ *
* Ensures that only one instance is running. If libpurple is built with D-Bus
* support, this checks if another process owns the libpurple bus name and if
* so whether that process is using the same configuration directory as this
@@ -169,6 +188,8 @@ PurpleCoreUiOps *purple_core_get_ui_ops(void);
gboolean purple_core_ensure_single_instance(void);
/**
+ * purple_core_get_ui_info:
+ *
* Returns a hash table containing various information about the UI. The
* following well-known entries may be in the table (along with any others the
* UI might choose to include):
diff --git a/libpurple/dbus-server.h b/libpurple/dbus-server.h
index 335e181250..59682c9a80 100644
--- a/libpurple/dbus-server.h
+++ b/libpurple/dbus-server.h
@@ -33,16 +33,18 @@
G_BEGIN_DECLS
/**
- Types of pointers are identified by the ADDRESS of a PurpleDbusType
- object. This way, plugins can easily access types defined in purple
- proper as well as introduce their own types that will not conflict
- with those introduced by other plugins.
-
- The structure PurpleDbusType has only one element (PurpleDBusType::parent), a
- contains a pointer to the parent type, or %NULL if the type has no
- parent. Parent means the same as the base class in object oriented
- programming.
-*/
+ * PurpleDBusType:
+ *
+ * Types of pointers are identified by the ADDRESS of a PurpleDbusType
+ * object. This way, plugins can easily access types defined in purple
+ * proper as well as introduce their own types that will not conflict
+ * with those introduced by other plugins.
+ *
+ * The structure PurpleDbusType has only one element (PurpleDBusType::parent), a
+ * contains a pointer to the parent type, or %NULL if the type has no
+ * parent. Parent means the same as the base class in object oriented
+ * programming.
+ */
typedef struct _PurpleDBusType PurpleDBusType;
@@ -89,64 +91,69 @@ struct _PurpleDBusType {
}
/**
- Initializes purple dbus pointer registration engine.
-
- Remote dbus applications need a way of addressing objects exposed
- by purple to the outside world. In purple itself, these objects (such
- as PurpleBuddy and company) are identified by pointers. The purple
- dbus pointer registration engine converts pointers to handles and
- back.
-
- In order for an object to participate in the scheme, it must
- register itself and its type with the engine. This registration
- allocates an integer id which can be resolved to the pointer and
- back.
-
- Handles are not persistent. They are reissued every time purple is
- started. This is not good; external applications that use purple
- should work even whether purple was restarted in the middle of the
- interaction.
-
- Pointer registration is only a temporary solution. When PurpleBuddy
- and similar structures have been converted into gobjects, this
- registration will be done automatically by objects themselves.
-
- By the way, this kind of object-handle translation should be so
- common that there must be a library (maybe even glib) that
- implements it. I feel a bit like reinventing the wheel here.
-*/
+ * purple_dbus_init_ids:
+ *
+ * Initializes purple dbus pointer registration engine.
+ *
+ * Remote dbus applications need a way of addressing objects exposed
+ * by purple to the outside world. In purple itself, these objects (such
+ * as PurpleBuddy and company) are identified by pointers. The purple
+ * dbus pointer registration engine converts pointers to handles and
+ * back.
+ *
+ * In order for an object to participate in the scheme, it must
+ * register itself and its type with the engine. This registration
+ * allocates an integer id which can be resolved to the pointer and
+ * back.
+ *
+ * Handles are not persistent. They are reissued every time purple is
+ * started. This is not good; external applications that use purple
+ * should work even whether purple was restarted in the middle of the
+ * interaction.
+ *
+ * Pointer registration is only a temporary solution. When PurpleBuddy
+ * and similar structures have been converted into gobjects, this
+ * registration will be done automatically by objects themselves.
+ *
+ * By the way, this kind of object-handle translation should be so
+ * common that there must be a library (maybe even glib) that
+ * implements it. I feel a bit like reinventing the wheel here.
+ */
void purple_dbus_init_ids(void);
/**
- Registers a typed pointer.
-
- @node: The pointer to register.
- @type: Type of that pointer.
+ * purple_dbus_register_pointer:
+ * @node: The pointer to register.
+ * @type: Type of that pointer.
+ *
+ * Registers a typed pointer.
*/
void purple_dbus_register_pointer(gpointer node, PurpleDBusType *type);
/**
- Unregisters a pointer previously registered with
- purple_dbus_register_pointer.
-
- @node: The pointer to register.
+ * purple_dbus_unregister_pointer:
+ * @node: The pointer to register.
+ *
+ * Unregisters a pointer previously registered with
+ * purple_dbus_register_pointer.
*/
void purple_dbus_unregister_pointer(gpointer node);
-
-
/**
- Emits a dbus signal.
-
- @name: The name of the signal ("bla-bla-blaa")
- @num_values: The number of parameters.
- @types: Array of GTypes representing the types of the parameters.
- @vargs: A va_list containing the actual parameters.
- */
+ * purple_dbus_signal_emit_purple:
+ * @name: The name of the signal ("bla-bla-blaa")
+ * @num_values: The number of parameters.
+ * @types: Array of GTypes representing the types of the parameters.
+ * @vargs: A va_list containing the actual parameters.
+ *
+ * Emits a dbus signal.
+ */
void purple_dbus_signal_emit_purple(const char *name, int num_values,
GType *types, va_list vargs);
/**
+ * purple_dbus_get_init_error:
+ *
* Returns whether Purple's D-BUS subsystem is up and running. If it's
* NOT running then purple_dbus_dispatch_init() failed for some reason,
* and a message should have been purple_debug_error()'ed.
@@ -163,6 +170,8 @@ void purple_dbus_signal_emit_purple(const char *name, int num_values,
const char *purple_dbus_get_init_error(void);
/**
+ * purple_dbus_get_handle:
+ *
* Returns the dbus subsystem handle.
*
* Returns: The dbus subsystem handle.
@@ -170,31 +179,36 @@ const char *purple_dbus_get_init_error(void);
void *purple_dbus_get_handle(void);
/**
+ * purple_dbus_is_owner:
+ *
* Determines whether this instance owns the DBus service name
*/
gboolean purple_dbus_is_owner(void);
/**
+ * purple_dbus_init:
+ *
* Starts Purple's D-BUS server. It is responsible for handling DBUS
* requests from other applications.
*/
void purple_dbus_init(void);
/**
+ * purple_dbus_uninit:
+ *
* Uninitializes Purple's D-BUS server.
*/
void purple_dbus_uninit(void);
/**
-
- Macro #DBUS_EXPORT expands to nothing. It is used to indicate to the
- dbus-analyze-functions.py script that the given function should be
- available to other applications through DBUS. If
- dbus-analyze-functions.py is run without the "--export-only" option,
- this prefix is ignored.
-
+ * DBUS_EXPORT:
+ *
+ * Macro #DBUS_EXPORT expands to nothing. It is used to indicate to the
+ * dbus-analyze-functions.py script that the given function should be
+ * available to other applications through DBUS. If
+ * dbus-analyze-functions.py is run without the "--export-only" option,
+ * this prefix is ignored.
*/
-
#define DBUS_EXPORT
/*
diff --git a/libpurple/debug.h b/libpurple/debug.h
index 83ed6f2c2b..955f4f36ac 100644
--- a/libpurple/debug.h
+++ b/libpurple/debug.h
@@ -30,20 +30,30 @@
#include <stdarg.h>
/**
+ * PurpleDebugLevel:
+ * @PURPLE_DEBUG_ALL: All debug levels.
+ * @PURPLE_DEBUG_MISC: General chatter.
+ * @PURPLE_DEBUG_INFO: General operation Information.
+ * @PURPLE_DEBUG_WARNING: Warnings.
+ * @PURPLE_DEBUG_ERROR: Errors.
+ * @PURPLE_DEBUG_FATAL: Fatal errors.
+ *
* Debug levels.
*/
typedef enum
{
- PURPLE_DEBUG_ALL = 0, /**< All debug levels. */
- PURPLE_DEBUG_MISC, /**< General chatter. */
- PURPLE_DEBUG_INFO, /**< General operation Information. */
- PURPLE_DEBUG_WARNING, /**< Warnings. */
- PURPLE_DEBUG_ERROR, /**< Errors. */
- PURPLE_DEBUG_FATAL /**< Fatal errors. */
+ PURPLE_DEBUG_ALL = 0,
+ PURPLE_DEBUG_MISC,
+ PURPLE_DEBUG_INFO,
+ PURPLE_DEBUG_WARNING,
+ PURPLE_DEBUG_ERROR,
+ PURPLE_DEBUG_FATAL
} PurpleDebugLevel;
/**
+ * PurpleDebugUiOps:
+ *
* Debug UI operations.
*/
typedef struct
@@ -66,88 +76,97 @@ G_BEGIN_DECLS
/** @name Debug API */
/**************************************************************************/
/**
- * Outputs debug information.
- *
+ * purple_debug:
* @level: The debug level.
* @category: The category (or %NULL).
* @format: The format string.
+ *
+ * Outputs debug information.
*/
void purple_debug(PurpleDebugLevel level, const char *category,
const char *format, ...) G_GNUC_PRINTF(3, 4);
/**
+ * purple_debug_misc:
+ * @category: The category (or %NULL).
+ * @format: The format string.
+ *
* Outputs misc. level debug information.
*
* This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_MISC as
* the level.
*
- * @category: The category (or %NULL).
- * @format: The format string.
- *
* @see purple_debug()
*/
void purple_debug_misc(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
/**
+ * purple_debug_info:
+ * @category: The category (or %NULL).
+ * @format: The format string.
+ *
* Outputs info level debug information.
*
* This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_INFO as
* the level.
*
- * @category: The category (or %NULL).
- * @format: The format string.
- *
* @see purple_debug()
*/
void purple_debug_info(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
/**
+ * purple_debug_warning:
+ * @category: The category (or %NULL).
+ * @format: The format string.
+ *
* Outputs warning level debug information.
*
* This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_WARNING as
* the level.
*
- * @category: The category (or %NULL).
- * @format: The format string.
- *
* @see purple_debug()
*/
void purple_debug_warning(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
/**
+ * purple_debug_error:
+ * @category: The category (or %NULL).
+ * @format: The format string.
+ *
* Outputs error level debug information.
*
* This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_ERROR as
* the level.
*
- * @category: The category (or %NULL).
- * @format: The format string.
- *
* @see purple_debug()
*/
void purple_debug_error(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
/**
+ * purple_debug_fatal:
+ * @category: The category (or %NULL).
+ * @format: The format string.
+ *
* Outputs fatal error level debug information.
*
* This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_ERROR as
* the level.
*
- * @category: The category (or %NULL).
- * @format: The format string.
- *
* @see purple_debug()
*/
void purple_debug_fatal(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
/**
- * Enable or disable printing debug output to the console.
- *
+ * purple_debug_set_enabled:
* @enabled: TRUE to enable debug output or FALSE to disable it.
+ *
+ * Enable or disable printing debug output to the console.
*/
void purple_debug_set_enabled(gboolean enabled);
/**
+ * purple_debug_is_enabled:
+ *
* Check if console debug output is enabled.
*
* Returns: TRUE if debugging is enabled, FALSE if it is not.
@@ -155,15 +174,18 @@ void purple_debug_set_enabled(gboolean enabled);
gboolean purple_debug_is_enabled(void);
/**
+ * purple_debug_set_verbose:
+ * @verbose: TRUE to enable verbose debugging or FALSE to disable it.
+ *
* Enable or disable verbose debugging. This ordinarily should only be called
* by #purple_debug_init, but there are cases where this can be useful for
* plugins.
- *
- * @verbose: TRUE to enable verbose debugging or FALSE to disable it.
*/
void purple_debug_set_verbose(gboolean verbose);
/**
+ * purple_debug_is_verbose:
+ *
* Check if verbose logging is enabled.
*
* Returns: TRUE if verbose debugging is enabled, FALSE if it is not.
@@ -171,17 +193,20 @@ void purple_debug_set_verbose(gboolean verbose);
gboolean purple_debug_is_verbose(void);
/**
- * Enable or disable unsafe debugging. This ordinarily should only be called
- * by #purple_debug_init, but there are cases where this can be useful for
- * plugins.
- *
+ * purple_debug_set_unsafe:
* @unsafe: TRUE to enable debug logging of messages that could
* potentially contain passwords and other sensitive information.
* FALSE to disable it.
+ *
+ * Enable or disable unsafe debugging. This ordinarily should only be called
+ * by #purple_debug_init, but there are cases where this can be useful for
+ * plugins.
*/
void purple_debug_set_unsafe(gboolean unsafe);
/**
+ * purple_debug_is_unsafe:
+ *
* Check if unsafe debugging is enabled. Defaults to FALSE.
*
* Returns: TRUE if the debug logging of all messages is enabled, FALSE
@@ -191,9 +216,10 @@ void purple_debug_set_unsafe(gboolean unsafe);
gboolean purple_debug_is_unsafe(void);
/**
- * Enable or disable colored output for bash console.
- *
+ * purple_debug_set_colored:
* @colored: TRUE to enable colored output, FALSE to disable it.
+ *
+ * Enable or disable colored output for bash console.
*/
void purple_debug_set_colored(gboolean colored);
@@ -205,14 +231,17 @@ void purple_debug_set_colored(gboolean colored);
/*@{*/
/**
+ * purple_debug_set_ui_ops:
+ * @ops: The UI operations structure.
+ *
* Sets the UI operations structure to be used when outputting debug
* information.
- *
- * @ops: The UI operations structure.
*/
void purple_debug_set_ui_ops(PurpleDebugUiOps *ops);
/**
+ * purple_debug_get_ui_ops:
+ *
* Returns the UI operations structure used when outputting debug
* information.
*
@@ -228,6 +257,8 @@ PurpleDebugUiOps *purple_debug_get_ui_ops(void);
/*@{*/
/**
+ * purple_debug_init:
+ *
* Initializes the debug subsystem.
*/
void purple_debug_init(void);
diff --git a/libpurple/desktopitem.h b/libpurple/desktopitem.h
index 0974b87845..2ba9cb15d3 100644
--- a/libpurple/desktopitem.h
+++ b/libpurple/desktopitem.h
@@ -116,54 +116,59 @@ GType purple_desktop_item_get_type (void);
#define PURPLE_DESKTOP_ITEM_DOC_PATH "X-GNOME-DocPath" /* string */
/**
- * This function loads 'filename' and turns it into a PurpleDesktopItem.
- *
+ * purple_desktop_item_new_from_file:
* @filename: The filename or directory path to load the PurpleDesktopItem from
*
+ * This function loads 'filename' and turns it into a PurpleDesktopItem.
+ *
* Returns: The newly loaded item, or NULL on error.
*/
PurpleDesktopItem *purple_desktop_item_new_from_file (const char *filename);
/**
+ * purple_desktop_item_get_entry_type:
+ * @item: A desktop item
+ *
* Gets the type attribute (the 'Type' field) of the item. This should
* usually be 'Application' for an application, but it can be 'Directory'
* for a directory description. There are other types available as well.
* The type usually indicates how the desktop item should be handeled and
* how the 'Exec' field should be handeled.
*
- * @item: A desktop item
- *
* Returns: The type of the specified 'item'. The returned memory
* remains owned by the PurpleDesktopItem and should not be freed.
*/
PurpleDesktopItemType purple_desktop_item_get_entry_type (const PurpleDesktopItem *item);
/**
- * Gets the value of an attribute of the item, as a string.
- *
+ * purple_desktop_item_get_string:
* @item: A desktop item
* @attr: The attribute to look for
*
+ * Gets the value of an attribute of the item, as a string.
+ *
* Returns: The value of the specified item attribute.
*/
const char *purple_desktop_item_get_string (const PurpleDesktopItem *item,
const char *attr);
/**
+ * purple_desktop_item_copy:
+ * @item: The item to be copied
+ *
* Creates a copy of a PurpleDesktopItem. The new copy has a refcount of 1.
* Note: Section stack is NOT copied.
*
- * @item: The item to be copied
- *
* Returns: The new copy
*/
PurpleDesktopItem *purple_desktop_item_copy (const PurpleDesktopItem *item);
/**
+ * purple_desktop_item_unref:
+ * @item: A desktop item
+ *
* Decreases the reference count of the specified item, and destroys
* the item if there are no more references left.
- *
- * @item: A desktop item
*/
void purple_desktop_item_unref (PurpleDesktopItem *item);
diff --git a/libpurple/dnsquery.h b/libpurple/dnsquery.h
index c8340aefa9..5a866b51e9 100644
--- a/libpurple/dnsquery.h
+++ b/libpurple/dnsquery.h
@@ -31,6 +31,8 @@
#include "account.h"
/**
+ * PurpleDnsQueryData:
+ *
* An opaque structure representing a DNS query. The hostname and port
* associated with the query can be retrieved using
* purple_dnsquery_get_host() and purple_dnsquery_get_port().
@@ -38,6 +40,8 @@
typedef struct _PurpleDnsQueryData PurpleDnsQueryData;
/**
+ * PurpleDnsQueryConnectFunction:
+ *
* The "hosts" parameter is a linked list containing pairs of
* one size_t addrlen and one struct sockaddr *addr. It should
* be free'd by the callback function.
@@ -45,12 +49,22 @@ typedef struct _PurpleDnsQueryData PurpleDnsQueryData;
typedef void (*PurpleDnsQueryConnectFunction)(GSList *hosts, gpointer data, const char *error_message);
/**
- * Callbacks used by the UI if it handles resolving DNS
+ * PurpleDnsQueryResolvedCallback:
+ *
+ * DNS query resolved callback used by the UI if it handles resolving DNS
*/
typedef void (*PurpleDnsQueryResolvedCallback) (PurpleDnsQueryData *query_data, GSList *hosts);
+
+/**
+ * PurpleDnsQueryFailedCallback:
+ *
+ * DNS query failed callback used by the UI if it handles resolving DNS
+ */
typedef void (*PurpleDnsQueryFailedCallback) (PurpleDnsQueryData *query_data, const gchar *error_message);
/**
+ * PurpleDnsQueryUiOps:
+ *
* DNS Request UI operations; UIs should implement this if they want to do DNS
* lookups themselves, rather than relying on the core.
*
@@ -64,8 +78,8 @@ typedef struct
PurpleDnsQueryResolvedCallback resolved_cb,
PurpleDnsQueryFailedCallback failed_cb);
- /** Called just before @a query_data is freed; this should cancel any
- * further use of @a query_data the UI would make. Unneeded if
+ /** Called just before @query_data is freed; this should cancel any
+ * further use of @query_data the UI would make. Unneeded if
* #resolve_host is not implemented.
*/
void (*destroy)(PurpleDnsQueryData *query_data);
@@ -85,14 +99,15 @@ G_BEGIN_DECLS
/*@{*/
/**
- * Perform an asynchronous DNS query.
- *
+ * purple_dnsquery_a:
* @account: The account that the query is being done for (or NULL)
* @hostname: The hostname to resolve.
* @port: A port number which is stored in the struct sockaddr.
* @callback: The callback function to call after resolving.
* @data: Extra data to pass to the callback function.
*
+ * Perform an asynchronous DNS query.
+ *
* Returns: NULL if there was an error, otherwise return a reference to
* a data structure that can be used to cancel the pending
* DNS query, if needed.
@@ -101,23 +116,27 @@ G_BEGIN_DECLS
PurpleDnsQueryData *purple_dnsquery_a(PurpleAccount *account, const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
/**
- * Cancel a DNS query and destroy the associated data structure.
- *
+ * purple_dnsquery_destroy:
* @query_data: The DNS query to cancel. This data structure
* is freed by this function.
+ *
+ * Cancel a DNS query and destroy the associated data structure.
*/
void purple_dnsquery_destroy(PurpleDnsQueryData *query_data);
/**
+ * purple_dnsquery_set_ui_ops:
+ * @ops: The UI operations structure.
+ *
* Sets the UI operations structure to be used when doing a DNS
* resolve. The UI operations need only be set if the UI wants to
* handle the resolve itself; otherwise, leave it as NULL.
- *
- * @ops: The UI operations structure.
*/
void purple_dnsquery_set_ui_ops(PurpleDnsQueryUiOps *ops);
/**
+ * purple_dnsquery_get_ui_ops:
+ *
* Returns the UI operations structure to be used when doing a DNS
* resolve.
*
@@ -126,27 +145,35 @@ void purple_dnsquery_set_ui_ops(PurpleDnsQueryUiOps *ops);
PurpleDnsQueryUiOps *purple_dnsquery_get_ui_ops(void);
/**
+ * purple_dnsquery_get_host:
+ * @query_data: The DNS query
+ *
* Get the host associated with a PurpleDnsQueryData
*
- * @query_data: The DNS query
* Returns: The host.
*/
char *purple_dnsquery_get_host(PurpleDnsQueryData *query_data);
/**
+ * purple_dnsquery_get_port:
+ * @query_data: The DNS query
+ *
* Get the port associated with a PurpleDnsQueryData
*
- * @query_data: The DNS query
* Returns: The port.
*/
unsigned short purple_dnsquery_get_port(PurpleDnsQueryData *query_data);
/**
+ * purple_dnsquery_init:
+ *
* Initializes the DNS query subsystem.
*/
void purple_dnsquery_init(void);
/**
+ * purple_dnsquery_uninit:
+ *
* Uninitializes the DNS query subsystem.
*/
void purple_dnsquery_uninit(void);
diff --git a/libpurple/dnssrv.h b/libpurple/dnssrv.h
index 2804df5b29..90a00708cb 100644
--- a/libpurple/dnssrv.h
+++ b/libpurple/dnssrv.h
@@ -50,6 +50,8 @@ typedef void (*PurpleSrvTxtQueryResolvedCallback) (PurpleSrvTxtQueryData *query
typedef void (*PurpleSrvTxtQueryFailedCallback) (PurpleSrvTxtQueryData *query_data, const gchar *error_message);
/**
+ * PurpleSrvTxtQueryUiOps:
+ *
* SRV Request UI operations; UIs should implement this if they want to do SRV
* lookups themselves, rather than relying on the core.
*
@@ -64,8 +66,8 @@ typedef struct
PurpleSrvTxtQueryResolvedCallback resolved_cb,
PurpleSrvTxtQueryFailedCallback failed_cb);
- /** Called just before @a query_data is freed; this should cancel any
- * further use of @a query_data the UI would make. Unneeded if
+ /** Called just before @query_data is freed; this should cancel any
+ * further use of @query_data the UI would make. Unneeded if
* #resolve is not implemented.
*/
void (*destroy)(PurpleSrvTxtQueryData *query_data);
@@ -78,6 +80,7 @@ typedef struct
} PurpleSrvTxtQueryUiOps;
/**
+ * PurpleSrvCallback:
* @resp: An array of PurpleSrvResponse of size results. The array
* is sorted based on the order described in the DNS SRV RFC.
* Users of this API should try each record in resp in order,
@@ -86,18 +89,18 @@ typedef struct
typedef void (*PurpleSrvCallback)(PurpleSrvResponse *resp, int results, gpointer data);
/**
- * Callback that returns the data retrieved from a DNS TXT lookup.
- *
+ * PurpleTxtCallback:
* @responses: A GList of PurpleTxtResponse objects.
* @data: The extra data passed to purple_txt_resolve.
+ *
+ * Callback that returns the data retrieved from a DNS TXT lookup.
*/
typedef void (*PurpleTxtCallback)(GList *responses, gpointer data);
G_BEGIN_DECLS
/**
- * Queries an SRV record.
- *
+ * purple_srv_resolve:
* @account: The account that the query is being done for (or NULL)
* @protocol: Name of the protocol (e.g. "sip")
* @transport: Name of the transport ("tcp" or "udp")
@@ -105,6 +108,8 @@ G_BEGIN_DECLS
* @cb: A callback which will be called with the results
* @extradata: Extra data to be passed to the callback
*
+ * Queries an SRV record.
+ *
* Returns: NULL if there was an error, otherwise return a reference to
* a data structure that can be used to cancel the pending
* DNS query, if needed.
@@ -112,14 +117,15 @@ G_BEGIN_DECLS
PurpleSrvTxtQueryData *purple_srv_resolve(PurpleAccount *account, const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata);
/**
- * Queries an TXT record.
- *
+ * purple_txt_resolve:
* @account: The account that the query is being done for (or NULL)
* @owner: Name of the protocol (e.g. "_xmppconnect")
* @domain: Domain name to query (e.g. "blubb.com")
* @cb: A callback which will be called with the results
* @extradata: Extra data to be passed to the callback
*
+ * Queries an TXT record.
+ *
* Returns: NULL if there was an error, otherwise return a reference to
* a data structure that can be used to cancel the pending
* DNS query, if needed.
@@ -127,39 +133,45 @@ PurpleSrvTxtQueryData *purple_srv_resolve(PurpleAccount *account, const char *pr
PurpleSrvTxtQueryData *purple_txt_resolve(PurpleAccount *account, const char *owner, const char *domain, PurpleTxtCallback cb, gpointer extradata);
/**
- * Get the value of the current TXT record.
- *
+ * purple_txt_response_get_content:
* @response: The TXT response record
*
+ * Get the value of the current TXT record.
+ *
* Returns: The value of the current TXT record.
*/
const gchar *purple_txt_response_get_content(PurpleTxtResponse *response);
/**
- * Destroy a TXT DNS response object.
- *
+ * purple_txt_response_destroy:
* @response: The PurpleTxtResponse to destroy.
+ *
+ * Destroy a TXT DNS response object.
*/
void purple_txt_response_destroy(PurpleTxtResponse *response);
/**
- * Cancel a SRV/TXT query and destroy the associated data structure.
- *
+ * purple_srv_txt_query_destroy:
* @query_data: The SRV/TXT query to cancel. This data structure
* is freed by this function.
+ *
+ * Cancel a SRV/TXT query and destroy the associated data structure.
*/
void purple_srv_txt_query_destroy(PurpleSrvTxtQueryData *query_data);
/**
+ * purple_srv_txt_query_set_ui_ops:
+ * @ops: The UI operations structure.
+ *
* Sets the UI operations structure to be used when doing a SRV/TXT
* resolve. The UI operations need only be set if the UI wants to
* handle the resolve itself; otherwise, leave it as NULL.
- *
- * @ops: The UI operations structure.
*/
void purple_srv_txt_query_set_ui_ops(PurpleSrvTxtQueryUiOps *ops);
/**
+ * purple_srv_txt_query_get_ui_ops:
+ *
* Returns the UI operations structure to be used when doing a SRV/TXT
* resolve.
*
@@ -168,17 +180,21 @@ void purple_srv_txt_query_set_ui_ops(PurpleSrvTxtQueryUiOps *ops);
PurpleSrvTxtQueryUiOps *purple_srv_txt_query_get_ui_ops(void);
/**
+ * purple_srv_txt_query_get_query:
+ * @query_data: The SRV/TXT query
+ *
* Get the query from a PurpleSrvTxtQueryData
*
- * @query_data: The SRV/TXT query
* Returns: The query.
*/
char *purple_srv_txt_query_get_query(PurpleSrvTxtQueryData *query_data);
/**
+ * purple_srv_txt_query_get_type:
+ * @query_data: The query
+ *
* Get the type from a PurpleSrvTxtQueryData (TXT or SRV)
*
- * @query_data: The query
* Returns: The query.
*/
int purple_srv_txt_query_get_type(PurpleSrvTxtQueryData *query_data);
diff --git a/libpurple/e2ee.h b/libpurple/e2ee.h
index 67e627e466..07261f53a1 100644
--- a/libpurple/e2ee.h
+++ b/libpurple/e2ee.h
@@ -44,81 +44,89 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_e2ee_state_new:
+ * @provider: The E2EE provider that created this state.
+ *
* Creates new E2EE state.
*
* State objects are global (shared between multiple conversations).
*
- * @provider: The E2EE provider that created this state.
- *
* Returns: New E2EE state.
*/
PurpleE2eeState *
purple_e2ee_state_new(PurpleE2eeProvider *provider);
/**
- * Increment the reference count.
- *
+ * purple_e2ee_state_ref:
* @state: The E2EE state.
+ *
+ * Increment the reference count.
*/
void
purple_e2ee_state_ref(PurpleE2eeState *state);
/**
+ * purple_e2ee_state_unref:
+ * @state: The E2EE state.
+ *
* Decrement the reference count.
*
* If the reference count reaches zero, the state will be freed.
*
- * @state: The E2EE state.
- *
- * Returns: @a state or %NULL if the reference count reached zero.
+ * Returns: @state or %NULL if the reference count reached zero.
*/
PurpleE2eeState *
purple_e2ee_state_unref(PurpleE2eeState *state);
/**
- * Gets the provider of specified E2EE state.
- *
+ * purple_e2ee_state_get_provider:
* @state: The E2EE state.
*
+ * Gets the provider of specified E2EE state.
+ *
* Returns: The provider for this state.
*/
PurpleE2eeProvider *
purple_e2ee_state_get_provider(PurpleE2eeState *state);
/**
- * Sets the name for the E2EE state.
- *
+ * purple_e2ee_state_set_name:
* @state: The E2EE state.
* @name: The localized name.
+ *
+ * Sets the name for the E2EE state.
*/
void
purple_e2ee_state_set_name(PurpleE2eeState *state, const gchar *name);
/**
- * Gets the name of the E2EE state.
- *
+ * purple_e2ee_state_get_name:
* @state: The E2EE state.
*
+ * Gets the name of the E2EE state.
+ *
* Returns: The localized name.
*/
const gchar *
purple_e2ee_state_get_name(PurpleE2eeState *state);
/**
- * Sets the icon for the E2EE state.
- *
+ * purple_e2ee_state_set_stock_icon:
* @state: The E2EE state.
* @stock_icon: The stock icon identifier.
+ *
+ * Sets the icon for the E2EE state.
*/
void
purple_e2ee_state_set_stock_icon(PurpleE2eeState *state,
const gchar *stock_icon);
/**
- * Gets the icon of the E2EE state.
- *
+ * purple_e2ee_state_get_stock_icon:
* @state: The E2EE state.
*
+ * Gets the icon of the E2EE state.
+ *
* Returns: The stock icon identifier.
*/
const gchar *
@@ -133,6 +141,8 @@ purple_e2ee_state_get_stock_icon(PurpleE2eeState *state);
/*@{*/
/**
+ * purple_e2ee_provider_new:
+ *
* Creates new E2EE provider.
*
* Returns: New E2EE provider.
@@ -141,23 +151,25 @@ PurpleE2eeProvider *
purple_e2ee_provider_new(void);
/**
+ * purple_e2ee_provider_free:
+ * @provider: The provider.
+ *
* Destroys the E2EE provider.
*
* The provider have to be unregistered prior.
- *
- * @provider: The provider.
*/
void
purple_e2ee_provider_free(PurpleE2eeProvider *provider);
/**
+ * purple_e2ee_provider_register:
+ * @provider: The E2EE provider.
+ *
* Registers the E2EE provider.
*
* Currently, there is no support for multiple E2EE providers - only the first
* one is registered.
*
- * @provider: The E2EE provider.
- *
* Returns: %TRUE, if the provider was successfully registered,
* %FALSE otherwise.
*/
@@ -165,14 +177,17 @@ gboolean
purple_e2ee_provider_register(PurpleE2eeProvider *provider);
/**
- * Unregisters the E2EE provider.
- *
+ * purple_e2ee_provider_unregister:
* @provider: The E2EE provider.
+ *
+ * Unregisters the E2EE provider.
*/
void
purple_e2ee_provider_unregister(PurpleE2eeProvider *provider);
/**
+ * purple_e2ee_provider_get_main:
+ *
* Gets main E2EE provider.
*
* Returns: The main E2EE provider.
@@ -181,44 +196,48 @@ PurpleE2eeProvider *
purple_e2ee_provider_get_main(void);
/**
- * Sets the name for the E2EE provider.
- *
+ * purple_e2ee_provider_set_name:
* @provider: The E2EE provider.
* @name: The localized name.
+ *
+ * Sets the name for the E2EE provider.
*/
void
purple_e2ee_provider_set_name(PurpleE2eeProvider *provider, const gchar *name);
/**
- * Gets the name of the E2EE provider.
- *
+ * purple_e2ee_provider_get_name:
* @provider: The E2EE provider.
*
+ * Gets the name of the E2EE provider.
+ *
* Returns: The localized name of specified E2EE provider.
*/
const gchar *
purple_e2ee_provider_get_name(PurpleE2eeProvider *provider);
/**
+ * purple_e2ee_provider_set_conv_menu_cb:
+ * @provider: The E2EE provider.
+ * @conv_menu_cb: The callback.
+ *
* Sets the conversation menu callback for the E2EE provider.
*
* The function is called, when user extends the E2EE menu for the conversation
* specified in its parameter.
*
* Function should return the GList of PurpleMenuAction objects.
- *
- * @provider: The E2EE provider.
- * @conv_menu_cb: The callback.
*/
void
purple_e2ee_provider_set_conv_menu_cb(PurpleE2eeProvider *provider,
PurpleE2eeConvMenuCallback conv_menu_cb);
/**
- * Gets the conversation menu callback of the E2EE provider.
- *
+ * purple_e2ee_provider_get_conv_menu_cb:
* @provider: The E2EE provider.
*
+ * Gets the conversation menu callback of the E2EE provider.
+ *
* Returns: The callback.
*/
PurpleE2eeConvMenuCallback
diff --git a/libpurple/eventloop.h b/libpurple/eventloop.h
index e434b26508..4f303b25e3 100644
--- a/libpurple/eventloop.h
+++ b/libpurple/eventloop.h
@@ -29,36 +29,45 @@
#include <glib.h>
/**
+ * PurpleInputCondition:
+ * @PURPLE_INPUT_READ: A read condition.
+ * @PURPLE_INPUT_WRITE: A write condition.
+ *
* An input condition.
*/
typedef enum
{
- PURPLE_INPUT_READ = 1 << 0, /**< A read condition. */
- PURPLE_INPUT_WRITE = 1 << 1 /**< A write condition. */
+ PURPLE_INPUT_READ = 1 << 0,
+ PURPLE_INPUT_WRITE = 1 << 1
} PurpleInputCondition;
-/** The type of callbacks to handle events on file descriptors, as passed to
- * purple_input_add(). The callback will receive the @c user_data passed to
- * purple_input_add(), the file descriptor on which the event occurred, and the
- * condition that was satisfied to cause the callback to be invoked.
+/**
+ * PurpleInputFunction:
+ *
+ * The type of callbacks to handle events on file descriptors, as passed to
+ * purple_input_add(). The callback will receive the @user_data passed to
+ * purple_input_add(), the file descriptor on which the event occurred, and the
+ * condition that was satisfied to cause the callback to be invoked.
*/
typedef void (*PurpleInputFunction)(gpointer, gint, PurpleInputCondition);
-/** @copydoc _PurpleEventLoopUiOps */
typedef struct _PurpleEventLoopUiOps PurpleEventLoopUiOps;
-/** An abstraction of an application's mainloop; libpurple will use this to
- * watch file descriptors and schedule timed callbacks. If your application
- * uses the glib mainloop, there is an implementation of this struct in
- * <tt>libpurple/example/nullclient.c</tt> which you can use verbatim.
+/**
+ * PurpleEventLoopUiOps:
+ *
+ * An abstraction of an application's mainloop; libpurple will use this to
+ * watch file descriptors and schedule timed callbacks. If your application
+ * uses the glib mainloop, there is an implementation of this struct in
+ * <tt>libpurple/example/nullclient.c</tt> which you can use verbatim.
*/
struct _PurpleEventLoopUiOps
{
/**
* Should create a callback timer with an interval measured in
- * milliseconds. The supplied @a function should be called every @a
- * interval seconds until it returns %FALSE, after which it should not
+ * milliseconds. The supplied @function should be called every
+ * @interval seconds until it returns %FALSE, after which it should not
* be called again.
*
* Analogous to g_timeout_add in glib.
@@ -68,10 +77,10 @@ struct _PurpleEventLoopUiOps
* and to only call "function" from the libpurple thread.
*
* @interval: the interval in <em>milliseconds</em> between calls
- * to @a function.
- * @data: arbitrary data to be passed to @a function at each
+ * to @function.
+ * @data: arbitrary data to be passed to @function at each
* call.
- * @todo Who is responsible for freeing @a data?
+ * @todo Who is responsible for freeing @data ?
*
* Returns: a handle for the timeout, which can be passed to
* #timeout_remove.
@@ -84,7 +93,7 @@ struct _PurpleEventLoopUiOps
* Should remove a callback timer. Analogous to g_source_remove in glib.
* @handle: an identifier for a timeout, as returned by
* #timeout_add.
- * Returns: %TRUE if the timeout identified by @a handle was
+ * Returns: %TRUE if the timeout identified by @handle was
* found and removed.
* @see purple_timeout_remove
*/
@@ -95,11 +104,11 @@ struct _PurpleEventLoopUiOps
* glib.
*
* @fd: a file descriptor to watch for events
- * @cond: a bitwise OR of events on @a fd for which @a func
+ * @cond: a bitwise OR of events on @fd for which @func
* should be called.
- * @func: a callback to fire whenever a relevant event on @a
- * fd occurs.
- * @user_data: arbitrary data to pass to @a fd.
+ * @func: a callback to fire whenever a relevant event on
+ * @fd occurs.
+ * @user_data: arbitrary data to pass to @fd.
* Returns: an identifier for this input handler, which can be
* passed to #input_remove.
*
@@ -134,7 +143,7 @@ struct _PurpleEventLoopUiOps
* measured in seconds. Analogous to g_timeout_add_seconds in glib.
*
* This allows UIs to group timers for better power efficiency. For
- * this reason, @a interval may be rounded by up to a second.
+ * this reason, @interval may be rounded by up to a second.
*
* Implementation of this UI op is optional. If it's not implemented,
* calls to purple_timeout_add_seconds() will be serviced by
@@ -159,6 +168,12 @@ G_BEGIN_DECLS
/**************************************************************************/
/*@{*/
/**
+ * purple_timeout_add:
+ * @interval: The time between calls of the function, in
+ * milliseconds.
+ * @function: The function to call.
+ * @data: data to pass to @function.
+ *
* Creates a callback timer.
*
* The timer will repeat until the function returns %FALSE. The
@@ -167,50 +182,50 @@ G_BEGIN_DECLS
* If the timer is in a multiple of seconds, use purple_timeout_add_seconds()
* instead as it allows UIs to group timers for power efficiency.
*
- * @interval: The time between calls of the function, in
- * milliseconds.
- * @function: The function to call.
- * @data: data to pass to @a function.
* Returns: A handle to the timer which can be passed to
* purple_timeout_remove() to remove the timer.
*/
guint purple_timeout_add(guint interval, GSourceFunc function, gpointer data);
/**
+ * purple_timeout_add_seconds:
+ * @interval: The time between calls of the function, in
+ * seconds.
+ * @function: The function to call.
+ * @data: data to pass to @function.
+ *
* Creates a callback timer.
*
* The timer will repeat until the function returns %FALSE. The
* first call will be at the end of the first interval.
*
* This function allows UIs to group timers for better power efficiency. For
- * this reason, @a interval may be rounded by up to a second.
+ * this reason, @interval may be rounded by up to a second.
*
- * @interval: The time between calls of the function, in
- * seconds.
- * @function: The function to call.
- * @data: data to pass to @a function.
* Returns: A handle to the timer which can be passed to
* purple_timeout_remove() to remove the timer.
*/
guint purple_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data);
/**
- * Removes a timeout handler.
- *
+ * purple_timeout_remove:
* @handle: The handle, as returned by purple_timeout_add().
*
+ * Removes a timeout handler.
+ *
* Returns: %TRUE if the handler was successfully removed.
*/
gboolean purple_timeout_remove(guint handle);
/**
- * Adds an input handler.
- *
+ * purple_input_add:
* @fd: The input file descriptor.
* @cond: The condition type.
* @func: The callback function for data.
* @user_data: User-specified data.
*
+ * Adds an input handler.
+ *
* Returns: The resulting handle (will be greater than 0).
* @see g_io_add_watch_full
*/
@@ -218,31 +233,36 @@ guint purple_input_add(int fd, PurpleInputCondition cond,
PurpleInputFunction func, gpointer user_data);
/**
- * Removes an input handler.
- *
+ * purple_input_remove:
* @handle: The handle of the input handler. Note that this is the return
* value from purple_input_add(), <i>not</i> the file descriptor.
+ *
+ * Removes an input handler.
*/
gboolean purple_input_remove(guint handle);
/**
+ * purple_input_get_error:
+ * @fd: The input file descriptor.
+ * @error: A pointer to an #int which on return will have the error, or
+ * 0 if no error.
+ *
* Get the current error status for an input.
*
* The return value and error follow getsockopt() with a level of SOL_SOCKET and an
* option name of SO_ERROR, and this is how the error is determined if the UI does not
* implement the input_get_error UI op.
*
- * @fd: The input file descriptor.
- * @error: A pointer to an @c int which on return will have the error, or
- * @c 0 if no error.
- *
- * Returns: @c 0 if there is no error; @c -1 if there is an error, in which case
- * @a errno will be set.
+ * Returns: 0 if there is no error; -1 if there is an error, in which case
+ * %errno will be set.
*/
int
purple_input_get_error(int fd, int *error);
/**
+ * purple_input_pipe:
+ * @pipefd: Array used to return file descriptors for both ends of pipe.
+ *
* Creates a pipe - an unidirectional data channel that can be used for
* interprocess communication.
*
@@ -253,9 +273,7 @@ purple_input_get_error(int fd, int *error);
* On Windows it's simulated by creating a pair of connected sockets, on other
* systems pipe() is used.
*
- * @pipefd: Array used to return file descriptors for both ends of pipe.
- *
- * Returns: @c 0 on success, @c -1 on error.
+ * Returns: 0 on success, -1 on error.
*/
int
purple_input_pipe(int pipefd[2]);
@@ -269,13 +287,16 @@ purple_input_pipe(int pipefd[2]);
/**************************************************************************/
/*@{*/
/**
- * Sets the UI operations structure to be used for accounts.
- *
+ * purple_eventloop_set_ui_ops:
* @ops: The UI operations structure.
+ *
+ * Sets the UI operations structure to be used for accounts.
*/
void purple_eventloop_set_ui_ops(PurpleEventLoopUiOps *ops);
/**
+ * purple_eventloop_get_ui_ops:
+ *
* Returns the UI operations structure used for accounts.
*
* Returns: The UI operations structure in use.
diff --git a/libpurple/http.h b/libpurple/http.h
index 2d09b10609..cb7004b0cc 100644
--- a/libpurple/http.h
+++ b/libpurple/http.h
@@ -32,72 +32,90 @@
#include "connection.h"
/**
+ * PurpleHttpRequest:
+ *
* A structure containing all data required to generate a single HTTP request.
*/
typedef struct _PurpleHttpRequest PurpleHttpRequest;
/**
+ * PurpleHttpConnection:
+ *
* A representation of actually running HTTP request. Can be used to cancel the
* request.
*/
typedef struct _PurpleHttpConnection PurpleHttpConnection;
/**
+ * PurpleHttpResponse:
+ *
* All information got with response for HTTP request.
*/
typedef struct _PurpleHttpResponse PurpleHttpResponse;
/**
+ * PurpleHttpURL:
+ *
* Parsed representation for the URL.
*/
typedef struct _PurpleHttpURL PurpleHttpURL;
/**
+ * PurpleHttpCookieJar:
+ *
* An collection of cookies, got from HTTP response or provided for HTTP
* request.
*/
typedef struct _PurpleHttpCookieJar PurpleHttpCookieJar;
/**
+ * PurpleHttpKeepalivePool:
+ *
* A pool of TCP connections for HTTP Keep-Alive session.
*/
typedef struct _PurpleHttpKeepalivePool PurpleHttpKeepalivePool;
/**
+ * PurpleHttpConnectionSet:
+ *
* A set of running HTTP requests. Can be used to cancel all of them at once.
*/
typedef struct _PurpleHttpConnectionSet PurpleHttpConnectionSet;
/**
+ * PurpleHttpCallback:
+ *
* An callback called after performing (successfully or not) HTTP request.
*/
typedef void (*PurpleHttpCallback)(PurpleHttpConnection *http_conn,
PurpleHttpResponse *response, gpointer user_data);
/**
+ * PurpleHttpContentReaderCb:
+ *
* An callback called after storing data requested by PurpleHttpContentReader.
*/
typedef void (*PurpleHttpContentReaderCb)(PurpleHttpConnection *http_conn,
gboolean success, gboolean eof, size_t stored);
/**
- * An callback for getting large request contents (ie. from file stored on
- * disk).
- *
+ * PurpleHttpContentReader:
* @http_conn: Connection, which requests data.
* @buffer: Buffer to store data to (with offset ignored).
* @offset: Position, from where to read data.
* @length: Length of data to read.
* @user_data: The user data passed with callback function.
* @cb: The function to call after storing data to buffer.
+ *
+ * An callback for getting large request contents (ie. from file stored on
+ * disk).
*/
typedef void (*PurpleHttpContentReader)(PurpleHttpConnection *http_conn,
gchar *buffer, size_t offset, size_t length, gpointer user_data,
PurpleHttpContentReaderCb cb);
/**
- * An callback for writting large response contents.
- *
+ * PurpleHttpContentWriter:
* @http_conn: Connection, which requests data.
* @response: Response at point got so far (may change later).
* @buffer: Buffer to read data from (with offset ignored).
@@ -105,6 +123,9 @@ typedef void (*PurpleHttpContentReader)(PurpleHttpConnection *http_conn,
* previous call), can be safely ignored.
* @length: Length of data read.
* @user_data: The user data passed with callback function.
+ *
+ * An callback for writting large response contents.
+ *
* Returns: TRUE, if succeeded, FALSE otherwise.
*/
typedef gboolean (*PurpleHttpContentWriter)(PurpleHttpConnection *http_conn,
@@ -112,14 +133,15 @@ typedef gboolean (*PurpleHttpContentWriter)(PurpleHttpConnection *http_conn,
size_t length, gpointer user_data);
/**
- * An callback for watching HTTP connection progress.
- *
+ * PurpleHttpProgressWatcher:
* @http_conn: The HTTP Connection.
* @reading_state: FALSE, is we are sending the request, TRUE, when reading
* the response.
* @processed: The amount of data already processed.
* @total: Total amount of data (in current state).
* @user_data: The user data passed with callback function.
+ *
+ * An callback for watching HTTP connection progress.
*/
typedef void (*PurpleHttpProgressWatcher)(PurpleHttpConnection *http_conn,
gboolean reading_state, int processed, int total, gpointer user_data);
@@ -132,26 +154,30 @@ G_BEGIN_DECLS
/*@{*/
/**
- * Fetches the data from a URL with GET request, and passes it to a callback
- * function.
- *
+ * purple_http_get:
* @gc: The connection for which the request is needed, or NULL.
* @callback: The callback function.
* @user_data: The user data to pass to the callback function.
* @url: The URL.
+ *
+ * Fetches the data from a URL with GET request, and passes it to a callback
+ * function.
+ *
* Returns: The HTTP connection struct.
*/
PurpleHttpConnection * purple_http_get(PurpleConnection *gc,
PurpleHttpCallback callback, gpointer user_data, const gchar *url);
/**
- * Constructs an URL and fetches the data from it with GET request, then passes
- * it to a callback function.
- *
+ * purple_http_get_printf:
* @gc: The connection for which the request is needed, or NULL.
* @callback: The callback function.
* @user_data: The user data to pass to the callback function.
* @format: The format string.
+ *
+ * Constructs an URL and fetches the data from it with GET request, then passes
+ * it to a callback function.
+ *
* Returns: The HTTP connection struct.
*/
PurpleHttpConnection * purple_http_get_printf(PurpleConnection *gc,
@@ -159,14 +185,16 @@ PurpleHttpConnection * purple_http_get_printf(PurpleConnection *gc,
const gchar *format, ...) G_GNUC_PRINTF(4, 5);
/**
- * Fetches a HTTP request and passes the response to a callback function.
- * Provided request struct can be shared by multiple http requests but can not
- * be modified when any of these is running.
- *
+ * purple_http_request:
* @gc: The connection for which the request is needed, or NULL.
* @request: The request.
* @callback: The callback function.
* @user_data: The user data to pass to the callback function.
+ *
+ * Fetches a HTTP request and passes the response to a callback function.
+ * Provided request struct can be shared by multiple http requests but can not
+ * be modified when any of these is running.
+ *
* Returns: The HTTP connection struct.
*/
PurpleHttpConnection * purple_http_request(PurpleConnection *gc,
@@ -179,63 +207,74 @@ PurpleHttpConnection * purple_http_request(PurpleConnection *gc,
/*@{*/
/**
- * Cancel a pending HTTP request.
- *
+ * purple_http_conn_cancel:
* @http_conn: The data returned when you initiated the HTTP request.
+ *
+ * Cancel a pending HTTP request.
*/
void purple_http_conn_cancel(PurpleHttpConnection *http_conn);
/**
- * Cancels all HTTP connections associated with the specified handle.
- *
+ * purple_http_conn_cancel_all:
* @gc: The handle.
+ *
+ * Cancels all HTTP connections associated with the specified handle.
*/
void purple_http_conn_cancel_all(PurpleConnection *gc);
/**
+ * purple_http_conn_is_running:
+ * @http_conn: The HTTP connection (may be invalid pointer).
+ *
* Checks, if provided HTTP request is running.
*
- * @http_conn: The HTTP connection (may be invalid pointer).
* Returns: TRUE, if provided connection is currently running.
*/
gboolean purple_http_conn_is_running(PurpleHttpConnection *http_conn);
/**
+ * purple_http_conn_get_request:
+ * @http_conn: The HTTP connection.
+ *
* Gets PurpleHttpRequest used for specified HTTP connection.
*
- * @http_conn: The HTTP connection.
* Returns: The PurpleHttpRequest object.
*/
PurpleHttpRequest * purple_http_conn_get_request(
PurpleHttpConnection *http_conn);
/**
+ * purple_http_conn_get_cookie_jar:
+ * @http_conn: The HTTP connection.
+ *
* Gets cookie jar used within connection.
*
- * @http_conn: The HTTP connection.
* Returns: The cookie jar.
*/
PurpleHttpCookieJar * purple_http_conn_get_cookie_jar(
PurpleHttpConnection *http_conn);
/**
+ * purple_http_conn_get_purple_connection:
+ * @http_conn: The HTTP connection.
+ *
* Gets PurpleConnection tied with specified HTTP connection.
*
- * @http_conn: The HTTP connection.
* Returns: The PurpleConnection object.
*/
PurpleConnection * purple_http_conn_get_purple_connection(
PurpleHttpConnection *http_conn);
/**
- * Sets the watcher, called after writing or reading data to/from HTTP stream.
- * May be used for updating transfer progress gauge.
- *
+ * purple_http_conn_set_progress_watcher:
* @http_conn: The HTTP connection.
* @watcher: The watcher.
* @user_data: The user data to pass to the callback function.
* @interval_threshold: Minimum interval (in microseconds) of calls to
* watcher, or -1 for default.
+ *
+ * Sets the watcher, called after writing or reading data to/from HTTP stream.
+ * May be used for updating transfer progress gauge.
*/
void purple_http_conn_set_progress_watcher(PurpleHttpConnection *http_conn,
PurpleHttpProgressWatcher watcher, gpointer user_data,
@@ -250,106 +289,126 @@ void purple_http_conn_set_progress_watcher(PurpleHttpConnection *http_conn,
/*@{*/
/**
+ * purple_http_url_parse:
+ * @url: The URL to parse.
+ *
* Parses a URL.
*
* The returned data must be freed with purple_http_url_free.
*
- * @url: The URL to parse.
* Returns: The parsed url or NULL, if the URL is invalid.
*/
PurpleHttpURL *
purple_http_url_parse(const char *url);
/**
- * Frees the parsed URL struct.
- *
+ * purple_http_url_free:
* @parsed_url: The parsed URL struct, or NULL.
+ *
+ * Frees the parsed URL struct.
*/
void
purple_http_url_free(PurpleHttpURL *parsed_url);
/**
+ * purple_http_url_relative:
+ * @base_url: The base URL. The result is stored here.
+ * @relative_url: The relative URL.
+ *
* Converts the base URL to the absolute form of the provided relative URL.
*
* Example: "https://example.com/path/to/file.html" + "subdir/other-file.html" =
* "https://example.com/path/to/subdir/another-file.html"
- *
- * @base_url: The base URL. The result is stored here.
- * @relative_url: The relative URL.
*/
void
purple_http_url_relative(PurpleHttpURL *base_url, PurpleHttpURL *relative_url);
/**
+ * purple_http_url_print:
+ * @parsed_url: The URL struct.
+ *
* Converts the URL struct to the printable form. The result may not be a valid
* URL (in cases, when the struct doesn't have all fields filled properly).
*
* The result must be g_free'd.
*
- * @parsed_url: The URL struct.
* Returns: The printable form of the URL.
*/
gchar *
purple_http_url_print(PurpleHttpURL *parsed_url);
/**
+ * purple_http_url_get_protocol:
+ * @parsed_url: The URL struct.
+ *
* Gets the protocol part of URL.
*
- * @parsed_url: The URL struct.
* Returns: The protocol.
*/
const gchar *
purple_http_url_get_protocol(const PurpleHttpURL *parsed_url);
/**
+ * purple_http_url_get_username:
+ * @parsed_url: The URL struct.
+ *
* Gets the username part of URL.
*
- * @parsed_url: The URL struct.
* Returns: The username.
*/
const gchar *
purple_http_url_get_username(const PurpleHttpURL *parsed_url);
/**
+ * purple_http_url_get_password:
+ * @parsed_url: The URL struct.
+ *
* Gets the password part of URL.
*
- * @parsed_url: The URL struct.
* Returns: The password.
*/
const gchar *
purple_http_url_get_password(const PurpleHttpURL *parsed_url);
/**
+ * purple_http_url_get_host:
+ * @parsed_url: The URL struct.
+ *
* Gets the hostname part of URL.
*
- * @parsed_url: The URL struct.
* Returns: The hostname.
*/
const gchar *
purple_http_url_get_host(const PurpleHttpURL *parsed_url);
/**
+ * purple_http_url_get_port:
+ * @parsed_url: The URL struct.
+ *
* Gets the port part of URL.
*
- * @parsed_url: The URL struct.
* Returns: The port number.
*/
int
purple_http_url_get_port(const PurpleHttpURL *parsed_url);
/**
+ * purple_http_url_get_path:
+ * @parsed_url: The URL struct.
+ *
* Gets the path part of URL.
*
- * @parsed_url: The URL struct.
* Returns: The path.
*/
const gchar *
purple_http_url_get_path(const PurpleHttpURL *parsed_url);
/**
+ * purple_http_url_get_fragment:
+ * @parsed_url: The URL struct.
+ *
* Gets the fragment part of URL.
*
- * @parsed_url: The URL struct.
* Returns: The fragment.
*/
const gchar *
@@ -364,6 +423,8 @@ purple_http_url_get_fragment(const PurpleHttpURL *parsed_url);
/*@{*/
/**
+ * purple_http_cookie_jar_new:
+ *
* Creates new cookie jar,
*
* Returns: empty cookie jar.
@@ -371,47 +432,55 @@ purple_http_url_get_fragment(const PurpleHttpURL *parsed_url);
PurpleHttpCookieJar * purple_http_cookie_jar_new(void);
/**
- * Increment the reference count.
- *
+ * purple_http_cookie_jar_ref:
* @cookie_jar: The cookie jar.
+ *
+ * Increment the reference count.
*/
void purple_http_cookie_jar_ref(PurpleHttpCookieJar *cookie_jar);
/**
+ * purple_http_cookie_jar_unref:
+ * @cookie_jar: The cookie jar.
+ *
* Decrement the reference count.
*
* If the reference count reaches zero, the cookie jar will be freed.
*
- * @cookie_jar: The cookie jar.
- * Returns: @a cookie_jar or %NULL if the reference count reached zero.
+ * Returns: @cookie_jar or %NULL if the reference count reached zero.
*/
PurpleHttpCookieJar * purple_http_cookie_jar_unref(
PurpleHttpCookieJar *cookie_jar);
/**
- * Sets the cookie.
- *
+ * purple_http_cookie_jar_set:
* @cookie_jar: The cookie jar.
* @name: Cookie name.
* @value: Cookie contents.
+ *
+ * Sets the cookie.
*/
void purple_http_cookie_jar_set(PurpleHttpCookieJar *cookie_jar,
const gchar *name, const gchar *value);
/**
- * Gets the cookie.
- *
+ * purple_http_cookie_jar_get:
* @cookie_jar: The cookie jar.
* @name: Cookie name.
+ *
+ * Gets the cookie.
+ *
* Returns: Cookie contents, or NULL, if cookie doesn't exists.
*/
const gchar * purple_http_cookie_jar_get(PurpleHttpCookieJar *cookie_jar,
const gchar *name);
/**
+ * purple_http_cookie_jar_is_empty:
+ * @cookie_jar: The cookie jar.
+ *
* Checks, if the cookie jar contains any cookies.
*
- * @cookie_jar: The cookie jar.
* Returns: TRUE, if cookie jar contains any cookie, FALSE otherwise.
*/
gboolean purple_http_cookie_jar_is_empty(PurpleHttpCookieJar *cookie_jar);
@@ -425,244 +494,281 @@ gboolean purple_http_cookie_jar_is_empty(PurpleHttpCookieJar *cookie_jar);
/*@{*/
/**
- * Creates the new instance of HTTP request configuration.
- *
+ * purple_http_request_new:
* @url: The URL to request for, or NULL to leave empty (to be set with
* purple_http_request_set_url).
+ *
+ * Creates the new instance of HTTP request configuration.
+ *
* Returns: The new instance of HTTP request struct.
*/
PurpleHttpRequest * purple_http_request_new(const gchar *url);
/**
- * Increment the reference count.
- *
+ * purple_http_request_ref:
* @request: The request.
+ *
+ * Increment the reference count.
*/
void purple_http_request_ref(PurpleHttpRequest *request);
/**
+ * purple_http_request_unref:
+ * @request: The request.
+ *
* Decrement the reference count.
*
* If the reference count reaches zero, the http request struct will be freed.
*
- * @request: The request.
- * Returns: @a request or %NULL if the reference count reached zero.
+ * Returns: @request or %NULL if the reference count reached zero.
*/
PurpleHttpRequest * purple_http_request_unref(PurpleHttpRequest *request);
/**
- * Sets URL for HTTP request.
- *
+ * purple_http_request_set_url:
* @request: The request.
* @url: The url.
+ *
+ * Sets URL for HTTP request.
*/
void purple_http_request_set_url(PurpleHttpRequest *request, const gchar *url);
/**
- * Constructs and sets an URL for HTTP request.
- *
+ * purple_http_request_set_url_printf:
* @request: The request.
* @format: The format string.
+ *
+ * Constructs and sets an URL for HTTP request.
*/
void purple_http_request_set_url_printf(PurpleHttpRequest *request,
const gchar *format, ...) G_GNUC_PRINTF(2, 3);
/**
+ * purple_http_request_get_url:
+ * @request: The request.
+ *
* Gets URL set for the HTTP request.
*
- * @request: The request.
* Returns: URL set for this request.
*/
const gchar * purple_http_request_get_url(PurpleHttpRequest *request);
/**
- * Sets custom HTTP method used for the request.
- *
+ * purple_http_request_set_method:
* @request: The request.
* @method: The method, or NULL for default.
+ *
+ * Sets custom HTTP method used for the request.
*/
void purple_http_request_set_method(PurpleHttpRequest *request,
const gchar *method);
/**
+ * purple_http_request_get_method:
+ * @request: The request.
+ *
* Gets HTTP method set for the request.
*
- * @request: The request.
* Returns: The method.
*/
const gchar * purple_http_request_get_method(PurpleHttpRequest *request);
/**
+ * purple_http_request_set_keepalive_pool:
+ * @request: The request.
+ * @pool: The new KeepAlive pool, or NULL to reset.
+ *
* Sets HTTP KeepAlive connections pool for the request.
*
* It increases pool's reference count.
- *
- * @request: The request.
- * @pool: The new KeepAlive pool, or NULL to reset.
*/
void
purple_http_request_set_keepalive_pool(PurpleHttpRequest *request,
PurpleHttpKeepalivePool *pool);
/**
+ * purple_http_request_get_keepalive_pool:
+ * @request: The request.
+ *
* Gets HTTP KeepAlive connections pool associated with the request.
*
* It doesn't affect pool's reference count.
*
- * @request: The request.
* Returns: The KeepAlive pool, used for the request.
*/
PurpleHttpKeepalivePool *
purple_http_request_get_keepalive_pool(PurpleHttpRequest *request);
/**
- * Sets contents of HTTP request (for example, POST data).
- *
+ * purple_http_request_set_contents:
* @request: The request.
* @contents: The contents.
* @length: The length of contents (-1 if it's a NULL-terminated string)
+ *
+ * Sets contents of HTTP request (for example, POST data).
*/
void purple_http_request_set_contents(PurpleHttpRequest *request,
const gchar *contents, int length);
/**
- * Sets contents reader for HTTP request, used mainly for possible large
- * uploads.
- *
+ * purple_http_request_set_contents_reader:
* @request: The request.
* @reader: The reader callback.
* @contents_size: The size of all contents.
* @user_data: The user data to pass to the callback function.
+ *
+ * Sets contents reader for HTTP request, used mainly for possible large
+ * uploads.
*/
void purple_http_request_set_contents_reader(PurpleHttpRequest *request,
PurpleHttpContentReader reader, int contents_length, gpointer user_data);
/**
- * Set contents writer for HTTP response.
- *
+ * purple_http_request_set_response_writer:
* @request: The request.
* @reader: The writer callback, or NULL to remove existing.
* @user_data: The user data to pass to the callback function.
+ *
+ * Set contents writer for HTTP response.
*/
void purple_http_request_set_response_writer(PurpleHttpRequest *request,
PurpleHttpContentWriter writer, gpointer user_data);
/**
- * Set maximum amount of time, that request is allowed to run.
- *
+ * purple_http_request_set_timeout:
* @request: The request.
* @timeout: Time (in seconds) after that timeout will be cancelled,
* -1 for infinite time.
+ *
+ * Set maximum amount of time, that request is allowed to run.
*/
void purple_http_request_set_timeout(PurpleHttpRequest *request, int timeout);
/**
+ * purple_http_request_get_timeout:
+ * @request: The request.
+ *
* Get maximum amount of time, that request is allowed to run.
*
- * @request: The request.
* Returns: Timeout currently set (-1 for infinite).
*/
int purple_http_request_get_timeout(PurpleHttpRequest *request);
/**
- * Sets maximum amount of redirects.
- *
+ * purple_http_request_set_max_redirects:
* @request: The request.
* @max_redirects: Maximum amount of redirects, or -1 for unlimited.
+ *
+ * Sets maximum amount of redirects.
*/
void purple_http_request_set_max_redirects(PurpleHttpRequest *request,
int max_redirects);
/**
+ * purple_http_request_get_max_redirects:
+ * @request: The request.
+ *
* Gets maximum amount of redirects.
*
- * @request: The request.
* Returns: Current maximum amount of redirects (-1 for unlimited).
*/
int purple_http_request_get_max_redirects(PurpleHttpRequest *request);
/**
- * Sets cookie jar used for the request.
- *
+ * purple_http_request_set_cookie_jar:
* @request: The request.
* @cookie_jar: The cookie jar.
+ *
+ * Sets cookie jar used for the request.
*/
void purple_http_request_set_cookie_jar(PurpleHttpRequest *request,
PurpleHttpCookieJar *cookie_jar);
/**
+ * purple_http_request_get_cookie_jar:
+ * @request: The request.
+ *
* Gets cookie jar used for the request.
*
- * @request: The request.
* Returns: The cookie jar.
*/
PurpleHttpCookieJar * purple_http_request_get_cookie_jar(
PurpleHttpRequest *request);
/**
- * Sets HTTP version to use.
- *
+ * purple_http_request_set_http11:
* @request: The request.
* @http11: TRUE for HTTP/1.1, FALSE for HTTP/1.0.
+ *
+ * Sets HTTP version to use.
*/
void purple_http_request_set_http11(PurpleHttpRequest *request,
gboolean http11);
/**
+ * purple_http_request_is_http11:
+ * @request: The request.
+ *
* Gets used HTTP version.
*
- * @request: The request.
* Returns: TRUE, if we use HTTP/1.1, FALSE for HTTP/1.0.
*/
gboolean purple_http_request_is_http11(PurpleHttpRequest *request);
/**
+ * purple_http_request_set_max_len:
+ * @request: The request.
+ * @max_len: Maximum length of response to read (-1 for the maximum
+ * supported amount).
+ *
* Sets maximum length of response content to read.
*
* Headers length doesn't count here.
*
- * @request: The request.
- * @max_len: Maximum length of response to read (-1 for the maximum
- * supported amount).
*/
void purple_http_request_set_max_len(PurpleHttpRequest *request, int max_len);
/**
+ * purple_http_request_get_max_len:
+ * @request: The request.
+ *
* Gets maximum length of response content to read.
*
- * @request: The request.
* Returns: Maximum length of response to read, or -1 if unlimited.
*/
int purple_http_request_get_max_len(PurpleHttpRequest *request);
/**
- * Sets (replaces, if exists) specified HTTP request header with provided value.
- *
+ * purple_http_request_header_set:
* @request: The request.
* @key: A header to be set.
* @value: A value to set, or NULL to remove specified header.
*
+ * Sets (replaces, if exists) specified HTTP request header with provided value.
+ *
* @see purple_http_request_header_add
*/
void purple_http_request_header_set(PurpleHttpRequest *request,
const gchar *key, const gchar *value);
/**
- * Constructs and sets (replaces, if exists) specified HTTP request header.
- *
+ * purple_http_request_header_set_printf:
* @request: The request.
* @key: A header to be set.
* @format: The format string.
+ *
+ * Constructs and sets (replaces, if exists) specified HTTP request header.
*/
void purple_http_request_header_set_printf(PurpleHttpRequest *request,
const gchar *key, const gchar *format, ...) G_GNUC_PRINTF(3, 4);
/**
- * Adds (without replacing, if exists) an HTTP request header.
- *
+ * purple_http_request_header_add:
* @key: A header to be set.
* @value: A value to set.
*
+ * Adds (without replacing, if exists) an HTTP request header.
+ *
* @see purple_http_request_header_set
*/
void purple_http_request_header_add(PurpleHttpRequest *request,
@@ -677,47 +783,55 @@ void purple_http_request_header_add(PurpleHttpRequest *request,
/*@{*/
/**
+ * purple_http_keepalive_pool_new:
+ *
* Creates a new HTTP Keep-Alive pool.
*/
PurpleHttpKeepalivePool *
purple_http_keepalive_pool_new(void);
/**
- * Increment the reference count.
- *
+ * purple_http_keepalive_pool_ref:
* @pool: The HTTP Keep-Alive pool.
+ *
+ * Increment the reference count.
*/
void
purple_http_keepalive_pool_ref(PurpleHttpKeepalivePool *pool);
/**
+ * purple_http_keepalive_pool_unref:
+ * @pool: The HTTP Keep-Alive pool.
+ *
* Decrement the reference count.
*
* If the reference count reaches zero, the pool will be freed and all
* connections will be closed.
*
- * @pool: The HTTP Keep-Alive pool.
- * Returns: @a pool or %NULL if the reference count reached zero.
+ * Returns: @pool or %NULL if the reference count reached zero.
*/
PurpleHttpKeepalivePool *
purple_http_keepalive_pool_unref(PurpleHttpKeepalivePool *pool);
/**
- * Sets maximum allowed number of connections to specific host-triple (is_ssl +
- * hostname + port).
- *
+ * purple_http_keepalive_pool_set_limit_per_host:
* @pool: The HTTP Keep-Alive pool.
* @limit: The new limit, 0 for unlimited.
+ *
+ * Sets maximum allowed number of connections to specific host-triple (is_ssl +
+ * hostname + port).
*/
void
purple_http_keepalive_pool_set_limit_per_host(PurpleHttpKeepalivePool *pool,
guint limit);
/**
+ * purple_http_keepalive_pool_get_limit_per_host:
+ * @pool: The HTTP Keep-Alive pool.
+ *
* Gets maximum allowed number of connections to specific host-triple (is_ssl +
* hostname + port).
*
- * @pool: The HTTP Keep-Alive pool.
* Returns: The limit.
*/
guint
@@ -750,75 +864,91 @@ purple_http_connection_set_add(PurpleHttpConnectionSet *set,
/*@{*/
/**
+ * purple_http_response_is_successful:
+ * @response: The response.
+ *
* Checks, if HTTP request was performed successfully.
*
- * @response: The response.
* Returns: TRUE, if request was performed successfully.
*/
gboolean purple_http_response_is_successful(PurpleHttpResponse *response);
/**
+ * purple_http_response_get_code:
+ * @response: The response.
+ *
* Gets HTTP response code.
*
- * @response: The response.
* Returns: HTTP response code.
*/
int purple_http_response_get_code(PurpleHttpResponse *response);
/**
+ * purple_http_response_get_error:
+ * @response: The response.
+ *
* Gets error description.
*
- * @response: The response.
* Returns: Localized error description or NULL, if there was no error.
*/
const gchar * purple_http_response_get_error(PurpleHttpResponse *response);
/**
+ * purple_http_response_get_data_len:
+ * @response: The response.
+ *
* Gets HTTP response data length.
*
- * @response: The response.
* Returns: Data length;
*/
gsize purple_http_response_get_data_len(PurpleHttpResponse *response);
/**
+ * purple_http_response_get_data:
+ * @response: The response.
+ * @len: Return address for the size of the data. Can be NULL.
+ *
* Gets HTTP response data.
*
* Response data is not written, if writer callback was set for request.
*
- * @response: The response.
- * @len: Return address for the size of the data. Can be NULL.
* Returns: The data.
*/
const gchar * purple_http_response_get_data(PurpleHttpResponse *response, size_t *len);
/**
+ * purple_http_response_get_all_headers:
+ * @response: The response.
+ *
* Gets all headers got with response.
*
- * @response: The response.
* Returns: GList of PurpleKeyValuePair, which keys are header field
* names (gchar*) and values are its contents (gchar*).
*/
const GList * purple_http_response_get_all_headers(PurpleHttpResponse *response);
/**
- * Gets all headers with specified name got with response.
- *
+ * purple_http_response_get_headers_by_name:
* @response: The response.
* @name: The name of header field.
+ *
+ * Gets all headers with specified name got with response.
+ *
* Returns: GList of header field records contents (gchar*).
*/
const GList * purple_http_response_get_headers_by_name(
PurpleHttpResponse *response, const gchar *name);
/**
+ * purple_http_response_get_header:
+ * @response: The response.
+ * @name: The name of header field.
+ *
* Gets one header contents with specified name got with response.
*
* To get all headers with the same name, use
* purple_http_response_get_headers_by_name instead.
*
- * @response: The response.
- * @name: The name of header field.
* Returns: Header field contents or NULL, if there is no such one.
*/
const gchar * purple_http_response_get_header(PurpleHttpResponse *response,
@@ -833,11 +963,15 @@ const gchar * purple_http_response_get_header(PurpleHttpResponse *response,
/*@{*/
/**
+ * purple_http_init:
+ *
* Initializes the http subsystem.
*/
void purple_http_init(void);
/**
+ * purple_http_uninit:
+ *
* Uninitializes the http subsystem.
*/
void purple_http_uninit(void);
diff --git a/libpurple/idle.h b/libpurple/idle.h
index dd30b396f6..a8366984e9 100644
--- a/libpurple/idle.h
+++ b/libpurple/idle.h
@@ -29,6 +29,8 @@
#include <time.h>
/**
+ * PurpleIdleUiOps:
+ *
* Idle UI operations.
*/
typedef struct
@@ -50,6 +52,8 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_idle_touch:
+ *
* Touch our idle tracker. This signifies that the user is
* 'active'. The conversation code calls this when the
* user sends an IM, for example.
@@ -57,6 +61,8 @@ G_BEGIN_DECLS
void purple_idle_touch(void);
/**
+ * purple_idle_set:
+ *
* Fake our idle time by setting the time at which our
* accounts purportedly became idle. This is used by
* the I'dle Mak'er plugin.
@@ -71,13 +77,16 @@ void purple_idle_set(time_t time);
/*@{*/
/**
- * Sets the UI operations structure to be used for idle reporting.
- *
+ * purple_idle_set_ui_ops:
* @ops: The UI operations structure.
+ *
+ * Sets the UI operations structure to be used for idle reporting.
*/
void purple_idle_set_ui_ops(PurpleIdleUiOps *ops);
/**
+ * purple_idle_get_ui_ops:
+ *
* Returns the UI operations structure used for idle reporting.
*
* Returns: The UI operations structure in use.
@@ -85,11 +94,15 @@ void purple_idle_set_ui_ops(PurpleIdleUiOps *ops);
PurpleIdleUiOps *purple_idle_get_ui_ops(void);
/**
+ * purple_idle_init:
+ *
* Initializes the idle system.
*/
void purple_idle_init(void);
/**
+ * purple_idle_uninit:
+ *
* Uninitializes the idle system.
*/
void purple_idle_uninit(void);
diff --git a/libpurple/imgstore.h b/libpurple/imgstore.h
index 0b7318ff20..cd6f03434b 100644
--- a/libpurple/imgstore.h
+++ b/libpurple/imgstore.h
@@ -33,8 +33,11 @@
#define PURPLE_STORED_IMAGE_PROTOCOL "purple-image:"
#define PURPLE_STOCK_IMAGE_PROTOCOL "purple-stock-image:"
-/** A reference-counted immutable wrapper around an image's data and its
- * filename.
+/**
+ * PurpleStoredImage:
+ *
+ * A reference-counted immutable wrapper around an image's data and its
+ * filename.
*/
typedef struct _PurpleStoredImage PurpleStoredImage;
@@ -43,6 +46,8 @@ typedef struct _PurpleStoredImage PurpleStoredImage;
G_BEGIN_DECLS
/**
+ * purple_imgstore_get_type:
+ *
* Returns the GType for the PurpleStoredImage boxed structure.
* TODO Boxing of PurpleStoredImage is a temporary solution to having a GType
* for stored images. This should rather be a GObject instead of a GBoxed.
@@ -50,15 +55,7 @@ G_BEGIN_DECLS
GType purple_imgstore_get_type(void);
/**
- * Create a new PurpleStoredImage.
- *
- * The image is not added to the image store and no ID is assigned. If you
- * need to reference the image by an ID, use purple_imgstore_new_with_id()
- * instead.
- *
- * The caller owns a reference to this image and must dereference it with
- * purple_imgstore_unref() for it to be freed.
- *
+ * purple_imgstore_new:
* @data: Pointer to the image data, which the imgstore will take
* ownership of and free as appropriate. If you want a
* copy of the data, make it before calling this function.
@@ -72,6 +69,15 @@ GType purple_imgstore_get_type(void);
* disk, make sure the filename is appropriately escaped.
* You may wish to use purple_escape_filename().
*
+ * Create a new PurpleStoredImage.
+ *
+ * The image is not added to the image store and no ID is assigned. If you
+ * need to reference the image by an ID, use purple_imgstore_new_with_id()
+ * instead.
+ *
+ * The caller owns a reference to this image and must dereference it with
+ * purple_imgstore_unref() for it to be freed.
+ *
* Returns: The image, or NULL if the image could not be created (because of
* empty data or size).
*/
@@ -79,6 +85,9 @@ PurpleStoredImage *
purple_imgstore_new(gpointer data, size_t size, const char *filename);
/**
+ * purple_imgstore_new_from_file:
+ * @path: The path to the image.
+ *
* Create a PurpleStoredImage using purple_imgstore_new() by reading the
* given filename from disk.
*
@@ -93,8 +102,6 @@ purple_imgstore_new(gpointer data, size_t size, const char *filename);
* The caller owns a reference to this image and must dereference it with
* purple_imgstore_unref() for it to be freed.
*
- * @path: The path to the image.
- *
* Returns: The image, or NULL if the image could not be created (because of
* empty data or size).
*/
@@ -102,13 +109,7 @@ PurpleStoredImage *
purple_imgstore_new_from_file(const char *path);
/**
- * Create a PurpleStoredImage using purple_imgstore_new() and add the
- * image to the image store. A unique ID will be assigned to the image.
- *
- * The caller owns a reference to the image and must dereference it with
- * purple_imgstore_unref() or purple_imgstore_unref_by_id() for it to be
- * freed.
- *
+ * purple_imgstore_new_with_id:
* @data: Pointer to the image data, which the imgstore will take
* ownership of and free as appropriate. If you want a
* copy of the data, make it before calling this function.
@@ -122,6 +123,13 @@ purple_imgstore_new_from_file(const char *path);
* disk, make sure the filename is appropriately escaped.
* You may wish to use purple_escape_filename()
*
+ * Create a PurpleStoredImage using purple_imgstore_new() and add the
+ * image to the image store. A unique ID will be assigned to the image.
+ *
+ * The caller owns a reference to the image and must dereference it with
+ * purple_imgstore_unref() or purple_imgstore_unref_by_id() for it to be
+ * freed.
+ *
* Returns: ID for the image. This is a unique number that can be used
* within libpurple to reference the image. 0 is returned if the
* image could not be created (because of empty data or size).
@@ -129,104 +137,115 @@ purple_imgstore_new_from_file(const char *path);
int purple_imgstore_new_with_id(gpointer data, size_t size, const char *filename);
/**
+ * purple_imgstore_find_by_id:
+ * @id: The ID for the image.
+ *
* Retrieve an image from the store. The caller does not own a
* reference to the image.
*
- * @id: The ID for the image.
- *
* Returns: A pointer to the requested image, or NULL if it was not found.
*/
PurpleStoredImage *purple_imgstore_find_by_id(int id);
/**
- * Retrieves a pointer to the image's data.
- *
+ * purple_imgstore_get_data:
* @img: The Image.
*
+ * Retrieves a pointer to the image's data.
+ *
* Returns: A pointer to the data, which must not
* be freed or modified.
*/
gconstpointer purple_imgstore_get_data(PurpleStoredImage *img);
/**
- * Retrieves the length of the image's data.
- *
+ * purple_imgstore_get_size:
* @img: The Image.
*
+ * Retrieves the length of the image's data.
+ *
* Returns: The size of the data that the pointer returned by
* purple_imgstore_get_data points to.
*/
size_t purple_imgstore_get_size(PurpleStoredImage *img);
/**
+ * purple_imgstore_get_filename:
+ * @img: The image.
+ *
* Retrieves a pointer to the image's filename. If you intend to use this
* filename to write the file to disk, make sure the filename was
* appropriately escaped when you created the PurpleStoredImage. You may
* wish to use purple_escape_filename().
*
- * @img: The image.
- *
* Returns: A pointer to the filename, which must not
* be freed or modified.
*/
const char *purple_imgstore_get_filename(const PurpleStoredImage *img);
/**
+ * purple_imgstore_get_extension:
+ * @img: The image.
+ *
* Looks at the magic numbers of the image data (the first few bytes)
* and returns an extension corresponding to the image's file type.
*
- * @img: The image.
- *
* Returns: The image's extension (for example "png") or "icon"
* if unknown.
*/
const char *purple_imgstore_get_extension(PurpleStoredImage *img);
/**
- * Increment the reference count.
- *
+ * purple_imgstore_ref:
* @img: The image.
*
- * Returns: @a img
+ * Increment the reference count.
+ *
+ * Returns: @img
*/
PurpleStoredImage *
purple_imgstore_ref(PurpleStoredImage *img);
/**
+ * purple_imgstore_unref:
+ * @img: The image.
+ *
* Decrement the reference count.
*
* If the reference count reaches zero, the image will be freed.
*
- * @img: The image.
- *
- * Returns: @a img or %NULL if the reference count reached zero.
+ * Returns: @img or %NULL if the reference count reached zero.
*/
PurpleStoredImage *
purple_imgstore_unref(PurpleStoredImage *img);
/**
+ * purple_imgstore_ref_by_id:
+ * @id: The ID for the image.
+ *
* Increment the reference count using an ID.
*
* This is a convience wrapper for purple_imgstore_find_by_id() and
* purple_imgstore_ref(), so if you have a PurpleStoredImage, it'll
* be more efficient to call purple_imgstore_ref() directly.
- *
- * @id: The ID for the image.
*/
void purple_imgstore_ref_by_id(int id);
/**
+ * purple_imgstore_unref_by_id:
+ * @id: The ID for the image.
+ *
* Decrement the reference count using an ID.
*
* This is a convience wrapper for purple_imgstore_find_by_id() and
* purple_imgstore_unref(), so if you have a PurpleStoredImage, it'll
* be more efficient to call purple_imgstore_unref() directly.
- *
- * @id: The ID for the image.
*/
void purple_imgstore_unref_by_id(int id);
/**
+ * purple_imgstore_get_handle:
+ *
* Returns the image store subsystem handle.
*
* Returns: The subsystem handle.
@@ -234,11 +253,15 @@ void purple_imgstore_unref_by_id(int id);
void *purple_imgstore_get_handle(void);
/**
+ * purple_imgstore_init:
+ *
* Initializes the image store subsystem.
*/
void purple_imgstore_init(void);
/**
+ * purple_imgstore_uninit:
+ *
* Uninitializes the image store subsystem.
*/
void purple_imgstore_uninit(void);
diff --git a/libpurple/internal.h b/libpurple/internal.h
index c5bc88df61..a18563eaf6 100644
--- a/libpurple/internal.h
+++ b/libpurple/internal.h
@@ -161,28 +161,32 @@
#include "connection.h"
/**
- * Sets an error for an account.
- *
+ * _purple_account_set_current_error:
* @account: The account to set the error for.
* @new_err: The #PurpleConnectionErrorInfo instance representing the
* error.
+ *
+ * Sets an error for an account.
*/
void _purple_account_set_current_error(PurpleAccount *account,
PurpleConnectionErrorInfo *new_err);
/**
+ * _purple_account_to_xmlnode:
+ * @account: The account
+ *
* Get an XML description of an account.
*
- * @account: The account
* Returns: The XML description of the account.
*/
PurpleXmlNode *_purple_account_to_xmlnode(PurpleAccount *account);
/**
- * Returns the last child of a particular node.
- *
+ * _purple_blist_get_last_child:
* @node: The node whose last child is to be retrieved.
*
+ * Returns the last child of a particular node.
+ *
* Returns: The last child of the node.
*/
PurpleBlistNode *_purple_blist_get_last_child(PurpleBlistNode *node);
@@ -198,6 +202,12 @@ void
_purple_buddy_icons_blist_loaded_cb(void);
/**
+ * _purple_connection_new:
+ * @account: The account the connection should be connecting to.
+ * @regist: Whether we are registering a new account or just
+ * trying to do a normal signon.
+ * @password: The password to use.
+ *
* Creates a connection to the specified account and either connects
* or attempts to register a new account. If you are logging in,
* the connection uses the current active status for this account.
@@ -208,77 +218,79 @@ _purple_buddy_icons_blist_loaded_cb(void);
* Note: This function should only be called by purple_account_connect()
* in account.c. If you're trying to sign on an account, use that
* function instead.
- *
- * @account: The account the connection should be connecting to.
- * @regist: Whether we are registering a new account or just
- * trying to do a normal signon.
- * @password: The password to use.
*/
void _purple_connection_new(PurpleAccount *account, gboolean regist,
const char *password);
/**
+ * _purple_connection_new_unregister:
+ * @account: The account to unregister
+ * @password: The password to use.
+ * @cb: Optional callback to be called when unregistration is complete
+ * @user_data: user data to pass to the callback
+ *
* Tries to unregister the account on the server. If the account is not
* connected, also creates a new connection.
*
* Note: This function should only be called by purple_account_unregister()
* in account.c.
- *
- * @account: The account to unregister
- * @password: The password to use.
- * @cb: Optional callback to be called when unregistration is complete
- * @user_data: user data to pass to the callback
*/
void _purple_connection_new_unregister(PurpleAccount *account, const char *password,
PurpleAccountUnregistrationCb cb, void *user_data);
/**
+ * _purple_connection_wants_to_die:
+ * @gc: The connection to check
+ *
* Checks if a connection is disconnecting, and should not attempt to reconnect.
*
* Note: This function should only be called by purple_account_set_enabled()
* in account.c.
- *
- * @gc: The connection to check
*/
gboolean _purple_connection_wants_to_die(const PurpleConnection *gc);
/**
+ * _purple_connection_add_active_chat:
+ * @gc: The connection
+ * @chat: The chat conversation to add
+ *
* Adds a chat to the active chats list of a connection
*
* Note: This function should only be called by serv_got_joined_chat()
* in server.c.
- *
- * @gc: The connection
- * @chat: The chat conversation to add
*/
void _purple_connection_add_active_chat(PurpleConnection *gc,
PurpleChatConversation *chat);
/**
+ * _purple_connection_remove_active_chat:
+ * @gc: The connection
+ * @chat: The chat conversation to remove
+ *
* Removes a chat from the active chats list of a connection
*
* Note: This function should only be called by serv_got_chat_left()
* in server.c.
- *
- * @gc: The connection
- * @chat: The chat conversation to remove
*/
void _purple_connection_remove_active_chat(PurpleConnection *gc,
PurpleChatConversation *chat);
/**
+ * _purple_conversations_update_cache:
+ * @conv: The conversation.
+ * @name: The new name. If no change, use %NULL.
+ * @account: The new account. If no change, use %NULL.
+ *
* Updates the conversation cache to use a new conversation name and/or
* account. This function only updates the conversation cache. It is the
* caller's responsibility to actually update the conversation.
*
* Note: This function should only be called by purple_conversation_set_name()
* and purple_conversation_set_account() in conversation.c.
- *
- * @conv: The conversation.
- * @name: The new name. If no change, use %NULL.
- * @account: The new account. If no change, use %NULL.
*/
void _purple_conversations_update_cache(PurpleConversation *conv,
const char *name, PurpleAccount *account);
/**
+ * _purple_statuses_get_primitive_scores:
+ *
* Returns the primitive scores array from status.c.
*
* Note: This function should only be called by
diff --git a/libpurple/keyring.h b/libpurple/keyring.h
index 5708717794..8346c1d8d2 100644
--- a/libpurple/keyring.h
+++ b/libpurple/keyring.h
@@ -33,11 +33,15 @@
#define PURPLE_TYPE_KEYRING (purple_keyring_get_type())
/**
+ * PURPLE_DEFAULT_KEYRING:
+ *
* Default keyring ID.
*/
#define PURPLE_DEFAULT_KEYRING "keyring-internal"
/**
+ * PURPLE_KEYRING_ERROR:
+ *
* Keyring subsystem error domain.
*/
#define PURPLE_KEYRING_ERROR purple_keyring_error_domain()
@@ -57,43 +61,47 @@ typedef struct _PurpleKeyring PurpleKeyring;
/*@{*/
/**
- * Callback for once a password is read.
- *
- * If there was a problem, the password will be NULL, and the error set.
- *
+ * PurpleKeyringReadCallback:
* @account: The account.
* @password: The password.
* @error: Error that may have occurred.
* @data: Data passed to the callback.
+ *
+ * Callback for once a password is read.
+ *
+ * If there was a problem, the password will be NULL, and the error set.
*/
typedef void (*PurpleKeyringReadCallback)(PurpleAccount *account,
const gchar *password, GError *error, gpointer data);
/**
- * Callback for once a password has been stored.
- *
- * If there was a problem, the error will be set.
- *
+ * PurpleKeyringSaveCallback:
* @account: The account.
* @error: Error that may have occurred.
* @data: Data passed to the callback.
+ *
+ * Callback for once a password has been stored.
+ *
+ * If there was a problem, the error will be set.
*/
typedef void (*PurpleKeyringSaveCallback)(PurpleAccount *account, GError *error,
gpointer data);
/**
- * Callback for once the master password for a keyring has been changed.
- *
+ * PurpleKeyringChangeMasterCallback:
* @error: Error that has occurred.
* @data: Data passed to the callback.
+ *
+ * Callback for once the master password for a keyring has been changed.
*/
typedef void (*PurpleKeyringChangeMasterCallback)(GError *error, gpointer data);
/**
- * Callback for when we change the keyring.
- *
+ * PurpleKeyringSetInUseCallback:
* @error: An error that might have occurred.
* @data: A pointer to user supplied data.
+ *
+ * Callback for when we change the keyring.
*/
typedef void (*PurpleKeyringSetInUseCallback)(GError *error, gpointer data);
@@ -105,28 +113,32 @@ typedef void (*PurpleKeyringSetInUseCallback)(GError *error, gpointer data);
/*@{*/
/**
- * Read the password for an account.
- *
+ * PurpleKeyringRead:
* @account: The account.
* @cb: A callback for once the password is found.
* @data: Data to be passed to the callback.
+ *
+ * Read the password for an account.
*/
typedef void (*PurpleKeyringRead)(PurpleAccount *account,
PurpleKeyringReadCallback cb, gpointer data);
/**
- * Store a password in the keyring.
- *
+ * PurpleKeyringSave:
* @account: The account.
* @password: The password to be stored. If the password is NULL, this
* means that the keyring should forget about that password.
* @cb: A callback for once the password is saved.
* @data: Data to be passed to the callback.
+ *
+ * Store a password in the keyring.
*/
typedef void (*PurpleKeyringSave)(PurpleAccount *account, const gchar *password,
PurpleKeyringSaveCallback cb, gpointer data);
/**
+ * PurpleKeyringCancelRequests:
+ *
* Cancel all running requests.
*
* After calling that, all queued requests should run their callbacks (most
@@ -135,6 +147,8 @@ typedef void (*PurpleKeyringSave)(PurpleAccount *account, const gchar *password,
typedef void (*PurpleKeyringCancelRequests)(void);
/**
+ * PurpleKeyringClose:
+ *
* Close the keyring.
*
* This will be called so the keyring can do any cleanup it needs.
@@ -142,23 +156,23 @@ typedef void (*PurpleKeyringCancelRequests)(void);
typedef void (*PurpleKeyringClose)(void);
/**
+ * PurpleKeyringImportPassword:
+ * @account: The account.
+ * @mode: A keyring specific option that was stored. Can be NULL.
+ * @data: Data that was stored. Can be NULL.
+ *
* Import serialized (and maybe encrypted) password.
*
* This is not async because it is not meant to prompt for a master password and
* decrypt passwords.
*
- * @account: The account.
- * @mode: A keyring specific option that was stored. Can be NULL.
- * @data: Data that was stored. Can be NULL.
- *
* Returns: TRUE on success, FALSE on failure.
*/
typedef gboolean (*PurpleKeyringImportPassword)(PurpleAccount *account,
const gchar *mode, const gchar *data, GError **error);
/**
- * Export serialized (and maybe encrypted) password.
- *
+ * PurpleKeyringExportPassword:
* @account: The account.
* @mode: An option field that can be used by the plugin. This is
* expected to be a static string.
@@ -167,6 +181,8 @@ typedef gboolean (*PurpleKeyringImportPassword)(PurpleAccount *account,
* @error: Will be set if a problem occured.
* @destroy: A function to be called, if non NULL, to free data.
*
+ * Export serialized (and maybe encrypted) password.
+ *
* Returns: TRUE on success, FALSE on failure.
*/
typedef gboolean (*PurpleKeyringExportPassword)(PurpleAccount *account,
@@ -174,6 +190,8 @@ typedef gboolean (*PurpleKeyringExportPassword)(PurpleAccount *account,
GDestroyNotify *destroy);
/**
+ * PurpleKeyringReadSettings:
+ *
* Read keyring settings.
*
* Returns: New copy of current settings (must be free'd with
@@ -182,11 +200,13 @@ typedef gboolean (*PurpleKeyringExportPassword)(PurpleAccount *account,
typedef PurpleRequestFields * (*PurpleKeyringReadSettings)(void);
/**
- * Applies modified keyring settings.
- *
+ * PurpleKeyringApplySettings:
* @notify_handle: A handle that can be passed to purple_notify_message.
* @fields: Modified settings (originally taken from
* PurpleKeyringReadSettings).
+ *
+ * Applies modified keyring settings.
+ *
* Returns: TRUE, if succeeded, FALSE otherwise.
*/
typedef gboolean (*PurpleKeyringApplySettings)(void *notify_handle,
@@ -202,59 +222,67 @@ G_BEGIN_DECLS
/*@{*/
/**
- * Find a keyring by an id.
- *
+ * purple_keyring_find_keyring_by_id:
* @id: The id for the keyring.
*
+ * Find a keyring by an id.
+ *
* Returns: The keyring, or NULL if not found.
*/
PurpleKeyring *
purple_keyring_find_keyring_by_id(const gchar *id);
/**
+ * purple_keyring_get_inuse:
+ *
* Get the keyring being used.
*/
PurpleKeyring *
purple_keyring_get_inuse(void);
/**
+ * purple_keyring_set_inuse:
+ * @newkeyring: The new keyring to use.
+ * @force: FALSE if the change can be cancelled. If this is TRUE and
+ * an error occurs, data might be lost.
+ * @cb: A callback for once the change is complete.
+ * @data: Data to be passed to the callback.
+ *
* Set the keyring to use. This function will move all passwords from
* the old keyring to the new one.
*
* If it fails, it will cancel all changes, close the new keyring, and notify
* the callback. If it succeeds, it will remove all passwords from the old safe
* and close that safe.
- *
- * @newkeyring: The new keyring to use.
- * @force: FALSE if the change can be cancelled. If this is TRUE and
- * an error occurs, data might be lost.
- * @cb: A callback for once the change is complete.
- * @data: Data to be passed to the callback.
*/
void
purple_keyring_set_inuse(PurpleKeyring *newkeyring, gboolean force,
PurpleKeyringSetInUseCallback cb, gpointer data);
/**
- * Register a keyring plugin.
- *
+ * purple_keyring_register:
* @keyring: The keyring to register.
+ *
+ * Register a keyring plugin.
*/
void
purple_keyring_register(PurpleKeyring *keyring);
/**
+ * purple_keyring_unregister:
+ * @keyring: The keyring to unregister.
+ *
* Unregister a keyring plugin.
*
* In case the keyring is in use, passwords will be moved to a fallback safe,
* and the keyring to unregister will be properly closed.
- *
- * @keyring: The keyring to unregister.
*/
void
purple_keyring_unregister(PurpleKeyring *keyring);
/**
+ * purple_keyring_get_options:
+ *
* Returns a GList containing the IDs and names of the registered
* keyrings.
*
@@ -271,15 +299,16 @@ purple_keyring_get_options(void);
/*@{*/
/**
- * Import serialized (and maybe encrypted) password into current keyring.
- *
- * It's used by account.c while reading a password from xml.
- *
+ * purple_keyring_import_password:
* @account: The account.
* @keyring_id: The plugin ID that was stored in the xml file. Can be NULL.
* @mode: A keyring specific option that was stored. Can be NULL.
* @data: Data that was stored, can be NULL.
*
+ * Import serialized (and maybe encrypted) password into current keyring.
+ *
+ * It's used by account.c while reading a password from xml.
+ *
* Returns: TRUE if the input was accepted, FALSE otherwise.
*/
gboolean
@@ -287,10 +316,7 @@ purple_keyring_import_password(PurpleAccount *account, const gchar *keyring_id,
const gchar *mode, const gchar *data, GError **error);
/**
- * Export serialized (and maybe encrypted) password out of current keyring.
- *
- * It's used by account.c while syncing accounts to xml.
- *
+ * purple_keyring_export_password:
* @account: The account for which we want the info.
* @keyring_id: The plugin id to be stored in the XML node. This will be
* NULL or a string that can be considered static.
@@ -302,6 +328,10 @@ purple_keyring_import_password(PurpleAccount *account, const gchar *keyring_id,
* @error: Will be set if a problem occured.
* @destroy: A function to be called, if non NULL, to free data.
*
+ * Export serialized (and maybe encrypted) password out of current keyring.
+ *
+ * It's used by account.c while syncing accounts to xml.
+ *
* Returns: TRUE if the info was exported successfully, FALSE otherwise.
*/
gboolean
@@ -310,29 +340,33 @@ purple_keyring_export_password(PurpleAccount *account, const gchar **keyring_id,
GDestroyNotify *destroy);
/**
- * Read a password from the current keyring.
- *
+ * purple_keyring_get_password:
* @account: The account.
* @cb: A callback for once the password is read.
* @data: Data passed to the callback.
+ *
+ * Read a password from the current keyring.
*/
void
purple_keyring_get_password(PurpleAccount *account,
PurpleKeyringReadCallback cb, gpointer data);
/**
- * Save a password to the current keyring.
- *
+ * purple_keyring_set_password:
* @account: The account.
* @password: The password to save.
* @cb: A callback for once the password is saved.
* @data: Data to be passed to the callback.
+ *
+ * Save a password to the current keyring.
*/
void
purple_keyring_set_password(PurpleAccount *account, const gchar *password,
PurpleKeyringSaveCallback cb, gpointer data);
/**
+ * purple_keyring_read_settings:
+ *
* Reads settings from current keyring.
*
* Returns: New copy of current settings (must be free'd with
@@ -342,11 +376,13 @@ PurpleRequestFields *
purple_keyring_read_settings(void);
/**
- * Applies modified settings to current keyring.
- *
+ * purple_keyring_apply_settings:
* @notify_handle: A handle that can be passed to purple_notify_message.
* @fields: Modified settings (originally taken from
* PurpleKeyringReadSettings).
+ *
+ * Applies modified settings to current keyring.
+ *
* Returns: TRUE, if succeeded, FALSE otherwise.
*/
gboolean
@@ -360,37 +396,46 @@ purple_keyring_apply_settings(void *notify_handle, PurpleRequestFields *fields);
/*@{*/
/**
+ * purple_keyring_get_type:
+ *
* Returns the GType for the PurpleKeyring boxed structure.
*/
GType purple_keyring_get_type(void);
/**
+ * purple_keyring_new:
+ *
* Creates a new keyring wrapper.
*/
PurpleKeyring *
purple_keyring_new(void);
/**
- * Frees all data allocated with purple_keyring_new.
- *
+ * purple_keyring_free:
* @keyring: Keyring wrapper struct.
+ *
+ * Frees all data allocated with purple_keyring_new.
*/
void
purple_keyring_free(PurpleKeyring *keyring);
/**
+ * purple_keyring_get_name:
+ * @keyring: The keyring.
+ *
* Gets friendly user name.
*
- * @keyring: The keyring.
* Returns: Friendly user name.
*/
const gchar *
purple_keyring_get_name(const PurpleKeyring *keyring);
/**
+ * purple_keyring_get_id:
+ * @keyring: The keyring.
+ *
* Gets keyring ID.
*
- * @keyring: The keyring.
* Returns: Keyring ID.
*/
const gchar *
@@ -421,46 +466,50 @@ PurpleKeyringApplySettings
purple_keyring_get_apply_settings(const PurpleKeyring *keyring);
/**
+ * purple_keyring_set_name:
+ * @keyring: The keyring.
+ * @name: Friendly user name.
+ *
* Sets friendly user name.
*
* This field is required.
- *
- * @keyring: The keyring.
- * @name: Friendly user name.
*/
void
purple_keyring_set_name(PurpleKeyring *keyring, const gchar *name);
/**
+ * purple_keyring_set_id:
+ * @keyring: The keyring.
+ * @name: Keyring ID.
+ *
* Sets keyring ID.
*
* This field is required.
- *
- * @keyring: The keyring.
- * @name: Keyring ID.
*/
void
purple_keyring_set_id(PurpleKeyring *keyring, const gchar *id);
/**
+ * purple_keyring_set_read_password:
+ * @keyring: The keyring.
+ * @read_cb: Read password method.
+ *
* Sets read password method.
*
* This field is required.
- *
- * @keyring: The keyring.
- * @read_cb: Read password method.
*/
void
purple_keyring_set_read_password(PurpleKeyring *keyring,
PurpleKeyringRead read_cb);
/**
+ * purple_keyring_set_save_password:
+ * @keyring: The keyring.
+ * @save_cb: Save password method.
+ *
* Sets save password method.
*
* This field is required.
- *
- * @keyring: The keyring.
- * @save_cb: Save password method.
*/
void
purple_keyring_set_save_password(PurpleKeyring *keyring,
@@ -498,6 +547,8 @@ PurpleKeyringApplySettings apply_settings);
/*@{*/
/**
+ * purple_keyring_error_domain:
+ *
* Gets keyring subsystem error domain.
*
* Returns: keyring subsystem error domain.
@@ -506,19 +557,31 @@ GQuark
purple_keyring_error_domain(void);
/**
+ * PurpleKeyringError:
+ * @PURPLE_KEYRING_ERROR_UNKNOWN: Unknown error.
+ * @PURPLE_KEYRING_ERROR_NOKEYRING: No keyring configured.
+ * @PURPLE_KEYRING_ERROR_INTERNAL: Internal keyring system error.
+ * @PURPLE_KEYRING_ERROR_BACKENDFAIL: Failed to communicate with the backend
+ * or internal backend error.
+ * @PURPLE_KEYRING_ERROR_NOPASSWORD: No password stored for the specified
+ * account.
+ * @PURPLE_KEYRING_ERROR_ACCESSDENIED: Access denied for the specified keyring
+ * or entry.
+ * @PURPLE_KEYRING_ERROR_CANCELLED: Operation was cancelled.
+ *
* Error codes for keyring subsystem.
*/
enum PurpleKeyringError
{
- PURPLE_KEYRING_ERROR_UNKNOWN = 0, /**< Unknown error. */
+ PURPLE_KEYRING_ERROR_UNKNOWN = 0,
- PURPLE_KEYRING_ERROR_NOKEYRING = 10, /**< No keyring configured. */
- PURPLE_KEYRING_ERROR_INTERNAL, /**< Internal keyring system error. */
- PURPLE_KEYRING_ERROR_BACKENDFAIL, /**< Failed to communicate with the backend or internal backend error. */
+ PURPLE_KEYRING_ERROR_NOKEYRING = 10,
+ PURPLE_KEYRING_ERROR_INTERNAL,
+ PURPLE_KEYRING_ERROR_BACKENDFAIL,
- PURPLE_KEYRING_ERROR_NOPASSWORD = 20, /**< No password stored for the specified account. */
- PURPLE_KEYRING_ERROR_ACCESSDENIED, /**< Access denied for the specified keyring or entry. */
- PURPLE_KEYRING_ERROR_CANCELLED /**< Operation was cancelled. */
+ PURPLE_KEYRING_ERROR_NOPASSWORD = 20,
+ PURPLE_KEYRING_ERROR_ACCESSDENIED,
+ PURPLE_KEYRING_ERROR_CANCELLED
};
/*}@*/
@@ -529,18 +592,24 @@ enum PurpleKeyringError
/*@{*/
/**
+ * purple_keyring_init:
+ *
* Initializes the keyring subsystem.
*/
void
purple_keyring_init(void);
/**
+ * purple_keyring_uninit:
+ *
* Uninitializes the keyring subsystem.
*/
void
purple_keyring_uninit(void);
/**
+ * purple_keyring_get_handle:
+ *
* Returns the keyring subsystem handle.
*
* Returns: The keyring subsystem handle.
diff --git a/libpurple/log.h b/libpurple/log.h
index 5b2c617463..19f0607257 100644
--- a/libpurple/log.h
+++ b/libpurple/log.h
@@ -51,11 +51,13 @@ typedef enum {
} PurpleLogReadFlags;
#include "account.h"
-#include "conversation.h"
+#include "conversations.h"
typedef void (*PurpleLogSetCallback) (GHashTable *sets, PurpleLogSet *set);
/**
+ * PurpleLogLogger:
+ *
* A log logger.
*
* This struct gets filled out and is included in the PurpleLog. It contains everything
@@ -104,7 +106,7 @@ struct _PurpleLogLogger {
* need to implement this function.
*
* Loggers which implement this function must create a PurpleLogSet,
- * then call @a cb with @a sets and the newly created PurpleLogSet. */
+ * then call @cb with @sets and the newly created PurpleLogSet. */
void (*get_log_sets)(PurpleLogSetCallback cb, GHashTable *sets);
/* Attempts to delete the specified log, indicating success or failure */
@@ -121,32 +123,40 @@ struct _PurpleLogLogger {
};
/**
+ * PurpleLog:
+ * @type: The type of log this is
+ * @name: The name of this log
+ * @account: The account this log is taking place on
+ * @conv: The conversation being logged
+ * @time: The time this conversation started, converted to the local
+ * timezone
+ * @logger: The logging mechanism this log is to use
+ * @logger_data: Data used by the log logger
+ * @tm: The time this conversation started, saved with original
+ * timezone data, if available and if struct tm has the BSD
+ * timezone fields, else %NULL. Do NOT modify anything in this
+ * struct.
+ *
* A log. Not the wooden type.
*/
struct _PurpleLog {
- PurpleLogType type; /**< The type of log this is */
- char *name; /**< The name of this log */
- PurpleAccount *account; /**< The account this log is taking
- place on */
- PurpleConversation *conv; /**< The conversation being logged */
- time_t time; /**< The time this conversation
- started, converted to the local timezone */
-
- PurpleLogLogger *logger; /**< The logging mechanism this log
- is to use */
- void *logger_data; /**< Data used by the log logger */
- struct tm *tm; /**< The time this conversation
- started, saved with original
- timezone data, if available and
- if struct tm has the BSD
- timezone fields, else %NULL.
- Do NOT modify anything in this struct.*/
+ PurpleLogType type;
+ char *name;
+ PurpleAccount *account;
+ PurpleConversation *conv;
+ time_t time;
+
+ PurpleLogLogger *logger;
+ void *logger_data;
+ struct tm *tm;
/* IMPORTANT: Some code in log.c allocates these without zeroing them.
* IMPORTANT: Update that code if you add members here. */
};
/**
+ * PurpleLogCommonLoggerData:
+ *
* A common logger_data struct containing a file handle and path, as well
* as a pointer to something else for additional data.
*/
@@ -157,27 +167,28 @@ struct _PurpleLogCommonLoggerData {
};
/**
+ * PurpleLogSet:
+ * @type: The type of logs available
+ * @name: The name of the logs available
+ * @account: The account the available logs took place on. This will be
+ * %NULL if the account no longer exists. (Depending on a
+ * logger's implementation of list, it may not be possible to
+ * load such logs.)
+ * @buddy: Is this (account, name) a buddy on the buddy list?
+ * @normalized_name: The normalized version of @name. It must be set, and may
+ * be set to the same pointer value as @name.
+ *
* Describes available logs.
*
* By passing the elements of this struct to purple_log_get_logs(), the caller
* can get all available PurpleLogs.
*/
struct _PurpleLogSet {
- PurpleLogType type; /**< The type of logs available */
- char *name; /**< The name of the logs available */
- PurpleAccount *account; /**< The account the available logs
- took place on. This will be
- %NULL if the account no longer
- exists. (Depending on a
- logger's implementation of
- list, it may not be possible
- to load such logs.) */
- gboolean buddy; /**< Is this (account, name) a buddy
- on the buddy list? */
- char *normalized_name; /**< The normalized version of
- @a name. It must be set, and
- may be set to the same pointer
- value as @a name. */
+ PurpleLogType type;
+ char *name;
+ PurpleAccount *account;
+ gboolean buddy;
+ char *normalized_name;
/* IMPORTANT: Some code in log.c allocates these without zeroing them.
* IMPORTANT: Update that code if you add members here. */
@@ -191,6 +202,8 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_log_get_type:
+ *
* Returns the GType for the PurpleLog boxed structure.
* TODO Boxing of PurpleLog is a temporary solution to having a GType for
* logs. This should rather be a GObject instead of a GBoxed.
@@ -198,8 +211,7 @@ G_BEGIN_DECLS
GType purple_log_get_type(void);
/**
- * Creates a new log
- *
+ * purple_log_new:
* @type: The type of log this is.
* @name: The name of this conversation (buddy name, chat name,
* etc.)
@@ -208,27 +220,32 @@ GType purple_log_get_type(void);
* @time: The time this conversation started
* @tm: The time this conversation started, with timezone data,
* if available and if struct tm has the BSD timezone fields.
+ *
+ * Creates a new log
+ *
* Returns: The new log
*/
PurpleLog *purple_log_new(PurpleLogType type, const char *name, PurpleAccount *account,
PurpleConversation *conv, time_t time, const struct tm *tm);
/**
- * Frees a log
- *
+ * purple_log_free:
* @log: The log to destroy
+ *
+ * Frees a log
*/
void purple_log_free(PurpleLog *log);
/**
- * Writes to a log file. Assumes you have checked preferences already.
- *
+ * purple_log_write:
* @log: The log to write to
* @type: The type of message being logged
* @from: Whom this message is coming from, or %NULL for
* system messages
* @time: A timestamp in UNIX time
* @message: The message to log
+ *
+ * Writes to a log file. Assumes you have checked preferences already.
*/
void purple_log_write(PurpleLog *log,
PurpleMessageFlags type,
@@ -237,26 +254,31 @@ void purple_log_write(PurpleLog *log,
const char *message);
/**
- * Reads from a log
- *
+ * purple_log_read:
* @log: The log to read from
* @flags: The returned logging flags.
*
+ * Reads from a log
+ *
* Returns: The contents of this log in Purple Markup.
*/
char *purple_log_read(PurpleLog *log, PurpleLogReadFlags *flags);
/**
- * Returns a list of all available logs
- *
+ * purple_log_get_logs:
* @type: The type of the log
* @name: The name of the log
* @account: The account
+ *
+ * Returns a list of all available logs
+ *
* Returns: A sorted list of PurpleLogs
*/
GList *purple_log_get_logs(PurpleLogType type, const char *name, PurpleAccount *account);
/**
+ * purple_log_get_log_sets:
+ *
* Returns a GHashTable of PurpleLogSets.
*
* A "log set" here means the information necessary to gather the
@@ -275,96 +297,115 @@ GList *purple_log_get_logs(PurpleLogType type, const char *name, PurpleAccount *
GHashTable *purple_log_get_log_sets(void);
/**
+ * purple_log_get_system_logs:
+ * @account: The account
+ *
* Returns a list of all available system logs
*
- * @account: The account
* Returns: A sorted list of PurpleLogs
*/
GList *purple_log_get_system_logs(PurpleAccount *account);
/**
+ * purple_log_get_size:
+ * @log: The log
+ *
* Returns the size of a log
*
- * @log: The log
* Returns: The size of the log, in bytes
*/
int purple_log_get_size(PurpleLog *log);
/**
- * Returns the size, in bytes, of all available logs in this conversation
- *
+ * purple_log_get_total_size:
* @type: The type of the log
* @name: The name of the log
* @account: The account
+ *
+ * Returns the size, in bytes, of all available logs in this conversation
+ *
* Returns: The size in bytes
*/
int purple_log_get_total_size(PurpleLogType type, const char *name, PurpleAccount *account);
/**
- * Returns the activity score of a log, based on total size in bytes,
- * which is then decayed based on age
- *
+ * purple_log_get_activity_score:
* @type: The type of the log
* @name: The name of the log
* @account: The account
+ *
+ * Returns the activity score of a log, based on total size in bytes,
+ * which is then decayed based on age
+ *
* Returns: The activity score
*/
int purple_log_get_activity_score(PurpleLogType type, const char *name, PurpleAccount *account);
/**
+ * purple_log_is_deletable:
+ * @log: The log
+ *
* Tests whether a log is deletable
*
* A return value of %FALSE indicates that purple_log_delete() will fail on this
* log, unless something changes between the two calls. A return value of %TRUE,
* however, does not guarantee the log can be deleted.
*
- * @log: The log
* Returns: A boolean indicating if the log is deletable
*/
gboolean purple_log_is_deletable(PurpleLog *log);
/**
+ * purple_log_delete:
+ * @log: The log
+ *
* Deletes a log
*
- * @log: The log
* Returns: A boolean indicating success or failure
*/
gboolean purple_log_delete(PurpleLog *log);
/**
+ * purple_log_get_log_dir:
+ * @type: The type of the log.
+ * @name: The name of the log.
+ * @account: The account.
+ *
* Returns the default logger directory Purple uses for a given account
* and username. This would be where Purple stores logs created by
* the built-in text or HTML loggers.
*
- * @type: The type of the log.
- * @name: The name of the log.
- * @account: The account.
* Returns: The default logger directory for Purple.
*/
char *purple_log_get_log_dir(PurpleLogType type, const char *name, PurpleAccount *account);
/**
- * Implements GCompareFunc for PurpleLogs
- *
+ * purple_log_compare:
* @y: A PurpleLog
* @z: Another PurpleLog
+ *
+ * Implements GCompareFunc for PurpleLogs
+ *
* Returns: A value as specified by GCompareFunc
*/
gint purple_log_compare(gconstpointer y, gconstpointer z);
/**
- * Implements GCompareFunc for PurpleLogSets
- *
+ * purple_log_set_compare:
* @y: A PurpleLogSet
* @z: Another PurpleLogSet
+ *
+ * Implements GCompareFunc for PurpleLogSets
+ *
* Returns: A value as specified by GCompareFunc
*/
gint purple_log_set_compare(gconstpointer y, gconstpointer z);
/**
- * Frees a log set
- *
+ * purple_log_set_free:
* @set: The log set to destroy
+ *
+ * Frees a log set
*/
void purple_log_set_free(PurpleLogSet *set);
@@ -376,6 +417,10 @@ void purple_log_set_free(PurpleLogSet *set);
/*@{*/
/**
+ * purple_log_common_writer:
+ * @log: The log to write to.
+ * @ext: The file extension to give to this log file.
+ *
* Opens a new log file in the standard Purple log location
* with the given file extension, named for the current time,
* for writing. If a log file is already open, the existing
@@ -384,30 +429,28 @@ void purple_log_set_free(PurpleLogSet *set);
* file handle and log path.
*
* This function is intended to be used as a "common"
- * implementation of a logger's @c write function.
+ * implementation of a logger's <tt>write</tt> function.
* It should only be passed to purple_log_logger_new() and never
* called directly.
- *
- * @log: The log to write to.
- * @ext: The file extension to give to this log file.
*/
void purple_log_common_writer(PurpleLog *log, const char *ext);
/**
+ * purple_log_common_lister:
+ * @type: The type of the logs being listed.
+ * @name: The name of the log.
+ * @account: The account of the log.
+ * @ext: The file extension this log format uses.
+ * @logger: A reference to the logger struct for this log.
+ *
* Returns a sorted GList of PurpleLogs of the requested type.
*
* This function should only be used with logs that are written
* with purple_log_common_writer(). It's intended to be used as
- * a "common" implementation of a logger's @c list function.
+ * a "common" implementation of a logger's <tt>list</tt> function.
* It should only be passed to purple_log_logger_new() and never
* called directly.
*
- * @type: The type of the logs being listed.
- * @name: The name of the log.
- * @account: The account of the log.
- * @ext: The file extension this log format uses.
- * @logger: A reference to the logger struct for this log.
- *
* Returns: A sorted GList of PurpleLogs matching the parameters.
*/
GList *purple_log_common_lister(PurpleLogType type, const char *name,
@@ -415,21 +458,22 @@ GList *purple_log_common_lister(PurpleLogType type, const char *name,
PurpleLogLogger *logger);
/**
+ * purple_log_common_total_sizer:
+ * @type: The type of the logs being sized.
+ * @name: The name of the logs to size
+ * (e.g. the username or chat name).
+ * @account: The account of the log.
+ * @ext: The file extension this log format uses.
+ *
* Returns the total size of all the logs for a given user, with
* a given extension.
*
* This function should only be used with logs that are written
* with purple_log_common_writer(). It's intended to be used as
- * a "common" implementation of a logger's @c total_size function.
+ * a "common" implementation of a logger's <tt>total_size</tt> function.
* It should only be passed to purple_log_logger_new() and never
* called directly.
*
- * @type: The type of the logs being sized.
- * @name: The name of the logs to size
- * (e.g. the username or chat name).
- * @account: The account of the log.
- * @ext: The file extension this log format uses.
- *
* Returns: The size of all the logs with the specified extension
* for the specified user.
*/
@@ -437,46 +481,49 @@ int purple_log_common_total_sizer(PurpleLogType type, const char *name,
PurpleAccount *account, const char *ext);
/**
+ * purple_log_common_sizer:
+ * @log: The PurpleLog to size.
+ *
* Returns the size of a given PurpleLog.
*
* This function should only be used with logs that are written
* with purple_log_common_writer(). It's intended to be used as
- * a "common" implementation of a logger's @c size function.
+ * a "common" implementation of a logger's <tt>size</tt> function.
* It should only be passed to purple_log_logger_new() and never
* called directly.
*
- * @log: The PurpleLog to size.
- *
* Returns: An integer indicating the size of the log in bytes.
*/
int purple_log_common_sizer(PurpleLog *log);
/**
+ * purple_log_common_deleter:
+ * @log: The PurpleLog to delete.
+ *
* Deletes a log
*
* This function should only be used with logs that are written
* with purple_log_common_writer(). It's intended to be used as
- * a "common" implementation of a logger's @c delete function.
+ * a "common" implementation of a logger's <tt>delete</tt> function.
* It should only be passed to purple_log_logger_new() and never
* called directly.
*
- * @log: The PurpleLog to delete.
- *
* Returns: A boolean indicating success or failure.
*/
gboolean purple_log_common_deleter(PurpleLog *log);
/**
+ * purple_log_common_is_deletable:
+ * @log: The PurpleLog to check.
+ *
* Checks to see if a log is deletable
*
* This function should only be used with logs that are written
* with purple_log_common_writer(). It's intended to be used as
- * a "common" implementation of a logger's @c is_deletable function.
+ * a "common" implementation of a logger's <tt>is_deletable</tt> function.
* It should only be passed to purple_log_logger_new() and never
* called directly.
*
- * @log: The PurpleLog to check.
- *
* Returns: A boolean indicating if the log is deletable.
*/
gboolean purple_log_common_is_deletable(PurpleLog *log);
@@ -489,58 +536,64 @@ gboolean purple_log_common_is_deletable(PurpleLog *log);
/*@{*/
/**
- * Creates a new logger
- *
+ * purple_log_logger_new:
* @id: The logger's id.
* @name: The logger's name.
* @functions: The number of functions being passed. The following
- * functions are currently available (in order): @c create,
- * @c write, @c finalize, @c list, @c read, @c size,
- * @c total_size, @c list_syslog, @c get_log_sets,
- * @c remove, @c is_deletable.
- * For details on these functions, see PurpleLogLogger.
- * Functions may not be skipped. For example, passing
- * @c create and @c write is acceptable (for a total of
- * two functions). Passing @c create and @c finalize,
- * however, is not. To accomplish that, the caller must
- * pass @c create, %NULL (a placeholder for @c write),
- * and @c finalize (for a total of 3 functions).
+ * functions are currently available (in order): <tt>create</tt>,
+ * <tt>write</tt>, <tt>finalize</tt>, <tt>list</tt>,
+ * <tt>read</tt>, <tt>size</tt>, <tt>total_size</tt>,
+ * <tt>list_syslog</tt>, <tt>get_log_sets</tt>, <tt>remove</tt>,
+ * <tt>is_deletable</tt>.
+ * For details on these functions, see PurpleLogLogger.
+ * Functions may not be skipped. For example, passing
+ * <tt>create</tt> and <tt>write</tt> is acceptable (for a total
+ * of two functions). Passing <tt>create</tt> and
+ * <tt>finalize</tt>, however, is not. To accomplish that, the
+ * caller must pass <tt>create</tt>, %NULL (a placeholder for
+ * <tt>write</tt>), and <tt>finalize</tt> (for a total of 3
+ * functions).
+ *
+ * Creates a new logger
*
* Returns: The new logger
*/
PurpleLogLogger *purple_log_logger_new(const char *id, const char *name, int functions, ...);
/**
- * Frees a logger
- *
+ * purple_log_logger_free:
* @logger: The logger to free
+ *
+ * Frees a logger
*/
void purple_log_logger_free(PurpleLogLogger *logger);
/**
- * Adds a new logger
- *
+ * purple_log_logger_add:
* @logger: The new logger to add
+ *
+ * Adds a new logger
*/
void purple_log_logger_add (PurpleLogLogger *logger);
/**
+ * purple_log_logger_remove:
+ * @logger: The logger to remove
*
* Removes a logger
- *
- * @logger: The logger to remove
*/
void purple_log_logger_remove (PurpleLogLogger *logger);
/**
+ * purple_log_logger_set:
+ * @logger: The logger to set
*
* Sets the current logger
- *
- * @logger: The logger to set
*/
void purple_log_logger_set (PurpleLogLogger *logger);
/**
+ * purple_log_logger_get:
*
* Returns the current logger
*
@@ -549,6 +602,8 @@ void purple_log_logger_set (PurpleLogLogger *logger);
PurpleLogLogger *purple_log_logger_get (void);
/**
+ * purple_log_logger_get_options:
+ *
* Returns a GList containing the IDs and names of the registered
* loggers.
*
@@ -562,11 +617,15 @@ GList *purple_log_logger_get_options(void);
/*@{*/
/**
+ * purple_log_init:
+ *
* Initializes the log subsystem.
*/
void purple_log_init(void);
/**
+ * purple_log_get_handle:
+ *
* Returns the log subsystem handle.
*
* Returns: The log subsystem handle.
@@ -574,6 +633,8 @@ void purple_log_init(void);
void *purple_log_get_handle(void);
/**
+ * purple_log_uninit:
+ *
* Uninitializes the log subsystem.
*/
void purple_log_uninit(void);
diff --git a/libpurple/media-gst.h b/libpurple/media-gst.h
index 040cc170a4..23668953bd 100644
--- a/libpurple/media-gst.h
+++ b/libpurple/media-gst.h
@@ -40,40 +40,61 @@
#define PURPLE_IS_MEDIA_ELEMENT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_ELEMENT_INFO))
#define PURPLE_MEDIA_ELEMENT_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo))
-/** An opaque structure representing an audio/video source/sink. */
+/**
+ * PurpleMediaElementInfo:
+ *
+ * An opaque structure representing an audio/video source/sink.
+ */
typedef struct _PurpleMediaElementInfo PurpleMediaElementInfo;
typedef struct _PurpleMediaElementInfoClass PurpleMediaElementInfoClass;
+
typedef GstElement *(*PurpleMediaElementCreateCallback)(PurpleMedia *media,
const gchar *session_id, const gchar *participant);
+/**
+ * PurpleMediaElementType:
+ * @PURPLE_MEDIA_ELEMENT_NONE: empty element
+ * @PURPLE_MEDIA_ELEMENT_AUDIO: supports audio
+ * @PURPLE_MEDIA_ELEMENT_VIDEO: supports video
+ * @PURPLE_MEDIA_ELEMENT_AUDIO_VIDEO: supports audio and video
+ * @PURPLE_MEDIA_ELEMENT_NO_SRCS: has no src pads
+ * @PURPLE_MEDIA_ELEMENT_ONE_SRC: has one src pad
+ * @PURPLE_MEDIA_ELEMENT_MULTI_SRC: has multiple src pads
+ * @PURPLE_MEDIA_ELEMENT_REQUEST_SRC: src pads must be requested
+ * @PURPLE_MEDIA_ELEMENT_NO_SINKS: has no sink pads
+ * @PURPLE_MEDIA_ELEMENT_ONE_SINK: has one sink pad
+ * @PURPLE_MEDIA_ELEMENT_MULTI_SINK: has multiple sink pads
+ * @PURPLE_MEDIA_ELEMENT_REQUEST_SINK: sink pads must be requested
+ * @PURPLE_MEDIA_ELEMENT_UNIQUE: This element is unique and only one
+ * instance of it should be created at a
+ * time
+ * @PURPLE_MEDIA_ELEMENT_SRC: can be set as an active src
+ * @PURPLE_MEDIA_ELEMENT_SINK: can be set as an active sink
+ */
typedef enum {
- PURPLE_MEDIA_ELEMENT_NONE = 0, /** empty element */
- PURPLE_MEDIA_ELEMENT_AUDIO = 1, /** supports audio */
- PURPLE_MEDIA_ELEMENT_VIDEO = 1 << 1, /** supports video */
+ PURPLE_MEDIA_ELEMENT_NONE = 0,
+ PURPLE_MEDIA_ELEMENT_AUDIO = 1,
+ PURPLE_MEDIA_ELEMENT_VIDEO = 1 << 1,
PURPLE_MEDIA_ELEMENT_AUDIO_VIDEO = PURPLE_MEDIA_ELEMENT_AUDIO
- | PURPLE_MEDIA_ELEMENT_VIDEO, /** supports audio and video */
-
- PURPLE_MEDIA_ELEMENT_NO_SRCS = 0, /** has no src pads */
- PURPLE_MEDIA_ELEMENT_ONE_SRC = 1 << 2, /** has one src pad */
- PURPLE_MEDIA_ELEMENT_MULTI_SRC = 1 << 3, /** has multiple src pads */
- PURPLE_MEDIA_ELEMENT_REQUEST_SRC = 1 << 4, /** src pads must be requested */
-
- PURPLE_MEDIA_ELEMENT_NO_SINKS = 0, /** has no sink pads */
- PURPLE_MEDIA_ELEMENT_ONE_SINK = 1 << 5, /** has one sink pad */
- PURPLE_MEDIA_ELEMENT_MULTI_SINK = 1 << 6, /** has multiple sink pads */
- PURPLE_MEDIA_ELEMENT_REQUEST_SINK = 1 << 7, /** sink pads must be requested */
-
- PURPLE_MEDIA_ELEMENT_UNIQUE = 1 << 8, /** This element is unique and
- only one instance of it should
- be created at a time */
-
- PURPLE_MEDIA_ELEMENT_SRC = 1 << 9, /** can be set as an active src */
- PURPLE_MEDIA_ELEMENT_SINK = 1 << 10, /** can be set as an active sink */
+ | PURPLE_MEDIA_ELEMENT_VIDEO,
+ PURPLE_MEDIA_ELEMENT_NO_SRCS = 0,
+ PURPLE_MEDIA_ELEMENT_ONE_SRC = 1 << 2,
+ PURPLE_MEDIA_ELEMENT_MULTI_SRC = 1 << 3,
+ PURPLE_MEDIA_ELEMENT_REQUEST_SRC = 1 << 4,
+ PURPLE_MEDIA_ELEMENT_NO_SINKS = 0,
+ PURPLE_MEDIA_ELEMENT_ONE_SINK = 1 << 5,
+ PURPLE_MEDIA_ELEMENT_MULTI_SINK = 1 << 6,
+ PURPLE_MEDIA_ELEMENT_REQUEST_SINK = 1 << 7,
+ PURPLE_MEDIA_ELEMENT_UNIQUE = 1 << 8,
+ PURPLE_MEDIA_ELEMENT_SRC = 1 << 9,
+ PURPLE_MEDIA_ELEMENT_SINK = 1 << 10,
} PurpleMediaElementType;
G_BEGIN_DECLS
/**
+ * purple_media_element_type_get_type:
+ *
* Gets the element type's GType.
*
* Returns: The element type's GType.
@@ -81,6 +102,8 @@ G_BEGIN_DECLS
GType purple_media_element_type_get_type(void);
/**
+ * purple_media_element_info_get_type:
+ *
* Gets the element info's GType.
*
* Returns: The element info's GType.
@@ -88,22 +111,24 @@ GType purple_media_element_type_get_type(void);
GType purple_media_element_info_get_type(void);
/**
- * Gets the source from a session
- *
+ * purple_media_get_src:
* @media: The media object the session is in.
* @sess_id: The session id of the session to get the source from.
*
+ * Gets the source from a session
+ *
* Returns: The source retrieved.
*/
GstElement *purple_media_get_src(PurpleMedia *media, const gchar *sess_id);
/**
- * Gets the tee from a given session/stream.
- *
+ * purple_media_get_tee:
* @media: The instance to get the tee from.
* @session_id: The id of the session to get the tee from.
* @participant: Optionally, the participant of the stream to get the tee from.
*
+ * Gets the tee from a given session/stream.
+ *
* Returns: The GstTee element from the chosen session/stream.
*/
GstElement *purple_media_get_tee(PurpleMedia *media,
@@ -111,22 +136,24 @@ GstElement *purple_media_get_tee(PurpleMedia *media,
/**
- * Gets the pipeline from the media manager.
- *
+ * purple_media_manager_get_pipeline:
* @manager: The media manager to get the pipeline from.
*
+ * Gets the pipeline from the media manager.
+ *
* Returns: The pipeline.
*/
GstElement *purple_media_manager_get_pipeline(PurpleMediaManager *manager);
/**
- * Returns a GStreamer source or sink for audio or video.
- *
+ * purple_media_manager_get_element:
* @manager: The media manager to use to obtain the source/sink.
* @type: The type of source/sink to get.
* @media: The media call this element is requested for.
* @session_id: The id of the session this element is requested for or NULL.
* @participant: The remote user this element is requested for or NULL.
+ *
+ * Returns a GStreamer source or sink for audio or video.
*/
GstElement *purple_media_manager_get_element(PurpleMediaManager *manager,
PurpleMediaSessionType type, PurpleMedia *media,
@@ -144,23 +171,25 @@ PurpleMediaElementInfo *purple_media_manager_get_active_element(
PurpleMediaManager *manager, PurpleMediaElementType type);
/**
+ * purple_media_manager_set_video_caps:
+ * @manager: The media manager to set the media formats.
+ * @caps: Set of allowed media formats.
+ *
* Reduces media formats supported by the video source to given set.
*
* Useful to force negotiation of smaller picture resolution more suitable for
* use with particular codec and communication protocol without rescaling.
- *
- * @manager: The media manager to set the media formats.
- * @caps: Set of allowed media formats.
*/
void purple_media_manager_set_video_caps(PurpleMediaManager *manager,
GstCaps *caps);
/**
- * Returns current set of media formats limiting the output from video source.
- *
+ * purple_media_manager_get_video_caps:
* @manager: The media manager to get the media formats from.
*
- * Returns: @c GstCaps limiting the video source's formats.
+ * Returns current set of media formats limiting the output from video source.
+ *
+ * Returns: #GstCaps limiting the video source's formats.
*/
GstCaps *purple_media_manager_get_video_caps(PurpleMediaManager *manager);
diff --git a/libpurple/media.h b/libpurple/media.h
index c27cf196f4..fba91d8aeb 100644
--- a/libpurple/media.h
+++ b/libpurple/media.h
@@ -41,7 +41,6 @@
#define PURPLE_IS_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA))
#define PURPLE_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA, PurpleMediaClass))
-/** @copydoc _PurpleMedia */
typedef struct _PurpleMedia PurpleMedia;
#include "signals.h"
@@ -49,23 +48,30 @@ typedef struct _PurpleMedia PurpleMedia;
#ifdef USE_VV
-/** @copydoc _PurpleMediaClass */
typedef struct _PurpleMediaClass PurpleMediaClass;
typedef struct _PurpleMediaPrivate PurpleMediaPrivate;
-/** The media instance */
+/**
+ * PurpleMedia:
+ *
+ * The media instance
+ */
struct _PurpleMedia
{
- GObject parent; /**< The parent of this object. */
+ GObject parent;
/*< private >*/
- PurpleMediaPrivate *priv; /**< The private data of this object. */
+ PurpleMediaPrivate *priv;
};
-/** The media class */
+/**
+ * PurpleMediaClass:
+ *
+ * The media class
+ */
struct _PurpleMediaClass
{
- GObjectClass parent_class; /**< The parent class. */
+ GObjectClass parent_class;
/*< private >*/
void (*purple_reserved1)(void);
@@ -79,6 +85,8 @@ struct _PurpleMediaClass
G_BEGIN_DECLS
/**
+ * purple_media_get_type:
+ *
* Gets the media class's GType
*
* Returns: The media class's GType.
@@ -86,73 +94,85 @@ G_BEGIN_DECLS
GType purple_media_get_type(void);
/**
- * Gets a list of session IDs.
- *
+ * purple_media_get_session_ids:
* @media: The media session from which to retrieve session IDs.
*
+ * Gets a list of session IDs.
+ *
* Returns: GList of session IDs. The caller must free the list.
*/
GList *purple_media_get_session_ids(PurpleMedia *media);
/**
- * Gets the PurpleAccount this media session is on.
- *
+ * purple_media_get_account:
* @media: The media session to retrieve the account from.
*
+ * Gets the PurpleAccount this media session is on.
+ *
* Returns: The account retrieved.
*/
PurpleAccount *purple_media_get_account(PurpleMedia *media);
/**
- * Gets the prpl data from the media session.
+ * purple_media_get_prpl_data:
+ * @media: The media session to retrieve the protocol data from.
*
- * @media: The media session to retrieve the prpl data from.
+ * Gets the protocol data from the media session.
*
- * Returns: The prpl data retrieved.
+ * Returns: The protocol data retrieved.
*/
gpointer purple_media_get_prpl_data(PurpleMedia *media);
/**
- * Sets the prpl data on the media session.
+ * purple_media_set_prpl_data:
+ * @media: The media session to set the protocol data on.
+ * @protocol_data: The data to set on the media session.
*
- * @media: The media session to set the prpl data on.
- * @prpl_data: The data to set on the media session.
+ * Sets the protocol data on the media session.
*/
-void purple_media_set_prpl_data(PurpleMedia *media, gpointer prpl_data);
+void purple_media_set_prpl_data(PurpleMedia *media, gpointer protocol_data);
/**
- * Signals an error in the media session.
- *
+ * purple_media_error:
* @media: The media object to set the state on.
* @error: The format of the error message to send in the signal.
* @...: The arguments to plug into the format.
+ *
+ * Signals an error in the media session.
*/
void purple_media_error(PurpleMedia *media, const gchar *error, ...);
/**
- * Ends all streams that match the given parameters
- *
+ * purple_media_end:
* @media: The media object with which to end streams.
* @session_id: The session to end streams on.
* @participant: The participant to end streams with.
+ *
+ * Ends all streams that match the given parameters
*/
void purple_media_end(PurpleMedia *media, const gchar *session_id,
const gchar *participant);
/**
- * Signals different information about the given stream.
- *
+ * purple_media_stream_info:
* @media: The media instance to containing the stream to signal.
* @type: The type of info being signaled.
* @session_id: The id of the session of the stream being signaled.
* @participant: The participant of the stream being signaled.
* @local: TRUE if the info originated locally, FALSE if on the remote end.
+ *
+ * Signals different information about the given stream.
*/
void purple_media_stream_info(PurpleMedia *media, PurpleMediaInfoType type,
const gchar *session_id, const gchar *participant,
gboolean local);
/**
+ * purple_media_set_params:
+ * @media: The media object to set the parameters on.
+ * @num_params: The number of parameters to pass
+ * @params: Array of @c GParameter to pass
+ *
* Sets various optional parameters of the media call.
*
* Currently supported are:
@@ -163,41 +183,35 @@ void purple_media_stream_info(PurpleMedia *media, PurpleMediaInfoType type,
* - "sdes-location" : The LOCATION to put in SDES messages
* - "sdes-note" : The NOTE to put in SDES messages
* - "sdes-phone" : The PHONE to put in SDES messages
- *
- * @media: The media object to set the parameters on.
- * @num_params: The number of parameters to pass
- * @params: Array of @c GParameter to pass
*/
void purple_media_set_params(PurpleMedia *media,
guint num_params, GParameter *params);
/**
+ * purple_media_get_available_params:
+ * @media: The media object
+ *
* Gets the list of optional parameters supported by the media backend.
*
- * The list is owned by the @c PurpleMedia internals and should NOT be freed.
- *
- * @media: The media object
+ * The list is owned by the #PurpleMedia internals and should NOT be freed.
*
* Returns: NULL-terminated array of names of supported parameters.
*/
const gchar **purple_media_get_available_params(PurpleMedia *media);
/**
- * Checks if given optional parameter is supported by the media backend.
- *
+ * purple_media_param_is_supported:
* @media: The media object
* @param: name of parameter
*
+ * Checks if given optional parameter is supported by the media backend.
+ *
* Returns: %TRUE if backend recognizes the parameter, %FALSE otherwise.
*/
gboolean purple_media_param_is_supported(PurpleMedia *media, const gchar *param);
/**
- * Adds a stream to a session.
- *
- * It only adds a stream to one audio session or video session as
- * the @c sess_id must be unique between sessions.
- *
+ * purple_media_add_stream:
* @media: The media object to find the session in.
* @sess_id: The session id of the session to add the stream to.
* @who: The name of the remote user to add the stream for.
@@ -207,6 +221,11 @@ gboolean purple_media_param_is_supported(PurpleMedia *media, const gchar *param)
* @num_params: The number of parameters to pass to Farsight.
* @params: The parameters to pass to Farsight.
*
+ * Adds a stream to a session.
+ *
+ * It only adds a stream to one audio session or video session as
+ * the @sess_id must be unique between sessions.
+ *
* Returns: %TRUE The stream was added successfully, %FALSE otherwise.
*/
gboolean purple_media_add_stream(PurpleMedia *media, const gchar *sess_id,
@@ -215,41 +234,45 @@ gboolean purple_media_add_stream(PurpleMedia *media, const gchar *sess_id,
guint num_params, GParameter *params);
/**
- * Gets the session type from a session
- *
+ * purple_media_get_session_type:
* @media: The media object to find the session in.
* @sess_id: The session id of the session to get the type from.
*
+ * Gets the session type from a session
+ *
* Returns: The retreived session type.
*/
PurpleMediaSessionType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id);
/**
- * Gets the PurpleMediaManager this media session is a part of.
- *
+ * purple_media_get_manager:
* @media: The media object to get the manager instance from.
*
+ * Gets the PurpleMediaManager this media session is a part of.
+ *
* Returns: The PurpleMediaManager instance retrieved.
*/
struct _PurpleMediaManager *purple_media_get_manager(PurpleMedia *media);
/**
- * Gets the codecs from a session.
- *
+ * purple_media_get_codecs:
* @media: The media object to find the session in.
* @sess_id: The session id of the session to get the codecs from.
*
+ * Gets the codecs from a session.
+ *
* Returns: The retreieved codecs.
*/
GList *purple_media_get_codecs(PurpleMedia *media, const gchar *sess_id);
/**
- * Adds remote candidates to the stream.
- *
+ * purple_media_add_remote_candidates:
* @media: The media object to find the session in.
* @sess_id: The session id of the session find the stream in.
* @participant: The name of the remote user to add the candidates for.
* @remote_candidates: The remote candidates to add.
+ *
+ * Adds remote candidates to the stream.
*/
void purple_media_add_remote_candidates(PurpleMedia *media,
const gchar *sess_id,
@@ -257,140 +280,152 @@ void purple_media_add_remote_candidates(PurpleMedia *media,
GList *remote_candidates);
/**
- * Gets the local candidates from a stream.
- *
+ * purple_media_get_local_candidates:
* @media: The media object to find the session in.
* @sess_id: The session id of the session to find the stream in.
* @participant: The name of the remote user to get the candidates from.
+ *
+ * Gets the local candidates from a stream.
*/
GList *purple_media_get_local_candidates(PurpleMedia *media,
const gchar *sess_id,
const gchar *participant);
/**
- * Gets the active local candidates for the stream.
- *
+ * purple_media_get_active_local_candidates:
* @media: The media object to find the session in.
* @sess_id: The session id of the session to find the stream in.
* @participant: The name of the remote user to get the active candidate
* from.
*
+ * Gets the active local candidates for the stream.
+ *
* Returns: The active candidates retrieved.
*/
GList *purple_media_get_active_local_candidates(PurpleMedia *media,
const gchar *sess_id, const gchar *participant);
/**
- * Gets the active remote candidates for the stream.
- *
+ * purple_media_get_active_remote_candidates:
* @media: The media object to find the session in.
* @sess_id: The session id of the session to find the stream in.
* @participant: The name of the remote user to get the remote candidate
* from.
*
+ * Gets the active remote candidates for the stream.
+ *
* Returns: The remote candidates retrieved.
*/
GList *purple_media_get_active_remote_candidates(PurpleMedia *media,
const gchar *sess_id, const gchar *participant);
/**
- * Sets remote candidates from the stream.
- *
+ * purple_media_set_remote_codecs:
* @media: The media object to find the session in.
* @sess_id: The session id of the session find the stream in.
* @participant: The name of the remote user to set the candidates from.
* @codecs: The list of remote codecs to set.
*
+ * Sets remote candidates from the stream.
+ *
* Returns: %TRUE The codecs were set successfully, or %FALSE otherwise.
*/
gboolean purple_media_set_remote_codecs(PurpleMedia *media, const gchar *sess_id,
const gchar *participant, GList *codecs);
/**
- * Returns whether or not the candidates for set of streams are prepared
- *
+ * purple_media_candidates_prepared:
* @media: The media object to find the remote user in.
* @session_id: The session id of the session to check.
* @participant: The remote user to check for.
*
+ * Returns whether or not the candidates for set of streams are prepared
+ *
* Returns: %TRUE All streams for the given session_id/participant combination have candidates prepared, %FALSE otherwise.
*/
gboolean purple_media_candidates_prepared(PurpleMedia *media,
const gchar *session_id, const gchar *participant);
/**
- * Sets the send codec for the a session.
- *
+ * purple_media_set_send_codec:
* @media: The media object to find the session in.
* @sess_id: The session id of the session to set the codec for.
* @codec: The codec to set the session to stream.
*
+ * Sets the send codec for the a session.
+ *
* Returns: %TRUE The codec was successfully changed, or %FALSE otherwise.
*/
gboolean purple_media_set_send_codec(PurpleMedia *media, const gchar *sess_id, PurpleMediaCodec *codec);
/**
- * Gets whether a session's codecs are ready to be used.
- *
+ * purple_media_codecs_ready:
* @media: The media object to find the session in.
* @sess_id: The session id of the session to check.
*
+ * Gets whether a session's codecs are ready to be used.
+ *
* Returns: %TRUE The codecs are ready, or %FALSE otherwise.
*/
gboolean purple_media_codecs_ready(PurpleMedia *media, const gchar *sess_id);
/**
- * Gets whether the local user is the conference/session/stream's initiator.
- *
+ * purple_media_is_initiator:
* @media: The media instance to find the session in.
* @sess_id: The session id of the session to check.
* @participant: The participant of the stream to check.
*
+ * Gets whether the local user is the conference/session/stream's initiator.
+ *
* Returns: TRUE if the local user is the stream's initator, else FALSE.
*/
gboolean purple_media_is_initiator(PurpleMedia *media,
const gchar *sess_id, const gchar *participant);
/**
- * Gets whether a streams selected have been accepted.
- *
+ * purple_media_accepted:
* @media: The media object to find the session in.
* @sess_id: The session id of the session to check.
* @participant: The participant to check.
*
+ * Gets whether a streams selected have been accepted.
+ *
* Returns: %TRUE The selected streams have been accepted, or %FALSE otherwise.
*/
gboolean purple_media_accepted(PurpleMedia *media, const gchar *sess_id,
const gchar *participant);
/**
- * Sets the input volume of all the selected sessions.
- *
+ * purple_media_set_input_volume:
* @media: The media object the sessions are in.
* @session_id: The session to select (if any).
* @level: The level to set the volume to.
+ *
+ * Sets the input volume of all the selected sessions.
*/
void purple_media_set_input_volume(PurpleMedia *media, const gchar *session_id, double level);
/**
- * Sets the output volume of all the selected streams.
- *
+ * purple_media_set_output_volume:
* @media: The media object the streams are in.
* @session_id: The session to limit the streams to (if any).
* @participant: The participant to limit the streams to (if any).
* @level: The level to set the volume to.
+ *
+ * Sets the output volume of all the selected streams.
*/
void purple_media_set_output_volume(PurpleMedia *media, const gchar *session_id,
const gchar *participant, double level);
/**
- * Sets a video output window for the given session/stream.
- *
+ * purple_media_set_output_window:
* @media: The media instance to set the output window on.
* @session_id: The session to set the output window on.
* @participant: Optionally, the participant to set the output window on.
* @window_id: The window id use for embedding the video in.
*
+ * Sets a video output window for the given session/stream.
+ *
* Returns: An id to reference the output window.
*/
gulong purple_media_set_output_window(PurpleMedia *media,
@@ -398,9 +433,10 @@ gulong purple_media_set_output_window(PurpleMedia *media,
gulong window_id);
/**
- * Removes all output windows from a given media session.
- *
+ * purple_media_remove_output_windows:
* @media: The instance to remove all output windows from.
+ *
+ * Removes all output windows from a given media session.
*/
void purple_media_remove_output_windows(PurpleMedia *media);
diff --git a/libpurple/mediamanager.h b/libpurple/mediamanager.h
index e3d6d709d3..fb7d2a8e8f 100644
--- a/libpurple/mediamanager.h
+++ b/libpurple/mediamanager.h
@@ -30,9 +30,7 @@
#include <glib.h>
#include <glib-object.h>
-/** @copydoc _PurpleMediaManager */
typedef struct _PurpleMediaManager PurpleMediaManager;
-/** @copydoc _PurpleMediaManagerClass */
typedef struct _PurpleMediaManagerClass PurpleMediaManagerClass;
typedef struct _PurpleMediaManagerPrivate PurpleMediaManagerPrivate;
@@ -47,19 +45,27 @@ typedef struct _PurpleMediaManagerPrivate PurpleMediaManagerPrivate;
#define PURPLE_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_MANAGER))
#define PURPLE_MEDIA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass))
-/** The media manager's data. */
+/**
+ * PurpleMediaManager:
+ *
+ * The media manager's data.
+ */
struct _PurpleMediaManager
{
- GObject parent; /**< The parent of this manager. */
+ GObject parent;
/*< private >*/
- PurpleMediaManagerPrivate *priv; /**< Private data for the manager. */
+ PurpleMediaManagerPrivate *priv;
};
-/** The media manager class. */
+/**
+ * PurpleMediaManagerClass:
+ *
+ * The media manager class.
+ */
struct _PurpleMediaManagerClass
{
- GObjectClass parent_class; /**< The parent class. */
+ GObjectClass parent_class;
/*< private >*/
void (*purple_reserved1)(void);
@@ -76,6 +82,8 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_media_manager_get_type:
+ *
* Gets the media manager's GType.
*
* Returns: The media manager's GType.
@@ -83,6 +91,8 @@ G_BEGIN_DECLS
GType purple_media_manager_get_type(void);
/**
+ * purple_media_manager_get:
+ *
* Gets the "global" media manager object. It's created if it doesn't already exist.
*
* Returns: The "global" instance of the media manager object.
@@ -90,14 +100,15 @@ GType purple_media_manager_get_type(void);
PurpleMediaManager *purple_media_manager_get(void);
/**
- * Creates a media session.
- *
+ * purple_media_manager_create_media:
* @manager: The media manager to create the session under.
* @account: The account to create the session on.
* @conference_type: The conference type to feed into Farsight2.
* @remote_user: The remote user to initiate the session with.
* @initiator: TRUE if the local user is the initiator of this media call, FALSE otherwise.
*
+ * Creates a media session.
+ *
* Returns: A newly created media session.
*/
PurpleMedia *purple_media_manager_create_media(PurpleMediaManager *manager,
@@ -107,45 +118,49 @@ PurpleMedia *purple_media_manager_create_media(PurpleMediaManager *manager,
gboolean initiator);
/**
- * Gets all of the media sessions.
- *
+ * purple_media_manager_get_media:
* @manager: The media manager to get all of the sessions from.
*
+ * Gets all of the media sessions.
+ *
* Returns: A list of all the media sessions.
*/
GList *purple_media_manager_get_media(PurpleMediaManager *manager);
/**
- * Gets all of the media sessions for a given account.
- *
+ * purple_media_manager_get_media_by_account:
* @manager: The media manager to get the sessions from.
* @account: The account the sessions are on.
*
+ * Gets all of the media sessions for a given account.
+ *
* Returns: A list of the media sessions on the given account.
*/
GList *purple_media_manager_get_media_by_account(
PurpleMediaManager *manager, PurpleAccount *account);
/**
- * Removes a media session from the media manager.
- *
+ * purple_media_manager_remove_media:
* @manager: The media manager to remove the media session from.
* @media: The media session to remove.
+ *
+ * Removes a media session from the media manager.
*/
void
purple_media_manager_remove_media(PurpleMediaManager *manager,
PurpleMedia *media);
/**
- * Signals that output windows should be created for the chosen stream.
- *
- * This shouldn't be called outside of mediamanager.c and media.c
- *
+ * purple_media_manager_create_output_window:
* @manager: Manager the output windows are registered with.
* @media: Media session the output windows are registered for.
* @session_id: The session the output windows are registered with.
* @participant: The participant the output windows are registered with.
*
+ * Signals that output windows should be created for the chosen stream.
+ *
+ * This shouldn't be called outside of mediamanager.c and media.c
+ *
* Returns: TRUE if it succeeded, FALSE if it failed.
*/
gboolean purple_media_manager_create_output_window(
@@ -153,14 +168,15 @@ gboolean purple_media_manager_create_output_window(
const gchar *session_id, const gchar *participant);
/**
- * Registers a video output window to be created for a given stream.
- *
+ * purple_media_manager_set_output_window:
* @manager: The manager to register the output window with.
* @media: The media instance to find the stream in.
* @session_id: The session the stream is associated with.
* @participant: The participant the stream is associated with.
* @window_id: The window ID to embed the video in.
*
+ * Registers a video output window to be created for a given stream.
+ *
* Returns: A unique ID to the registered output window, 0 if it failed.
*/
gulong purple_media_manager_set_output_window(PurpleMediaManager *manager,
@@ -168,60 +184,66 @@ gulong purple_media_manager_set_output_window(PurpleMediaManager *manager,
const gchar *participant, gulong window_id);
/**
- * Remove a previously registerd output window.
- *
+ * purple_media_manager_remove_output_window:
* @manager: The manager the output window was registered with.
* @output_window_id: The ID of the output window.
*
+ * Remove a previously registerd output window.
+ *
* Returns: TRUE if it found the output window and was successful, else FALSE.
*/
gboolean purple_media_manager_remove_output_window(
PurpleMediaManager *manager, gulong output_window_id);
/**
- * Remove all output windows for a given conference/session/participant/stream.
- *
+ * purple_media_manager_remove_output_windows:
* @manager: The manager the output windows were registered with.
* @media: The media instance the output windows were registered for.
* @session_id: The session the output windows were registered for.
* @participant: The participant the output windows were registered for.
+ *
+ * Remove all output windows for a given conference/session/participant/stream.
*/
void purple_media_manager_remove_output_windows(
PurpleMediaManager *manager, PurpleMedia *media,
const gchar *session_id, const gchar *participant);
/**
- * Sets which media caps the UI supports.
- *
+ * purple_media_manager_set_ui_caps:
* @manager: The manager to set the caps on.
* @caps: The caps to set.
+ *
+ * Sets which media caps the UI supports.
*/
void purple_media_manager_set_ui_caps(PurpleMediaManager *manager,
PurpleMediaCaps caps);
/**
- * Gets which media caps the UI supports.
- *
+ * purple_media_manager_get_ui_caps:
* @manager: The manager to get caps from.
*
+ * Gets which media caps the UI supports.
+ *
* Returns: caps The caps retrieved.
*/
PurpleMediaCaps purple_media_manager_get_ui_caps(PurpleMediaManager *manager);
/**
- * Sets which media backend type media objects will use.
- *
+ * purple_media_manager_set_backend_type:
* @manager: The manager to set the caps on.
* @backend_type: The media backend type to use.
+ *
+ * Sets which media backend type media objects will use.
*/
void purple_media_manager_set_backend_type(PurpleMediaManager *manager,
GType backend_type);
/**
- * Gets which media backend type media objects will use.
- *
+ * purple_media_manager_get_backend_type:
* @manager: The manager to get the media backend type from.
*
+ * Gets which media backend type media objects will use.
+ *
* Returns: The type of media backend type media objects will use.
*/
GType purple_media_manager_get_backend_type(PurpleMediaManager *manager);
diff --git a/libpurple/mime.h b/libpurple/mime.h
index d4ec849006..12e5ed385f 100644
--- a/libpurple/mime.h
+++ b/libpurple/mime.h
@@ -1,3 +1,11 @@
+/**
+ * @file mime.h
+ * @ingroup core
+ *
+ * Rudimentary parsing of multi-part MIME messages into more
+ * accessible structures.
+ */
+
/*
* Purple
*
@@ -27,19 +35,15 @@
#include <glib.h>
/**
- * @file mime.h
- * @ingroup core
+ * PurpleMimeDocument:
*
- * Rudimentary parsing of multi-part MIME messages into more
- * accessible structures.
- */
-
-/**
* A MIME document.
*/
typedef struct _PurpleMimeDocument PurpleMimeDocument;
/**
+ * PurpleMimePart:
+ *
* A part of a multipart MIME document.
*/
typedef struct _PurpleMimePart PurpleMimePart;
@@ -47,57 +51,66 @@ typedef struct _PurpleMimePart PurpleMimePart;
G_BEGIN_DECLS
/**
+ * purple_mime_document_new:
+ *
* Allocate an empty MIME document.
*/
PurpleMimeDocument *purple_mime_document_new(void);
/**
- * Frees memory used in a MIME document and all of its parts and fields
- *
+ * purple_mime_document_free:
* @doc: The MIME document to free.
+ *
+ * Frees memory used in a MIME document and all of its parts and fields
*/
void purple_mime_document_free(PurpleMimeDocument *doc);
/**
- * Parse a MIME document from a NUL-terminated string.
- *
+ * purple_mime_document_parse:
* @buf: The NULL-terminated string containing the MIME-encoded data.
*
+ * Parse a MIME document from a NUL-terminated string.
+ *
* Returns: A MIME document.
*/
PurpleMimeDocument *purple_mime_document_parse(const char *buf);
/**
- * Parse a MIME document from a string
- *
+ * purple_mime_document_parsen:
* @buf: The string containing the MIME-encoded data.
* @len: Length of buf.
*
+ * Parse a MIME document from a string
+ *
* Returns: A MIME document.
*/
PurpleMimeDocument *purple_mime_document_parsen(const char *buf, gsize len);
/**
+ * purple_mime_document_write:
+ *
* Write (append) a MIME document onto a GString.
*/
void purple_mime_document_write(PurpleMimeDocument *doc, GString *str);
/**
- * The list of fields in the header of a document
- *
+ * purple_mime_document_get_fields:
* @doc: The MIME document.
*
+ * The list of fields in the header of a document
+ *
* Returns: (transfer none): A list of strings indicating the fields (but not
* the values of the fields) in the header of doc.
*/
GList *purple_mime_document_get_fields(PurpleMimeDocument *doc);
/**
- * Get the value of a specific field in the header of a document.
- *
+ * purple_mime_document_get_field:
* @doc: The MIME document.
* @field: Case-insensitive field name.
*
+ * Get the value of a specific field in the header of a document.
+ *
* Returns: Value associated with the indicated header field, or
* NULL if the field doesn't exist.
*/
@@ -105,40 +118,44 @@ const char *purple_mime_document_get_field(PurpleMimeDocument *doc,
const char *field);
/**
- * Set or replace the value of a specific field in the header of a
- * document.
- *
+ * purple_mime_document_set_field:
* @doc: The MIME document.
* @field: Case-insensitive field name.
* @value: Value to associate with the indicated header field,
* of NULL to remove the field.
+ *
+ * Set or replace the value of a specific field in the header of a
+ * document.
*/
void purple_mime_document_set_field(PurpleMimeDocument *doc,
const char *field,
const char *value);
/**
- * The list of parts in a multipart document.
- *
+ * purple_mime_document_get_parts:
* @doc: The MIME document.
*
+ * The list of parts in a multipart document.
+ *
* Returns: (transfer none): List of PurpleMimePart contained within doc.
*/
GList *purple_mime_document_get_parts(PurpleMimeDocument *doc);
/**
- * Create and insert a new part into a MIME document.
- *
+ * purple_mime_part_new:
* @doc: The new part's parent MIME document.
+ *
+ * Create and insert a new part into a MIME document.
*/
PurpleMimePart *purple_mime_part_new(PurpleMimeDocument *doc);
/**
- * The list of fields in the header of a document part.
- *
+ * purple_mime_part_get_fields:
* @part: The MIME document part.
*
+ * The list of fields in the header of a document part.
+ *
* Returns: (transfer none): List of strings indicating the fields (but not the
* values of the fields) in the header of part.
*/
@@ -146,11 +163,12 @@ GList *purple_mime_part_get_fields(PurpleMimePart *part);
/**
- * Get the value of a specific field in the header of a document part.
- *
+ * purple_mime_part_get_field:
* @part: The MIME document part.
* @field: Case-insensitive name of the header field.
*
+ * Get the value of a specific field in the header of a document part.
+ *
* Returns: Value of the specified header field, or NULL if the
* field doesn't exist.
*/
@@ -158,6 +176,8 @@ const char *purple_mime_part_get_field(PurpleMimePart *part,
const char *field);
/**
+ * purple_mime_part_get_field_decoded:
+ *
* Get the decoded value of a specific field in the header of a
* document part.
*/
@@ -165,44 +185,49 @@ char *purple_mime_part_get_field_decoded(PurpleMimePart *part,
const char *field);
/**
- * Set or replace the value of a specific field in the header of a
- * document.
- *
+ * purple_mime_part_set_field:
* @part: The part of the MIME document.
* @field: Case-insensitive field name
* @value: Value to associate with the indicated header field,
* of NULL to remove the field.
+ *
+ * Set or replace the value of a specific field in the header of a
+ * document.
*/
void purple_mime_part_set_field(PurpleMimePart *part,
const char *field,
const char *value);
/**
- * Get the (possibly encoded) data portion of a MIME document part.
- *
+ * purple_mime_part_get_data:
* @part: The MIME document part.
*
+ * Get the (possibly encoded) data portion of a MIME document part.
+ *
* Returns: NULL-terminated data found in the document part
*/
const char *purple_mime_part_get_data(PurpleMimePart *part);
/**
+ * purple_mime_part_get_data_decoded:
+ * @part: The MIME documemt part.
+ * @data: Buffer for the data.
+ * @len: The length of the buffer.
+ *
* Get the data portion of a MIME document part, after attempting to
* decode it according to the content-transfer-encoding field. If the
* specified encoding method is not supported, this function will
* return NULL.
- *
- * @part: The MIME documemt part.
- * @data: Buffer for the data.
- * @len: The length of the buffer.
*/
void purple_mime_part_get_data_decoded(PurpleMimePart *part,
guchar **data, gsize *len);
/**
+ * purple_mime_part_get_length:
+ * @part: The MIME document part.
+ *
* Get the length of the data portion of a MIME document part.
*
- * @part: The MIME document part.
* Returns: Length of the data in the document part.
*/
gsize purple_mime_part_get_length(PurpleMimePart *part);
diff --git a/libpurple/nat-pmp.h b/libpurple/nat-pmp.h
index 109f3ec445..ea6879a558 100644
--- a/libpurple/nat-pmp.h
+++ b/libpurple/nat-pmp.h
@@ -44,35 +44,36 @@ typedef enum {
G_BEGIN_DECLS
/**
+ * purple_pmp_init:
+ *
* Initialize nat-pmp
*/
void purple_pmp_init(void);
-/**
- *
- */
char *purple_pmp_get_public_ip(void);
/**
- * Remove the NAT-PMP mapping for a specified type on a specified port
- *
+ * purple_pmp_create_map:
* @type: The PurplePmpType
* @privateport: The private port on which we are listening locally
* @publicport: The public port on which we are expecting a response
* @lifetime: The lifetime of the mapping. It is recommended that this
* be PURPLE_PMP_LIFETIME.
*
+ * Remove the NAT-PMP mapping for a specified type on a specified port
+ *
* Returns: TRUE if successful; FALSE if unsuccessful
*/
gboolean purple_pmp_create_map(PurplePmpType type, unsigned short privateport,
unsigned short publicport, int lifetime);
/**
- * Remove the NAT-PMP mapping for a specified type on a specified port
- *
+ * purple_pmp_destroy_map:
* @type: The PurplePmpType
* @privateport: The private port on which the mapping was previously made
*
+ * Remove the NAT-PMP mapping for a specified type on a specified port
+ *
* Returns: TRUE if successful; FALSE if unsuccessful
*/
gboolean purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport);
diff --git a/libpurple/network.h b/libpurple/network.h
index b7a73b81a0..e8479d19f3 100644
--- a/libpurple/network.h
+++ b/libpurple/network.h
@@ -40,16 +40,19 @@ typedef struct _PurpleNetworkListenData PurpleNetworkListenData;
typedef void (*PurpleNetworkListenCallback) (int listenfd, gpointer data);
/**
+ * purple_network_set_public_ip:
+ * @ip: The local IP address.
+ *
* Sets the IP address of the local system in preferences. This
* is the IP address that should be used for incoming connections
* (file transfer, direct IM, etc.) and should therefore be
* publicly accessible.
- *
- * @ip: The local IP address.
*/
void purple_network_set_public_ip(const char *ip);
/**
+ * purple_network_get_public_ip:
+ *
* Returns the IP address of the local system set in preferences.
*
* This returns the value set via purple_network_set_public_ip().
@@ -60,6 +63,9 @@ void purple_network_set_public_ip(const char *ip);
const char *purple_network_get_public_ip(void);
/**
+ * purple_network_get_local_system_ip:
+ * @fd: The fd to use to help figure out the IP, or else -1.
+ *
* Returns the IP address of the local system.
*
* You probably want to use purple_network_get_my_ip() instead.
@@ -68,12 +74,13 @@ const char *purple_network_get_public_ip(void);
* function is called twice, it may be important to make a copy
* of the returned string.
*
- * @fd: The fd to use to help figure out the IP, or else -1.
* Returns: The local IP address.
*/
const char *purple_network_get_local_system_ip(int fd);
/**
+ * purple_network_get_all_local_system_ips:
+ *
* Returns all IP addresses of the local system.
*
* Note: The caller must free this list. If libpurple was built with
@@ -84,6 +91,9 @@ const char *purple_network_get_local_system_ip(int fd);
GList *purple_network_get_all_local_system_ips(void);
/**
+ * purple_network_get_my_ip:
+ * @fd: The fd to use to help figure out the IP, or -1.
+ *
* Returns the IP address that should be used anywhere a
* public IP addresses is needed (listening for an incoming
* file transfer, etc).
@@ -97,12 +107,29 @@ GList *purple_network_get_all_local_system_ips(void);
* function is called twice, it may be important to make a copy
* of the returned string.
*
- * @fd: The fd to use to help figure out the IP, or -1.
* Returns: The local IP address to be used.
*/
const char *purple_network_get_my_ip(int fd);
/**
+ * purple_network_listen:
+ * @port: The port number to bind to. Must be greater than 0.
+ * @socket_family: The protocol family of the socket. This should be
+ * AF_INET for IPv4 or AF_INET6 for IPv6. IPv6 sockets
+ * may or may not be able to accept IPv4 connections
+ * based on the system configuration (use
+ * purple_socket_speaks_ipv4 to check). If an IPv6
+ * socket doesn't accept V4-mapped addresses, you will
+ * need a second listener to support both v4 and v6.
+ * @socket_type: The type of socket to open for listening.
+ * This will be either SOCK_STREAM for TCP or SOCK_DGRAM for UDP.
+ * @map_external: Should the open port be mapped externally using
+ * NAT-PNP or UPnP? (default should be TRUE)
+ * @cb: The callback to be invoked when the port to listen on is available.
+ * The file descriptor of the listening socket will be specified in
+ * this callback, or -1 if no socket could be established.
+ * @cb_data: extra data to be returned when cb is called
+ *
* Attempts to open a listening port ONLY on the specified port number.
* You probably want to use purple_network_listen_range() instead of this.
* This function is useful, for example, if you wanted to write a telnet
@@ -119,7 +146,21 @@ const char *purple_network_get_my_ip(int fd);
* poking) for IPv6-only listeners (if an IPv6 socket supports v4-mapped
* addresses, a mapping is done).
*
- * @port: The port number to bind to. Must be greater than 0.
+ * Returns: A pointer to a data structure that can be used to cancel
+ * the pending listener, or NULL if unable to obtain a local
+ * socket to listen on.
+ */
+PurpleNetworkListenData *purple_network_listen(unsigned short port,
+ int socket_family, int socket_type, gboolean map_external,
+ PurpleNetworkListenCallback cb, gpointer cb_data);
+
+/**
+ * purple_network_listen_range:
+ * @start: The port number to bind to, or 0 to pick a random port.
+ * Users are allowed to override this arg in prefs.
+ * @end: The highest possible port in the range of ports to listen on,
+ * or 0 to pick a random port. Users are allowed to override this
+ * arg in prefs.
* @socket_family: The protocol family of the socket. This should be
* AF_INET for IPv4 or AF_INET6 for IPv6. IPv6 sockets
* may or may not be able to accept IPv4 connections
@@ -136,15 +177,6 @@ const char *purple_network_get_my_ip(int fd);
* this callback, or -1 if no socket could be established.
* @cb_data: extra data to be returned when cb is called
*
- * Returns: A pointer to a data structure that can be used to cancel
- * the pending listener, or NULL if unable to obtain a local
- * socket to listen on.
- */
-PurpleNetworkListenData *purple_network_listen(unsigned short port,
- int socket_family, int socket_type, gboolean map_external,
- PurpleNetworkListenCallback cb, gpointer cb_data);
-
-/**
* Opens a listening port selected from a range of ports. The range of
* ports used is chosen in the following manner:
* If a range is specified in preferences, these values are used.
@@ -162,27 +194,6 @@ PurpleNetworkListenData *purple_network_listen(unsigned short port,
* poking) for IPv6-only listeners (if an IPv6 socket supports v4-mapped
* addresses, a mapping is done).
*
- * @start: The port number to bind to, or 0 to pick a random port.
- * Users are allowed to override this arg in prefs.
- * @end: The highest possible port in the range of ports to listen on,
- * or 0 to pick a random port. Users are allowed to override this
- * arg in prefs.
- * @socket_family: The protocol family of the socket. This should be
- * AF_INET for IPv4 or AF_INET6 for IPv6. IPv6 sockets
- * may or may not be able to accept IPv4 connections
- * based on the system configuration (use
- * purple_socket_speaks_ipv4 to check). If an IPv6
- * socket doesn't accept V4-mapped addresses, you will
- * need a second listener to support both v4 and v6.
- * @socket_type: The type of socket to open for listening.
- * This will be either SOCK_STREAM for TCP or SOCK_DGRAM for UDP.
- * @map_external: Should the open port be mapped externally using
- * NAT-PNP or UPnP? (default should be TRUE)
- * @cb: The callback to be invoked when the port to listen on is available.
- * The file descriptor of the listening socket will be specified in
- * this callback, or -1 if no socket could be established.
- * @cb_data: extra data to be returned when cb is called
- *
* Returns: A pointer to a data structure that can be used to cancel
* the pending listener, or NULL if unable to obtain a local
* socket to listen on.
@@ -193,26 +204,31 @@ PurpleNetworkListenData *purple_network_listen_range(
PurpleNetworkListenCallback cb, gpointer cb_data);
/**
+ * purple_network_listen_cancel:
+ * @listen_data: This listener attempt will be cancelled and
+ * the struct will be freed.
+ *
* This can be used to cancel any in-progress listener connection
* by passing in the return value from either purple_network_listen()
* or purple_network_listen_range().
- *
- * @listen_data: This listener attempt will be cancelled and
- * the struct will be freed.
*/
void purple_network_listen_cancel(PurpleNetworkListenData *listen_data);
/**
- * Gets a port number from a file descriptor.
- *
+ * purple_network_get_port_from_fd:
* @fd: The file descriptor. This should be a tcp socket. The current
* implementation probably dies on anything but IPv4. Perhaps this
* possible bug will inspire new and valuable contributors to Purple.
+ *
+ * Gets a port number from a file descriptor.
+ *
* Returns: The port number, in host byte order.
*/
unsigned short purple_network_get_port_from_fd(int fd);
/**
+ * purple_network_is_available:
+ *
* Detects if there is an available network connection.
*
* Returns: TRUE if the network is available
@@ -220,6 +236,8 @@ unsigned short purple_network_get_port_from_fd(int fd);
gboolean purple_network_is_available(void);
/**
+ * purple_network_force_online:
+ *
* Makes purple_network_is_available() always return %TRUE.
*
* This is what backs the --force-online command line argument in Pidgin,
@@ -229,6 +247,8 @@ gboolean purple_network_is_available(void);
void purple_network_force_online(void);
/**
+ * purple_network_get_handle:
+ *
* Get the handle for the network system
*
* Returns: the handle to the network system
@@ -236,14 +256,17 @@ void purple_network_force_online(void);
void *purple_network_get_handle(void);
/**
+ * purple_network_set_stun_server:
+ * @stun_server: The host name of the STUN server to set
+ *
* Update the STUN server IP given the host name
* Will result in a DNS query being executed asynchronous
- *
- * @stun_server: The host name of the STUN server to set
*/
void purple_network_set_stun_server(const gchar *stun_server);
/**
+ * purple_network_get_stun_ip:
+ *
* Get the IP address of the STUN server as a string representation
*
* Returns: the IP address
@@ -251,14 +274,17 @@ void purple_network_set_stun_server(const gchar *stun_server);
const gchar *purple_network_get_stun_ip(void);
/**
+ * purple_network_set_turn_server:
+ * @turn_server: The host name of the TURN server to set
+ *
* Update the TURN server IP given the host name
* Will result in a DNS query being executed asynchronous
- *
- * @turn_server: The host name of the TURN server to set
*/
void purple_network_set_turn_server(const gchar *turn_server);
/**
+ * purple_network_get_turn_ip:
+ *
* Get the IP address of the TURN server as a string representation
*
* Returns: the IP address
@@ -266,13 +292,19 @@ void purple_network_set_turn_server(const gchar *turn_server);
const gchar *purple_network_get_turn_ip(void);
/**
- * Remove a port mapping (UPnP or NAT-PMP) associated with listening socket
- *
+ * purple_network_remove_port_mapping:
* @fd: Socket to remove the port mapping for
+ *
+ * Remove a port mapping (UPnP or NAT-PMP) associated with listening socket
*/
void purple_network_remove_port_mapping(gint fd);
/**
+ * purple_network_convert_idn_to_ascii:
+ * @in: The hostname to be converted.
+ * @out: The output buffer where an allocated string will be returned.
+ * The caller is responsible for freeing this.
+ *
* Convert a UTF-8 domain name to ASCII in accordance with the IDNA
* specification. If libpurple is compiled without IDN support, this function
* copies the input into the output buffer.
@@ -282,20 +314,21 @@ void purple_network_remove_port_mapping(gint fd);
*
* In general, a buffer of about 512 bytes is the appropriate size to use.
*
- * @in: The hostname to be converted.
- * @out: The output buffer where an allocated string will be returned.
- * The caller is responsible for freeing this.
* Returns: 0 on success, -1 if the out is NULL, or an error code
* that currently corresponds to the Idna_rc enum in libidn.
*/
int purple_network_convert_idn_to_ascii(const gchar *in, gchar **out);
/**
+ * purple_network_init:
+ *
* Initializes the network subsystem.
*/
void purple_network_init(void);
/**
+ * purple_network_uninit:
+ *
* Shuts down the network subsystem.
*/
void purple_network_uninit(void);
diff --git a/libpurple/notify.h b/libpurple/notify.h
index daba79fa25..ee1a87dad6 100644
--- a/libpurple/notify.h
+++ b/libpurple/notify.h
@@ -36,7 +36,11 @@ typedef struct _PurpleNotifyUserInfoEntry PurpleNotifyUserInfoEntry;
#define PURPLE_TYPE_NOTIFY_USER_INFO (purple_notify_user_info_get_type())
typedef struct _PurpleNotifyUserInfo PurpleNotifyUserInfo;
-/** @copydoc _PurpleNotifySearchColumn */
+/**
+ * PurpleNotifySearchColumn:
+ *
+ * Single column of a search result.
+ */
typedef struct _PurpleNotifySearchColumn PurpleNotifySearchColumn;
#include "connection.h"
@@ -44,45 +48,65 @@ typedef struct _PurpleNotifySearchColumn PurpleNotifySearchColumn;
/**
+ * PurpleNotifyCloseCallback:
+ *
* Notification close callbacks.
*/
typedef void (*PurpleNotifyCloseCallback) (gpointer user_data);
/**
+ * PurpleNotifyType:
+ * @PURPLE_NOTIFY_MESSAGE: Message notification.
+ * @PURPLE_NOTIFY_EMAIL: Single email notification.
+ * @PURPLE_NOTIFY_EMAILS: Multiple email notification.
+ * @PURPLE_NOTIFY_FORMATTED: Formatted text.
+ * @PURPLE_NOTIFY_SEARCHRESULTS: Buddy search results.
+ * @PURPLE_NOTIFY_USERINFO: Formatted userinfo text.
+ * @PURPLE_NOTIFY_URI: URI notification or display.
+ *
* Notification types.
*/
typedef enum
{
- PURPLE_NOTIFY_MESSAGE = 0, /**< Message notification. */
- PURPLE_NOTIFY_EMAIL, /**< Single email notification. */
- PURPLE_NOTIFY_EMAILS, /**< Multiple email notification. */
- PURPLE_NOTIFY_FORMATTED, /**< Formatted text. */
- PURPLE_NOTIFY_SEARCHRESULTS, /**< Buddy search results. */
- PURPLE_NOTIFY_USERINFO, /**< Formatted userinfo text. */
- PURPLE_NOTIFY_URI /**< URI notification or display. */
+ PURPLE_NOTIFY_MESSAGE = 0,
+ PURPLE_NOTIFY_EMAIL,
+ PURPLE_NOTIFY_EMAILS,
+ PURPLE_NOTIFY_FORMATTED,
+ PURPLE_NOTIFY_SEARCHRESULTS,
+ PURPLE_NOTIFY_USERINFO,
+ PURPLE_NOTIFY_URI
} PurpleNotifyType;
/**
+ * PurpleNotifyMsgType:
+ * @PURPLE_NOTIFY_MSG_ERROR: Error notification.
+ * @PURPLE_NOTIFY_MSG_WARNING: Warning notification.
+ * @PURPLE_NOTIFY_MSG_INFO: Information notification.
+ *
* Notification message types.
*/
typedef enum
{
- PURPLE_NOTIFY_MSG_ERROR = 0, /**< Error notification. */
- PURPLE_NOTIFY_MSG_WARNING, /**< Warning notification. */
- PURPLE_NOTIFY_MSG_INFO /**< Information notification. */
+ PURPLE_NOTIFY_MSG_ERROR = 0,
+ PURPLE_NOTIFY_MSG_WARNING,
+ PURPLE_NOTIFY_MSG_INFO
} PurpleNotifyMsgType;
/**
+ * PurpleNotifySearchButtonType:
+ * @PURPLE_NOTIFY_BUTTON_LABELED: special use, see
+ * purple_notify_searchresults_button_add_labeled()
+ *
* The types of buttons
*/
typedef enum
{
- PURPLE_NOTIFY_BUTTON_LABELED = 0, /**< special use, see _button_add_labeled */
+ PURPLE_NOTIFY_BUTTON_LABELED = 0,
PURPLE_NOTIFY_BUTTON_CONTINUE = 1,
PURPLE_NOTIFY_BUTTON_ADD,
PURPLE_NOTIFY_BUTTON_INFO,
@@ -93,17 +117,24 @@ typedef enum
/**
+ * PurpleNotifySearchResults:
+ * @columns: List of the search column objects.
+ * @rows: List of rows in the result.
+ * @buttons: List of buttons to display.
+ *
* Search results object.
*/
typedef struct
{
- GList *columns; /**< List of the search column objects. */
- GList *rows; /**< List of rows in the result. */
- GList *buttons; /**< List of buttons to display. */
+ GList *columns;
+ GList *rows;
+ GList *buttons;
} PurpleNotifySearchResults;
/**
+ * PurpleNotifyUserInfoEntryType:
+ *
* Types of PurpleNotifyUserInfoEntry objects
*/
typedef enum
@@ -116,28 +147,35 @@ typedef enum
/**
- * Callback for a button in a search result.
- *
+ * PurpleNotifySearchResultsCallback:
* @c: the PurpleConnection passed to purple_notify_searchresults
* @row: the contents of the selected row
* @user_data: User defined data.
+ *
+ * Callback for a button in a search result.
*/
typedef void (*PurpleNotifySearchResultsCallback)(PurpleConnection *c, GList *row,
gpointer user_data);
/**
+ * PurpleNotifySearchButton:
+ * @callback: Function to be called when clicked.
+ * @label: only for PURPLE_NOTIFY_BUTTON_LABELED
+ *
* Definition of a button.
*/
typedef struct
{
PurpleNotifySearchButtonType type;
- PurpleNotifySearchResultsCallback callback; /**< Function to be called when clicked. */
- char *label; /**< only for PURPLE_NOTIFY_BUTTON_LABELED */
+ PurpleNotifySearchResultsCallback callback;
+ char *label;
} PurpleNotifySearchButton;
/**
+ * PurpleNotifyUiOps:
+ *
* Notification UI operations.
*/
typedef struct
@@ -190,10 +228,7 @@ G_BEGIN_DECLS
/*@{*/
/**
- * Displays results from a buddy search. This can be, for example,
- * a window with a list of all found buddies, where you are given the
- * option of adding buddies to your buddy list.
- *
+ * purple_notify_searchresults:
* @gc: The PurpleConnection handle associated with the information.
* @title: The title of the message. If this is NULL, the title
* will be "Search Results."
@@ -205,6 +240,10 @@ G_BEGIN_DECLS
* @user_data: The data to pass to the close callback and any other
* callback associated with a button.
*
+ * Displays results from a buddy search. This can be, for example,
+ * a window with a list of all found buddies, where you are given the
+ * option of adding buddies to your buddy list.
+ *
* Returns: A UI-specific handle.
*/
void *purple_notify_searchresults(PurpleConnection *gc, const char *title,
@@ -213,18 +252,20 @@ void *purple_notify_searchresults(PurpleConnection *gc, const char *title,
gpointer user_data);
/**
- * Frees a PurpleNotifySearchResults object.
- *
+ * purple_notify_searchresults_free:
* @results: The PurpleNotifySearchResults to free.
+ *
+ * Frees a PurpleNotifySearchResults object.
*/
void purple_notify_searchresults_free(PurpleNotifySearchResults *results);
/**
- * Replace old rows with the new. Reuse an existing window.
- *
+ * purple_notify_searchresults_new_rows:
* @gc: The PurpleConnection structure.
* @results: The PurpleNotifySearchResults structure.
* @data: Data returned by the purple_notify_searchresults().
+ *
+ * Replace old rows with the new. Reuse an existing window.
*/
void purple_notify_searchresults_new_rows(PurpleConnection *gc,
PurpleNotifySearchResults *results,
@@ -232,12 +273,13 @@ void purple_notify_searchresults_new_rows(PurpleConnection *gc,
/**
- * Adds a stock button that will be displayed in the search results dialog.
- *
+ * purple_notify_searchresults_button_add:
* @results: The search results object.
* @type: Type of the button. (TODO: Only one button of a given type
* can be displayed.)
* @cb: Function that will be called on the click event.
+ *
+ * Adds a stock button that will be displayed in the search results dialog.
*/
void purple_notify_searchresults_button_add(PurpleNotifySearchResults *results,
PurpleNotifySearchButtonType type,
@@ -245,12 +287,13 @@ void purple_notify_searchresults_button_add(PurpleNotifySearchResults *results,
/**
- * Adds a plain labelled button that will be displayed in the search results
- * dialog.
- *
+ * purple_notify_searchresults_button_add_labeled:
* @results: The search results object
* @label: The label to display
* @cb: Function that will be called on the click event
+ *
+ * Adds a plain labelled button that will be displayed in the search results
+ * dialog.
*/
void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results,
const char *label,
@@ -258,6 +301,8 @@ void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *r
/**
+ * purple_notify_searchresults_new:
+ *
* Returns a newly created search results object.
*
* Returns: The new search results object.
@@ -265,55 +310,61 @@ void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *r
PurpleNotifySearchResults *purple_notify_searchresults_new(void);
/**
+ * purple_notify_searchresults_column_new:
+ * @title: Title of the column. NOTE: Title will get g_strdup()ed.
+ *
* Returns a newly created search result column object. The column defaults
* to being visible.
*
- * @title: Title of the column. NOTE: Title will get g_strdup()ed.
- *
* Returns: The new search column object.
*/
PurpleNotifySearchColumn *purple_notify_searchresults_column_new(const char *title);
/**
- * Returns the title of the column
- *
+ * purple_notify_searchresult_column_get_title:
* @column: The search column object.
*
+ * Returns the title of the column
+ *
* Returns: The title of the column
*/
const char *purple_notify_searchresult_column_get_title(const PurpleNotifySearchColumn *column);
/**
- * Sets whether or not a search result column is visible.
- *
+ * purple_notify_searchresult_column_set_visible:
* @column: The search column object.
* @visible: TRUE if visible, or FALSE if not.
+ *
+ * Sets whether or not a search result column is visible.
*/
void purple_notify_searchresult_column_set_visible(PurpleNotifySearchColumn *column, gboolean visible);
/**
- * Returns whether or not a search result column is visible.
- *
+ * purple_notify_searchresult_column_is_visible:
* @column: The search column object.
*
+ * Returns whether or not a search result column is visible.
+ *
* Returns: TRUE if the search result column is visible. FALSE otherwise.
*/
gboolean purple_notify_searchresult_column_is_visible(const PurpleNotifySearchColumn *column);
/**
- * Adds a new column to the search result object.
- *
+ * purple_notify_searchresults_column_add:
* @results: The result object to which the column will be added.
* @column: The column that will be added to the result object.
+ *
+ * Adds a new column to the search result object.
*/
void purple_notify_searchresults_column_add(PurpleNotifySearchResults *results,
PurpleNotifySearchColumn *column);
/**
- * Adds a new row of the results to the search results object.
- *
+ * purple_notify_searchresults_row_add:
* @results: The search results object.
* @row: The row of the results.
+ *
+ * Adds a new row of the results to the search results object.
*/
void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results,
GList *row);
@@ -326,8 +377,7 @@ void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results,
/*@{*/
/**
- * Displays a notification message to the user.
- *
+ * purple_notify_message:
* @handle: The plugin or connection handle.
* @type: The notification type.
* @title: The title of the message.
@@ -339,6 +389,8 @@ void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results,
* the notification.
* @user_data: The data to pass to the callback.
*
+ * Displays a notification message to the user.
+ *
* Returns: A UI-specific handle.
*/
void *purple_notify_message(void *handle, PurpleNotifyMsgType type,
@@ -347,8 +399,7 @@ void *purple_notify_message(void *handle, PurpleNotifyMsgType type,
gpointer user_data);
/**
- * Displays a single email notification to the user.
- *
+ * purple_notify_email:
* @handle: The plugin or connection handle.
* @subject: The subject of the email.
* @from: The from address.
@@ -358,6 +409,8 @@ void *purple_notify_message(void *handle, PurpleNotifyMsgType type,
* the notification.
* @user_data: The data to pass to the callback.
*
+ * Displays a single email notification to the user.
+ *
* Returns: A UI-specific handle.
*/
void *purple_notify_email(void *handle, const char *subject,
@@ -366,8 +419,7 @@ void *purple_notify_email(void *handle, const char *subject,
gpointer user_data);
/**
- * Displays a notification for multiple emails to the user.
- *
+ * purple_notify_emails:
* @handle: The plugin or connection handle.
* @count: The number of emails. '0' can be used to signify that
* the user has no unread emails and the UI should remove
@@ -382,6 +434,8 @@ void *purple_notify_email(void *handle, const char *subject,
* the notification.
* @user_data: The data to pass to the callback.
*
+ * Displays a notification for multiple emails to the user.
+ *
* Returns: A UI-specific handle.
*/
void *purple_notify_emails(void *handle, size_t count, gboolean detailed,
@@ -390,11 +444,7 @@ void *purple_notify_emails(void *handle, size_t count, gboolean detailed,
PurpleNotifyCloseCallback cb, gpointer user_data);
/**
- * Displays a notification with formatted text.
- *
- * The text is essentially a stripped-down format of HTML, the same that
- * IMs may send.
- *
+ * purple_notify_formatted:
* @handle: The plugin or connection handle.
* @title: The title of the message.
* @primary: The main point of the message.
@@ -404,6 +454,11 @@ void *purple_notify_emails(void *handle, size_t count, gboolean detailed,
* the notification.
* @user_data: The data to pass to the callback.
*
+ * Displays a notification with formatted text.
+ *
+ * The text is essentially a stripped-down format of HTML, the same that
+ * IMs may send.
+ *
* Returns: A UI-specific handle.
*/
void *purple_notify_formatted(void *handle, const char *title,
@@ -411,18 +466,19 @@ void *purple_notify_formatted(void *handle, const char *title,
const char *text, PurpleNotifyCloseCallback cb, gpointer user_data);
/**
- * Displays user information with formatted text, passing information giving
- * the connection and username from which the user information came.
- *
- * The text is essentially a stripped-down format of HTML, the same that
- * IMs may send.
- *
+ * purple_notify_userinfo:
* @gc: The PurpleConnection handle associated with the information.
* @who: The username associated with the information.
* @user_info: The PurpleNotifyUserInfo which contains the information
* @cb: The callback to call when the user closes the notification.
* @user_data: The data to pass to the callback.
*
+ * Displays user information with formatted text, passing information giving
+ * the connection and username from which the user information came.
+ *
+ * The text is essentially a stripped-down format of HTML, the same that
+ * IMs may send.
+ *
* Returns: A UI-specific handle.
*/
void *purple_notify_userinfo(PurpleConnection *gc, const char *who,
@@ -430,11 +486,15 @@ void *purple_notify_userinfo(PurpleConnection *gc, const char *who,
gpointer user_data);
/**
+ * purple_notify_user_info_get_type:
+ *
* Returns the GType for the PurpleNotifyUserInfo boxed structure.
*/
GType purple_notify_user_info_get_type(void);
/**
+ * purple_notify_user_info_new:
+ *
* Create a new PurpleNotifyUserInfo which is suitable for passing to
* purple_notify_userinfo()
*
@@ -443,13 +503,17 @@ GType purple_notify_user_info_get_type(void);
PurpleNotifyUserInfo *purple_notify_user_info_new(void);
/**
- * Destroy a PurpleNotifyUserInfo
- *
+ * purple_notify_user_info_destroy:
* @user_info: The PurpleNotifyUserInfo
+ *
+ * Destroy a PurpleNotifyUserInfo
*/
void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info);
/**
+ * purple_notify_user_info_get_entries:
+ * @user_info: The PurpleNotifyUserInfo
+ *
* Retrieve the array of PurpleNotifyUserInfoEntry objects from a
* PurpleNotifyUserInfo
*
@@ -462,25 +526,22 @@ void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info);
* To remove a PurpleNotifyUserInfoEntry, use
* purple_notify_user_info_remove_entry(). Do not use the GQueue directly.
*
- * @user_info: The PurpleNotifyUserInfo
- *
* Returns: (transfer none): A GQueue of PurpleNotifyUserInfoEntry objects.
*/
GQueue *purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info);
/**
- * Create a textual representation of a PurpleNotifyUserInfo, separating
- * entries with newline
- *
+ * purple_notify_user_info_get_text_with_newline:
* @user_info: The PurpleNotifyUserInfo
* @newline: The separation character
+ *
+ * Create a textual representation of a PurpleNotifyUserInfo, separating
+ * entries with newline
*/
char *purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_info, const char *newline);
/**
- * Add a label/value pair to a PurpleNotifyUserInfo object.
- * PurpleNotifyUserInfo keeps track of the order in which pairs are added.
- *
+ * purple_notify_user_info_add_pair_html:
* @user_info: The PurpleNotifyUserInfo
* @label: A label, which for example might be displayed by a
* UI with a colon after it ("Status:"). Do not include
@@ -493,37 +554,56 @@ char *purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_i
* If this is NULL the label will still be displayed;
* the UI should treat label as independent and not
* include a colon if it would otherwise.
+ *
+ * Add a label/value pair to a PurpleNotifyUserInfo object.
+ * PurpleNotifyUserInfo keeps track of the order in which pairs are added.
*/
void purple_notify_user_info_add_pair_html(PurpleNotifyUserInfo *user_info, const char *label, const char *value);
/**
+ * purple_notify_user_info_add_pair_plaintext:
+ *
* Like purple_notify_user_info_add_pair_html, but value should be plaintext
* and will be escaped using g_markup_escape_text().
*/
void purple_notify_user_info_add_pair_plaintext(PurpleNotifyUserInfo *user_info, const char *label, const char *value);
/**
+ * purple_notify_user_info_prepend_pair_html:
+ *
* Like purple_notify_user_info_add_pair_html, but the pair is inserted
* at the beginning of the list.
*/
void purple_notify_user_info_prepend_pair_html(PurpleNotifyUserInfo *user_info, const char *label, const char *value);
/**
+ * purple_notify_user_info_prepend_pair_plaintext:
+ *
* Like purple_notify_user_info_prepend_pair_html, but value should be plaintext
* and will be escaped using g_markup_escape_text().
*/
void purple_notify_user_info_prepend_pair_plaintext(PurpleNotifyUserInfo *user_info, const char *label, const char *value);
/**
- * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object
- * without freeing the entry.
- *
+ * purple_notify_user_info_remove_entry:
* @user_info: The PurpleNotifyUserInfo
* @user_info_entry: The PurpleNotifyUserInfoEntry
+ *
+ * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object
+ * without freeing the entry.
*/
void purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *user_info_entry);
/**
+ * purple_notify_user_info_entry_new:
+ * @label: A label, which for example might be displayed by a UI
+ * with a colon after it ("Status:"). Do not include a
+ * colon. If NULL, value will be displayed without a label.
+ * @value: The value, which might be displayed by a UI after the
+ * label. If NULL, label will still be displayed; the UI
+ * should then treat label as independent and not include a
+ * colon if it would otherwise.
+ *
* Create a new PurpleNotifyUserInfoEntry
*
* If added to a PurpleNotifyUserInfo object, this should not be free()'d,
@@ -534,122 +614,128 @@ void purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, Purpl
* purple_notify_user_info_prepend_pair_plaintext() are convenience
* methods for creating entries and adding them to a PurpleNotifyUserInfo.
*
- * @label: A label, which for example might be displayed by a UI
- * with a colon after it ("Status:"). Do not include a
- * colon. If NULL, value will be displayed without a label.
- * @value: The value, which might be displayed by a UI after the
- * label. If NULL, label will still be displayed; the UI
- * should then treat label as independent and not include a
- * colon if it would otherwise.
- *
- * @result A new PurpleNotifyUserInfoEntry
+ * Returns: A new PurpleNotifyUserInfoEntry
*/
PurpleNotifyUserInfoEntry *purple_notify_user_info_entry_new(const char *label, const char *value);
/**
- * Destroy a PurpleNotifyUserInfoEntry
- *
+ * purple_notify_user_info_entry_destroy:
* @user_info_entry: The PurpleNotifyUserInfoEntry
+ *
+ * Destroy a PurpleNotifyUserInfoEntry
*/
void purple_notify_user_info_entry_destroy(PurpleNotifyUserInfoEntry *user_info_entry);
/**
- * Add a section break. A UI might display this as a horizontal line.
- *
+ * purple_notify_user_info_add_section_break:
* @user_info: The PurpleNotifyUserInfo
+ *
+ * Add a section break. A UI might display this as a horizontal line.
*/
void purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info);
/**
- * Prepend a section break. A UI might display this as a horizontal line.
- *
+ * purple_notify_user_info_prepend_section_break:
* @user_info: The PurpleNotifyUserInfo
+ *
+ * Prepend a section break. A UI might display this as a horizontal line.
*/
void purple_notify_user_info_prepend_section_break(PurpleNotifyUserInfo *user_info);
/**
- * Add a section header. A UI might display this in a different font
- * from other text.
- *
+ * purple_notify_user_info_add_section_header:
* @user_info: The PurpleNotifyUserInfo
* @label: The name of the section
+ *
+ * Add a section header. A UI might display this in a different font
+ * from other text.
*/
void purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label);
/**
- * Prepend a section header. A UI might display this in a different font
- * from other text.
- *
+ * purple_notify_user_info_prepend_section_header:
* @user_info: The PurpleNotifyUserInfo
* @label: The name of the section
+ *
+ * Prepend a section header. A UI might display this in a different font
+ * from other text.
*/
void purple_notify_user_info_prepend_section_header(PurpleNotifyUserInfo *user_info, const char *label);
/**
+ * purple_notify_user_info_remove_last_item:
+ *
* Remove the last item which was added to a PurpleNotifyUserInfo. This
* could be used to remove a section header which is not needed.
*/
void purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info);
/**
- * Get the label for a PurpleNotifyUserInfoEntry
- *
+ * purple_notify_user_info_entry_get_label:
* @user_info_entry: The PurpleNotifyUserInfoEntry
*
+ * Get the label for a PurpleNotifyUserInfoEntry
+ *
* Returns: The label
*/
const gchar *purple_notify_user_info_entry_get_label(PurpleNotifyUserInfoEntry *user_info_entry);
/**
- * Set the label for a PurpleNotifyUserInfoEntry
- *
+ * purple_notify_user_info_entry_set_label:
* @user_info_entry: The PurpleNotifyUserInfoEntry
* @label: The label
+ *
+ * Set the label for a PurpleNotifyUserInfoEntry
*/
void purple_notify_user_info_entry_set_label(PurpleNotifyUserInfoEntry *user_info_entry, const char *label);
/**
- * Get the value for a PurpleNotifyUserInfoEntry
- *
+ * purple_notify_user_info_entry_get_value:
* @user_info_entry: The PurpleNotifyUserInfoEntry
*
- * @result The value
+ * Get the value for a PurpleNotifyUserInfoEntry
+ *
+ * Returns: The value
*/
const gchar *purple_notify_user_info_entry_get_value(PurpleNotifyUserInfoEntry *user_info_entry);
/**
- * Set the value for a PurpleNotifyUserInfoEntry
- *
+ * purple_notify_user_info_entry_set_value:
* @user_info_entry: The PurpleNotifyUserInfoEntry
* @value: The value
+ *
+ * Set the value for a PurpleNotifyUserInfoEntry
*/
void purple_notify_user_info_entry_set_value(PurpleNotifyUserInfoEntry *user_info_entry, const char *value);
/**
- * Get the type of a PurpleNotifyUserInfoEntry
- *
+ * purple_notify_user_info_entry_get_type:
* @user_info_entry: The PurpleNotifyUserInfoEntry
*
+ * Get the type of a PurpleNotifyUserInfoEntry
+ *
* Returns: The PurpleNotifyUserInfoEntryType
*/
PurpleNotifyUserInfoEntryType purple_notify_user_info_entry_get_type(PurpleNotifyUserInfoEntry *user_info_entry);
/**
- * Set the type of a PurpleNotifyUserInfoEntry
- *
+ * purple_notify_user_info_entry_set_type:
* @user_info_entry: The PurpleNotifyUserInfoEntry
* @type: The PurpleNotifyUserInfoEntryType
+ *
+ * Set the type of a PurpleNotifyUserInfoEntry
*/
void purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry,
PurpleNotifyUserInfoEntryType type);
/**
- * Opens a URI or somehow presents it to the user.
- *
+ * purple_notify_uri:
* @handle: The plugin or connection handle.
* @uri: The URI to display or go to.
*
+ * Opens a URI or somehow presents it to the user.
+ *
* Returns: A UI-specific handle, if any. This may only be presented if
* the UI code displays a dialog instead of a webpage, or something
* similar.
@@ -657,36 +743,41 @@ void purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info
void *purple_notify_uri(void *handle, const char *uri);
/**
- * Checks, if passed UI handle is valid.
- *
+ * purple_notify_is_valid_ui_handle:
* @ui_handle: The UI handle.
* @type: The pointer to variable, where request type may be stored
* (may be %NULL).
*
+ * Checks, if passed UI handle is valid.
+ *
* Returns: TRUE, if handle is valid, FALSE otherwise.
*/
gboolean
purple_notify_is_valid_ui_handle(void *ui_handle, PurpleNotifyType *type);
/**
+ * purple_notify_close:
+ * @type: The notification type.
+ * @ui_handle: The notification UI handle.
+ *
* Closes a notification.
*
* This should be used only by the UI operation functions and part of the
* core.
- *
- * @type: The notification type.
- * @ui_handle: The notification UI handle.
*/
void purple_notify_close(PurpleNotifyType type, void *ui_handle);
/**
- * Closes all notifications registered with the specified handle.
- *
+ * purple_notify_close_with_handle:
* @handle: The handle.
+ *
+ * Closes all notifications registered with the specified handle.
*/
void purple_notify_close_with_handle(void *handle);
/**
+ * purple_notify_info:
+ *
* A wrapper for purple_notify_message that displays an information message.
*/
#define purple_notify_info(handle, title, primary, secondary, cpar) \
@@ -694,6 +785,8 @@ void purple_notify_close_with_handle(void *handle);
(primary), (secondary), (cpar), NULL, NULL)
/**
+ * purple_notify_warning:
+ *
* A wrapper for purple_notify_message that displays a warning message.
*/
#define purple_notify_warning(handle, title, primary, secondary, cpar) \
@@ -701,6 +794,8 @@ void purple_notify_close_with_handle(void *handle);
(primary), (secondary), (cpar), NULL, NULL)
/**
+ * purple_notify_error:
+ *
* A wrapper for purple_notify_message that displays an error message.
*/
#define purple_notify_error(handle, title, primary, secondary, cpar) \
@@ -715,14 +810,17 @@ void purple_notify_close_with_handle(void *handle);
/*@{*/
/**
+ * purple_notify_set_ui_ops:
+ * @ops: The UI operations structure.
+ *
* Sets the UI operations structure to be used when displaying a
* notification.
- *
- * @ops: The UI operations structure.
*/
void purple_notify_set_ui_ops(PurpleNotifyUiOps *ops);
/**
+ * purple_notify_get_ui_ops:
+ *
* Returns the UI operations structure to be used when displaying a
* notification.
*
@@ -733,11 +831,13 @@ PurpleNotifyUiOps *purple_notify_get_ui_ops(void);
/*@}*/
/**************************************************************************/
-/** @name Notify Subsystem */
+/** @name Notify Subsystem */
/**************************************************************************/
/*@{*/
/**
+ * purple_notify_get_handle:
+ *
* Returns the notify subsystem handle.
*
* Returns: The notify subsystem handle.
@@ -745,11 +845,15 @@ PurpleNotifyUiOps *purple_notify_get_ui_ops(void);
void *purple_notify_get_handle(void);
/**
+ * purple_notify_init:
+ *
* Initializes the notify subsystem.
*/
void purple_notify_init(void);
/**
+ * purple_notify_uninit:
+ *
* Uninitializes the notify subsystem.
*/
void purple_notify_uninit(void);
diff --git a/libpurple/ntlm.h b/libpurple/ntlm.h
index 56238feeb7..9229d5daa9 100644
--- a/libpurple/ntlm.h
+++ b/libpurple/ntlm.h
@@ -30,37 +30,42 @@
G_BEGIN_DECLS
/**
- * Generates the base64 encoded type 1 message needed for NTLM authentication
- *
+ * purple_ntlm_gen_type1:
* @hostname: Your hostname
* @domain: The domain to authenticate to
+ *
+ * Generates the base64 encoded type 1 message needed for NTLM authentication
+ *
* Returns: base64 encoded string to send to the server. This should
* be g_free'd by the caller.
*/
gchar *purple_ntlm_gen_type1(const gchar *hostname, const gchar *domain);
/**
- * Parses the ntlm type 2 message
- *
+ * purple_ntlm_parse_type2:
* @type2: String containing the base64 encoded type2 message
* @flags: If not %NULL, this will store the flags for the message
*
+ * Parses the ntlm type 2 message
+ *
* Returns: The nonce for use in message type3. This is a statically
* allocated 8 byte binary string.
*/
guint8 *purple_ntlm_parse_type2(const gchar *type2, guint32 *flags);
/**
- * Generates a type3 message
- *
+ * purple_ntlm_gen_type3:
* @username: The username
* @passw: The password
* @hostname: The hostname
* @domain: The domain to authenticate against
* @nonce: The nonce returned by purple_ntlm_parse_type2
* @flags: Pointer to the flags returned by purple_ntlm_parse_type2
+ *
+ * Generates a type3 message
+ *
* Returns: A base64 encoded type3 message. This should be g_free'd by
- * the caller.
+ * the caller.
*/
gchar *purple_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags);
diff --git a/libpurple/pluginpref.h b/libpurple/pluginpref.h
index 49642c19ea..96f43118e1 100644
--- a/libpurple/pluginpref.h
+++ b/libpurple/pluginpref.h
@@ -31,20 +31,30 @@ typedef struct _PurplePluginPrefFrame PurplePluginPrefFrame;
typedef struct _PurplePluginPref PurplePluginPref;
/**
+ * PurpleStringFormatType:
+ * @PURPLE_STRING_FORMAT_TYPE_NONE: The string is plain text.
+ * @PURPLE_STRING_FORMAT_TYPE_MULTILINE: The string can have newlines.
+ * @PURPLE_STRING_FORMAT_TYPE_HTML: The string can be in HTML.
+ *
* String format for preferences.
*/
typedef enum
{
- PURPLE_STRING_FORMAT_TYPE_NONE = 0, /**< The string is plain text. */
- PURPLE_STRING_FORMAT_TYPE_MULTILINE = 1 << 0, /**< The string can have newlines. */
- PURPLE_STRING_FORMAT_TYPE_HTML = 1 << 1 /**< The string can be in HTML. */
+ PURPLE_STRING_FORMAT_TYPE_NONE = 0,
+ PURPLE_STRING_FORMAT_TYPE_MULTILINE = 1 << 0,
+ PURPLE_STRING_FORMAT_TYPE_HTML = 1 << 1
} PurpleStringFormatType;
+/**
+ * PurplePluginPrefType:
+ * @PURPLE_PLUGIN_PREF_INFO: no-value label
+ * @PURPLE_PLUGIN_PREF_STRING_FORMAT: The preference has a string value.
+ */
typedef enum {
PURPLE_PLUGIN_PREF_NONE,
PURPLE_PLUGIN_PREF_CHOICE,
- PURPLE_PLUGIN_PREF_INFO, /**< no-value label */
- PURPLE_PLUGIN_PREF_STRING_FORMAT /**< The preference has a string value. */
+ PURPLE_PLUGIN_PREF_INFO,
+ PURPLE_PLUGIN_PREF_STRING_FORMAT
} PurplePluginPrefType;
#include <glib.h>
@@ -58,6 +68,8 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_plugin_pref_frame_new:
+ *
* Create a new plugin preference frame
*
* Returns: a new PurplePluginPrefFrame
@@ -65,29 +77,35 @@ G_BEGIN_DECLS
PurplePluginPrefFrame *purple_plugin_pref_frame_new(void);
/**
- * Destroy a plugin preference frame
- *
+ * purple_plugin_pref_frame_destroy:
* @frame: The plugin frame to destroy
+ *
+ * Destroy a plugin preference frame
*/
void purple_plugin_pref_frame_destroy(PurplePluginPrefFrame *frame);
/**
- * Adds a plugin preference to a plugin preference frame
- *
+ * purple_plugin_pref_frame_add:
* @frame: The plugin frame to add the preference to
* @pref: The preference to add to the frame
+ *
+ * Adds a plugin preference to a plugin preference frame
*/
void purple_plugin_pref_frame_add(PurplePluginPrefFrame *frame, PurplePluginPref *pref);
/**
+ * purple_plugin_pref_frame_get_prefs:
+ * @frame: The plugin frame to get the plugin preferences from
+ *
* Get the plugin preferences from a plugin preference frame
*
- * @frame: The plugin frame to get the plugin preferences from
* Returns: (transfer none): a GList of plugin preferences
*/
GList *purple_plugin_pref_frame_get_prefs(PurplePluginPrefFrame *frame);
/**
+ * purple_plugin_pref_new:
+ *
* Create a new plugin preference
*
* Returns: a new PurplePluginPref
@@ -95,165 +113,195 @@ GList *purple_plugin_pref_frame_get_prefs(PurplePluginPrefFrame *frame);
PurplePluginPref *purple_plugin_pref_new(void);
/**
+ * purple_plugin_pref_new_with_name:
+ * @name: The name of the pref
+ *
* Create a new plugin preference with name
*
- * @name: The name of the pref
* Returns: a new PurplePluginPref
*/
PurplePluginPref *purple_plugin_pref_new_with_name(const char *name);
/**
+ * purple_plugin_pref_new_with_label:
+ * @label: The label to be displayed
+ *
* Create a new plugin preference with label
*
- * @label: The label to be displayed
* Returns: a new PurplePluginPref
*/
PurplePluginPref *purple_plugin_pref_new_with_label(const char *label);
/**
- * Create a new plugin preference with name and label
- *
+ * purple_plugin_pref_new_with_name_and_label:
* @name: The name of the pref
* @label: The label to be displayed
+ *
+ * Create a new plugin preference with name and label
+ *
* Returns: a new PurplePluginPref
*/
PurplePluginPref *purple_plugin_pref_new_with_name_and_label(const char *name, const char *label);
/**
- * Destroy a plugin preference
- *
+ * purple_plugin_pref_destroy:
* @pref: The preference to destroy
+ *
+ * Destroy a plugin preference
*/
void purple_plugin_pref_destroy(PurplePluginPref *pref);
/**
- * Set a plugin pref name
- *
+ * purple_plugin_pref_set_name:
* @pref: The plugin pref
* @name: The name of the pref
+ *
+ * Set a plugin pref name
*/
void purple_plugin_pref_set_name(PurplePluginPref *pref, const char *name);
/**
+ * purple_plugin_pref_get_name:
+ * @pref: The plugin pref
+ *
* Get a plugin pref name
*
- * @pref: The plugin pref
* Returns: The name of the pref
*/
const char *purple_plugin_pref_get_name(PurplePluginPref *pref);
/**
- * Set a plugin pref label
- *
+ * purple_plugin_pref_set_label:
* @pref: The plugin pref
* @label: The label for the plugin pref
+ *
+ * Set a plugin pref label
*/
void purple_plugin_pref_set_label(PurplePluginPref *pref, const char *label);
/**
+ * purple_plugin_pref_get_label:
+ * @pref: The plugin pref
+ *
* Get a plugin pref label
*
- * @pref: The plugin pref
* Returns: The label for the plugin pref
*/
const char *purple_plugin_pref_get_label(PurplePluginPref *pref);
/**
- * Set the bounds for an integer pref
- *
+ * purple_plugin_pref_set_bounds:
* @pref: The plugin pref
* @min: The min value
* @max: The max value
+ *
+ * Set the bounds for an integer pref
*/
void purple_plugin_pref_set_bounds(PurplePluginPref *pref, int min, int max);
/**
- * Get the bounds for an integer pref
- *
+ * purple_plugin_pref_get_bounds:
* @pref: The plugin pref
* @min: The min value
* @max: The max value
+ *
+ * Get the bounds for an integer pref
*/
void purple_plugin_pref_get_bounds(PurplePluginPref *pref, int *min, int *max);
/**
- * Set the type of a plugin pref
- *
+ * purple_plugin_pref_set_type:
* @pref: The plugin pref
* @type: The type
+ *
+ * Set the type of a plugin pref
*/
void purple_plugin_pref_set_type(PurplePluginPref *pref, PurplePluginPrefType type);
/**
+ * purple_plugin_pref_get_type:
+ * @pref: The plugin pref
+ *
* Get the type of a plugin pref
*
- * @pref: The plugin pref
* Returns: The type
*/
PurplePluginPrefType purple_plugin_pref_get_type(PurplePluginPref *pref);
/**
- * Set the choices for a choices plugin pref
- *
+ * purple_plugin_pref_add_choice:
* @pref: The plugin pref
* @label: The label for the choice
* @choice: A gpointer of the choice
+ *
+ * Set the choices for a choices plugin pref
*/
void purple_plugin_pref_add_choice(PurplePluginPref *pref, const char *label, gpointer choice);
/**
+ * purple_plugin_pref_get_choices:
+ * @pref: The plugin pref
+ *
* Get the choices for a choices plugin pref
*
- * @pref: The plugin pref
* Returns: (transfer none): GList of the choices
*/
GList *purple_plugin_pref_get_choices(PurplePluginPref *pref);
/**
- * Set the max length for a string plugin pref
- *
+ * purple_plugin_pref_set_max_length:
* @pref: The plugin pref
* @max_length: The max length of the string
+ *
+ * Set the max length for a string plugin pref
*/
void purple_plugin_pref_set_max_length(PurplePluginPref *pref, unsigned int max_length);
/**
+ * purple_plugin_pref_get_max_length:
+ * @pref: The plugin pref
+ *
* Get the max length for a string plugin pref
*
- * @pref: The plugin pref
* Returns: the max length
*/
unsigned int purple_plugin_pref_get_max_length(PurplePluginPref *pref);
/**
- * Sets the masking of a string plugin pref
- *
+ * purple_plugin_pref_set_masked:
* @pref: The plugin pref
* @mask: The value to set
+ *
+ * Sets the masking of a string plugin pref
*/
void purple_plugin_pref_set_masked(PurplePluginPref *pref, gboolean mask);
/**
+ * purple_plugin_pref_get_masked:
+ * @pref: The plugin pref
+ *
* Gets the masking of a string plugin pref
*
- * @pref: The plugin pref
* Returns: The masking
*/
gboolean purple_plugin_pref_get_masked(PurplePluginPref *pref);
/**
- * Sets the format type for a formattable-string plugin pref. You need to set the
- * pref type to PURPLE_PLUGIN_PREF_STRING_FORMAT first before setting the format.
- *
+ * purple_plugin_pref_set_format_type:
* @pref: The plugin pref
* @format: The format of the string
+ *
+ * Sets the format type for a formattable-string plugin pref. You need to set the
+ * pref type to PURPLE_PLUGIN_PREF_STRING_FORMAT first before setting the format.
*/
void purple_plugin_pref_set_format_type(PurplePluginPref *pref, PurpleStringFormatType format);
/**
+ * purple_plugin_pref_get_format_type:
+ * @pref: The plugin pref
+ *
* Gets the format type of the formattable-string plugin pref.
*
- * @pref: The plugin pref
* Returns: The format of the pref
*/
PurpleStringFormatType purple_plugin_pref_get_format_type(PurplePluginPref *pref);
diff --git a/libpurple/pounce.h b/libpurple/pounce.h
index 14d0ccbe16..fa9e95af43 100644
--- a/libpurple/pounce.h
+++ b/libpurple/pounce.h
@@ -32,31 +32,53 @@ typedef struct _PurplePounce PurplePounce;
#include "account.h"
/**
+ * PurplePounceEvent:
+ * @PURPLE_POUNCE_NONE: No events.
+ * @PURPLE_POUNCE_SIGNON: The buddy signed on.
+ * @PURPLE_POUNCE_SIGNOFF: The buddy signed off.
+ * @PURPLE_POUNCE_AWAY: The buddy went away.
+ * @PURPLE_POUNCE_AWAY_RETURN: The buddy returned from away.
+ * @PURPLE_POUNCE_IDLE: The buddy became idle.
+ * @PURPLE_POUNCE_IDLE_RETURN: The buddy is no longer idle.
+ * @PURPLE_POUNCE_TYPING: The buddy started typing.
+ * @PURPLE_POUNCE_TYPED: The buddy has entered text.
+ * @PURPLE_POUNCE_TYPING_STOPPED: The buddy stopped typing.
+ * @PURPLE_POUNCE_MESSAGE_RECEIVED: The buddy sent a message.
+ *
* Events that trigger buddy pounces.
*/
typedef enum
{
- PURPLE_POUNCE_NONE = 0x000, /**< No events. */
- PURPLE_POUNCE_SIGNON = 0x001, /**< The buddy signed on. */
- PURPLE_POUNCE_SIGNOFF = 0x002, /**< The buddy signed off. */
- PURPLE_POUNCE_AWAY = 0x004, /**< The buddy went away. */
- PURPLE_POUNCE_AWAY_RETURN = 0x008, /**< The buddy returned from away. */
- PURPLE_POUNCE_IDLE = 0x010, /**< The buddy became idle. */
- PURPLE_POUNCE_IDLE_RETURN = 0x020, /**< The buddy is no longer idle. */
- PURPLE_POUNCE_TYPING = 0x040, /**< The buddy started typing. */
- PURPLE_POUNCE_TYPED = 0x080, /**< The buddy has entered text. */
- PURPLE_POUNCE_TYPING_STOPPED = 0x100, /**< The buddy stopped typing. */
- PURPLE_POUNCE_MESSAGE_RECEIVED = 0x200 /**< The buddy sent a message */
+ PURPLE_POUNCE_NONE = 0x000,
+ PURPLE_POUNCE_SIGNON = 0x001,
+ PURPLE_POUNCE_SIGNOFF = 0x002,
+ PURPLE_POUNCE_AWAY = 0x004,
+ PURPLE_POUNCE_AWAY_RETURN = 0x008,
+ PURPLE_POUNCE_IDLE = 0x010,
+ PURPLE_POUNCE_IDLE_RETURN = 0x020,
+ PURPLE_POUNCE_TYPING = 0x040,
+ PURPLE_POUNCE_TYPED = 0x080,
+ PURPLE_POUNCE_TYPING_STOPPED = 0x100,
+ PURPLE_POUNCE_MESSAGE_RECEIVED = 0x200
} PurplePounceEvent;
+/**
+ * PurplePounceOption:
+ * @PURPLE_POUNCE_OPTION_NONE: No Option
+ * @PURPLE_POUNCE_OPTION_AWAY: Pounce only when away
+ */
typedef enum
{
- PURPLE_POUNCE_OPTION_NONE = 0x00, /**< No Option */
- PURPLE_POUNCE_OPTION_AWAY = 0x01 /**< Pounce only when away */
+ PURPLE_POUNCE_OPTION_NONE = 0x00,
+ PURPLE_POUNCE_OPTION_AWAY = 0x01
} PurplePounceOption;
-/** A pounce callback. */
+/**
+ * PurplePounceCb:
+ *
+ * A pounce callback.
+ */
typedef void (*PurplePounceCb)(PurplePounce *, PurplePounceEvent, void *);
G_BEGIN_DECLS
@@ -67,14 +89,15 @@ G_BEGIN_DECLS
/*@{*/
/**
- * Creates a new buddy pounce.
- *
+ * purple_pounce_new:
* @ui_type: The type of UI the pounce is for.
* @pouncer: The account that will pounce.
* @pouncee: The buddy to pounce on.
* @event: The event(s) to pounce on.
* @option: Pounce options.
*
+ * Creates a new buddy pounce.
+ *
* Returns: The new buddy pounce structure.
*/
PurplePounce *purple_pounce_new(const char *ui_type, PurpleAccount *pouncer,
@@ -82,169 +105,188 @@ PurplePounce *purple_pounce_new(const char *ui_type, PurpleAccount *pouncer,
PurplePounceOption option);
/**
- * Destroys a buddy pounce.
- *
+ * purple_pounce_destroy:
* @pounce: The buddy pounce.
+ *
+ * Destroys a buddy pounce.
*/
void purple_pounce_destroy(PurplePounce *pounce);
/**
- * Destroys all buddy pounces for the account
- *
+ * purple_pounce_destroy_all_by_account:
* @account: The account to remove all pounces from.
+ *
+ * Destroys all buddy pounces for the account
*/
void purple_pounce_destroy_all_by_account(PurpleAccount *account);
/**
- * Destroys all buddy pounces for a buddy
- *
+ * purple_pounce_destroy_all_by_buddy:
* @buddy: The buddy whose pounces are to be removed
+ *
+ * Destroys all buddy pounces for a buddy
*/
void purple_pounce_destroy_all_by_buddy(PurpleBuddy *buddy);
/**
- * Sets the events a pounce should watch for.
- *
+ * purple_pounce_set_events:
* @pounce: The buddy pounce.
* @events: The events to watch for.
+ *
+ * Sets the events a pounce should watch for.
*/
void purple_pounce_set_events(PurplePounce *pounce, PurplePounceEvent events);
/**
- * Sets the options for a pounce.
- *
+ * purple_pounce_set_options:
* @pounce: The buddy pounce.
* @options: The options for the pounce.
+ *
+ * Sets the options for a pounce.
*/
void purple_pounce_set_options(PurplePounce *pounce, PurplePounceOption options);
/**
- * Sets the account that will do the pouncing.
- *
+ * purple_pounce_set_pouncer:
* @pounce: The buddy pounce.
* @pouncer: The account that will pounce.
+ *
+ * Sets the account that will do the pouncing.
*/
void purple_pounce_set_pouncer(PurplePounce *pounce, PurpleAccount *pouncer);
/**
- * Sets the buddy a pounce should pounce on.
- *
+ * purple_pounce_set_pouncee:
* @pounce: The buddy pounce.
* @pouncee: The buddy to pounce on.
+ *
+ * Sets the buddy a pounce should pounce on.
*/
void purple_pounce_set_pouncee(PurplePounce *pounce, const char *pouncee);
/**
- * Sets whether or not the pounce should be saved after execution.
- *
+ * purple_pounce_set_save:
* @pounce: The buddy pounce.
* @save: %TRUE if the pounce should be saved, or %FALSE otherwise.
+ *
+ * Sets whether or not the pounce should be saved after execution.
*/
void purple_pounce_set_save(PurplePounce *pounce, gboolean save);
/**
- * Registers an action type for the pounce.
- *
+ * purple_pounce_action_register:
* @pounce: The buddy pounce.
* @name: The action name.
+ *
+ * Registers an action type for the pounce.
*/
void purple_pounce_action_register(PurplePounce *pounce, const char *name);
/**
- * Enables or disables an action for a pounce.
- *
+ * purple_pounce_action_set_enabled:
* @pounce: The buddy pounce.
* @action: The name of the action.
* @enabled: The enabled state.
+ *
+ * Enables or disables an action for a pounce.
*/
void purple_pounce_action_set_enabled(PurplePounce *pounce, const char *action,
gboolean enabled);
/**
- * Sets a value for an attribute in an action.
- *
- * If @a value is %NULL, the value will be unset.
- *
+ * purple_pounce_action_set_attribute:
* @pounce: The buddy pounce.
* @action: The action name.
* @attr: The attribute name.
* @value: The value.
+ *
+ * Sets a value for an attribute in an action.
+ *
+ * If @value is %NULL, the value will be unset.
*/
void purple_pounce_action_set_attribute(PurplePounce *pounce, const char *action,
const char *attr, const char *value);
/**
- * Sets the pounce-specific data.
- *
+ * purple_pounce_set_data:
* @pounce: The buddy pounce.
* @data: Data specific to the pounce.
+ *
+ * Sets the pounce-specific data.
*/
void purple_pounce_set_data(PurplePounce *pounce, void *data);
/**
- * Returns the events a pounce should watch for.
- *
+ * purple_pounce_get_events:
* @pounce: The buddy pounce.
*
+ * Returns the events a pounce should watch for.
+ *
* Returns: The events the pounce is watching for.
*/
PurplePounceEvent purple_pounce_get_events(const PurplePounce *pounce);
/**
- * Returns the options for a pounce.
- *
+ * purple_pounce_get_options:
* @pounce: The buddy pounce.
*
+ * Returns the options for a pounce.
+ *
* Returns: The options for the pounce.
*/
PurplePounceOption purple_pounce_get_options(const PurplePounce *pounce);
/**
- * Returns the account that will do the pouncing.
- *
+ * purple_pounce_get_pouncer:
* @pounce: The buddy pounce.
*
+ * Returns the account that will do the pouncing.
+ *
* Returns: The account that will pounce.
*/
PurpleAccount *purple_pounce_get_pouncer(const PurplePounce *pounce);
/**
- * Returns the buddy a pounce should pounce on.
- *
+ * purple_pounce_get_pouncee:
* @pounce: The buddy pounce.
*
+ * Returns the buddy a pounce should pounce on.
+ *
* Returns: The buddy to pounce on.
*/
const char *purple_pounce_get_pouncee(const PurplePounce *pounce);
/**
- * Returns whether or not the pounce should save after execution.
- *
+ * purple_pounce_get_save:
* @pounce: The buddy pounce.
*
+ * Returns whether or not the pounce should save after execution.
+ *
* Returns: %TRUE if the pounce should be saved after execution, or
* %FALSE otherwise.
*/
gboolean purple_pounce_get_save(const PurplePounce *pounce);
/**
- * Returns whether or not an action is enabled.
- *
+ * purple_pounce_action_is_enabled:
* @pounce: The buddy pounce.
* @action: The action name.
*
+ * Returns whether or not an action is enabled.
+ *
* Returns: %TRUE if the action is enabled, or %FALSE otherwise.
*/
gboolean purple_pounce_action_is_enabled(const PurplePounce *pounce,
const char *action);
/**
- * Returns the value for an attribute in an action.
- *
+ * purple_pounce_action_get_attribute:
* @pounce: The buddy pounce.
* @action: The action name.
* @attr: The attribute name.
*
+ * Returns the value for an attribute in an action.
+ *
* Returns: The attribute value, if it exists, or %NULL.
*/
const char *purple_pounce_action_get_attribute(const PurplePounce *pounce,
@@ -252,20 +294,22 @@ const char *purple_pounce_action_get_attribute(const PurplePounce *pounce,
const char *attr);
/**
- * Returns the pounce-specific data.
- *
+ * purple_pounce_get_data:
* @pounce: The buddy pounce.
*
+ * Returns the pounce-specific data.
+ *
* Returns: The data specific to a buddy pounce.
*/
void *purple_pounce_get_data(const PurplePounce *pounce);
/**
- * Executes a pounce with the specified pouncer, pouncee, and event type.
- *
+ * purple_pounce_execute:
* @pouncer: The account that will do the pouncing.
* @pouncee: The buddy that is being pounced.
* @events: The events that triggered the pounce.
+ *
+ * Executes a pounce with the specified pouncer, pouncee, and event type.
*/
void purple_pounce_execute(const PurpleAccount *pouncer, const char *pouncee,
PurplePounceEvent events);
@@ -278,37 +322,42 @@ void purple_pounce_execute(const PurpleAccount *pouncer, const char *pouncee,
/*@{*/
/**
- * Finds a pounce with the specified event(s) and buddy.
- *
+ * purple_find_pounce:
* @pouncer: The account to match against.
* @pouncee: The buddy to match against.
* @events: The event(s) to match against.
*
+ * Finds a pounce with the specified event(s) and buddy.
+ *
* Returns: The pounce if found, or %NULL otherwise.
*/
PurplePounce *purple_find_pounce(const PurpleAccount *pouncer,
const char *pouncee, PurplePounceEvent events);
/**
- * Registers a pounce handler for a UI.
- *
+ * purple_pounces_register_handler:
* @ui: The UI name.
* @cb: The callback function.
* @new_pounce: The function called when a pounce is created.
* @free_pounce: The function called when a pounce is freed.
+ *
+ * Registers a pounce handler for a UI.
*/
void purple_pounces_register_handler(const char *ui, PurplePounceCb cb,
void (*new_pounce)(PurplePounce *pounce),
void (*free_pounce)(PurplePounce *pounce));
/**
- * Unregisters a pounce handle for a UI.
- *
+ * purple_pounces_unregister_handler:
* @ui: The UI name.
+ *
+ * Unregisters a pounce handle for a UI.
*/
void purple_pounces_unregister_handler(const char *ui);
/**
+ * purple_pounces_get_all:
+ *
* Returns a list of all registered buddy pounces.
*
* Returns: (transfer none): The list of buddy pounces.
@@ -316,16 +365,19 @@ void purple_pounces_unregister_handler(const char *ui);
GList *purple_pounces_get_all(void);
/**
- * Returns a list of registered buddy pounces for the ui-type.
- *
+ * purple_pounces_get_all_for_ui:
* @ui: The ID of the UI using the core.
*
+ * Returns a list of registered buddy pounces for the ui-type.
+ *
* Returns: The list of buddy pounces. The list should be freed by
* the caller when it's no longer used.
*/
GList *purple_pounces_get_all_for_ui(const char *ui);
/**
+ * purple_pounces_get_handle:
+ *
* Returns the buddy pounce subsystem handle.
*
* Returns: The subsystem handle.
@@ -333,11 +385,15 @@ GList *purple_pounces_get_all_for_ui(const char *ui);
void *purple_pounces_get_handle(void);
/**
+ * purple_pounces_init:
+ *
* Initializes the pounces subsystem.
*/
void purple_pounces_init(void);
/**
+ * purple_pounces_uninit:
+ *
* Uninitializes the pounces subsystem.
*/
void purple_pounces_uninit(void);
diff --git a/libpurple/prefs.h b/libpurple/prefs.h
index 683e2a6cd8..b3041d5251 100644
--- a/libpurple/prefs.h
+++ b/libpurple/prefs.h
@@ -30,25 +30,33 @@
#include <glib.h>
/**
+ * PurplePrefType:
+ * @PURPLE_PREF_NONE: No type.
+ * @PURPLE_PREF_BOOLEAN: Boolean.
+ * @PURPLE_PREF_INT: Integer.
+ * @PURPLE_PREF_STRING: String.
+ * @PURPLE_PREF_STRING_LIST: List of strings.
+ * @PURPLE_PREF_PATH: Path.
+ * @PURPLE_PREF_PATH_LIST: List of paths.
+ *
* Preference data types.
*/
typedef enum
{
- PURPLE_PREF_NONE, /**< No type. */
- PURPLE_PREF_BOOLEAN, /**< Boolean. */
- PURPLE_PREF_INT, /**< Integer. */
- PURPLE_PREF_STRING, /**< String. */
- PURPLE_PREF_STRING_LIST, /**< List of strings. */
- PURPLE_PREF_PATH, /**< Path. */
- PURPLE_PREF_PATH_LIST /**< List of paths. */
+ PURPLE_PREF_NONE,
+ PURPLE_PREF_BOOLEAN,
+ PURPLE_PREF_INT,
+ PURPLE_PREF_STRING,
+ PURPLE_PREF_STRING_LIST,
+ PURPLE_PREF_PATH,
+ PURPLE_PREF_PATH_LIST
} PurplePrefType;
/**
- * The type of callbacks for preference changes.
- *
+ * PurplePrefCallback:
* @name: the name of the preference which has changed.
- * @type: the type of the preferenced named @a name
+ * @type: the type of the preferenced named @name
* @val: the new value of the preferencs; should be cast to the correct
* type. For instance, to recover the value of a #PURPLE_PREF_INT
* preference, use <tt>GPOINTER_TO_INT(val)</tt>. Alternatively,
@@ -57,6 +65,8 @@ typedef enum
* @data: Arbitrary data specified when the callback was connected with
* purple_prefs_connect_callback().
*
+ * The type of callbacks for preference changes.
+ *
* @see purple_prefs_connect_callback()
*/
typedef void (*PurplePrefCallback) (const char *name, PurplePrefType type,
@@ -72,6 +82,8 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_prefs_get_handle:
+ *
* Returns the prefs subsystem handle.
*
* Returns: The prefs subsystem handle.
@@ -79,51 +91,61 @@ G_BEGIN_DECLS
void *purple_prefs_get_handle(void);
/**
+ * purple_prefs_init:
+ *
* Initialize core prefs
*/
void purple_prefs_init(void);
/**
+ * purple_prefs_uninit:
+ *
* Uninitializes the prefs subsystem.
*/
void purple_prefs_uninit(void);
/**
- * Add a new typeless pref.
- *
+ * purple_prefs_add_none:
* @name: The name of the pref
+ *
+ * Add a new typeless pref.
*/
void purple_prefs_add_none(const char *name);
/**
- * Add a new boolean pref.
- *
+ * purple_prefs_add_bool:
* @name: The name of the pref
* @value: The initial value to set
+ *
+ * Add a new boolean pref.
*/
void purple_prefs_add_bool(const char *name, gboolean value);
/**
- * Add a new integer pref.
- *
+ * purple_prefs_add_int:
* @name: The name of the pref
* @value: The initial value to set
+ *
+ * Add a new integer pref.
*/
void purple_prefs_add_int(const char *name, int value);
/**
- * Add a new string pref.
- *
+ * purple_prefs_add_string:
* @name: The name of the pref
* @value: The initial value to set
+ *
+ * Add a new string pref.
*/
void purple_prefs_add_string(const char *name, const char *value);
/**
- * Add a new string list pref.
- *
+ * purple_prefs_add_string_list:
* @name: The name of the pref
* @value: The initial value to set
+ *
+ * Add a new string list pref.
+ *
* Note: This function takes a copy of the strings in the value list. The list
* itself and original copies of the strings are up to the caller to
* free.
@@ -131,18 +153,21 @@ void purple_prefs_add_string(const char *name, const char *value);
void purple_prefs_add_string_list(const char *name, GList *value);
/**
- * Add a new path pref.
- *
+ * purple_prefs_add_path:
* @name: The name of the pref
* @value: The initial value to set
+ *
+ * Add a new path pref.
*/
void purple_prefs_add_path(const char *name, const char *value);
/**
- * Add a new path list pref.
- *
+ * purple_prefs_add_path_list:
* @name: The name of the pref
* @value: The initial value to set
+ *
+ * Add a new path list pref.
+ *
* Note: This function takes a copy of the strings in the value list. The list
* itself and original copies of the strings are up to the caller to
* free.
@@ -151,150 +176,179 @@ void purple_prefs_add_path_list(const char *name, GList *value);
/**
- * Remove a pref.
- *
+ * purple_prefs_remove:
* @name: The name of the pref
+ *
+ * Remove a pref.
*/
void purple_prefs_remove(const char *name);
/**
- * Rename a pref
- *
+ * purple_prefs_rename:
* @oldname: The old name of the pref
* @newname: The new name for the pref
+ *
+ * Rename a pref
*/
void purple_prefs_rename(const char *oldname, const char *newname);
/**
- * Rename a boolean pref, toggling it's value
- *
+ * purple_prefs_rename_boolean_toggle:
* @oldname: The old name of the pref
* @newname: The new name for the pref
+ *
+ * Rename a boolean pref, toggling it's value
*/
void purple_prefs_rename_boolean_toggle(const char *oldname, const char *newname);
/**
+ * purple_prefs_destroy:
+ *
* Remove all prefs.
*/
void purple_prefs_destroy(void);
/**
- * Set boolean pref value
- *
+ * purple_prefs_set_bool:
* @name: The name of the pref
* @value: The value to set
+ *
+ * Set boolean pref value
*/
void purple_prefs_set_bool(const char *name, gboolean value);
/**
- * Set integer pref value
- *
+ * purple_prefs_set_int:
* @name: The name of the pref
* @value: The value to set
+ *
+ * Set integer pref value
*/
void purple_prefs_set_int(const char *name, int value);
/**
- * Set string pref value
- *
+ * purple_prefs_set_string:
* @name: The name of the pref
* @value: The value to set
+ *
+ * Set string pref value
*/
void purple_prefs_set_string(const char *name, const char *value);
/**
- * Set string list pref value
- *
+ * purple_prefs_set_string_list:
* @name: The name of the pref
* @value: The value to set
+ *
+ * Set string list pref value
*/
void purple_prefs_set_string_list(const char *name, GList *value);
/**
- * Set path pref value
- *
+ * purple_prefs_set_path:
* @name: The name of the pref
* @value: The value to set
+ *
+ * Set path pref value
*/
void purple_prefs_set_path(const char *name, const char *value);
/**
- * Set path list pref value
- *
+ * purple_prefs_set_path_list:
* @name: The name of the pref
* @value: The value to set
+ *
+ * Set path list pref value
*/
void purple_prefs_set_path_list(const char *name, GList *value);
/**
+ * purple_prefs_exists:
+ * @name: The name of the pref
+ *
* Check if a pref exists
*
- * @name: The name of the pref
* Returns: TRUE if the pref exists. Otherwise FALSE.
*/
gboolean purple_prefs_exists(const char *name);
/**
+ * purple_prefs_get_type:
+ * @name: The name of the pref
+ *
* Get pref type
*
- * @name: The name of the pref
* Returns: The type of the pref
*/
PurplePrefType purple_prefs_get_type(const char *name);
/**
+ * purple_prefs_get_bool:
+ * @name: The name of the pref
+ *
* Get boolean pref value
*
- * @name: The name of the pref
* Returns: The value of the pref
*/
gboolean purple_prefs_get_bool(const char *name);
/**
+ * purple_prefs_get_int:
+ * @name: The name of the pref
+ *
* Get integer pref value
*
- * @name: The name of the pref
* Returns: The value of the pref
*/
int purple_prefs_get_int(const char *name);
/**
+ * purple_prefs_get_string:
+ * @name: The name of the pref
+ *
* Get string pref value
*
- * @name: The name of the pref
* Returns: The value of the pref
*/
const char *purple_prefs_get_string(const char *name);
/**
+ * purple_prefs_get_string_list:
+ * @name: The name of the pref
+ *
* Get string list pref value
*
- * @name: The name of the pref
* Returns: The value of the pref
*/
GList *purple_prefs_get_string_list(const char *name);
/**
+ * purple_prefs_get_path:
+ * @name: The name of the pref
+ *
* Get path pref value
*
- * @name: The name of the pref
* Returns: The value of the pref
*/
const char *purple_prefs_get_path(const char *name);
/**
+ * purple_prefs_get_path_list:
+ * @name: The name of the pref
+ *
* Get path list pref value
*
- * @name: The name of the pref
* Returns: The value of the pref
*/
GList *purple_prefs_get_path_list(const char *name);
/**
+ * purple_prefs_get_children_names:
+ * @name: The parent pref
+ *
* Returns a list of children for a pref
*
- * @name: The parent pref
* Returns: A list of newly allocated strings denoting the names of the children.
* Returns %NULL if there are no children or if pref doesn't exist.
* The caller must free all the strings and the list.
@@ -302,13 +356,14 @@ GList *purple_prefs_get_path_list(const char *name);
GList *purple_prefs_get_children_names(const char *name);
/**
- * Add a callback to a pref (and its children)
- *
+ * purple_prefs_connect_callback:
* @handle: The handle of the receiver.
* @name: The name of the preference
* @cb: The callback function
* @data: The data to pass to the callback function.
*
+ * Add a callback to a pref (and its children)
+ *
* Returns: An id to disconnect the callback
*
* @see purple_prefs_disconnect_callback
@@ -317,21 +372,29 @@ guint purple_prefs_connect_callback(void *handle, const char *name, PurplePrefCa
gpointer data);
/**
+ * purple_prefs_disconnect_callback:
+ *
* Remove a callback to a pref
*/
void purple_prefs_disconnect_callback(guint callback_id);
/**
+ * purple_prefs_disconnect_by_handle:
+ *
* Remove all pref callbacks by handle
*/
void purple_prefs_disconnect_by_handle(void *handle);
/**
+ * purple_prefs_trigger_callback:
+ *
* Trigger callbacks as if the pref changed
*/
void purple_prefs_trigger_callback(const char *name);
/**
+ * purple_prefs_load:
+ *
* Read preferences
*/
gboolean purple_prefs_load(void);
diff --git a/libpurple/presence.h b/libpurple/presence.h
index 7dc2914da2..32f8184ba9 100644
--- a/libpurple/presence.h
+++ b/libpurple/presence.h
@@ -33,9 +33,7 @@
#define PURPLE_IS_PRESENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_PRESENCE))
#define PURPLE_PRESENCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_PRESENCE, PurplePresenceClass))
-/** @copydoc _PurplePresence */
typedef struct _PurplePresence PurplePresence;
-/** @copydoc _PurplePresenceClass */
typedef struct _PurplePresenceClass PurplePresenceClass;
#define PURPLE_TYPE_ACCOUNT_PRESENCE (purple_account_presence_get_type())
@@ -45,9 +43,7 @@ typedef struct _PurplePresenceClass PurplePresenceClass;
#define PURPLE_IS_ACCOUNT_PRESENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_ACCOUNT_PRESENCE))
#define PURPLE_ACCOUNT_PRESENCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_ACCOUNT_PRESENCE, PurpleAccountPresenceClass))
-/** @copydoc _PurpleAccountPresence */
typedef struct _PurpleAccountPresence PurpleAccountPresence;
-/** @copydoc _PurpleAccountPresenceClass */
typedef struct _PurpleAccountPresenceClass PurpleAccountPresenceClass;
#define PURPLE_TYPE_BUDDY_PRESENCE (purple_buddy_presence_get_type())
@@ -57,9 +53,7 @@ typedef struct _PurpleAccountPresenceClass PurpleAccountPresenceClass;
#define PURPLE_IS_BUDDY_PRESENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_BUDDY_PRESENCE))
#define PURPLE_BUDDY_PRESENCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_BUDDY_PRESENCE, PurpleBuddyPresenceClass))
-/** @copydoc _PurpleBuddyPresence */
typedef struct _PurpleBuddyPresence PurpleBuddyPresence;
-/** @copydoc _PurpleBuddyPresenceClass */
typedef struct _PurpleBuddyPresenceClass PurpleBuddyPresenceClass;
#include "account.h"
@@ -67,6 +61,8 @@ typedef struct _PurpleBuddyPresenceClass PurpleBuddyPresenceClass;
#include "status.h"
/**
+ * PurplePresence:
+ *
* A PurplePresence is like a collection of PurpleStatuses (plus some
* other random info). For any buddy, or for any one of your accounts,
* or for any person with which you're chatting, you may know various
@@ -85,7 +81,11 @@ struct _PurplePresence
GObject gparent;
};
-/** Base class for all #PurplePresence's */
+/**
+ * PurplePresenceClass:
+ *
+ * Base class for all #PurplePresence's
+ */
struct _PurplePresenceClass {
GObjectClass parent_class;
@@ -103,6 +103,8 @@ struct _PurplePresenceClass {
};
/**
+ * PurpleAccountPresence:
+ *
* A presence for an account
*/
struct _PurpleAccountPresence
@@ -110,7 +112,11 @@ struct _PurpleAccountPresence
PurplePresence parent;
};
-/** Base class for all #PurpleAccountPresence's */
+/**
+ * PurpleAccountPresenceClass:
+ *
+ * Base class for all #PurpleAccountPresence's
+ */
struct _PurpleAccountPresenceClass {
PurplePresenceClass parent_class;
@@ -122,6 +128,8 @@ struct _PurpleAccountPresenceClass {
};
/**
+ * PurpleBuddyPresence:
+ *
* A presence for a buddy
*/
struct _PurpleBuddyPresence
@@ -129,7 +137,11 @@ struct _PurpleBuddyPresence
PurplePresence parent;
};
-/** Base class for all #PurpleBuddyPresence's */
+/**
+ * PurpleBuddyPresenceClass:
+ *
+ * Base class for all #PurpleBuddyPresence's
+ */
struct _PurpleBuddyPresenceClass {
PurplePresenceClass parent_class;
@@ -148,24 +160,28 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_account_presence_get_type:
+ *
* Returns the GType for the PurpleAccountPresence object.
*/
GType purple_account_presence_get_type(void);
/**
- * Creates a presence for an account.
- *
+ * purple_account_presence_new:
* @account: The account to associate with the presence.
*
+ * Creates a presence for an account.
+ *
* Returns: The new presence.
*/
PurpleAccountPresence *purple_account_presence_new(PurpleAccount *account);
/**
- * Returns an account presence's account.
- *
+ * purple_account_presence_get_account:
* @presence: The presence.
*
+ * Returns an account presence's account.
+ *
* Returns: The presence's account.
*/
PurpleAccount *purple_account_presence_get_account(const PurpleAccountPresence *presence);
@@ -178,37 +194,42 @@ PurpleAccount *purple_account_presence_get_account(const PurpleAccountPresence *
/*@{*/
/**
+ * purple_buddy_presence_get_type:
+ *
* Returns the GType for the PurpleBuddyPresence object.
*/
GType purple_buddy_presence_get_type(void);
/**
- * Creates a presence for a buddy.
- *
+ * purple_buddy_presence_new:
* @buddy: The buddy to associate with the presence.
*
+ * Creates a presence for a buddy.
+ *
* Returns: The new presence.
*/
PurpleBuddyPresence *purple_buddy_presence_new(PurpleBuddy *buddy);
/**
- * Returns the buddy presence's buddy.
- *
+ * purple_buddy_presence_get_buddy:
* @presence: The presence.
*
+ * Returns the buddy presence's buddy.
+ *
* Returns: The presence's buddy.
*/
PurpleBuddy *purple_buddy_presence_get_buddy(const PurpleBuddyPresence *presence);
/**
- * Compares two buddy presences for availability.
- *
+ * purple_buddy_presence_compare:
* @buddy_presence1: The first presence.
* @buddy_presence2: The second presence.
*
- * Returns: -1 if @a buddy_presence1 is more available than @a buddy_presence2.
- * 0 if @a buddy_presence1 is equal to @a buddy_presence2.
- * 1 if @a buddy_presence1 is less available than @a buddy_presence2.
+ * Compares two buddy presences for availability.
+ *
+ * Returns: -1 if @buddy_presence1 is more available than @buddy_presence2.
+ * 0 if @buddy_presence1 is equal to @buddy_presence2.
+ * 1 if @buddy_presence1 is less available than @buddy_presence2.
*/
gint purple_buddy_presence_compare(const PurpleBuddyPresence *buddy_presence1,
const PurpleBuddyPresence *buddy_presence2);
@@ -221,138 +242,152 @@ gint purple_buddy_presence_compare(const PurpleBuddyPresence *buddy_presence1,
/*@{*/
/**
+ * purple_presence_get_type:
+ *
* Returns the GType for the PurplePresence object.
*/
GType purple_presence_get_type(void);
/**
+ * purple_presence_set_status_active:
+ * @presence: The presence.
+ * @status_id: The ID of the status.
+ * @active: The active state.
+ *
* Sets the active state of a status in a presence.
*
* Only independent statuses can be set unactive. Normal statuses can only
* be set active, so if you wish to disable a status, set another
* non-independent status to active, or use purple_presence_switch_status().
- *
- * @presence: The presence.
- * @status_id: The ID of the status.
- * @active: The active state.
*/
void purple_presence_set_status_active(PurplePresence *presence,
const char *status_id, gboolean active);
/**
+ * purple_presence_switch_status:
+ * @presence: The presence.
+ * @status_id: The status ID to switch to.
+ *
* Switches the active status in a presence.
*
* This is similar to purple_presence_set_status_active(), except it won't
* activate independent statuses.
- *
- * @presence: The presence.
- * @status_id: The status ID to switch to.
*/
void purple_presence_switch_status(PurplePresence *presence,
const char *status_id);
/**
- * Sets the idle state and time on a presence.
- *
+ * purple_presence_set_idle:
* @presence: The presence.
* @idle: The idle state.
- * @idle_time: The idle time, if @a idle is TRUE. This
+ * @idle_time: The idle time, if @idle is TRUE. This
* is the time at which the user became idle,
* in seconds since the epoch. If this value is
* unknown then 0 should be used.
+ *
+ * Sets the idle state and time on a presence.
*/
void purple_presence_set_idle(PurplePresence *presence, gboolean idle,
time_t idle_time);
/**
- * Sets the login time on a presence.
- *
+ * purple_presence_set_login_time:
* @presence: The presence.
* @login_time: The login time.
+ *
+ * Sets the login time on a presence.
*/
void purple_presence_set_login_time(PurplePresence *presence, time_t login_time);
/**
- * Returns all the statuses in a presence.
- *
+ * purple_presence_get_statuses:
* @presence: The presence.
*
+ * Returns all the statuses in a presence.
+ *
* Returns: (transfer none): The statuses.
*/
GList *purple_presence_get_statuses(const PurplePresence *presence);
/**
- * Returns the status with the specified ID from a presence.
- *
+ * purple_presence_get_status:
* @presence: The presence.
* @status_id: The ID of the status.
*
+ * Returns the status with the specified ID from a presence.
+ *
* Returns: The status if found, or NULL.
*/
PurpleStatus *purple_presence_get_status(const PurplePresence *presence,
const char *status_id);
/**
- * Returns the active exclusive status from a presence.
- *
+ * purple_presence_get_active_status:
* @presence: The presence.
*
+ * Returns the active exclusive status from a presence.
+ *
* Returns: The active exclusive status.
*/
PurpleStatus *purple_presence_get_active_status(const PurplePresence *presence);
/**
+ * purple_presence_is_available:
+ * @presence: The presence.
+ *
* Returns whether or not a presence is available.
*
* Available presences are online and possibly invisible, but not away or idle.
*
- * @presence: The presence.
- *
* Returns: TRUE if the presence is available, or FALSE otherwise.
*/
gboolean purple_presence_is_available(const PurplePresence *presence);
/**
- * Returns whether or not a presence is online.
- *
+ * purple_presence_is_online:
* @presence: The presence.
*
+ * Returns whether or not a presence is online.
+ *
* Returns: TRUE if the presence is online, or FALSE otherwise.
*/
gboolean purple_presence_is_online(const PurplePresence *presence);
/**
+ * purple_presence_is_status_active:
+ * @presence: The presence.
+ * @status_id: The ID of the status.
+ *
* Returns whether or not a status in a presence is active.
*
* A status is active if itself or any of its sub-statuses are active.
*
- * @presence: The presence.
- * @status_id: The ID of the status.
- *
* Returns: TRUE if the status is active, or FALSE.
*/
gboolean purple_presence_is_status_active(const PurplePresence *presence,
const char *status_id);
/**
+ * purple_presence_is_status_primitive_active:
+ * @presence: The presence.
+ * @primitive: The status primitive.
+ *
* Returns whether or not a status with the specified primitive type
* in a presence is active.
*
* A status is active if itself or any of its sub-statuses are active.
*
- * @presence: The presence.
- * @primitive: The status primitive.
- *
* Returns: TRUE if the status is active, or FALSE.
*/
gboolean purple_presence_is_status_primitive_active(
const PurplePresence *presence, PurpleStatusPrimitive primitive);
/**
- * Returns whether or not a presence is idle.
- *
+ * purple_presence_is_idle:
* @presence: The presence.
*
+ * Returns whether or not a presence is idle.
+ *
* Returns: TRUE if the presence is idle, or FALSE otherwise.
* If the presence is offline (purple_presence_is_online()
* returns FALSE) then FALSE is returned.
@@ -360,19 +395,21 @@ gboolean purple_presence_is_status_primitive_active(
gboolean purple_presence_is_idle(const PurplePresence *presence);
/**
- * Returns the presence's idle time.
- *
+ * purple_presence_get_idle_time:
* @presence: The presence.
*
+ * Returns the presence's idle time.
+ *
* Returns: The presence's idle time.
*/
time_t purple_presence_get_idle_time(const PurplePresence *presence);
/**
- * Returns the presence's login time.
- *
+ * purple_presence_get_login_time:
* @presence: The presence.
*
+ * Returns the presence's login time.
+ *
* Returns: The presence's login time.
*/
time_t purple_presence_get_login_time(const PurplePresence *presence);
diff --git a/libpurple/proxy.h b/libpurple/proxy.h
index 763483bd44..f31c330855 100644
--- a/libpurple/proxy.h
+++ b/libpurple/proxy.h
@@ -30,21 +30,32 @@
#include "eventloop.h"
/**
+ * PurpleProxyType:
+ * @PURPLE_PROXY_USE_GLOBAL: Use the global proxy information.
+ * @PURPLE_PROXY_NONE: No proxy.
+ * @PURPLE_PROXY_HTTP: HTTP proxy.
+ * @PURPLE_PROXY_SOCKS4: SOCKS 4 proxy.
+ * @PURPLE_PROXY_SOCKS5: SOCKS 5 proxy.
+ * @PURPLE_PROXY_USE_ENVVAR: Use environmental settings.
+ * @PURPLE_PROXY_TOR: Use a Tor proxy (SOCKS 5 really).
+ *
* A type of proxy connection.
*/
typedef enum
{
- PURPLE_PROXY_USE_GLOBAL = -1, /**< Use the global proxy information. */
- PURPLE_PROXY_NONE = 0, /**< No proxy. */
- PURPLE_PROXY_HTTP, /**< HTTP proxy. */
- PURPLE_PROXY_SOCKS4, /**< SOCKS 4 proxy. */
- PURPLE_PROXY_SOCKS5, /**< SOCKS 5 proxy. */
- PURPLE_PROXY_USE_ENVVAR, /**< Use environmental settings. */
- PURPLE_PROXY_TOR /**< Use a Tor proxy (SOCKS 5 really) */
+ PURPLE_PROXY_USE_GLOBAL = -1,
+ PURPLE_PROXY_NONE = 0,
+ PURPLE_PROXY_HTTP,
+ PURPLE_PROXY_SOCKS4,
+ PURPLE_PROXY_SOCKS5,
+ PURPLE_PROXY_USE_ENVVAR,
+ PURPLE_PROXY_TOR
} PurpleProxyType;
/**
+ * PurpleProxyInfo:
+ *
* Information on proxy settings.
*/
typedef struct _PurpleProxyInfo PurpleProxyInfo;
@@ -64,6 +75,8 @@ G_BEGIN_DECLS
/*@{*/
/**
+ * purple_proxy_info_new:
+ *
* Creates a proxy information structure.
*
* Returns: The proxy information structure.
@@ -71,93 +84,104 @@ G_BEGIN_DECLS
PurpleProxyInfo *purple_proxy_info_new(void);
/**
- * Destroys a proxy information structure.
- *
+ * purple_proxy_info_destroy:
* @info: The proxy information structure to destroy.
+ *
+ * Destroys a proxy information structure.
*/
void purple_proxy_info_destroy(PurpleProxyInfo *info);
/**
- * Sets the type of proxy.
- *
+ * purple_proxy_info_set_type:
* @info: The proxy information.
* @type: The proxy type.
+ *
+ * Sets the type of proxy.
*/
void purple_proxy_info_set_type(PurpleProxyInfo *info, PurpleProxyType type);
/**
- * Sets the proxy host.
- *
+ * purple_proxy_info_set_host:
* @info: The proxy information.
* @host: The host.
+ *
+ * Sets the proxy host.
*/
void purple_proxy_info_set_host(PurpleProxyInfo *info, const char *host);
/**
- * Sets the proxy port.
- *
+ * purple_proxy_info_set_port:
* @info: The proxy information.
* @port: The port.
+ *
+ * Sets the proxy port.
*/
void purple_proxy_info_set_port(PurpleProxyInfo *info, int port);
/**
- * Sets the proxy username.
- *
+ * purple_proxy_info_set_username:
* @info: The proxy information.
* @username: The username.
+ *
+ * Sets the proxy username.
*/
void purple_proxy_info_set_username(PurpleProxyInfo *info, const char *username);
/**
- * Sets the proxy password.
- *
+ * purple_proxy_info_set_password:
* @info: The proxy information.
* @password: The password.
+ *
+ * Sets the proxy password.
*/
void purple_proxy_info_set_password(PurpleProxyInfo *info, const char *password);
/**
- * Returns the proxy's type.
- *
+ * purple_proxy_info_get_type:
* @info: The proxy information.
*
+ * Returns the proxy's type.
+ *
* Returns: The type.
*/
PurpleProxyType purple_proxy_info_get_type(const PurpleProxyInfo *info);
/**
- * Returns the proxy's host.
- *
+ * purple_proxy_info_get_host:
* @info: The proxy information.
*
+ * Returns the proxy's host.
+ *
* Returns: The host.
*/
const char *purple_proxy_info_get_host(const PurpleProxyInfo *info);
/**
- * Returns the proxy's port.
- *
+ * purple_proxy_info_get_port:
* @info: The proxy information.
*
+ * Returns the proxy's port.
+ *
* Returns: The port.
*/
int purple_proxy_info_get_port(const PurpleProxyInfo *info);
/**
- * Returns the proxy's username.
- *
+ * purple_proxy_info_get_username:
* @info: The proxy information.
*
+ * Returns the proxy's username.
+ *
* Returns: The username.
*/
const char *purple_proxy_info_get_username(const PurpleProxyInfo *info);
/**
- * Returns the proxy's password.
- *
+ * purple_proxy_info_get_password:
* @info: The proxy information.
*
+ * Returns the proxy's password.
+ *
* Returns: The password.
*/
const char *purple_proxy_info_get_password(const PurpleProxyInfo *info);
@@ -170,6 +194,8 @@ const char *purple_proxy_info_get_password(const PurpleProxyInfo *info);
/*@{*/
/**
+ * purple_global_proxy_get_info:
+ *
* Returns purple's global proxy information.
*
* Returns: The global proxy information.
@@ -177,9 +203,10 @@ const char *purple_proxy_info_get_password(const PurpleProxyInfo *info);
PurpleProxyInfo *purple_global_proxy_get_info(void);
/**
- * Set purple's global proxy information.
- *
+ * purple_global_proxy_set_info:
* @info: The proxy information.
+ *
+ * Set purple's global proxy information.
*/
void purple_global_proxy_set_info(PurpleProxyInfo *info);
@@ -191,6 +218,8 @@ void purple_global_proxy_set_info(PurpleProxyInfo *info);
/*@{*/
/**
+ * purple_proxy_get_handle:
+ *
* Returns the proxy subsystem handle.
*
* Returns: The proxy subsystem handle.
@@ -198,30 +227,31 @@ void purple_global_proxy_set_info(PurpleProxyInfo *info);
void *purple_proxy_get_handle(void);
/**
+ * purple_proxy_init:
+ *
* Initializes the proxy subsystem.
*/
void purple_proxy_init(void);
/**
+ * purple_proxy_uninit:
+ *
* Uninitializes the proxy subsystem.
*/
void purple_proxy_uninit(void);
/**
- * Returns configuration of a proxy.
- *
+ * purple_proxy_get_setup:
* @account: The account for which the configuration is needed.
*
+ * Returns configuration of a proxy.
+ *
* Returns: The configuration of a proxy.
*/
PurpleProxyInfo *purple_proxy_get_setup(PurpleAccount *account);
/**
- * Makes a connection to the specified host and port. Note that this
- * function name can be misleading--although it is called "proxy
- * connect," it is used for establishing any outgoing TCP connection,
- * whether through a proxy or not.
- *
+ * purple_proxy_connect:
* @handle: A handle that should be associated with this
* connection attempt. The handle can be used
* to cancel the connection attempt using the
@@ -236,6 +266,11 @@ PurpleProxyInfo *purple_proxy_get_setup(PurpleAccount *account);
* to something descriptive (hopefully).
* @data: User-defined data.
*
+ * Makes a connection to the specified host and port. Note that this
+ * function name can be misleading--although it is called "proxy
+ * connect," it is used for establishing any outgoing TCP connection,
+ * whether through a proxy or not.
+ *
* Returns: NULL if there was an error, or a reference to an
* opaque data structure that can be used to cancel
* the pending connection, if needed.
@@ -246,11 +281,7 @@ PurpleProxyConnectData *purple_proxy_connect(void *handle,
PurpleProxyConnectFunction connect_cb, gpointer data);
/**
- * Makes a connection to the specified host and port. Note that this
- * function name can be misleading--although it is called "proxy
- * connect," it is used for establishing any outgoing UDP connection,
- * whether through a proxy or not.
- *
+ * purple_proxy_connect_udp:
* @handle: A handle that should be associated with this
* connection attempt. The handle can be used
* to cancel the connection attempt using the
@@ -265,6 +296,11 @@ PurpleProxyConnectData *purple_proxy_connect(void *handle,
* to something descriptive (hopefully).
* @data: User-defined data.
*
+ * Makes a connection to the specified host and port. Note that this
+ * function name can be misleading--although it is called "proxy
+ * connect," it is used for establishing any outgoing UDP connection,
+ * whether through a proxy or not.
+ *
* Returns: NULL if there was an error, or a reference to an
* opaque data structure that can be used to cancel
* the pending connection, if needed.
@@ -275,11 +311,7 @@ PurpleProxyConnectData *purple_proxy_connect_udp(void *handle,
PurpleProxyConnectFunction connect_cb, gpointer data);
/**
- * Makes a connection through a SOCKS5 proxy.
- *
- * Note that if the account that is making the connection uses a proxy, this
- * connection to a SOCKS5 proxy will be made through the account proxy.
- *
+ * purple_proxy_connect_socks5_account:
* @handle: A handle that should be associated with this
* connection attempt. The handle can be used
* to cancel the connection attempt using the
@@ -295,6 +327,11 @@ PurpleProxyConnectData *purple_proxy_connect_udp(void *handle,
* to something descriptive (hopefully).
* @data: User-defined data.
*
+ * Makes a connection through a SOCKS5 proxy.
+ *
+ * Note that if the account that is making the connection uses a proxy, this
+ * connection to a SOCKS5 proxy will be made through the account proxy.
+ *
* Returns: NULL if there was an error, or a reference to an
* opaque data structure that can be used to cancel
* the pending connection, if needed.
@@ -305,20 +342,23 @@ PurpleProxyConnectData *purple_proxy_connect_socks5_account(void *handle,
PurpleProxyConnectFunction connect_cb, gpointer data);
/**
+ * purple_proxy_connect_cancel:
+ *
* Cancel an in-progress connection attempt. This should be called
- * by the PRPL if the user disables an account while it is still
+ * by the protocol if the user disables an account while it is still
* performing the initial sign on. Or when establishing a file
* transfer, if we attempt to connect to a remote user but they
- * are behind a firewall then the PRPL can cancel the connection
+ * are behind a firewall then the protocol can cancel the connection
* attempt early rather than just letting the OS's TCP/IP stack
* time-out the connection.
*/
void purple_proxy_connect_cancel(PurpleProxyConnectData *connect_data);
-/*
- * Closes all proxy connections registered with the specified handle.
- *
+/**
+ * purple_proxy_connect_cancel_with_handle:
* @handle: The handle.
+ *
+ * Closes all proxy connections registered with the specified handle.
*/
void purple_proxy_connect_cancel_with_handle(void *handle);
diff --git a/libpurple/version.h.in b/libpurple/version.h.in
index a210dee7f7..ee1b05f5ff 100644
--- a/libpurple/version.h.in
+++ b/libpurple/version.h.in
@@ -24,11 +24,25 @@
#ifndef _PURPLE_VERSION_H_
#define _PURPLE_VERSION_H_
-/** The major version of the running libpurple. */
+/**
+ * PURPLE_MAJOR_VERSION:
+ *
+ * The major version of the running libpurple.
+ */
#define PURPLE_MAJOR_VERSION (@PURPLE_MAJOR_VERSION@)
-/** The minor version of the running libpurple. */
+
+/**
+ * PURPLE_MINOR_VERSION:
+ *
+ * The minor version of the running libpurple.
+ */
#define PURPLE_MINOR_VERSION (@PURPLE_MINOR_VERSION@)
-/** The micro version of the running libpurple. */
+
+/**
+ * PURPLE_MICRO_VERSION:
+ *
+ * The micro version of the running libpurple.
+ */
#define PURPLE_MICRO_VERSION (@PURPLE_MICRO_VERSION@)
#define PURPLE_VERSION_CHECK(x,y,z) ((x) == PURPLE_MAJOR_VERSION && \
@@ -40,19 +54,22 @@ extern "C" {
#endif
/**
- * Checks that the libpurple version is compatible with the requested
- * version
- *
+ * purple_version_check:
* @required_major: the required major version.
* @required_minor: the required minor version.
* @required_micro: the required micro version.
*
- * Returns: NULL if the versions are compatible, or a string describing
- * the version mismatch if not compatible.
+ * Checks that the libpurple version is compatible with the requested
+ * version
+ *
+ * Returns: %NULL if the versions are compatible, or a string describing
+ * the version mismatch if not compatible.
*/
const char *purple_version_check(guint required_major, guint required_minor, guint required_micro);
/**
+ * purple_major_version:
+ *
* The major version of the running libpurple. Contrast with
* #PURPLE_MAJOR_VERSION, which expands at compile time to the major version of
* libpurple being compiled against.
@@ -60,6 +77,8 @@ const char *purple_version_check(guint required_major, guint required_minor, gui
extern const guint purple_major_version;
/**
+ * purple_minor_version:
+ *
* The minor version of the running libpurple. Contrast with
* #PURPLE_MINOR_VERSION, which expands at compile time to the minor version of
* libpurple being compiled against.
@@ -67,6 +86,7 @@ extern const guint purple_major_version;
extern const guint purple_minor_version;
/**
+ * purple_micro_version:
*
* The micro version of the running libpurple. Contrast with
* #PURPLE_MICRO_VERSION, which expands at compile time to the micro version of