Bug 28778 - Migrate from dbus-glib to glib's GDBus
Summary: Migrate from dbus-glib to glib's GDBus
Status: NEW
Alias: None
Product: at-spi2
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Rob Taylor
QA Contact:
Depends on:
Reported: 2010-06-27 04:02 UTC by Andre Klapper
Modified: 2010-12-09 09:07 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Description Andre Klapper 2010-06-27 04:02:10 UTC
For GLib 2.25.5 GDBus D-Bus support was merged, providing an API to replace dbus-glib.

See http://library.gnome.org/devel/gio/unstable/gdbus.html and http://library.gnome.org/devel/gio/unstable/ch28.html .

According to a quick grep this module seems to use dbus-glib:

./at-spi2-core/configure.ac:PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.7.0])
Comment 1 Andre Klapper 2010-06-27 04:47:45 UTC
Also applies to the atk part:
./at-spi2-atk/configure.ac:PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.7.0])
Comment 2 Mike Gorse 2010-10-06 05:32:20 UTC
It seems a bit misleading to say that gdbus provides an API to "replace dbus-glib."  Afaik it is a standalone libdbus implementation, so of course there is no equivalent to dbus_connection_setup_with_g_main, which is all I'm using dbus-glib for.  The rest of my code uses libdbus, so am I required to rewrite it to use gdbus / is it now unacceptable for a module to depend on libdbus for GNOME 3.0?  Feel free to point me to a relevant gnomegoal or similar.
Comment 3 Andre Klapper 2010-10-06 07:02:01 UTC
Sorry, I don't code. Maybe http://mail.gnome.org/archives/commits-list/2010-May/msg03852.html helps to get an idea.
Comment 4 Mike Gorse 2010-12-09 08:01:09 UTC
		Round-trip calls are several times slower with gdbus than with libdbus from the testing that I've done. 	 I've filed BGO#634471 for this.  It would just not work for me to try to port AT-SPI to gdbus for this reason, and it would essentially mean *another* rewrite that I don't think I would have the time for right now.

That being said, AT-SPI is not really using the full dbus-glib API.  It calls a total of two functions from dbus-glib (for main loop integration), and it is not clear that these functions were really meant to be deprecated except that they currently reside in dbus-glib.  I've discussed the situation with people on #dbus and at the GNOME summit, and some people suggested that perhaps these functions should be put in a small library to be optionally built as part of the dbus module.  I filed FDO#31515 with a patch to do this, but there doesn't seem to be a consensus as to what should be done.  I could simply copy the code into libatspi if I needed to, as it isn't a large amount of code.
Comment 5 Colin Walters 2010-12-09 09:07:56 UTC
Depending on libdbus is OK for 3.0.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.