root/Trunk/Adium.framework/Versions/A/Headers/AIContactControllerProtocol.h @ 2

Revision 2, 7.4 KB (checked in by jon, 16 years ago)

Initial commit of skeletal project.

Line 
1/*
2 *  AIContactControllerProtocol.h
3 *  Adium
4 *
5 *  Created by Evan Schoenberg on 7/31/06.
6 *
7 */
8
9#import <Adium/AIControllerProtocol.h>
10#import <Adium/AIListContact.h>
11#import <Adium/AIListObject.h>
12
13#define ListObject_AttributesChanged                    @"ListObject_AttributesChanged"
14#define ListObject_StatusChanged                                @"ListObject_StatusChanged"
15#define Contact_OrderChanged                                    @"Contact_OrderChanged"
16#define Contact_ListChanged                                             @"Contact_ListChanged"
17#define Contact_SortSelectorListChanged                 @"Contact_SortSelectorListChanged"
18
19#define Contact_ApplyDisplayName                                @"Contact_ApplyDisplayName"
20#define Contact_AddNewContact                                   @"Contact_AddNewContact"
21
22//A unique group name for our root group
23#define ADIUM_ROOT_GROUP_NAME                                   @"ROOTJKSHFOEIZNGIOEOP"
24
25//Preference groups and keys used for contacts throughout Adium
26#define PREF_GROUP_ALIASES                                              @"Aliases"                      //Preference group in which to store aliases
27#define PREF_GROUP_USERICONS                                    @"User Icons"
28#define KEY_USER_ICON                                                   @"User Icon"
29#define PREF_GROUP_NOTES                                                @"Notes"                        //Preference group to store notes in
30#define PREF_GROUP_ADDRESSBOOK                  @"Address Book"
31#define PREF_GROUP_ALWAYS_VISIBLE                               @"Always Visible"
32
33
34typedef enum {
35        AIUserInfoLabelValuePair = 0 /* default */,
36        AIUserInfoSectionHeader,
37        AIUserInfoSectionBreak
38}  AIUserInfoEntryType;
39
40typedef enum {
41    AIInfo_Profile = 1, 
42    AIInfo_Accounts,
43    AIInfo_Alerts,
44    AIInfo_Settings
45} AIContactInfoCategory;
46
47typedef enum {
48    AISortGroup = 0,
49    AISortGroupAndSubGroups,
50    AISortGroupAndSuperGroups
51} AISortMode;
52
53@protocol AIListObjectObserver;
54@class AIListGroup, AIListObject, AIListContact, AIMetaContact, AIService, AIAccount, AISortController, AIListBookmark, AIContactHidingController;
55
56@protocol AIAddressBookController
57- (ABPerson *)personForListObject:(AIListObject *)inObject;
58@end
59
60@protocol AIContactController <AIController>
61//Contact list access
62- (AIListGroup *)contactList;
63- (AIListContact *)contactWithService:(AIService *)inService account:(AIAccount *)inAccount UID:(NSString *)inUID;
64- (AIListContact *)contactWithService:(AIService *)inService account:(AIAccount *)inAccount UID:(NSString *)inUID usingClass:(Class)ContactClass;
65- (AIListContact *)contactOnAccount:(AIAccount *)account fromListContact:(AIListContact *)inContact;
66- (AIListObject *)existingListObjectWithUniqueID:(NSString *)uniqueID;
67- (AIListContact *)existingContactWithService:(AIService *)inService account:(AIAccount *)inAccount UID:(NSString *)inUID;
68- (AIListContact *)existingContactWithService:(AIService *)inService account:(AIAccount *)inAccount UID:(NSString *)inUID usingClass:(Class)ContactClass;
69- (AIListGroup *)groupWithUID:(NSString *)groupUID;
70- (AIListGroup *)existingGroupWithUID:(NSString *)groupUID;
71- (NSArray *)allGroups;
72/*!
73 * @brief Returns a flat array of all contacts
74 */
75- (NSMutableArray *)allContacts;
76/*!
77 * @brief Returns a flat array of all contacts on a given account
78 *
79 * @param inAccount The account whose contacts are desired, or nil to match every account
80 * @result Every contact in the global contactDict which isn't a metacontact and matches the specified account criterion
81 */
82- (NSMutableArray *)allContactsOnAccount:(AIAccount *)inAccount;
83- (NSMutableArray *)allContactsInObject:(AIListObject<AIContainingObject> *)inGroup recurse:(BOOL)recurse onAccount:(AIAccount *)inAccount;
84- (NSMutableArray *)allBookmarks;
85- (NSMutableArray *)allBookmarksInObject:(AIListObject<AIContainingObject> *)inGroup recurse:(BOOL)recurse onAccount:(AIAccount *)inAccount;
86- (NSMenu *)menuOfAllContactsInContainingObject:(AIListObject<AIContainingObject> *)inGroup withTarget:(id)target;
87- (NSMenu *)menuOfAllGroupsInGroup:(AIListGroup *)inGroup withTarget:(id)target;
88- (NSSet *)allContactsWithService:(AIService *)service UID:(NSString *)inUID existingOnly:(BOOL)existingOnly;
89- (AIListGroup *)offlineGroup;
90- (BOOL)useOfflineGroup;
91- (NSArray *)allMetaContacts;
92
93- (AIListBookmark *)bookmarkForChat:(AIChat *)inChat;
94
95- (AIMetaContact *)knownMetaContactForGroupingUIDs:(NSArray *)UIDsArray forServices:(NSArray *)servicesArray;
96- (AIMetaContact *)groupUIDs:(NSArray *)UIDsArray forServices:(NSArray *)servicesArray usingMetaContactHint:(AIMetaContact *)metaContactHint;
97- (AIMetaContact *)metaContactWithObjectID:(NSNumber *)inObjectID;
98
99- (AIMetaContact *)groupListContacts:(NSArray *)contactsToGroupArray;
100- (void)removeAllListObjectsMatching:(AIListObject *)listObject fromMetaContact:(AIMetaContact *)metaContact;
101- (AIListGroup *)remoteGroupForContact:(AIListContact *)inContact;
102- (void)clearAllMetaContactData;
103
104//Contact status & Attributes
105- (void)registerListObjectObserver:(id <AIListObjectObserver>)inObserver;
106- (void)unregisterListObjectObserver:(id)inObserver;
107- (void)updateAllListObjectsForObserver:(id <AIListObjectObserver>)inObserver;
108- (void)updateContacts:(NSSet *)contacts forObserver:(id <AIListObjectObserver>)inObserver;
109- (void)delayListObjectNotifications;
110- (void)endListObjectNotificationsDelay;
111- (void)delayListObjectNotificationsUntilInactivity;
112- (void)listObjectStatusChanged:(AIListObject *)inObject modifiedStatusKeys:(NSSet *)inModifiedKeys silent:(BOOL)silent;
113- (void)listObjectAttributesChanged:(AIListObject *)inObject modifiedKeys:(NSSet *)inModifiedKeys;
114
115- (void)listObjectRemoteGroupingChanged:(AIListContact *)inObject;
116
117//Contact list sorting
118- (NSArray *)sortControllerArray;
119- (void)registerListSortController:(AISortController *)inController;
120- (void)setActiveSortController:(AISortController *)inController;
121- (AISortController *)activeSortController;
122- (void)sortContactList;
123- (void)sortListObject:(AIListObject *)inObject;
124
125//Preferred contacts
126- (AIListContact *)preferredContactForContentType:(NSString *)inType forListContact:(AIListContact *)inContact;
127- (AIListContact *)preferredContactWithUID:(NSString *)UID andServiceID:(NSString *)serviceID forSendingContentType:(NSString *)inType;
128
129//Editing
130- (void)addContacts:(NSArray *)contactArray toGroup:(AIListGroup *)group;
131- (void)removeListObjects:(NSArray *)objectArray;
132- (void)requestAddContactWithUID:(NSString *)contactUID service:(AIService *)inService account:(AIAccount *)inAccount;
133- (void)moveListObjects:(NSArray *)objectArray intoObject:(AIListObject<AIContainingObject> *)group index:(int)index;
134- (void)moveContact:(AIListContact *)listContact intoObject:(AIListObject<AIContainingObject> *)group;
135- (void)_moveContactLocally:(AIListContact *)listContact toGroup:(AIListGroup *)group;
136- (BOOL)useContactListGroups;
137
138//For Accounts
139- (void)account:(AIAccount *)account didStopTrackingContact:(AIListContact *)listContact;
140
141- (id)showAuthorizationRequestWithDict:(NSDictionary *)inDict forAccount:(AIAccount *)inAccount;
142
143//Contact info
144- (void)updateListContactStatus:(AIListContact *)inContact;
145
146//Contact List
147- (AIListGroup *)createDetachedContactList;
148- (void)removeDetachedContactList:(AIListGroup *)detachedList;
149- (BOOL)isGroupDetached:(AIListObject *)group;
150- (unsigned)contactListCount;
151
152//Contact hiding
153- (AIContactHidingController *)contactHidingController;
154
155//Address Book
156- (void)setAddressBookController:(NSObject<AIAddressBookController> *)inAddressBookController;
157- (ABPerson *)personForListObject:(AIListObject *)inObject;
158
159@end
160
161//Observer which receives notifications of changes in list object status
162@protocol AIListObjectObserver
163- (NSSet *)updateListObject:(AIListObject *)inObject keys:(NSSet *)inModifiedKeys silent:(BOOL)silent;
164@end
165
166//Empty protocol to allow easy checking for if a particular object is a contact list outline view
167@protocol ContactListOutlineView
168@end
Note: See TracBrowser for help on using the browser.