Convert protocol interfaces doc to gtk-doc format soc.2013.gobjectification.plugins

Fri, 07 Feb 2014 16:46:21 +0530

author
Ankit Vani <a@nevitus.org>
date
Fri, 07 Feb 2014 16:46:21 +0530
branch
soc.2013.gobjectification.plugins
changeset 37086
b78048ba0fbb
parent 37085
e51e21611af9
child 37087
197d965cec97

Convert protocol interfaces doc to gtk-doc format

libpurple/protocol.h file | annotate | diff | comparison | revisions
--- a/libpurple/protocol.h	Fri Feb 07 15:41:48 2014 +0530
+++ b/libpurple/protocol.h	Fri Feb 07 16:46:21 2014 +0530
@@ -107,37 +107,32 @@
 
 /**
  * PurpleProtocolClass:
+ * @login:        Log in to the server.
+ * @close:        Close connection with the server.
+ * @status_types: Returns a list of #PurpleStatusType which exist for this
+ *                account; and must add at least the offline and online states.
+ * @list_icon:    Returns the base icon name for the given buddy and account. If
+ *                buddy is %NULL and the account is non-%NULL, it will return
+ *                the name to use for the account's icon. If both are %NULL, it
+ *                will return the name to use for the protocol's icon.
  *
  * The base class for all protocols.
  *
  * All protocol types must implement the methods in this class.
  */
