sipxtacklib
Version 3.3
|
class to contain an PIDF presense state body More...
#include <PidfBody.h>
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... | |
PidfBody & | operator= (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 () |
HttpBody & | operator= (const HttpBody &rhs) |
void | appendBodyPart (const HttpBody &body, const UtlDList ¶meters) |
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 MimeBodyPart * | getMultipart (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 HttpBody * | copyBody (const HttpBody &sourceBody) |
Copy the source HttpBody using the correct derived class constructor. More... | |
static HttpBody * | createBody (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 |
MimeBodyPart * | mpBodyParts [MAX_HTTP_BODY_PARTS] |
BodyClassTypes | mClassType |
class to contain an PIDF presense state body
PidfBody | ( | const char * | resourceAor = NULL | ) |
Default constructor.
PidfBody | ( | const char * | bytes, |
int | length, | ||
const char * | contentEncodingValueString | ||
) |
Construct an PidfBody from body bytes.
|
virtual |
Destructor.
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.
|
static |
void getEntityAor | ( | UtlString & | entityAor | ) | const |
Get the AOR (PIDF presence element, entity attribute) for the PIDF doc.
|
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.
|
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.
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.