GDBus API/usage questions

Hi David,

I'm porting e-d-s's libebook from dbus-glib to gdbus and I've run into
a couple confusing bits of GDBus:

* g_dbus_connection_bus_get() always seems to end in this failure:

assertion failed: (dbus_watch_get_data (watch) == NULL)

Is this intentional? Should there just be some simple tracking to
avoid running the setup on the same connection twice? Is it a case of
the connection being set up upon the original _get() and again when
creating a proxy for it?

* I've worked around the above problem in my own code by using
g_dbus_connection_bus_get_private(), but I just bumped into this same
problem within gdbusproxywatching, just doing something similar to

* How is service activation supposed to work with GDBus? I don't see
any way to get the DBusConnection for a given GDBusProxy or
GDBusConnection -- should I just use dbus_bus_get(), or am I missing
some convenience API?

* I seem to have a race between a service handling daemon exiting
(which it does a few seconds after all clients disconnect) and a
client connecting to it (and then failing when it gets a timeout
calling one of its methods). I assume I need to watch for the proxy
disappearing (as above), but, like I said, I can't seem to get that to

* When I create a proxy for a D-Bus object that has neither signals
nor properties, the proxy creation fails unless I pass

Here's my branch that works (except for that race condition):

Here's the branch where I'm trying to watch the proxy (and obviously
doesn't work; it's a direct descendant of the branch above, though I
accidentally mangled the refs, so it doesn't appear to be):

Am I doing anything obviously wrong in the -watch-proxy branch?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]