core, frontends, bridgen plugins: fixed methods which were unproperly managing multi-profiles
- added profile argument to askConfirmation, actionResult, actionResultExt, entityDataUpdated, confirmationAnswer, getProgress
- core, frontends: fixed calls/signals according to new bridge API
- user of proper profile namespace for progression indicators and dialogs
- memory: getParam* now return bool when param type is bool
- memory: added getStringParam* to return string instead of typed value
- core, memory, storage, quick_frontend: getHistory now manage properly multi-profiles
- plugins XEP-0047, XEP-0054, XEP-0065, XEP-0077, XEP-0096; multi-profiles proper handling
This commit is contained in:
parent
49437fd9c3
commit
fa38394401
1 changed files with 570 additions and 400 deletions
|
|
@ -37,6 +37,9 @@ class SatXMPPClient(client.XMPPClient):
|
|||
self.host_app = host_app
|
||||
self.client_initialized = defer.Deferred()
|
||||
self.conn_deferred = defer.Deferred()
|
||||
self._waiting_conf = {} #callback called when a confirmation is received
|
||||
self._progress_cb_map = {} #callback called when a progress is requested (key = progress id)
|
||||
|
||||
|
||||
def getConnectionDeferred(self):
|
||||
"""Return a deferred which fire when the client is connected"""
|
||||
|
|
@ -360,7 +363,7 @@ class SatFallbackHandler(generic.FallbackHandler):
|
|||
|
||||
class RegisteringAuthenticator(xmlstream.ConnectAuthenticator):
|
||||
|
||||
def __init__(self, host, jabber_host, user_login, user_pass, email, answer_id):
|
||||
def __init__(self, host, jabber_host, user_login, user_pass, email, answer_id, profile):
|
||||
xmlstream.ConnectAuthenticator.__init__(self, jabber_host)
|
||||
self.host = host
|
||||
self.jabber_host = jabber_host
|
||||
|
|
@ -368,6 +371,7 @@ class RegisteringAuthenticator(xmlstream.ConnectAuthenticator):
|
|||
self.user_pass = user_pass
|
||||
self.user_email = email
|
||||
self.answer_id = answer_id
|
||||
self.profile = profile
|
||||
print _("Registration asked for"),user_login, user_pass, jabber_host
|
||||
|
||||
def connectionMade(self):
|
||||
|
|
@ -392,7 +396,7 @@ class RegisteringAuthenticator(xmlstream.ConnectAuthenticator):
|
|||
debug (_("registration answer: %s") % answer.toXml())
|
||||
answer_type = "SUCCESS"
|
||||
answer_data={"message":_("Registration successfull")}
|
||||
self.host.bridge.actionResult(answer_type, self.answer_id, answer_data)
|
||||
self.host.bridge.actionResult(answer_type, self.answer_id, answer_data, self.profile)
|
||||
self.xmlstream.sendFooter()
|
||||
|
||||
def registrationFailure(self, failure):
|
||||
|
|
@ -405,7 +409,7 @@ class RegisteringAuthenticator(xmlstream.ConnectAuthenticator):
|
|||
else:
|
||||
answer_data['reason'] = 'unknown'
|
||||
answer_data={"message":_("Registration failed (%s)") % str(failure.value.condition)}
|
||||
self.host.bridge.actionResult(answer_type, self.answer_id, answer_data)
|
||||
self.host.bridge.actionResult(answer_type, self.answer_id, answer_data, self.profile)
|
||||
self.xmlstream.sendFooter()
|
||||
|
||||
class SatVersionHandler(generic.VersionHandler):
|
||||
|
|
|
|||
Loading…
Reference in a new issue