#include <message.h>
Detailed Description
An abstraction of a message stanza.
- Author
- Vincent Thomasset
-
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
- Since
- 1.0
Definition at line 33 of file message.h.
Member Enumeration Documentation
Describes the different valid message types.
- Enumerator:
Chat |
A chat message.
|
Error |
An error message.
|
Groupchat |
A groupchat message.
|
Headline |
A headline message.
|
Normal |
A normal message.
|
Invalid |
The message stanza is invalid.
|
Definition at line 44 of file message.h.
Constructor & Destructor Documentation
Creates a Message.
- Parameters
-
type | The message type. |
to | The intended receiver. |
body | The message's body text. |
subject | The message's optional subject. |
thread | The message's optional thread ID. |
xmllang | An optional xml:lang for the message body. |
Definition at line 54 of file message.cpp.
Member Function Documentation
const std::string body |
( |
const std::string & |
lang = "default" | ) |
const |
|
inline |
Returns the message body for the given language if available. If the requested language is not available, the default body (without a xml:lang attribute) will be returned.
- Parameters
-
lang | The language identifier for the desired language. It must conform to section 2.12 of the XML specification and RFC 3066. If empty, the default body will be returned, if any. |
- Returns
- The message body.
Definition at line 87 of file message.h.
void setID |
( |
const std::string & |
id | ) |
|
|
inline |
Sets the message's ID. Optional.
- Parameters
-
Definition at line 122 of file message.h.
void setThread |
( |
const std::string & |
thread | ) |
|
|
inline |
Sets the thread ID.
- Parameters
-
Definition at line 116 of file message.h.
const std::string subject |
( |
const std::string & |
lang = "default" | ) |
const |
|
inline |
Returns the message subject for the given language if available. If the requested language is not available, the default subject (without a xml:lang attribute) will be returned.
- Parameters
-
lang | The language identifier for the desired language. It must conform to section 2.12 of the XML specification and RFC 3066. If empty, the default subject will be returned, if any. |
- Returns
- The message subject.
Definition at line 101 of file message.h.
Returns the message's type.
- Returns
- The message's type.
Definition at line 76 of file message.h.
Creates a Tag representation of the Stanza. The Tag is completely independent of the Stanza and will not be updated when the Stanza is modified.
- Returns
- A pointer to a Tag representation. It is the job of the
caller to delete the Tag.
Implements Stanza.
Definition at line 69 of file message.cpp.
const std::string& thread |
( |
| ) |
const |
|
inline |
Returns the thread ID of a message stanza.
- Returns
- The thread ID of a message stanza. Empty for non-message stanzas.
Definition at line 110 of file message.h.
The documentation for this class was generated from the following files: