comparison sat_frontends/bridge/pb.py @ 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 4e130cc9bfc0
children 378188abe941
comparison
equal deleted inserted replaced
2732:e55f871fa9db 2733:e347e32aa07f
212 d.addCallback(lambda dummy: callback()) 212 d.addCallback(lambda dummy: callback())
213 if errback is None: 213 if errback is None:
214 errback = self._generic_errback 214 errback = self._generic_errback
215 d.addErrback(errback) 215 d.addErrback(errback)
216 216
217 def encryptionNamespaceGet(self, arg_0, callback=None, errback=None):
218 d = self.root.callRemote("encryptionNamespaceGet", arg_0)
219 if callback is not None:
220 d.addCallback(callback)
221 if errback is None:
222 errback = self._generic_errback
223 d.addErrback(errback)
224
217 def encryptionPluginsGet(self, callback=None, errback=None): 225 def encryptionPluginsGet(self, callback=None, errback=None):
218 d = self.root.callRemote("encryptionPluginsGet") 226 d = self.root.callRemote("encryptionPluginsGet")
219 if callback is not None: 227 if callback is not None:
220 d.addCallback(callback) 228 d.addCallback(callback)
221 if errback is None: 229 if errback is None:
222 errback = self._generic_errback 230 errback = self._generic_errback
223 d.addErrback(errback) 231 d.addErrback(errback)
224 232
233 def encryptionTrustUIGet(self, namespace, arg_1, profile_key, callback=None, errback=None):
234 d = self.root.callRemote("encryptionTrustUIGet", namespace, arg_1, profile_key)
235 if callback is not None:
236 d.addCallback(callback)
237 if errback is None:
238 errback = self._generic_errback
239 d.addErrback(errback)
240
225 def getConfig(self, section, name, callback=None, errback=None): 241 def getConfig(self, section, name, callback=None, errback=None):
226 d = self.root.callRemote("getConfig", section, name) 242 d = self.root.callRemote("getConfig", section, name)
227 if callback is not None: 243 if callback is not None:
228 d.addCallback(callback) 244 d.addCallback(callback)
229 if errback is None: 245 if errback is None:
396 d.addCallback(callback) 412 d.addCallback(callback)
397 if errback is None: 413 if errback is None:
398 errback = self._generic_errback 414 errback = self._generic_errback
399 d.addErrback(errback) 415 d.addErrback(errback)
400 416
401 def messageEncryptionStart(self, to_jid, encryption_ns='', replace=False, profile_key="@NONE@", callback=None, errback=None): 417 def messageEncryptionStart(self, to_jid, namespace='', replace=False, profile_key="@NONE@", callback=None, errback=None):
402 d = self.root.callRemote("messageEncryptionStart", to_jid, encryption_ns, replace, profile_key) 418 d = self.root.callRemote("messageEncryptionStart", to_jid, namespace, replace, profile_key)
403 if callback is not None: 419 if callback is not None:
404 d.addCallback(lambda dummy: callback()) 420 d.addCallback(lambda dummy: callback())
405 if errback is None: 421 if errback is None:
406 errback = self._generic_errback 422 errback = self._generic_errback
407 d.addErrback(errback) 423 d.addErrback(errback)