Spread and use Firefox
Advertise on this blog!
-->

Subscribe to my posts via Email


Delivered by FeedBurner

I'm an Indian
Darn proud of being an Indian!

Links...

Categories

Archives

Friends



Subscribe





External Links


April 10, 2007

(Posted at 3:09 pm)

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 :)

Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image