rtspstack
Class RtspResponse


class RtspResponse
derived from RtspMsg


Constructor Summary
RtspResponse()
           
RtspResponse(Sptr< RtspRequest > rtspRequest, RtspStatusCodesType statusCode)
          The constructor will create the initial response including statusLine, Cseq and sessionId in myData
RtspResponse(const RtspResponse & src)
           

Method Summary
 voidappendConnectionCloseHdr()
          for TEARDOWN response
 voidappendEndOfHeaders()
          append the empty line if there is no content data
 voidappendLocationHdr(Sptr< RtspLocationHdr > hdr)
          for 201 created
 voidappendNPTRangeHdr(double startTime, double endTime)
          for DESCRIBE response, and PLAY/PAUSE/RECORD response
 voidappendRtpInfoHdr(Sptr< RtspRtpInfoHdr > hdr)
           
 voidappendSdpData(RtspSdp & sdp)
          for sdp extracted from a file, it's already encoded it will add contentType and contentLength hdrs
 voidappendSessionId(u_int32_t sessionId)
          To append new sessionId for SETUP response
 voidappendTransportHdr(Sptr< RtspRequest > theRequest, u_int32_t serverPortA, u_int32_t serverPortB)
          append the spec which rtspRequest has and add the server ports
 voidappendTransportHdr(Sptr< RtspTransportSpec > spec)
          append a new spec created by server or application
 virtual Dataencode()
           
 const u_int32_tgetStatusCode()
          It triggers the parsing of startline and assign myStatusCode
 const const u_int32_tgetStatusCodeNumber()
           
 RtspResponse &operator=(const RtspResponse & src)
           

Methods inherited from class rtspstack.RtspMsg
getCompletionFlag, getContentBase, getContentLength, getContentType, getCSeq, getFirstWordUnknown, getHeaders, getMsgBody, getRange, getSessionId, getStartLine, getTransConnPtr, getTransport, hasBody, isRequest, isResponse, isValid, operator=, setCompletionFlag, setFirstWordUnknown, setHasBody, setHeaders, setHeadersMap, setMsgBody, setNumHeader, setStartLine, setTransConnPtr

Constructor Detail

RtspResponse

public RtspResponse()

RtspResponse

public RtspResponse(Sptr< RtspRequest > rtspRequest, RtspStatusCodesType statusCode)
The constructor will create the initial response including statusLine, Cseq and sessionId in myData

RtspResponse

public RtspResponse(const RtspResponse & src)
Method Detail

appendConnectionCloseHdr

public void appendConnectionCloseHdr()
for TEARDOWN response

appendEndOfHeaders

public void appendEndOfHeaders()
append the empty line if there is no content data

appendLocationHdr

public void appendLocationHdr(Sptr< RtspLocationHdr > hdr)
for 201 created

appendNPTRangeHdr

public void appendNPTRangeHdr(double startTime, double endTime)
for DESCRIBE response, and PLAY/PAUSE/RECORD response

appendRtpInfoHdr

public void appendRtpInfoHdr(Sptr< RtspRtpInfoHdr > hdr)

appendSdpData

public void appendSdpData(RtspSdp & sdp)
for sdp extracted from a file, it's already encoded it will add contentType and contentLength hdrs

appendSessionId

public void appendSessionId(u_int32_t sessionId)
To append new sessionId for SETUP response

appendTransportHdr

public void appendTransportHdr(Sptr< RtspRequest > theRequest, u_int32_t serverPortA, u_int32_t serverPortB)
append the spec which rtspRequest has and add the server ports

appendTransportHdr

public void appendTransportHdr(Sptr< RtspTransportSpec > spec)
append a new spec created by server or application

encode

public virtual Data encode()

getStatusCode

public const u_int32_t getStatusCode()
throws RtspBadDataException
It triggers the parsing of startline and assign myStatusCode

getStatusCodeNumber

public const const u_int32_t getStatusCodeNumber()

operator=

public RtspResponse & operator=(const RtspResponse & src)