Authors
- Generated by root
-
Message : TRXMLNullHandler
- Declared in:
- Message.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: (NSString*)_body
for: (
JID*)_recipient
withSubject: (NSString*)_subject
type: (
message_type_t)_type;
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.
- (NSAttributedString*)
HTMLBody;
Returns the rich text version of the body.
- (NSString*)
body;
Returns the (plain text) body of the message.
- (NSComparisonResult)
compareByTimestamp: (
Message*)_other;
Compare messages to determine their order of
sending.
- (
JID*)
correspondent;
Returns the JID of the sender (for incoming
messages) or the recipient (for outgoing
messages).
- (BOOL)
in;
Returns YES
for incoming messages,
NO
for outgoing.
- (id)
initWithBody: (NSString*)_body
for: (
JID*)_recipient
withSubject: (NSString*)_subject
type: (
message_type_t)_type;
Initialise a new message.
- (NSString*)
subject;
Returns the subject of the message.
- (
Timestamp*)
timestamp;
Returns the oldest timestamp associated with this
message (e.g. offline storage). May be broken
(TEST).
- (TRXMLNode*)
xml;
Returns the XML representation of the node. Should
be deprecated in favour of a method returning the XML
string directly to hide the TRXML dependency from
users.
Instance Variables for Message Class
@protected NSString* body;
Description forthcoming.
@protected JID* correspondent;
Description forthcoming.
@protected MessageDirection direction;
Description forthcoming.
@protected NSAttributedString* html;
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.