How to get the name of the caller of a method in glib-dbus

Till Wimmer g4-lisz at tonarchiv.ch
Thu Aug 27 15:46:04 PDT 2009


Hello,

i wrote a daemon which exposes a method ("invoke") to the bus:

  dbus_g_object_type_install_info(...)
  dbus_g_connection_register_g_object(...)

This works fine.

Now i'd like to find the unique connection name of the client who calls 
the exposed method.

My goal is to call the client's method "notify" after he connected to 
the daemon using "invoke". But the client doesn't has any well-known name.

Can someone please give me a hint or post some sample code?

Any help would be much appreciated!

TW

Background:
Skype on Linux uses a dbus-API for remote control. This API uses some 
kind of authentication: Before a Skype-API client can receive 
events/messages from Skype (via it's "Notify" method) he has to call the 
"Invoke" method from Skype at least once:

- Client exposes "Notify"
- Skype exposes "Invoke"

1. Client connects to Skype using the well-known name "com.Skype.API"
2. Client calls "invoke" of Skype
3. Skype connects to the client
4. Skype calls "Notify" method of client on every event

I'd like to write some Skype fake to test my Skype-API client,


More information about the dbus mailing list