comparison src/bridge/DBus.py @ 360:6b5626c37909

bridge: regenerated DBus bridge
author Goffi <goffi@goffi.org>
date Mon, 06 Jun 2011 21:55:59 +0200
parents e6047415868d
children 312ca6f9d84a
comparison
equal deleted inserted replaced
359:eb9d33ba4e36 360:6b5626c37909
25 import dbus.service 25 import dbus.service
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_COMM_SUFFIX = ".communication" 31 const_COMM_SUFFIX = ".communication"
31 const_REQ_SUFFIX = ".request" 32 const_REQ_SUFFIX = ".request"
32 33
33 class DbusObject(dbus.service.Object): 34 class DbusObject(dbus.service.Object):
34 35
383 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) 384 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
384 Bridge.__init__(self) 385 Bridge.__init__(self)
385 info ("Init DBus...") 386 info ("Init DBus...")
386 self.session_bus = dbus.SessionBus() 387 self.session_bus = dbus.SessionBus()
387 self.dbus_name = dbus.service.BusName(const_INT_PREFIX, self.session_bus) 388 self.dbus_name = dbus.service.BusName(const_INT_PREFIX, self.session_bus)
388 self.dbus_bridge = DbusObject(self.session_bus, '/org/goffi/SAT/bridge') 389 self.dbus_bridge = DbusObject(self.session_bus, const_OBJ_PATH)
389 390
390 def actionResult(self, answer_type, id, data): 391 def actionResult(self, answer_type, id, data):
391 self.dbus_bridge.actionResult(answer_type, id, data) 392 self.dbus_bridge.actionResult(answer_type, id, data)
392 393
393 def actionResultExt(self, answer_type, id, data): 394 def actionResultExt(self, answer_type, id, data):