dbus/python dbus.py,1.2,1.3

David Zeuthen david@pdx.freedesktop.org
Mon, 01 Dec 2003 12:49:55 -0800


Update of /cvs/dbus/dbus/python
In directory pdx:/tmp/cvs-serv29560/python

Modified Files:
	dbus.py 
Log Message:
2003-12-01  David Zeuthen  <david@fubar.dk>

	* python/dbus.py: Add the actual message when calling the reciever
	of a signal such that parameters can be inspected. Add the method
	remove_signal_receiver
	


Index: dbus.py
===================================================================
RCS file: /cvs/dbus/dbus/python/dbus.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dbus.py	30 Sep 2003 02:40:49 -0000	1.2
+++ dbus.py	1 Dec 2003 20:49:53 -0000	1.3
@@ -75,7 +75,15 @@
         self._match_rule_to_receivers[match_rule].append(receiver)
         
         dbus_bindings.bus_add_match(self._connection, match_rule)
-        
+
+    def remove_signal_receiver(self, receiver, interface=None, service=None, path=None):
+        match_rule = self._get_match_rule(interface, service, path)
+
+        if self._match_rule_to_receivers.has_key(match_rule):
+            if self._match_rule_to_receivers[match_rule].__contains__(receiver):
+                self._match_rule_to_receivers[match_rule].remove(receiver)
+                dbus_bindings.bus_remove_match(self._connection, match_rule)
+
     def get_connection(self):
         """Get the dbus_bindings.Connection object associated with this Bus"""
         return self._connection
@@ -103,7 +111,7 @@
 
         if (self._match_rule_to_receivers.has_key(match_rule)):
             receivers = self._match_rule_to_receivers[match_rule]
-            args = [interface, member, service, path]
+            args = [interface, member, service, path, message]
             for receiver in receivers:
                 receiver(*args)