core, bridge, frontends: removed deprecated bridge method askConfirmation, confirmationAnswer, actionResult, actionResultExt and getWaitingConf
This commit is contained in:
parent
fb827ad023
commit
55357178ef
1 changed files with 6 additions and 309 deletions
|
|
@ -46,6 +46,8 @@ except (TypeError, AttributeError): # Error raised is not the same depending on
|
|||
|
||||
class ProfileManager(object):
|
||||
"""Class managing all data relative to one profile, and plugging in mechanism"""
|
||||
# TODO: handle waiting XMLUI requests: getWaitingConf doesn't exist anymore
|
||||
# and a way to keep some XMLUI request between sessions is expected in backend
|
||||
host = None
|
||||
bridge = None
|
||||
cache_keys_to_get = ['avatar']
|
||||
|
|
@ -136,13 +138,6 @@ class ProfileManager(object):
|
|||
self.host.presenceUpdateHandler(jabber_id, show, priority, statuses, self.profile)
|
||||
self.host.bridge.getEntityData(contact, ['avatar', 'nick'], self.profile, callback=lambda data, contact=contact: gotEntityData(data, contact), errback=lambda failure, contact=contact: log.debug(u"No cache data for {}".format(contact)))
|
||||
|
||||
#Finaly, we get the waiting confirmation requests
|
||||
self.bridge.getWaitingConf(self.profile, callback=self._plug_profile_gotWaitingConf)
|
||||
|
||||
def _plug_profile_gotWaitingConf(self, waiting_confs):
|
||||
for confirm_id, confirm_type, data in waiting_confs:
|
||||
self.host.askConfirmationHandler(confirm_id, confirm_type, data, self.profile)
|
||||
|
||||
# At this point, profile should be fully plugged
|
||||
# and we launch frontend specific method
|
||||
self.host.profilePlugged(self.profile)
|
||||
|
|
@ -238,18 +233,14 @@ class QuickApp(object):
|
|||
self.registerSignal("actionNew")
|
||||
self.registerSignal("newContact")
|
||||
self.registerSignal("messageNew")
|
||||
self.registerSignal("newAlert")
|
||||
self.registerSignal("presenceUpdate")
|
||||
self.registerSignal("subscribe")
|
||||
self.registerSignal("paramUpdate")
|
||||
self.registerSignal("contactDeleted")
|
||||
self.registerSignal("entityDataUpdated")
|
||||
self.registerSignal("askConfirmation")
|
||||
self.registerSignal("actionResult")
|
||||
self.registerSignal("progressStarted")
|
||||
self.registerSignal("progressFinished")
|
||||
self.registerSignal("progressError")
|
||||
self.registerSignal("actionResultExt", self.actionResultHandler)
|
||||
self.registerSignal("mucRoomJoined", iface="plugin")
|
||||
self.registerSignal("mucRoomLeft", iface="plugin")
|
||||
self.registerSignal("mucRoomUserChangedNick", iface="plugin")
|
||||
|
|
@ -263,8 +254,6 @@ class QuickApp(object):
|
|||
quick_games.Quiz.registerSignals(self)
|
||||
quick_games.Radiocol.registerSignals(self)
|
||||
|
||||
self.current_action_ids = set() # FIXME: to be removed
|
||||
self.current_action_ids_cb = {} # FIXME: to be removed
|
||||
self._notif_id = 0
|
||||
self._notifications = OrderedDict()
|
||||
self.media_dir = self.bridge.getConfig('', 'media_dir')
|
||||
|
|
@ -485,9 +474,6 @@ class QuickApp(object):
|
|||
# we want to be sure to have at least one QuickChat instance
|
||||
self.widgets.getOrCreateWidget(quick_chat.QuickChat, target, type_=C.CHAT_ONE2ONE, on_new_widget=None, profile=profile)
|
||||
|
||||
self.current_action_ids = set() # FIXME: to be removed
|
||||
self.current_action_ids_cb = {} # FIXME: to be removed
|
||||
|
||||
if not from_jid in contact_list and from_jid.bare != self.profiles[profile].whoami.bare:
|
||||
#XXX: needed to show entities which haven't sent any
|
||||
# presence information and which are not in roster
|
||||
|
|
@ -516,10 +502,6 @@ class QuickApp(object):
|
|||
|
||||
self.bridge.messageSend(unicode(to_jid), message, subject, mess_type, extra, profile_key, callback=callback, errback=errback)
|
||||
|
||||
def newAlertHandler(self, msg, title, alert_type, profile):
|
||||
assert alert_type in ['INFO', 'ERROR']
|
||||
self.showDialog(unicode(msg), unicode(title), alert_type.lower())
|
||||
|
||||
def setPresenceStatus(self, show='', status=None, profile=C.PROF_KEY_NONE):
|
||||
raise NotImplementedError
|
||||
|
||||
|
|
@ -788,12 +770,6 @@ class QuickApp(object):
|
|||
self.callListeners('avatar', entity, filename, profile=profile)
|
||||
self.bridge.getAvatarFile(value, callback=gotFilename)
|
||||
|
||||
def askConfirmationHandler(self, confirm_id, confirm_type, data, profile):
|
||||
raise NotImplementedError
|
||||
|
||||
def actionResultHandler(self, type, id, data, profile):
|
||||
raise NotImplementedError
|
||||
|
||||
def actionManager(self, action_data, callback=None, ui_show_cb=None, user_action=True, profile=C.PROF_KEY_NONE):
|
||||
"""Handle backend action
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue