GObject signals remotely

Kalle Vahlman kalle.vahlman at gmail.com
Fri May 20 00:07:54 PDT 2005


Hi all,

I'm implementing stuff in GObjects and exporting them to use over DBus.

The methods work fine, properties I haven't tested yet, but my problem
is the signals. I was under the impression that they should work like
magic:

[...]
/**
 * Registers a GObject at the given path. Properties, methods, and signals
 * of the object can then be accessed remotely. Methods are only available
 * if method introspection data has been added to the object's class
 * with g_object_class_install_info().
[...]

but they don't. Tracking the code flow I got to
gobject_message_function which says:

[...]
  /* Try the metainfo, which lets us invoke methods */
  if (lookup_object_and_method (object, message, &object_info, &method))
    return invoke_object_method (object, object_info, method,
connection, message);

  /* If no metainfo, we can still do properties and signals
   * via standard GLib introspection
   */
[...]

but the rest of the code seems to handle properties and not signals.

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

P.S. For now I connected a local handler for the signal and emitted
the dbus-signal there. I hope this is not the intended way since a)
you have to emit signals twice, which is little silly or b) you'd have
to carry the connection inside the GObject to do this from the default
handler, which in effect makes any GObject to be exported to be
dbus-specific (which would be a shame).

-- 
Kalle Vahlman, zuh at iki.fi


More information about the dbus mailing list