diff 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
line wrap: on
line diff
--- a/sat/bridge/dbus_bridge.py	Sun Jul 29 19:22:51 2018 +0200
+++ b/sat/bridge/dbus_bridge.py	Sun Jul 29 19:22:56 2018 +0200
@@ -388,6 +388,12 @@
         return self._callback("menusGet", unicode(language), security_limit)
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
+                         in_signature='sss', out_signature='',
+                         async_callbacks=None)
+    def messageEncryptionStart(self, to_jid, encryption_ns='', profile_key="@NONE@"):
+        return self._callback("messageEncryptionStart", unicode(to_jid), unicode(encryption_ns), unicode(profile_key))
+
+    @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='sa{ss}a{ss}sa{ss}s', out_signature='',
                          async_callbacks=('callback', 'errback'))
     def messageSend(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None):