Posted on April 10, 2007, 3:09 pm, by Mayank Jain (makuchaku).
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 [...]
Posted on March 23, 2007, 6:00 pm, by Mayank Jain (makuchaku).
Some more DBus poking… Listing the interfaces available in session (or system) #> dbus-send –session –type=method_call –print-reply –dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames method return sender=org.freedesktop.DBus -> dest=:1.49 [string "org.freedesktop.DBus" string ":1.49" string ":1.3" string "org.gnome.PowerManager" string "org.gnome.ScreenSaver" string "org.xchat.service" string ":1.4" string ":1.0" string ":1.5" string ":1.6" string ":1.2" Now lets query org.gnome.PowerManager #> dbus-send --session --type=method_call [...]
Posted on March 22, 2007, 9:31 pm, by Mayank Jain (makuchaku).
Check out this listener – still incomplete in many ways… Compile with “gcc listener.c -o listener `pkg-config –cflags –libs dbus-glib-1`” and run with “./listener” & to create a stream of events, fire up evolution & just start browsing through emails. –> Signal received! Signal path : /org/gnome/evolution/mail/newmail Signal interface : org.gnome.evolution.mail.dbus.Signal Signal name : MessageReading [...]