XMPPUserMemoryStorageObject.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#import <Foundation/Foundation.h>
#import "XMPPUser.h"
#import "XMPP.h"
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#endif
@class XMPPResourceMemoryStorageObject;
@interface XMPPUserMemoryStorageObject : NSObject <XMPPUser, NSCopying, NSSecureCoding>
{
XMPPJID *jid;
NSMutableDictionary *itemAttributes;
NSMutableArray *groups;
NSMutableDictionary *resources;
XMPPResourceMemoryStorageObject *primaryResource;
#if TARGET_OS_IPHONE
UIImage *photo;
#else
NSImage *photo;
#endif
}
/* From the XMPPUser protocol
- (XMPPJID *)jid;
- (NSString *)nickname;
- (BOOL)isOnline;
- (BOOL)isPendingApproval;
- (id <XMPPResource>)primaryResource;
- (id <XMPPResource>)resourceForJID:(XMPPJID *)jid;
- (NSArray *)allResources;
*/
- (NSString *)subscription;
- (NSString *)ask;
/**
* Simple convenience method.
* If a nickname exists for the user, the nickname is returned.
* Otherwise the jid is returned (as a string).
**/
- (NSString *)displayName;
/**
* An array of Group Names.
**/
- (NSArray *)groups;
/**
* If XMPPvCardAvatarModule is included in the framework, the XMPPRoster will automatically integrate with it,
* and we'll save the the user photos after they've been downloaded.
**/
#if TARGET_OS_IPHONE
@property (nonatomic, strong, readonly) UIImage *photo;
#else
@property (nonatomic, strong, readonly) NSImage *photo;
#endif
/**
* Simple comparison methods.
**/
- (NSComparisonResult)compareByName:(XMPPUserMemoryStorageObject *)another;
- (NSComparisonResult)compareByName:(XMPPUserMemoryStorageObject *)another options:(NSStringCompareOptions)mask;
- (NSComparisonResult)compareByAvailabilityName:(XMPPUserMemoryStorageObject *)another;
- (NSComparisonResult)compareByAvailabilityName:(XMPPUserMemoryStorageObject *)another
options:(NSStringCompareOptions)mask;
@end