+/* If adding new methods to this class, ensure you add checks for them in
+   purple_protocols_add().
+*/
 struct _PurpleProtocolClass
 {
 	GObjectClass parent_class;
 
-	/**
-	 * Log in to the server.
-	 */
 	void (*login)(PurpleAccount *);
 
-	/**
-	 * Close connection with the server.
-	 */
 	void (*close)(PurpleConnection *);
 
-	/**
-	 * Returns a list of #PurpleStatusType which exist for this account;
-	 * and must add at least the offline and online states.
-	 */
 	GList *(*status_types)(PurpleAccount *account);
 
-	/**
-	 * Returns the base icon name for the given buddy and account.
-	 * If buddy is NULL and the account is non-NULL, it will return the
-	 * name to use for the account's icon. If both are NULL, it will
-	 * return the name to use for the protocol's icon.
-	 */
 	const char *(*list_icon)(PurpleAccount *account, PurpleBuddy *buddy);
 
 	/*< private >*/
@@ -156,6 +151,61 @@
 
 /**
  * PurpleProtocolClientIface:
+ * @get_actions:     Returns the actions the protocol can perform. These will
+ *                   show up in the Accounts menu, under a submenu with the name
+ *                   of the account.
+ * @list_emblem:     Fills the four <type>char**</type>'s with string
+ *                   identifiers for "emblems" that the UI will interpret and
+ *                   display as relevant
+ * @status_text:     Gets a short string representing this buddy's status. This
+ *                   will be shown on the buddy list.
+ * @tooltip_text:    Allows the protocol to add text to a buddy's tooltip.
+ * @blist_node_menu: Returns a list of #PurpleMenuAction structs, which
+ *                   represent extra actions to be shown in (for example) the
+ *                   right-click menu for @node.
+ * @normalize: Convert the username @who to its canonical form. Also checks for
+ *             validity.
+ *             <sbr/>For example, AIM treats "fOo BaR" and "foobar" as the same
+ *             user; this function should return the same normalized string for
+ *             both of those. On the other hand, both of these are invalid for
+ *             protocols with number-based usernames, so function should return
+ *             %NULL in such case.
+ *             <sbr/>@account: The account the username is related to. Can be
+ *                             %NULL.
+ *             <sbr/>@who:     The username to convert.
+ *             <sbr/>Returns:  Normalized username, or %NULL, if it's invalid.
+ * @offline_message: Checks whether offline messages to @buddy are supported.
+ *                   <sbr/>Returns: %TRUE if @buddy can be sent messages while
+ *                                  they are offline, or %FALSE if not.
+ * @get_account_text_table: This allows protocols to specify additional strings
+ *                          to be used for various purposes. The idea is to
+ *                          stuff a bunch of strings in this hash table instead
+ *                          of expanding the struct for every addition. This
+ *                          hash table is allocated every call and
+ *                          <emphasis>MUST</emphasis> be unrefed by the caller.
+ *                          <sbr/>@account: The account to specify.  This can be
+ *                                          %NULL.
+ *                          <sbr/>Returns:  The protocol's string hash table.
+ *                                          The hash table should be destroyed
+ *                                          by the caller when it's no longer
+ *                                          needed.
+ * @get_moods: Returns an array of #PurpleMood's, with the last one having
+ *             "mood" set to %NULL.
+ * @get_max_message_size: Gets the maximum message size in bytes for the
+ *                        conversation.
+ *                        <sbr/>It may depend on connection-specific or
+ *                        conversation-specific variables, like channel or
+ *                        buddy's name length.
+ *                        <sbr/>This value is intended for plaintext message,
+ *                              the exact value may be lower because of:
+ *                        <sbr/> - used newlines (some protocols count them as
+ *                                 more than one byte),
+ *                        <sbr/> - formatting,
+ *                        <sbr/> - used special characters.
+ *                        <sbr/>@conv:   The conversation to query, or NULL to
+ *                                       get safe minimum for the protocol.
+ *                        <sbr/>Returns: Maximum message size, 0 if unspecified,
+ *                                       -1 for infinite.
  *
  * The protocol client interface.
  *
@@ -167,98 +217,31 @@
 	GTypeInterface parent_iface;
 
 	/*< public >*/
-	/**
-	 * Returns the actions the protocol can perform. These will show up in the
-	 * Accounts menu, under a submenu with the name of the account.
-	 */
 	GList *(*get_actions)(PurpleConnection *);
 
-	/**
-	 * Fills the four char**'s with string identifiers for "emblems"
-	 * that the UI will interpret and display as relevant
-	 */
 	const char *(*list_emblem)(PurpleBuddy *buddy);
 
-	/**
-	 * Gets a short string representing this buddy's status.  This will
-	 * be shown on the buddy list.
-	 */
 	char *(*status_text)(PurpleBuddy *buddy);
 
-	/**
-	 * Allows the protocol to add text to a buddy's tooltip.
-	 */
 	void (*tooltip_text)(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info,
 						 gboolean full);
 
-	/**
-	 * Returns a list of #PurpleMenuAction structs, which represent extra
-	 * actions to be shown in (for example) the right-click menu for @node.
-	 */
 	GList *(*blist_node_menu)(PurpleBlistNode *node);
 
 	void (*buddy_free)(PurpleBuddy *);
 
 	void (*convo_closed)(PurpleConnection *, const char *who);
 
-	/**
-	 * Convert the username @who to its canonical form. Also checks for
-	 * validity.
-	 *
-	 * For example, AIM treats "fOo BaR" and "foobar" as the same user; this
-	 * function should return the same normalized string for both of those.
-	 * On the other hand, both of these are invalid for protocols with
-	 * number-based usernames, so function should return NULL in such case.
-	 *
-	 * @account:  The account the username is related to. Can
-	 *                 be NULL.
-	 * @who:      The username to convert.
-	 * Returns:         Normalized username, or NULL, if it's invalid.
-	 */
 	const char *(*normalize)(const PurpleAccount *account, const char *who);
 
 	PurpleChat *(*find_blist_chat)(PurpleAccount *account, const char *name);
 
-	/** Checks whether offline messages to @buddy are supported.
-	 *  Returns: %TRUE if @buddy can be sent messages while they are
-	 *          offline, or %FALSE if not.
-	 */
 	gboolean (*offline_message)(const PurpleBuddy *buddy);
 
-	/** This allows protocols to specify additional strings to be used for
-	 * various purposes.  The idea is to stuff a bunch of strings in this hash
-	 * table instead of expanding the struct for every addition.  This hash
-	 * table is allocated every call and MUST be unrefed by the caller.
-	 *
-	 * @account: The account to specify.  This can be NULL.
-	 * Returns: The protocol's string hash table. The hash table should be
-	 *         destroyed by the caller when it's no longer needed.
-	 */
 	GHashTable *(*get_account_text_table)(PurpleAccount *account);
 
-	/**
-	 * Returns an array of "PurpleMood"s, with the last one having
-	 * "mood" set to %NULL.
-	 */
 	PurpleMood *(*get_moods)(PurpleAccount *account);
 
-	/**
-	 * Gets the maximum message size in bytes for the conversation.
-	 *
-	 * It may depend on connection-specific or conversation-specific
-	 * variables, like channel or buddy's name length.
-	 *
-	 * This value is intended for plaintext message, the exact value may be
-	 * lower because of:
-	 *  - used newlines (some protocols count them as more than one byte),
-	 *  - formatting,
-	 *  - used special characters.
-	 *
-	 * @conv: The conversation to query, or NULL to get safe minimum
-	 *             for the protocol.
-	 *
-	 * Returns:     Maximum message size, 0 if unspecified, -1 for infinite.
-	 */
 	gssize (*get_max_message_size)(PurpleConversation *conv);
 };
 
