DBUS service using glib: question

Xavier Claessens xclaesse at gmail.com
Wed Jul 19 06:46:53 PDT 2006


On mer, 2006-07-19 at 10:06 +0100, Ross Burton wrote:
> On Wed, 2006-07-19 at 10:58 +0200, Xavier Claessens wrote:
> >  - Clients has a name returned by dbus_g_method_get_sender. But how
> > clients can get his name ? My idea is to register a new object for each
> > client with path "/org/blah/<client's name>". But the client has to know
> > his name to know the path. Is it possible ? Or should I register an
> > object with a method like "GetObjectPath" which returns the path of the
> > object registered for the client calling this method ?
> 
> dbus_get_unique_name() will return the processes name on the bus.  It
> might be better to return the object path of the object you create when
> clients register with the server, this way you can change the naming
> scheme in only one place.

Thanks !
So I register an object for each client with
dbus_g_connection_register_g_object(). When the client disconnect how
can I "unregister" the object and destroy it ? g_object_unref() is
enough ?

once more: thanks for all your help !

Xavier Claessens.



More information about the dbus mailing list