gdbus: Problems getting cached properties immediately after receiving 'g-name-owner'
- Date: Thu, 10 Dec 2015 10:50:36 +0100
- From: Anders Norman <norman.anders@xxxxxxxxx>
- Subject: gdbus: Problems getting cached properties immediately after receiving 'g-name-owner'
I use gdbus-codegen to create proxy classes for my dbus objects. I
create a proxy using:
m_proxy = dbus_foo_proxy_new_for_bus_sync(
And connect to the signal:
When I the name is owned, I get a signal and immediately try to read all
GObject * gobject,
GParamSpec * pspec,
GVariant * variant = g_dbus_proxy_get_cached_property(
However, the variant returned from g_dbus_proxy_get_cached_property is
NULL. I read in glib source file gdbusproxy.c, on_name_owner_changed()
that when glib receives the underlying org.freedesktop.DBus
NameOwnerChanged signal, it will first issue a
org.freedesktop.DBus.Properties GetAll method call before it will emit
the g-name-owner signal, in on_name_owner_changed_get_all_cb().
What can be the reason the properties are not available when I receive
the g-name-owner signal?
(cross posted on
gtk-list mailing list