[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone3-274-gd9a0e57
Guillaume Chereau
charlie at openmoko.org
Tue Nov 11 17:09:17 UTC 2008
The following commit has been merged in the master branch:
commit 1204c7b443cdcbf96abe70c8e3333060cbb9a742
Author: Guillaume Chereau <charlie at openmoko.org>
Date: Wed Oct 29 11:07:47 2008 +0800
oeventsd: added RemoveRule DBus method
diff --git a/framework/subsystems/oeventsd/oevents.py b/framework/subsystems/oeventsd/oevents.py
index d62dbe7..131f18d 100644
--- a/framework/subsystems/oeventsd/oevents.py
+++ b/framework/subsystems/oeventsd/oevents.py
@@ -114,11 +114,20 @@ class EventsManager(dbus.service.Object):
@dbus.service.method( "org.freesmartphone.Events" , in_signature='s' )
def AddRule( self, rule_str ):
"""Parse a rule string and add it into the rule list"""
+ rule_str = str( rule_str )
parser = Parser()
rule = parser.parse_rule( rule_str )
+ logger.info( "Add rule %s", rule )
self.add_rule(rule)
self.update()
+ @dbus.service.method( "org.freesmartphone.Events" , in_signature='s' )
+ def RemoveRule( self, name ):
+ """Remove a rule by name"""
+ for rule in self.rules[:]:
+ if rule.name == name:
+ logger.info( "Removing rule %s", name )
+ self.rules.remove(rule)
#============================================================================#
def factory(prefix, controller):
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list