sipxtacklib  Version 3.3
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
HttpBody Class Reference

class to contain an HTTP body More...

#include <HttpBody.h>

Inheritance diagram for HttpBody:
Inheritance graph
[legend]
Collaboration diagram for HttpBody:
Collaboration graph
[legend]

Public Types

enum  BodyClassTypes {
  UNKNOWN_BODY_CLASS = 0,
  HTTP_BODY_CLASS,
  SMIME_BODY_CLASS,
  SDP_BODY_CLASS,
  PIDF_BODY_CLASS,
  DIALOG_EVENT_BODY_CLASS
}
 

Public Member Functions

 HttpBody (const char *bytes=NULL, int length=-1, const char *contentType=NULL)
 
 HttpBody (const char *contentType)
 
 HttpBody (const HttpBody &rHttpBody)
 
virtual ~HttpBody ()
 
HttpBodyoperator= (const HttpBody &rhs)
 
void appendBodyPart (const HttpBody &body, const UtlDList &parameters)
 Append a multipart body part to an existing multiparty body. More...
 
virtual int getLength () const
 
virtual void getBytes (const char **bytes, int *length) const
 
virtual void getBytes (UtlString *bytes, int *length) const
 
virtual const char * getBytes () const
 
UtlBoolean getMultipartBytes (int partIndex, const char **bytes, int *length, int *start) const
 
const MimeBodyPartgetMultipart (int partIndex) const
 
int getMultipartCount () const
 
BodyClassTypes getClassType () const
 
const char * getMultipartBoundary () const
 Get the multipart boundary string. More...
 
const char * getContentType () const
 Get the content type string. More...
 
UtlBoolean isMultipart () const
 

Static Public Member Functions

static HttpBodycopyBody (const HttpBody &sourceBody)
 Copy the source HttpBody using the correct derived class constructor. More...
 
static HttpBodycreateBody (const char *bodyBytes, int bodyBytesLength, const char *contentType, const char *contentEncoding)
 Pseudo body factory. More...
 

Protected Attributes

int bodyLength
 
UtlString mBody
 
UtlString mMultipartBoundary
 
int mBodyPartCount
 
MimeBodyPartmpBodyParts [MAX_HTTP_BODY_PARTS]
 
BodyClassTypes mClassType
 

Friends

class HttpBodyMultipart
 

Detailed Description

class to contain an HTTP body

This is the base class and container for all HTTP (SIP, etc.) message bodies. This includes multipart MIME bodies, single part MIME and specific MIME types. The HttpBody is essentially a container for a blob.

Member Enumeration Documentation

Enumerator
UNKNOWN_BODY_CLASS 
HTTP_BODY_CLASS 
SMIME_BODY_CLASS 
SDP_BODY_CLASS 
PIDF_BODY_CLASS 
DIALOG_EVENT_BODY_CLASS 

Constructor & Destructor Documentation

HttpBody ( const char *  bytes = NULL,
int  length = -1,
const char *  contentType = NULL 
)
HttpBody ( const char *  contentType)
HttpBody ( const HttpBody rHttpBody)
~HttpBody ( )
virtual

Member Function Documentation

HttpBody & operator= ( const HttpBody rhs)
HttpBody * copyBody ( const HttpBody sourceBody)
static

Copy the source HttpBody using the correct derived class constructor.

HttpBody * createBody ( const char *  bodyBytes,
int  bodyBytesLength,
const char *  contentType,
const char *  contentEncoding 
)
static

Pseudo body factory.

void appendBodyPart ( const HttpBody body,
const UtlDList &  parameters 
)

Append a multipart body part to an existing multiparty body.

int getLength ( ) const
virtual
void getBytes ( const char **  bytes,
int *  length 
) const
virtual
void getBytes ( UtlString *  bytes,
int *  length 
) const
virtual
const char * getBytes ( ) const
virtual
UtlBoolean getMultipartBytes ( int  partIndex,
const char **  bytes,
int *  length,
int *  start 
) const
const MimeBodyPart * getMultipart ( int  partIndex) const
int getMultipartCount ( ) const
HttpBody::BodyClassTypes getClassType ( ) const
const char * getMultipartBoundary ( ) const

Get the multipart boundary string.

const char * getContentType ( ) const

Get the content type string.

UtlBoolean isMultipart ( ) const

Friends And Related Function Documentation

friend class HttpBodyMultipart
friend

Member Data Documentation

int bodyLength
protected
UtlString mBody
protected
UtlString mMultipartBoundary
protected
int mBodyPartCount
protected
MimeBodyPart* mpBodyParts[MAX_HTTP_BODY_PARTS]
protected
BodyClassTypes mClassType
protected

sipXtackLib home page