Register multiple interfaces with dbus-glib

Christensen, Brandon Brandon.Christensen at
Fri Apr 18 17:38:25 PDT 2008

I have a dbus object that I would like to dynamically add interfaces to.
The idea is that I'd like to have a basic interface that is
automatically associated with the object when it is created.  One of the
methods in the basic interface would be something like
ConnectService("serviceA"), which would set up some state variables in
the object and then expose the serviceA interface for that object.
The only way I see to add an interface in the dbus-glib bindings is
dbus_g_object_type_install_info(), but this function installs the
interface to the entire class, not just a specific object.  (Also,
calling this after the class has been initialized causes a segfault in
my app.) 
I've considered subclassing my base object, but the problem is that I
have about 5 interfaces I'd like to dynamically add so there are a fair
number of combinations and I think each would require their own
class/object type.
Any suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the dbus mailing list