comparison sat/bridge/dbus_bridge.py @ 2854:eb9fa72eb62b

core: added a "_debug" signal: this signal is a generic debugging signal which can be implemented in frontends to do specific actions, like printing data dumps.
author Goffi <goffi@goffi.org>
date Sun, 10 Mar 2019 18:04:01 +0100
parents 003b8b4b56a7
children 82b781c46841
comparison
equal deleted inserted replaced
2853:6901a425d882 2854:eb9fa72eb62b
124 @dbus.service.signal(const_INT_PREFIX + const_PLUGIN_SUFFIX, signature="") 124 @dbus.service.signal(const_INT_PREFIX + const_PLUGIN_SUFFIX, signature="")
125 def dummySignal(self): 125 def dummySignal(self):
126 # FIXME: workaround for addSignal (doesn't work if one method doensn't 126 # FIXME: workaround for addSignal (doesn't work if one method doensn't
127 # already exist for plugins), probably missing some initialisation, need 127 # already exist for plugins), probably missing some initialisation, need
128 # further investigations 128 # further investigations
129 pass
130
131 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
132 signature='sa{ss}s')
133 def _debug(self, action, params, profile):
129 pass 134 pass
130 135
131 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, 136 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
132 signature='a{ss}sis') 137 signature='a{ss}sis')
133 def actionNew(self, action_data, id, security_limit, profile): 138 def actionNew(self, action_data, id, security_limit, profile):
679 ) 684 )
680 raise BridgeInitError 685 raise BridgeInitError
681 self.dbus_name = dbus.service.BusName(const_INT_PREFIX, self.session_bus) 686 self.dbus_name = dbus.service.BusName(const_INT_PREFIX, self.session_bus)
682 self.dbus_bridge = DbusObject(self.session_bus, const_OBJ_PATH) 687 self.dbus_bridge = DbusObject(self.session_bus, const_OBJ_PATH)
683 688
689 def _debug(self, action, params, profile):
690 self.dbus_bridge._debug(action, params, profile)
691
684 def actionNew(self, action_data, id, security_limit, profile): 692 def actionNew(self, action_data, id, security_limit, profile):
685 self.dbus_bridge.actionNew(action_data, id, security_limit, profile) 693 self.dbus_bridge.actionNew(action_data, id, security_limit, profile)
686 694
687 def connected(self, profile, jid_s): 695 def connected(self, profile, jid_s):
688 self.dbus_bridge.connected(profile, jid_s) 696 self.dbus_bridge.connected(profile, jid_s)