For debugging purposes I want to know the sender name of a dbus message. But dbus_message_get_sender returns the senders unique name which usually is something like this: :1.60. I'm looking for a way to get the name as set by dbus_request_name.
org.freedesktop.DBus interface provides a method to query unique name that corresponds to the set name which is calledGetNameOwner. But I can't find a method to do the opposite?
One method I figured is to get a list of all registered names with the ListNames method, then query the unique name for each name with GetNameOwner until a match happens. This should work but I still think that there should be a simpler way of doing this.