sipxtacklib  Version 3.3
Protected Member Functions | List of all members
SipResourceList Class Reference

Container for MIME type application/rlmi+xml. More...

#include <SipResourceList.h>

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

Public Member Functions

====================== Constructors and Destructors
 SipResourceList (const UtlBoolean state, const char *uri, const char *type)
 Construct an empty body of a resource list. More...
 
 SipResourceList (const char *bodyBytes, const char *type)
 Construct from an existing resource list in the xml format. More...
 
virtual ~SipResourceList ()
 Destructor that will free up the memory allocated for resource contents if it is not being deleted. More...
 
====================== Resource List Serialization Interfaces
void buildBody () const
 Build the body of this object. More...
 
void getEventType (UtlString &type) const
 Get the event type of this object. More...
 
virtual int getLength () const
 Get the string length of this object. More...
 
void getListUri (UtlString &uri) const
 Get the resource list uri. More...
 
virtual void getBytes (const char **bytes, int *length) const
 Get the serialized char representation of this resource list. More...
 
virtual void getBytes (UtlString *bytes, int *length) const
 Get the serialized string representation of this resource list. More...
 
====================== Resource List Setting Interfaces

These methods set/get the resource element.

void insertResource (Resource *resource)
 Insert a Resource object to the hash table. More...
 
ResourcegetResource (UtlString &resourceUri)
 Get the Resource object based on the resource Uri. More...
 
ResourceremoveResource (Resource *resource)
 Remove the Resource object from the hash table. More...
 
void insertEvent (UtlContainable *event)
 Insert a Event object to the hash table. More...
 
UtlContainable * removeEvent (UtlContainable *event)
 Remove the Event object from the hash table. More...
 
UtlBoolean isEmpty ()
 Check whether there is any resource or not. More...
 
- Public Member Functions inherited from HttpBody
 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 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
 

Protected Member Functions

void parseBody (const char *bytes)
 Parse an existing resource list from xml format into the internal representation. More...
 

Additional Inherited Members

- Public Types inherited from HttpBody
enum  BodyClassTypes {
  UNKNOWN_BODY_CLASS = 0,
  HTTP_BODY_CLASS,
  SMIME_BODY_CLASS,
  SDP_BODY_CLASS,
  PIDF_BODY_CLASS,
  DIALOG_EVENT_BODY_CLASS
}
 
- Static Public Member Functions inherited from HttpBody
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 inherited from HttpBody
int bodyLength
 
UtlString mBody
 
UtlString mMultipartBoundary
 
int mBodyPartCount
 
MimeBodyPartmpBodyParts [MAX_HTTP_BODY_PARTS]
 
BodyClassTypes mClassType
 

Detailed Description

Container for MIME type application/rlmi+xml.

This class contains all the contents presented in a resource list described in draft-ietf-simple-event-list-07.txt (A Session Initiation Protocol (SIP) Event Notification Extension for Resource Lists). This class has the methods to construct and manipulate the resources in a resource list.

Constructor & Destructor Documentation

SipResourceList ( const UtlBoolean  state,
const char *  uri,
const char *  type 
)

Construct an empty body of a resource list.

SipResourceList ( const char *  bodyBytes,
const char *  type 
)

Construct from an existing resource list in the xml format.

~SipResourceList ( )
virtual

Destructor that will free up the memory allocated for resource contents if it is not being deleted.

Member Function Documentation

void buildBody ( ) const

Build the body of this object.

void getEventType ( UtlString &  type) const

Get the event type of this object.

int getLength ( ) const
virtual

Get the string length of this object.

Reimplemented from HttpBody.

void getListUri ( UtlString &  uri) const

Get the resource list uri.

void getBytes ( const char **  bytes,
int *  length 
) const
virtual

Get the serialized char representation of this resource list.

Parameters
bytes- buffer space where the resource list is written, null terminated.
length- the number of bytes written (not including the null terminator).

Reimplemented from HttpBody.

void getBytes ( UtlString *  bytes,
int *  length 
) const
virtual

Get the serialized string representation of this resource list.

Parameters
bytes- buffer space where the resource list is written, null terminated.
length- the number of bytes written (not including the null terminator).

Reimplemented from HttpBody.

void insertResource ( Resource resource)

Insert a Resource object to the hash table.

Resource * getResource ( UtlString &  resourceUri)

Get the Resource object based on the resource Uri.

Resource * removeResource ( Resource resource)

Remove the Resource object from the hash table.

void insertEvent ( UtlContainable *  event)

Insert a Event object to the hash table.

UtlContainable * removeEvent ( UtlContainable *  event)

Remove the Event object from the hash table.

UtlBoolean isEmpty ( )

Check whether there is any resource or not.

void parseBody ( const char *  bytes)
protected

Parse an existing resource list from xml format into the internal representation.


sipXtackLib home page