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

@ -410,6 +410,8 @@ public:
void request_name( const char* name, int flags = 0 ); 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. * \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) bool Connection::has_name(const char *name)
{ {
InternalError e; InternalError e;