GObject signals remotely

Colin Walters walters at verbum.org
Fri May 20 08:46:04 PDT 2005


On Fri, 2005-05-20 at 10:07 +0300, Kalle Vahlman wrote:
> Hi all,
> 
> I'm implementing stuff in GObjects and exporting them to use over DBus.

Cool.  Are you using 0.33?  Latest CVS?  Or CVS + my latest patch?

> Are the signals supposed to work yet or are the above comments just
> ahead of time?

The client side of signals should work...there's a test in
test/glib/test-dbus-glib.c, however I want to change the API soon to
remove the D-BUS types.  

However as you've discovered, it looks like the server side is not
implemented.  I hadn't noticed that before now, I've been mainly working
on method invocations.

> P.S. For now I connected a local handler for the signal and emitted
> the dbus-signal there. 

Yeah.  Until we fix the bindings this is the workaround.  It should not
be too difficult to implement; from a quick look at the GObject signal
API, inside dbus_g_connection_register_g_object, we'd iterate over the
object's signals, use g_signal_add_emission_hook to add a callback.
Inside that callback we would iterate over the GValues and marshal them
to a D-BUS message using dbus_gvalue_marshal.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050520/6bfb44d7/attachment.pgp


More information about the dbus mailing list