@@ -271,6 +254,65 @@
 
 /**
  * PurpleProtocolServerIface:
+ * @register_user:   New user registration
+ * @unregister_user: Remove the user from the server. The account can either be
+ *                   connected or disconnected. After the removal is finished,
+ *                   the connection will stay open and has to be closed!
+ * @get_info:        Should arrange for purple_notify_userinfo() to be called
+ *                   with @who's user info.
+ * @add_buddy:       Add a buddy to a group on the server.
+ *                   <sbr/>This protocol function may be called in situations in
+ *                   which the buddy is already in the specified group. If the
+ *                   protocol supports authorization and the user is not already
+ *                   authorized to see the status of @buddy, @add_buddy should
+ *                   request authorization.
+ *                   <sbr/>If authorization is required, then use the supplied
+ *                   invite message.
+ * @keepalive:       If implemented, this will be called regularly for this
+ *                   protocol's active connections. You'd want to do this if you
+ *                   need to repeatedly send some kind of keepalive packet to
+ *                   the server to avoid being disconnected. ("Regularly" is
+ *                   defined by #KEEPALIVE_INTERVAL in
+ *                   <filename>libpurple/connection.c</filename>.)
+ * @alias_buddy:     Save/store buddy's alias on server list/roster
+ * @group_buddy:     Change a buddy's group on a server list/roster
+ * @rename_group:    Rename a group on a server list/roster
+ * @set_buddy_icon:  Set the buddy icon for the given connection to @img. The
+ *                   protocol does <emphasis>NOT</emphasis> own a reference to
+ *                   @img; if it needs one, it must #purple_imgstore_ref(@img)
+ *                   itself.
+ * @send_raw:        For use in plugins that may understand the underlying
+ *                   protocol
+ * @set_public_alias: Set the user's "friendly name" (or alias or nickname or
+ *                    whatever term you want to call it) on the server. The
+ *                    protocol should call @success_cb or @failure_cb
+ *                    <emphasis>asynchronously</emphasis> (if it knows
+ *                    immediately that the set will fail, call one of the
+ *                    callbacks from an idle/0-second timeout) depending on if
+ *                    the nickname is set successfully. See
+ *                    purple_account_set_public_alias().
+ *                    <sbr/>@gc:    The connection for which to set an alias
+ *                    <sbr/>@alias: The new server-side alias/nickname for this
+ *                                  account, or %NULL to unset the
+ *                                  alias/nickname (or return it to a
+ *                                  protocol-specific "default").
+ *                    <sbr/>@success_cb: Callback to be called if the public
+ *                                       alias is set
+ *                    <sbr/>@failure_cb: Callback to be called if setting the
+ *                                       public alias fails
+ * @get_public_alias: Retrieve the user's "friendly name" as set on the server.
+ *                    The protocol should call @success_cb or @failure_cb
+ *                    <emphasis>asynchronously</emphasis> (even if it knows
+ *                    immediately that the get will fail, call one of the
+ *                    callbacks from an idle/0-second timeout) depending on if
+ *                    the nickname is retrieved. See
+ *                    purple_account_get_public_alias().
+ *                    <sbr/>@gc:         The connection for which to retireve
+ *                                       the alias
+ *                    <sbr/>@success_cb: Callback to be called with the
+ *                                       retrieved alias
+ *                    <sbr/>@failure_cb: Callback to be called if the protocol
+ *                                       is unable to retrieve the alias
  *
  * The protocol server interface.
  *
@@ -282,114 +324,54 @@
 	GTypeInterface parent_iface;
 
 	/*< public >*/
