XMPPRoster class documentation

Authors

Generated by builder

Contents -

  1. Software documentation for the XMPPRoster class
  2. Software documentation for the RosterDelegate protocol

Software documentation for the XMPPRoster class

XMPPRoster : NSObject

Declared in:
XMPPRoster.h
Conforms to:
PresenceHandler
XMPPInfoQueryStanzaHandler
The Roster class implements the roster. At the basic level, the roster is simply a collection of people. This class maintains the list, and allows new people to be added and removed.

Instance Variables

Method summary

addRosterFromQuery: 

- (void) addRosterFromQuery: (XMPPInfoQueryStanza*)rosterQuery;
Add items to the roster from an iq with type result containing one or more roster items.

authorise: 

- (void) authorise: (JID*)aJid;
Authorises the specified JID to add the user to their roster.

connection 

- (id) connection;
Returns the connection used by this roster.

delegate 

- (id) delegate;
Returns the roster's delegate.

disco 

- (XMPPServiceDiscovery*) disco;
Returns the service discovery interface.

dispatcher 

- (XMPPDispatcher*) dispatcher;
Returns the dispatcher used by this roster.

groupForIndex: 

- (XMPPRosterGroup*) groupForIndex: (int)anIndex;
Returns the group at a given index.

groupForIndex: ignoringPeopleLessOnlineThan: 

- (XMPPRosterGroup*) groupForIndex: (int)anIndex ignoringPeopleLessOnlineThan: (unsigned int)onlineState;
Returns the group at a specified index when only groups containing people more online than the given onlineState value are counted.

groupNamed: 

- (XMPPRosterGroup*) groupNamed: (NSString*)aGroupName;
Returns the group for a given name.

initWithAccount: 

- (XMPPRoster*) initWithAccount: (id)anAccount;
Initialise a roster for a specified account.

numberOfGroups 

- (NSUInteger) numberOfGroups;
Returns the number of groups.

numberOfGroupsContainingPeopleMoreOnlineThan: 

- (int) numberOfGroupsContainingPeopleMoreOnlineThan: (unsigned int)onlineState;
Returns the number of groups when only groups containing people more online than the given onlineState value are counted.

offline 

- (void) offline;
Takes the roster offline. This sets the presence of all identities to unknown (since we can not be certain of any online states while we are not on the XMPP network).

personForJID: 

- (XMPPPerson*) personForJID: (JID*)aJid;
Returns a person for a given JID if one exists in the roster.

setDelegate: 

- (void) setDelegate: (id<RosterDelegate,NSObject>)aDelegate;
Sets the delegate.

setGroup: forIdentity: 

- (void) setGroup: (NSString*)aGroup forIdentity: (XMPPIdentity*)anIdentity;
Moves an identity to a new group. This will cause the identity to be assigned to a new person.

setInitialStatus: withMessage: 

- (void) setInitialStatus: (unsigned char)aStatus withMessage: (NSString*)aMessage;
Sets the initial presence. This will be the presence when connecting is complete. It would probably be more sensibly handled in XMPPConnection or XMPPAccount. It is currently here so that the client can set itself as online once the latest copy of the roster has been received.

setName: group: forIdentity: 

- (void) setName: (NSString*)aName group: (NSString*)aGroup forIdentity: (XMPPIdentity*)anIdentity;
Renames an identity. This will cause the identity to be assigned to a new person.

subscribe: withName: inGroup: 

- (void) subscribe: (JID*)aJid withName: (NSString*)aName inGroup: (NSString*)aGroup;
Adds the specified JID to the roster, with the given name in the given group.

unauthorise: 

- (void) unauthorise: (JID*)aJid;
Remove the authorisation granted to the specified JID. This JID will no longer receive presence stanzas from you.

unsubscribe: 

- (void) unsubscribe: (JID*)aJid;
Removes the specified JID from the roster.

update: 

- (void) update: (id)anObject;
Triggers an update of the specified object in the roster. This would be better handled by notifications.



Instance Variables for XMPPRoster Class

account

@protected id account;
Description forthcoming.

connected

@protected BOOL connected;
Description forthcoming.

connection

@protected id connection;
Description forthcoming.

delegate

@protected id delegate;
Description forthcoming.

disco

@protected XMPPServiceDiscovery* disco;
Description forthcoming.

dispatcher

@protected XMPPDispatcher* dispatcher;
Description forthcoming.

groups

@protected NSMutableArray* groups;
Description forthcoming.

groupsByName

@protected NSMutableDictionary* groupsByName;
Description forthcoming.

initialMessage

@protected NSString* initialMessage;
Description forthcoming.

initialStatus

@protected unsigned char initialStatus;
Description forthcoming.

peopleByJID

@protected NSMutableDictionary* peopleByJID;
Description forthcoming.

queriedServers

@protected NSMutableSet* queriedServers;
Description forthcoming.




Software documentation for the RosterDelegate protocol

RosterDelegate

Declared in:
XMPPRoster.h
Protocol to be implemented by a roster UI component.
Method summary

update: 

- (void) update: (id)anObject;
Update the display of the specified object.