soc.2010.detachablepurple: b06c0999: Moved the dbus_g_object_register_marshal...
gillux at soc.pidgin.im
gillux at soc.pidgin.im
Thu Aug 12 00:37:10 EDT 2010
----------------------------------------------------------------------
Revision: b06c099979a900710e7343b664d91230d1871db8
Parent: 2b2d8f7008788c74cf4d7fba8d28d93a5e8d7b91
Author: gillux at soc.pidgin.im
Date: 08/11/10 18:42:00
Branch: im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/b06c099979a900710e7343b664d91230d1871db8
Changelog:
Moved the dbus_g_object_register_marshaller() calls to the file which the dbus
signal is declared and handled. This way, everything related to a dbus signal
is in the same file (excepted the marshaller.list line).
Changes against parent 2b2d8f7008788c74cf4d7fba8d28d93a5e8d7b91
patched libpurple/dbus/callback.c
patched libpurple/dbus-server.c
patched libpurple/marshallers.list
patched libpurple/pobject.c
-------------- next part --------------
============================================================
--- libpurple/dbus-server.c ff8062da5686163f8eaf331a59b5e54e2599be9d
+++ libpurple/dbus-server.c 23209866f09b912ad32166ee85695482da8c7a52
@@ -782,16 +782,7 @@ purple_dbus_g_init(void)
/* In remote mode we need to register the marshallers
* we will use to receive the signals sent by the daemon */
if (purple_core_is_remote_mode()) {
- dbus_g_object_register_marshaller(purple_smarshal_VOID__STRING_BOXED,
- G_TYPE_NONE, G_TYPE_STRING,
- G_TYPE_VALUE, G_TYPE_INVALID);
- /* Marshaller for the RunCallback dbus signal */
- dbus_g_object_register_marshaller(
- purple_smarshal_VOID__UINT64_BOXED,
- G_TYPE_NONE, G_TYPE_UINT64, G_TYPE_BOXED,
- G_TYPE_INVALID);
-
- /* We also use the "dbus path name -> gobject" hash table */
+ /* Initialize the "dbus path name -> gobject" hash table */
dbus_path_gobjects = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, NULL);
}
============================================================
--- libpurple/pobject.c 7daf25fdedb1a5b9debe31b17abd6eb95a1aaee0
+++ libpurple/pobject.c 6c4bbe15c337e084f5281cdae0f67bd583b5cdf5
@@ -203,6 +203,17 @@ purple_object_class_init(PurpleObjectCla
g_value_gobject2dbus_path);
g_type_class_add_private(klass, sizeof(PurpleObjectPrivate));
+
+#ifdef HAVE_DBUS
+ /* In remote mode we need to register the marshallers
+ * we will use to receive the signals sent by the daemon */
+ if (purple_core_is_remote_mode()) {
+ /* Marshaller for the DBusNotify dbus signal */
+ dbus_g_object_register_marshaller(
+ purple_smarshal_VOID__STRING_BOXED,
+ G_TYPE_NONE, G_TYPE_STRING, G_TYPE_VALUE, G_TYPE_INVALID);
+ }
+#endif
}
static void
============================================================
--- libpurple/marshallers.list c2e39429ac51b6cd04f33420a7a54cfddcf7053d
+++ libpurple/marshallers.list ea434d8c14012a61306ab3746284ecaee5cfc5cf
@@ -13,6 +13,7 @@ VOID:STRING,STRING,OBJECT,OBJECT
VOID:ENUM,STRING,STRING,BOOLEAN
VOID:FLAGS,FLAGS
VOID:STRING,STRING,OBJECT,OBJECT
+# Marshaller for the DBusNotify dbus signal
VOID:STRING,BOXED
# Marshaller for the RunCallback dbus signal
VOID:UINT64,BOXED
============================================================
--- libpurple/dbus/callback.c 11cc27cea867ac8c915274a33433d418f1f78701
+++ libpurple/dbus/callback.c 5ba4f3b872163f768b1cd0eb2215d70e38b42418
@@ -173,6 +173,18 @@ purple_dbus_callback_class_init(PurpleDB
g_cclosure_marshal_VOID__UINT,
G_TYPE_NONE, 1, G_TYPE_UINT);
}
+ /* In remote mode we need to register the marshallers
+ * we will use to receive the signals sent by the daemon */
+ else if (purple_core_is_remote_mode()) {
+ /* Marshaller for the RunCallback dbus signal */
+ dbus_g_object_register_marshaller(
+ purple_smarshal_VOID__UINT64_BOXED,
+ G_TYPE_NONE, G_TYPE_UINT64, G_TYPE_BOXED,
+ G_TYPE_INVALID);
+ /* The marshaller for the RequestClosed signal doesn't need to
+ * be registered, because it's one of glib marshallers and
+ * dbus-glib use it. */
+ }
}
static void
More information about the Commits
mailing list