def __init__(self): super(ContactsManager, self).__init__() self.__seq = SeqTaskQueue() self.__seq.suspend() self.__tasks = ContactTaskQueue([block_tasks.SyncBlockItemTask()]) self.__cooldown = XmppCooldownManager() self.__subsBatch = sub_helper.InboundSubscriptionsBatch() self.__subsRestrictions = sub_helper.SubscriptionsRestrictions() self.__presence = _UserPresence() self.__presence.addListeners() self.__voip = VoipHandler() self.__voip.addListeners() g_messengerEvents.onPluginConnectFailed += self.__me_onPluginConnectFailed self.usersStorage.onRestoredFromCache += self.__us_onRestoredFromCache g_settings.onUserPreferencesUpdated += self.__ms_onUserPreferencesUpdated