diff libpurple/connection.c @ 24292: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 2b426862ffbf
children 43a093eb913f da46097b4722
line wrap: on
line diff
--- a/libpurple/connection.c	Thu Oct 30 21:16:17 2008 +0000
+++ b/libpurple/connection.c	Thu Oct 30 22:40:49 2008 +0000
@@ -23,6 +23,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
+#define _PURPLE_CONNECTION_C_
+
 #include "internal.h"
 #include "account.h"
 #include "blist.h"
@@ -99,6 +101,12 @@
 void
 purple_connection_new(PurpleAccount *account, gboolean regist, const char *password)
 {
+	_purple_connection_new(account, regist, password);
+}
+
+void
+_purple_connection_new(PurpleAccount *account, gboolean regist, const char *password)
+{
 	PurpleConnection *gc;
 	PurplePlugin *prpl;
 	PurplePluginProtocolInfo *prpl_info;
@@ -170,9 +178,14 @@
 		prpl_info->login(account);
 	}
 }
+void
+purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data)
+{
+	_purple_connection_new_unregister(account, password, cb, user_data);
+}
 
 void
-purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data)
+_purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data)
 {
 	/* Lots of copy/pasted code to avoid API changes. You might want to integrate that into the previous function when posssible. */
 	PurpleConnection *gc;
@@ -230,6 +243,12 @@
 void
 purple_connection_destroy(PurpleConnection *gc)
 {
+	_purple_connection_destroy(gc);
+}
+
+void
+_purple_connection_destroy(PurpleConnection *gc)
+{
 	PurpleAccount *account;
 	GSList *buddies;
 	PurplePluginProtocolInfo *prpl_info = NULL;