dbus getting Originator ID in C
thiago at kde.org
Mon Feb 11 12:46:45 PST 2013
On segunda-feira, 11 de fevereiro de 2013 20.29.04, Richard wrote:
> Hi All,
> Pardon the intrusion but I am on the quest for some information as I
> am stuck. I tried searching but I am at a loss what to search for, but
> here goes.
> I am implementing a dbus based client and server and would like to
> know how to get the common name of sender of the message.
You can only get the unique connection name.
> Client Server
> dvb.ingres.client ---> dvb.settings.server
> I can receive all the messages at the server but would like to know
> WHO sent the message. _get_sender() returns a chaging number,
> get_server_id returns a large number that I dont know where it comes
> Is there a way to get the human readable name of the message
> originator? (who the client is)
No, you can only get the unique connection name, which is probably the
"changing number" you mention.
You can ask the bus for the unique connection name of the sender you expect it
to be and then compare if they are the same. Use the GetNameOwner call.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the dbus