Send Ad Free SMS in India

Exposing a DBus signal as a Glib signals

April 10, 2007 | In: DBus, Technology

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

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Reddit Post to StumbleUpon

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Comment Form

blog comments powered by Disqus