contributed by Jiri Moskovcak <jmoskovc@redhat.com>
This commit is contained in:
parent
89ea273d11
commit
eefe20a40d
2 changed files with 13 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue