reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::MessageWaitingContents Class Reference

SIP body type for holding MWI contents (MIME content-type application/simple-message-summary). More...

#include <MessageWaitingContents.hxx>

Inheritance diagram for resip::MessageWaitingContents:
[legend]

Classes

class  AccountHeader
 makes accessing the MessageAccount Uri operate like accessing the other MessageWaiting headers. More...
 
class  Header
 Provides an interface for reading and modifying MessageWaiting bodies. More...
 

Public Member Functions

 MessageWaitingContents ()
 
 MessageWaitingContents (const HeaderFieldValue &hfv, const Mime &contentType)
 
 MessageWaitingContents (const Data &data, const Mime &contentType)
 
 MessageWaitingContents (const MessageWaitingContents &rhs)
 
virtual ~MessageWaitingContents ()
 
MessageWaitingContents & operator= (const MessageWaitingContents &rhs)
 
virtual Contents * clone () const
 duplicate an MessageWaitingContents object
 
virtual EncodeStream & encodeParsed (EncodeStream &str) const
 
virtual void parse (ParseBuffer &pb)
 
Header & header (HeaderType ht)
 Get the header correspoding to ht.
 
const Header & header (HeaderType ht) const
 
bool exists (HeaderType ht) const
 Check if HeaderType is present.
 
void remove (HeaderType ht)
 Remove the header correspoding to ht.
 
const Uri & header (const AccountHeader &ht) const
 Get the Uri for Message-Account line.
 
Uri & header (const AccountHeader &ht)
 
bool exists (const AccountHeader &ht) const
 Check if Message-Account line is present.
 
void remove (const AccountHeader &ht)
 Remove the Uri for Message-Account line.
 
const Data & header (const Data &hn) const
 Get the value correspoding to optional message header hn in the MessageWaiting doc.
 
Data & header (const Data &hn)
 
bool exists (const Data &hn) const
 Check if optional message header hn is present.
 
void remove (const Data &hn)
 Remove the optional message header corresponding to hn.
 
bool & hasMessages ()
 Check to see if there are messages.
 
- Public Member Functions inherited from resip::Contents
 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
 
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 ()
 
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 const Mime & getStaticType ()
 
static bool init ()
 
- Static Public Member Functions inherited from resip::Contents
static Contents * createContents (const Mime &contentType, const Data &contents)
 factory method to create a Contents object from a mime type and a payload
 

Additional Inherited Members

- Protected Member Functions inherited from resip::Contents
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 inherited from resip::Contents
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
 

Detailed Description

SIP body type for holding MWI contents (MIME content-type application/simple-message-summary).

See resip/stack/test/testMessageWaiting.cxx for usage examples.

Definition at line 26 of file MessageWaitingContents.hxx.

Constructor & Destructor Documentation

◆ MessageWaitingContents() [1/4]

MessageWaitingContents::MessageWaitingContents ( )

Definition at line 34 of file MessageWaitingContents.cxx.

◆ MessageWaitingContents() [2/4]

MessageWaitingContents::MessageWaitingContents ( const HeaderFieldValue &  hfv,
const Mime &  contentType 
)

Definition at line 45 of file MessageWaitingContents.cxx.

◆ MessageWaitingContents() [3/4]

MessageWaitingContents::MessageWaitingContents ( const Data &  data,
const Mime &  contentType 
)

Definition at line 56 of file MessageWaitingContents.cxx.

◆ MessageWaitingContents() [4/4]

MessageWaitingContents::MessageWaitingContents ( const MessageWaitingContents &  rhs)

Definition at line 68 of file MessageWaitingContents.cxx.

◆ ~MessageWaitingContents()

MessageWaitingContents::~MessageWaitingContents ( )
virtual

Definition at line 87 of file MessageWaitingContents.cxx.

Member Function Documentation

◆ clone()

Contents * MessageWaitingContents::clone ( ) const
virtual

duplicate an MessageWaitingContents object

Returns
pointer to a new MessageWaitingContents object

Implements resip::Contents.

Definition at line 142 of file MessageWaitingContents.cxx.

◆ encodeParsed()

EncodeStream & MessageWaitingContents::encodeParsed ( EncodeStream &  str) const
virtual

Implements resip::LazyParser.

Definition at line 148 of file MessageWaitingContents.cxx.

◆ exists() [1/3]

bool MessageWaitingContents::exists ( const AccountHeader &  ht) const

