sipxtacklib  Version 3.3
Public Member Functions | Static Public Member Functions | List of all members
PidfBody Class Reference

class to contain an PIDF presense state body More...

#include <PidfBody.h>

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

Public Member Functions

 PidfBody (const char *resourceAor=NULL)
 Default constructor. More...
 
 PidfBody (const char *bytes, int length, const char *contentEncodingValueString)
 Construct an PidfBody from body bytes. More...
 
 PidfBody (const PidfBody &rPidfBody)
 Copy constructor. More...
 
virtual ~PidfBody ()
 Destructor. More...
 
PidfBodyoperator= (const PidfBody &rhs)
 Assignment operator. More...
 
void render ()
 Render the PIDF data into the XML format of the body. More...
 
void getEntityAor (UtlString &entityAor) const
 Get the AOR (PIDF presence element, entity attribute) for the PIDF doc. More...
 
virtual void getBytes (const char **bytes, int *length) const
 get the body content of the PIDF body. More...
 
virtual void getBytes (UtlString *bytes, int *length) const
 
UtlBoolean getBasicStatus (int tupleIndex, UtlString &tupleId, UtlBoolean &isTupleStatusBasicOpen, UtlString &contact, UtlString &tupleNote) const
 Get the presense status/state. More...
 
void addBasicStatus (const UtlString &tupleId, const UtlBoolean &isTupleStatusBasicOpen, const UtlString &contact, const UtlString &tupleNote)
 Set the presence status/state. More...
 
UtlBoolean changeBasicStatus (int tupleIndex, UtlBoolean isTupleStatusBasicOpen)
 Change the basic element value in the indicated tuple element. 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 int getLength () 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 int parseXmlToPidfProperties (const char *bytes, int length, const char *contentEncodingValueString, UtlString &entityAor, UtlDList &tuples)
 
- 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...
 

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
}
 
- Protected Attributes inherited from HttpBody
int bodyLength
 
UtlString mBody
 
UtlString mMultipartBoundary
 
int mBodyPartCount
 
MimeBodyPartmpBodyParts [MAX_HTTP_BODY_PARTS]
 
BodyClassTypes mClassType
 

Detailed Description

class to contain an PIDF presense state body

Constructor & Destructor Documentation

PidfBody ( const char *  resourceAor = NULL)

Default constructor.

PidfBody ( const char *  bytes,
int  length,
const char *  contentEncodingValueString 
)

Construct an PidfBody from body bytes.

PidfBody ( const PidfBody rPidfBody)

Copy constructor.

~PidfBody ( )
virtual

Destructor.

Member Function Documentation

PidfBody & operator= ( const PidfBody rhs)

Assignment operator.

void render ( )

Render the PIDF data into the XML format of the body.

The PidfBody MUST be rendered if you set or change any of the PIDF information. getBytes does this automatically if the data has changed.

int parseXmlToPidfProperties ( const char *  bytes,
int  length,
const char *  contentEncodingValueString,
UtlString &  entityAor,
UtlDList &  tuples 
)
static
void getEntityAor ( UtlString &  entityAor) const

Get the AOR (PIDF presence element, entity attribute) for the PIDF doc.

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

get the body content of the PIDF body.

Renders the body into the mBody member if PIDF content has been changed via the accessors.

Reimplemented from HttpBody.

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

Reimplemented from HttpBody.

UtlBoolean getBasicStatus ( int  tupleIndex,
UtlString &  tupleId,
UtlBoolean &  isTupleStatusBasicOpen,
UtlString &  contact,
UtlString &  tupleNote 
) const

Get the presense status/state.

Get the value of the status element of the tuple indicated by tupleIndex.

Parameters
tupleIndex- indicates which tuple to get the status from
tuple- the value of the tupleId attribute of the indicated tuple
basicStatus- the value of the <basic> element in the <status> element of the tuple.
void addBasicStatus ( const UtlString &  tupleId,
const UtlBoolean &  isTupleStatusBasicOpen,
const UtlString &  contact,
const UtlString &  tupleNote 
)

Set the presence status/state.

UtlBoolean changeBasicStatus ( int  tupleIndex,
UtlBoolean  isTupleStatusBasicOpen 
)

Change the basic element value in the indicated tuple element.


sipXtackLib home page