Mercurial > libervia-backend
diff frontends/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 | 141eeb7cd9e6 |
line wrap: on
line diff
--- a/frontends/src/bridge/DBus.py Mon Jun 06 18:35:30 2011 +0200 +++ b/frontends/src/bridge/DBus.py Mon Jun 06 21:55:59 2011 +0200 @@ -23,6 +23,11 @@ import dbus, dbus.glib from logging import debug +const_INT_PREFIX = "org.goffi.SAT" #Interface prefix +const_OBJ_PATH = '/org/goffi/SAT/bridge' +const_COMM_SUFFIX = ".communication" +const_REQ_SUFFIX = ".request" + class BridgeExceptionNoService(Exception): pass @@ -30,12 +35,12 @@ def __init__(self): try: self.sessions_bus = dbus.SessionBus() - self.db_object = self.sessions_bus.get_object('org.goffi.SAT', - '/org/goffi/SAT/bridge') + self.db_object = self.sessions_bus.get_object(const_INT_PREFIX, + const_OBJ_PATH) self.db_comm_iface = dbus.Interface(self.db_object, - dbus_interface='org.goffi.SAT.communication') + dbus_interface=const_INT_PREFIX + const_COMM_SUFFIX) self.db_req_iface = dbus.Interface(self.db_object, - dbus_interface='org.goffi.SAT.request') + dbus_interface=const_INT_PREFIX + const_REQ_SUFFIX) except dbus.exceptions.DBusException,e: if e._dbus_error_name=='org.freedesktop.DBus.Error.ServiceUnknown': raise BridgeExceptionNoService