Mercurial > libervia-backend
comparison src/bridge/bridge_constructor/dbus_core_template.py @ 371:3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 06 Jul 2011 01:04:24 +0200 |
parents | eb9d33ba4e36 |
children | 6c167a2e04b8 |
comparison
equal
deleted
inserted
replaced
370:68cdaf6d78e3 | 371:3ea41a199b36 |
---|---|
26 import dbus.mainloop.glib | 26 import dbus.mainloop.glib |
27 from logging import debug, info | 27 from logging import debug, info |
28 | 28 |
29 const_INT_PREFIX = "org.goffi.SAT" #Interface prefix | 29 const_INT_PREFIX = "org.goffi.SAT" #Interface prefix |
30 const_OBJ_PATH = '/org/goffi/SAT/bridge' | 30 const_OBJ_PATH = '/org/goffi/SAT/bridge' |
31 const_COMM_SUFFIX = ".communication" | 31 const_CORE_SUFFIX = ".core" |
32 const_REQ_SUFFIX = ".request" | 32 const_PLUGIN_SUFFIX = ".plugin" |
33 | 33 |
34 class DbusObject(dbus.service.Object): | 34 class DbusObject(dbus.service.Object): |
35 | 35 |
36 def __init__(self, bus, path): | 36 def __init__(self, bus, path): |
37 dbus.service.Object.__init__(self, bus, path) | 37 dbus.service.Object.__init__(self, bus, path) |
40 | 40 |
41 def register(self, name, cb): | 41 def register(self, name, cb): |
42 self.cb[name]=cb | 42 self.cb[name]=cb |
43 | 43 |
44 ### signals ### | 44 ### signals ### |
45 | |
46 @dbus.service.signal(const_INT_PREFIX+const_PLUGIN_SUFFIX, | |
47 signature='') | |
48 def dummySignal(self): | |
49 #FIXME: workaround for addSignal (doesn't work if one method doensn't | |
50 # already exist for plugins), probably missing some initialisation, need | |
51 # further investigations | |
52 pass | |
45 | 53 |
46 ##SIGNALS_PART## | 54 ##SIGNALS_PART## |
47 | 55 |
48 ### methods ### | 56 ### methods ### |
49 | 57 |