Register multiple interfaces with dbus-glib

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


Hi,
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?
 
Thanks,
Brandon 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080418/b5d9da20/attachment.html 


More information about the dbus mailing list