Esempio n. 1
0
    def handleIQ(self, iqID, iqType, tag):
        if iqID == self.__iqID:
            if iqType == IQ_TYPE.RESULT:
                self.__state = _HISTORY_RQ_STATE.RESULT
            elif iqType == IQ_TYPE.ERROR:
                self.__state = _HISTORY_RQ_STATE.UNAVAILABLE
                error = errors.createServerActionError(CLIENT_ACTION_ID.RQ_HISTORY, tag)
                if error:
                    g_messengerEvents.onErrorReceived(error)
                while self.__pool:
                    self.__setChannelAvailable(self.__pool.pop(0))

            result = True
        else:
            result = False
        return result
Esempio n. 2
0
    def handleIQ(self, iqID, iqType, tag):
        if iqID == self.__iqID:
            if iqType == IQ_TYPE.RESULT:
                self.__state = _HISTORY_RQ_STATE.RESULT
            elif iqType == IQ_TYPE.ERROR:
                self.__state = _HISTORY_RQ_STATE.UNAVAILABLE
                error = errors.createServerActionError(
                    CLIENT_ACTION_ID.RQ_HISTORY, tag)
                if error:
                    g_messengerEvents.onErrorReceived(error)
                while self.__pool:
                    self.__setChannelAvailable(self.__pool.pop(0))

            result = True
        else:
            result = False
        return result
Esempio n. 3
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.REMOVE_IGNORED, pyGlooxTag)
Esempio n. 4
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.CHANGE_GROUP, pyGlooxTag)
Esempio n. 5
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.REMOVE_FRIEND, pyGlooxTag)
Esempio n. 6
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.ADD_FRIEND, pyGlooxTag)
Esempio n. 7
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.SET_NOTE, pyGlooxTag)
Esempio n. 8
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.ADD_IGNORED,
                                           pyGlooxTag)
Esempio n. 9
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.SET_NOTE,
                                           pyGlooxTag)