-	/** new user registration */
 	void (*register_user)(PurpleAccount *);
 
-	/** Remove the user from the server.  The account can either be
-	 * connected or disconnected. After the removal is finished, the
-	 * connection will stay open and has to be closed!
-	 */
 	void (*unregister_user)(PurpleAccount *, PurpleAccountUnregistrationCb cb,
 							void *user_data);
 
 	void (*set_info)(PurpleConnection *, const char *info);
 
-	/**
-	 * Should arrange for purple_notify_userinfo() to be called with
-	 * @who 's user info.
-	 */
 	void (*get_info)(PurpleConnection *, const char *who);
+
 	void (*set_status)(PurpleAccount *account, PurpleStatus *status);
 
 	void (*set_idle)(PurpleConnection *, int idletime);
+
 	void (*change_passwd)(PurpleConnection *, const char *old_pass,
 						  const char *new_pass);
 
-	/**
-	 * Add a buddy to a group on the server.
-	 *
-	 * This protocol function may be called in situations in which the buddy is
-	 * already in the specified group. If the protocol supports
-	 * authorization and the user is not already authorized to see the
-	 * status of \a buddy, \a add_buddy should request authorization.
-	 *
-	 * If authorization is required, then use the supplied invite message.
-	 */
 	void (*add_buddy)(PurpleConnection *pc, PurpleBuddy *buddy,
 					  PurpleGroup *group, const char *message);
+
 	void (*add_buddies)(PurpleConnection *pc, GList *buddies, GList *groups,
 						const char *message);
+
 	void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy,
 						 PurpleGroup *group);
+
 	void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups);
 
-	/** If implemented, this will be called regularly for this protocol's
-	 *  active connections.  You'd want to do this if you need to repeatedly
-	 *  send some kind of keepalive packet to the server to avoid being
-	 *  disconnected.  ("Regularly" is defined by
-	 *  <literal>KEEPALIVE_INTERVAL</literal> in
-	 *  <filename>libpurple/connection.c</filename>.)
-	 */
 	void (*keepalive)(PurpleConnection *);
 
-	/** save/store buddy's alias on server list/roster */
 	void (*alias_buddy)(PurpleConnection *, const char *who,
 						const char *alias);
 
-	/** change a buddy's group on a server list/roster */
 	void (*group_buddy)(PurpleConnection *, const char *who,
-						const char *old_group, const char *new_group);
+					const char *old_group, const char *new_group);
 
-	/** rename a group on a server list/roster */
 	void (*rename_group)(PurpleConnection *, const char *old_name,
-						 PurpleGroup *group, GList *moved_buddies);
+					 PurpleGroup *group, GList *moved_buddies);
 
-	/**
-	 * Set the buddy icon for the given connection to @img.  The protocol
-	 * does NOT own a reference to @img; if it needs one, it must
-	 * #purple_imgstore_ref(@img) itself.
-	 */
 	void (*set_buddy_icon)(PurpleConnection *, PurpleStoredImage *img);
 
 	void (*remove_group)(PurpleConnection *gc, PurpleGroup *group);
 
-	/** For use in plugins that may understand the underlying protocol */
 	int (*send_raw)(PurpleConnection *gc, const char *buf, int len);
 
-	/**
-	 * Set the user's "friendly name" (or alias or nickname or
-	 * whatever term you want to call it) on the server.  The
-	 * protocol should call success_cb or failure_cb
-	 * *asynchronously* (if it knows immediately that the set will fail,
-	 * call one of the callbacks from an idle/0-second timeout) depending
-	 * on if the nickname is set successfully.
-	 *
-	 * @gc:    The connection for which to set an alias
-	 * @alias: The new server-side alias/nickname for this account,
-	 *              or NULL to unset the alias/nickname (or return it to
-	 *              a protocol-specific "default").
-	 * @success_cb: Callback to be called if the public alias is set
-	 * @failure_cb: Callback to be called if setting the public alias
-	 *                   fails
-	 * @see purple_account_set_public_alias
-	 */
 	void (*set_public_alias)(PurpleConnection *gc, const char *alias,
 	                         PurpleSetPublicAliasSuccessCallback success_cb,
 	                         PurpleSetPublicAliasFailureCallback failure_cb);
 
