Esempio n. 1
0
 def __init__(self, session_manager, peer, guid, message=None):
     P2PSession.__init__(self, session_manager, peer, guid,
             EufGuid.FILE_TRANSFER, ApplicationID.FILE_TRANSFER, message)
     self._filename = ""
     self._size = 0
     self._has_preview = False
     self._preview = None
Esempio n. 2
0
 def __init__(self, session_manager, peer, guid, message=None):
     P2PSession.__init__(self, session_manager, peer, guid,
                         EufGuid.FILE_TRANSFER, ApplicationID.FILE_TRANSFER,
                         message)
     self._filename = ""
     self._size = 0
     self._has_preview = False
     self._preview = None
Esempio n. 3
0
    def __init__(self, session_manager, peer, application_id, message=None):
        P2PSession.__init__(self, session_manager, peer,
                EufGuid.MSN_OBJECT, application_id, message)

        if message is not None:
            self._application_id = message.body.application_id
            try:
                self._context = message.body.context.strip('\x00')
            except AttributeError:
                raise SLPError("Incoming INVITE without context")
Esempio n. 4
0
    def __init__(self, session_manager, peer, application_id, message=None):
        P2PSession.__init__(self, session_manager, peer, EufGuid.MSN_OBJECT,
                            application_id, message)

        if message is not None:
            self._application_id = message.body.application_id
            try:
                self._context = message.body.context.strip('\x00')
            except AttributeError:
                raise SLPError("Incoming INVITE without context")
Esempio n. 5
0
    def __init__(self, session_manager, peer, application_id, message=None):
        P2PSession.__init__(self, session_manager, peer,
                EufGuid.FILE_TRANSFER, application_id, message)
        self._filename = ""
        self._size = 0
        self._has_preview = False
        self._preview = None
        # data to be send if sending
        self._data = None

        if message is not None:
            self.parse_context(message.body.context)
Esempio n. 6
0
    def __init__(self, producer, session_manager, peer, peer_guid,
            euf_guid,  message=None):
        if producer:
            type = MediaSessionType.WEBCAM_SEND
        else:
            type = MediaSessionType.WEBCAM_RECV

        P2PSession.__init__(self, session_manager, peer, peer_guid, euf_guid,
                ApplicationID.WEBCAM, message)
        MediaCall.__init__(self, type)

        self._producer = producer
        self._answered = False
        self._sent_syn = False
        self._session_id = self._generate_id(9999)
        self._xml_needed = False
Esempio n. 7
0
    def __init__(self, producer, session_manager, peer, euf_guid, message=None):
        P2PSession.__init__(self, session_manager, peer, euf_guid, ApplicationID.WEBCAM)
        EventsDispatcher.__init__(self)

        self._producer = producer

        if message is not None:
            self._call_id = message.call_id
            self._cseq = message.cseq
            self._branch = message.branch
            self._id = message.body.session_id

        self._sent_syn = False
        self._local_candidates = None
        self._remote_candidates = None
        self._session_id = 0
        self._xml_needed = False
        self._session_manager._register_session(self)
Esempio n. 8
0
    def __init__(self,
                 producer,
                 session_manager,
                 peer,
                 peer_guid,
                 euf_guid,
                 message=None):
        if producer:
            type = MediaSessionType.WEBCAM_SEND
        else:
            type = MediaSessionType.WEBCAM_RECV

        P2PSession.__init__(self, session_manager, peer, peer_guid, euf_guid,
                            ApplicationID.WEBCAM, message)
        MediaCall.__init__(self, type)

        self._producer = producer
        self._answered = False
        self._sent_syn = False
        self._session_id = self._generate_id(9999)
        self._xml_needed = False