cpw.gillux.detachablepurple: 7eb56a2a: Updated PurpleAccount according to the n...

gillux at soc.pidgin.im gillux at soc.pidgin.im
Sun May 20 13:21:35 EDT 2012


----------------------------------------------------------------------
Revision: 7eb56a2aa0e8cf5543132d1e0341d3e054888066
Parent:   024d19242602fd188011bbb4d9849e65b8d4a10f
Author:   gillux at soc.pidgin.im
Date:     05/20/12 13:07:14
Branch:   im.pidgin.cpw.gillux.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/7eb56a2aa0e8cf5543132d1e0341d3e054888066

Changelog: 

Updated PurpleAccount according to the new gdbus-based API.

Changes against parent 024d19242602fd188011bbb4d9849e65b8d4a10f

  patched  libpurple/dbus/account.c
  patched  libpurple/dbus/account.h

-------------- next part --------------
============================================================
--- libpurple/dbus/account.c	1456b14216d2df5423193b78f98c157ca3e92a9d
+++ libpurple/dbus/account.c	5203c8fe31d7d17209473894f47f680c9cbf7ed3
@@ -189,7 +189,9 @@ purple_account_class_dbus_init(PurpleAcc
 {
 	PurpleObjectClass *pobjclass = PURPLE_OBJECT_CLASS(klass);
 
-	pobjclass->dbus_ifaceinfo = &purple_account_interface_info;
+	/* Register our interface. */
+	purple_object_class_register_dbus_iface(pobjclass, PURPLE_TYPE_ACCOUNT,
+	                                       &purple_account_interface_info);
 	pobjclass->dbus_init = purple_account_dbus_init;
 	if (purple_core_is_daemon_mode()) {
 		pobjclass->build_dbus_path = purple_account_build_dbus_path;
@@ -250,57 +252,24 @@ purple_account_connect_RPC(PurpleAccount
 void
 purple_account_connect_RPC(PurpleAccount* account)
 {
-	DBusGProxy* proxy;
-	GError *error = NULL;
-
-	proxy = purple_object_get_dbus_obj_proxy(PURPLE_OBJECT(account));
-	if (!im_pidgin_purple_account_connect(proxy, &error))
-		PURPLE_RPC_FAILED(purple_account_connect, error);
+	purple_object_dbus_call(PURPLE_OBJECT(account),
+	                        purple_account_interface_info.name, "Connect");
 }
 
-gboolean
-DBUS_purple_account_connect(PurpleAccount *account, GError** error)
-{
-	purple_account_connect(account);
-	return TRUE;
-}
-
 void
 purple_account_disconnect_RPC(PurpleAccount* account)
 {
-	DBusGProxy* proxy;
-	GError *error = NULL;
-
-	proxy = purple_object_get_dbus_obj_proxy(PURPLE_OBJECT(account));
-	if (!im_pidgin_purple_account_disconnect(proxy, &error))
-		PURPLE_RPC_FAILED(purple_account_disconnect, error);
+	purple_object_dbus_call(PURPLE_OBJECT(account),
+	                        purple_account_interface_info.name, "Disconnect");
 }
 
-gboolean
-DBUS_purple_account_disconnect(PurpleAccount *account, GError** error)
-{
-	purple_account_disconnect(account);
-	return TRUE;
-}
-
 void
 purple_account_register_RPC(PurpleAccount* account)
 {
-	DBusGProxy* proxy;
-	GError *error = NULL;
-
-	proxy = purple_object_get_dbus_obj_proxy(PURPLE_OBJECT(account));
-	if (!im_pidgin_purple_account_register(proxy, &error))
-		PURPLE_RPC_FAILED(purple_account_register, error);
+	purple_object_dbus_call(PURPLE_OBJECT(account),
+	                        purple_account_interface_info.name, "Register");
 }
 
-gboolean
-DBUS_purple_account_register(PurpleAccount *account, GError** error)
-{
-	purple_account_register(account);
-	return TRUE;
-}
-
 void
 purple_account_unregister_RPC(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data)
 {
============================================================
--- libpurple/dbus/account.h	ddadf3c21eea7364a4d670425662f8f967aa6f4b
+++ libpurple/dbus/account.h	b479d46073f4c7dd2e6db16a66a635981d2d6081
@@ -36,56 +36,30 @@ void purple_account_connect_RPC(PurpleAc
 void purple_account_connect_RPC(PurpleAccount* account);
 
 /**
- * Server side purple_account_connect() wrapper.
- */
-gboolean DBUS_purple_account_connect(PurpleAccount *account, GError** error);
-
-/**
  * Client side purple_account_disconnect() wrapper.
  */
 void purple_account_disconnect_RPC(PurpleAccount* account);
 
 /**
- * Server side purple_account_disconnect() wrapper.
- */
-gboolean DBUS_purple_account_disconnect(PurpleAccount *account, GError** error);
-
-/**
  * Client side purple_account_register() wrapper.
  */
 void purple_account_register_RPC(PurpleAccount* account);
 
 /**
- * Server side purple_account_register() wrapper.
- */
-gboolean DBUS_purple_account_register(PurpleAccount *account, GError** error);
-
-/**
  * Client side purple_account_set_status_list() wrapper.
  */
 void purple_account_set_status_list_RPC(PurpleAccount *account, const char *status_id, gboolean active, GList *attrs);
 
 /**
- * Server side purple_account_set_status_list() wrapper.
- */
-gboolean DBUS_purple_account_set_status_list(PurpleAccount *account, char *status_id, gboolean active, GPtrArray* attrs, GError** error);
-
-/**
  * Client side purple_account_unregister() wrapper.
  */
 void purple_account_unregister_RPC(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data);
 
-/**
- * Server side purple_account_unregister() wrapper.
- */
-gboolean DBUS_purple_account_unregister(PurpleAccount *account, gboolean have_callback, guint64 *callback_id, GError** error);
-
 G_END_DECLS
 
 #else /* !HAVE_DBUS */
 
-#define purple_account_class_dbus_init()              ((void)0)
-#define purple_account_dbus_init(acc)                 ((void)0)
+#define purple_account_class_dbus_init(klass)         ((void)0)
 #define purple_account_connect_RPC(account)           ((void)0)
 #define purple_account_disconnect_RPC(account)        ((void)0)
 #define purple_account_register_RPC(account)          ((void)0)


More information about the Commits mailing list