Changeset 1317
- Timestamp:
- 05/23/04 09:24:21 (4 years ago)
- Files:
-
- WiredClient/trunk/WCAccountEditor.m (modified) (11 diffs)
- WiredClient/trunk/WCAccounts.m (modified) (3 diffs)
- WiredClient/trunk/WCChat.m (modified) (9 diffs)
- WiredClient/trunk/WCConnection.h (modified) (5 diffs)
- WiredClient/trunk/WCConnection.m (modified) (11 diffs)
- WiredClient/trunk/WCFileInfo.m (modified) (6 diffs)
- WiredClient/trunk/WCFiles.m (modified) (5 diffs)
- WiredClient/trunk/WCMain.m (modified) (2 diffs)
- WiredClient/trunk/WCMessages.m (modified) (2 diffs)
- WiredClient/trunk/WCNews.m (modified) (4 diffs)
- WiredClient/trunk/WCPrivateChat.m (modified) (5 diffs)
- WiredClient/trunk/WCPublicChat.m (modified) (6 diffs)
- WiredClient/trunk/WCSearch.m (modified) (2 diffs)
- WiredClient/trunk/WCSendMessage.m (modified) (2 diffs)
- WiredClient/trunk/WCTransfers.h (modified) (3 diffs)
- WiredClient/trunk/WCTransfers.m (modified) (12 diffs)
- WiredClient/trunk/WCUserInfo.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCAccountEditor.m
r1298 r1317 1 /* $Id: WCAccountEditor.m,v 1. 8 2004/05/22 02:18:09morris Exp $ */1 /* $Id: WCAccountEditor.m,v 1.9 2004/05/23 07:24:21 morris Exp $ */ 2 2 3 3 /* … … 86 86 87 87 // --- send groups command 88 [_connection sendCommand:WCGroupsCommand ];88 [_connection sendCommand:WCGroupsCommand withSender:self]; 89 89 90 90 // --- set up for edit or create … … 99 99 100 100 // --- send read command 101 [_connection sendCommand:WCReadUserCommand withArgument:[_account name]]; 101 [_connection sendCommand:WCReadUserCommand 102 withArgument:[_account name] 103 withSender:self]; 102 104 break; 103 105 … … 108 110 109 111 // --- send read command 110 [_connection sendCommand:WCReadGroupCommand withArgument:[_account name]]; 112 [_connection sendCommand:WCReadGroupCommand 113 withArgument:[_account name] 114 withSender:self]; 111 115 break; 112 116 } … … 412 416 // --- send create account command 413 417 if([_typePopUpButton selectedItem] == _userMenuItem) { 414 [_connection sendCommand:WCCreateUserCommand withArgument:[NSString stringWithFormat: 418 [_connection sendCommand:WCCreateUserCommand 419 withArgument:[NSString stringWithFormat: 415 420 @"%@%@%@%@%@%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u", 416 421 [_nameTextField stringValue], … … 458 463 [_downloadSpeedTextField intValue] * 1024, 459 464 WCFieldSeparator, 460 [_uploadSpeedTextField intValue] * 1024]]; 465 [_uploadSpeedTextField intValue] * 1024] 466 withSender:self]; 461 467 } 462 468 else if([_typePopUpButton selectedItem] == _groupMenuItem) { 463 [_connection sendCommand:WCCreateGroupCommand withArgument:[NSString stringWithFormat: 469 [_connection sendCommand:WCCreateGroupCommand 470 withArgument:[NSString stringWithFormat: 464 471 @"%@ %@%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u", 465 472 [_nameTextField stringValue], … … 503 510 [_downloadSpeedTextField intValue] * 1024, 504 511 WCFieldSeparator, 505 [_uploadSpeedTextField intValue] * 1024]]; 512 [_uploadSpeedTextField intValue] * 1024] 513 withSender:self]; 506 514 } 507 515 … … 545 553 // --- send edit account command 546 554 if([_account type] == WCAccountTypeUser) { 547 [_connection sendCommand:WCEditUserCommand withArgument:[NSString stringWithFormat: 555 [_connection sendCommand:WCEditUserCommand 556 withArgument:[NSString stringWithFormat: 548 557 @"%@%@%@%@%@%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u", 549 558 [_nameTextField stringValue], … … 591 600 [_downloadSpeedTextField intValue] * 1024, 592 601 WCFieldSeparator, 593 [_uploadSpeedTextField intValue] * 1024]]; 602 [_uploadSpeedTextField intValue] * 1024] 603 withSender:self]; 594 604 } else { 595 [_connection sendCommand:WCEditGroupCommand withArgument:[NSString stringWithFormat: 605 [_connection sendCommand:WCEditGroupCommand 606 withArgument:[NSString stringWithFormat: 596 607 @"%@ %@%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u%@%u", 597 608 [_nameTextField stringValue], … … 635 646 [_downloadSpeedTextField intValue] * 1024, 636 647 WCFieldSeparator, 637 [_uploadSpeedTextField intValue] * 1024]]; 648 [_uploadSpeedTextField intValue] * 1024] 649 withSender:self]; 638 650 } 639 651 … … 779 791 // --- send read group command 780 792 [_connection sendCommand:WCReadGroupCommand 781 withArgument:[[_groupPopUpButton selectedItem] title]]; 793 withArgument:[[_groupPopUpButton selectedItem] title] 794 withSender:self]; 782 795 783 796 // --- disable buttons WiredClient/trunk/WCAccounts.m
r1298 r1317 1 /* $Id: WCAccounts.m,v 1.1 4 2004/05/22 02:18:09morris Exp $ */1 /* $Id: WCAccounts.m,v 1.15 2004/05/23 07:24:21 morris Exp $ */ 2 2 3 3 /* … … 365 365 366 366 // --- send delete command 367 [_connection sendCommand:command withArgument:[account name] ];367 [_connection sendCommand:command withArgument:[account name] withSender:self]; 368 368 369 369 // --- reload listing … … 541 541 542 542 // --- send the list commands 543 [_connection sendCommand:WCUsersCommand ];544 [_connection sendCommand:WCGroupsCommand ];543 [_connection sendCommand:WCUsersCommand withSender:self]; 544 [_connection sendCommand:WCGroupsCommand withSender:self]; 545 545 } 546 546 WiredClient/trunk/WCChat.m
r1316 r1317 1 /* $Id: WCChat.m,v 1.4 7 2004/05/23 03:29:02morris Exp $ */1 /* $Id: WCChat.m,v 1.48 2004/05/23 07:24:21 morris Exp $ */ 2 2 3 3 /* … … 995 995 [_connection sendCommand:WCMeCommand 996 996 withArgument:[NSString stringWithFormat:@"%u", _cid] 997 withArgument:line]; 997 withArgument:line 998 withSender:self]; 998 999 } else { 999 1000 [_connection sendCommand:WCSayCommand 1000 1001 withArgument:[NSString stringWithFormat:@"%u", _cid] 1001 withArgument:line]; 1002 withArgument:line 1003 withSender:self]; 1002 1004 } 1003 1005 } … … 1322 1324 [_connection sendCommand:WCMeCommand 1323 1325 withArgument:[NSString stringWithFormat:@"%u", _cid] 1324 withArgument:argument]; 1326 withArgument:argument 1327 withSender:self]; 1325 1328 1326 1329 // --- save in stats … … 1378 1381 [_connection sendCommand:WCSayCommand 1379 1382 withArgument:[NSString stringWithFormat:@"%u", _cid] 1380 withArgument:each]; 1383 withArgument:each 1384 withSender:self]; 1381 1385 } 1382 1386 } … … 1391 1395 else if(([command isEqualToString:@"/nick"] || 1392 1396 [command isEqualToString:@"/n"]) && [argument length] > 0) { 1393 [_connection sendCommand:WCNickCommand withArgument:argument ];1397 [_connection sendCommand:WCNickCommand withArgument:argument withSender:self]; 1394 1398 1395 1399 return YES; … … 1399 1403 [_connection sendCommand:WCIconCommand 1400 1404 withArgument:argument 1401 withArgument:@""]; 1405 withArgument:@"" 1406 withSender:self]; 1402 1407 } else { 1403 [_connection sendCommand:WCIconCommand withArgument:argument ];1408 [_connection sendCommand:WCIconCommand withArgument:argument withSender:self]; 1404 1409 } 1405 1410 … … 1408 1413 else if(([command isEqualToString:@"/status"] || 1409 1414 [command isEqualToString:@"/s"]) && [argument length] > 0) { 1410 [_connection sendCommand:WCStatusCommand withArgument:argument ];1415 [_connection sendCommand:WCStatusCommand withArgument:argument withSender:self]; 1411 1416 1412 1417 return YES; … … 1415 1420 [_connection sendCommand:WCIconCommand 1416 1421 withArgument:[NSString stringWithFormat:@"%u", _cid] 1417 withArgument:[WCStats stats]]; 1422 withArgument:[WCStats stats] 1423 withSender:self]; 1418 1424 1419 1425 return YES; … … 1442 1448 [_connection sendCommand:WCIconCommand 1443 1449 withArgument:[NSString stringWithFormat:@"%u", uid] 1444 withArgument:argument]; 1450 withArgument:argument 1451 withSender:self]; 1445 1452 1446 1453 return YES; WiredClient/trunk/WCConnection.h
r1302 r1317 1 /* $Id: WCConnection.h,v 1. 9 2004/05/22 08:06:59morris Exp $ */1 /* $Id: WCConnection.h,v 1.10 2004/05/23 07:24:21 morris Exp $ */ 2 2 3 3 /* … … 27 27 */ 28 28 29 @protocol WCConnectionErrorHandling 30 31 - (void) connectionShouldHandleError:(int)error; 32 33 @end 34 35 29 36 @class WCAccounts, WCPublicChat, WCConsole, WCError, WCMessages, WCAccount; 30 37 @class WCNews, WCSearch, WCSecureSocket, WCToolbar, WCTransfers, WCServer; 31 38 @class WCCache, WCServerInfo, WCTracker; 39 32 40 33 41 @interface WCConnection : NSObject { … … 48 56 WCTracker *_tracker; 49 57 58 id _sender; 50 59 NSTimer *_timer; 51 60 unsigned int _type; … … 121 130 #define WCConnectionShouldTerminate @"WCConnectionShouldTerminate" 122 131 #define WCConnectionShouldCancel @"WCConnectionShouldCancel" 123 #define WCConnectionDidBecomeActive @"WCConnectionDidBecomeActive"124 132 133 #define WCConnectionGotServerError @"WCConnectionGotServerError" 125 134 #define WCConnectionGotServerInfo @"WCConnectionGotServerInfo" 126 135 #define WCConnectionGotPrivileges @"WCConnectionGotPrivileges" … … 134 143 - (id) initTrackerConnectionWithURL:(NSURL *)url tracker:(WCTracker *)tracker; 135 144 136 - (void) sendCommand:(NSString *)command ;137 - (void) sendCommand:(NSString *)command withArgument:(NSString *)argument1 ;138 - (void) sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 ;139 - (void) sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 withArgument:(NSString *)argument3 ;145 - (void) sendCommand:(NSString *)command withSender:(id)sender; 146 - (void) sendCommand:(NSString *)command withArgument:(NSString *)argument1 withSender:(id)sender; 147 - (void) sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 withSender:(id)sender;; 148 - (void) sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 withArgument:(NSString *)argument3 withSender:(id)sender; 140 149 - (void) receiveData:(NSData *)data; 141 150 WiredClient/trunk/WCConnection.m
r1315 r1317 1 /* $Id: WCConnection.m,v 1.1 3 2004/05/23 03:14:22morris Exp $ */1 /* $Id: WCConnection.m,v 1.14 2004/05/23 07:24:21 morris Exp $ */ 2 2 3 3 /* … … 121 121 [[NSNotificationCenter defaultCenter] 122 122 addObserver:self 123 selector:@selector(connectionGotServerError:) 124 name:WCConnectionGotServerError 125 object:NULL]; 126 127 [[NSNotificationCenter defaultCenter] 128 addObserver:self 123 129 selector:@selector(connectionGotServerInfo:) 124 130 name:WCConnectionGotServerInfo … … 236 242 237 243 244 - (void)connectionShouldHandleError:(int)error { 245 switch(error) { 246 case 510: 247 case 511: 248 [[NSNotificationCenter defaultCenter] 249 postNotificationName:WCConnectionShouldTerminate 250 object:self]; 251 break; 252 } 253 } 254 255 256 257 - (void)connectionGotServerError:(NSNotification *)notification { 258 WCConnection *connection; 259 int error; 260 261 connection = [[notification object] objectAtIndex:0]; 262 error = [[[notification object] objectAtIndex:1] intValue]; 263 264 if(connection != self) 265 return; 266 267 switch(error) { 268 case 500: 269 [[self error] setError:WCServerErrorCommandFailed]; 270 [[self error] raiseError]; 271 break; 272 273 case 501: 274 [[self error] setError:WCServerErrorCommandNotRecognized]; 275 [[self error] raiseError]; 276 break; 277 278 case 502: 279 [[self error] setError:WCServerErrorCommandNotImplemented]; 280 [[self error] raiseError]; 281 break; 282 283 case 503: 284 [[self error] setError:WCServerErrorSyntaxError]; 285 [[self error] raiseError]; 286 break; 287 288 case 510: 289 [[self error] setError:WCServerErrorLoginFailed]; 290 [[self error] raiseErrorInWindow:[WCSharedMain shownWindow]]; 291 break; 292 293 case 511: 294 [[self error] setError:WCServerErrorBanned]; 295 [[self error] raiseErrorInWindow:[WCSharedMain shownWindow]]; 296 break; 297 298 case 512: 299 [[self error] setError:WCServerErrorClientNotFound]; 300 [[self error] raiseError]; 301 break; 302 303 case 513: 304 [[self error] setError:WCServerErrorAccountNotFound]; 305 [[self error] raiseError]; 306 break; 307 308 case 514: 309 [[self error] setError:WCServerErrorAccountExists]; 310 [[self error] raiseError]; 311 break; 312 313 case 515: 314 [[self error] setError:WCServerErrorCannotBeDisconnected]; 315 [[self error] raiseError]; 316 break; 317 318 case 516: 319 [[self error] setError:WCServerErrorPermissionDenied]; 320 [[self error] raiseError]; 321 break; 322 323 case 520: 324 [[self error] setError:WCServerErrorFileNotFound]; 325 [[self error] raiseError]; 326 break; 327 328 case 521: 329 [[self error] setError:WCServerErrorFileExists]; 330 [[self error] raiseError]; 331 break; 332 } 333 334 if([_sender respondsToSelector:@selector(connectionShouldHandleError:)]) 335 [_sender connectionShouldHandleError:error]; 336 } 337 338 339 238 340 - (void)connectionGotServerInfo:(NSNotification *)notification { 239 341 NSArray *fields; … … 268 370 269 371 // --- rest of login 270 [self sendCommand:WCNickCommand withArgument:[WCSettings objectForKey:WCNick]]; 372 [self sendCommand:WCNickCommand 373 withArgument:[WCSettings objectForKey:WCNick] 374 withSender:self]; 271 375 272 376 // --- protocol 1.1 … … 274 378 [self sendCommand:WCIconCommand 275 379 withArgument:[WCSettings objectForKey:WCIcon] 276 withArgument:[WCSettings objectForKey:WCCustomIcon]]; 277 [self sendCommand:WCStatusCommand withArgument:[WCSettings objectForKey:WCStatus]]; 380 withArgument:[WCSettings objectForKey:WCCustomIcon] 381 withSender:self]; 382 [self sendCommand:WCStatusCommand 383 withArgument:[WCSettings objectForKey:WCStatus] 384 withSender:self]; 278 385 } else { 279 [self sendCommand:WCIconCommand withArgument:[WCSettings objectForKey:WCIcon]]; 280 } 281 282 [self sendCommand:WCClientCommand withArgument:[WCSharedMain clientVersion]]; 283 [self sendCommand:WCUserCommand withArgument:[[url user] length] > 0 284 ? [[url user] stringByReplacingURLPercentEscapes] 285 : @"guest"]; 286 [self sendCommand:WCPassCommand withArgument:[[url password] length] > 0 287 ? [[[url password] stringByReplacingURLPercentEscapes] SHA1] 288 : @""]; 289 [self sendCommand:WCPrivilegesCommand]; 290 [self sendCommand:WCWhoCommand withArgument:[NSString stringWithFormat:@"%u", 1]]; 386 [self sendCommand:WCIconCommand 387 withArgument:[WCSettings objectForKey:WCIcon] 388 withSender:self]; 389 } 390 391 [self sendCommand:WCClientCommand 392 withArgument:[WCSharedMain clientVersion] 393 withSender:self]; 394 [self sendCommand:WCUserCommand 395 withArgument:[[url user] length] > 0 396 ? [[url user] stringByReplacingURLPercentEscapes] 397 : @"guest" 398 withSender:self]; 399 [self sendCommand:WCPassCommand 400 withArgument:[[url password] length] > 0 401 ? [[[url password] stringByReplacingURLPercentEscapes] SHA1] 402 : @"" 403 withSender:self]; 404 [self sendCommand:WCPrivilegesCommand withSender:self]; 405 [self sendCommand:WCWhoCommand 406 withArgument:[NSString stringWithFormat:@"%u", 1] 407 withSender:self]; 291 408 292 409 if([WCSettings boolForKey:WCLoadNewsOnLogin]) 293 [self sendCommand:WCNewsCommand ];410 [self sendCommand:WCNewsCommand withSender:self]; 294 411 295 412 // --- protocol 1.1 296 413 if([_server protocol] >= 1.1) 297 [self sendCommand:WCBannerCommand ];414 [self sendCommand:WCBannerCommand withSender:self]; 298 415 } 299 416 … … 364 481 365 482 // --- initial login 366 [self sendCommand:WCHelloCommand ];483 [self sendCommand:WCHelloCommand withSender:self]; 367 484 368 485 // --- start reading from server … … 419 536 420 537 // --- initial login 421 [self sendCommand:WCHelloCommand]; 422 [self sendCommand:WCClientCommand withArgument:[WCSharedMain clientVersion]]; 423 [self sendCommand:WCCategoriesCommand]; 424 [self sendCommand:WCServersCommand]; 538 [self sendCommand:WCHelloCommand withSender:self]; 539 [self sendCommand:WCClientCommand 540 withArgument:[WCSharedMain clientVersion] 541 withSender:self]; 542 [self sendCommand:WCCategoriesCommand withSender:self]; 543 [self sendCommand:WCServersCommand withSender:self]; 425 544 426 545 // --- start reading from server … … 445 564 446 565 - (void)pingTimer:(NSTimer *)timer { 447 [self sendCommand:WCPingCommand ];566 [self sendCommand:WCPingCommand withSender:self]; 448 567 } 449 568 … … 452 571 #pragma mark - 453 572 454 - (void)sendCommand:(NSString *)command { 455 [self sendCommand:command withArgument:NULL withArgument:NULL withArgument:NULL]; 456 } 457 458 459 460 - (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 { 461 [self sendCommand:command withArgument:argument1 withArgument:NULL withArgument:NULL]; 462 } 463 464 465 466 - (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 { 467 [self sendCommand:command withArgument:argument1 withArgument:argument2 withArgument:NULL]; 468 } 469 470 471 472 - (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 withArgument:(NSString *)argument3 { 573 - (void)sendCommand:(NSString *)command withSender:(id)sender { 574 [self sendCommand:command 575 withArgument:NULL 576 withArgument:NULL 577 withArgument:NULL 578 withSender:sender]; 579 } 580 581 582 583 - (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 withSender:(id)sender { 584 [self sendCommand:command 585 withArgument:argument1 586 withArgument:NULL 587 withArgument:NULL 588 withSender:sender]; 589 } 590 591 592 593 - (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 withSender:(id)sender { 594 [self sendCommand:command 595 withArgument:argument1 596 withArgument:argument2 597 withArgument:NULL 598 withSender:sender]; 599 } 600 601 602 603 - (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 withArgument:(NSString *)argument3 withSender:(id)sender { 473 604 NSString *string = command; 474 605 NSData *data; … … 487 618 command, argument1]; 488 619 } 620 621 // --- save sender 622 _sender = sender; 489 623 490 624 // --- write to console … … 704 838 705 839 case 500: 706 [[self error] setError:WCServerErrorCommandFailed];707 [[self error] raiseError];708 break;709 710 840 case 501: 711 [[self error] setError:WCServerErrorCommandNotRecognized];712 [[self error] raiseError];713 break;714 715 841 case 502: 716 [[self error] setError:WCServerErrorCommandNotImplemented];717 [[self error] raiseError];718 break;719 720 842 case 503: 721 [[self error] setError:WCServerErrorSyntaxError];722 [[self error] raiseError];723 break;724 725 843 case 510: 726 [[self error] setError:WCServerErrorLoginFailed];727 [[self error] raiseErrorInWindow:[WCSharedMain shownWindow]];728 729 [[NSNotificationCenter defaultCenter]730 mainThreadPostNotificationName:WCConnectionShouldTerminate731 object:self];732 733 [_socket close];734 break;735 736 844 case 511: 737 [[self error] setError:WCServerErrorBanned];738 [[self error] raiseErrorInWindow:[WCSharedMain shownWindow]];739 740 [[NSNotificationCenter defaultCenter]741 mainThreadPostNotificationName:WCConnectionShouldTerminate742 object:self];743 744 [_socket close];745 break;746 747 845 case 512: 748 [[self error] setError:WCServerErrorClientNotFound];749 [[self error] raiseError];750 break;751 752 846 case 513: 753 [[self error] setError:WCServerErrorAccountNotFound];754 [[self error] raiseError];755 break;756 757 847 case 514: 758 [[self error] setError:WCServerErrorAccountExists];759 [[self error] raiseError];760 break;761 762 848 case 515: 763 [[self error] setError:WCServerErrorCannotBeDisconnected];764 [[self error] raiseError];765 break;766 767 849 case 516: 768 [[self error] setError:WCServerErrorPermissionDenied];769 [[self error] raiseError];770 break;771 772 850 case 520: 773 [[self error] setError:WCServerErrorFileNotFound];774 [[self error] raiseError];775 break;776 777 851 case 521: 778 [[self error] setError:WCServerErrorFileExists]; 779 [[self error] raiseError]; 780 break; 781 852 [[NSNotificationCenter defaultCenter] 853 mainThreadPostNotificationName:WCConnectionGotServerError 854 object:[NSArray arrayWithObjects:self, [NSNumber numberWithInt:message], NULL]]; 855 break; 856 782 857 case 600: 783 858 [[NSNotificationCenter defaultCenter] WiredClient/trunk/WCFileInfo.m
r1304 r1317 1 /* $Id: WCFileInfo.m,v 1.1 2 2004/05/22 08:55:47morris Exp $ */1 /* $Id: WCFileInfo.m,v 1.13 2004/05/23 07:24:21 morris Exp $ */ 2 2 3 3 /* … … 67 67 68 68 // --- send the stat command 69 [_connection sendCommand:WCStatCommand withArgument:[_file path] ];69 [_connection sendCommand:WCStatCommand withArgument:[_file path] withSender:self]; 70 70 71 71 return self; … … 111 111 [_connection sendCommand:WCMoveCommand 112 112 withArgument:[_file path] 113 withArgument:[path stringByAppendingPathComponent:[_fileTextField stringValue]]]; 113 withArgument:[path stringByAppendingPathComponent:[_fileTextField stringValue]] 114 withSender:self]; 114 115 115 116 reload = YES; … … 124 125 [_connection sendCommand:WCCommentCommand 125 126 withArgument:[path stringByAppendingPathComponent:[_fileTextField stringValue]] 126 withArgument:[_commentTextField stringValue]]; 127 withArgument:[_commentTextField stringValue] 128 withSender:self]; 127 129 } 128 130 … … 137 139 withArgument:[path stringByAppendingPathComponent:[_fileTextField stringValue]] 138 140 withArgument:[NSString stringWithFormat:@"%u", 139 [_kindPopUpButton tagOfSelectedItem]]]; 141 [_kindPopUpButton tagOfSelectedItem]] 142 withSender:self]; 140 143 141 144 reload = YES; … … 162 165 if([notification object] == _connection) 163 166 [self close]; 167 } 168 169 170 171 172 - (void)connectionShouldHandleError:(int)error { 173 [self release]; 164 174 } 165 175 WiredClient/trunk/WCFiles.m
r1316 r1317 1 /* $Id: WCFiles.m,v 1.3 5 2004/05/23 03:29:02morris Exp $ */1 /* $Id: WCFiles.m,v 1.36 2004/05/23 07:24:21 morris Exp $ */ 2 2 3 3 /* … … 347 347 348 348 // --- send the delete command 349 [_connection sendCommand:WCDeleteCommand withArgument:[file path] ];349 [_connection sendCommand:WCDeleteCommand withArgument:[file path] withSender:self]; 350 350 351 351 // --- reload all files affected … … 366 366 367 367 // --- send the new folder command 368 [_connection sendCommand:WCFolderCommand withArgument:path ];368 [_connection sendCommand:WCFolderCommand withArgument:path withSender:self]; 369 369 370 370 // --- reload all files affected … … 547 547 548 548 // --- send the list command 549 [_connection sendCommand:WCListCommand withArgument:[_path path] ];549 [_connection sendCommand:WCListCommand withArgument:[_path path] withSender:self]; 550 550 } 551 551 } … … 1176 1176 [_connection sendCommand:WCMoveCommand 1177 1177 withArgument:[source path] 1178 withArgument:[[destination path] stringByAppendingPathComponent:[source name]]]; 1178 withArgument:[[destination path] stringByAppendingPathComponent:[source name]] 1179 withSender:self]; 1179 1180 1180 1181 // --- announce reloads on both this, the source and their parents WiredClient/trunk/WCMain.m
r1298 r1317 1 /* $Id: WCMain.m,v 1.2 7 2004/05/22 02:18:09morris Exp $ */1 /* $Id: WCMain.m,v 1.28 2004/05/23 07:24:21 morris Exp $ */ 2 2 3 3 /* … … 522 522 [connection sendCommand:WCSayCommand 523 523 &nbs
