diff frontends/src/quick_frontend/quick_app.py @ 2086:4633cfcbcccb

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
author Goffi <goffi@goffi.org>
date Mon, 03 Oct 2016 21:15:39 +0200
parents 7834743705f0
children 0931b5a6213c
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Sun Oct 02 22:44:33 2016 +0200
+++ b/frontends/src/quick_frontend/quick_app.py	Mon Oct 03 21:15:39 2016 +0200
@@ -287,7 +287,7 @@
         if handler is None:
             handler = getattr(self, "{}{}".format(function_name, 'Handler'))
         if not with_profile:
-            self.bridge.register(function_name, handler, iface)
+            self.bridge.register_signal(function_name, handler, iface)
             return
 
         def signalReceived(*args, **kwargs):
@@ -303,7 +303,7 @@
                         self.signals_cache.setdefault(profile, []).append((function_name, handler, args, kwargs))
                     return  # we ignore signal for profiles we don't manage
             handler(*args, **kwargs)
-        self.bridge.register(function_name, signalReceived, iface)
+        self.bridge.register_signal(function_name, signalReceived, iface)
 
     def addListener(self, type_, callback, profiles_filter=None):
         """Add a listener for an event