comparison sat/bridge/dbus_bridge.py @ 2646:712cb4ff3e13

core: new EncryptionHandler class which manage encrypted session as a core feature: Plugin handling encryption can now register using host.registerEncryptionPlugin, and an encryption session can now be started using messageEncryptionStart bridge method. This will make encryption handling more easy, as we now know if a session is clear or e2e encrypted, and which plugin handle it.
author Goffi <goffi@goffi.org>
date Sun, 29 Jul 2018 19:22:56 +0200
parents 779351da2c13
children b8600f8130ac
comparison
equal deleted inserted replaced
2645:f2cf1daa42cb 2646:712cb4ff3e13
384 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 384 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
385 in_signature='si', out_signature='a(ssasasa{ss})', 385 in_signature='si', out_signature='a(ssasasa{ss})',
386 async_callbacks=None) 386 async_callbacks=None)
387 def menusGet(self, language, security_limit): 387 def menusGet(self, language, security_limit):
388 return self._callback("menusGet", unicode(language), security_limit) 388 return self._callback("menusGet", unicode(language), security_limit)
389
390 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
391 in_signature='sss', out_signature='',
392 async_callbacks=None)
393 def messageEncryptionStart(self, to_jid, encryption_ns='', profile_key="@NONE@"):
394 return self._callback("messageEncryptionStart", unicode(to_jid), unicode(encryption_ns), unicode(profile_key))
389 395
390 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 396 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
391 in_signature='sa{ss}a{ss}sa{ss}s', out_signature='', 397 in_signature='sa{ss}a{ss}sa{ss}s', out_signature='',
392 async_callbacks=('callback', 'errback')) 398 async_callbacks=('callback', 'errback'))
393 def messageSend(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None): 399 def messageSend(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None):