From fbe4055aa03388b5c768f6c2213bf4c8bf031ac9 Mon Sep 17 00:00:00 2001 From: "David Adam (zanchey)" Date: Mon, 7 Sep 2009 22:32:47 +0800 Subject: [PATCH] server.py: emit D-BUS signal on change --- server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index f0d1336..3bbd697 100755 --- a/server.py +++ b/server.py @@ -31,11 +31,15 @@ class Door(dbus.service.Object): if newstatus != self.status: self.status = newstatus # emit signal - # XXX to be added + self.status_changed(newstatus) # set up timeout again gobject.timeout_add_seconds(self.interval, self.poll) + @dbus.service.signal('au.asn.ucc.DoorInterface', signature='n') + def status_changed(self, newstatus): + pass + @dbus.service.method('au.asn.ucc.DoorInterface', in_signature='', out_signature='n') def get_status(self): -- 2.20.1