Question subscribing for signals...
"Tobias Luckner" <TobiasLuckner-S0/[email protected]>
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Message-ID | <trinity-680232ef-b180-4ce4-9735-2ae51d3b27e5-1453202818840@3capp-webde-bap14> |
Hi,
i hope someone can help me - i just started with Dbus and struggeling to subscibe to the PropertiesChanged signal of org.freedesktop.DBus.Properties.
I googleing for 3 days and hope that an expert will see my fault in a minute :)
I try to subscibe to the PropertiesChanged signal of org.freedesktop.DBus.Properties using the follwing code:
DBusGProxy* purple_proxy = dbus_g_proxy_new_for_name (bus,
"org.bluez",
"/org/bluez/hci0",
"org.freedesktop.DBus.Properties");
GType VariantMap = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VARIANT);
GType MyStringList = dbus_g_type_get_collection("GPtrArray",G_TYPE_STRING);
dbus_g_object_register_marshaller(g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED,
G_TYPE_NONE, G_TYPE_STRING, VariantMap,MyStringList, G_TYPE_INVALID);
dbus_g_proxy_add_signal (purple_proxy, "PropertiesChanged",
G_TYPE_STRING,
VariantMap,
MyStringList,
G_TYPE_INVALID);
dbus_g_proxy_connect_signal (purple_proxy,
"PropertiesChanged",
G_CALLBACK (properties_changed_proxy),
bus,
NULL);
I dont get an error but my callback wouldn't be called.
I used dbus monitor to see that the signal is fired.
Maybe my "arguments list" for registering the signal is wrong.
/*
signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString interface,
QVariantMap changed_properties,
QStringList invalidated_properties)
*/
Thanks for your help
Tobias
_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus