#include <Message.h>
Public Member Functions | |
Message () | |
to create empty Message | |
Message (const JString &xml) | |
to create from XML | |
Message (XMLNode *node) | |
to create from XML node | |
Message (const Message &msg) | |
to create from other message | |
Message (const JString &from, const JString &to, const JString &type) | |
Create from values. | |
Message (const JString &from, const JString &to, const JString &type, const JString &content, const JString &language) | |
Create from values with content and language. | |
Message (const JString &from, const JString &to, const JString &type, Object *obj) | |
Create from values with object. | |
~Message () | |
bool | init () |
bool | unitTest () |
Object * | clone () const |
Message * | shallowClone () const |
Message * | tinyClone () const |
Message & | operator= (const Message &msg) |
bool | equals (const Object *o2) const |
int | compare (const Object *o2) const |
bool | fromXML (XMLNode *xmlNode) |
Read XML node into this Message... | |
bool | fromXML (const JString &xml) |
Read XML node into this Message... | |
JString | toXML () |
Convert Message to XML... | |
JString | toHTMLTable (const JString &tags="") |
Nicely formatted HTML without. | |
JString | getHistoryHTML (const JString &urlformat) |
Nicely formatted HTML for History field | |
JString | print () |
Nicely formatted text print. | |
JString | printShort () |
One line text print. | |
virtual unsigned long | getPayloadSize () const |
Get total size of payload. | |
long | getBinarySize (int chunk) |
Get the size of binary data chunk, -1 for all chunks. | |
int | getBinaryChunkCount () |
Get the number of data chunks. | |
long | toBinaryBuffer (int chunk, char *buffer, int maxlen) |
Write binary data to buffer at chunk number 'chunk'. | |
bool | fromBinaryBuffer (int chunk, char *buffer, long len) |
Set the data after separate reception. | |
bool | set (const JString &name, const JString &value) |
Set a field in the Message. | |
JString | get (const JString &name) |
Get a field in the Message. | |
bool | setAux (const JString &name, const JString &value) |
Set an aux field in the Message. | |
JString | getAux (const JString &name) |
Get an aux field in the Message. | |
bool | setTime (const JString &name, const JTime &t) |
Set a JTime field in the Message. | |
JTime | getTime (const JString &name) |
Get a JTime field in the Message. | |
bool | addReferenceToHistory (Message *msg, const JString &author) |
Add a Message to the History field in the Message. | |
bool | addReferenceToHistory (Reference *ref, const JString &author) |
Add a Reference to the History field in the Message. | |
ObjectDictionary * | getAllHistory () |
Get the History collection in the Message. | |
ObjectCollection * | getHistoryFromAuthor (const JString &author) |
Get the History collection in the Message from an Author. | |
bool | deleteHistory () |
Delete all History. | |
bool | setObject (Object *obj) |
Set the attached Object for the Message. | |
Object * | getObject () |
Get the attached Object for the Message or NULL. | |
JString | getObjectType () |
Get the attached Object type (Class name) for the Message. | |
bool | deleteObject () |
Delete the attached Object; NB: Will destroy object. | |
Object * | takeObject () |
Takes away the attached object. | |
bool | doesTypeMatch (const JString &match) |
Compare type including star notation. | |
JString | getID () |
Get a copy of ID. | |
Reference * | getInReplyTo () |
Get a copy of in-reply-to. | |
JString | getFrom () |
Get a copy of from. | |
JString | getTo () |
Get a copy of to. | |
JString | getCC () |
Get a copy of cc. | |
JString | getType () |
Get a copy of type. | |
JString | getContent () |
Get a copy of content. | |
JString | getOrigin () |
Get a copy of origin. | |
JString | getComment () |
Get the comment for the Message. | |
double | getPriority () |
Get the Message priority. | |
double | getTimeToLive () |
Get the Message priority. | |
JString | getLanguage () |
Get Message language. | |
JString | getStored () |
Get Message stored. | |
JTime | getTimestamp () |
Get Message creation time. | |
JTime | getPostedTime () |
Get Message posted time. | |
JTime | getReceivedTime () |
Get Message received time. | |
bool | setID (const JString &id) |
Set Message ID, autogenerated if not set. | |
bool | setInReplyTo (Message *msg) |
Set in-reply-to. | |
bool | setInReplyTo (Reference *ref) |
bool | setFrom (const JString &frm) |
Set from. | |
bool | setTo (const JString &t) |
Set to. | |
bool | setCC (const JString &cc) |
Set cc. | |
bool | setType (const JString &t) |
Set type. | |
bool | setContent (const JString &cont, const JString &language) |
Set content and language. | |
bool | setContentNoParse (const JString &cont, const JString &language) |
Set content and language without parsing XML. | |
bool | setOrigin (const JString &orig) |
Set origin. | |
bool | setComment (const JString &str) |
Set human readable comment field. | |
bool | setPriority (double val) |
Set Message priority. | |
bool | setTimeToLive (double val) |
Set Message timeToLive. | |
bool | setLanguage (const JString &language) |
Set Message language. | |
bool | setStored (const JString &stored) |
Set Message stored. | |
bool | setTimestamp (const JTime &t) |
Set Message creation time. | |
bool | setPostedTime (const JTime &t) |
Set Message posted time. | |
bool | setReceivedTime (const JTime &t) |
Set Message received time. | |
Public Attributes | |
Dictionary * | auxDict |
Dictionary of generic text entries. | |
ObjectDictionary * | timeDict |
Dictionary of Timestamps. | |
ObjectDictionary * | history |
Other Messages in the past, id = timestamp. | |
Object * | object |
Collection * | htmlCol |
Which entries to print in HTML view. | |
JString | from |
JString | to |
JString | type |
JString | id |
JString | cc |
JString | origin |
JString | comment |
double | priority |
double | timeToLive |
JString | stored |
Reference * | inReplyTo |
JString | isResponse |
JString | noreply |
JTime | postedTime |
JTime | receivedTime |
JString | language |
JString | content |
ObjectCollection * | attachedMsgs |
Definition at line 64 of file Message.h.
cmlabs::Message::Message | ( | ) |
cmlabs::Message::Message | ( | const JString & | xml | ) |
cmlabs::Message::Message | ( | XMLNode * | node | ) |
cmlabs::Message::Message | ( | const Message & | msg | ) |
cmlabs::Message::~Message | ( | ) |
Definition at line 277 of file Message.cpp.
bool cmlabs::Message::init | ( | ) |
Definition at line 320 of file Message.cpp.
bool cmlabs::Message::unitTest | ( | ) | [virtual] |
Object * cmlabs::Message::clone | ( | ) | const [virtual] |
Message * cmlabs::Message::shallowClone | ( | ) | const |
Definition at line 348 of file Message.cpp.
Message * cmlabs::Message::tinyClone | ( | ) | const |
Definition at line 324 of file Message.cpp.
Definition at line 142 of file Message.cpp.
bool cmlabs::Message::equals | ( | const Object * | o2 | ) | const [virtual] |
int cmlabs::Message::compare | ( | const Object * | o2 | ) | const [virtual] |
bool cmlabs::Message::fromXML | ( | XMLNode * | xmlNode | ) | [virtual] |
Read XML node into this Message...
Reimplemented from cmlabs::Object.
Definition at line 445 of file Message.cpp.
bool cmlabs::Message::fromXML | ( | const JString & | xml | ) | [virtual] |
Read XML node into this Message...
Reimplemented from cmlabs::Object.
Definition at line 435 of file Message.cpp.
JString cmlabs::Message::toXML | ( | ) | [virtual] |
Convert Message to XML...
Reimplemented from cmlabs::Object.
Definition at line 536 of file Message.cpp.
JString cmlabs::Message::print | ( | ) | [virtual] |
Nicely formatted text print.
Reimplemented from cmlabs::Object.
Definition at line 771 of file Message.cpp.
JString cmlabs::Message::printShort | ( | ) |
unsigned long cmlabs::Message::getPayloadSize | ( | ) | const [virtual] |
Get total size of payload.
Reimplemented from cmlabs::Object.
Definition at line 1215 of file Message.cpp.
long cmlabs::Message::getBinarySize | ( | int | chunk | ) | [virtual] |
Get the size of binary data chunk, -1 for all chunks.
Get the size of any binary data.
Reimplemented from cmlabs::Object.
Definition at line 1235 of file Message.cpp.
int cmlabs::Message::getBinaryChunkCount | ( | ) | [virtual] |
Get the number of data chunks.
Reimplemented from cmlabs::Object.
Definition at line 1242 of file Message.cpp.
long cmlabs::Message::toBinaryBuffer | ( | int | chunk, | |
char * | buffer, | |||
int | maxlen | |||
) | [virtual] |
Write binary data to buffer at chunk number 'chunk'.
Get a pointer to the binary data at chunk number 'chunk'.
Reimplemented from cmlabs::Object.
Definition at line 1249 of file Message.cpp.
bool cmlabs::Message::fromBinaryBuffer | ( | int | chunk, | |
char * | buffer, | |||
long | len | |||
) | [virtual] |
Set the data after separate reception.
Reimplemented from cmlabs::Object.
Definition at line 1256 of file Message.cpp.
ObjectDictionary * cmlabs::Message::getAllHistory | ( | ) |
ObjectCollection * cmlabs::Message::getHistoryFromAuthor | ( | const JString & | author | ) |
Get the History collection in the Message from an Author.
Definition at line 962 of file Message.cpp.
bool cmlabs::Message::deleteHistory | ( | ) |
bool cmlabs::Message::setObject | ( | Object * | obj | ) |
Object * cmlabs::Message::getObject | ( | ) |
JString cmlabs::Message::getObjectType | ( | ) |
Get the attached Object type (Class name) for the Message.
Definition at line 998 of file Message.cpp.
bool cmlabs::Message::deleteObject | ( | ) |
Object * cmlabs::Message::takeObject | ( | ) |
bool cmlabs::Message::doesTypeMatch | ( | const JString & | match | ) |
JString cmlabs::Message::getID | ( | ) |
Reference * cmlabs::Message::getInReplyTo | ( | ) |
JString cmlabs::Message::getFrom | ( | ) |
JString cmlabs::Message::getTo | ( | ) |
JString cmlabs::Message::getCC | ( | ) |
JString cmlabs::Message::getType | ( | ) |
JString cmlabs::Message::getContent | ( | ) |
JString cmlabs::Message::getOrigin | ( | ) |
JString cmlabs::Message::getComment | ( | ) |
double cmlabs::Message::getPriority | ( | ) |
double cmlabs::Message::getTimeToLive | ( | ) |
JString cmlabs::Message::getLanguage | ( | ) |
JString cmlabs::Message::getStored | ( | ) |
JTime cmlabs::Message::getTimestamp | ( | ) |
JTime cmlabs::Message::getPostedTime | ( | ) |
JTime cmlabs::Message::getReceivedTime | ( | ) |
bool cmlabs::Message::setID | ( | const JString & | id | ) |
bool cmlabs::Message::setInReplyTo | ( | Message * | msg | ) |
Set in-reply-to.
bool cmlabs::Message::setInReplyTo | ( | Reference * | ref | ) |
Definition at line 1112 of file Message.cpp.
bool cmlabs::Message::setFrom | ( | const JString & | frm | ) |
bool cmlabs::Message::setTo | ( | const JString & | t | ) |
bool cmlabs::Message::setCC | ( | const JString & | cc | ) |
bool cmlabs::Message::setType | ( | const JString & | t | ) |
bool cmlabs::Message::setOrigin | ( | const JString & | orig | ) |
bool cmlabs::Message::setComment | ( | const JString & | str | ) |
bool cmlabs::Message::setPriority | ( | double | val | ) |
bool cmlabs::Message::setTimeToLive | ( | double | val | ) |
bool cmlabs::Message::setLanguage | ( | const JString & | language | ) |
bool cmlabs::Message::setStored | ( | const JString & | stored | ) |
bool cmlabs::Message::setTimestamp | ( | const JTime & | t | ) |
bool cmlabs::Message::setPostedTime | ( | const JTime & | t | ) |
bool cmlabs::Message::setReceivedTime | ( | const JTime & | t | ) |
Dictionary of generic text entries.
Dictionary of generic text entries
double cmlabs::Message::priority |
double cmlabs::Message::timeToLive |