コード例 #1
0
 def start(self):
     from access import key_ring
     from transport import callback
     key_ring.init()
     callback.add_outbox_callback(self._outbox_packet_sent)
     callback.append_inbox_callback(self._inbox_packet_received)
     return True
コード例 #2
0
def init():
    """
    Needs to be called before other methods here.
    """
    lg.out(4, 'contact_status.init')
    callback.insert_inbox_callback(1, Inbox)  # try to not overwrite top callback in the list, but stay on top
    callback.add_outbox_callback(Outbox)
    callback.add_queue_item_status_callback(OutboxStatus)
コード例 #3
0
def init():
    """
    Needs to be called before other methods here.
    """
    lg.out(4, 'contact_status.init')
    callback.insert_inbox_callback(-1, Inbox)
    callback.add_outbox_callback(Outbox)
    callback.add_queue_item_status_callback(OutboxStatus)
コード例 #4
0
def init():
    """
    Needs to be called before other methods here.
    """
    lg.out(4, 'contact_status.init')
    callback.insert_inbox_callback(-1, Inbox)
    callback.add_outbox_callback(Outbox)
    callback.add_queue_item_status_callback(OutboxStatus)
コード例 #5
0
 def start(self):
     from supplier import customer_assistant
     from contacts import contactsdb
     from transport import callback
     for customer_idurl in contactsdb.customers():
         if customer_idurl and not customer_assistant.by_idurl(customer_idurl):
             ca = customer_assistant.create(customer_idurl)
             ca.automat('init')
     callback.add_outbox_callback(self._on_outbox_packet_sent)
     callback.append_inbox_callback(self._on_inbox_packet_received)
     return True
コード例 #6
0
 def start(self):
     from transport import callback
     from main import listeners
     from crypt import my_keys
     from access import key_ring
     key_ring.init()
     callback.add_outbox_callback(self._on_outbox_packet_sent)
     callback.append_inbox_callback(self._on_inbox_packet_received)
     if listeners.is_populate_requered('key'):
         listeners.populate_later().remove('key')
         my_keys.populate_keys()
     return True
コード例 #7
0
 def start(self):
     from twisted.internet import reactor  # @UnresolvedImport
     from userid import id_url
     from main import events
     from supplier import customer_assistant
     from contacts import contactsdb
     from transport import callback
     for customer_idurl in contactsdb.customers():
         if id_url.is_cached(customer_idurl):
             if customer_idurl and not customer_assistant.by_idurl(
                     customer_idurl):
                 ca = customer_assistant.create(customer_idurl)
                 reactor.callLater(0, ca.automat,
                                   'init')  # @UndefinedVariable
     events.add_subscriber(self._on_identity_url_changed,
                           'identity-url-changed')
     callback.add_outbox_callback(self._on_outbox_packet_sent)
     callback.append_inbox_callback(self._on_inbox_packet_received)
     return True