XMPPPresence class documentation

Authors

Generated by builder

Contents -

  1. Software documentation for the XMPPPresence class
  2. Software documentation for the XMPPPresenceDisplay protocol
  3. XMPPPresence types
  4. XMPPPresence macros
  5. XMPPPresence variables

Software documentation for the XMPPPresence class

XMPPPresence : XMPPStanza

Declared in:
XMPPPresence.h
The XMPPPresence class represents an XMPP presence stanza. Because the XMPP spec is now horribly bloated, and the designers didn't think to include a more generic broadcast stanza form, presence is now used for a lot more things than presence information.

Instance Variables

Method summary

displayStringForPresence: 

+ (NSString*) displayStringForPresence: (unsigned char)_presence;
Returns the (currently English; should be internationalised) display string for a given presence. For example, will return @"Online" when passed PRESENCE_ONLINE.

presenceForXMPPString: 

+ (unsigned char) presenceForXMPPString: (NSString*)_presence;
Returns the online state represented by a given XMPP string.

xmppStringForPresence: 

+ (NSString*) xmppStringForPresence: (unsigned char)_presence;
Returns the string used by XMPP to represent a given online state.

caps 

- (NSString*) caps;
Returns the XEP-0115 entity capabilities ver string.

compare: 

- (NSComparisonResult) compare: (XMPPPresence*)_otherPresence;
Compares two presence stanzas by their online state.

initWithJID: 

- (id) initWithJID: (JID*)_jid;
Create a new presence stanza for a specified JID.

jid 

- (JID*) jid;
Returns the JID of the sender.

nickname 

- (NSString*) nickname;
Returns the preferred nickname set by the remote user.

priority 

- (int) priority;
Returns the priority set for the stanza.

show 

- (unsigned char) show;
Returns the online status. These are symbolic constants and are ordered such that A being less than B means A is more online than B.

status 

- (NSString*) status;
Returns the status message.

type 

- (PresenceType) type;
Returns the presence type as described above.



Instance Variables for XMPPPresence Class

caps

@protected NSString* caps;
Description forthcoming.

from

@protected JID* from;
Description forthcoming.

message

@protected NSString* message;
Description forthcoming.

nickname

@protected NSString* nickname;
Description forthcoming.

onlineStatus

@protected unsigned char onlineStatus;
Description forthcoming.

priority

@protected int priority;
Description forthcoming.

type

@protected PresenceType type;
Description forthcoming.




Software documentation for the XMPPPresenceDisplay protocol

XMPPPresenceDisplay

Declared in:
XMPPPresence.h
Protocol implemented by any UI component with a presence display. This should probably be replaced with a notification based system.
Method summary

setPresence: withMessage: 

- (void) setPresence: (unsigned char)_status withMessage: (NSString*)_message;
Description forthcoming.

XMPPPresence types

PresenceType

typedef enum ... PresenceType;
Types of presence stanzas. The first two represent normal presence information while the last four relate to manipulation of the roster.

XMPPPresence macros

PRESENCE_AWAY

PRESENCE_AWAY
Constant representing an 'away' online state.

PRESENCE_CHAT

PRESENCE_CHAT
Constant representing a 'free for chat' online state.

PRESENCE_DND

PRESENCE_DND
Constant representing a 'do not disturb' online state.

PRESENCE_OFFLINE

PRESENCE_OFFLINE
Constant representing an 'offline' online state.

PRESENCE_ONLINE

PRESENCE_ONLINE
Constant representing an 'online' online state.

PRESENCE_UNKNOWN

PRESENCE_UNKNOWN
Constant representing an unknown online state.

PRESENCE_XA

PRESENCE_XA
Constant representing an 'extended away' online state.

XMPPPresence variables

PRESENCE_ICONS

int PRESENCE_ICONS;
Unicode characters representing various online states