-	/**
-	 * Retrieve the user's "friendly name" as set on the server.
-	 * The protocol should call success_cb or failure_cb
-	 * *asynchronously* (even if it knows immediately that the get will fail,
-	 * call one of the callbacks from an idle/0-second timeout) depending
-	 * on if the nickname is retrieved.
-	 *
-	 * @gc:    The connection for which to retireve the alias
-	 * @success_cb: Callback to be called with the retrieved alias
-	 * @failure_cb: Callback to be called if the protocol is unable to
-	 *                   retrieve the alias
-	 * @see purple_account_get_public_alias
-	 */
 	void (*get_public_alias)(PurpleConnection *gc,
 	                         PurpleGetPublicAliasSuccessCallback success_cb,
 	                         PurpleGetPublicAliasFailureCallback failure_cb);
@@ -404,6 +386,18 @@
 
 /**
  * PurpleProtocolIMIface:
+ * @send:        This protocol function should return a positive value on
+ *               success. If the message is too big to be sent, return -#E2BIG.
+ *               If the account is not connected, return -#ENOTCONN. If the
+ *               protocol is unable to send the message for another reason,
+ *               return some other negative value. You can use one of the valid
+ *               #errno values, or just big something. If the message should not
+ *               be echoed to the conversation window, return 0.
+ * @send_typing: If this protocol requires the #PURPLE_IM_TYPING message to be
+ *               sent repeatedly to signify that the user is still typing, then
+ *               the protocol should return the number of seconds to wait before
+ *               sending a subsequent notification. Otherwise the protocol
+ *               should return 0.
  *
  * The protocol IM interface.
  *
@@ -415,28 +409,12 @@
 	GTypeInterface parent_iface;
 
 	/*< public >*/
-	/**
-	 * This protocol function should return a positive value on success.
-	 * If the message is too big to be sent, return -E2BIG.  If
-	 * the account is not connected, return -ENOTCONN.  If the
-	 * protocol is unable to send the message for another reason, return
-	 * some other negative value.  You can use one of the valid
-	 * errno values, or just big something.  If the message should
-	 * not be echoed to the conversation window, return 0.
-	 */
 	int  (*send)(PurpleConnection *, const char *who,
 					const char *message,
 					PurpleMessageFlags flags);
 
-	/**
-	 * Returns: If this protocol requires the PURPLE_IM_TYPING message to
-	 *         be sent repeatedly to signify that the user is still
-	 *         typing, then the protocol should return the number of
-	 *         seconds to wait before sending a subsequent notification.
-	 *         Otherwise the protocol should return 0.
-	 */
 	unsigned int (*send_typing)(PurpleConnection *, const char *name,
-								PurpleIMTypingState state);
+							PurpleIMTypingState state);
 };
 
 #define PURPLE_TYPE_PROTOCOL_CHAT_IFACE     (purple_protocol_chat_iface_get_type())
