|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
Base class for all SIP body types. More...
#include <Contents.hxx>
Public Member Functions | |
| Contents (const HeaderFieldValue &headerFieldValue, const Mime &contentsType) | |
| pass Mime instance for parameters | |
| Contents (const Mime &contentsType) | |
| Create a contents with a given mime type. | |
| Contents (const Contents &rhs) | |
| Copy constructor. | |
| Contents (const Contents &rhs, HeaderFieldValue::CopyPaddingEnum e) | |
| Contents (const HeaderFieldValue &headerFieldValue, HeaderFieldValue::CopyPaddingEnum e, const Mime &contentsType) | |
| virtual | ~Contents () |
| Contents & | operator= (const Contents &rhs) |
| Assignment operator. | |
| void | preParseHeaders (ParseBuffer &pb) |
| Preforms preparsing on the headers stored in the ParseBuffer pb. | |
| EncodeStream & | encodeHeaders (EncodeStream &str) const |
| encodes headers to an output stream | |
| virtual Contents * | getContents () |
| access to wrapped contents (signed, encrypted) | |
| Contents * | getContents (const Mime &) |
| virtual Data | getBodyData () const |
| virtual Contents * | clone () const =0 |
| returns a copy of a Contents object | |
| const Mime & | getType () const |
| getter for mime type of message | |
| bool | exists (const HeaderBase &headerType) const |
| checks to see if a header is present | |
| void | remove (const HeaderBase &headerType) |
| removes a header if it is present | |
| bool | exists (const MIME_Header &headerType) const |
| checks to see if a MIME header exists | |
| void | remove (const MIME_Header &headerType) |
| removes a MIME header if it is present | |
| const H_ContentType::Type & | header (const H_ContentType &headerType) const |
| returns the value of the Content-Type header Throws an Contents::Exception if the header doesn't exist. | |
| H_ContentType::Type & | header (const H_ContentType &headerType) |
| returns the value of the Content-Type header | |
| const H_ContentDisposition::Type & | header (const H_ContentDisposition &headerType) const |
| returns the value of the Content-Disposition header Throws an Contents::Exception if the header doesn't exist. | |
| H_ContentDisposition::Type & | header (const H_ContentDisposition &headerType) |
| returns the value of the Content-Disposition header | |
| const H_ContentTransferEncoding::Type & | header (const H_ContentTransferEncoding &headerType) const |
| returns the value of the Content-Transfer-Encoding header Throws an Contents::Exception if the header doesn't exist. | |
| H_ContentTransferEncoding::Type & | header (const H_ContentTransferEncoding &headerType) |
| returns the value of the Content-Transfer-Encoding header | |
| const H_ContentLanguages::Type & | header (const H_ContentLanguages &headerType) const |
| returns the value of the Content-Languages header Throws an Contents::Exception if the header doesn't exist. | |
| H_ContentLanguages::Type & | header (const H_ContentLanguages &headerType) |
| returns the value of the Content-Languages header | |
| const H_ContentID::Type & | header (const H_ContentID &headerType) const |
| returns the value of the Content-ID MIME header Throws an Contents::Exception if the header doesn't exist. | |
| H_ContentID::Type & | header (const H_ContentID &headerType) |
| returns the value of the Content-ID MIME header | |
| const H_ContentDescription::Type & | header (const H_ContentDescription &headerType) const |
| returns the Content-Description MIME header Throws an Contents::Exception if the header doesn't exist. | |
| H_ContentDescription::Type & | header (const H_ContentDescription &headerType) |
| returns the Content-Description MIME header | |
| int & | version () |
| returns the major version of MIME used by the contents | |
| int & | minorVersion () |
| returns the minor version of MIME used by the contents | |
| void | addBuffer (char *buf) |
Public Member Functions inherited from resip::LazyParser | |
| LazyParser (const HeaderFieldValue &headerFieldValue) | |
| LazyParser (const char *buf, int length) | |
| LazyParser (const HeaderFieldValue &headerFieldValue, HeaderFieldValue::CopyPaddingEnum e) | |
| LazyParser (const LazyParser &rhs) | |
| LazyParser (const LazyParser &rhs, HeaderFieldValue::CopyPaddingEnum e) | |
| LazyParser & | operator= (const LazyParser &rhs) |
| virtual | ~LazyParser () |
| virtual EncodeStream & | encodeParsed (EncodeStream &str) const =0 |
| virtual void | parse (ParseBuffer &pb)=0 |
| EncodeStream & | encode (EncodeStream &str) const |
| Encodes this element to a stream, in the fashion it should be represented on the wire. | |
| bool | isParsed () const |
| Returns true iff a parse has been attempted. | |
| HeaderFieldValue & | getHeaderField () |
| void | checkParsed () const |
| void | checkParsed () |
| void | doParse () const |
| void | markDirty () const |
| bool | isWellFormed () const |
| Returns true iff this element was parsed successfully, according to the implementation of parse(). | |
Static Public Member Functions | |
| static Contents * | createContents (const Mime &contentType, const Data &contents) |
| factory method to create a Contents object from a mime type and a payload | |
Protected Member Functions | |
| void | clear () |
| void | init () |
| void | init (const Contents &orig) |
| void | freeMem () |
| virtual const Data & | errorContext () const |
Protected Member Functions inherited from resip::LazyParser | |
| LazyParser () | |
| void | clear () |
Protected Attributes | |
| Mime | mType |
| H_ContentDisposition::Type * | mDisposition |
| H_ContentTransferEncoding::Type * | mTransferEncoding |
| H_ContentLanguages::Type * | mLanguages |
| Token * | mId |
| H_ContentDescription::Type * | mDescription |
| StringCategory * | mLength |
| int | mVersion |
| int | mMinorVersion |
| std::vector< char * > | mBufferList |
| Contents::Contents | ( | const HeaderFieldValue & | headerFieldValue, |
| const Mime & | contentsType | ||
| ) |
pass Mime instance for parameters
Definition at line 22 of file Contents.cxx.
| Contents::Contents | ( | const Mime & | contentsType | ) |
Create a contents with a given mime type.
| contentsType | the mime type of the contents |
Definition at line 30 of file Contents.cxx.
| Contents::Contents | ( | const Contents & | rhs | ) |
Copy constructor.
| rhs | the Contents to be copied |
Definition at line 36 of file Contents.cxx.
| Contents::Contents | ( | const Contents & | rhs, |
| HeaderFieldValue::CopyPaddingEnum | e | ||
| ) |
Definition at line 42 of file Contents.cxx.
| Contents::Contents | ( | const HeaderFieldValue & | headerFieldValue, |
| HeaderFieldValue::CopyPaddingEnum | e, | ||
| const Mime & | contentsType | ||
| ) |
Definition at line 48 of file Contents.cxx.
|
virtual |
Definition at line 58 of file Contents.cxx.
| void Contents::addBuffer | ( | char * | buf | ) |
Definition at line 668 of file Contents.cxx.
|
inlineprotected |
Definition at line 294 of file Contents.hxx.
|
pure virtual |
returns a copy of a Contents object
Implemented in resip::ApplicationSip, resip::CpimContents, resip::DialogInfoContents, resip::DtmfPayloadContents, resip::ExternalBodyContents, resip::GenericContents, resip::GenericPidfContents, resip::InvalidContents, resip::MediaControlContents, resip::MessageWaitingContents, resip::MultipartAlternativeContents, resip::MultipartMixedContents, resip::MultipartRelatedContents, resip::MultipartSignedContents, resip::OctetContents, resip::Pidf, resip::Pkcs7Contents, resip::Pkcs7SignedContents, resip::Pkcs8Contents, resip::PlainContents, resip::Rlmi, resip::SdpContents, resip::SipFrag, resip::X509Contents, and resip::TrickleIceContents.
factory method to create a Contents object from a mime type and a payload
| contentType | the mime type of the contents |
| contents | the contents |
Definition at line 148 of file Contents.cxx.
| EncodeStream & Contents::encodeHeaders | ( | EncodeStream & | str | ) | const |
encodes headers to an output stream
| str | output stream destination for encoded headers |
Definition at line 588 of file Contents.cxx.
|
protectedvirtual |
Implements resip::LazyParser.
Definition at line 65 of file Contents.cxx.
| bool Contents::exists | ( | const HeaderBase & | headerType | ) | const |
checks to see if a header is present
| headerType | the header to check for |
Definition at line 189 of file Contents.cxx.
| bool Contents::exists | ( | const MIME_Header & | headerType | ) | const |
checks to see if a MIME header exists
| headerType | the MIME header to check for |
Definition at line 215 of file Contents.cxx.
|
inlineprotected |
Definition at line 322 of file Contents.hxx.
|
virtual |
Definition at line 661 of file Contents.cxx.
|
inlinevirtual |
access to wrapped contents (signed, encrypted)
Definition at line 100 of file Contents.hxx.
|
inline |
getter for mime type of message
Definition at line 118 of file Contents.hxx.
| H_ContentDescription::Type & Contents::header | ( | const H_ContentDescription & | headerType | ) |
returns the Content-Description MIME header
Definition at line 409 of file Contents.cxx.
| const H_ContentDescription::Type & Contents::header | ( | const H_ContentDescription & | headerType | ) | const |
returns the Content-Description MIME header Throws an Contents::Exception if the header doesn't exist.
Definition at line 388 of file Contents.cxx.
| H_ContentDisposition::Type & Contents::header | ( | const H_ContentDisposition & | headerType | ) |
returns the value of the Content-Disposition header
Definition at line 313 of file Contents.cxx.
| const H_ContentDisposition::Type & Contents::header | ( | const H_ContentDisposition & | headerType | ) | const |
returns the value of the Content-Disposition header Throws an Contents::Exception if the header doesn't exist.
Definition at line 292 of file Contents.cxx.
| H_ContentID::Type & Contents::header | ( | const H_ContentID & | headerType | ) |
returns the value of the Content-ID MIME header
Definition at line 441 of file Contents.cxx.
| const H_ContentID::Type & Contents::header | ( | const H_ContentID & | headerType | ) | const |
returns the value of the Content-ID MIME header Throws an Contents::Exception if the header doesn't exist.
Definition at line 420 of file Contents.cxx.
| H_ContentLanguages::Type & Contents::header | ( | const H_ContentLanguages & | headerType | ) |
returns the value of the Content-Languages header
Definition at line 377 of file Contents.cxx.
| const H_ContentLanguages::Type & Contents::header | ( | const H_ContentLanguages & | headerType | ) | const |
returns the value of the Content-Languages header Throws an Contents::Exception if the header doesn't exist.
Definition at line 356 of file Contents.cxx.
| H_ContentTransferEncoding::Type & Contents::header | ( | const H_ContentTransferEncoding & | headerType | ) |
returns the value of the Content-Transfer-Encoding header
Definition at line 345 of file Contents.cxx.
| const H_ContentTransferEncoding::Type & Contents::header | ( | const H_ContentTransferEncoding & | headerType | ) | const |
returns the value of the Content-Transfer-Encoding header Throws an Contents::Exception if the header doesn't exist.
Definition at line 324 of file Contents.cxx.
| H_ContentType::Type & Contents::header | ( | const H_ContentType & | headerType | ) |
returns the value of the Content-Type header
Definition at line 286 of file Contents.cxx.
| const H_ContentType::Type & Contents::header | ( | const H_ContentType & | headerType | ) | const |
returns the value of the Content-Type header Throws an Contents::Exception if the header doesn't exist.
Definition at line 280 of file Contents.cxx.
|
inlineprotected |
Definition at line 301 of file Contents.hxx.
|
protected |
Definition at line 84 of file Contents.cxx.
|
inline |
returns the minor version of MIME used by the contents
Definition at line 280 of file Contents.hxx.
Assignment operator.
| rhs | Contents object to be copied |
Definition at line 71 of file Contents.cxx.
| void Contents::preParseHeaders | ( | ParseBuffer & | pb | ) |
Preforms preparsing on the headers stored in the ParseBuffer pb.
| pb | a ParseBuffer containing the headers to preparse |
Definition at line 453 of file Contents.cxx.
| void Contents::remove | ( | const HeaderBase & | headerType | ) |
removes a header if it is present
| headerType | the header to remove |
Definition at line 232 of file Contents.cxx.
| void Contents::remove | ( | const MIME_Header & | headerType | ) |
removes a MIME header if it is present
| headerType | the MIME header to remove |
Definition at line 260 of file Contents.cxx.
|
inline |
returns the major version of MIME used by the contents
Definition at line 275 of file Contents.hxx.
|
protected |
Definition at line 361 of file Contents.hxx.
|
protected |
Definition at line 352 of file Contents.hxx.
|
protected |
Definition at line 344 of file Contents.hxx.
|
protected |
Definition at line 350 of file Contents.hxx.
|
protected |
Definition at line 348 of file Contents.hxx.
|
protected |
Definition at line 354 of file Contents.hxx.
|
protected |
Definition at line 359 of file Contents.hxx.
|
protected |
Definition at line 346 of file Contents.hxx.
|
protected |
Definition at line 342 of file Contents.hxx.
|
protected |
Definition at line 357 of file Contents.hxx.