Authors
- Generated by builder
-
- Declared in:
- XMPPMessage.h
The Message class represents a message stanza, one of the
three types of XML stanza embodying discrete elements
within an XMPP connection.
Instance Variables
Method summary
+ (id)
messageWithBody: (id)aBody
for: (
JID*)aRecipient
withSubject: (
NSString*)aSubject
type: (
message_type_t)aType;
Constructs a new (outgoing) message, ready for
sending. The subject is usually nil
for chat messages. The type should be one of
MESSAGE_TYPE_{CHAT,ERROR,
MESSAGE,GROUPCHAT}. Only those of
MESSAGE_TYPE_MESSAGE should
(generally) include a subject.
- (void)
beginWritingToXMLWriter: (ETXMLWriter*)xmlWriter;
Only write the beginning of the message but don't send
the closing tag.
- (
NSString*)
body;
Returns the (plain text) body of the message.
- (
JID*)
correspondent;
Returns the JID of the sender (for incoming
messages) or the recipient (for outgoing
messages).
- (
XMPPError*)
error;
Returns the associated error, if one exists.
- (void)
finishWritingToXMLWriter: (ETXMLWriter*)xmlWriter;
Finish writing the message by sending the closing
tag.
- (BOOL)
in;
Returns YES
for incoming messages,
NO
for outgoing.
- (id)
initWithBody: (id)aBody
for: (
JID*)aRecipient
withSubject: (
NSString*)aSubject
type: (
message_type_t)aType;
Initialise a new message.
- (void)
setShouldDisplay: (BOOL)aFlag;
Sets a flag indicating that this message is destined
for display.
- (BOOL)
shouldDisplay;
Indicates whether the message should be
displayed. Messages of supported types where the
plain text and HTML elements are purely for fall-back
support should return NO
here.
- (
NSString*)
subject;
Returns the subject of the message.
- (
XMPPTimestamp*)
timestamp;
Returns the oldest timestamp associated with this
message (e.g. offline storage). May be broken
(TEST).
- (void)
writeToXMLWriter: (ETXMLWriter*)xmlWriter;
Writes the message in XML form to the specified XML
writer.
Instance Variables for XMPPMessage Class
@protected NSString* body;
Description forthcoming.
@protected JID* correspondent;
Description forthcoming.
@protected MessageDirection direction;
Description forthcoming.
@protected XMPPError* error;
Description forthcoming.
@protected NSAttributedString* html;
Description forthcoming.
@protected BOOL shouldDisplay;
Description forthcoming.
@protected NSString* subject;
Description forthcoming.
@protected NSMutableArray* timestamps;
Description forthcoming.
@protected message_type_t type;
Description forthcoming.
@protected NSMutableDictionary* unknownAttributes;
Description forthcoming.
typedef enum ... MessageDirection;
Description forthcoming.
typedef enum ... message_type_t;
Description forthcoming.