Mercurial > pidgin
diff libpurple/connection.h @ 32672:3828a61c44da
A boring and large patch so I can merge heads.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 23 Dec 2011 08:21:58 +0000 |
parents | a5b556ac1de5 |
children |
line wrap: on
line diff
--- a/libpurple/connection.h Mon Aug 22 22:46:08 2011 +0000 +++ b/libpurple/connection.h Fri Dec 23 08:21:58 2011 +0000 @@ -59,8 +59,6 @@ /** * Possible errors that can cause a connection to be closed. - * - * @since 2.3.0 */ typedef enum { @@ -216,8 +214,6 @@ * @param text a localized message describing the disconnection * in more detail to the user. * @see #purple_connection_error - * - * @since 2.3.0 */ void (*report_disconnect)(PurpleConnection *gc, PurpleConnectionError reason, @@ -239,7 +235,6 @@ PurpleAccount *account; /**< The account being connected to. */ char *password; /**< The password used. */ - int inpa; /**< The input watcher. */ GSList *buddy_chats; /**< A list of active chats (#PurpleConversation structs of type @@ -272,63 +267,6 @@ /**************************************************************************/ /*@{*/ -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_) -/** - * 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. - * - * 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. - * So if you want to sign on as "away," for example, you need to - * have called purple_account_set_status(account, "away"). - * (And this will call purple_account_connect() automatically). - * - * @param account The account the connection should be connecting to. - * @param regist Whether we are registering a new account or just - * trying to do a normal signon. - * @param password The password to use. - * - * @deprecated As this is internal, we should make it private in 3.0.0. - */ -void purple_connection_new(PurpleAccount *account, gboolean regist, - const char *password); -#endif - -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_) -/** - * This function should only be called by purple_account_unregister() - * in account.c. - * - * Tries to unregister the account on the server. If the account is not - * connected, also creates a new connection. - * - * @param account The account to unregister - * @param password The password to use. - * @param cb Optional callback to be called when unregistration is complete - * @param user_data user data to pass to the callback - * - * @deprecated As this is internal, we should make it private in 3.0.0. - */ -void purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data); -#endif - -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_) -/** - * Disconnects and destroys a PurpleConnection. - * - * This function should only be called by purple_account_disconnect() - * in account.c. If you're trying to sign off an account, use that - * function instead. - * - * @param gc The purple connection to destroy. - * - * @deprecated As this is internal, we should make it private in 3.0.0. - */ -void purple_connection_destroy(PurpleConnection *gc); -#endif - /** * Sets the connection state. PRPLs should call this and pass in * the state #PURPLE_CONNECTED when the account is completely @@ -342,6 +280,14 @@ void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state); /** + * Sets the connection flags. + * + * @param gc The connection. + * @param flags The flags. + */ +void purple_connection_set_flags(PurpleConnection *gc, PurpleConnectionFlags flags); + +/** * Sets the connection's account. * * @param gc The connection. @@ -362,8 +308,6 @@ * * @param connection The PurpleConnection. * @param proto_data The protocol data to set for the connection. - * - * @since 2.6.0 */ void purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data); @@ -377,6 +321,15 @@ PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc); /** + * Returns the connection flags. + * + * @param gc The connection. + * + * @return The connection flags. + */ +PurpleConnectionFlags purple_connection_get_flags(const PurpleConnection *gc); + +/** * Returns TRUE if the account is connected, otherwise returns FALSE. * * @return TRUE if the account is connected, otherwise returns FALSE. @@ -399,8 +352,6 @@ * @param gc The connection. * * @return The protocol plugin. - * - * @since 2.4.0 */ PurplePlugin * purple_connection_get_prpl(const PurpleConnection *gc); @@ -428,8 +379,6 @@ * @param connection The PurpleConnection. * * @return The protocol data for the connection. - * - * @since 2.6.0 */ void *purple_connection_get_protocol_data(const PurpleConnection *connection); @@ -461,8 +410,6 @@ * @param gc the connection which is closing. * @param reason why the connection is closing. * @param description a non-@c NULL localized description of the error. - * - * @since 2.3.0 */ void purple_connection_error(PurpleConnection *gc, @@ -473,8 +420,6 @@ * 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(). - * - * @since 2.3.0 */ void purple_connection_ssl_error (PurpleConnection *gc, @@ -497,12 +442,18 @@ * * @return @c TRUE if the account should not be automatically reconnected, and * @c FALSE otherwise. - * - * @since 2.3.0 */ 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. + * + * @param gc The connection. + */ +void purple_connection_update_last_received(PurpleConnection *gc); + /*@}*/ /**************************************************************************/