MimeBody Class Reference

Abstract MIME data holder. More...

#include <yatemime.h>

Inheritance diagram for MimeBody:

GenObject MimeBinaryBody MimeLinesBody MimeSdpBody MimeStringBody List of all members.

Public Member Functions

virtual ~MimeBody ()
virtual void * getObject (const String &name) const
const StringgetType () const
const DataBlockgetBody () const
virtual bool isSDP () const
virtual bool isMultipart () const
virtual MimeBodyclone () const=0

Static Public Member Functions

static MimeBodybuild (const char *buf, int len, const String &type)
static StringgetUnfoldedLine (const char *&buf, int &len)

Protected Member Functions

 MimeBody (const String &type)
virtual void buildBody () const=0

Protected Attributes

DataBlock m_body

Detailed Description

Abstract MIME data holder.

Abstract base class for holding Multipurpose Internet Mail Extensions data


Constructor & Destructor Documentation

virtual ~MimeBody (  )  [virtual]

Destructor

MimeBody ( const String type  )  [protected]

Constructor to be used only by derived classes

Parameters:
type Name of the MIME type/subtype, must be lower case


Member Function Documentation

virtual void* getObject ( const String name  )  const [virtual]

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

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

Reimplemented from GenObject.

Reimplemented in MimeSdpBody, MimeBinaryBody, MimeStringBody, and MimeLinesBody.

const String& getType (  )  const [inline]

Retrive the MIME type of this body

Returns:
Name of the MIME type/subtype

const DataBlock& getBody (  )  const

Retrive the binary encoding of this MIME body

Returns:
Block of binary data

virtual bool isSDP (  )  const [inline, virtual]

Check if this body is an Session Description Protocol

Returns:
True if this body holds a SDP

Reimplemented in MimeSdpBody.

virtual bool isMultipart (  )  const [inline, virtual]

Check if this body is multipart (can hold other MIME bodies)

Returns:
True if this body is multipart

virtual MimeBody* clone (  )  const [pure virtual]

Duplicate this MIME body

Returns:
Copy of this MIME body

Implemented in MimeSdpBody, MimeBinaryBody, MimeStringBody, and MimeLinesBody.

static MimeBody* build ( const char *  buf,
int  len,
const String type 
) [static]

Method to build a MIME body from a type and data buffer

Parameters:
buf Pointer to buffer of data
len Length of data in buffer
type Name of the MIME type/subtype, must be lower case
Returns:
Newly allocated MIME body or NULL if type is unknown

static String* getUnfoldedLine ( const char *&  buf,
int &  len 
) [static]

Utility method, returns an unfolded line and advances the pointer

Parameters:
buf Reference to pointer to start of buffer data
len Reference to variable holding buffer length
Returns:
Newly allocated String holding the line of text

virtual void buildBody (  )  const [protected, pure virtual]

Method that is called internally to build the binary encoded body

Implemented in MimeSdpBody, MimeBinaryBody, MimeStringBody, and MimeLinesBody.


Member Data Documentation

DataBlock m_body [mutable, protected]

Block of binary data that buildBody() must fill


The documentation for this class was generated from the following file:
Generated on Sun Aug 12 19:02:56 2007 for Yate by  doxygen 1.5.2