Getting method call metadata in dbus-glib servers

Ross Burton ross at burtonini.com
Thu May 29 09:02:53 PDT 2008


On Thu, 2008-05-29 at 10:55 -0500, Matt Hoosier wrote:
> I can manually attach to the org.freedesktop.DBus service and monitor
> for NameOwnerChanged messages, and infer when a client has
> disconnected from these. But I'm not clear on a technique for
> discovering the client's bus name (e.g., ":1.90") or other unique
> identifier at the time that the resources are initially allocated.

If you make your methods asynchronous, then you'll be given a context
object which lets you get the sender's bus name.

http://svn.o-hand.com/repos/eds-dbus/trunk/addressbook/libedata-book-dbus/e-data-book-factory.c has an example of this.

Ross
-- 
Ross Burton                                 mail: ross at burtonini.com
                                          jabber: ross at burtonini.com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF





More information about the dbus mailing list