XMPPRoomOccupant.h
1.84 KB
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
#import <Foundation/Foundation.h>
@class XMPPJID;
@class XMPPPresence;
@protocol XMPPRoomOccupant <NSObject>
/**
* Most recent presence message from occupant.
**/
- (XMPPPresence *)presence;
/**
* The MUC room the occupant is associated with.
**/
- (XMPPJID *)roomJID;
/**
* The JID of the occupant as reported by the room.
* A typical MUC room will use JIDs of the form: "room_name@conference.domain.tl/some_nickname".
**/
- (XMPPJID *)jid;
/**
* The nickname of the user.
* In other words, the resource portion of the occupants JID.
**/
- (NSString *)nickname;
/**
* The 'role' and 'affiliation' of the occupant within the MUC room.
*
* From XEP-0045, Section 5 - Roles and Affiliations:
*
* There are two dimensions along which we can measure a user's connection with or position in a room.
* One is the user's long-lived affiliation with a room -- e.g., a user's status as an owner or an outcast.
* The other is a user's role while an occupant of a room -- e.g., an occupant's position as a moderator with the
* ability to kick visitors and participants. These two dimensions are distinct from each other, since an affiliation
* lasts across visits, while a role lasts only for the duration of a visit. In addition, there is no one-to-one
* correspondence between roles and affiliations; for example, someone who is not affiliated with a room may be
* a (temporary) moderator, and a member may be a participant or a visitor in a moderated room.
*
* For more information, please see XEP-0045.
**/
- (NSString *)role;
- (NSString *)affiliation;
/**
* If the MUC room is non-anonymous, the real JID of the user will be broadcast.
*
* An anonymous room uses JID's of the form: "room_name@conference.domain.tld/some_nickname".
* A non-anonymous room also includes the occupants real full JID in the presence broadcast.
**/
- (XMPPJID *)realJID;
@end