-
Notifications
You must be signed in to change notification settings - Fork 2
/
XMPPRosterGroup.h
67 lines (63 loc) · 1.66 KB
/
XMPPRosterGroup.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// XMPPRosterGroup.h
// Jabber
//
// Created by David Chisnall on Sun Jul 25 2004.
// Copyright (c) 2004 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "XMPPIdentity.h"
#import "XMPPPerson.h"
/**
* The XMPPRosterGroup class represents a group in the roster.
*/
@interface XMPPRosterGroup : NSObject {
NSMutableDictionary * peopleByName;
NSString * name;
NSMutableArray * people;
id roster;
}
/**
* Create a new group in the specified roster.
*/
+ (id) groupWithRoster:(id)_roster;
/**
* Initialise a new group for the specified roster.
*/
- (id) initWithRoster:(id)_roster;
/**
* Returns the name of the group.
*/
- (NSString*) groupName;
/**
* Set the group name.
*/
- (void) groupName:(NSString*)_name;
/**
* Returns the person in the group with the specified name.
*/
- (XMPPPerson*) personNamed:(NSString*)_name;
/**
* Adds a new identity to the group. This identity will either be added to an
* existing person, or have a new person created for it, depending on the name.
*/
- (void) addIdentity:(XMPPIdentity*)_identity;
/**
* Remove the specified identity from the group. This may also remove a person
* from the group if the relevant person only has a single identity.
*/
- (void) removeIdentity:(XMPPIdentity*)_identity;
/**
* Returns the number of people in the group who are more online than the specified
* value.
*/
- (unsigned int) numberOfPeopleInGroupMoreOnlineThan:(unsigned int)hide;
/**
* Returns the person at the specified index.
*/
- (XMPPPerson*) personAtIndex:(unsigned int)_index;
/**
* Compares two roster groups by name.
*/
- (NSComparisonResult) compare:(XMPPRosterGroup*)otherGroup;
@end