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

SIP body type for holding PIDF contents (MIME content-type application/pidf+xml). More...

#include <GenericPidfContents.hxx>

Inheritance diagram for resip::GenericPidfContents:
[legend]

Classes

class  Node
 
class  SimplePresenceInfo
 

Public Types

typedef LinkedHashMap< Data, Data, KeyedDataHash > NamespaceMap
 
typedef std::list< Node * > NodeList
 
typedef std::list< SimplePresenceInfo * > SimplePresenceInfoList
 

Public Member Functions

 RESIP_HeapCount (GenericPidfContents)
 
 GenericPidfContents (const Mime &contentType)
 
 GenericPidfContents ()
 
 GenericPidfContents (const HeaderFieldValue &hfv, const Mime &contentType)
 
 GenericPidfContents (const GenericPidfContents &rhs)
 
virtual ~GenericPidfContents ()
 
virtual GenericPidfContents & operator= (const GenericPidfContents &rhs)
 
virtual Contents * clone () const
 duplicate an GenericPidfContents object
 
virtual EncodeStream & encodeParsed (EncodeStream &str) const
 
virtual void parse (ParseBuffer &pb)
 
void setEntity (const Uri &entity)
 
const Uri & getEntity () const
 
void addNamespace (const Data &uri, const Data &prefix)
 
const NamespaceMap & getNamespaces () const
 
const Data & getRootPidfNamespacePrefix () const
 
const NodeList & getRootNodes () const
 
void setRootNodes (const NodeList &nodeList)
 
void setSimplePresenceTupleNode (const Data &id, bool online, const Data &timestamp=Data::Empty, const Data &note=Data::Empty, const Data &contact=Data::Empty, const Data &contactPriority=Data::Empty)
 
const Data & getSimplePresenceTupleId ()
 
const bool getSimplePresenceOnline ()
 
const Data & getSimplePresenceTimestamp ()
 
const Data & getSimplePresenceNote ()
 
const Data & getSimplePresenceContact ()
 
const Data & getSimplePresenceContactPriority ()
 
const SimplePresenceInfoList & getSimplePresenceList ()
 
bool merge (const GenericPidfContents &other)
 
- 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 const Data & getSubNodeValue (Node *node, const Data &tag)
 
static Data generateNowTimestampData ()
 
static Data generateTimestampData (time_t datetime)
 
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
 

Static Public Attributes

static const GenericPidfContents Empty
 

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 PIDF contents (MIME content-type application/pidf+xml).

This version is used to be able to extract and manipulate all Pidf contents and contained extensions (ie: rpid, data-model, cipid, etc.) in a generic manner.

Definition at line 25 of file GenericPidfContents.hxx.

Member Typedef Documentation

◆ NamespaceMap

◆ NodeList

Definition at line 61 of file GenericPidfContents.hxx.

◆ SimplePresenceInfoList

Constructor & Destructor Documentation

◆ GenericPidfContents() [1/4]

GenericPidfContents::GenericPidfContents ( const Mime &  contentType)

Definition at line 38 of file GenericPidfContents.cxx.

◆ GenericPidfContents() [2/4]

GenericPidfContents::GenericPidfContents ( )

Definition at line 33 of file GenericPidfContents.cxx.

◆ GenericPidfContents() [3/4]

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

Definition at line 43 of file GenericPidfContents.cxx.

◆ GenericPidfContents() [4/4]

GenericPidfContents::GenericPidfContents ( const GenericPidfContents &  rhs)

Definition at line 62 of file GenericPidfContents.cxx.

◆ ~GenericPidfContents()

GenericPidfContents::~GenericPidfContents ( )
virtual

Definition at line 69 of file GenericPidfContents.cxx.

Member Function Documentation

◆ addNamespace()

void GenericPidfContents::addNamespace ( const Data &  uri,
const Data &  prefix 
)

Definition at line 497 of file GenericPidfContents.cxx.

◆ clone()

Contents * GenericPidfContents::clone ( ) const
virtual

duplicate an GenericPidfContents object

Returns
pointer to a new GenericPidfContents object

Implements resip::Contents.

Definition at line 115 of file GenericPidfContents.cxx.

◆ encodeParsed()

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

Implements resip::LazyParser.

Definition at line 128 of file GenericPidfContents.cxx.

