예제 #1
0
파일: messages.py 프로젝트: kblw/wot_client
    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
예제 #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
예제 #3
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.REMOVE_IGNORED, pyGlooxTag)
예제 #4
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.CHANGE_GROUP, pyGlooxTag)
예제 #5
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.REMOVE_FRIEND, pyGlooxTag)
예제 #6
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.ADD_FRIEND, pyGlooxTag)
예제 #7
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.SET_NOTE, pyGlooxTag)
예제 #8
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.ADD_IGNORED,
                                           pyGlooxTag)
예제 #9
0
 def _getError(self, pyGlooxTag):
     return errors.createServerActionError(CLIENT_ACTION_ID.SET_NOTE,
                                           pyGlooxTag)