Mercurial > libervia-backend
comparison src/bridge/bridge_constructor/dbus_core_template.py @ 419:6c167a2e04b8
bridge: added generic D-Bus exception management + asyncCreateProfile method
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 02 Nov 2011 22:47:59 +0100 |
parents | 3ea41a199b36 |
children | 6c20c76abdcc |
comparison
equal
deleted
inserted
replaced
418:199cf4ebcc74 | 419:6c167a2e04b8 |
---|---|
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_ERROR_PREFIX = const_INT_PREFIX+".error" | |
30 const_OBJ_PATH = '/org/goffi/SAT/bridge' | 31 const_OBJ_PATH = '/org/goffi/SAT/bridge' |
31 const_CORE_SUFFIX = ".core" | 32 const_CORE_SUFFIX = ".core" |
32 const_PLUGIN_SUFFIX = ".plugin" | 33 const_PLUGIN_SUFFIX = ".plugin" |
34 | |
35 class GenericException(dbus.DBusException): | |
36 def __init__(self, name): | |
37 super(GenericException,self).__init__() | |
38 self._dbus_error_name = const_ERROR_PREFIX+"."+name | |
33 | 39 |
34 class DbusObject(dbus.service.Object): | 40 class DbusObject(dbus.service.Object): |
35 | 41 |
36 def __init__(self, bus, path): | 42 def __init__(self, bus, path): |
37 dbus.service.Object.__init__(self, bus, path) | 43 dbus.service.Object.__init__(self, bus, path) |