Esempio n. 1
0
 def _NH_SIPAccountDidActivate(self, account, data):
     BlinkLogger().log_info("Account %s activated" % account.id)
     # Activate BonjourConferenceServer discovery
     if account is BonjourAccount():
         call_in_green_thread(self.bonjour_conference_services.start)
     else:
         BlinkLogger().log_info("Account %s loaded %d CAs from %s" % (account.id, len(account.tls_credentials._trusted), account.ca_list))
Esempio n. 2
0
 def _NH_CFGSettingsObjectWasActivated(self, notification):
     if isinstance(notification.sender, Account) or (isinstance(notification.sender, BonjourAccount) and _bonjour.available):
         account = notification.sender
         self.accounts[account.id] = account
         notification.center.add_observer(self, sender=account, name='CFGSettingsObjectDidChange')
         notification.center.add_observer(self, sender=account, name='CFGSettingsObjectWasDeleted')
         notification.center.post_notification('SIPAccountManagerDidAddAccount', sender=self, data=NotificationData(account=account))
         from sipsimple.application import SIPApplication
         if SIPApplication.running:
             call_in_green_thread(account.start)
Esempio n. 3
0
 def _NH_CFGSettingsObjectWasActivated(self, notification):
     if isinstance(notification.sender, Account) or (isinstance(
             notification.sender, BonjourAccount) and _bonjour.available):
         account = notification.sender
         self.accounts[account.id] = account
         notification.center.add_observer(self,
                                          sender=account,
                                          name='CFGSettingsObjectDidChange')
         notification.center.add_observer(
             self, sender=account, name='CFGSettingsObjectWasDeleted')
         notification.center.post_notification(
             'SIPAccountManagerDidAddAccount',
             sender=self,
             data=NotificationData(account=account))
         from sipsimple.application import SIPApplication
         if SIPApplication.running:
             call_in_green_thread(account.start)
Esempio n. 4
0
 def _NH_SIPAccountDidDeactivate(self, account, data):
     BlinkLogger().log_info("Account %s deactivated" % account.id)
     MWIData.remove(account)
     # Deactivate BonjourConferenceServer discovery
     if account is BonjourAccount():
         call_in_green_thread(self.bonjour_conference_services.stop)