| 1 |
#import <ChatCore/MVChatUser.h> |
|---|
| 2 |
|
|---|
| 3 |
extern NSString *JVBuddyCameOnlineNotification; |
|---|
| 4 |
extern NSString *JVBuddyWentOfflineNotification; |
|---|
| 5 |
|
|---|
| 6 |
extern NSString *JVBuddyUserCameOnlineNotification; |
|---|
| 7 |
extern NSString *JVBuddyUserWentOfflineNotification; |
|---|
| 8 |
extern NSString *JVBuddyUserStatusChangedNotification; |
|---|
| 9 |
extern NSString *JVBuddyUserIdleTimeUpdatedNotification; |
|---|
| 10 |
|
|---|
| 11 |
extern NSString *JVBuddyActiveUserChangedNotification; |
|---|
| 12 |
|
|---|
| 13 |
@class ABPerson; |
|---|
| 14 |
|
|---|
| 15 |
typedef enum { |
|---|
| 16 |
JVBuddyActiveNickname = 0x0, |
|---|
| 17 |
JVBuddyGivenNickname = 0x1, |
|---|
| 18 |
JVBuddyFullName = 0x2 |
|---|
| 19 |
} JVBuddyName; |
|---|
| 20 |
|
|---|
| 21 |
@interface JVBuddy : NSObject { |
|---|
| 22 |
ABPerson *_person; |
|---|
| 23 |
NSMutableArray *_users; |
|---|
| 24 |
NSMutableArray *_onlineUsers; |
|---|
| 25 |
MVChatUser *_activeUser; |
|---|
| 26 |
} |
|---|
| 27 |
+ (JVBuddyName) preferredName; |
|---|
| 28 |
+ (void) setPreferredName:(JVBuddyName) preferred; |
|---|
| 29 |
|
|---|
| 30 |
+ (id) buddyWithPerson:(ABPerson *) person; |
|---|
| 31 |
+ (id) buddyWithUniqueIdentifier:(NSString *) identifier; |
|---|
| 32 |
|
|---|
| 33 |
- (id) initWithPerson:(ABPerson *) person; |
|---|
| 34 |
|
|---|
| 35 |
- (void) registerWithApplicableConnections; |
|---|
| 36 |
- (void) unregisterWithApplicableConnections; |
|---|
| 37 |
|
|---|
| 38 |
- (MVChatUser *) activeUser; |
|---|
| 39 |
- (void) setActiveUser:(MVChatUser *) user; |
|---|
| 40 |
|
|---|
| 41 |
- (MVChatUserStatus) status; |
|---|
| 42 |
- (NSAttributedString *) awayStatusMessage; |
|---|
| 43 |
|
|---|
| 44 |
- (BOOL) isOnline; |
|---|
| 45 |
- (NSDate *) dateConnected; |
|---|
| 46 |
- (NSDate *) dateDisconnected; |
|---|
| 47 |
|
|---|
| 48 |
- (NSTimeInterval) idleTime; |
|---|
| 49 |
|
|---|
| 50 |
- (NSString *) displayName; |
|---|
| 51 |
- (NSString *) nickname; |
|---|
| 52 |
|
|---|
| 53 |
- (NSArray *) users; |
|---|
| 54 |
- (NSArray *) onlineUsers; |
|---|
| 55 |
|
|---|
| 56 |
- (void) addUser:(MVChatUser *) user; |
|---|
| 57 |
- (void) removeUser:(MVChatUser *) user; |
|---|
| 58 |
- (void) replaceUser:(MVChatUser *) oldUser withUser:(MVChatUser *) newUser; |
|---|
| 59 |
|
|---|
| 60 |
- (NSImage *) picture; |
|---|
| 61 |
- (void) setPicture:(NSImage *) picture; |
|---|
| 62 |
|
|---|
| 63 |
- (NSString *) compositeName; |
|---|
| 64 |
- (NSString *) firstName; |
|---|
| 65 |
- (NSString *) lastName; |
|---|
| 66 |
- (NSString *) primaryEmail; |
|---|
| 67 |
- (NSString *) givenNickname; |
|---|
| 68 |
|
|---|
| 69 |
- (void) setFirstName:(NSString *) name; |
|---|
| 70 |
- (void) setLastName:(NSString *) name; |
|---|
| 71 |
- (void) setPrimaryEmail:(NSString *) email; |
|---|
| 72 |
- (void) setGivenNickname:(NSString *) name; |
|---|
| 73 |
|
|---|
| 74 |
- (NSString *) uniqueIdentifier; |
|---|
| 75 |
- (ABPerson *) person; |
|---|
| 76 |
|
|---|
| 77 |
- (void) editInAddressBook; |
|---|
| 78 |
- (void) viewInAddressBook; |
|---|
| 79 |
|
|---|
| 80 |
- (NSComparisonResult) availabilityCompare:(JVBuddy *) buddy; |
|---|
| 81 |
- (NSComparisonResult) firstNameCompare:(JVBuddy *) buddy; |
|---|
| 82 |
- (NSComparisonResult) lastNameCompare:(JVBuddy *) buddy; |
|---|
| 83 |
- (NSComparisonResult) serverCompare:(JVBuddy *) buddy; |
|---|
| 84 |
- (NSComparisonResult) nicknameCompare:(JVBuddy *) buddy; |
|---|
| 85 |
@end |
|---|