Modified HTTPSource plugin so it uses JNetLib.

CQTexperiment
vspader 2009-03-04 22:29:47 -08:00
parent dd409e19d2
commit 545e658192
2 changed files with 73 additions and 22 deletions

View File

@ -8,20 +8,17 @@
#import <Cocoa/Cocoa.h>
#import "Semaphore.h"
#import <JNetLib/jnetlib.h>
#import "Plugin.h"
@interface HTTPSource : NSObject <CogSource>
{
NSURLConnection *_connection;
long _byteCount;
JNL_HTTPGet *_get;
BOOL _responseReceived;
BOOL _connectionFinished;
NSMutableData *_data;
Semaphore *_sem;
long _byteCount;
NSString *_mimeType;

View File

@ -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 = "<absolute>"; };
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
176A6E440CC272E8000F60DE /* Semaphore.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Semaphore.h; sourceTree = "<group>"; };
176A6E450CC272E8000F60DE /* Semaphore.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = Semaphore.m; sourceTree = "<group>"; };
17ADB60C0B97A74800257CA2 /* HTTPSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTTPSource.h; sourceTree = "<group>"; };
17ADB60D0B97A74800257CA2 /* HTTPSource.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = HTTPSource.m; sourceTree = "<group>"; };
17ADB60D0B97A74800257CA2 /* HTTPSource.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = HTTPSource.mm; sourceTree = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
@ -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 = "<group>";
@ -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 = "<group>";
};
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 = "<group>";
};
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;