cmlabs::Message Class Reference

#include <Message.h>

Inheritance diagram for cmlabs::Message:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::Message:

Collaboration graph
[legend]

List of all members.

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 ()
Objectclone () const
MessageshallowClone () const
MessagetinyClone () const
Messageoperator= (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.
ObjectDictionarygetAllHistory ()
 Get the History collection in the Message.
ObjectCollectiongetHistoryFromAuthor (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.
ObjectgetObject ()
 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.
ObjecttakeObject ()
 Takes away the attached object.
bool doesTypeMatch (const JString &match)
 Compare type including star notation.
JString getID ()
 Get a copy of ID.
ReferencegetInReplyTo ()
 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

DictionaryauxDict
 Dictionary of generic text entries.
ObjectDictionarytimeDict
 Dictionary of Timestamps.
ObjectDictionaryhistory
 Other Messages in the past, id = timestamp.
Objectobject
CollectionhtmlCol
 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
ReferenceinReplyTo
JString isResponse
JString noreply
JTime postedTime
JTime receivedTime
JString language
JString content
ObjectCollectionattachedMsgs


Detailed Description

Definition at line 64 of file Message.h.


Constructor & Destructor Documentation

cmlabs::Message::Message (  ) 

to create empty Message

Definition at line 37 of file Message.cpp.

cmlabs::Message::Message ( const JString xml  ) 

to create from XML

Definition at line 52 of file Message.cpp.

cmlabs::Message::Message ( XMLNode node  ) 

to create from XML node

Definition at line 69 of file Message.cpp.

cmlabs::Message::Message ( const Message msg  ) 

to create from other message

Definition at line 86 of file Message.cpp.

cmlabs::Message::Message ( const JString from,
const JString to,
const JString type 
)

Create from values.

Definition at line 202 of file Message.cpp.

cmlabs::Message::Message ( const JString from,
const JString to,
const JString type,
const JString content,
const JString language 
)

Create from values with content and language.

Definition at line 226 of file Message.cpp.

cmlabs::Message::Message ( const JString from,
const JString to,
const JString type,
Object obj 
)

Create from values with object.

Definition at line 252 of file Message.cpp.

cmlabs::Message::~Message (  ) 

Definition at line 277 of file Message.cpp.


Member Function Documentation

bool cmlabs::Message::init (  ) 

Definition at line 320 of file Message.cpp.

bool cmlabs::Message::unitTest (  )  [virtual]

Reimplemented from cmlabs::Object.

Definition at line 1267 of file Message.cpp.

Object * cmlabs::Message::clone (  )  const [virtual]

Implements cmlabs::Object.

Definition at line 392 of file Message.cpp.

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.

Message & cmlabs::Message::operator= ( const Message msg  ) 

Definition at line 142 of file Message.cpp.

bool cmlabs::Message::equals ( const Object o2  )  const [virtual]

Reimplemented from cmlabs::Object.

Definition at line 301 of file Message.cpp.

int cmlabs::Message::compare ( const Object o2  )  const [virtual]

Reimplemented from cmlabs::Object.

Definition at line 307 of file Message.cpp.

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::toHTMLTable ( const JString tags = ""  ) 

Nicely formatted HTML without.

Definition at line 660 of file Message.cpp.

JString cmlabs::Message::getHistoryHTML ( const JString urlformat  ) 

Nicely formatted HTML for History field

.

Definition at line 629 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 (  ) 

One line text print.

Definition at line 786 of file Message.cpp.

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.

bool cmlabs::Message::set ( const JString name,
const JString value 
)

Set a field in the Message.

Definition at line 801 of file Message.cpp.

JString cmlabs::Message::get ( const JString name  ) 

Get a field in the Message.

Definition at line 845 of file Message.cpp.

bool cmlabs::Message::setAux ( const JString name,
const JString value 
)

Set an aux field in the Message.

Definition at line 885 of file Message.cpp.

JString cmlabs::Message::getAux ( const JString name  ) 

Get an aux field in the Message.

Definition at line 892 of file Message.cpp.

bool cmlabs::Message::setTime ( const JString name,
const JTime t 
)

Set a JTime field in the Message.

Definition at line 900 of file Message.cpp.

JTime cmlabs::Message::getTime ( const JString name  ) 

Get a JTime field in the Message.

Definition at line 918 of file Message.cpp.

bool cmlabs::Message::addReferenceToHistory ( Message msg,
const JString author 
)

Add a Message to the History field in the Message.

Definition at line 936 of file Message.cpp.

bool cmlabs::Message::addReferenceToHistory ( Reference ref,
const JString author 
)

Add a Reference to the History field in the Message.

Definition at line 942 of file Message.cpp.

ObjectDictionary * cmlabs::Message::getAllHistory (  ) 

Get the History collection in the Message.

Definition at line 956 of file Message.cpp.

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 (  ) 

Delete all History.

Definition at line 968 of file Message.cpp.

bool cmlabs::Message::setObject ( Object obj  ) 

Set the attached Object for the Message.

Definition at line 986 of file Message.cpp.

Object * cmlabs::Message::getObject (  ) 

Get the attached Object for the Message or NULL.

Definition at line 994 of file Message.cpp.

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 (  ) 

Delete the attached Object; NB: Will destroy object.

Definition at line 1005 of file Message.cpp.

Object * cmlabs::Message::takeObject (  ) 

Takes away the attached object.

Definition at line 1013 of file Message.cpp.

bool cmlabs::Message::doesTypeMatch ( const JString match  ) 

Compare type including star notation.

Definition at line 1021 of file Message.cpp.

JString cmlabs::Message::getID (  ) 

Get a copy of ID.

Definition at line 1030 of file Message.cpp.

Reference * cmlabs::Message::getInReplyTo (  ) 

Get a copy of in-reply-to.

Definition at line 1034 of file Message.cpp.

JString cmlabs::Message::getFrom (  ) 

Get a copy of from.

Definition at line 1038 of file Message.cpp.

JString cmlabs::Message::getTo (  ) 

Get a copy of to.

Definition at line 1042 of file Message.cpp.

JString cmlabs::Message::getCC (  ) 

Get a copy of cc.

Definition at line 1046 of file Message.cpp.

JString cmlabs::Message::getType (  ) 

Get a copy of type.

Definition at line 1050 of file Message.cpp.

JString cmlabs::Message::getContent (  ) 

Get a copy of content.

Definition at line 1054 of file Message.cpp.

JString cmlabs::Message::getOrigin (  ) 

Get a copy of origin.

Definition at line 1065 of file Message.cpp.

JString cmlabs::Message::getComment (  ) 

Get the comment for the Message.

Definition at line 1069 of file Message.cpp.

double cmlabs::Message::getPriority (  ) 

Get the Message priority.

Definition at line 1073 of file Message.cpp.

double cmlabs::Message::getTimeToLive (  ) 

Get the Message priority.

Definition at line 1077 of file Message.cpp.

JString cmlabs::Message::getLanguage (  ) 

Get Message language.

Definition at line 1081 of file Message.cpp.

JString cmlabs::Message::getStored (  ) 

Get Message stored.

Definition at line 1085 of file Message.cpp.

JTime cmlabs::Message::getTimestamp (  ) 

Get Message creation time.

Definition at line 1090 of file Message.cpp.

JTime cmlabs::Message::getPostedTime (  ) 

Get Message posted time.

Definition at line 1094 of file Message.cpp.

JTime cmlabs::Message::getReceivedTime (  ) 

Get Message received time.

Definition at line 1098 of file Message.cpp.

bool cmlabs::Message::setID ( const JString id  ) 

Set Message ID, autogenerated if not set.

Definition at line 1107 of file Message.cpp.

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  ) 

Set from.

Definition at line 1118 of file Message.cpp.

bool cmlabs::Message::setTo ( const JString t  ) 

Set to.

Definition at line 1123 of file Message.cpp.

bool cmlabs::Message::setCC ( const JString cc  ) 

Set cc.

Definition at line 1128 of file Message.cpp.

bool cmlabs::Message::setType ( const JString t  ) 

Set type.

Definition at line 1133 of file Message.cpp.

bool cmlabs::Message::setContent ( const JString cont,
const JString language 
)

Set content and language.

Definition at line 1147 of file Message.cpp.

bool cmlabs::Message::setContentNoParse ( const JString cont,
const JString language 
)

Set content and language without parsing XML.

Definition at line 1138 of file Message.cpp.

bool cmlabs::Message::setOrigin ( const JString orig  ) 

Set origin.

Definition at line 1166 of file Message.cpp.

bool cmlabs::Message::setComment ( const JString str  ) 

Set human readable comment field.

Definition at line 1171 of file Message.cpp.

bool cmlabs::Message::setPriority ( double  val  ) 

Set Message priority.

Definition at line 1176 of file Message.cpp.

bool cmlabs::Message::setTimeToLive ( double  val  ) 

Set Message timeToLive.

Definition at line 1181 of file Message.cpp.

bool cmlabs::Message::setLanguage ( const JString language  ) 

Set Message language.

Definition at line 1186 of file Message.cpp.

bool cmlabs::Message::setStored ( const JString stored  ) 

Set Message stored.

Definition at line 1191 of file Message.cpp.

bool cmlabs::Message::setTimestamp ( const JTime t  ) 

Set Message creation time.

Definition at line 1197 of file Message.cpp.

bool cmlabs::Message::setPostedTime ( const JTime t  ) 

Set Message posted time.

Definition at line 1202 of file Message.cpp.

bool cmlabs::Message::setReceivedTime ( const JTime t  ) 

Set Message received time.

Definition at line 1207 of file Message.cpp.


Member Data Documentation

Dictionary of generic text entries.

Dictionary of generic text entries

Definition at line 273 of file Message.h.

Dictionary of Timestamps.

Definition at line 275 of file Message.h.

Other Messages in the past, id = timestamp.

Definition at line 277 of file Message.h.

Definition at line 279 of file Message.h.

Which entries to print in HTML view.

Definition at line 282 of file Message.h.

Definition at line 285 of file Message.h.

Definition at line 286 of file Message.h.

Definition at line 287 of file Message.h.

Definition at line 288 of file Message.h.

Definition at line 289 of file Message.h.

Definition at line 290 of file Message.h.

Definition at line 291 of file Message.h.

Definition at line 292 of file Message.h.

Definition at line 293 of file Message.h.

Definition at line 294 of file Message.h.

Definition at line 295 of file Message.h.

Definition at line 296 of file Message.h.

Definition at line 297 of file Message.h.

Definition at line 299 of file Message.h.

Definition at line 300 of file Message.h.

Definition at line 303 of file Message.h.

Definition at line 304 of file Message.h.

Definition at line 306 of file Message.h.


The documentation for this class was generated from the following files:

Generated on Tue Jul 7 16:23:23 2009 for CoreLibrary by  doxygen 1.5.6