Frameworks/libpurple.framework/Versions/0.6.2/Headers/connection.h
author Zachary West <zacw@adium.im>
Fri Aug 21 13:25:11 2009 -0700 (2009-08-21)
changeset 2592 e8d15275025e
parent 2504 Frameworks/libpurple.framework/Versions/0.6.0/Headers/connection.h@97ec2ce929ec
permissions -rw-r--r--
im.pidgin.adium.1-4 at 267c6165e02e34318a1823960bd04c0639952f73
     1 /**
     2  * @file connection.h Connection API
     3  * @ingroup core
     4  * @see @ref connection-signals
     5  */
     6 
     7 /* purple
     8  *
     9  * Purple is the legal property of its developers, whose names are too numerous
    10  * to list here.  Please refer to the COPYRIGHT file distributed with this
    11  * source distribution.
    12  *
    13  * This program is free software; you can redistribute it and/or modify
    14  * it under the terms of the GNU General Public License as published by
    15  * the Free Software Foundation; either version 2 of the License, or
    16  * (at your option) any later version.
    17  *
    18  * This program is distributed in the hope that it will be useful,
    19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    21  * GNU General Public License for more details.
    22  *
    23  * You should have received a copy of the GNU General Public License
    24  * along with this program; if not, write to the Free Software
    25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
    26  */
    27 #ifndef _PURPLE_CONNECTION_H_
    28 #define _PURPLE_CONNECTION_H_
    29 
    30 /** @copydoc _PurpleConnection */
    31 typedef struct _PurpleConnection PurpleConnection;
    32 
    33 /**
    34  * Flags to change behavior of the client for a given connection.
    35  */
    36 typedef enum
    37 {
    38 	PURPLE_CONNECTION_HTML       = 0x0001, /**< Connection sends/receives in 'HTML'. */
    39 	PURPLE_CONNECTION_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive
    40 					           background colors.                  */
    41 	PURPLE_CONNECTION_AUTO_RESP  = 0x0004,  /**< Send auto responses when away.       */
    42 	PURPLE_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */
    43 	PURPLE_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */
    44 	PURPLE_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */
    45 	PURPLE_CONNECTION_NO_URLDESC = 0x0040,  /**< Connection does not support descriptions with links */
    46 	PURPLE_CONNECTION_NO_IMAGES = 0x0080,  /**< Connection does not support sending of images */
    47 	PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY = 0x0100 /**< Connection supports sending and receiving custom smileys */
    48 
    49 } PurpleConnectionFlags;
    50 
    51 typedef enum
    52 {
    53 	PURPLE_DISCONNECTED = 0, /**< Disconnected. */
    54 	PURPLE_CONNECTED,        /**< Connected.    */
    55 	PURPLE_CONNECTING        /**< Connecting.   */
    56 
    57 } PurpleConnectionState;
    58 
    59 /**
    60  * Possible errors that can cause a connection to be closed.
    61  *
    62  *  @since 2.3.0
    63  */
    64 typedef enum
    65 {
    66 	/** There was an error sending or receiving on the network socket, or
    67 	 *  there was some protocol error (such as the server sending malformed
    68 	 *  data).
    69 	 */
    70 	PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0,
    71 	/** The username supplied was not valid. */
    72 	PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1,
    73 	/** The username, password or some other credential was incorrect.  Use
    74 	 *  #PURPLE_CONNECTION_ERROR_INVALID_USERNAME instead if the username
    75 	 *  is known to be invalid.
    76 	 */
    77 	PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 2,
    78 	/** libpurple doesn't speak any of the authentication methods the
    79 	 *  server offered.
    80 	 */
    81 	PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 3,
    82 	/** libpurple was built without SSL support, and the connection needs
    83 	 *  SSL.
    84 	 */
    85 	PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 4,
    86 	/** There was an error negotiating SSL on this connection, or the
    87 	 *  server does not support encryption but an account option was set to
    88 	 *  require it.
    89 	 */
    90 	PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 5,
    91 	/** Someone is already connected to the server using the name you are
    92 	 *  trying to connect with.
    93 	 */
    94 	PURPLE_CONNECTION_ERROR_NAME_IN_USE = 6,
    95 
    96 	/** The username/server/other preference for the account isn't valid.
    97 	 *  For instance, on IRC the username cannot contain white space.
    98 	 *  This reason should not be used for incorrect passwords etc: use
    99 	 *  #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that.
   100 	 *
   101 	 *  @todo This reason really shouldn't be necessary.  Usernames and
   102 	 *        other account preferences should be validated when the
   103 	 *        account is created.
   104 	 */
   105 	PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 7,
   106 
   107 	/** The server did not provide a SSL certificate. */
   108 	PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 8,
   109 	/** The server's SSL certificate could not be trusted. */
   110 	PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 9,
   111 	/** The server's SSL certificate has expired. */
   112 	PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 10,
   113 	/** The server's SSL certificate is not yet valid. */
   114 	PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 11,
   115 	/** The server's SSL certificate did not match its hostname. */
   116 	PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 12,
   117 	/** The server's SSL certificate does not have the expected
   118 	 *  fingerprint.
   119 	 */
   120 	PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 13,
   121 	/** The server's SSL certificate is self-signed.  */
   122 	PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 14,
   123 	/** There was some other error validating the server's SSL certificate.
   124 	 */
   125 	PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 15,
   126 
   127 	/** Some other error occurred which fits into none of the other
   128 	 *  categories.
   129 	 */
   130 	/* purple_connection_error_reason() in connection.c uses the fact that
   131 	 * this is the last member of the enum when sanity-checking; if other
   132 	 * reasons are added after it, the check must be updated.
   133 	 */
   134 	PURPLE_CONNECTION_ERROR_OTHER_ERROR = 16
   135 } PurpleConnectionError;
   136 
   137 /** Holds the type of an error along with its description. */
   138 typedef struct
   139 {
   140 	/** The type of error. */
   141 	PurpleConnectionError type;
   142 	/** A localised, human-readable description of the error. */
   143 	char *description;
   144 } PurpleConnectionErrorInfo;
   145 
   146 #include <time.h>
   147 
   148 #include "account.h"
   149 #include "plugin.h"
   150 #include "status.h"
   151 #include "sslconn.h"
   152 
   153 /**
   154  * Connection UI operations.  Used to notify the user of changes to
   155  * connections, such as being disconnected, and to respond to the
   156  * underlying network connection appearing and disappearing.  UIs should
   157  * call #purple_connections_set_ui_ops() with an instance of this struct.
   158  *
   159  * @see @ref ui-ops
   160  */
   161 typedef struct
   162 {
   163 	/**
   164 	 * When an account is connecting, this operation is called to notify
   165 	 * the UI of what is happening, as well as which @a step out of @a
   166 	 * step_count has been reached (which might be displayed as a progress
   167 	 * bar).
   168 	 * @see #purple_connection_update_progress
   169 	 */
   170 	void (*connect_progress)(PurpleConnection *gc,
   171 	                         const char *text,
   172 	                         size_t step,
   173 	                         size_t step_count);
   174 
   175 	/**
   176 	 * Called when a connection is established (just before the
   177 	 * @ref signed-on signal).
   178 	 */
   179 	void (*connected)(PurpleConnection *gc);
   180 
   181 	/**
   182 	 * Called when a connection is ended (between the @ref signing-off
   183 	 * and @ref signed-off signals).
   184 	 */
   185 	void (*disconnected)(PurpleConnection *gc);
   186 
   187 	/**
   188 	 * Used to display connection-specific notices.  (Pidgin's Gtk user
   189 	 * interface implements this as a no-op; #purple_connection_notice(),
   190 	 * which uses this operation, is not used by any of the protocols
   191 	 * shipped with libpurple.)
   192 	 */
   193 	void (*notice)(PurpleConnection *gc, const char *text);
   194 
   195 	/**
   196 	 * Called when an error causes a connection to be disconnected.
   197 	 * Called before #disconnected.
   198 	 * @param text  a localized error message.
   199 	 * @see #purple_connection_error
   200 	 * @deprecated in favour of
   201 	 *             #PurpleConnectionUiOps.report_disconnect_reason.
   202 	 */
   203 	void (*report_disconnect)(PurpleConnection *gc, const char *text);
   204 
   205 	/**
   206 	 * Called when libpurple discovers that the computer's network
   207 	 * connection is active.  On Linux, this uses Network Manager if
   208 	 * available; on Windows, it uses Win32's network change notification
   209 	 * infrastructure.
   210 	 */
   211 	void (*network_connected)(void);
   212 
   213 	/**
   214 	 * Called when libpurple discovers that the computer's network
   215 	 * connection has gone away.
   216 	 */
   217 	void (*network_disconnected)(void);
   218 
   219 	/**
   220 	 * Called when an error causes a connection to be disconnected.
   221 	 *  Called before #disconnected.  This op is intended to replace
   222 	 *  #report_disconnect.  If both are implemented, this will be called
   223 	 *  first; however, there's no real reason to implement both.
   224 	 *
   225 	 *  @param reason  why the connection ended, if known, or
   226 	 *                 #PURPLE_CONNECTION_ERROR_OTHER_ERROR, if not.
   227 	 *  @param text  a localized message describing the disconnection
   228 	 *               in more detail to the user.
   229 	 *  @see #purple_connection_error_reason
   230 	 *
   231 	 *  @since 2.3.0
   232 	 */
   233 	void (*report_disconnect_reason)(PurpleConnection *gc,
   234 	                                 PurpleConnectionError reason,
   235 	                                 const char *text);
   236 
   237 	void (*_purple_reserved1)(void);
   238 	void (*_purple_reserved2)(void);
   239 	void (*_purple_reserved3)(void);
   240 } PurpleConnectionUiOps;
   241 
   242 
   243 /* Represents an active connection on an account. */
   244 struct _PurpleConnection
   245 {
   246 	PurplePlugin *prpl;            /**< The protocol plugin.               */
   247 	PurpleConnectionFlags flags;   /**< Connection flags.                  */
   248 
   249 	PurpleConnectionState state;   /**< The connection state.              */
   250 
   251 	PurpleAccount *account;        /**< The account being connected to.    */
   252 	char *password;              /**< The password used.                 */
   253 	int inpa;                    /**< The input watcher.                 */
   254 
   255 	GSList *buddy_chats;         /**< A list of active chats
   256 	                                  (#PurpleConversation structs of type
   257 	                                  #PURPLE_CONV_TYPE_CHAT).           */
   258 	void *proto_data;            /**< Protocol-specific data.            */
   259 
   260 	char *display_name;          /**< How you appear to other people.    */
   261 	guint keepalive;             /**< Keep-alive.                        */
   262 
   263 	/** Wants to Die state.  This is set when the user chooses to log out, or
   264 	 * when the protocol is disconnected and should not be automatically
   265 	 * reconnected (incorrect password, etc.).  prpls should rely on
   266 	 * purple_connection_error_reason() to set this for them rather than
   267 	 * setting it themselves.
   268 	 * @see purple_connection_error_is_fatal
   269 	 */
   270 	gboolean wants_to_die;
   271 
   272 	guint disconnect_timeout;    /**< Timer used for nasty stack tricks  */
   273 	time_t last_received;        /**< When we last received a packet. Set by the
   274 					  prpl to avoid sending unneeded keepalives */
   275 };
   276 
   277 #ifdef __cplusplus
   278 extern "C" {
   279 #endif
   280 
   281 /**************************************************************************/
   282 /** @name Connection API                                                  */
   283 /**************************************************************************/
   284 /*@{*/
   285 
   286 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
   287 /**
   288  * This function should only be called by purple_account_connect()
   289  * in account.c.  If you're trying to sign on an account, use that
   290  * function instead.
   291  *
   292  * Creates a connection to the specified account and either connects
   293  * or attempts to register a new account.  If you are logging in,
   294  * the connection uses the current active status for this account.
   295  * So if you want to sign on as "away," for example, you need to
   296  * have called purple_account_set_status(account, "away").
   297  * (And this will call purple_account_connect() automatically).
   298  *
   299  * @param account  The account the connection should be connecting to.
   300  * @param regist   Whether we are registering a new account or just
   301  *                 trying to do a normal signon.
   302  * @param password The password to use.
   303  *
   304  * @deprecated As this is internal, we should make it private in 3.0.0.
   305  */
   306 void purple_connection_new(PurpleAccount *account, gboolean regist,
   307 									const char *password);
   308 #endif
   309 
   310 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
   311 /**
   312  * This function should only be called by purple_account_unregister()
   313  * in account.c.
   314  *
   315  * Tries to unregister the account on the server. If the account is not
   316  * connected, also creates a new connection.
   317  *
   318  * @param account  The account to unregister
   319  * @param password The password to use.
   320  * @param cb Optional callback to be called when unregistration is complete
   321  * @param user_data user data to pass to the callback
   322  *
   323  * @deprecated As this is internal, we should make it private in 3.0.0.
   324  */
   325 void purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data);
   326 #endif
   327 
   328 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
   329 /**
   330  * Disconnects and destroys a PurpleConnection.
   331  *
   332  * This function should only be called by purple_account_disconnect()
   333  * in account.c.  If you're trying to sign off an account, use that
   334  * function instead.
   335  *
   336  * @param gc The purple connection to destroy.
   337  *
   338  * @deprecated As this is internal, we should make it private in 3.0.0.
   339  */
   340 void purple_connection_destroy(PurpleConnection *gc);
   341 #endif
   342 
   343 /**
   344  * Sets the connection state.  PRPLs should call this and pass in
   345  * the state #PURPLE_CONNECTED when the account is completely
   346  * signed on.  What does it mean to be completely signed on?  If
   347  * the core can call prpl->set_status, and it successfully changes
   348  * your status, then the account is online.
   349  *
   350  * @param gc    The connection.
   351  * @param state The connection state.
   352  */
   353 void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state);
   354 
   355 /**
   356  * Sets the connection's account.
   357  *
   358  * @param gc      The connection.
   359  * @param account The account.
   360  */
   361 void purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account);
   362 
   363 /**
   364  * Sets the connection's displayed name.
   365  *
   366  * @param gc   The connection.
   367  * @param name The displayed name.
   368  */
   369 void purple_connection_set_display_name(PurpleConnection *gc, const char *name);
   370 
   371 /**
   372  * Sets the protocol data for a connection.
   373  *
   374  * @param connection The PurpleConnection.
   375  * @param proto_data The protocol data to set for the connection.
   376  *
   377  * @since 2.6.0
   378  */
   379 void purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data);
   380 
   381 /**
   382  * Returns the connection state.
   383  *
   384  * @param gc The connection.
   385  *
   386  * @return The connection state.
   387  */
   388 PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc);
   389 
   390 /**
   391  * Returns TRUE if the account is connected, otherwise returns FALSE.
   392  *
   393  * @return TRUE if the account is connected, otherwise returns FALSE.
   394  */
   395 #define PURPLE_CONNECTION_IS_CONNECTED(gc) \
   396 	(purple_connection_get_state(gc) == PURPLE_CONNECTED)
   397 
   398 /**
   399  * Returns the connection's account.
   400  *
   401  * @param gc The connection.
   402  *
   403  * @return The connection's account.
   404  */
   405 PurpleAccount *purple_connection_get_account(const PurpleConnection *gc);
   406 
   407 /**
   408  * Returns the protocol plugin managing a connection.
   409  *
   410  * @param gc The connection.
   411  *
   412  * @return The protocol plugin.
   413  *
   414  * @since 2.4.0
   415  */
   416 PurplePlugin * purple_connection_get_prpl(const PurpleConnection *gc);
   417 
   418 /**
   419  * Returns the connection's password.
   420  *
   421  * @param gc The connection.
   422  *
   423  * @return The connection's password.
   424  */
   425 const char *purple_connection_get_password(const PurpleConnection *gc);
   426 
   427 /**
   428  * Returns the connection's displayed name.
   429  *
   430  * @param gc The connection.
   431  *
   432  * @return The connection's displayed name.
   433  */
   434 const char *purple_connection_get_display_name(const PurpleConnection *gc);
   435 
   436 /**
   437  * Gets the protocol data from a connection.
   438  *
   439  * @param connection The PurpleConnection.
   440  *
   441  * @return The protocol data for the connection.
   442  *
   443  * @since 2.6.0
   444  */
   445 void *purple_connection_get_protocol_data(const PurpleConnection *connection);
   446 
   447 /**
   448  * Updates the connection progress.
   449  *
   450  * @param gc    The connection.
   451  * @param text  Information on the current step.
   452  * @param step  The current step.
   453  * @param count The total number of steps.
   454  */
   455 void purple_connection_update_progress(PurpleConnection *gc, const char *text,
   456 									 size_t step, size_t count);
   457 
   458 /**
   459  * Displays a connection-specific notice.
   460  *
   461  * @param gc   The connection.
   462  * @param text The notice text.
   463  */
   464 void purple_connection_notice(PurpleConnection *gc, const char *text);
   465 
   466 /**
   467  * Closes a connection with an error.
   468  *
   469  * @param gc     The connection.
   470  * @param reason The error text, which may not be @c NULL.
   471  * @deprecated in favour of #purple_connection_error_reason.  Calling
   472  *  @c purple_connection_error(gc, text) is equivalent to calling
   473  *  @c purple_connection_error_reason(gc, reason, text) where @c reason is
   474  *  #PURPLE_CONNECTION_ERROR_OTHER_ERROR if @c gc->wants_to_die is @c TRUE, and
   475  *  #PURPLE_CONNECTION_ERROR_NETWORK_ERROR if not.  (This is to keep
   476  *  auto-reconnection behaviour the same when using old prpls which don't use
   477  *  reasons yet.)
   478  */
   479 void purple_connection_error(PurpleConnection *gc, const char *reason);
   480 
   481 /**
   482  * Closes a connection with an error and a human-readable description of the
   483  * error.  It also sets @c gc->wants_to_die to the value of
   484  * #purple_connection_error_is_fatal(@a reason), mainly for
   485  * backwards-compatibility.
   486  *
   487  * @param gc          the connection which is closing.
   488  * @param reason      why the connection is closing.
   489  * @param description a non-@c NULL localized description of the error.
   490  *
   491  * @since 2.3.0
   492  */
   493 void
   494 purple_connection_error_reason (PurpleConnection *gc,
   495                                 PurpleConnectionError reason,
   496                                 const char *description);
   497 
   498 /**
   499  * Closes a connection due to an SSL error; this is basically a shortcut to
   500  * turning the #PurpleSslErrorType into a #PurpleConnectionError and a
   501  * human-readable string and then calling purple_connection_error_reason().
   502  *
   503  * @since 2.3.0
   504  */
   505 void
   506 purple_connection_ssl_error (PurpleConnection *gc,
   507                              PurpleSslErrorType ssl_error);
   508 
   509 /**
   510  * Reports whether a disconnection reason is fatal (in which case the account
   511  * should probably not be automatically reconnected) or transient (so
   512  * auto-reconnection is a good idea).
   513  * For instance, #PURPLE_CONNECTION_ERROR_NETWORK_ERROR is a temporary error,
   514  * which might be caused by losing the network connection, so <tt>
   515  * purple_connection_error_is_fatal (PURPLE_CONNECTION_ERROR_NETWORK_ERROR)</tt>
   516  * is @c FALSE.  On the other hand,
   517  * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED probably indicates a
   518  * misconfiguration of the account which needs the user to go fix it up, so
   519  * <tt> purple_connection_error_is_fatal
   520  * (PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED)</tt> is @c TRUE.
   521  *
   522  * (This function is meant to replace checking PurpleConnection.wants_to_die.)
   523  *
   524  * @return @c TRUE if the account should not be automatically reconnected, and
   525  *         @c FALSE otherwise.
   526  *
   527  * @since 2.3.0
   528  */
   529 gboolean
   530 purple_connection_error_is_fatal (PurpleConnectionError reason);
   531 
   532 /*@}*/
   533 
   534 /**************************************************************************/
   535 /** @name Connections API                                                 */
   536 /**************************************************************************/
   537 /*@{*/
   538 
   539 /**
   540  * Disconnects from all connections.
   541  */
   542 void purple_connections_disconnect_all(void);
   543 
   544 /**
   545  * Returns a list of all active connections.  This does not
   546  * include connections that are in the process of connecting.
   547  *
   548  * @constreturn A list of all active connections.
   549  */
   550 GList *purple_connections_get_all(void);
   551 
   552 /**
   553  * Returns a list of all connections in the process of connecting.
   554  *
   555  * @constreturn A list of connecting connections.
   556  */
   557 GList *purple_connections_get_connecting(void);
   558 
   559 /**
   560  * Checks if gc is still a valid pointer to a gc.
   561  *
   562  * @return @c TRUE if gc is valid.
   563  *
   564  * @deprecated Do not use this.  Instead, cancel your asynchronous request
   565  *             when the PurpleConnection is destroyed.
   566  */
   567 /*
   568  * TODO: Eventually this bad boy will be removed, because it is
   569  *       a gross fix for a crashy problem.
   570  */
   571 #define PURPLE_CONNECTION_IS_VALID(gc) (g_list_find(purple_connections_get_all(), (gc)) != NULL)
   572 
   573 /*@}*/
   574 
   575 /**************************************************************************/
   576 /** @name UI Registration Functions                                       */
   577 /**************************************************************************/
   578 /*@{*/
   579 
   580 /**
   581  * Sets the UI operations structure to be used for connections.
   582  *
   583  * @param ops The UI operations structure.
   584  */
   585 void purple_connections_set_ui_ops(PurpleConnectionUiOps *ops);
   586 
   587 /**
   588  * Returns the UI operations structure used for connections.
   589  *
   590  * @return The UI operations structure in use.
   591  */
   592 PurpleConnectionUiOps *purple_connections_get_ui_ops(void);
   593 
   594 /*@}*/
   595 
   596 /**************************************************************************/
   597 /** @name Connections Subsystem                                           */
   598 /**************************************************************************/
   599 /*@{*/
   600 
   601 /**
   602  * Initializes the connections subsystem.
   603  */
   604 void purple_connections_init(void);
   605 
   606 /**
   607  * Uninitializes the connections subsystem.
   608  */
   609 void purple_connections_uninit(void);
   610 
   611 /**
   612  * Returns the handle to the connections subsystem.
   613  *
   614  * @return The connections subsystem handle.
   615  */
   616 void *purple_connections_get_handle(void);
   617 
   618 /*@}*/
   619 
   620 
   621 #ifdef __cplusplus
   622 }
   623 #endif
   624 
   625 #endif /* _PURPLE_CONNECTION_H_ */