Mercurial > pidgin
diff libpurple/dbus-server.c @ 27590:a08e84032814
merge of '2348ff22f0ff3453774b8b25b36238465580c609'
and 'e76f11543c2a4aa05bdf584f087cbe3439029661'
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 12 Jul 2009 05:43:38 +0000 |
parents | 3a0552df3379 |
children | 5ef119455f0d |
line wrap: on
line diff
--- a/libpurple/dbus-server.c Sun Jul 12 05:42:40 2009 +0000 +++ b/libpurple/dbus-server.c Sun Jul 12 05:43:38 2009 +0000 @@ -421,6 +421,7 @@ } #include "dbus-bindings.c" +#include "dbus-signals.c" static gboolean purple_dbus_dispatch_cb(DBusConnection *connection, @@ -489,6 +490,9 @@ DBusMessage *reply; GString *str; GList *bindings_list, *node; + const char *signals; + const char *type; + const char *pointer_type; str = g_string_sized_new(0x1000); /* TODO: why this size? */ @@ -529,6 +533,19 @@ } } + if (sizeof(int) == sizeof(dbus_int32_t)) + pointer_type = "type='i'"; + else + pointer_type = "type='x'"; + + signals = dbus_signals; + while ((type = strstr(signals, "type='p'")) != NULL) { + g_string_append_len(str, signals, type - signals); + g_string_append(str, pointer_type); + signals = type + sizeof("type='p'") - 1; + } + g_string_append(str, signals); + g_string_append(str, "</interface>\n</node>\n"); reply = dbus_message_new_method_return(message);