Yate
Public Member Functions | Protected Member Functions | List of all members
MimeSdpBody Class Reference

MIME for application/sdp. More...

#include <yatemime.h>

Inheritance diagram for MimeSdpBody:
MimeBody GenObject

Public Member Functions

 MimeSdpBody (bool hashing=false)
 
 MimeSdpBody (const String &type, const char *buf, int len)
 
 MimeSdpBody (const MimeHeaderLine &type, const char *buf, int len)
 
virtual ~MimeSdpBody ()
 
virtual void * getObject (const String &name) const
 
virtual bool isSDP () const
 
virtual MimeBodyclone () const
 
const ObjListlines () const
 
unsigned int hash () const
 
NamedStringaddLine (const char *name, const char *value=0)
 
const NamedStringgetLine (const char *name) const
 
const NamedStringgetNextLine (const NamedString *line) const
 
- Public Member Functions inherited from MimeBody
virtual ~MimeBody ()
 
const MimeHeaderLinegetType () const
 
MimeBodygetFirst (const String &type) const
 
const ObjListheaders () const
 
void appendHdr (MimeHeaderLine *hdr)
 
void removeHdr (MimeHeaderLine *hdr, bool delobj=true)
 
MimeHeaderLinefindHdr (const String &name, const MimeHeaderLine *start=0) const
 
void buildHeaders (String &buf)
 
bool setParam (const char *name, const char *value=0, const char *header=0)
 
bool delParam (const char *name, const char *header=0)
 
const NamedStringgetParam (const char *name, const char *header=0) const
 
const DataBlockgetBody () const
 
const DataBlockbody () const
 
virtual bool isMultipart () const
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Protected Member Functions

 MimeSdpBody (const MimeSdpBody &original)
 
virtual void buildBody () const
 
- Protected Member Functions inherited from MimeBody
 MimeBody (const String &type)
 
 MimeBody (const MimeHeaderLine &type)
 

Additional Inherited Members

- Static Public Member Functions inherited from MimeBody
static MimeBodybuild (const char *buf, int len, const MimeHeaderLine &type)
 
static StringgetUnfoldedLine (const char *&buf, int &len)
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 
- Protected Attributes inherited from MimeBody
DataBlock m_body
 
ObjList m_headers
 

Detailed Description

MIME for application/sdp.

An object holding the lines of an application/sdp MIME type

Constructor & Destructor Documentation

MimeSdpBody ( bool  hashing = false)

Default constructor, builds an empty application/sdp

Parameters
hashingEnable hashing the content lines
MimeSdpBody ( const String type,
const char *  buf,
int  len 
)

Constructor from block of data

Parameters
typeThe value of the Content-Type header line
bufPointer to buffer of data
lenLength of data in buffer
MimeSdpBody ( const MimeHeaderLine type,
const char *  buf,
int  len 
)

Constructor from block of data

Parameters
typeThe content type header line
bufPointer to buffer of data
lenLength of data in buffer
virtual ~MimeSdpBody ( )
virtual

Destructor

MimeSdpBody ( const MimeSdpBody original)
protected

Copy constructor

Member Function Documentation

NamedString* addLine ( const char *  name,
const char *  value = 0 
)

Append a new name=value line of SDP data

Parameters
nameName of the line, should be one character
valueText of the line
Returns
Pointer to new added line
virtual void buildBody ( ) const
protectedvirtual

Override that is called internally to build the binary encoded body

Implements MimeBody.

virtual MimeBody* clone ( ) const
virtual

Duplicate this MIME body

Returns
Copy of this MIME body - a new MimeSdpBody

Implements MimeBody.

const NamedString* getLine ( const char *  name) const

Retrieve the first line matching a name

Parameters
nameName of the line to search
Returns
First instance of the searched name or NULL if none present
const NamedString* getNextLine ( const NamedString line) const

Retrieve the next line of the same type as the current

Parameters
lineCurrent line
Returns
Next instance of same name or NULL if no more
virtual void* getObject ( const String name) const
virtual

RTTI method, get a pointer to a derived class given the class name

Parameters
nameName of the class we are asking for
Returns
Pointer to the requested class or NULL if this object doesn't implement it

Reimplemented from MimeBody.

unsigned int hash ( ) const
inline

Retrieve the hash of body lines

Returns
Hash of body, zero if hashing not enabled
virtual bool isSDP ( ) const
inlinevirtual

Override that checks if this body is an Session Description Protocol

Returns
True, since this body holds a SDP

Reimplemented from MimeBody.

const ObjList& lines ( ) const
inline

Retrieve the lines hold in data

Returns
List of NamedStrings

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