def dispossessUI(self, proxy): if self.uiHolder != proxy: return import VOIP VOIP.getVOIPManager().channelsMgr.onInitialized -= self.__initResponse VOIP.getVOIPManager().OnCaptureDevicesUpdated -= self.__captureDevicesResponse chatManager.unsubscribeChatAction(self.processFailedMessage, CHAT_ACTIONS.VOIPSettings) UIInterface.dispossessUI(self)
def dispossessUI(self, proxy): if self.uiHolder != proxy: return import VOIP VOIP.getVOIPManager().channelsMgr.onInitialized -= self.__initResponse VOIP.getVOIPManager( ).OnCaptureDevicesUpdated -= self.__captureDevicesResponse chatManager.unsubscribeChatAction(self.processFailedMessage, CHAT_ACTIONS.VOIPSettings) UIInterface.dispossessUI(self)
def onDisconnected(self): LOG_VOIP_INT('VOIPManager.unsubscribe') voipEvents = g_messengerEvents.voip voipEvents.onChannelEntered -= self.__onChatChannelEntered voipEvents.onChannelLeft -= self.__onChatChannelLeft voipEvents.onCredentialReceived -= self.__onCredentialReceived chatManager.unsubscribeChatAction(self.__onRequestUsersRoster, CHAT_ACTIONS.requestUsersRoster) chatManager.unsubscribeChatAction(self.__onChatActionSetMuted, CHAT_ACTIONS.setMuted) chatManager.unsubscribeChatAction(self.__onChatActionUnsetMuted, CHAT_ACTIONS.unsetMuted) chatManager.unsubscribeChatAction(self.__onChatResponseMutedError, CHAT_RESPONSES.setMutedError) chatManager.unsubscribeChatAction(self.__onChatResponseMutedError, CHAT_RESPONSES.unsetMutedError)
def _dispose(self): self.__callbacks = None self.__captureDevicesCallbacks = None chatManager.unsubscribeChatAction(self.checkForInitialization, CHAT_ACTIONS.VOIPSettings) voipMgr = getVOIPManager() voipMgr.onPlayerSpeaking -= self.__onPlayerSpeaking voipMgr.channelsMgr.onInitialized -= self.__initResponse voipMgr.OnCaptureDevicesUpdated -= self.__captureDevicesResponse g_playerEvents.onAccountBecomePlayer -= self.onAccountBecomePlayer super(VoiceChatManager, self)._dispose() return
def removeListener(self, callback, action, cid = None): chatManager.unsubscribeChatAction(callback, action, cid)
def unsubscribeChatActions(self): chatManager.unsubscribeChatAction(self.__onEnterChatChannel, CHAT_ACTIONS.VOIPSettings) chatManager.unsubscribeChatAction(self.__onLeftChatChannel, CHAT_ACTIONS.channelDestroyed) chatManager.unsubscribeChatAction(self.__onLeftChatChannel, CHAT_ACTIONS.selfLeave) chatManager.unsubscribeChatAction(self.__onUserCredentials, CHAT_ACTIONS.VOIPCredentials) chatManager.unsubscribeChatAction(self.__onRequestUsersRoster, CHAT_ACTIONS.requestUsersRoster) chatManager.unsubscribeChatAction(self.__onChatActionSetMuted, CHAT_ACTIONS.setMuted) chatManager.unsubscribeChatAction(self.__onChatActionUnsetMuted, CHAT_ACTIONS.unsetMuted) chatManager.unsubscribeChatAction(self.__onChatResponseMutedError, CHAT_RESPONSES.setMutedError) chatManager.unsubscribeChatAction(self.__onChatResponseMutedError, CHAT_RESPONSES.unsetMutedError)