示例#1
0
    def __init__(self, p2p):
        '''from_ is the sender and to the receiver email'''
        gobject.GObject.__init__(self)

        # the moment when its created
        self.time_stamp = time.time()
        
        # list of identifiers of connected signals
        self.signal_ids = []

        self.from_ = p2p.manager.msn.user
        self.to_ = p2p.mail
        
        # this values are just the most common ones
        self.via = msn_slp.random_id()
        self.cseq = '0'
        self.call_id = msn_slp.random_id()
        self.max_forwards = '0'
        self.content_type = ''
        self.content_length = ''
        self.euf_guid = ''
        self.session_id = str(random_number(50000))
        self.app_id = ''
        self.context = ''

        self.data = None

        p2p.emit('new-p2p-session', self)
示例#2
0
 def __init__(self, p2p):
     '''from_ is the sender and to the receiver email'''
     gobject.GObject.__init__(self)
     self.time_stamp = time.time()
     self.signal_ids = []
     self.from_ = p2p.manager.msn.user
     self.to_ = p2p.mail
     self.via = msn_slp.random_id()
     self.cseq = '0'
     self.call_id = msn_slp.random_id()
     self.max_forwards = '0'
     self.content_type = ''
     self.content_length = ''
     self.euf_guid = ''
     self.session_id = str(random_number(50000))
     self.app_id = ''
     self.context = ''
     self.data = None
     p2p.emit('new-p2p-session', self)