Roster class documentation

Authors

Generated by root

Contents -

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

Software documentation for the Roster class

Roster : NSObject

Declared in:
Roster.h
Conforms to:
PresenceHandler
IqHandler
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: (Iq*)rosterQuery;
Add items to the roster from an iq with type result containing one or more roster items.

authorise: 

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

delegate 

- (id) delegate;
Description forthcoming.

groupForIndex: 

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

groupForIndex: ignoringPeopleLessOnlineThan: 

- (RosterGroup*) groupForIndex: (int)_index 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: 

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

initWithAccount: 

- (id) initWithAccount: (id)_account;
Initialise a roster for a specified account.

numberOfGroups 

- (int) 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: 

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

setDelegate: 

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

setGroup: forIdentity: 

- (void) setGroup: (NSString*)aGroup forIdentity: (JabberIdentity*)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)_status withMessage: (NSString*)_message;
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: forIdentity: 

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

subscribe: withName: inGroup: 

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

unauthorise: 

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

unsubscribe: 

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

update: 

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



Instance Variables for Roster 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.

dispatcher

@protected Dispatcher* 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.




Software documentation for the RosterDelegate protocol

RosterDelegate

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

update: 

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