Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > contrib-backports-src > by-pkgid > 04f20d450eccad90b0a4fecb1ebd7a68 > files > 4

dbus-c++-0.5.0-0.20090203.2mdv2009.1.src.rpm

--- dbus-c++/include/dbus-c++/connection.h	2009-01-08 21:58:42.000000000 +0100
+++ dbus-c++_mzk/include/dbus-c++/connection.h	2009-02-18 17:56:09.000000000 +0100
@@ -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.
--- dbus-c++/src/connection.cpp	2009-01-08 21:58:42.000000000 +0100
+++ dbus-c++_mzk/src/connection.cpp	2009-02-18 17:55:05.000000000 +0100
@@ -398,6 +398,17 @@ void Connection::request_name(const char
 	}
 }
 
+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;