From: David Zeuthen Date: Mon, 1 Dec 2003 20:49:53 +0000 (+0000) Subject: 2003-12-01 David Zeuthen X-Git-Tag: dbus-0.21~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e77824dff9ea3e903f92b6d290a9ca87ae28b84;p=thirdparty%2Fdbus.git 2003-12-01 David Zeuthen * 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 --- diff --git a/ChangeLog b/ChangeLog index e75e88b29..08af5331d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-12-01 David Zeuthen + + * 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 + 2003-11-26 Mikael Hallendal * bus/*.[ch]: diff --git a/python/dbus.py b/python/dbus.py index c7ab5dd3d..3a997da1b 100644 --- a/python/dbus.py +++ b/python/dbus.py @@ -75,7 +75,15 @@ class Bus: 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 @@ class Bus: 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)