Changeset 3413

Show
Ignore:
Timestamp:
01/04/06 18:05:19 (3 years ago)
Author:
morris
Message:

Fix up WCServerConnection, disconnects handled again


Update all copyrights

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/English.lproj/InfoPlist.strings

    r3395 r3413  
    22CFBundleName = "Wired Client"; 
    33CFBundleShortVersionString = "Wired Client 1.3"; 
    4 CFBundleGetInfoString = "Wired Client 1.3, Copyright 2003-2005 Zanka Software."; 
    5 NSHumanReadableCopyright = "Copyright 2003-2005 Zanka Software."; 
     4CFBundleGetInfoString = "Wired Client 1.3, Copyright 2003-2006 Zanka Software."; 
     5NSHumanReadableCopyright = "Copyright 2003-2006 Zanka Software."; 
    66 
    77/* File types */ 
  • WiredClient/trunk/WCAboutWindow.h

    r3395 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCAboutWindow.m

    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCAccount.h

    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCAccount.m

    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCAccountEditor.h

    r3395 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCAccountEditor.m

    r3395 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCAccounts.h

    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCAccounts.m

    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
     
    3333@interface WCAccounts(Private) 
    3434 
    35 - (void)update; 
    36 - (void)updateStatus; 
    37 - (void)validate; 
    38 - (WCAccount *)selectedAccount; 
    39 - (NSArray *)selectedAccounts; 
    40 - (void)sortAccounts; 
     35- (void)_update; 
     36- (void)_updateStatus; 
     37- (void)_validate; 
     38- (WCAccount *)_selectedAccount; 
     39- (NSArray *)_selectedAccounts; 
     40- (void)_sortAccounts; 
    4141 
    4242@end 
    4343 
    4444 
    45 @implementation WCAccounts 
    46  
    47 - (id)initAccountsWithConnection:(WCServerConnection *)connection { 
    48         self = [super initWithWindowNibName:@"Accounts" 
    49                                                                    name:NSLS(@"Accounts", @"Accounts window title") 
    50                                                          connection:connection]; 
    51  
    52         _allAccounts    = [[NSMutableArray alloc] init]; 
    53         _shownAccounts  = [[NSMutableArray alloc] init]; 
    54         _userImage              = [[NSImage imageNamed:@"User"] retain]; 
    55         _groupImage             = [[NSImage imageNamed:@"Group"] retain]; 
    56  
    57         // --- load the window 
    58         [self window]; 
    59  
    60         // --- subscribe to these 
    61         [[self connection] addObserver:self 
    62                                                   selector:@selector(accountsShouldReload:) 
    63                                                           name:WCAccountsShouldReload]; 
    64  
    65         [[self connection] addObserver:self 
    66                                                   selector:@selector(accountsReceivedUser:) 
    67                                                           name:WCAccountsReceivedUser]; 
    68  
    69         [[self connection] addObserver:self 
    70                                                   selector:@selector(accountsCompletedUsers:) 
    71                                                           name:WCAccountsCompletedUsers]; 
    72  
    73         [[self connection] addObserver:self 
    74                                                   selector:@selector(accountsReceivedGroup:) 
    75                                                           name:WCAccountsReceivedGroup]; 
    76  
    77         [[self connection] addObserver:self 
    78                                                   selector:@selector(accountsCompletedGroups:) 
    79                                                           name:WCAccountsCompletedGroups]; 
    80  
    81         return self; 
    82 
    83  
    84  
    85  
    86 - (void)dealloc { 
    87         [_userImage release]; 
    88         [_groupImage release]; 
    89  
    90         [_allAccounts release]; 
    91         [_shownAccounts release]; 
    92  
    93         [super dealloc]; 
    94 
    95  
    96  
    97  
    98 #pragma mark - 
    99  
    100 - (void)windowDidLoad { 
    101         WIIconCell              *iconCell; 
    102  
    103         // --- set up our custom cell type 
    104         iconCell = [[WIIconCell alloc] init]; 
    105         [_nameTableColumn setDataCell:iconCell]; 
    106         [iconCell release]; 
    107  
    108         // --- set up window 
    109         [self setShouldCascadeWindows:NO]; 
    110         [self setWindowFrameAutosaveName:@"Accounts"]; 
    111  
    112         // --- set up table view 
    113         [_accountsTableView setDoubleAction:@selector(edit:)]; 
    114         [_accountsTableView setDeleteAction:@selector(delete:)]; 
    115         [_accountsTableView setAutosaveName:@"Accounts"]; 
    116         [_accountsTableView setAutosaveTableColumns:YES]; 
    117         [[self window] makeFirstResponder:_accountsTableView]; 
    118  
    119         // --- set from prefs 
    120         [self update]; 
    121         [self validate]; 
    122         [self updateStatus]; 
    123 
    124  
    125  
    126  
    127 - (void)serverConnectionLoggedIn:(NSNotification *)notification { 
    128         [_allAccounts removeAllObjects]; 
    129         [_shownAccounts removeAllObjects]; 
    130          
    131         _received = NO; 
    132 
    133  
    134  
    135  
    136 - (void)serverConnectionServerInfoDidChange:(NSNotification *)notification { 
    137         [[self window] setTitle:[[self connection] name] withSubtitle:[self name]]; 
    138 
    139  
    140  
    141  
    142 - (void)serverConnectionPrivilegesDidChange:(NSNotification *)notification { 
    143         [self validate]; 
    144  
    145         if(!_received) { 
    146                 // --- load accounts the first time 
    147                 if([[[self connection] account] editAccounts]) 
    148                         [self reload:self]; 
    149  
    150                 _received = YES; 
    151         } 
    152 
    153  
    154  
    155  
    156 - (void)serverConnectionWillTerminate:(NSNotification *)notification { 
    157         [self close]; 
    158         [self autorelease]; 
    159 
    160  
    161  
    162  
    163 - (void)preferencesDidChange:(NSNotification *)notification { 
    164         [self update]; 
    165 
    166  
    167  
    168  
    169 - (void)accountsShouldReload:(NSNotification *)notification { 
    170         [self reload:self]; 
    171 
    172  
    173  
    174  
    175 - (void)accountsReceivedUser:(NSNotification *)notification { 
    176         NSArray         *arguments; 
    177         NSString        *name; 
    178         WCAccount       *account; 
    179  
    180         arguments = [[notification userInfo] objectForKey:WCArgumentsKey]; 
    181         name = [arguments safeObjectAtIndex:0]; 
    182  
    183         // --- add user 
    184         account = [[WCAccount alloc] initWithType:WCAccountTypeUser]; 
    185         [account setName:name]; 
    186         [_allAccounts addObject:account]; 
    187         [account release]; 
    188  
    189         _users++; 
    190 
    191  
    192  
    193  
    194 - (void)accountsCompletedUsers:(NSNotification *)notification { 
    195 
    196  
    197  
    198  
    199 - (void)accountsReceivedGroup:(NSNotification *)notification { 
    200         NSArray         *arguments; 
    201         NSString        *name; 
    202         WCAccount       *account; 
    203  
    204         arguments = [[notification userInfo] objectForKey:WCArgumentsKey]; 
    205         name = [arguments safeObjectAtIndex:0]; 
    206  
    207         // --- add group 
    208         account = [[WCAccount alloc] initWithType:WCAccountTypeGroup]; 
    209         [account setName:name]; 
    210         [_allAccounts addObject:account]; 
    211         [account release]; 
    212  
    213         _groups++; 
    214 
    215  
    216  
    217  
    218 - (void)accountsCompletedGroups:(NSNotification *)notification { 
    219         [_shownAccounts removeAllObjects]; 
    220         [_shownAccounts addObjectsFromArray:_allAccounts]; 
    221  
    222         [_progressIndicator stopAnimation:self]; 
    223         [self sortAccounts]; 
    224         [self updateStatus]; 
    225         [_accountsTableView reloadData]; 
    226 
    227  
    228  
    229  
    230 - (void)deleteSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { 
    231         NSEnumerator    *enumerator; 
    232         NSString                *command; 
    233         WCAccount               *account; 
    234  
    235         if(returnCode == NSAlertDefaultReturn) { 
    236                 enumerator = [[self selectedAccounts] objectEnumerator]; 
    237  
    238                 while((account = [enumerator nextObject])) { 
    239                         // --- send delete command 
    240                         command = [account type] == WCAccountTypeUser ? WCDeleteUserCommand : WCDeleteGroupCommand; 
    241                         [[self connection] sendCommand:command withArgument:[account name]]; 
    242                 } 
    243  
    244                 [self reload:self]; 
    245         } 
    246 
    247  
    248  
    249  
    250 #pragma mark - 
    251  
    252 - (void)update { 
    253 
    254  
    255  
    256  
    257 - (void)updateStatus { 
     45@implementation WCAccounts(Private) 
     46 
     47- (void)_update { 
     48
     49 
     50 
     51 
     52- (void)_updateStatus { 
    25853        [_statusTextField setStringValue:[NSSWF: 
    25954                NSLS(@"%d %@, %d %@", "Accounts status (users, 'user(s)', groups, 'group(s)')"), 
     
    27065 
    27166 
    272 - (void)validate { 
     67- (void)_validate { 
    27368        WCAccount       *account; 
    27469        int                     row; 
     
    29287 
    29388 
    294 - (WCAccount *)accountAtIndex:(int)index { 
     89- (WCAccount *)_accountAtIndex:(int)index { 
    29590        int             i; 
    29691         
     
    30499 
    305100 
    306 - (WCAccount *)selectedAccount { 
     101- (WCAccount *)_selectedAccount { 
    307102        int             row; 
    308103 
     
    312107                return NULL; 
    313108 
    314         return [self accountAtIndex:row]; 
    315 } 
    316  
    317  
    318  
    319 - (NSArray *)selectedAccounts { 
     109        return [self _accountAtIndex:row]; 
     110} 
     111 
     112 
     113 
     114- (NSArray *)_selectedAccounts { 
    320115        NSEnumerator            *enumerator; 
    321116        NSMutableArray          *array; 
     
    326121 
    327122        while((row = [enumerator nextObject])) 
    328                 [array addObject:[self accountAtIndex:[row intValue]]]; 
     123                [array addObject:[self _accountAtIndex:[row intValue]]]; 
    329124 
    330125        return array; 
     
    333128 
    334129 
    335 - (void)sortAccounts { 
     130- (void)_sortAccounts { 
    336131        NSTableColumn   *tableColumn; 
    337132 
     
    344139} 
    345140 
     141@end 
     142 
     143 
     144@implementation WCAccounts 
     145 
     146- (id)initAccountsWithConnection:(WCServerConnection *)connection { 
     147        self = [super initWithWindowNibName:@"Accounts" 
     148                                                                   name:NSLS(@"Accounts", @"Accounts window title") 
     149                                                         connection:connection]; 
     150 
     151        _allAccounts    = [[NSMutableArray alloc] init]; 
     152        _shownAccounts  = [[NSMutableArray alloc] init]; 
     153        _userImage              = [[NSImage imageNamed:@"User"] retain]; 
     154        _groupImage             = [[NSImage imageNamed:@"Group"] retain]; 
     155 
     156        [self window]; 
     157 
     158        [[self connection] addObserver:self 
     159                                                  selector:@selector(accountsShouldReload:) 
     160                                                          name:WCAccountsShouldReload]; 
     161 
     162        [[self connection] addObserver:self 
     163                                                  selector:@selector(accountsReceivedUser:) 
     164                                                          name:WCAccountsReceivedUser]; 
     165 
     166        [[self connection] addObserver:self 
     167                                                  selector:@selector(accountsCompletedUsers:) 
     168                                                          name:WCAccountsCompletedUsers]; 
     169 
     170        [[self connection] addObserver:self 
     171                                                  selector:@selector(accountsReceivedGroup:) 
     172                                                          name:WCAccountsReceivedGroup]; 
     173 
     174        [[self connection] addObserver:self 
     175                                                  selector:@selector(accountsCompletedGroups:) 
     176                                                          name:WCAccountsCompletedGroups]; 
     177 
     178        return self; 
     179} 
     180 
     181 
     182 
     183- (void)dealloc { 
     184        [_userImage release]; 
     185        [_groupImage release]; 
     186 
     187        [_allAccounts release]; 
     188        [_shownAccounts release]; 
     189 
     190        [super dealloc]; 
     191} 
     192 
     193 
     194 
     195#pragma mark - 
     196 
     197- (void)windowDidLoad { 
     198        WIIconCell              *iconCell; 
     199 
     200        iconCell = [[WIIconCell alloc] init]; 
     201        [_nameTableColumn setDataCell:iconCell]; 
     202        [iconCell release]; 
     203 
     204        [self setShouldCascadeWindows:NO]; 
     205        [self setWindowFrameAutosaveName:@"Accounts"]; 
     206 
     207        [_accountsTableView setDoubleAction:@selector(edit:)]; 
     208        [_accountsTableView setDeleteAction:@selector(delete:)]; 
     209        [_accountsTableView setAutosaveName:@"Accounts"]; 
     210        [_accountsTableView setAutosaveTableColumns:YES]; 
     211        [[self window] makeFirstResponder:_accountsTableView]; 
     212 
     213        [self _update]; 
     214        [self _updateStatus]; 
     215        [self _validate]; 
     216} 
     217 
     218 
     219 
     220- (void)connectionWillTerminate:(NSNotification *)notification { 
     221        [self close]; 
     222        [self autorelease]; 
     223} 
     224 
     225 
     226 
     227- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
     228        [_allAccounts removeAllObjects]; 
     229        [_shownAccounts removeAllObjects]; 
     230         
     231        _users = _groups = 0; 
     232         
     233        _received = NO; 
     234} 
     235 
     236 
     237 
     238- (void)serverConnectionServerInfoDidChange:(NSNotification *)notification { 
     239        [[self window] setTitle:[[self connection] name] withSubtitle:[self name]]; 
     240} 
     241 
     242 
     243 
     244- (void)serverConnectionPrivilegesDidChange:(NSNotification *)notification { 
     245        [self _validate]; 
     246 
     247        if(!_received) { 
     248                if([[[self connection] account] editAccounts]) 
     249                        [self reload:self]; 
     250 
     251                _received = YES; 
     252        } 
     253} 
     254 
     255 
     256 
     257- (void)preferencesDidChange:(NSNotification *)notification { 
     258        [self _update]; 
     259} 
     260 
     261 
     262 
     263- (void)accountsShouldReload:(NSNotification *)notification { 
     264        [self reload:self]; 
     265} 
     266 
     267 
     268 
     269- (void)accountsReceivedUser:(NSNotification *)notification { 
     270        NSArray         *arguments; 
     271        NSString        *name; 
     272        WCAccount       *account; 
     273 
     274        arguments = [[notification userInfo] objectForKey:WCArgumentsKey]; 
     275        name = [arguments safeObjectAtIndex:0]; 
     276 
     277        account = [[WCAccount alloc] initWithType:WCAccountTypeUser]; 
     278        [account setName:name]; 
     279        [_allAccounts addObject:account]; 
     280        [account release]; 
     281 
     282        _users++; 
     283} 
     284 
     285 
     286 
     287- (void)accountsCompletedUsers:(NSNotification *)notification { 
     288} 
     289 
     290 
     291 
     292- (void)accountsReceivedGroup:(NSNotification *)notification { 
     293        NSArray         *arguments; 
     294        NSString        *name; 
     295        WCAccount       *account; 
     296 
     297        arguments = [[notification userInfo] objectForKey:WCArgumentsKey]; 
     298        name = [arguments safeObjectAtIndex:0]; 
     299 
     300        account = [[WCAccount alloc] initWithType:WCAccountTypeGroup]; 
     301        [account setName:name]; 
     302        [_allAccounts addObject:account]; 
     303        [account release]; 
     304 
     305        _groups++; 
     306} 
     307 
     308 
     309 
     310- (void)accountsCompletedGroups:(NSNotification *)notification { 
     311        [_shownAccounts removeAllObjects]; 
     312        [_shownAccounts addObjectsFromArray:_allAccounts]; 
     313 
     314        [_progressIndicator stopAnimation:self]; 
     315        [self _sortAccounts]; 
     316        [self _updateStatus]; 
     317        [_accountsTableView reloadData]; 
     318} 
     319 
     320 
     321 
     322- (void)deleteSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { 
     323        NSEnumerator    *enumerator; 
     324        NSString                *command; 
     325        WCAccount               *account; 
     326 
     327        if(returnCode == NSAlertDefaultReturn) { 
     328                enumerator = [[self _selectedAccounts] objectEnumerator]; 
     329 
     330                while((account = [enumerator nextObject])) { 
     331                        command = [account type] == WCAccountTypeUser ? WCDeleteUserCommand : WCDeleteGroupCommand; 
     332                        [[self connection] sendCommand:command withArgument:[account name]]; 
     333                } 
     334 
     335                [self reload:self]; 
     336        } 
     337} 
     338 
    346339 
    347340 
     
    434427        WCAccount               *account; 
    435428 
    436         enumerator = [[self selectedAccounts] objectEnumerator]; 
     429        enumerator = [[self _selectedAccounts] objectEnumerator]; 
    437430 
    438431        while((account = [enumerator nextObject])) 
     
    448441                title = [NSSWF: 
    449442                        NSLS(@"Are you sure you want to delete \"%@\"?", @"Delete account dialog title (filename)"), 
    450                         [[self selectedAccount] name]]; 
     443                        [[self _selectedAccount] name]]; 
    451444        } else { 
    452445                title = [NSSWF: 
     
    496489        WCAccount       *account; 
    497490 
    498         account = [self accountAtIndex:row]; 
     491        account = [self _accountAtIndex:row]; 
    499492 
    500493        if(tableColumn == _nameTableColumn) { 
     
    535528- (void)tableView:(NSTableView *)tableView didClickTableColumn:(NSTableColumn *)tableColumn { 
    536529        [_accountsTableView setHighlightedTableColumn:tableColumn]; 
    537         [self sortAccounts]; 
     530        [self _sortAccounts]; 
    538531        [_accountsTableView reloadData]; 
    539532} 
     
    542535 
    543536- (void)tableViewSelectionDidChange:(NSNotification *)notification { 
    544         [self validate]; 
     537        [self _validate]; 
    545538} 
    546539 
  • WiredClient/trunk/WCApplication.h

    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCApplication.m

    r3395 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCBrowserCell.h

    r3395 r3413  
    1 /* $Id: WCMain.m,v 1.48 2004/09/06 17:49:41 morris Exp $ */ 
     1/* $Id$ */ 
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCBrowserCell.m

    r3395 r3413  
    1 /* $Id: WCMain.m,v 1.48 2004/09/06 17:49:41 morris Exp $ */ 
     1/* $Id$ */ 
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCCache.h

    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCCache.m

    r3395 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCChat.h

    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCChat.m

    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
  • WiredClient/trunk/WCConnection.h

    </
    r3405 r3413  
    22 
    33/* 
    4  *  Copyright (c) 2003-2005 Axel Andersson 
     4 *  Copyright (c) 2003-2006 Axel Andersson 
    55 *  All rights reserved. 
    66 * 
     
    126126 
    127127#define WCConnectionConnected                   @"WCConnectionConnected" 
    128 #define WCConnectionDisconnected                @"WCConnectionDisconnected" 
    129 #define WCConnectionFailed                              @"WCConnectionFailed" 
     128#define WCConnectionClosed                              @"WCConnectionClosed" 
     129#define WCConnectionWillTerminate               @"WCConnectionWillTerminate" 
     130#define WCConnectionShouldTerminate             @"WCConnectionShouldTerminate" 
     131#define WCConnectionDidTerminate                @"WCConnectionDidTerminate" 
    130132#define WCConnectionReceivedMessage             @"WCConnectionReceivedMessage" 
    131133#define WCConnectionSentCommand                 @"WCConnectionSentCommand" 
    132134#define WCConnectionReceivedError               @"WCConnectionReceivedError" 
     135 
     136#define WCConnectionDisconnected                @"WCConnectionDisconnected" 
    133137 
    134138#define WCArgumentsKey                                  @"WCArgumentsKey" 
     
    137141 
    138142 
    139 /* 
    140 enum WCConnectionType { 
    141         WCConnectionTypeServer, 
    142         WCConnectionTypeTracker 
    143 }; 
    144 typedef enum WCConnectionType                           WCConnectionType; 
    145143 
    146  
    147 @protocol WCConnectionErrorHandling 
    148  
    149 - (BOOL)connectionShouldHandleError:(int)error; 
    150  
    151 @end 
    152  
    153  
    154 @class WCAccounts, WCPublicChat, WCConsole,  WCMessages, WCNews; 
    155 @class WCSearch, WCServerInfo, WCSSLSocket, WCTransfers; 
    156 @class WCCache, WCServer, WCServerInfo, WCTracker, WCAccount; 
    157  
    158 @interface WCConnection : WIWindowController { 
    159         WCConnectionType                                                _type; 
    160         WCAccounts                                                              *_accounts; 
    161         WCCache                                                                 *_cache; 
    162         WCPublicChat                                                    *_chat; 
    163         WCConsole                                                               *_console; 
    164         WCMessages                                                              *_messages; 
    165         WCNews                                                                  *_news; 
    166         WCSearch                                                                *_search; 
    167         WCServerInfo                                                    *_serverInfo; 
    168         WCSSLSocket                                                             *_socket; 
    169         WCTransfers                                                             *_transfers; 
    170  
    171         WCServer                                                                *_server; 
    172         WCTracker                                                               *_tracker; 
    173         NSDictionary                                                    *_bookmark; 
    174  
    175         NSMutableArray                                                  *_pings; 
    176         NSNotificationCenter                                    *_notificationCenter; 
    177         NSTimer                                                                 *_timer; 
    178         id                                                                              _sender; 
    179         unsigned int                                                    _uid; 
    180         BOOL                                                                    _connected, _reconnected; 
    181         BOOL                                                                    _loggedIn, _cancelled; 
    182         BOOL                                                                    _hidden;