Changeset 4980
- Timestamp:
- 10/19/07 13:26:20 (9 months ago)
- Files:
-
- WiredClient/trunk/WCConnection.h (modified) (1 diff)
- WiredClient/trunk/WCError.h (modified) (1 diff)
- WiredClient/trunk/WCLink.h (modified) (3 diffs)
- WiredClient/trunk/WCLink.m (modified) (6 diffs)
- WiredClient/trunk/WCServerConnection.m (modified) (2 diffs)
- WiredClient/trunk/WCServerInfo.m (modified) (1 diff)
- WiredClient/trunk/WCTrackerConnection.m (modified) (2 diffs)
- WiredClient/trunk/WCTrackers.m (modified) (2 diffs)
- WiredClient/trunk/WCTransfers.m (modified) (9 diffs)
- WiredClient/trunk/WiredClient.xcodeproj/project.pbxproj (modified) (17 diffs)
- WiredClient/trunk/prefix.pch (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCConnection.h
r4799 r4980 142 142 143 143 - (WIURL *)URL; 144 - (W ISocket *)socket;144 - (WNSocket *)socket; 145 145 - (BOOL)isConnected; 146 146 - (double)protocol; WiredClient/trunk/WCError.h
r4439 r4980 42 42 43 43 44 @interface WCError : W IError44 @interface WCError : WNError 45 45 46 46 #define WCWiredClientErrorDomain @"WCWiredClientErrorDomain" WiredClient/trunk/WCLink.h
r4799 r4980 30 30 31 31 @interface WCLink : WIObject { 32 W ISocket *_socket;32 WNSocket *_socket; 33 33 WIURL *_url; 34 34 … … 54 54 55 55 - (WIURL *)URL; 56 - (W ISocket *)socket;56 - (WNSocket *)socket; 57 57 - (BOOL)isReading; 58 58 … … 73 73 74 74 - (void)linkConnected:(WCLink *)link; 75 - (void)linkClosed:(WCLink *)link error:(W IError *)error;75 - (void)linkClosed:(WCLink *)link error:(WNError *)error; 76 76 - (void)linkTerminated:(WCLink *)link; 77 77 - (void)link:(WCLink *)link sentCommand:(NSString *)command; WiredClient/trunk/WCLink.m
r4799 r4980 122 122 123 123 124 - (W ISocket *)socket {124 - (WNSocket *)socket { 125 125 return _socket; 126 126 } … … 139 139 _reading = YES; 140 140 _terminating = NO; 141 142 [W IThread detachNewThreadSelector:@selector(linkThread:) toTarget:self withObject:NULL];141 142 [WNThread detachNewThreadSelector:@selector(linkThread:) toTarget:self withObject:NULL]; 143 143 } 144 144 … … 206 206 NSAutoreleasePool *pool, *loopPool = NULL; 207 207 NSString *string, *arguments; 208 W IError *error = NULL;209 W ISocketContext *context;210 W IAddress *address;208 WNError *error = NULL; 209 WNSocketContext *context; 210 WNAddress *address; 211 211 WCProtocolMessage message; 212 212 NSUInteger i = 0; … … 217 217 [_delegate retain]; 218 218 219 context = [W ISocketContext socketContextForClient];219 context = [WNSocketContext socketContextForClient]; 220 220 [context setSSLCiphers:[WCSettings objectForKey:WCSSLControlCiphers]]; 221 221 222 address = [W IAddress addressWithString:[_url host] error:&error];222 address = [WNAddress addressWithString:[_url host] error:&error]; 223 223 224 224 if(!address) … … 227 227 [address setPort:[_url port]]; 228 228 229 _socket = [[W ISocket alloc] initWithAddress:address type:WISocketTCP];229 _socket = [[WNSocket alloc] initWithAddress:address type:WNSocketTCP]; 230 230 [_socket setInteractive:YES]; 231 231 … … 252 252 } 253 253 else if(!string) { 254 if([[[error userInfo] objectForKey:W ILibWiredErrorKey] code] == ETIMEDOUT) {254 if([[[error userInfo] objectForKey:WNLibWiredErrorKey] code] == ETIMEDOUT) { 255 255 continue; 256 256 } else { WiredClient/trunk/WCServerConnection.m
r4831 r4980 697 697 698 698 699 - (void)linkClosed:(WCLink *)link error:(W IError *)error {699 - (void)linkClosed:(WCLink *)link error:(WNError *)error { 700 700 if(error) 701 701 [self postNotificationName:WCConnectionDidClose object:self userInfo:[NSDictionary dictionaryWithObject:error forKey:WCErrorKey]]; … … 1038 1038 1039 1039 1040 - (W ISocket *)socket {1040 - (WNSocket *)socket { 1041 1041 return [_link socket]; 1042 1042 } WiredClient/trunk/WCServerInfo.m
r4963 r4980 66 66 67 67 - (void)_updateServerInfo { 68 W ISocket *socket;68 WNSocket *socket; 69 69 WIURL *url; 70 70 WCServer *server; WiredClient/trunk/WCTrackerConnection.m
r4799 r4980 247 247 248 248 249 - (void)linkClosed:(WCLink *)link error:(W IError *)error {249 - (void)linkClosed:(WCLink *)link error:(WNError *)error { 250 250 if(error) 251 251 [self postNotificationName:WCConnectionDidClose object:self userInfo:[NSDictionary dictionaryWithObject:error forKey:WCErrorKey]]; … … 356 356 357 357 358 - (W ISocket *)socket {358 - (WNSocket *)socket { 359 359 return [_link socket]; 360 360 } WiredClient/trunk/WCTrackers.m
r4976 r4980 446 446 447 447 - (IBAction)open:(id)sender { 448 W IAddress *address;449 W IError *error;448 WNAddress *address; 449 WNError *error; 450 450 WIURL *url; 451 451 WCTracker *tracker; … … 458 458 459 459 if(!url && [tracker netService]) { 460 address = [W IAddress addressWithNetService:[tracker netService] error:&error];460 address = [WNAddress addressWithNetService:[tracker netService] error:&error]; 461 461 462 462 if(address) WiredClient/trunk/WCTransfers.m
r4805 r4980 435 435 436 436 - (void)_startTransfer:(WCTransfer *)transfer { 437 [W IThread detachNewThreadSelector:@selector(transferThread:) toTarget:self withObject:transfer];437 [WNThread detachNewThreadSelector:@selector(transferThread:) toTarget:self withObject:transfer]; 438 438 439 439 [[self connection] triggerEvent:WCEventsTransferStarted info1:transfer]; … … 730 730 NSFileHandle *fileHandle; 731 731 NSString *path; 732 W IAddress *address;733 W ISocketContext *context;734 W ISocket *socket;732 WNAddress *address; 733 WNSocketContext *context; 734 WNSocket *socket; 735 735 WCFile *file; 736 736 WCError *error; … … 767 767 [fileHandle seekToEndOfFile]; 768 768 769 context = [W ISocketContext socketContextForClient];769 context = [WNSocketContext socketContextForClient]; 770 770 771 771 if([WCSettings boolForKey:WCEncryptTransfers]) … … 774 774 [context setSSLCiphers:[WCSettings objectForKey:WCSSLNullTransferCiphers]]; 775 775 776 address = [W IAddress addressWithString:[[transfer URL] host] error:&error];776 address = [WNAddress addressWithString:[[transfer URL] host] error:&error]; 777 777 778 778 if(!address) { … … 784 784 [address setPort:[[transfer URL] port]]; 785 785 786 socket = [[[W ISocket alloc] initWithAddress:address type:WISocketTCP] autorelease];786 socket = [[[WNSocket alloc] initWithAddress:address type:WNSocketTCP] autorelease]; 787 787 [socket setInteractive:NO]; 788 788 … … 903 903 NSFileHandle *fileHandle; 904 904 NSString *path; 905 W IAddress *address;906 W ISocketContext *context;907 W ISocket *socket;905 WNAddress *address; 906 WNSocketContext *context; 907 WNSocket *socket; 908 908 WCFile *file; 909 909 WCError *error; … … 931 931 [fileHandle seekToFileOffset:[file offset]]; 932 932 933 context = [W ISocketContext socketContextForClient];933 context = [WNSocketContext socketContextForClient]; 934 934 935 935 if([WCSettings boolForKey:WCEncryptTransfers]) … … 938 938 [context setSSLCiphers:[WCSettings objectForKey:WCSSLNullTransferCiphers]]; 939 939 940 address = [W IAddress addressWithString:[[transfer URL] host] error:&error];940 address = [WNAddress addressWithString:[[transfer URL] host] error:&error]; 941 941 942 942 if(!address) { … … 948 948 [address setPort:[[transfer URL] port]]; 949 949 950 socket = [[[W ISocket alloc] initWithAddress:address type:WISocketTCP] autorelease];950 socket = [[[WNSocket alloc] initWithAddress:address type:WNSocketTCP] autorelease]; 951 951 [socket setInteractive:NO]; 952 952 WiredClient/trunk/WiredClient.xcodeproj/project.pbxproj
r4789 r4980 31 31 productName = Packaging; 32 32 }; 33 A5E8BB49087490330010F2A4 /* Wired Additions*/ = {33 A5E8BB49087490330010F2A4 /* Wired Networking */ = { 34 34 isa = PBXAggregateTarget; 35 buildConfigurationList = A5E8BB4D087490360010F2A4 /* Build configuration list for PBXAggregateTarget "Wired Additions" */;35 buildConfigurationList = A5E8BB4D087490360010F2A4 /* Build configuration list for PBXAggregateTarget "Wired Networking" */; 36 36 buildPhases = ( 37 A5E8BB48087490330010F2A4 /* Run Script (Wired Additions) */,37 A5E8BB48087490330010F2A4 /* Run Script (Wired Networking) */, 38 38 ); 39 39 dependencies = ( 40 40 ); 41 name = "Wired Additions";41 name = "Wired Networking"; 42 42 productName = "Wired Additions"; 43 43 }; … … 47 47 771BDE730B70A6CC00E14B79 /* Reconnect.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 771BDE720B70A6CC00E14B79 /* Reconnect.tiff */; }; 48 48 771E6D510755F506000F9195 /* WCConversation.m in Sources */ = {isa = PBXBuildFile; fileRef = 771E6D4F0755F506000F9195 /* WCConversation.m */; }; 49 774C35600CC8C91B00716F37 /* WiredNetworking.framework in Copy Files (Frameworks) */ = {isa = PBXBuildFile; fileRef = 774C34D90CC8B57700716F37 /* WiredNetworking.framework */; }; 50 774C35F00CC8CA8900716F37 /* WiredNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 774C34D90CC8B57700716F37 /* WiredNetworking.framework */; }; 49 51 777D36C50987E125005B5EC1 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 777D36C40987E125005B5EC1 /* WebKit.framework */; }; 50 52 777D37490987E8C6005B5EC1 /* Finder.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 777D37480987E8C6005B5EC1 /* Finder.tiff */; }; … … 228 230 229 231 /* Begin PBXContainerItemProxy section */ 232 774897930CC8A63300E95A83 /* PBXContainerItemProxy */ = { 233 isa = PBXContainerItemProxy; 234 containerPortal = A544C1B90758E0E9008446CF /* WiredAdditions.xcodeproj */; 235 proxyType = 2; 236 remoteGlobalIDString = 774897900CC8A63200E95A83; 237 remoteInfo = "Wired Additions copy"; 238 }; 230 239 A5C4786907AAE13200F87F7A /* PBXContainerItemProxy */ = { 231 240 isa = PBXContainerItemProxy; … … 260 269 A5884BC40BF4D79500AA20E8 /* Growl.framework in Copy Files (Frameworks) */, 261 270 A564407C0A2607B000ADF4F5 /* WiredAdditions.framework in Copy Files (Frameworks) */, 271 774C35600CC8C91B00716F37 /* WiredNetworking.framework in Copy Files (Frameworks) */, 262 272 ); 263 273 name = "Copy Files (Frameworks)"; … … 275 285 771E6D4E0755F506000F9195 /* WCConversation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WCConversation.h; sourceTree = "<group>"; }; 276 286 771E6D4F0755F506000F9195 /* WCConversation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WCConversation.m; sourceTree = "<group>"; }; 287 774C34D90CC8B57700716F37 /* WiredNetworking.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WiredNetworking.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 277 288 777D36C40987E125005B5EC1 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; }; 278 289 777D37480987E8C6005B5EC1 /* Finder.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Finder.tiff; sourceTree = "<group>"; }; … … 589 600 A5884BA90BF4D78200AA20E8 /* Growl.framework in Frameworks */, 590 601 A564407B0A2607AC00ADF4F5 /* WiredAdditions.framework in Frameworks */, 602 774C35F00CC8CA8900716F37 /* WiredNetworking.framework in Frameworks */, 591 603 ); 592 604 runOnlyForDeploymentPostprocessing = 0; … … 622 634 A58411B9070C2279001A1AA2 /* Wired Client.app */, 623 635 A56440090A26079A00ADF4F5 /* WiredAdditions.framework */, 636 774C34D90CC8B57700716F37 /* WiredNetworking.framework */, 624 637 ); 625 638 name = Products; … … 631 644 A52B1C4706C408210033D317 /* Classes */, 632 645 77B5F96B097FDD2900C055E1 /* Additions */, 633 29B97315FDCFA39411CA2CEA /* OtherSources */,646 29B97315FDCFA39411CA2CEA /* Sources */, 634 647 A5E8BABF08748D6D0010F2A4 /* Config */, 635 648 A5E8BABE08748D4A0010F2A4 /* Scripts */, … … 644 657 sourceTree = "<group>"; 645 658 }; 646 29B97315FDCFA39411CA2CEA /* OtherSources */ = {659 29B97315FDCFA39411CA2CEA /* Sources */ = { 647 660 isa = PBXGroup; 648 661 children = ( … … 650 663 32CA4F630368D1EE00C91783 /* prefix.pch */, 651 664 ); 652 name = "Other Sources";665 name = Sources; 653 666 sourceTree = "<group>"; 654 667 }; … … 1157 1170 children = ( 1158 1171 A5E8BAFA08748EFD0010F2A4 /* WiredAdditions.framework */, 1172 774897940CC8A63300E95A83 /* WiredNetworking.framework */, 1159 1173 ); 1160 1174 name = Products; … … 1203 1217 targets = ( 1204 1218 8D1107260486CEB800E47090 /* Wired Client */, 1205 A5E8BB49087490330010F2A4 /* Wired Additions*/,1219 A5E8BB49087490330010F2A4 /* Wired Networking */, 1206 1220 77F05B800751E75A004F4E0E /* Localization */, 1207 1221 A5D9730A078F0D1700CD982E /* Distribution */, … … 1211 1225 1212 1226 /* Begin PBXReferenceProxy section */ 1227 774897940CC8A63300E95A83 /* WiredNetworking.framework */ = { 1228 isa = PBXReferenceProxy; 1229 fileType = wrapper.framework; 1230 path = WiredNetworking.framework; 1231 remoteRef = 774897930CC8A63300E95A83 /* PBXContainerItemProxy */; 1232 sourceTree = BUILT_PRODUCTS_DIR; 1233 }; 1213 1234 A5E8BAFA08748EFD0010F2A4 /* WiredAdditions.framework */ = { 1214 1235 isa = PBXReferenceProxy; … … 1394 1415 shellScript = "PATH=\"/usr/local/bin:$PATH\" perl version.pl; exit 0"; 1395 1416 }; 1396 A5E8BB48087490330010F2A4 /* Run Script (Wired Additions) */ = {1417 A5E8BB48087490330010F2A4 /* Run Script (Wired Networking) */ = { 1397 1418 isa = PBXShellScriptBuildPhase; 1398 1419 buildActionMask = 2147483647; … … 1401 1422 inputPaths = ( 1402 1423 ); 1403 name = "Run Script (Wired Additions)";1424 name = "Run Script (Wired Networking)"; 1404 1425 outputPaths = ( 1405 1426 ); 1406 1427 runOnlyForDeploymentPostprocessing = 0; 1407 1428 shellPath = /bin/sh; 1408 shellScript = "cd WiredAdditions/\n/usr/bin/xcodebuild -target \"Wired Additions\" -configuration \"$BUILD_STYLE\" SYMROOT=\"$SYMROOT\" OBJROOT=\"$OBJROOT\" $ACTION || exit 1";1429 shellScript = "cd WiredAdditions/\n/usr/bin/xcodebuild -target \"Wired Networking\" -configuration \"$BUILD_STYLE\" SYMROOT=\"$SYMROOT\" OBJROOT=\"$OBJROOT\" $ACTION || exit 1"; 1409 1430 }; 1410 1431 /* End PBXShellScriptBuildPhase section */ … … 1478 1499 A5E8BB6A087490C80010F2A4 /* PBXTargetDependency */ = { 1479 1500 isa = PBXTargetDependency; 1480 target = A5E8BB49087490330010F2A4 /* Wired Additions*/;1501 target = A5E8BB49087490330010F2A4 /* Wired Networking */; 1481 1502 targetProxy = A5E8BB69087490C80010F2A4 /* PBXContainerItemProxy */; 1482 1503 }; … … 2184 2205 defaultConfigurationName = Debug/Native/32; 2185 2206 }; 2186 A5E8BB4D087490360010F2A4 /* Build configuration list for PBXAggregateTarget "Wired Additions" */ = {2207 A5E8BB4D087490360010F2A4 /* Build configuration list for PBXAggregateTarget "Wired Networking" */ = { 2187 2208 isa = XCConfigurationList; 2188 2209 buildConfigurations = ( WiredClient/trunk/prefix.pch
r4852 r4980 36 36 #import <Growl/Growl.h> 37 37 #import <WiredAdditions/WiredAdditions.h> 38 #import <WiredNetworking/WiredNetworking.h> 38 39 39 40 // --- mach layer
