/srv/mercurial-server/detachablepurple: 4e73e386c57e: Updated pu...

Gilles Bedel gillux at cpw.pidgin.im
Fri Jun 15 22:01:51 EDT 2012


Changeset: 4e73e386c57ec5f34e16da8a3249da69ae116b4a
Author:	 Gilles Bedel <gillux at cpw.pidgin.im>
Date:	 2012-05-25 19:40 +0000
Branch:	 cpw.gillux.detachablepurple
URL: http://hg.pidgin.im/srv/mercurial-server/detachablepurple/rev/4e73e386c57e

Description:

Updated purpled (the purple daemon) PurpleAccount uiops,
according to the new gdbus-based API.

diffstat:

 purpled/purpled-account.c |  26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diffs (65 lines):

diff --git a/purpled/purpled-account.c b/purpled/purpled-account.c
--- a/purpled/purpled-account.c
+++ b/purpled/purpled-account.c
@@ -22,20 +22,20 @@
 #include "internal.h"
 #include "account.h"
 #include "dbus/callback.h"
+#include "dbus/account.xml.h"
+#include "dbus/callback.xml.h"
 #include "nullmarshaller.h"
 #include "purpled-account.h"
 
-/**
- * PurpleAccountUiOps.notify_added daemon callback.
- * This sends the NotifyAdded dbus signal.
- */
+/** PurpleAccountUiOps.notify_added daemon callback. */
 static void
 purpled_account_notify_added(PurpleAccount *account, const char *remote_user,
 	                     const char *id, const char *alias,
                              const char *message)
 {
-	g_signal_emit_by_name(account, "notify_added",
-	                      remote_user, id, alias, message);
+	purple_object_emit_dbus_signal
+	  (PURPLE_OBJECT(account), purple_account_interface_info.name,
+	   "NotifyAdded", remote_user, id, alias, message);
 }
 
 /**
@@ -47,8 +47,9 @@
 	                     const char *id, const char *alias,
                              const char *message)
 {
-	g_signal_emit_by_name(account, "request_add",
-	                      remote_user, id, alias, message);
+	purple_object_emit_dbus_signal
+	  (PURPLE_OBJECT(account), purple_account_interface_info.name,
+	   "RequestAdd", remote_user, id, alias, message);
 }
 
 static void
@@ -60,7 +61,9 @@
 	g_return_if_fail(req_id > 0);
 
 	/* Send the RequestClosed dbus signal with the request id */
-	g_signal_emit_by_name(handler, "request_closed", req_id);
+	purple_object_emit_dbus_signal
+	  (PURPLE_OBJECT(handler), purple_callback_interface_info.name,
+	   "RequestClosed", req_id);
 }
 
 /**
@@ -98,8 +101,9 @@
 	g_return_val_if_fail(req_id > 0, NULL);
 
 	/* Send the RequestAuthorize dbus signal with this new request id */
-	g_signal_emit_by_name(account, "request_authorize", remote_user, id,
-	                      alias, message, on_list, req_id);
+	purple_object_emit_dbus_signal
+	  (PURPLE_OBJECT(account), purple_account_interface_info.name,
+	   "RequestAuthorize", remote_user, id, alias, message, on_list, req_id);
 
 	return GINT_TO_POINTER(req_id);
 }



More information about the Commits mailing list