contributed by Jiri Moskovcak <jmoskovc@redhat.com>

This commit is contained in:
Andreas Volz 2009-02-22 18:08:31 +01:00
parent 89ea273d11
commit eefe20a40d
2 changed files with 13 additions and 0 deletions

View file

@ -409,6 +409,8 @@ public:
PendingCall send_async( Message& msg, int timeout = -1);
void request_name( const char* name, int flags = 0 );
unsigned long sender_unix_uid(const char *sender);
/*!
* \brief Asks the bus whether a certain name has an owner.

View file

@ -398,6 +398,17 @@ void Connection::request_name(const char *name, int flags)
}
}
unsigned long Connection::sender_unix_uid(const char *sender)
{
InternalError e;
unsigned long ul = dbus_bus_get_unix_user(_pvt->conn, sender, e);
if (e) throw Error(e);
return ul;
}
bool Connection::has_name(const char *name)
{
InternalError e;