GDBus API/usage questions
- From: Travis Reitter <treitter gmail com>
- To: david fubar dk, gtk-devel-list gnome org
- Subject: GDBus API/usage questions
- Date: Wed, 25 Nov 2009 11:57:53 -0800
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:
GLib-DBus-Standalone:ERROR:gdbusprivate.c:259:connection_setup_add_watch:
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
example-watch-proxy.c
* 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
work
* When I create a proxy for a D-Bus object that has neither signals
nor properties, the proxy creation fails unless I pass
(G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS). Is that expected?
Here's my branch that works (except for that race condition):
http://git.gnome.org/cgit/evolution-data-server/log/?h=treitter-client-gdbus
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):
http://git.gnome.org/cgit/evolution-data-server/log/?h=treitter-client-gdbus-watch-proxy
Am I doing anything obviously wrong in the -watch-proxy branch?
Thanks,
-Travis
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]