@@ -448,6 +426,67 @@
 
 /**
  * PurpleProtocolChatIface:
+ * @info: Returns a list of #PurpleProtocolChatEntry structs, which represent
+ *        information required by the protocol to join a chat. libpurple will
+ *        call join_chat along with the information filled by the user.
+ *        <sbr/>Returns: A list of #PurpleProtocolChatEntry's
+ * @info_defaults: Returns a hashtable which maps #PurpleProtocolChatEntry
+ *                 struct identifiers to default options as strings based on
+ *                 @chat_name. The resulting hashtable should be created with
+ *                 #g_hash_table_new_full(#g_str_hash, #g_str_equal, %NULL,
+ *                 #g_free). Use @get_name if you instead need to extract a chat
+ *                 name from a hashtable.
+ *                 <sbr/>@chat_name: The chat name to be turned into components
+ *                 <sbr/>Returns: Hashtable containing the information extracted
+ *                                from @chat_name
+ * @join: Called when the user requests joining a chat. Should arrange for
+ *        serv_got_joined_chat() to be called.
+ *        <sbr/>@components: A hashtable containing information required to join
+ *                           the chat as described by the entries returned by
+ *                           @info. It may also be called when accepting an
+ *                           invitation, in which case this matches the data
+ *                           parameter passed to serv_got_chat_invite().
+ * @reject: Called when the user refuses a chat invitation.
+ *          <sbr/>@components: A hashtable containing information required to
+ *                            join the chat as passed to serv_got_chat_invite().
+ * @get_name: Returns a chat name based on the information in components. Use
+ *            @info_defaults if you instead need to generate a hashtable from a
+ *            chat name.
+ *            <sbr/>@components: A hashtable containing information about the
+ *                               chat.
+ * @invite: Invite a user to join a chat.
+ *          <sbr/>@id:      The id of the chat to invite the user to.
+ *          <sbr/>@message: A message displayed to the user when the invitation
+ *                          is received.
+ *          <sbr/>@who:     The name of the user to send the invation to.
+ * @leave: Called when the user requests leaving a chat.
+ *         <sbr/>@id: The id of the chat to leave
+ * @whisper: Send a whisper to a user in a chat.
+ *           <sbr/>@id:      The id of the chat.
+ *           <sbr/>@who:     The name of the user to send the whisper to.
+ *           <sbr/>@message: The message of the whisper.
+ * @send: Send a message to a chat.
+ *              <sbr/>This protocol function should return a positive value on
+ *              success. If the message is too big to be sent, return -#E2BIG.
+ *              If the account is not connected, return -#ENOTCONN. If the
+ *              protocol is unable to send the message for another reason,
+ *              return some other negative value. You can use one of the valid
+ *              #errno values, or just big something.
+ *              <sbr/>@id:      The id of the chat to send the message to.
+ *              <sbr/>@message: The message to send to the chat.
+ *              <sbr/>@flags:   A bitwise OR of #PurpleMessageFlags representing
+ *                              message flags.
+ *              <sbr/>Returns:  A positive number or 0 in case of success, a
+ *                              negative error number in case of failure.
+ * @get_user_real_name: Gets the real name of a participant in a chat. For
+ *                      example, on XMPP this turns a chat room nick
+ *                      <literal>foo</literal> into
+ *                      <literal>room\@server/foo</literal>.
+ *                      <sbr/>@gc:  the connection on which the room is.
+ *                      <sbr/>@id:  the ID of the chat room.
+ *                      <sbr/>@who: the nickname of the chat participant.
+ *                      <sbr/>Returns: the real name of the participant. This
+ *                                     string must be freed by the caller.
  *
  * The protocol chat interface.
  *
@@ -459,113 +498,27 @@
 	GTypeInterface parent_iface;
 
 	/*< public >*/
-	/**
-	 * Returns a list of #PurpleProtocolChatEntry structs, which represent
-	 * information required by the protocol to join a chat. libpurple will
-	 * call join_chat along with the information filled by the user.
-	 *
-	 * Returns: A list of #PurpleProtocolChatEntry structs
-	 */
 	GList *(*info)(PurpleConnection *);
 
-	/**
-	 * Returns a hashtable which maps #PurpleProtocolChatEntry struct
-	 * identifiers to default options as strings based on chat_name. The
-	 * resulting hashtable should be created with
-	 * g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);. Use
-	 * #get_chat_name if you instead need to extract a chat name from a
-	 * hashtable.
-	 *
-	 * @chat_name: The chat name to be turned into components
-	 * Returns: Hashtable containing the information extracted from chat_name
-	 */
-	GHashTable *(*info_defaults)(PurpleConnection *,
-									  const char *chat_name);
+	GHashTable *(*info_defaults)(PurpleConnection *, const char *chat_name);
 
