Changeset 1383
- Timestamp:
- 07/28/04 10:00:26 (4 years ago)
- Files:
-
- WiredClient/trunk/NSThreadAdditions.h (modified) (3 diffs)
- WiredClient/trunk/WCAccount.h (modified) (2 diffs)
- WiredClient/trunk/WCAccount.m (modified) (6 diffs)
- WiredClient/trunk/WCAccountEditor.h (modified) (2 diffs)
- WiredClient/trunk/WCAccounts.h (modified) (2 diffs)
- WiredClient/trunk/WCApplication.h (modified) (2 diffs)
- WiredClient/trunk/WCChat.h (modified) (4 diffs)
- WiredClient/trunk/WCConnection.h (modified) (3 diffs)
- WiredClient/trunk/WCError.h (modified) (3 diffs)
- WiredClient/trunk/WCFile.h (modified) (3 diffs)
- WiredClient/trunk/WCFile.m (modified) (6 diffs)
- WiredClient/trunk/WCFileInfo.h (modified) (2 diffs)
- WiredClient/trunk/WCFiles.h (modified) (2 diffs)
- WiredClient/trunk/WCFiles.m (modified) (4 diffs)
- WiredClient/trunk/WCIcons.h (modified) (2 diffs)
- WiredClient/trunk/WCMain.h (modified) (2 diffs)
- WiredClient/trunk/WCMessage.h (modified) (2 diffs)
- WiredClient/trunk/WCMessage.m (modified) (6 diffs)
- WiredClient/trunk/WCMessages.h (modified) (2 diffs)
- WiredClient/trunk/WCNews.h (modified) (2 diffs)
- WiredClient/trunk/WCPreferences.h (modified) (2 diffs)
- WiredClient/trunk/WCPreview.h (modified) (2 diffs)
- WiredClient/trunk/WCPreview.m (modified) (2 diffs)
- WiredClient/trunk/WCPrivateChat.h (modified) (2 diffs)
- WiredClient/trunk/WCSearch.h (modified) (2 diffs)
- WiredClient/trunk/WCSecureSocket.h (modified) (2 diffs)
- WiredClient/trunk/WCServer.h (modified) (3 diffs)
- WiredClient/trunk/WCServer.m (modified) (5 diffs)
- WiredClient/trunk/WCServerInfo.h (modified) (2 diffs)
- WiredClient/trunk/WCStats.h (modified) (2 diffs)
- WiredClient/trunk/WCToolbar.h (modified) (2 diffs)
- WiredClient/trunk/WCTracker.h (modified) (2 diffs)
- WiredClient/trunk/WCTracker.m (modified) (7 diffs)
- WiredClient/trunk/WCTrackers.h (modified) (2 diffs)
- WiredClient/trunk/WCTransfer.h (modified) (4 diffs)
- WiredClient/trunk/WCTransfer.m (modified) (10 diffs)
- WiredClient/trunk/WCTransfers.h (modified) (2 diffs)
- WiredClient/trunk/WCTransfers.m (modified) (2 diffs)
- WiredClient/trunk/WCUserInfo.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/NSThreadAdditions.h
r1196 r1383 1 /* $Id: NSThreadAdditions.h,v 1. 1 2004/05/17 11:14:26 morris Exp $ */1 /* $Id: NSThreadAdditions.h,v 1.2 2004/07/28 08:00:26 morris Exp $ */ 2 2 3 3 /* … … 29 29 @interface NSThread(WCScheduling) 30 30 31 #define NSThreadPortKey@"NSThreadPortKey"31 #define NSThreadPortKey @"NSThreadPortKey" 32 32 33 33 34 + (void) setMainThread;35 + (NSThread *) mainThread;36 + (BOOL) isMainThread;34 + (void) setMainThread; 35 + (NSThread *) mainThread; 36 + (BOOL) isMainThread; 37 37 38 38 @end … … 42 42 43 43 struct NSInvocationMessage { 44 NSInvocation *invocation;44 NSInvocation *invocation; 45 45 }; 46 typedef struct NSInvocationMessage NSInvocationMessage; 46 47 47 48 48 - (void) performSelectorOnMainThread:(SEL)selector;49 - (void) performSelectorOnMainThread:(SEL)selector withObject:(id)object1;50 - (void) performSelectorOnMainThread:(SEL)selector withObject:(id)object1 withObject:(id)object2;51 - (void) performSelectorOnMainThread:(SEL)selector withObject:(id)object1 withObject:(id)object2 withObject:(id)object3;49 - (void) performSelectorOnMainThread:(SEL)selector; 50 - (void) performSelectorOnMainThread:(SEL)selector withObject:(id)object1; 51 - (void) performSelectorOnMainThread:(SEL)selector withObject:(id)object1 withObject:(id)object2; 52 - (void) performSelectorOnMainThread:(SEL)selector withObject:(id)object1 withObject:(id)object2 withObject:(id)object3; 52 53 53 54 @end WiredClient/trunk/WCAccount.h
r1377 r1383 1 /* $Id: WCAccount.h,v 1. 4 2004/07/27 18:28:26 morris Exp $ */1 /* $Id: WCAccount.h,v 1.5 2004/07/28 08:00:26 morris Exp $ */ 2 2 3 3 /* … … 27 27 */ 28 28 29 enum WCAccountType { 30 WCAccountTypeUser = 0, 31 WCAccountTypeGroup 32 }; 33 typedef enum WCAccountType WCAccountType; 34 35 29 36 @interface WCAccount : NSObject <NSCoding> { 30 unsigned int_type;31 NSString *_name;32 NSArray *_privileges;37 WCAccountType _type; 38 NSString *_name; 39 NSArray *_privileges; 33 40 } 34 41 35 42 36 enum WCAccountType { 37 WCAccountTypeUser = 0, 38 WCAccountTypeGroup 39 }; 43 - (id) initWithType:(WCAccountType)type; 40 44 45 - (void) setType:(WCAccountType)value; 46 - (WCAccountType) type; 41 47 42 - (id) initWithType:(unsigned int)type; 48 - (void) setName:(NSString *)value; 49 - (NSString *) name; 43 50 44 - (void) setType:(unsigned int)value;45 - ( unsigned int) type;51 - (void) setPrivileges:(NSArray *)privileges; 52 - (NSArray *) privileges; 46 53 47 - (void) setName:(NSString *)value; 48 - (NSString *) name; 54 - (BOOL) getUserInfo; 55 - (BOOL) broadcast; 56 - (BOOL) postNews; 57 - (BOOL) clearNews; 58 - (BOOL) download; 59 - (BOOL) upload; 60 - (BOOL) uploadAnywhere; 61 - (BOOL) createFolders; 62 - (BOOL) alterFiles; 63 - (BOOL) deleteFiles; 64 - (BOOL) viewDropBoxes; 65 - (BOOL) createAccounts; 66 - (BOOL) editAccounts; 67 - (BOOL) deleteAccounts; 68 - (BOOL) elevatePrivileges; 69 - (BOOL) kickUsers; 70 - (BOOL) banUsers; 71 - (BOOL) cannotBeKicked; 72 - (BOOL) setTopic; 49 73 50 - (void) setPrivileges:(NSArray *)privileges; 51 - (NSArray *) privileges; 52 53 - (BOOL) getUserInfo; 54 - (BOOL) broadcast; 55 - (BOOL) postNews; 56 - (BOOL) clearNews; 57 - (BOOL) download; 58 - (BOOL) upload; 59 - (BOOL) uploadAnywhere; 60 - (BOOL) createFolders; 61 - (BOOL) alterFiles; 62 - (BOOL) deleteFiles; 63 - (BOOL) viewDropBoxes; 64 - (BOOL) createAccounts; 65 - (BOOL) editAccounts; 66 - (BOOL) deleteAccounts; 67 - (BOOL) elevatePrivileges; 68 - (BOOL) kickUsers; 69 - (BOOL) banUsers; 70 - (BOOL) cannotBeKicked; 71 - (BOOL) setTopic; 72 73 - (NSComparisonResult) nameSort:(WCAccount *)other; 74 - (NSComparisonResult) typeSort:(WCAccount *)other; 74 - (NSComparisonResult) nameSort:(WCAccount *)other; 75 - (NSComparisonResult) typeSort:(WCAccount *)other; 75 76 76 77 @end WiredClient/trunk/WCAccount.m
r1377 r1383 1 /* $Id: WCAccount.m,v 1. 4 2004/07/27 18:28:26 morris Exp $ */1 /* $Id: WCAccount.m,v 1.5 2004/07/28 08:00:26 morris Exp $ */ 2 2 3 3 /* … … 31 31 @implementation WCAccount 32 32 33 - (id)initWithType:( unsigned int)type {33 - (id)initWithType:(WCAccountType)type { 34 34 self = [super init]; 35 35 … … 56 56 self = [super init]; 57 57 58 [coder decodeValueOfObjCType:@encode( unsigned int) at:&_type];58 [coder decodeValueOfObjCType:@encode(WCAccountType) at:&_type]; 59 59 60 60 _name = [[coder decodeObject] retain]; … … 67 67 68 68 - (void)encodeWithCoder:(NSCoder *)coder { 69 [coder encodeValueOfObjCType:@encode( unsigned int) at:&_type];69 [coder encodeValueOfObjCType:@encode(WCAccountType) at:&_type]; 70 70 71 71 [coder encodeObject:_name]; … … 78 78 79 79 80 - (void)setType:( unsigned int)value {80 - (void)setType:(WCAccountType)value { 81 81 _type = value; 82 82 } … … 84 84 85 85 86 - ( unsigned int)type {86 - (WCAccountType)type { 87 87 return _type; 88 88 } WiredClient/trunk/WCAccountEditor.h
r1377 r1383 1 /* $Id: WCAccountEditor.h,v 1. 2 2004/07/27 18:28:26 morris Exp $ */1 /* $Id: WCAccountEditor.h,v 1.3 2004/07/28 08:00:26 morris Exp $ */ 2 2 3 3 /* … … 32 32 33 33 @interface WCAccountEditor : WCWindowController { 34 IBOutlet NSPopUpButton *_typePopUpButton;35 IBOutlet NSMenuItem *_userMenuItem;36 IBOutlet NSMenuItem *_groupMenuItem;34 IBOutlet NSPopUpButton *_typePopUpButton; 35 IBOutlet NSMenuItem *_userMenuItem; 36 IBOutlet NSMenuItem *_groupMenuItem; 37 37 38 IBOutlet NSTextField *_nameTextField;39 IBOutlet NSSecureTextField *_passwordTextField;38 IBOutlet NSTextField *_nameTextField; 39 IBOutlet NSSecureTextField *_passwordTextField; 40 40 41 IBOutlet NSPopUpButton *_groupPopUpButton;42 IBOutlet NSMenuItem *_noneMenuItem;41 IBOutlet NSPopUpButton *_groupPopUpButton; 42 IBOutlet NSMenuItem *_noneMenuItem; 43 43 44 IBOutlet NSButton *_getUserInfoButton;45 IBOutlet NSButton *_broadcastButton;46 IBOutlet NSButton *_setTopicButton;47 IBOutlet NSButton *_postNewsButton;48 IBOutlet NSButton *_clearNewsButton;44 IBOutlet NSButton *_getUserInfoButton; 45 IBOutlet NSButton *_broadcastButton; 46 IBOutlet NSButton *_setTopicButton; 47 IBOutlet NSButton *_postNewsButton; 48 IBOutlet NSButton *_clearNewsButton; 49 49 50 IBOutlet NSButton *_downloadButton;51 IBOutlet NSButton *_uploadButton;52 IBOutlet NSButton *_uploadAnywhereButton;53 IBOutlet NSButton *_createFoldersButton;54 IBOutlet NSButton *_moveButton;55 IBOutlet NSButton *_deleteButton;56 IBOutlet NSButton *_viewDropBoxButton;50 IBOutlet NSButton *_downloadButton; 51 IBOutlet NSButton *_uploadButton; 52 IBOutlet NSButton *_uploadAnywhereButton; 53 IBOutlet NSButton *_createFoldersButton; 54 IBOutlet NSButton *_moveButton; 55 IBOutlet NSButton *_deleteButton; 56 IBOutlet NSButton *_viewDropBoxButton; 57 57 58 IBOutlet NSButton *_createAccountsButton;59 IBOutlet NSButton *_editAccountsButton;60 IBOutlet NSButton *_deleteAccountsButton;61 IBOutlet NSButton *_elevatePrivilegesButton;62 IBOutlet NSButton *_kickUsersButton;63 IBOutlet NSButton *_banUsersButton;64 IBOutlet NSButton *_cannotBeKickedButton;58 IBOutlet NSButton *_createAccountsButton; 59 IBOutlet NSButton *_editAccountsButton; 60 IBOutlet NSButton *_deleteAccountsButton; 61 IBOutlet NSButton *_elevatePrivilegesButton; 62 IBOutlet NSButton *_kickUsersButton; 63 IBOutlet NSButton *_banUsersButton; 64 IBOutlet NSButton *_cannotBeKickedButton; 65 65 66 IBOutlet NSTextField *_downloadSpeedTextField;67 IBOutlet NSTextField *_uploadSpeedTextField;66 IBOutlet NSTextField *_downloadSpeedTextField; 67 IBOutlet NSTextField *_uploadSpeedTextField; 68 68 69 IBOutlet NSButton *_selectAllButton;70 IBOutlet NSButton *_okButton;69 IBOutlet NSButton *_selectAllButton; 70 IBOutlet NSButton *_okButton; 71 71 72 NSMutableArray *_groups;72 NSMutableArray *_groups; 73 73 74 WCAccount *_account;74 WCAccount *_account; 75 75 76 NSString *_password;77 NSString *_group;76 NSString *_password; 77 NSString *_group; 78 78 } 79 79 80 80 81 #define WCAccountEditorShouldShowUser @"WCAccountEditorShouldShowUser"82 #define WCAccountEditorShouldShowGroup @"WCAccountEditorShouldShowGroup"81 #define WCAccountEditorShouldShowUser @"WCAccountEditorShouldShowUser" 82 #define WCAccountEditorShouldShowGroup @"WCAccountEditorShouldShowGroup" 83 83 84 84 85 - (id) initWithConnection:(WCConnection *)connection;86 - (id) initWithConnection:(WCConnection *)connection edit:(WCAccount *)account;85 - (id) initWithConnection:(WCConnection *)connection; 86 - (id) initWithConnection:(WCConnection *)connection edit:(WCAccount *)account; 87 87 88 - (IBAction) create:(id)sender;89 - (IBAction) edit:(id)sender;90 - (IBAction) selectAll:(id)sender;91 - (IBAction) type:(id)sender;92 - (IBAction) group:(id)sender;88 - (IBAction) create:(id)sender; 89 - (IBAction) edit:(id)sender; 90 - (IBAction) selectAll:(id)sender; 91 - (IBAction) type:(id)sender; 92 - (IBAction) group:(id)sender; 93 93 94 94 @end WiredClient/trunk/WCAccounts.h
r1088 r1383 1 /* $Id: WCAccounts.h,v 1. 4 2004/03/27 21:43:30morris Exp $ */1 /* $Id: WCAccounts.h,v 1.5 2004/07/28 08:00:26 morris Exp $ */ 2 2 3 3 /* … … 32 32 33 33 @interface WCAccounts : WCWindowController { 34 IBOutlet NSTableView *_accountsTableView;34 IBOutlet NSTableView *_accountsTableView; 35 35 36 IBOutlet NSProgressIndicator *_progressIndicator;36 IBOutlet NSProgressIndicator *_progressIndicator; 37 37 38 IBOutlet NSTextField *_statusTextField;38 IBOutlet NSTextField *_statusTextField; 39 39 40 IBOutlet NSButton *_addButton;41 IBOutlet NSButton *_editButton;42 IBOutlet NSButton *_deleteButton;43 IBOutlet NSButton *_reloadButton;40 IBOutlet NSButton *_addButton; 41 IBOutlet NSButton *_editButton; 42 IBOutlet NSButton *_deleteButton; 43 IBOutlet NSButton *_reloadButton; 44 44 45 NSMutableArray *_allAccounts, *_shownAccounts;46 NSImage *_userImage, *_groupImage;47 int _users, _groups;45 NSMutableArray *_allAccounts, *_shownAccounts; 46 NSImage *_userImage, *_groupImage; 47 int _users, _groups; 48 48 49 NSImage *_sortUpImage, *_sortDownImage;50 NSTableColumn *_lastTableColumn;51 BOOL _sortDescending;49 NSImage *_sortUpImage, *_sortDownImage; 50 NSTableColumn *_lastTableColumn; 51 BOOL _sortDescending; 52 52 } 53 53 54 54 55 #define WCAccountsShouldReload @"WCAccountsShouldReload"56 #define WCAccountsShouldAddUser @"WCAccountsShouldAddUser"57 #define WCAccountsShouldCompleteUsers @"WCAccountsShouldCompleteUsers"58 #define WCAccountsShouldAddGroup @"WCAccountsShouldAddGroup"59 #define WCAccountsShouldCompleteGroups @"WCAccountsShouldCompleteGroups"55 #define WCAccountsShouldReload @"WCAccountsShouldReload" 56 #define WCAccountsShouldAddUser @"WCAccountsShouldAddUser" 57 #define WCAccountsShouldCompleteUsers @"WCAccountsShouldCompleteUsers" 58 #define WCAccountsShouldAddGroup @"WCAccountsShouldAddGroup" 59 #define WCAccountsShouldCompleteGroups @"WCAccountsShouldCompleteGroups" 60 60 61 61 62 - (id) initWithConnection:(WCConnection *)connection;62 - (id) initWithConnection:(WCConnection *)connection; 63 63 64 - (void) update;65 - (void) updateStatus;66 - (void) updateButtons;64 - (void) update; 65 - (void) updateStatus; 66 - (void) updateButtons; 67 67 68 - (IBAction) add:(id)sender;69 - (IBAction) edit:(id)sender;70 - (IBAction) delete:(id)sender;71 - (IBAction) reload:(id)sender;68 - (IBAction) add:(id)sender; 69 - (IBAction) edit:(id)sender; 70 - (IBAction) delete:(id)sender; 71 - (IBAction) reload:(id)sender; 72 72 73 73 @end WiredClient/trunk/WCApplication.h
r944 r1383 1 /* $Id: WCApplication.h,v 1. 1 2004/03/08 19:23:42morris Exp $ */1 /* $Id: WCApplication.h,v 1.2 2004/07/28 08:00:26 morris Exp $ */ 2 2 3 3 /* … … 29 29 @interface WCApplication : NSApplication 30 30 31 #define WCApplicationDidChangeStatus @"WCApplicationDidChangeStatus"31 #define WCApplicationDidChangeStatus @"WCApplicationDidChangeStatus" 32 32 33 33 @end WiredClient/trunk/WCChat.h
r1382 r1383 1 /* $Id: WCChat.h,v 1.1 7 2004/07/27 19:07:00morris Exp $ */1 /* $Id: WCChat.h,v 1.18 2004/07/28 08:00:26 morris Exp $ */ 2 2 3 3 /* … … 29 29 #import "WCWindowController.h" 30 30 31 @class WCConnection, WCSplitView, WCTextView, WCTableView;32 33 @protocol WCTableViewMenuValidation;34 35 31 @protocol WCGetInfoValidation 36 32 … … 40 36 41 37 @end 38 39 40 @class WCConnection, WCSplitView, WCTextView, WCTableView; 41 42 @protocol WCTableViewMenuValidation; 42 43 43 44 @interface WCChat : WCWindowController <WCGetInfoValidation> { … … 80 81 81 82 82 #define WCChatShouldAddUser@"WCChatShouldAddUser"83 #define WCChatShouldCompleteUsers@"WCChatShouldCompleteUsers"84 #define WCChatShouldReloadListing@"WCChatShouldReloadListing"85 #define WCUserHasJoined@"WCUserHasJoined"86 #define WCUserHasLeft@"WCUserHasLeft"87 #define WCUserHasChanged@"WCUserHasChanged"88 #define WCUserIconHasChanged@"WCUserIconHasChanged"89 #define WCUserWasKicked@"WCUserWasKicked"90 #define WCUserWasBanned@"WCUserWasBanned"91 #define WCChatShouldPrintChat@"WCChatShouldPrintChat"92 #define WCChatShouldPrintAction@"WCChatShouldPrintAction"93 #define WCChatShouldShowTopic@"WCChatShouldShowTopic"83 #define WCChatShouldAddUser @"WCChatShouldAddUser" 84 #define WCChatShouldCompleteUsers @"WCChatShouldCompleteUsers" 85 #define WCChatShouldReloadListing @"WCChatShouldReloadListing" 86 #define WCUserHasJoined @"WCUserHasJoined" 87 #define WCUserHasLeft @"WCUserHasLeft" 88 #define WCUserHasChanged @"WCUserHasChanged" 89 #define WCUserIconHasChanged @"WCUserIconHasChanged" 90 #define WCUserWasKicked @"WCUserWasKicked" 91 #define WCUserWasBanned @"WCUserWasBanned" 92 #define WCChatShouldPrintChat @"WCChatShouldPrintChat" 93 #define WCChatShouldPrintAction @"WCChatShouldPrintAction" 94 #define WCChatShouldShowTopic @"WCChatShouldShowTopic" 94 95 95 #define WCChatPrepend1396 #define WCChatPrepend 13 96 97 97 #define WCUserPboardType@"WCUserPboardType"98 #define WCUserPboardType @"WCUserPboardType" 98 99 99 100 WiredClient/trunk/WCConnection.h
r1376 r1383 1 /* $Id: WCConnection.h,v 1.1 5 2004/07/27 17:37:44morris Exp $ */1 /* $Id: WCConnection.h,v 1.16 2004/07/28 08:00:26 morris Exp $ */ 2 2 3 3 /* … … 29 29 @protocol WCConnectionErrorHandling 30 30 31 - (BOOL) connectionShouldHandleError:(int)error;31 - (BOOL) connectionShouldHandleError:(int)error; 32 32 33 33 @end … … 38 38 @class WCCache, WCServerInfo, WCTracker; 39 39 40 41 40 @interface WCConnection : NSObject { 42 WCAccounts *_accounts;43 WCPublicChat *_chat;44 WCConsole *_console;45 WCError *_error;46 WCMessages *_messages;47 WCNews *_news;48 WCSearch *_search;49 WCSecureSocket *_socket;50 WCServerInfo *_serverInfo;51 WCToolbar *_toolbar;52 WCTransfers *_transfers;41 WCAccounts *_accounts; 42 WCPublicChat *_chat; 43 WCConsole *_console; 44 WCError *_error; 45 WCMessages *_messages; 46 WCNews *_news; 47 WCSearch *_search; 48 WCSecureSocket *_socket; 49 WCServerInfo *_serverInfo; 50 WCToolbar *_toolbar; 51 WCTransfers *_transfers; 53 52 54 WCCache *_cache;55 WCServer *_server;56 WCTracker *_tracker;53 WCCache *_cache; 54 WCServer *_server; 55 WCTracker *_tracker; 57 56 58 id _sender;59 NSTimer *_timer;60 unsigned int _type;61 unsigned int _uid;62 BOOL _connected, _cancelled;57 id _sender; 58 NSTimer *_timer; 59 unsigned int _type; 60 unsigned int _uid; 61 BOOL _connected, _cancelled; 63 62 } 64 63 65 64 66 #define WCServerProtocolVersion 1.1 67 #define WCTrackerProtocolVersion 1.0 68 69 #define WCConnectionTypeServer 0 70 #define WCConnectionTypeTracker 1 71 72 #define WCMessageSeparator @"\4" 73 #define WCFieldSeparator @"\34" 74 #define WCGroupSeparator @"\35" 75 #define WCRecordSeparator @"\36" 76 #define WCMessageLength 3 77 78 #define WCBanCommand @"BAN" 79 #define WCBannerCommand @"BANNER" 80 #define WCBroadcastCommand @"BROADCAST" 81 #define WCCategoriesCommand @"CATEGORIES" 82 #define WCClearNewsCommand @"CLEARNEWS" 83 #define WCClientCommand @"CLIENT" 84 #define WCCommentCommand @"COMMENT" 85 #define WCCreateUserCommand @"CREATEUSER" 86 #define WCCreateGroupCommand @"CREATEGROUP" 87 #define WCDeclineCommand @"DECLINE" 88 #define WCDeleteCommand @"DELETE" 89 #define WCDeleteUserCommand @"DELETEUSER" 90 #define WCDeleteGroupCommand @"DELETEGROUP" 91 #define WCEditUserCommand @"EDITUSER" 92 #define WCEditGroupCommand @"EDITGROUP" 93 #define WCFolderCommand @"FOLDER" 94 #define WCGetCommand @"GET" 95 #define WCGroupsCommand @"GROUPS" 96 #define WCHelloCommand @"HELLO" 97 #define  
