def onAfterAutoLoginTimerClearing(self, host, clearInFlash): urls = g_preDefinedHosts.urlIterator(host) if urls is not None: urls.resume() self.__minOrderInQueue = 18446744073709551615L if clearInFlash: self.fireEvent(LoginEvent(LoginEvent.CANCEL_LGN_QUEUE, View.alias))
def handleLoginRejectedRateLimited(self, status, message): errorMessage = i18n.makeString(MENU.LOGIN_STATUS_LOGIN_REJECTED_RATE_LIMITED) self.onSetStatus(errorMessage, self.ALL_VALID) urls = g_preDefinedHosts.urlIterator(self.__loginDataLoader.host) if urls is not None and urls.end(): urls.cursor = 0 message = i18n.makeString(WAITING.MESSAGE_AUTOLOGIN, connectionManager.serverUserName) self.onHandleLoginRejectedRateLimited(message) self.__setAutoLoginTimer(self.__getLgNextTimeout())
def __loginToNextLoginApp(self): urls = g_preDefinedHosts.urlIterator(self.__loginDataLoader.host) result = False if urls is not None: result = not urls.end() if result: Waiting.hide('login') self.__setAutoLoginTimer(0) else: urls.cursor = 0 return result
def handleLoginRejectedRateLimited(self, status, message): errorMessage = i18n.makeString( MENU.LOGIN_STATUS_LOGIN_REJECTED_RATE_LIMITED) self.onSetStatus(errorMessage, self.ALL_VALID) urls = g_preDefinedHosts.urlIterator(self.__loginDataLoader.host) if urls is not None and urls.end(): urls.cursor = 0 message = i18n.makeString(WAITING.MESSAGE_AUTOLOGIN, connectionManager.serverUserName) self.onHandleLoginRejectedRateLimited(message) self.__setAutoLoginTimer(self.__getLgNextTimeout())
def handleKickWhileLogin(self, peripheryID): if peripheryID < 0: self.__kickPeripheryID = peripheryID return g_preDefinedHosts.savePeripheryTL(peripheryID) self.__kickedFromServer = True messageType = 'another_periphery' if peripheryID else 'checkout_error' errorMessage = i18n.makeString(SYSTEM_MESSAGES.all(messageType)) self.onSetStatus(errorMessage, self.ALL_VALID) urls = g_preDefinedHosts.urlIterator(self.__loginDataLoader.host) if urls is not None and urls.end(): urls.cursor = 0 message = i18n.makeString(WAITING.message(messageType), connectionManager.serverUserName) self.onHandleKickWhileLogin(messageType, message) self.__setAutoLoginTimer(self.__getLgNextTimeout())