-	/**
-	 * Called when the user requests joining a chat. Should arrange for
-	 * #serv_got_joined_chat to be called.
-	 *
-	 * @components: A hashtable containing information required to
-	 *                   join the chat as described by the entries returned
-	 *                   by #chat_info. It may also be called when accepting
-	 *                   an invitation, in which case this matches the
-	 *                   data parameter passed to #serv_got_chat_invite.
-	 */
 	void (*join)(PurpleConnection *, GHashTable *components);
 
-	/**
-	 * Called when the user refuses a chat invitation.
-	 *
-	 * @components: A hashtable containing information required to
-	 *                   join the chat as passed to #serv_got_chat_invite.
-	 */
 	void (*reject)(PurpleConnection *, GHashTable *components);
 
-	/**
-	 * Returns a chat name based on the information in components. Use
-	 * #chat_info_defaults if you instead need to generate a hashtable
-	 * from a chat name.
-	 *
-	 * @components: A hashtable containing information about the chat.
-	 */
 	char *(*get_name)(GHashTable *components);
 
-	/**
-	 * Invite a user to join a chat.
-	 *
-	 * @id:      The id of the chat to invite the user to.
-	 * @message: A message displayed to the user when the invitation
-	 *                is received.
-	 * @who:     The name of the user to send the invation to.
-	 */
 	void (*invite)(PurpleConnection *, int id,
-						const char *message, const char *who);
-	/**
-	 * Called when the user requests leaving a chat.
-	 *
-	 * @id: The id of the chat to leave
-	 */
+					const char *message, const char *who);
+
 	void (*leave)(PurpleConnection *, int id);
 
-	/**
-	 * Send a whisper to a user in a chat.
-	 *
-	 * @id:      The id of the chat.
-	 * @who:     The name of the user to send the whisper to.
-	 * @message: The message of the whisper.
-	 */
 	void (*whisper)(PurpleConnection *, int id,
-						 const char *who, const char *message);
+					 const char *who, const char *message);
 
-	/**
-	 * Send a message to a chat.
-	 * This protocol function should return a positive value on success.
-	 * If the message is too big to be sent, return -E2BIG.  If
-	 * the account is not connected, return -ENOTCONN.  If the
-	 * protocol is unable to send the message for another reason, return
-	 * some other negative value.  You can use one of the valid
-	 * errno values, or just big something.
-	 *
-	 * @id:      The id of the chat to send the message to.
-	 * @message: The message to send to the chat.
-	 * @flags:   A bitwise OR of #PurpleMessageFlags representing
-	 *                message flags.
-	 * Returns: 	  A positive number or 0 in case of success,
-	 *                a negative error number in case of failure.
-	 */
 	int  (*send)(PurpleConnection *, int id, const char *message,
 					  PurpleMessageFlags flags);
 
-	/** Gets the real name of a participant in a chat.  For example, on
-	 *  XMPP this turns a chat room nick <literal>foo</literal> into
-	 *  <literal>room\@server/foo</literal>
-	 *  @gc:  the connection on which the room is.
-	 *  @id:  the ID of the chat room.
-	 *  @who: the nickname of the chat participant.
-	 *  Returns:    the real name of the participant.  This string must be
-	 *             freed by the caller.
-	 */
 	char *(*get_user_real_name)(PurpleConnection *gc, int id, const char *who);
 
 	void (*set_topic)(PurpleConnection *gc, int id, const char *topic);
@@ -592,9 +545,13 @@
 
 	/*< public >*/
 	void (*add_permit)(PurpleConnection *, const char *name);
+
 	void (*add_deny)(PurpleConnection *, const char *name);
+
 	void (*rem_permit)(PurpleConnection *, const char *name);
+
 	void (*rem_deny)(PurpleConnection *, const char *name);
+
 	void (*set_permit_deny)(PurpleConnection *);
 };
 
@@ -619,8 +576,10 @@
 
 	/*< public >*/
 	gboolean (*can_receive)(PurpleConnection *, const char *who);
+
 	void (*send)(PurpleConnection *, const char *who,
 					  const char *filename);
+
 	PurpleXfer *(*new_xfer)(PurpleConnection *, const char *who);
 };
 
@@ -645,9 +604,12 @@
 
 	/*< public >*/
 	PurpleRoomlist *(*get_list)(PurpleConnection *gc);
