Changeset 977

Show
Ignore:
Timestamp:
03/14/04 05:40:05 (5 years ago)
Author:
morris
Message:

retain the uid we get in 201 messages, might come in handy some day

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCAccounts.m

    r944 r977  
    1 /* $Id: WCAccounts.m,v 1.1 2004/03/08 19:23:42 morris Exp $ */ 
     1/* $Id: WCAccounts.m,v 1.2 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    131131 
    132132- (void)connectionHasAttached:(NSNotification *)notification { 
    133         if([notification object] != _connection) 
     133        if([[notification object] objectAtIndex:0] != _connection) 
    134134                return; 
    135135                 
  • WiredClient/trunk/WCClient.m

    r968 r977  
    1 /* $Id: WCClient.m,v 1.4 2004/03/13 02:38:16 morris Exp $ */ 
     1/* $Id: WCClient.m,v 1.5 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    337337                        [[NSNotificationCenter defaultCenter] 
    338338                                postNotificationName:WCConnectionHasAttached 
    339                                 object:_connection]; 
     339                                object:[NSArray arrayWithObjects:_connection, argument, NULL]]; 
    340340                        break; 
    341341                 
  • WiredClient/trunk/WCConnection.h

    r944 r977  
    1 /* $Id: WCConnection.h,v 1.1 2004/03/08 19:23:42 morris Exp $ */ 
     1/* $Id: WCConnection.h,v 1.2 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    4646        WCCache                                                 *_cache; 
    4747        WCServer                                                *_server; 
     48         
     49        unsigned int                                    _uid; 
    4850} 
    4951 
     
    8183- (NSURL *)                                                     URL; 
    8284- (WCAccount *)                                         account; 
     85- (unsigned int)                                        uid; 
    8386 
    8487@end 
  • WiredClient/trunk/WCConnection.m

    r944 r977  
    1 /* $Id: WCConnection.m,v 1.1 2004/03/08 19:23:42 morris Exp $ */ 
     1/* $Id: WCConnection.m,v 1.2 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    8686        [[NSNotificationCenter defaultCenter] 
    8787                addObserver:self 
    88                 selector:@selector(connectionShouldTerminate:) 
    89                 name:WCConnectionShouldTerminate 
    90                 object:NULL]; 
     88                   selector:@selector(connectionHasAttached:) 
     89                          name:WCConnectionHasAttached 
     90                        object:NULL]; 
    9191 
    9292        [[NSNotificationCenter defaultCenter] 
    9393                addObserver:self 
    94                 selector:@selector(connectionGotServerInfo:) 
    95                 name:WCConnectionGotServerInfo 
    96                 object:NULL]; 
    97  
     94                   selector:@selector(connectionShouldTerminate:) 
     95                          name:WCConnectionShouldTerminate 
     96                        object:NULL]; 
     97         
    9898        [[NSNotificationCenter defaultCenter] 
    9999                addObserver:self 
    100                 selector:@selector(connectionGotPrivileges:) 
    101                 name:WCConnectionGotPrivileges 
    102                 object:NULL]; 
    103  
     100                   selector:@selector(connectionGotServerInfo:) 
     101                           name:WCConnectionGotServerInfo 
     102                         object:NULL]; 
     103         
     104        [[NSNotificationCenter defaultCenter] 
     105                addObserver:self 
     106                   selector:@selector(connectionGotPrivileges:) 
     107                           name:WCConnectionGotPrivileges 
     108                         object:NULL]; 
     109         
    104110        // --- start connection 
    105111        [_client connect:url]; 
     
    122128 
    123129#pragma mark - 
     130 
     131- (void)connectionHasAttached:(NSNotification *)notification { 
     132        NSString                *uid; 
     133        WCConnection    *connection; 
     134         
     135        // --- get objects 
     136        connection      = [[notification object] objectAtIndex:0]; 
     137        uid                     = [[notification object] objectAtIndex:1]; 
     138         
     139        if(connection != self) 
     140                return; 
     141         
     142        // --- get uid 
     143        _uid = [uid intValue]; 
     144} 
     145 
     146 
    124147 
    125148- (void)connectionShouldTerminate:(NSNotification *)notification { 
     
    279302} 
    280303 
     304 
     305 
     306- (unsigned int)uid { 
     307        return _uid; 
     308} 
     309 
    281310@end 
  • WiredClient/trunk/WCConsole.m

    r944 r977  
    1 /* $Id: WCConsole.m,v 1.1 2004/03/08 19:23:42 morris Exp $ */ 
     1/* $Id: WCConsole.m,v 1.2 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    8383 
    8484- (void)connectionHasAttached:(NSNotification *)notification { 
    85         if([notification object] != _connection) 
     85        if([[notification object] objectAtIndex:0] != _connection) 
    8686                return; 
    8787                 
  • WiredClient/trunk/WCMessages.m

    r961 r977  
    1 /* $Id: WCMessages.m,v 1.3 2004/03/11 18:33:18 morris Exp $ */ 
     1/* $Id: WCMessages.m,v 1.4 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    128128 
    129129- (void)connectionHasAttached:(NSNotification *)notification { 
    130         if([notification object] != _connection) 
     130        if([[notification object] objectAtIndex:0] != _connection) 
    131131                return; 
    132132                 
  • WiredClient/trunk/WCNews.m

    r944 r977  
    1 /* $Id: WCNews.m,v 1.1 2004/03/08 19:23:43 morris Exp $ */ 
     1/* $Id: WCNews.m,v 1.2 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    126126 
    127127- (void)connectionHasAttached:(NSNotification *)notification { 
    128         if([notification object] != _connection) 
     128        if([[notification object] objectAtIndex:0] != _connection) 
    129129                return; 
    130130                 
  • WiredClient/trunk/WCPublicChat.m

    r968 r977  
    1 /* $Id: WCPublicChat.m,v 1.3 2004/03/13 02:38:16 morris Exp $ */ 
     1/* $Id: WCPublicChat.m,v 1.4 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    145145 
    146146- (void)connectionHasAttached:(NSNotification *)notification { 
    147         if([notification object] != _connection) 
     147        if([[notification object] objectAtIndex:0] != _connection) 
    148148                return; 
    149149         
     
    153153 
    154154        // --- show window 
    155         if([notification object] == _connection) 
    156                 [self showWindow:self]; 
     155        [self showWindow:self]; 
    157156} 
    158157 
  • WiredClient/trunk/WCSearch.m

    r944 r977  
    1 /* $Id: WCSearch.m,v 1.1 2004/03/08 19:23:43 morris Exp $ */ 
     1/* $Id: WCSearch.m,v 1.2 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    150150 
    151151- (void)connectionHasAttached:(NSNotification *)notification { 
    152         if([notification object] != _connection) 
     152        if([[notification object] objectAtIndex:0] != _connection) 
    153153                return; 
    154154                 
  • WiredClient/trunk/WCServerInfo.m

    r944 r977  
    1 /* $Id: WCServerInfo.m,v 1.1 2004/03/08 19:23:43 morris Exp $ */ 
     1/* $Id: WCServerInfo.m,v 1.2 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    113113 
    114114- (void)connectionHasAttached:(NSNotification *)notification { 
    115         if([notification object] != _connection) 
     115        if([[notification object] objectAtIndex:0] != _connection) 
    116116                return; 
    117117         
  • WiredClient/trunk/WCTransfers.m

    r944 r977  
    1 /* $Id: WCTransfers.m,v 1.1 2004/03/08 19:23:44 morris Exp $ */ 
     1/* $Id: WCTransfers.m,v 1.2 2004/03/14 04:40:05 morris Exp $ */ 
    22 
    33/* 
     
    160160 
    161161- (void)connectionHasAttached:(NSNotification *)notification { 
    162         if([notification object] != _connection) 
     162        if([[notification object] objectAtIndex:0] != _connection) 
    163163                return; 
    164164