bridge (D-Bus): bad design fixes:
- renamed outputed module to dbus_bridge (to avoid uppercase and conflict with dbus module)
- class name is now Bridge for both frontend and core (make discovery/import more easy)
- register renamed to register_method in core, and register_signal in frontend
This commit is contained in:
parent
fc04d33fac
commit
372f54ec2a
1 changed files with 70 additions and 70 deletions
|
|
@ -59,7 +59,7 @@ def dbus_to_bridge_exception(dbus_e):
|
|||
return BridgeException(name, message, condition)
|
||||
|
||||
|
||||
class DBusBridgeFrontend(BridgeFrontend):
|
||||
class Bridge(BridgeFrontend):
|
||||
def __init__(self):
|
||||
try:
|
||||
self.sessions_bus = dbus.SessionBus()
|
||||
|
|
@ -80,7 +80,7 @@ class DBusBridgeFrontend(BridgeFrontend):
|
|||
raise e
|
||||
#props = self.db_core_iface.getProperties()
|
||||
|
||||
def register(self, functionName, handler, iface="core"):
|
||||
def register_signal(self, functionName, handler, iface="core"):
|
||||
if iface == "core":
|
||||
self.db_core_iface.connect_to_signal(functionName, handler)
|
||||
elif iface == "plugin":
|
||||
Loading…
Reference in a new issue