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
|
|
@ -287,7 +287,7 @@ class QuickApp(object):
|
|||
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 @@ class QuickApp(object):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue