StropheCappuccino API 1.0.0
TNStropheRoster Class Reference

#import <TNStropheRoster.h>

Inheritance diagram for TNStropheRoster:

List of all members.

Public Member Functions

(void) - addContact:inGroup:push: [implementation]
(void) - addContact:withName:inGroupWithPath: [implementation]
(void) - addGroupWithPath: [implementation]
(void) - answerAuthorizationRequest:answer: [implementation]
(void) - askAuthorizationTo: [implementation]
(void) - authorizeJID: [implementation]
(void) - changeName:ofGroup: [implementation]
(void) - changeNickname:ofContact: [implementation]
(void) - clear [implementation]
(CPArray) - getAllContactsTreeFromGroup: [implementation]
(void) - getRoster [implementation]
(void) - getSubGroupDelimiter [implementation]
(TNStropheGroup- groupWithPath: [implementation]
(TNStropheGroup- groupWithPath:orCreate: [implementation]
(id) - initWithConnection: [implementation]
(void) - moveGroup:intoGroup: [implementation]
(CPDictionary) - pendingPresence [implementation]
(void) - removeContact: [implementation]
(void) - removeContact:fromGroup:push: [implementation]
(void) - removeGroup: [implementation]
(void) - removeGroupWithPath: [implementation]
(TNStropheGroup- rootGroupWithName: [implementation]
(void) - setGroups:ofContact: [implementation]
(void) - setSubGroupDelimiter: [implementation]
(void) - unauthorizeJID: [implementation]

Static Public Member Functions

(id) + rosterWithConnection: [implementation]

Detailed Description

this is an implementation of a basic XMPP Roster

Definition at line 2 of file TNStropheRoster.h.


Member Function Documentation

- (void) addContact: (TNStropheContact aContact
inGroup: (TNStropheGroup aGroup
push: (BOOL)  shouldPush 
[implementation]

add given given contact in given group

Parameters:
aContactthe contact to add
aGroupthe destination group
shouldPushif YES, will send a roster set request

Definition at line 704 of file TNStropheRoster.j.

- (void) addContact: (TNStropheJID aJID
withName: (CPString)  aName
inGroupWithPath: (CPString)  aGroupPath 
[implementation]

add a new contact to the roster with given information

Parameters:
aJIDthe JID of the new contact
aNamethe nickname of the new contact. If nil, it will be the JID
aGroupthe group of the new contact. if nil, it will be "General"

Definition at line 633 of file TNStropheRoster.j.

- (void) addGroupWithPath: (CPString)  aPath [implementation]

add a group with given path. if a group is missing the given path, it will be created

Parameters:
aPaththe path of the group

Definition at line 525 of file TNStropheRoster.j.

- (void) answerAuthorizationRequest: (id)  aStanza
answer: (BOOL)  theAnswer 
[implementation]

answer to a pending subscription request.

Parameters:
TNStropheStanzathe subscription request
theAnswerif YES contact is subscribed and added to the roster. If NO, the subscription request is declined

Definition at line 831 of file TNStropheRoster.j.

- (void) askAuthorizationTo: (TNStropheJID aJID [implementation]

ask subscribtion to the given JID

Parameters:
aJIDthe JID to ask subscribtion

Definition at line 817 of file TNStropheRoster.j.

- (void) authorizeJID: (TNStropheJID aJID [implementation]

subscribe to the given JID

Parameters:
aJIDthe JID to subscribe

Definition at line 791 of file TNStropheRoster.j.

- (void) changeName: (CPString)  aName
ofGroup: (TNStropheGroup aGroup 
[implementation]

change the name of the given group

Parameters:
aNamethe new name
aGroupthe target group

Definition at line 594 of file TNStropheRoster.j.

- (void) changeNickname: (CPString)  newNickname
ofContact: (TNStropheContact aContact 
[implementation]

this allows to change the given contact nickname. Will post TNStropheContactNicknameUpdatedNotification

Parameters:
newNicknamethe new nickname
aContactthe target contact

Reimplemented from TNStropheRosterBase.

Definition at line 665 of file TNStropheRoster.j.

- (void) clear [implementation]

clear all the content of the roster

Reimplemented from TNStropheRosterBase.

Definition at line 82 of file TNStropheRoster.j.

- (CPArray) getAllContactsTreeFromGroup: (TNStropheGroup aGroup [implementation]

return an array of all contacts in group and all its subgroups

Parameters:
aGroupthe target group
Returns:
CPArray containing all contacts

Definition at line 678 of file TNStropheRoster.j.

- (void) getRoster [implementation]

ask the server to get the roster of the TNStropheConnection user

Definition at line 170 of file TNStropheRoster.j.

- (void) getSubGroupDelimiter [implementation]

ask the subgroup delimiter

Definition at line 99 of file TNStropheRoster.j.

- (TNStropheGroup) groupWithPath: (CPString)  aPath [implementation]

get the group with given path

Parameters:
aPaththe path of the group
Returns:
the TNStropheGroup object or nil

Definition at line 484 of file TNStropheRoster.j.

- (TNStropheGroup) groupWithPath: (CPArray)  aPath
orCreate: (BOOL)  shouldCreate 
[implementation]

return the group with given path or create it if it doesn't exists

Parameters:
aPaththe path of the group
shouldCreateYES or NO
Returns:
the group

Definition at line 508 of file TNStropheRoster.j.

- (id) initWithConnection: (TNStropheConnection aConnection [implementation]

initialize a roster with a valid TNStropheConnection

Returns:
initialized instance of TNStropheRoster

Reimplemented from TNStropheRosterBase.

Definition at line 64 of file TNStropheRoster.j.

- (void) moveGroup: (TNStropheGroup aGroup
intoGroup: (TNStropheGroup anotherGroup 
[implementation]

Move the given group into another group. if another group is nil, the group will be move into roster root space

Parameters:
aGroupthe origin group
anotherGroupthe destination group

Definition at line 766 of file TNStropheRoster.j.

- (CPDictionary) pendingPresence [implementation]

Synthesized accessor method.

Definition at line 855 of file TNStropheRoster.j.

- (void) removeContact: (TNStropheContact aContact [implementation]

Remove a contact and send a roster push

Parameters:
aContactthe contact to remove

Definition at line 655 of file TNStropheRoster.j.

- (void) removeContact: (TNStropheContact aContact
fromGroup: (TNStropheGroup aGroup
push: (BOOL)  shouldPush 
[implementation]

remove given given contact from given group

Parameters:
aContactthe contact to remove
aGroupthe target group
shouldPushif YES, will send a roster set request

Definition at line 727 of file TNStropheRoster.j.

- (void) removeGroup: (TNStropheGroup aGroup [implementation]

remove the given group

Parameters:
aGroupthe group

Definition at line 585 of file TNStropheRoster.j.

- (void) removeGroupWithPath: (CPString)  aPath [implementation]

remove the group at given path. all sub groups of the removed groups will also be removed

Parameters:
aPaththe path of the group

Definition at line 562 of file TNStropheRoster.j.

- (TNStropheGroup) rootGroupWithName: (CPString)  aGroupName [implementation]

return TNStropheGroup object according to the given name

Parameters:
aGroupNamethe group name
Returns:
TNStropheGroup the group. nil if group doesn't exist

Definition at line 607 of file TNStropheRoster.j.

+ (id) rosterWithConnection: (TNStropheConnection aConnection [implementation]

Reimplemented from TNStropheRosterBase.

Definition at line 52 of file TNStropheRoster.j.

- (void) setGroups: (CPArray)  someGroups
ofContact: (TNStropheContact aContact 
[implementation]

set the groups of the given contact

Parameters:
someGroupsarray of groups
aContactthe target contact

Definition at line 751 of file TNStropheRoster.j.

- (void) setSubGroupDelimiter: (CPString)  aDelimiter [implementation]

set the subgroup delimiter aDelimiter the delimiter to use

Definition at line 138 of file TNStropheRoster.j.

- (void) unauthorizeJID: (TNStropheJID aJID [implementation]

unsubscribe to the given JID

Parameters:
aJIDthe JID to unsubscribe

Definition at line 804 of file TNStropheRoster.j.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables