2 * Adium is the legal property of its developers, whose names are listed in the copyright file included
3 * with this source distribution.
5 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6 * General Public License as published by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11 * Public License for more details.
13 * You should have received a copy of the GNU General Public License along with this program; if not,
14 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 #import <Adium/AIObject.h>
18 #import <Adium/AIControllerProtocol.h>
19 #import <Adium/AIContactControllerProtocol.h>
21 #define KEY_HIDE_CONTACTS @"Hide Contacts"
22 #define KEY_SHOW_OFFLINE_CONTACTS @"Show Offline Contacts"
23 #define KEY_SHOW_IDLE_CONTACTS @"Show Idle Contacts"
24 #define KEY_SHOW_MOBILE_CONTACTS @"Show Mobile Contacts"
26 #define KEY_USE_OFFLINE_GROUP @"Use Offline Group"
27 #define KEY_HIDE_CONTACT_LIST_GROUPS @"Hide Contact List Groups"
28 #define PREF_GROUP_CONTACT_LIST_DISPLAY @"Contact List Display"
30 @
class AISortController
, AdiumAuthorization
;
32 @interface AIContactController
: AIObject
<AIContactController
, AIListObjectObserver
> {
33 //Contacts and metaContacts
34 NSMutableDictionary
*contactDict
;
35 NSMutableDictionary
*metaContactDict
;
36 NSMutableDictionary
*contactToMetaContactLookupDict
;
38 //Contact List and Groups
39 AIListGroup
*contactList
;
40 NSMutableDictionary
*groupDict
;
41 BOOL useContactListGroups
;
42 NSMenuItem
*menuItem_showGroups
;
44 NSMenuItem
*menuItem_useOfflineGroup
;
46 //Detached Contact Lists
47 NSMutableArray
*detachedContactLists
;
49 //Status and Attribute updates
50 NSMutableSet
*contactObservers
;
51 NSTimer
*delayedUpdateTimer
;
52 int delayedStatusChanges
;
53 NSMutableSet
*delayedModifiedStatusKeys
;
54 int delayedAttributeChanges
;
55 NSMutableSet
*delayedModifiedAttributeKeys
;
56 int delayedContactChanges
;
57 int delayedUpdateRequests
;
58 BOOL updatesAreDelayed
;
61 NSMutableArray
*sortControllerArray
;
62 AISortController
*activeSortController
;
65 AdiumAuthorization
*adiumAuthorization
;
68 - (void)sortAContactList
:(AIListGroup
*)group
;
69 - (void)loadContactList
;