#include <message.hh>
Inheritance diagram for jabberoo::Message:
Public Types | |
enum | Type { mtNormal, mtError, mtChat, mtGroupchat, mtHeadline } |
Message type. More... | |
Public Member Functions | |
Message (const judo::Element &t) | |
Construct a message based upon the given judo::Element. | |
Message (const std::string &jid, const std::string &body, Type mtype=mtNormal) | |
Construct a message to a JabberID with a body. | |
void | setBody (const std::string &body) |
Sets the body of the message. | |
void | setSubject (const std::string &subject) |
Sets the subject of the message. | |
void | setThread (const std::string &thread) |
Sets the message thread. | |
void | setType (Message::Type mtype) |
Sets the message type. | |
void | requestDelivered () |
Request the delivered message event. | |
void | requestDisplayed () |
Request the displayed message event. | |
void | requestComposing () |
Request the composing message event. | |
const std::string | getBody () const |
Get the message body. | |
const std::string | getSubject () const |
Get the message subject. | |
const std::string | getThread () const |
Get the message thread. | |
Type | getType () const |
Get the Message::Type. | |
const std::string | getDateTime (const std::string &format="") const |
Get the date and time the message was sent with a given format. | |
Message | replyTo (const std::string &body) const |
Create a message in response to this message. | |
Message | Message::delivered () const |
Create a message event stating that this Message has been delivered. | |
Message | Message::displayed () const |
Create a message event stating that this Message has been displayed. | |
Message | Message::composing () const |
Create a message event stating that this Message is being replied to. | |
Static Public Member Functions | |
void | setDateTimeFormat (const std::string &format) |
Sets the date and time format.AM_CONDITIONAL(DEBUG, test x$debug = xyes) test=no AM_CONDITIONAL(TEST, test x$test = xyes). | |
const std::string & | getDateTimeFormat () |
Get the date and time format. | |
Static Public Attributes | |
const unsigned int | numTypes = 5 |
Number of message types. |
This class implements most of the methods needed to deal with a Jabber Message.
Definition at line 46 of file message.hh.
|
Message type. This is a hint to clients as to how the message should be displayed.
Definition at line 61 of file message.hh. |
|
Construct a message based upon the given judo::Element.
Definition at line 39 of file jabberoo-message.cpp. References jabberoo::Packet::addX(), jabberoo::Packet::findX(), getDateTime(), and jabberoo::Packet::getFrom(). Referenced by replyTo(). |
|
Construct a message to a JabberID with a body. Note that setting a body here is oh-so-slightly faster than calling setBody(), since setBody() checks for a pre-existing body element.
Definition at line 90 of file jabberoo-message.cpp. References judo::Element::addElement(), jabberoo::Packet::setTo(), and setType(). |
|
Get the message body.
Definition at line 199 of file jabberoo-message.cpp. References judo::Element::getChildCData(). |
|
Get the date and time the message was sent with a given format.
Definition at line 220 of file jabberoo-message.cpp. Referenced by Message(). |
|
Get the date and time format.
Definition at line 344 of file jabberoo-message.cpp. |
|
Get the message subject.
Definition at line 204 of file jabberoo-message.cpp. References judo::Element::getChildCData(). |
|
Get the message thread.
Definition at line 209 of file jabberoo-message.cpp. References judo::Element::getChildCData(). |
|
Get the Message::Type.
Definition at line 214 of file jabberoo-message.cpp. |
|
Create a message event stating that this Message is being replied to. It is up to the client to determine whether this message should actually be generated and sent.
|
|
Create a message event stating that this Message has been delivered. It is up to the client to determine whether this message should actually be generated and sent.
|
|
Create a message event stating that this Message has been displayed. It is up to the client to determine whether this message should actually be generated and sent.
|
|
Create a message in response to this message.
Definition at line 251 of file jabberoo-message.cpp. References Message(). |
|
Request the composing message event. If the receiving client supports message events, a message with a message:x:event containing a composing element will be returned when the receiving user begins composing a reply. Definition at line 185 of file jabberoo-message.cpp. References jabberoo::Packet::addX(), and jabberoo::Packet::findX(). |
|
Request the delivered message event. If the receiving client supports message events, a message with a message:x:event containing a delivered element will be returned once this message has been delivered. Definition at line 157 of file jabberoo-message.cpp. References jabberoo::Packet::addX(), and jabberoo::Packet::findX(). |
|
Request the displayed message event. If the receiving client supports message events, a message with a message:x:event containing a displayed element will be returned once this message has been displayed. Definition at line 171 of file jabberoo-message.cpp. References jabberoo::Packet::addX(), and jabberoo::Packet::findX(). |
|
Sets the body of the message.
Definition at line 100 of file jabberoo-message.cpp. References judo::Element::addElement(), and judo::Element::findElement(). |
|
Sets the date and time format.AM_CONDITIONAL(DEBUG, test x$debug = xyes) test=no AM_CONDITIONAL(TEST, test x$test = xyes).
Definition at line 339 of file jabberoo-message.cpp. |
|
Sets the subject of the message.
Definition at line 117 of file jabberoo-message.cpp. References judo::Element::addElement(), and judo::Element::findElement(). |
|
Sets the message thread. The message thread is used by clients to relate messages to one another.
Definition at line 134 of file jabberoo-message.cpp. References judo::Element::addElement(), and judo::Element::findElement(). |
|
Sets the message type.
Definition at line 151 of file jabberoo-message.cpp. References judo::Element::putAttrib(). Referenced by Message(). |
|
Number of message types.
Definition at line 37 of file jabberoo-message.cpp. |