<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=788192400-19042008><FONT face=Arial
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=788192400-19042008><FONT face=Arial size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=788192400-19042008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=788192400-19042008><FONT face=Arial size=2>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.) </FONT></SPAN></DIV>
<DIV><SPAN class=788192400-19042008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=788192400-19042008><FONT face=Arial size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=788192400-19042008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=788192400-19042008><FONT face=Arial size=2>Any
suggestions?</FONT></SPAN></DIV>
<DIV><SPAN class=788192400-19042008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=788192400-19042008><FONT face=Arial
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=788192400-19042008></SPAN><FONT face=Arial size=2>Brandon
</FONT></DIV></BODY></HTML>