◆ generateNowTimestampData()

Data GenericPidfContents::generateNowTimestampData ( )
static

Definition at line 797 of file GenericPidfContents.cxx.

◆ generateTimestampData()

Data GenericPidfContents::generateTimestampData ( time_t  datetime)
static

Definition at line 814 of file GenericPidfContents.cxx.

◆ getEntity()

const Uri & GenericPidfContents::getEntity ( ) const

Definition at line 490 of file GenericPidfContents.cxx.

◆ getNamespaces()

const NamespaceMap & resip::GenericPidfContents::getNamespaces ( ) const
inline

Definition at line 55 of file GenericPidfContents.hxx.

◆ getRootNodes()

const NodeList & resip::GenericPidfContents::getRootNodes ( ) const
inline

Definition at line 78 of file GenericPidfContents.hxx.

◆ getRootPidfNamespacePrefix()

const Data & resip::GenericPidfContents::getRootPidfNamespacePrefix ( ) const
inline

Definition at line 58 of file GenericPidfContents.hxx.

◆ getSimplePresenceContact()

const Data & GenericPidfContents::getSimplePresenceContact ( )

Definition at line 704 of file GenericPidfContents.cxx.

◆ getSimplePresenceContactPriority()

const Data & GenericPidfContents::getSimplePresenceContactPriority ( )

Definition at line 719 of file GenericPidfContents.cxx.

◆ getSimplePresenceList()

const SimplePresenceInfoList & resip::GenericPidfContents::getSimplePresenceList ( )
inline

Definition at line 117 of file GenericPidfContents.hxx.

◆ getSimplePresenceNote()

const Data & GenericPidfContents::getSimplePresenceNote ( )

Definition at line 689 of file GenericPidfContents.cxx.

◆ getSimplePresenceOnline()

const bool GenericPidfContents::getSimplePresenceOnline ( )

Definition at line 659 of file GenericPidfContents.cxx.

◆ getSimplePresenceTimestamp()

const Data & GenericPidfContents::getSimplePresenceTimestamp ( )

Definition at line 674 of file GenericPidfContents.cxx.

◆ getSimplePresenceTupleId()

const Data & GenericPidfContents::getSimplePresenceTupleId ( )

Definition at line 644 of file GenericPidfContents.cxx.

◆ getStaticType()

const Mime & GenericPidfContents::getStaticType ( )
static

Definition at line 121 of file GenericPidfContents.cxx.

◆ getSubNodeValue()

const Data & GenericPidfContents::getSubNodeValue ( Node *  node,
const Data &  tag 
)
static

Definition at line 367 of file GenericPidfContents.cxx.

◆ init()

bool GenericPidfContents::init ( )
static

Definition at line 24 of file GenericPidfContents.cxx.

◆ merge()

bool GenericPidfContents::merge ( const GenericPidfContents &  other)

Definition at line 351 of file GenericPidfContents.cxx.

◆ operator=()

GenericPidfContents & GenericPidfContents::operator= ( const GenericPidfContents &  rhs)
virtual

Definition at line 49 of file GenericPidfContents.cxx.

◆ parse()

void GenericPidfContents::parse ( ParseBuffer &  pb)
virtual

Implements resip::LazyParser.

Definition at line 164 of file GenericPidfContents.cxx.

◆ RESIP_HeapCount()

resip::GenericPidfContents::RESIP_HeapCount ( GenericPidfContents  )

◆ setEntity()

void GenericPidfContents::setEntity ( const Uri &  entity)

Definition at line 483 of file GenericPidfContents.cxx.

◆ setRootNodes()

void GenericPidfContents::setRootNodes ( const NodeList &  nodeList)

Definition at line 360 of file GenericPidfContents.cxx.

◆ setSimplePresenceTupleNode()

void GenericPidfContents::setSimplePresenceTupleNode ( const Data &  id,
bool  online,
const Data &  timestamp = Data::Empty,
const Data &  note = Data::Empty,
const Data &  contact = Data::Empty,
const Data &  contactPriority = Data::Empty 
)

Definition at line 514 of file GenericPidfContents.cxx.

Member Data Documentation

◆ Empty

const GenericPidfContents GenericPidfContents::Empty
static

Definition at line 29 of file GenericPidfContents.hxx.


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