+
 	void (*cancel)(PurpleRoomlist *list);
+
 	void (*expand_category)(PurpleRoomlist *list,
-									 PurpleRoomlistRoom *category);
+						 PurpleRoomlistRoom *category);
+
 	/* room list serialize */
 	char *(*room_serialize)(PurpleRoomlistRoom *room);
 };
@@ -675,6 +637,7 @@
 	/*< public >*/
 	gboolean (*send)(PurpleConnection *gc, const char *username,
 							   guint type);
+
 	GList *(*get_types)(PurpleAccount *acct);
 };
 
@@ -687,6 +650,19 @@
 
 /**
  * PurpleProtocolMediaIface:
+ * @initiate_session: Initiate a media session with the given contact.
+ *                    <sbr/>@account: The account to initiate the media session
+ *                                    on.
+ *                    <sbr/>@who: The remote user to initiate the session with.
+ *                    <sbr/>@type: The type of media session to initiate.
+ *                    <sbr/>Returns: %TRUE if the call succeeded else %FALSE.
+ *                                   (Doesn't imply the media session or stream
+ *                                   will be successfully created)
+ * @get_caps: Checks to see if the given contact supports the given type of
+ *            media session.
+ *            <sbr/>@account: The account the contact is on.
+ *            <sbr/>@who: The remote user to check for media capability with.
+ *            <sbr/>Returns: The media caps the contact supports.
  *
  * The protocol media interface.
  *
@@ -698,26 +674,9 @@
 	GTypeInterface parent_iface;
 
 	/*< public >*/
-	/**
-	 * Initiate a media session with the given contact.
-	 *
-	 * @account: The account to initiate the media session on.
-	 * @who: The remote user to initiate the session with.
-	 * @type: The type of media session to initiate.
-	 * Returns: TRUE if the call succeeded else FALSE. (Doesn't imply the media
-	 *         session or stream will be successfully created)
-	 */
 	gboolean (*initiate_session)(PurpleAccount *account, const char *who,
 					PurpleMediaSessionType type);
 
-	/**
-	 * Checks to see if the given contact supports the given type of media
-	 * session.
-	 *
-	 * @account: The account the contact is on.
-	 * @who: The remote user to check for media capability with.
-	 * Returns: The media caps the contact supports.
-	 */
 	PurpleMediaCaps (*get_caps)(PurpleAccount *account,
 					  const char *who);
 };
@@ -731,6 +690,14 @@
 
 /**
  * PurpleProtocolFactoryIface:
+ * @connection_new: Creates a new protocol-specific connection object that
+ *                  inherits #PurpleConnection.
+ * @roomlist_new:   Creates a new protocol-specific room list object that
+ *                  inherits #PurpleRoomlist.
+ * @whiteboard_new: Creates a new protocol-specific whiteboard object that
+ *                  inherits #PurpleWhiteboard.
+ * @xfer_new:       Creates a new protocol-specific file transfer object that
+ *                  inherits #PurpleXfer.
  *
  * The protocol factory interface.
  *
@@ -743,31 +710,15 @@
 	GTypeInterface parent_iface;
 
 	/*< public >*/
-	/**
-	 * Creates a new protocol-specific connection object that inherits
-	 * PurpleConnection.
-	 */
 	PurpleConnection *(*connection_new)(PurpleProtocol *protocol,
 	                                    PurpleAccount *account,
 	                                    const char *password);
 
-	/**
-	 * Creates a new protocol-specific room list object that inherits
-	 * PurpleRoomlist.
-	 */
 	PurpleRoomlist *(*roomlist_new)(PurpleAccount *account);
 
-	/**
-	 * Creates a new protocol-specific whiteboard object that inherits
-	 * PurpleWhiteboard.
-	 */
 	PurpleWhiteboard *(*whiteboard_new)(PurpleAccount *account,
 	                                    const char *who, int state);
 
-	/**
-	 * Creates a new protocol-specific file transfer object that inherits
-	 * PurpleXfer.
-	 */
 	PurpleXfer *(*xfer_new)(PurpleAccount *account, PurpleXferType type,
 	                        const char *who);
 };

mercurial