Check if Message-Account line is present.

Note
This call only indicates the actual existence of the Message-Account line in the MessageWaiting doc if header(mw_account) hasn't been called. After that call the exists(mw_account) call will return true (since a Uri now exists) whether or not the Uri was built based on the MessageWaiting doc.
Parameters
htAccountHeader used to lookup MessageWaiting header - not really used computationally
Returns
bool true if HeaderType exists

Definition at line 564 of file MessageWaitingContents.cxx.

◆ exists() [2/3]

bool MessageWaitingContents::exists ( const Data &  hn) const

Check if optional message header hn is present.

Parameters
hnHeaderType used to lookup the optional MessageWaiting header
Returns
bool true if optional message header exists

Definition at line 608 of file MessageWaitingContents.cxx.

◆ exists() [3/3]

bool MessageWaitingContents::exists ( HeaderType  ht) const

Check if HeaderType is present.

Parameters
htHeaderType used to lookup MessageWaiting header
Returns
bool true if HeaderType exists

Definition at line 509 of file MessageWaitingContents.cxx.

◆ getStaticType()

const Mime & MessageWaitingContents::getStaticType ( )
static

Definition at line 134 of file MessageWaitingContents.cxx.

◆ hasMessages()

bool & resip::MessageWaitingContents::hasMessages ( )
inline

Check to see if there are messages.

Returns
bool true if there are messages

Definition at line 126 of file MessageWaitingContents.hxx.

◆ header() [1/6]

Uri & MessageWaitingContents::header ( const AccountHeader &  ht)

Definition at line 524 of file MessageWaitingContents.cxx.

◆ header() [2/6]

const Uri & MessageWaitingContents::header ( const AccountHeader &  ht) const

Get the Uri for Message-Account line.

Parameters
htAccountHeader used to lookup MessageWaiting header - not really used computationally
Returns
Uri for Message-Account line

Definition at line 539 of file MessageWaitingContents.cxx.

◆ header() [3/6]

Data & MessageWaitingContents::header ( const Data &  hn)

Definition at line 579 of file MessageWaitingContents.cxx.

◆ header() [4/6]

const Data & MessageWaitingContents::header ( const Data &  hn) const

Get the value correspoding to optional message header hn in the MessageWaiting doc.

Used to access optional message headers in the MessageWaiting doc

Parameters
hnHeaderType used to lookup the optional MessageWaiting header
Returns
Data corresponding to hn

Definition at line 586 of file MessageWaitingContents.cxx.

◆ header() [5/6]

MessageWaitingContents::Header & MessageWaitingContents::header ( HeaderType  ht)

Get the header correspoding to ht.

Parameters
htHeaderType used to lookup MessageWaiting header
Returns
Header corresponding to ht

Definition at line 469 of file MessageWaitingContents.cxx.

◆ header() [6/6]

const MessageWaitingContents::Header & MessageWaitingContents::header ( HeaderType  ht) const

Definition at line 484 of file MessageWaitingContents.cxx.

◆ init()

bool MessageWaitingContents::init ( )
static

Definition at line 19 of file MessageWaitingContents.cxx.

◆ operator=()

MessageWaitingContents & MessageWaitingContents::operator= ( const MessageWaitingContents &  rhs)

Definition at line 107 of file MessageWaitingContents.cxx.

◆ parse()

void MessageWaitingContents::parse ( ParseBuffer &  pb)
virtual

Implements resip::LazyParser.

Definition at line 290 of file MessageWaitingContents.cxx.

◆ remove() [1/3]

void MessageWaitingContents::remove ( const AccountHeader &  ht)

Remove the Uri for Message-Account line.

Parameters
htAccountHeader used to lookup MessageWaiting header - not really used computationally

Definition at line 571 of file MessageWaitingContents.cxx.

◆ remove() [2/3]

void MessageWaitingContents::remove ( const Data &  hn)

Remove the optional message header corresponding to hn.

Parameters
hnHeaderType used to lookup the optional MessageWaiting header

Definition at line 615 of file MessageWaitingContents.cxx.

◆ remove() [3/3]

void MessageWaitingContents::remove ( HeaderType  ht)

Remove the header correspoding to ht.

Parameters
htHeaderType used to remove from MessageWaiting header

Definition at line 516 of file MessageWaitingContents.cxx.


The documentation for this class was generated from the following files: