XMPPMessage class documentation

Authors

Generated by builder

Contents -

  1. Software documentation for the XMPPMessage class
  2. XMPPMessage types

Software documentation for the XMPPMessage class

XMPPMessage : XMPPStanza

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

messageWithBody: for: withSubject: type: 

+ (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.

HTMLBody 

- (NSAttributedString*) HTMLBody;
Returns the rich text version of the body.

beginWritingToXMLWriter: 

- (void) beginWritingToXMLWriter: (ETXMLWriter*)xmlWriter;
Only write the beginning of the message but don't send the closing tag.

body 

- (NSString*) body;
Returns the (plain text) body of the message.

compareByTimestamp: 

- (NSComparisonResult) compareByTimestamp: (XMPPMessage*)_other;
Compare messages to determine their order of sending.

correspondent 

- (JID*) correspondent;
Returns the JID of the sender (for incoming messages) or the recipient (for outgoing messages).

error 

- (XMPPError*) error;
Returns the associated error, if one exists.

finishWritingToXMLWriter: 

- (void) finishWritingToXMLWriter: (ETXMLWriter*)xmlWriter;
Finish writing the message by sending the closing tag.

in 

- (BOOL) in;
Returns YES for incoming messages, NO for outgoing.

initWithBody: for: withSubject: type: 

- (id) initWithBody: (id)aBody for: (JID*)aRecipient withSubject: (NSString*)aSubject type: (message_type_t)aType;
Initialise a new message.

setShouldDisplay: 

- (void) setShouldDisplay: (BOOL)aFlag;
Sets a flag indicating that this message is destined for display.

shouldDisplay 

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

subject 

- (NSString*) subject;
Returns the subject of the message.

timestamp 

- (XMPPTimestamp*) timestamp;
Returns the oldest timestamp associated with this message (e.g. offline storage). May be broken (TEST).

type 

- (message_type_t) type;
Returns the type of the message stanza.

writeToXMLWriter: 

- (void) writeToXMLWriter: (ETXMLWriter*)xmlWriter;
Writes the message in XML form to the specified XML writer.



Instance Variables for XMPPMessage Class

body

@protected NSString* body;
Description forthcoming.

correspondent

@protected JID* correspondent;
Description forthcoming.

direction

@protected MessageDirection direction;
Description forthcoming.

error

@protected XMPPError* error;
Description forthcoming.

html

@protected NSAttributedString* html;
Description forthcoming.

shouldDisplay

@protected BOOL shouldDisplay;
Description forthcoming.

subject

@protected NSString* subject;
Description forthcoming.

timestamps

@protected NSMutableArray* timestamps;
Description forthcoming.

type

@protected message_type_t type;
Description forthcoming.

unknownAttributes

@protected NSMutableDictionary* unknownAttributes;
Description forthcoming.




XMPPMessage types

MessageDirection

typedef enum ... MessageDirection;
Description forthcoming.

message_type_t

typedef enum ... message_type_t;
Description forthcoming.