diff libpurple/internal.h @ 24350:8282911d5e17

Build everything with the *_DISABLE_DEPRECATED flags set. This allows us to detect when we're still using deprecated functions internally (and by extension, when we've deprecated something we shouldn't have). In the course of developing this changeset, I fixed a few such cases. Given that the plan is to switch from PURPLE_HIDE_STRUCTS to PURPLE_DISABLE_DEPRECATED as each struct is fully dealt with, this will also ensure we have no regressions on the struct hiding work. Deprecated functions are still available to the respective .c file, to avoid missing prototype errors. Also, Perl and DBus undef the *_DISABLE_DEPRECATED defines as appropriate so that deprecated functions will still be exported to Perl plugins and via DBus. (Otherwise, we'd be breaking backwards compatibility.)
author Richard Laager <rlaager@wiktel.com>
date Thu, 30 Oct 2008 22:40:49 +0000
parents f1602b78aa59
children 584063555949
line wrap: on
line diff
--- a/libpurple/internal.h	Thu Oct 30 21:16:17 2008 +0000
+++ b/libpurple/internal.h	Thu Oct 30 22:40:49 2008 +0000
@@ -231,6 +231,12 @@
 #define PURPLE_WEBSITE "http://pidgin.im/"
 #define PURPLE_DEVEL_WEBSITE "http://developer.pidgin.im/"
 
+
+/* INTERNAL FUNCTIONS */
+
+#include "account.h"
+#include "connection.h"
+
 /* This is for the accounts code to notify the buddy icon code that
  * it's done loading.  We may want to replace this with a signal. */
 void
@@ -247,4 +253,48 @@
 void
 _purple_buddy_icon_set_old_icons_dir(const char *dirname);
 
+/**
+ * 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).
+ *
+ * @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.
+ *
+ * @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.
+ */
+void _purple_connection_new(PurpleAccount *account, gboolean regist,
+                            const char *password);
+/**
+ * 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.
+ *
+ * @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
+ */
+void _purple_connection_new_unregister(PurpleAccount *account, const char *password,
+                                       PurpleAccountUnregistrationCb cb, void *user_data);
+/**
+ * Disconnects and destroys a PurpleConnection.
+ *
+ * @note 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.
+ */
+void _purple_connection_destroy(PurpleConnection *gc);
+
 #endif /* _PURPLE_INTERNAL_H_ */