From 545e65819204e736948cc9e052971b10f9e3fc6c Mon Sep 17 00:00:00 2001 From: vspader Date: Wed, 4 Mar 2009 22:29:47 -0800 Subject: [PATCH] Modified HTTPSource plugin so it uses JNetLib. --- Plugins/HTTPSource/HTTPSource.h | 11 +-- .../HTTPSource.xcodeproj/project.pbxproj | 84 +++++++++++++++---- 2 files changed, 73 insertions(+), 22 deletions(-) diff --git a/Plugins/HTTPSource/HTTPSource.h b/Plugins/HTTPSource/HTTPSource.h index 9e7223e4b..43213a896 100644 --- a/Plugins/HTTPSource/HTTPSource.h +++ b/Plugins/HTTPSource/HTTPSource.h @@ -8,20 +8,17 @@ #import -#import "Semaphore.h" +#import + #import "Plugin.h" @interface HTTPSource : NSObject { NSURLConnection *_connection; - long _byteCount; + JNL_HTTPGet *_get; - BOOL _responseReceived; - BOOL _connectionFinished; - - NSMutableData *_data; - Semaphore *_sem; + long _byteCount; NSString *_mimeType; diff --git a/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj b/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj index 2294f83b4..9d35bf059 100644 --- a/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj +++ b/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj @@ -7,20 +7,50 @@ objects = { /* Begin PBXBuildFile section */ - 176A6E470CC272E8000F60DE /* Semaphore.m in Sources */ = {isa = PBXBuildFile; fileRef = 176A6E450CC272E8000F60DE /* Semaphore.m */; }; - 17ADB6100B97A74800257CA2 /* HTTPSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 17ADB60D0B97A74800257CA2 /* HTTPSource.m */; }; + 17ADB6100B97A74800257CA2 /* HTTPSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 17ADB60D0B97A74800257CA2 /* HTTPSource.mm */; }; + 17F6C6540F5F9E83000D9DA9 /* JNetLib.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17F6C6450F5F9E3F000D9DA9 /* JNetLib.framework */; }; + 17F6C6550F5F9E86000D9DA9 /* JNetLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17F6C6450F5F9E3F000D9DA9 /* JNetLib.framework */; }; 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 17F6C6440F5F9E3F000D9DA9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 17F6C6400F5F9E3F000D9DA9 /* JNetLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8DC2EF5B0486A6940098B216 /* JNetLib.framework */; + remoteInfo = JNetLib; + }; + 17F6C6800F5F9FFE000D9DA9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 17F6C6400F5F9E3F000D9DA9 /* JNetLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 8DC2EF4F0486A6940098B216 /* JNetLib */; + remoteInfo = JNetLib; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 17F6C6610F5F9E8C000D9DA9 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 17F6C6540F5F9E83000D9DA9 /* JNetLib.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 176A6E440CC272E8000F60DE /* Semaphore.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Semaphore.h; sourceTree = ""; }; - 176A6E450CC272E8000F60DE /* Semaphore.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = Semaphore.m; sourceTree = ""; }; 17ADB60C0B97A74800257CA2 /* HTTPSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTTPSource.h; sourceTree = ""; }; - 17ADB60D0B97A74800257CA2 /* HTTPSource.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = HTTPSource.m; sourceTree = ""; }; + 17ADB60D0B97A74800257CA2 /* HTTPSource.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = HTTPSource.mm; sourceTree = ""; }; 17ADB6340B97A8B400257CA2 /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = ../../Audio/Plugin.h; sourceTree = SOURCE_ROOT; }; + 17F6C6400F5F9E3F000D9DA9 /* JNetLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = JNetLib.xcodeproj; path = ../../Frameworks/JNetLib/JNetLib.xcodeproj; sourceTree = SOURCE_ROOT; }; 32DBCF630370AF2F00C91783 /* HTTPSource_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPSource_Prefix.pch; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* HTTPSource.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HTTPSource.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -32,6 +62,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 17F6C6550F5F9E86000D9DA9 /* JNetLib.framework in Frameworks */, 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -73,8 +104,7 @@ children = ( 17ADB6340B97A8B400257CA2 /* Plugin.h */, 17ADB60C0B97A74800257CA2 /* HTTPSource.h */, - 17ADB60D0B97A74800257CA2 /* HTTPSource.m */, - 176A6E410CC272E8000F60DE /* Utils */, + 17ADB60D0B97A74800257CA2 /* HTTPSource.mm */, ); name = Classes; sourceTree = ""; @@ -82,6 +112,7 @@ 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { isa = PBXGroup; children = ( + 17F6C6400F5F9E3F000D9DA9 /* JNetLib.xcodeproj */, 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, ); name = "Linked Frameworks"; @@ -97,15 +128,13 @@ name = "Other Frameworks"; sourceTree = ""; }; - 176A6E410CC272E8000F60DE /* Utils */ = { + 17F6C6410F5F9E3F000D9DA9 /* Products */ = { isa = PBXGroup; children = ( - 176A6E440CC272E8000F60DE /* Semaphore.h */, - 176A6E450CC272E8000F60DE /* Semaphore.m */, + 17F6C6450F5F9E3F000D9DA9 /* JNetLib.framework */, ); - name = Utils; - path = ../../Audio/Utils; - sourceTree = SOURCE_ROOT; + name = Products; + sourceTree = ""; }; 19C28FB8FE9D52D311CA2CBB /* Products */ = { isa = PBXGroup; @@ -133,10 +162,12 @@ 8D5B49AF048680CD000E48DA /* Resources */, 8D5B49B1048680CD000E48DA /* Sources */, 8D5B49B3048680CD000E48DA /* Frameworks */, + 17F6C6610F5F9E8C000D9DA9 /* CopyFiles */, ); buildRules = ( ); dependencies = ( + 17F6C6810F5F9FFE000D9DA9 /* PBXTargetDependency */, ); name = "HTTPSource Plugin"; productInstallPath = "$(HOME)/Library/Bundles"; @@ -154,6 +185,12 @@ hasScannedForEncodings = 1; mainGroup = 089C166AFE841209C02AAC07 /* HTTPSource */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 17F6C6410F5F9E3F000D9DA9 /* Products */; + ProjectRef = 17F6C6400F5F9E3F000D9DA9 /* JNetLib.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 8D5B49AC048680CD000E48DA /* HTTPSource Plugin */, @@ -161,6 +198,16 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 17F6C6450F5F9E3F000D9DA9 /* JNetLib.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = JNetLib.framework; + remoteRef = 17F6C6440F5F9E3F000D9DA9 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 8D5B49AF048680CD000E48DA /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -176,13 +223,20 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 17ADB6100B97A74800257CA2 /* HTTPSource.m in Sources */, - 176A6E470CC272E8000F60DE /* Semaphore.m in Sources */, + 17ADB6100B97A74800257CA2 /* HTTPSource.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 17F6C6810F5F9FFE000D9DA9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = JNetLib; + targetProxy = 17F6C6800F5F9FFE000D9DA9 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ 1DEB913B08733D840010E9CD /* Debug */ = { isa = XCBuildConfiguration;