diff sat/bridge/bridge_constructor/bridge_template.ini @ 2733:e347e32aa07f

core (memory/encryption): new encryptionNamespaceGet and encryptionTrustUIGet methods: - encryptionNamespaceGet retrieves algorithm namespace from its short name - encryptionTrustUIGet retrieves trust mangement XMLUI from encryption plugin - new markAsUntrusted internal helper method, to add untrusted flag to message data
author Goffi <goffi@goffi.org>
date Wed, 02 Jan 2019 18:22:30 +0100
parents 5060cbeec01e
children da59ff099b32
line wrap: on
line diff
--- a/sat/bridge/bridge_constructor/bridge_template.ini	Thu Dec 27 11:40:04 2018 +0100
+++ b/sat/bridge/bridge_constructor/bridge_template.ini	Wed Jan 02 18:22:30 2019 +0100
@@ -60,7 +60,7 @@
 sig_in=sss
 doc=A message encryption session has been started
 doc_param_0=to_jid: JID of the recipient (bare jid if it's encrypted for all devices)
-doc_param_1=encryption_data: [JSON_OBJ] data of the encryption algorithm used, encoded as a json object.
+doc_param_1=encryption_data: (JSON_OBJ) data of the encryption algorithm used, encoded as a json object.
     it always has the following keys:
         - name: human readable name of the algorithm
         - namespace: namespace of the encryption plugin
@@ -445,8 +445,8 @@
 param_3_default="@NONE@"
 doc=Start an encryption session
 doc_param_0=to_jid: JID of the recipient (bare jid if it must be encrypted for all devices)
-doc_param_1=encryption_ns: Namespace of the encryption algorithm to use
-doc_param_2=replace: If True and an encryption session already exists, it will be replaced by this one
+doc_param_1=namespace: namespace of the encryption algorithm to use
+doc_param_2=replace: if True and an encryption session already exists, it will be replaced by this one
     else a ConflictError will be raised
 doc_param_3=%(doc_profile_key)s
 
@@ -455,7 +455,7 @@
 category=core
 sig_in=ss
 sig_out=
-doc=Start an encryption session
+doc=Stop an encryption session
 doc_param_0=to_jid: JID of the recipient (full jid if encryption must be stopped for one device only)
 doc_param_1=%(doc_profile_key)s
 
@@ -467,13 +467,20 @@
 doc=Retrieve encryption data for a given entity
 doc_param_0=to_jid: bare JID of the recipient
 doc_param_1=%(doc_profile_key)s
-doc_return=[JSON_OBJ] empty string if session is unencrypted, else a json encoded objects.
+doc_return=(JSON_OBJ) empty string if session is unencrypted, else a json encoded objects.
     In case of dict, following keys are always present:
         - name: human readable name of the encryption algorithm
         - namespace: namespace of the plugin
     following key can be present if suitable:
         - directed_devices: list or resource where session is encrypted
 
+[encryptionNamespaceGet]
+type=method
+category=core
+sig_in=s
+sig_out=s
+doc=Get algorithm namespace from its name
+
 [encryptionPluginsGet]
 type=method
 category=core
@@ -481,6 +488,18 @@
 sig_out=aa{ss}
 doc=Retrieve registered plugins for encryption
 
+[encryptionTrustUIGet]
+async=
+type=method
+category=core
+sig_in=sss
+sig_out=s
+doc=Get XMLUI to manage trust for given encryption algorithm
+doc_param_0=to_jid: bare JID of entity to manage
+doc_param_0=namespace: namespace of the algorithm to manage
+doc_param_2=%(doc_profile_key)s
+doc_return=(XMLUI) UI of the trust management
+
 [setPresence]
 type=method
 category=core