From 7b9236f2aef06b203acc019592cd102672427633 Mon Sep 17 00:00:00 2001 From: Robert McQueen Date: Mon, 14 Nov 2005 02:53:30 +0000 Subject: 2005-11-14 Robert McQueen * python/decorators.py, python/service.py: Add a new argument to the dbus.service.method decorator called sender_keyword, which if set, specifies the name of an argument which will be provided the bus name of the method caller. * test/python/test-client.py, test/python/test-service.py: Add a method and test to check the sender_keyword functionality. --- test/python/test-service.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/python/test-service.py') diff --git a/test/python/test-service.py b/test/python/test-service.py index d5488c44..e8213805 100755 --- a/test/python/test-service.py +++ b/test/python/test-service.py @@ -130,6 +130,10 @@ class TestObject(dbus.service.Object, TestInterface): except Exception, e: error_cb(e) + @dbus.service.method('org.freedesktop.DBus.TestSuiteInterface', in_signature='', out_signature='s', sender_keyword='sender') + def WhoAmI(self, sender): + return sender + session_bus = dbus.SessionBus() name = dbus.service.BusName("org.freedesktop.DBus.TestSuitePythonService", bus=session_bus) object = TestObject(name) -- cgit