April 10, 2007
Exposing a DBus signal as a Glib signals
Though there is no direct api to make this happen, one can easily route the DBus signal as a Glib signal.
All’s that required is to add a callback to the DBus signal using dbus_g_proxy_connect_signal and then emit the related GLib signal from that callback using g_signal_emit
Download the tarball : GObject-dbus-signal-as-g-signal.tar.gz
This example contains a bare bones implementation of a new object which is derived from GObject - so if you are new to deriving GObject’s, have a look at the code - might be usefull
Dependencies to compile…
`pkg-config –cflags –libs dbus-glib-1`
If your pkg-config runs fine for dbus-glib-1, you can compile the example with “make” - i’m pretty bad at Makefiles, but i’m learning ![]()


