Exemple #1
0
 def __init__(self, sender=None, message=""):
     """Initializer
         
         @param message: The body of the message, it is put after the headers
         @type message: string"""
     HTTPMessage.__init__(self)
     self.sender = sender
     if message:
         self.parse(message)
Exemple #2
0
 def __init__(self, sender=None, message=""):
     """Initializer
         
         @param message: The body of the message, it is put after the headers
         @type message: string"""
     HTTPMessage.__init__(self)
     self.sender = sender
     if message:
         self.parse(message)
Exemple #3
0
    def __init__(self, content_type, session_id=None, s_channel_state=0, capabilities_flags=1):
        HTTPMessage.__init__(self)
        self.content_type = content_type

        if session_id is not None:
            self.add_header("SessionID", session_id)
        if s_channel_state is not None:
            self.add_header("SChannelState", s_channel_state)
        if capabilities_flags is not None:
            self.add_header("Capabilities-Flags", capabilities_flags)
Exemple #4
0
    def __init__(self, to="", frm="", branch="", cseq=0, call_id="", max_forwards=0):
        HTTPMessage.__init__(self)
        self.add_header("To", "<msnmsgr:%s>" % to)
        self.add_header("From", "<msnmsgr:%s>" % frm)
        if branch:
            self.add_header("Via", "MSNSLP/1.0/TLP ;branch=%s" % branch)
        self.add_header("CSeq", str(cseq))
        if call_id:
            self.add_header("Call-ID", call_id)
        self.add_header("Max-Forwards", str(max_forwards))

        # Make the body a SLP Message wih "null" content type
        self.body = SLPNullBody()
Exemple #5
0
    def __init__(self,
                 content_type,
                 session_id=None,
                 s_channel_state=0,
                 capabilities_flags=1):
        HTTPMessage.__init__(self)
        self.type = content_type

        if session_id is not None:
            self.add_header("SessionID", session_id)
        if s_channel_state is not None:
            self.add_header("SChannelState", s_channel_state)
        if capabilities_flags is not None:
            self.add_header("Capabilities-Flags", capabilities_flags)
Exemple #6
0
    def __init__(self,
                 to="",
                 frm="",
                 branch="",
                 cseq=0,
                 call_id="",
                 max_forwards=0):
        HTTPMessage.__init__(self)
        self.add_header("To", "<msnmsgr:%s>" % to)
        self.add_header("From", "<msnmsgr:%s>" % frm)
        if branch:
            self.add_header("Via", "MSNSLP/1.0/TLP ;branch=%s" % branch)
        self.add_header("CSeq", str(cseq))
        if call_id:
            self.add_header("Call-ID", call_id)
        self.add_header("Max-Forwards", str(max_forwards))

        # Make the body a SLP Message wih "null" content type
        self.body = SLPNullBody()