Changeset 1547
- Timestamp:
- 08/28/04 16:57:01 (4 years ago)
- Files:
-
- WiredClient/trunk/WCAccount.h (modified) (2 diffs)
- WiredClient/trunk/WCAccount.m (modified) (6 diffs)
- WiredClient/trunk/WCAccounts.m (modified) (4 diffs)
- WiredClient/trunk/WCChat.m (modified) (7 diffs)
- WiredClient/trunk/WCFile.h (modified) (2 diffs)
- WiredClient/trunk/WCFile.m (modified) (9 diffs)
- WiredClient/trunk/WCFiles.m (modified) (3 diffs)
- WiredClient/trunk/WCMessage.h (modified) (2 diffs)
- WiredClient/trunk/WCMessage.m (modified) (5 diffs)
- WiredClient/trunk/WCMessages.m (modified) (4 diffs)
- WiredClient/trunk/WCOutlineView.m (modified) (2 diffs)
- WiredClient/trunk/WCReceiveMessage.m (modified) (2 diffs)
- WiredClient/trunk/WCSearch.m (modified) (3 diffs)
- WiredClient/trunk/WCServer.m (modified) (10 diffs)
- WiredClient/trunk/WCTableView.m (modified) (2 diffs)
- WiredClient/trunk/WCTracker.h (modified) (3 diffs)
- WiredClient/trunk/WCTracker.m (modified) (17 diffs)
- WiredClient/trunk/WCTrackers.m (modified) (5 diffs)
- WiredClient/trunk/WCTransfer.h (modified) (2 diffs)
- WiredClient/trunk/WCTransfer.m (modified) (17 diffs)
- WiredClient/trunk/WCTransfers.m (modified) (4 diffs)
- WiredClient/trunk/WCUser.h (modified) (3 diffs)
- WiredClient/trunk/WCUser.m (modified) (11 diffs)
- WiredClient/trunk/prefix.pch (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCAccount.h
r1383 r1547 1 /* $Id: WCAccount.h,v 1. 5 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCAccount.h,v 1.6 2004/08/28 14:57:01 morris Exp $ */ 2 2 3 3 /* … … 72 72 - (BOOL) setTopic; 73 73 74 - (NSComparisonResult) nameSort:(WCAccount *)other;75 - (NSComparisonResult) typeSort:(WCAccount *)other;76 77 74 @end WiredClient/trunk/WCAccount.m
r1423 r1547 1 /* $Id: WCAccount.m,v 1. 7 2004/08/05 20:21:14morris Exp $ */1 /* $Id: WCAccount.m,v 1.8 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 90 90 91 91 92 #pragma mark -93 94 92 - (void)setName:(NSString *)value { 95 93 [value retain]; … … 107 105 108 106 109 #pragma mark -110 111 107 - (void)setPrivileges:(NSArray *)value { 112 108 [value retain]; … … 242 238 #pragma mark - 243 239 244 - (NSComparisonResult) nameSort:(WCAccount *)other {240 - (NSComparisonResult)compareName:(WCAccount *)other { 245 241 return [_name compare:[other name] options:NSCaseInsensitiveSearch]; 246 242 } … … 248 244 249 245 250 - (NSComparisonResult)typeSort:(WCAccount *)other { 251 NSComparisonResult result; 252 246 - (NSComparisonResult)compareType:(WCAccount *)other { 253 247 // --- then sort by size 254 248 if(_type == WCAccountTypeUser && [other type] == WCAccountTypeGroup) … … 256 250 else if(_type == WCAccountTypeGroup && [other type] == WCAccountTypeUser) 257 251 return NSOrderedDescending; 258 else 259 result = [self nameSort:other]; 260 261 return result; 252 253 // --- ordered same - sort by name instead 254 return [self compareName:other]; 262 255 } 263 256 WiredClient/trunk/WCAccounts.m
r1546 r1547 1 /* $Id: WCAccounts.m,v 1.2 1 2004/08/28 12:49:34morris Exp $ */1 /* $Id: WCAccounts.m,v 1.22 2004/08/28 14:57:01 morris Exp $ */ 2 2 3 3 /* … … 272 272 273 273 // --- sort the list 274 [_shownAccounts sortUsingSelector:@selector( nameSort:)];274 [_shownAccounts sortUsingSelector:@selector(compareName:)]; 275 275 276 276 // --- update table … … 341 341 // --- sort the list 342 342 if([identifier isEqualToString:@"Name"]) 343 [_shownAccounts sortUsingSelector:@selector( nameSort:)];343 [_shownAccounts sortUsingSelector:@selector(compareName:)]; 344 344 else if([identifier isEqualToString:@"Type"]) 345 [_shownAccounts sortUsingSelector:@selector( typeSort:)];345 [_shownAccounts sortUsingSelector:@selector(compareType:)]; 346 346 347 347 // --- we're done … … 589 589 // --- re-sort 590 590 if([identifier isEqualToString:@"Name"]) 591 [_shownAccounts sortUsingSelector:@selector( nameSort:)];591 [_shownAccounts sortUsingSelector:@selector(compareName:)]; 592 592 else if([identifier isEqualToString:@"Type"]) 593 [_shownAccounts sortUsingSelector:@selector( typeSort:)];593 [_shownAccounts sortUsingSelector:@selector(compareType:)]; 594 594 595 595 // --- select new column header WiredClient/trunk/WCChat.m
r1537 r1547 1 /* $Id: WCChat.m,v 1.6 5 2004/08/27 17:31:49morris Exp $ */1 /* $Id: WCChat.m,v 1.66 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 316 316 // --- sort the users 317 317 [_sortedUsers release]; 318 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector( joinTimeSort:)];318 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector(compareJoinTime:)]; 319 319 [_sortedUsers retain]; 320 320 … … 408 408 // --- sort the users 409 409 [_sortedUsers release]; 410 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector( joinTimeSort:)];410 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector(compareJoinTime:)]; 411 411 [_sortedUsers retain]; 412 412 … … 464 464 // --- re-sort 465 465 [_sortedUsers release]; 466 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector( joinTimeSort:)];466 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector(compareJoinTime:)]; 467 467 [_sortedUsers retain]; 468 468 … … 615 615 // -- resort 616 616 [_sortedUsers release]; 617 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector( joinTimeSort:)];617 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector(compareJoinTime:)]; 618 618 [_sortedUsers retain]; 619 619 … … 664 664 // -- resort 665 665 [_sortedUsers release]; 666 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector( joinTimeSort:)];666 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector(compareJoinTime:)]; 667 667 [_sortedUsers retain]; 668 668 … … 1560 1560 - (unsigned int)numberOfActiveUsers { 1561 1561 NSEnumerator *enumerator; 1562 WCUser * each;1562 WCUser *user; 1563 1563 unsigned int active = 0; 1564 1564 1565 1565 enumerator = [_shownUsers objectEnumerator]; 1566 1566 1567 while(( each= [enumerator nextObject])) {1568 if(![ each idle])1567 while((user = [enumerator nextObject])) { 1568 if(![user isIdle]) 1569 1569 active++; 1570 1570 } WiredClient/trunk/WCFile.h
r1415 r1547 1 /* $Id: WCFile.h,v 1. 7 2004/08/03 19:30:55morris Exp $ */1 /* $Id: WCFile.h,v 1.8 2004/08/28 14:57:01 morris Exp $ */ 2 2 3 3 /* … … 96 96 - (NSString *) lastPathComponent; 97 97 98 - (NSComparisonResult) kindSort:(WCFile *)other;99 - (NSComparisonResult) nameSort:(WCFile *)other;100 - (NSComparisonResult) createdSort:(WCFile *)other;101 - (NSComparisonResult) modifiedSort:(WCFile *)other;102 - (NSComparisonResult) sizeSort:(WCFile *)other;103 104 98 @end WiredClient/trunk/WCFile.m
r1486 r1547 1 /* $Id: WCFile.m,v 1.1 1 2004/08/13 17:54:42morris Exp $ */1 /* $Id: WCFile.m,v 1.12 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 335 335 #pragma mark - 336 336 337 - (NSComparisonResult)kindSort:(WCFile *)other { 337 - (NSComparisonResult)compareName:(WCFile *)other { 338 return [[_path lastPathComponent] compare:[[other path] lastPathComponent] 339 options:NSCaseInsensitiveSearch | NSNumericSearch]; 340 } 341 342 343 344 - (NSComparisonResult)compareKind:(WCFile *)other { 338 345 NSComparisonResult result; 339 346 … … 342 349 // --- ordered same - sort by name instead 343 350 if(result == NSOrderedSame) 344 result = [self nameSort:other];351 result = [self compareName:other]; 345 352 346 353 return result; … … 349 356 350 357 351 - (NSComparisonResult)nameSort:(WCFile *)other { 352 unsigned int options; 353 354 options = NSCaseInsensitiveSearch | 64; // 64 = NSNumericSearch 355 356 return [[_path lastPathComponent] compare:[[other path] lastPathComponent] 357 options:options]; 358 } 359 360 361 362 - (NSComparisonResult)createdSort:(WCFile *)other { 358 - (NSComparisonResult)compareCreated:(WCFile *)other { 363 359 NSComparisonResult result; 364 360 … … 367 363 // --- ordered same - sort by name instead 368 364 if(result == NSOrderedSame) 369 result = [self nameSort:other];365 result = [self compareName:other]; 370 366 371 367 return result; … … 374 370 375 371 376 - (NSComparisonResult) modifiedSort:(WCFile *)other {372 - (NSComparisonResult)compareModified:(WCFile *)other { 377 373 NSComparisonResult result; 378 374 … … 381 377 // --- ordered same - sort by name instead 382 378 if(result == NSOrderedSame) 383 result = [self nameSort:other];379 result = [self compareName:other]; 384 380 385 381 return result; … … 388 384 389 385 390 - (NSComparisonResult) sizeSort:(WCFile *)other {386 - (NSComparisonResult)compareSize:(WCFile *)other { 391 387 // --- first sort by file/dir, file gets precedence over dirs, no matter size 392 388 if(_type == WCFileTypeFile && [other type] != WCFileTypeFile) … … 402 398 403 399 // --- ordered same - sort by name instead 404 return [self nameSort:other];400 return [self compareName:other]; 405 401 } 406 402 WiredClient/trunk/WCFiles.m
r1546 r1547 1 /* $Id: WCFiles.m,v 1. 49 2004/08/28 12:49:35morris Exp $ */1 /* $Id: WCFiles.m,v 1.50 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 450 450 // --- sort the list 451 451 if([identifier isEqualToString:@"Name"]) 452 [_shownFiles sortUsingSelector:@selector( nameSort:)];452 [_shownFiles sortUsingSelector:@selector(compareName:)]; 453 453 else if([identifier isEqualToString:@"Kind"]) 454 [_shownFiles sortUsingSelector:@selector( kindSort:)];454 [_shownFiles sortUsingSelector:@selector(compareKind:)]; 455 455 else if([identifier isEqualToString:@"Created"]) 456 [_shownFiles sortUsingSelector:@selector(c reatedSort:)];456 [_shownFiles sortUsingSelector:@selector(compareCreated:)]; 457 457 else if([identifier isEqualToString:@"Modified"]) 458 [_shownFiles sortUsingSelector:@selector( modifiedSort:)];458 [_shownFiles sortUsingSelector:@selector(compareModified:)]; 459 459 else if([identifier isEqualToString:@"Size"]) 460 [_shownFiles sortUsingSelector:@selector( sizeSort:)];460 [_shownFiles sortUsingSelector:@selector(compareSize:)]; 461 461 462 462 // --- and reload the table … … 949 949 // --- re-sort 950 950 if([identifier isEqualToString:@"Name"]) 951 [_shownFiles sortUsingSelector:@selector( nameSort:)];951 [_shownFiles sortUsingSelector:@selector(compareName:)]; 952 952 else if([identifier isEqualToString:@"Kind"]) 953 [_shownFiles sortUsingSelector:@selector( kindSort:)];953 [_shownFiles sortUsingSelector:@selector(compareKind:)]; 954 954 else if([identifier isEqualToString:@"Created"]) 955 [_shownFiles sortUsingSelector:@selector(c reatedSort:)];955 [_shownFiles sortUsingSelector:@selector(compareCreated:)]; 956 956 else if([identifier isEqualToString:@"Modified"]) 957 [_shownFiles sortUsingSelector:@selector( modifiedSort:)];957 [_shownFiles sortUsingSelector:@selector(compareModified:)]; 958 958 else if([identifier isEqualToString:@"Size"]) 959 [_shownFiles sortUsingSelector:@selector( sizeSort:)];959 [_shownFiles sortUsingSelector:@selector(compareSize:)]; 960 960 961 961 // --- select new column header WiredClient/trunk/WCMessage.h
r1383 r1547 1 /* $Id: WCMessage.h,v 1. 2 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCMessage.h,v 1.3 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 51 51 52 52 - (void) setRead:(BOOL)value; 53 - (BOOL) read;53 - (BOOL) isRead; 54 54 55 55 - (void) setUser:(WCUser *)value; WiredClient/trunk/WCMessage.m
r1383 r1547 1 /* $Id: WCMessage.m,v 1. 3 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCMessage.m,v 1.4 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 96 96 97 97 98 #pragma mark -99 100 98 - (void)setRead:(BOOL)value { 101 99 _read = value; … … 104 102 105 103 106 - (BOOL) read {104 - (BOOL)isRead { 107 105 return _read; 108 106 } 109 107 110 108 111 112 #pragma mark -113 109 114 110 - (void)setUser:(WCUser *)value { … … 127 123 128 124 129 #pragma mark -130 131 125 - (void)setMessage:(NSString *)value { 132 126 [value retain]; … … 144 138 145 139 146 #pragma mark -147 148 140 - (void)setDate:(NSDate *)value { 149 141 [value retain]; WiredClient/trunk/WCMessages.m
r1542 r1547 1 /* $Id: WCMessages.m,v 1.2 7 2004/08/27 20:16:30 morris Exp $ */1 /* $Id: WCMessages.m,v 1.28 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 219 219 220 220 // --- bump the count of unread messages 221 if(![message read]) {221 if(![message isRead]) { 222 222 _unread++; 223 223 [WCSharedMain setUnread:[WCSharedMain unread] + 1]; … … 504 504 505 505 // --- set that it's read 506 if(![message read])506 if(![message isRead]) 507 507 [self read:message]; 508 508 … … 524 524 string = [self tableView:sender objectValueForTableColumn:column row:row]; 525 525 526 if(![message read]) {526 if(![message isRead]) { 527 527 // --- set bold font for unread messages 528 528 boldFont = [NSFont boldSystemFontOfSize:[NSFont smallSystemFontSize]]; WiredClient/trunk/WCOutlineView.m
r1483 r1547 1 /* $Id: WCOutlineView.m,v 1. 5 2004/08/12 20:11:56morris Exp $ */1 /* $Id: WCOutlineView.m,v 1.6 2004/08/28 14:57:01 morris Exp $ */ 2 2 3 3 /* … … 420 420 421 421 frame = [super frameOfCellAtColumn:columnIndex row:rowIndex]; 422 key = [NSString stringWithFormat:@"%d,%d", columnIndex, rowIndex]; 423 tag = [_regions objectForKey:key]; 424 425 if(tag) 426 [self removeToolTip:[tag intValue]]; 427 428 tag = [NSNumber numberWithInt:[self addToolTipRect:frame owner:self userData:NULL]]; 429 [_regions setObject:tag forKey:key]; 422 423 if([[self dataSource] respondsToSelector:@selector(tableView:toolTipForRow:)]) { 424 key = [NSString stringWithFormat:@"%d,%d", columnIndex, rowIndex]; 425 426 if([_regions objectForKey:key]) 427 [self removeToolTip:[tag intValue]]; 428 429 tag = [NSNumber numberWithInt:[self addToolTipRect:frame owner:self userData:NULL]]; 430 [_regions setObject:tag forKey:key]; 431 } 430 432 431 433 return frame; WiredClient/trunk/WCReceiveMessage.m
r1298 r1547 1 /* $Id: WCReceiveMessage.m,v 1. 7 2004/05/22 02:18:09morris Exp $ */1 /* $Id: WCReceiveMessage.m,v 1.8 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 110 110 - (void)windowDidBecomeKey:(NSNotification *)notification { 111 111 // --- set that it's read 112 if(![_message read])112 if(![_message isRead]) 113 113 [[_connection messages] read:_message]; 114 114 } WiredClient/trunk/WCSearch.m
r1486 r1547 1 /* $Id: WCSearch.m,v 1.3 2 2004/08/13 17:54:42morris Exp $ */1 /* $Id: WCSearch.m,v 1.33 2004/08/28 14:57:01 morris Exp $ */ 2 2 3 3 /* … … 320 320 // --- sort the list 321 321 if([identifier isEqualToString:@"Name"]) 322 [_shownFiles sortUsingSelector:@selector( nameSort:)];322 [_shownFiles sortUsingSelector:@selector(compareName:)]; 323 323 else if([identifier isEqualToString:@"Kind"]) 324 [_shownFiles sortUsingSelector:@selector( kindSort:)];324 [_shownFiles sortUsingSelector:@selector(compareKind:)]; 325 325 else if([identifier isEqualToString:@"Size"]) 326 [_shownFiles sortUsingSelector:@selector( sizeSort:)];326 [_shownFiles sortUsingSelector:@selector(compareSize:)]; 327 327 328 328 // --- and reload the table … … 575 575 // --- re-sort 576 576 if([identifier isEqualToString:@"Name"]) 577 [_shownFiles sortUsingSelector:@selector( nameSort:)];577 [_shownFiles sortUsingSelector:@selector(compareName:)]; 578 578 else if([identifier isEqualToString:@"Kind"]) 579 [_shownFiles sortUsingSelector:@selector( kindSort:)];579 [_shownFiles sortUsingSelector:@selector(compareKind:)]; 580 580 else if([identifier isEqualToString:@"Created"]) 581 [_shownFiles sortUsingSelector:@selector(c reatedSort:)];581 [_shownFiles sortUsingSelector:@selector(compareCreated:)]; 582 582 else if([identifier isEqualToString:@"Modified"]) 583 [_shownFiles sortUsingSelector:@selector( modifiedSort:)];583 [_shownFiles sortUsingSelector:@selector(compareModified:)]; 584 584 else if([identifier isEqualToString:@"Size"]) 585 [_shownFiles sortUsingSelector:@selector( sizeSort:)];585 [_shownFiles sortUsingSelector:@selector(compareSize:)]; 586 586 587 587 // --- select new column header WiredClient/trunk/WCServer.m
r1461 r1547 1 /* $Id: WCServer.m,v 1. 6 2004/08/10 17:54:54morris Exp $ */1 /* $Id: WCServer.m,v 1.7 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 106 106 107 107 108 #pragma mark -109 110 108 - (void)setDescription:(NSString *)value { 111 109 [value retain]; … … 123 121 124 122 125 #pragma mark -126 127 123 - (void)setVersion:(NSString *)value { 128 124 [value retain]; … … 140 136 141 137 142 #pragma mark -143 144 138 - (void)setURL:(NSURL *)value { 145 139 [value retain]; … … 157 151 158 152 159 #pragma mark -160 161 153 - (void)setStarted:(NSDate *)value { 162 154 [value retain]; … … 174 166 175 167 176 #pragma mark -177 178 168 - (void)setProtocol:(double)value { 179 169 _protocol = value; … … 188 178 189 179 190 #pragma mark -191 192 180 - (void)setBanner:(NSImage *)value { 193 181 [value retain]; … … 205 193 206 194 207 #pragma mark -208 209 195 - (void)setFiles:(unsigned int)value { 210 196 _files = value; … … 219 205 220 206 221 #pragma mark -222 223 207 - (void)setSize:(unsigned long long)value { 224 208 _size = value; … … 233 217 234 218 235 #pragma mark -236 237 219 - (void)setAccount:(WCAccount *)value { 238 220 [value retain]; WiredClient/trunk/WCTableView.m
r1482 r1547 1 /* $Id: WCTableView.m,v 1.1 8 2004/08/12 20:11:45morris Exp $ */1 /* $Id: WCTableView.m,v 1.19 2004/08/28 14:57:01 morris Exp $ */ 2 2 3 3 /* … … 419 419 420 420 frame = [super frameOfCellAtColumn:columnIndex row:rowIndex]; 421 key = [NSString stringWithFormat:@"%d,%d", columnIndex, rowIndex]; 422 tag = [_regions objectForKey:key]; 423 424 if(tag) 425 [self removeToolTip:[tag intValue]]; 426 427 tag = [NSNumber numberWithInt:[self addToolTipRect:frame owner:self userData:NULL]]; 428 [_regions setObject:tag forKey:key]; 429 421 422 if([[self dataSource] respondsToSelector:@selector(tableView:toolTipForRow:)]) { 423 key = [NSString stringWithFormat:@"%d,%d", columnIndex, rowIndex]; 424 tag = [_regions objectForKey:key]; 425 426 if(tag) 427 [self removeToolTip:[tag intValue]]; 428 429 tag = [NSNumber numberWithInt:[self addToolTipRect:frame owner:self userData:NULL]]; 430 [_regions setObject:tag forKey:key]; 431 } 432 430 433 return frame; 431 434 } WiredClient/trunk/WCTracker.h
r1383 r1547 1 /* $Id: WCTracker.h,v 1. 8 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCTracker.h,v 1.9 2004/08/28 14:57:01 morris Exp $ */ 2 2 3 3 /* … … 43 43 44 44 45 @interface WCTracker : NSObject <NSCoding>{45 @interface WCTracker : NSObject { 46 46 WCTrackerType _type; 47 47 WCTrackerState _state; 48 unsigned int _count; 48 49 49 NSString *_name; 50 NSString *_description; 51 NSURL *_url; 52 NSString *_urlString; 50 53 unsigned int _users; 51 unsigned long long _speed; 54 NSString *_usersString; 55 unsigned int _speed; 56 NSString *_speedString; 57 unsigned int _files; 58 NSString *_filesString; 59 unsigned long long _size; 60 NSString *_sizeString; 52 61 BOOL _guest; 62 NSString *_guestString; 53 63 BOOL _download; 54 unsigned int _files; 55 unsigned long long _size; 56 NSString *_description; 64 NSString *_downloadString; 65 57 66 NSNetService *_service; 58 NSURL *_url;59 67 double _protocol; 60 68 NSMutableArray *_children; … … 70 78 - (WCTrackerState) state; 71 79 72 - (void) setCount:(unsigned int)value;73 - (unsigned int) count;74 75 80 - (void) setName:(NSString *)value; 76 81 - (NSString *) name; 77 78 - (void) setUsers:(unsigned int)value;79 - (unsigned int) users;80 81 - (void) setSpeed:(unsigned int)value;82 - (unsigned int) speed;83 84 - (void) setGuest:(BOOL)value;85 - (BOOL) guest;86 87 - (void) setDownload:(BOOL)value;88 - (BOOL) download;89 90 - (void) setFiles:(unsigned int)value;91 - (unsigned int) files;92 93 - (void) setSize:(unsigned long long)value;94 - (unsigned long long) size;95 82 96 83 - (void) setDescription:(NSString *)value; 97 84 - (NSString *) description; 98 85 99 - (void) setService:(NSNetService *)value; 100 - (NSNetService *) service; 86 - (void) setUsers:(unsigned int)value; 87 - (unsigned int) users; 88 - (NSString *) usersString; 89 90 - (void) setSpeed:(unsigned int)value; 91 - (unsigned int) speed; 92 - (NSString *) speedString; 93 94 - (void) setFiles:(unsigned int)value; 95 - (unsigned int) files; 96 - (NSString *) filesString; 97 98 - (void) setSize:(unsigned long long)value; 99 - (unsigned long long) size; 100 - (NSString *) sizeString; 101 102 - (void) setGuest:(BOOL)value; 103 - (BOOL) guest; 104 - (NSString *) guestString; 105 106 - (void) setDownload:(BOOL)value; 107 - (BOOL) download; 108 - (NSString *) downloadString; 101 109 102 110 - (void) setURL:(NSURL *)value; 103 111 - (NSURL *) URL; 112 - (NSString *) URLString; 113 114 - (void) setService:(NSNetService *)value; 115 - (NSNetService *) service; 104 116 105 117 - (void) setProtocol:(double)value; WiredClient/trunk/WCTracker.m
r1383 r1547 1 /* $Id: WCTracker.m,v 1. 8 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCTracker.m,v 1.9 2004/08/28 14:57:00 morris Exp $ */ 2 2 3 3 /* … … 28 28 29 29 #import "NSNumberAdditions.h" 30 #import "NSStringAdditions.h" 31 #import "NSURLAdditions.h" 30 32 #import "WCTracker.h" 31 33 #import "WCTrackers.h" … … 53 55 [_name release]; 54 56 [_description release]; 57 [_url release]; 58 [_urlString release]; 59 [_usersString release]; 60 [_speedString release]; 61 [_filesString release]; 62 [_sizeString release]; 63 [_guestString release]; 64 [_downloadString release]; 65 55 66 [_service release]; 56 [_url release];57 67 [_children release]; 58 68 59 69 [super dealloc]; 60 }61 62 63 64 #pragma mark -65 66 - (id)initWithCoder:(NSCoder *)coder {67 self = [super init];68 69 [coder decodeValueOfObjCType:@encode(WCTrackerType) at:&_type];70 [coder decodeValueOfObjCType:@encode(WCTrackerState) at:&_state];71 [coder decodeValueOfObjCType:@encode(unsigned int) at:&_count];72 [coder decodeValueOfObjCType:@encode(unsigned int) at:&_users];73 [coder decodeValueOfObjCType:@encode(unsigned int) at:&_speed];74 [coder decodeValueOfObjCType:@encode(BOOL) at:&_guest];75 [coder decodeValueOfObjCType:@encode(BOOL) at:&_download];76 [coder decodeValueOfObjCType:@encode(unsigned int) at:&_files];77 [coder decodeValueOfObjCType:@encode(unsigned long long) at:&_size];78 [coder decodeValueOfObjCType:@encode(unsigned int) at:&_protocol];79 80 _name = [[coder decodeObject] retain];81 _description = [[coder decodeObject] retain];82 _service = [[coder decodeObject] retain];83 _url = [[coder decodeObject] retain];84 _children = [[coder decodeObject] retain];85 86 return self;87 }88 89 90 91 - (void)encodeWithCoder:(NSCoder *)coder {92 [coder encodeValueOfObjCType:@encode(WCTrackerType) at:&_type];93 [coder encodeValueOfObjCType:@encode(WCTrackerState) at:&_state];94 [coder encodeValueOfObjCType:@encode(unsigned int) at:&_count];95 [coder encodeValueOfObjCType:@encode(unsigned int) at:&_speed];96 [coder encodeValueOfObjCType:@encode(BOOL) at:&_guest];97 [coder encodeValueOfObjCType:@encode(BOOL) at:&_download];98 [coder encodeValueOfObjCType:@encode(unsigned int) at:&_files];99 [coder encodeValueOfObjCType:@encode(unsigned long long) at:&_size];100 [coder encodeValueOfObjCType:@encode(unsigned int) at:&_protocol];101 102 [coder encodeObject:_name];103 [coder encodeObject:_description];104 [coder encodeObject:_service];105 [coder encodeObject:_url];106 [coder encodeObject:_children];107 70 } 108 71 … … 123 86 124 87 125 #pragma mark -126 127 88 - (void)setState:(WCTrackerState)value { 128 89 _state = value; … … 136 97 137 98 138 139 #pragma mark -140 141 - (void)setCount:(unsigned int)value {142 _count = value;143 }144 145 146 147 - (unsigned int)count {148 return _count;149 }150 151 152 153 #pragma mark -154 99 155 100 - (void)setName:(NSString *)value { … … 168 113 169 114 170 #pragma mark -171 172 - (void)setUsers:(unsigned int)value {173 _users = value;174 }175 176 177 178 - (unsigned int)users {179 return _users;180 }181 182 183 184 #pragma mark -185 186 - (void)setSpeed:(unsigned int)value {187 _speed = value;188 }189 190 191 192 - (unsigned int)speed {193 return _speed;194 }195 196 197 198 #pragma mark -199 200 - (void)setGuest:(BOOL)value {201 _guest = value;202 }203 204 205 206 - (BOOL)guest {207 return _guest;208 }209 210 211 212 #pragma mark -213 214 - (void)setDownload:(BOOL)value {215 _download = value;216 }217 218 219 220 - (BOOL)download {221 return _download;222 }223 224
