server.py: emit D-BUS signal on change
authorDavid Adam (zanchey) <zanchey@ucc.gu.uwa.edu.au>
Mon, 7 Sep 2009 14:32:47 +0000 (22:32 +0800)
committerDavid Adam (zanchey) <zanchey@ucc.gu.uwa.edu.au>
Tue, 13 Oct 2009 14:38:46 +0000 (22:38 +0800)
server.py

index f0d1336..3bbd697 100755 (executable)
--- 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):

UCC git Repository :: git.ucc.asn.au