diff --git a/Frameworks/JNetLib/English.lproj/InfoPlist.strings b/Frameworks/JNetLib/English.lproj/InfoPlist.strings
new file mode 100644
index 000000000..5e45963c3
Binary files /dev/null and b/Frameworks/JNetLib/English.lproj/InfoPlist.strings differ
diff --git a/Frameworks/JNetLib/Info.plist b/Frameworks/JNetLib/Info.plist
new file mode 100644
index 000000000..0ec80c387
--- /dev/null
+++ b/Frameworks/JNetLib/Info.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ ${EXECUTABLE_NAME}
+ CFBundleName
+ ${PRODUCT_NAME}
+ CFBundleIconFile
+
+ CFBundleIdentifier
+ com.yourcompany.${PRODUCT_NAME:identifier}
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ FMWK
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ NSPrincipalClass
+
+
+
diff --git a/Frameworks/JNetLib/JNetLib.xcodeproj/TemplateIcon.icns b/Frameworks/JNetLib/JNetLib.xcodeproj/TemplateIcon.icns
new file mode 100644
index 000000000..62cb7015e
Binary files /dev/null and b/Frameworks/JNetLib/JNetLib.xcodeproj/TemplateIcon.icns differ
diff --git a/Frameworks/JNetLib/JNetLib.xcodeproj/project.pbxproj b/Frameworks/JNetLib/JNetLib.xcodeproj/project.pbxproj
new file mode 100644
index 000000000..608006234
--- /dev/null
+++ b/Frameworks/JNetLib/JNetLib.xcodeproj/project.pbxproj
@@ -0,0 +1,334 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 17F6C5F80F5F9D5B000D9DA9 /* asyncdns.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C5D50F5F9D5B000D9DA9 /* asyncdns.cpp */; };
+ 17F6C5F90F5F9D5B000D9DA9 /* asyncdns.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5D60F5F9D5B000D9DA9 /* asyncdns.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C5FB0F5F9D5B000D9DA9 /* connection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C5D80F5F9D5B000D9DA9 /* connection.cpp */; };
+ 17F6C5FC0F5F9D5B000D9DA9 /* connection.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5D90F5F9D5B000D9DA9 /* connection.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C5FD0F5F9D5B000D9DA9 /* httpget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C5DA0F5F9D5B000D9DA9 /* httpget.cpp */; };
+ 17F6C5FE0F5F9D5B000D9DA9 /* httpget.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5DB0F5F9D5B000D9DA9 /* httpget.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C5FF0F5F9D5B000D9DA9 /* httppost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C5DC0F5F9D5B000D9DA9 /* httppost.cpp */; };
+ 17F6C6000F5F9D5B000D9DA9 /* httppost.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5DD0F5F9D5B000D9DA9 /* httppost.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C6010F5F9D5B000D9DA9 /* httpserv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C5DE0F5F9D5B000D9DA9 /* httpserv.cpp */; };
+ 17F6C6020F5F9D5B000D9DA9 /* httpserv.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5DF0F5F9D5B000D9DA9 /* httpserv.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C6050F5F9D5B000D9DA9 /* jnetlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5E20F5F9D5B000D9DA9 /* jnetlib.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C6060F5F9D5B000D9DA9 /* listen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C5E30F5F9D5B000D9DA9 /* listen.cpp */; };
+ 17F6C6070F5F9D5B000D9DA9 /* listen.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5E40F5F9D5B000D9DA9 /* listen.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C6090F5F9D5B000D9DA9 /* netinc.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5E60F5F9D5B000D9DA9 /* netinc.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C60B0F5F9D5B000D9DA9 /* sslconnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C5E80F5F9D5B000D9DA9 /* sslconnection.cpp */; };
+ 17F6C60C0F5F9D5B000D9DA9 /* sslconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5E90F5F9D5B000D9DA9 /* sslconnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C60D0F5F9D5B000D9DA9 /* ssllisten.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C5EA0F5F9D5B000D9DA9 /* ssllisten.cpp */; };
+ 17F6C60E0F5F9D5B000D9DA9 /* ssllisten.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5EB0F5F9D5B000D9DA9 /* ssllisten.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C6160F5F9D5B000D9DA9 /* udpconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5F30F5F9D5B000D9DA9 /* udpconnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 17F6C6170F5F9D5B000D9DA9 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C5F40F5F9D5B000D9DA9 /* util.cpp */; };
+ 17F6C6180F5F9D5B000D9DA9 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F6C5F50F5F9D5B000D9DA9 /* util.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
+ 17F6C5D50F5F9D5B000D9DA9 /* asyncdns.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = asyncdns.cpp; path = jnetlib/asyncdns.cpp; sourceTree = ""; };
+ 17F6C5D60F5F9D5B000D9DA9 /* asyncdns.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = asyncdns.h; path = jnetlib/asyncdns.h; sourceTree = ""; };
+ 17F6C5D80F5F9D5B000D9DA9 /* connection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = connection.cpp; path = jnetlib/connection.cpp; sourceTree = ""; };
+ 17F6C5D90F5F9D5B000D9DA9 /* connection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = connection.h; path = jnetlib/connection.h; sourceTree = ""; };
+ 17F6C5DA0F5F9D5B000D9DA9 /* httpget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = httpget.cpp; path = jnetlib/httpget.cpp; sourceTree = ""; };
+ 17F6C5DB0F5F9D5B000D9DA9 /* httpget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = httpget.h; path = jnetlib/httpget.h; sourceTree = ""; };
+ 17F6C5DC0F5F9D5B000D9DA9 /* httppost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = httppost.cpp; path = jnetlib/httppost.cpp; sourceTree = ""; };
+ 17F6C5DD0F5F9D5B000D9DA9 /* httppost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = httppost.h; path = jnetlib/httppost.h; sourceTree = ""; };
+ 17F6C5DE0F5F9D5B000D9DA9 /* httpserv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = httpserv.cpp; path = jnetlib/httpserv.cpp; sourceTree = ""; };
+ 17F6C5DF0F5F9D5B000D9DA9 /* httpserv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = httpserv.h; path = jnetlib/httpserv.h; sourceTree = ""; };
+ 17F6C5E20F5F9D5B000D9DA9 /* jnetlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jnetlib.h; path = jnetlib/jnetlib.h; sourceTree = ""; };
+ 17F6C5E30F5F9D5B000D9DA9 /* listen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = listen.cpp; path = jnetlib/listen.cpp; sourceTree = ""; };
+ 17F6C5E40F5F9D5B000D9DA9 /* listen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = listen.h; path = jnetlib/listen.h; sourceTree = ""; };
+ 17F6C5E60F5F9D5B000D9DA9 /* netinc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = netinc.h; path = jnetlib/netinc.h; sourceTree = ""; };
+ 17F6C5E80F5F9D5B000D9DA9 /* sslconnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sslconnection.cpp; path = jnetlib/sslconnection.cpp; sourceTree = ""; };
+ 17F6C5E90F5F9D5B000D9DA9 /* sslconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sslconnection.h; path = jnetlib/sslconnection.h; sourceTree = ""; };
+ 17F6C5EA0F5F9D5B000D9DA9 /* ssllisten.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ssllisten.cpp; path = jnetlib/ssllisten.cpp; sourceTree = ""; };
+ 17F6C5EB0F5F9D5B000D9DA9 /* ssllisten.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ssllisten.h; path = jnetlib/ssllisten.h; sourceTree = ""; };
+ 17F6C5F30F5F9D5B000D9DA9 /* udpconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = udpconnection.h; path = jnetlib/udpconnection.h; sourceTree = ""; };
+ 17F6C5F40F5F9D5B000D9DA9 /* util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = util.cpp; path = jnetlib/util.cpp; sourceTree = ""; };
+ 17F6C5F50F5F9D5B000D9DA9 /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = util.h; path = jnetlib/util.h; sourceTree = ""; };
+ 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ 8DC2EF5B0486A6940098B216 /* JNetLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JNetLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8DC2EF560486A6940098B216 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 034768DFFF38A50411DB9C8B /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8DC2EF5B0486A6940098B216 /* JNetLib.framework */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 0867D691FE84028FC02AAC07 /* JNetLib */ = {
+ isa = PBXGroup;
+ children = (
+ 08FB77AEFE84172EC02AAC07 /* Classes */,
+ 32C88DFF0371C24200C91783 /* Other Sources */,
+ 089C1665FE841158C02AAC07 /* Resources */,
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
+ 034768DFFF38A50411DB9C8B /* Products */,
+ );
+ name = JNetLib;
+ sourceTree = "";
+ };
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = "External Frameworks and Libraries";
+ sourceTree = "";
+ };
+ 089C1665FE841158C02AAC07 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 8DC2EF5A0486A6940098B216 /* Info.plist */,
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */,
+ );
+ name = Resources;
+ sourceTree = "";
+ };
+ 08FB77AEFE84172EC02AAC07 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 17F6C5D50F5F9D5B000D9DA9 /* asyncdns.cpp */,
+ 17F6C5D60F5F9D5B000D9DA9 /* asyncdns.h */,
+ 17F6C5D80F5F9D5B000D9DA9 /* connection.cpp */,
+ 17F6C5D90F5F9D5B000D9DA9 /* connection.h */,
+ 17F6C5DA0F5F9D5B000D9DA9 /* httpget.cpp */,
+ 17F6C5DB0F5F9D5B000D9DA9 /* httpget.h */,
+ 17F6C5DC0F5F9D5B000D9DA9 /* httppost.cpp */,
+ 17F6C5DD0F5F9D5B000D9DA9 /* httppost.h */,
+ 17F6C5DE0F5F9D5B000D9DA9 /* httpserv.cpp */,
+ 17F6C5DF0F5F9D5B000D9DA9 /* httpserv.h */,
+ 17F6C5E20F5F9D5B000D9DA9 /* jnetlib.h */,
+ 17F6C5E30F5F9D5B000D9DA9 /* listen.cpp */,
+ 17F6C5E40F5F9D5B000D9DA9 /* listen.h */,
+ 17F6C5E60F5F9D5B000D9DA9 /* netinc.h */,
+ 17F6C5E80F5F9D5B000D9DA9 /* sslconnection.cpp */,
+ 17F6C5E90F5F9D5B000D9DA9 /* sslconnection.h */,
+ 17F6C5EA0F5F9D5B000D9DA9 /* ssllisten.cpp */,
+ 17F6C5EB0F5F9D5B000D9DA9 /* ssllisten.h */,
+ 17F6C5F30F5F9D5B000D9DA9 /* udpconnection.h */,
+ 17F6C5F40F5F9D5B000D9DA9 /* util.cpp */,
+ 17F6C5F50F5F9D5B000D9DA9 /* util.h */,
+ );
+ name = Classes;
+ sourceTree = "";
+ };
+ 32C88DFF0371C24200C91783 /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = "Other Sources";
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 8DC2EF500486A6940098B216 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 17F6C5F90F5F9D5B000D9DA9 /* asyncdns.h in Headers */,
+ 17F6C5FC0F5F9D5B000D9DA9 /* connection.h in Headers */,
+ 17F6C5FE0F5F9D5B000D9DA9 /* httpget.h in Headers */,
+ 17F6C6000F5F9D5B000D9DA9 /* httppost.h in Headers */,
+ 17F6C6020F5F9D5B000D9DA9 /* httpserv.h in Headers */,
+ 17F6C6050F5F9D5B000D9DA9 /* jnetlib.h in Headers */,
+ 17F6C6070F5F9D5B000D9DA9 /* listen.h in Headers */,
+ 17F6C6090F5F9D5B000D9DA9 /* netinc.h in Headers */,
+ 17F6C60C0F5F9D5B000D9DA9 /* sslconnection.h in Headers */,
+ 17F6C60E0F5F9D5B000D9DA9 /* ssllisten.h in Headers */,
+ 17F6C6160F5F9D5B000D9DA9 /* udpconnection.h in Headers */,
+ 17F6C6180F5F9D5B000D9DA9 /* util.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 8DC2EF4F0486A6940098B216 /* JNetLib */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "JNetLib" */;
+ buildPhases = (
+ 8DC2EF500486A6940098B216 /* Headers */,
+ 8DC2EF520486A6940098B216 /* Resources */,
+ 8DC2EF540486A6940098B216 /* Sources */,
+ 8DC2EF560486A6940098B216 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = JNetLib;
+ productInstallPath = "$(HOME)/Library/Frameworks";
+ productName = JNetLib;
+ productReference = 8DC2EF5B0486A6940098B216 /* JNetLib.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "JNetLib" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 0867D691FE84028FC02AAC07 /* JNetLib */;
+ productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8DC2EF4F0486A6940098B216 /* JNetLib */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8DC2EF520486A6940098B216 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8DC2EF540486A6940098B216 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 17F6C5F80F5F9D5B000D9DA9 /* asyncdns.cpp in Sources */,
+ 17F6C5FB0F5F9D5B000D9DA9 /* connection.cpp in Sources */,
+ 17F6C5FD0F5F9D5B000D9DA9 /* httpget.cpp in Sources */,
+ 17F6C5FF0F5F9D5B000D9DA9 /* httppost.cpp in Sources */,
+ 17F6C6010F5F9D5B000D9DA9 /* httpserv.cpp in Sources */,
+ 17F6C6060F5F9D5B000D9DA9 /* listen.cpp in Sources */,
+ 17F6C60B0F5F9D5B000D9DA9 /* sslconnection.cpp in Sources */,
+ 17F6C60D0F5F9D5B000D9DA9 /* ssllisten.cpp in Sources */,
+ 17F6C6170F5F9D5B000D9DA9 /* util.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C1667FE841158C02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 1DEB91AE08733DA50010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "@loader_path/../Frameworks";
+ PRODUCT_NAME = JNetLib;
+ SYMROOT = ../../build;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Debug;
+ };
+ 1DEB91AF08733DA50010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_MODEL_TUNING = G5;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "@loader_path/../Frameworks";
+ PRODUCT_NAME = JNetLib;
+ SYMROOT = ../../build;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Release;
+ };
+ 1DEB91B208733DA50010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ };
+ name = Debug;
+ };
+ 1DEB91B308733DA50010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "JNetLib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB91AE08733DA50010E9CD /* Debug */,
+ 1DEB91AF08733DA50010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "JNetLib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB91B208733DA50010E9CD /* Debug */,
+ 1DEB91B308733DA50010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}
diff --git a/Frameworks/JNetLib/JNetLib.xcodeproj/vspader.mode1v3 b/Frameworks/JNetLib/JNetLib.xcodeproj/vspader.mode1v3
new file mode 100644
index 000000000..6442a8d85
--- /dev/null
+++ b/Frameworks/JNetLib/JNetLib.xcodeproj/vspader.mode1v3
@@ -0,0 +1,1384 @@
+
+
+
+
+ ActivePerspectiveName
+ Project
+ AllowedModules
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ PBXSmartGroupTreeModule
+ Name
+ Groups and Files Outline View
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ PBXNavigatorGroup
+ Name
+ Editor
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ XCTaskListModule
+ Name
+ Task List
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ XCDetailModule
+ Name
+ File and Smart Group Detail Viewer
+
+
+ BundleLoadPath
+
+ MaxInstances
+ 1
+ Module
+ PBXBuildResultsModule
+ Name
+ Detailed Build Results Viewer
+
+
+ BundleLoadPath
+
+ MaxInstances
+ 1
+ Module
+ PBXProjectFindModule
+ Name
+ Project Batch Find Tool
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ XCProjectFormatConflictsModule
+ Name
+ Project Format Conflicts List
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ PBXBookmarksModule
+ Name
+ Bookmarks Tool
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ PBXClassBrowserModule
+ Name
+ Class Browser
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ PBXCVSModule
+ Name
+ Source Code Control Tool
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ PBXDebugBreakpointsModule
+ Name
+ Debug Breakpoints Tool
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ XCDockableInspector
+ Name
+ Inspector
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ PBXOpenQuicklyModule
+ Name
+ Open Quickly Tool
+
+
+ BundleLoadPath
+
+ MaxInstances
+ 1
+ Module
+ PBXDebugSessionModule
+ Name
+ Debugger
+
+
+ BundleLoadPath
+
+ MaxInstances
+ 1
+ Module
+ PBXDebugCLIModule
+ Name
+ Debug Console
+
+
+ BundleLoadPath
+
+ MaxInstances
+ n
+ Module
+ XCSnapshotModule
+ Name
+ Snapshots Tool
+
+
+ BundlePath
+ /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources
+ Description
+ DefaultDescriptionKey
+ DockingSystemVisible
+
+ Extension
+ mode1v3
+ FavBarConfig
+
+ PBXProjectModuleGUID
+ 17F6C5D10F5F9D46000D9DA9
+ XCBarModuleItemNames
+
+ XCBarModuleItems
+
+
+ FirstTimeWindowDisplayed
+
+ Identifier
+ com.apple.perspectives.project.mode1v3
+ MajorVersion
+ 33
+ MinorVersion
+ 0
+ Name
+ Default
+ Notifications
+
+ OpenEditors
+
+ PerspectiveWidths
+
+ -1
+ -1
+
+ Perspectives
+
+
+ ChosenToolbarItems
+
+ active-target-popup
+ active-buildstyle-popup
+ action
+ NSToolbarFlexibleSpaceItem
+ buildOrClean
+ build-and-goOrGo
+ com.apple.ide.PBXToolbarStopButton
+ get-info
+ toggle-editor
+ NSToolbarFlexibleSpaceItem
+ com.apple.pbx.toolbar.searchfield
+
+ ControllerClassBaseName
+
+ IconName
+ WindowOfProjectWithEditor
+ Identifier
+ perspective.project
+ IsVertical
+
+ Layout
+
+
+ ContentConfiguration
+
+ PBXBottomSmartGroupGIDs
+
+ 1C37FBAC04509CD000000102
+ 1C37FAAC04509CD000000102
+ 1C08E77C0454961000C914BD
+ 1C37FABC05509CD000000102
+ 1C37FABC05539CD112110102
+ E2644B35053B69B200211256
+ 1C37FABC04509CD000100104
+ 1CC0EA4004350EF90044410B
+ 1CC0EA4004350EF90041110B
+
+ PBXProjectModuleGUID
+ 1CE0B1FE06471DED0097A5F4
+ PBXProjectModuleLabel
+ Files
+ PBXProjectStructureProvided
+ yes
+ PBXSmartGroupTreeModuleColumnData
+
+ PBXSmartGroupTreeModuleColumnWidthsKey
+
+ 186
+
+ PBXSmartGroupTreeModuleColumnsKey_v4
+
+ MainColumn
+
+
+ PBXSmartGroupTreeModuleOutlineStateKey_v7
+
+ PBXSmartGroupTreeModuleOutlineStateExpansionKey
+
+ 0867D691FE84028FC02AAC07
+ 08FB77AEFE84172EC02AAC07
+ 089C1665FE841158C02AAC07
+ 0867D69AFE84028FC02AAC07
+ 034768DFFF38A50411DB9C8B
+ 1C37FABC05509CD000000102
+
+ PBXSmartGroupTreeModuleOutlineStateSelectionKey
+
+
+ 30
+
+
+ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey
+ {{0, 0}, {186, 705}}
+
+ PBXTopSmartGroupGIDs
+
+ XCIncludePerspectivesSwitch
+
+ XCSharingToken
+ com.apple.Xcode.GFSharingToken
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 0}, {203, 723}}
+ GroupTreeTableConfiguration
+
+ MainColumn
+ 186
+
+ RubberWindowFrame
+ 36 241 1078 764 0 0 1680 1028
+
+ Module
+ PBXSmartGroupTreeModule
+ Proportion
+ 203pt
+
+
+ Dock
+
+
+ BecomeActive
+
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ 1CE0B20306471E060097A5F4
+ PBXProjectModuleLabel
+ httppost.h
+ PBXSplitModuleInNavigatorKey
+
+ Split0
+
+ PBXProjectModuleGUID
+ 1CE0B20406471E060097A5F4
+ PBXProjectModuleLabel
+ httppost.h
+ _historyCapacity
+ 0
+ bookmark
+ 17F6C6CC0F5FA4D4000D9DA9
+ history
+
+ 17F6C6290F5F9E23000D9DA9
+ 17F6C62A0F5F9E23000D9DA9
+ 17F6C62B0F5F9E23000D9DA9
+ 17F6C62C0F5F9E23000D9DA9
+ 17F6C62D0F5F9E23000D9DA9
+ 17F6C62E0F5F9E23000D9DA9
+ 17F6C62F0F5F9E23000D9DA9
+ 17F6C6300F5F9E23000D9DA9
+ 17F6C6C50F5FA4D4000D9DA9
+ 17F6C6C60F5FA4D4000D9DA9
+ 17F6C6C70F5FA4D4000D9DA9
+ 17F6C6C80F5FA4D4000D9DA9
+
+ prevStack
+
+ 17F6C6320F5F9E23000D9DA9
+ 17F6C6330F5F9E23000D9DA9
+ 17F6C6340F5F9E23000D9DA9
+ 17F6C6350F5F9E23000D9DA9
+ 17F6C6360F5F9E23000D9DA9
+ 17F6C6370F5F9E23000D9DA9
+ 17F6C6380F5F9E23000D9DA9
+ 17F6C6390F5F9E23000D9DA9
+ 17F6C6C90F5FA4D4000D9DA9
+ 17F6C6CA0F5FA4D4000D9DA9
+ 17F6C6CB0F5FA4D4000D9DA9
+
+
+ SplitCount
+ 1
+
+ StatusBarVisibility
+
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 0}, {870, 545}}
+ RubberWindowFrame
+ 36 241 1078 764 0 0 1680 1028
+
+ Module
+ PBXNavigatorGroup
+ Proportion
+ 545pt
+
+
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ 1CE0B20506471E060097A5F4
+ PBXProjectModuleLabel
+ Detail
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 550}, {870, 173}}
+ RubberWindowFrame
+ 36 241 1078 764 0 0 1680 1028
+
+ Module
+ XCDetailModule
+ Proportion
+ 173pt
+
+
+ Proportion
+ 870pt
+
+
+ Name
+ Project
+ ServiceClasses
+
+ XCModuleDock
+ PBXSmartGroupTreeModule
+ XCModuleDock
+ PBXNavigatorGroup
+ XCDetailModule
+
+ TableOfContents
+
+ 17F6C6CD0F5FA4D4000D9DA9
+ 1CE0B1FE06471DED0097A5F4
+ 17F6C6CE0F5FA4D4000D9DA9
+ 1CE0B20306471E060097A5F4
+ 1CE0B20506471E060097A5F4
+
+ ToolbarConfiguration
+ xcode.toolbar.config.defaultV3
+
+
+ ControllerClassBaseName
+
+ IconName
+ WindowOfProject
+ Identifier
+ perspective.morph
+ IsVertical
+ 0
+ Layout
+
+
+ BecomeActive
+ 1
+ ContentConfiguration
+
+ PBXBottomSmartGroupGIDs
+
+ 1C37FBAC04509CD000000102
+ 1C37FAAC04509CD000000102
+ 1C08E77C0454961000C914BD
+ 1C37FABC05509CD000000102
+ 1C37FABC05539CD112110102
+ E2644B35053B69B200211256
+ 1C37FABC04509CD000100104
+ 1CC0EA4004350EF90044410B
+ 1CC0EA4004350EF90041110B
+
+ PBXProjectModuleGUID
+ 11E0B1FE06471DED0097A5F4
+ PBXProjectModuleLabel
+ Files
+ PBXProjectStructureProvided
+ yes
+ PBXSmartGroupTreeModuleColumnData
+
+ PBXSmartGroupTreeModuleColumnWidthsKey
+
+ 186
+
+ PBXSmartGroupTreeModuleColumnsKey_v4
+
+ MainColumn
+
+
+ PBXSmartGroupTreeModuleOutlineStateKey_v7
+
+ PBXSmartGroupTreeModuleOutlineStateExpansionKey
+
+ 29B97314FDCFA39411CA2CEA
+ 1C37FABC05509CD000000102
+
+ PBXSmartGroupTreeModuleOutlineStateSelectionKey
+
+
+ 0
+
+
+ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey
+ {{0, 0}, {186, 337}}
+
+ PBXTopSmartGroupGIDs
+
+ XCIncludePerspectivesSwitch
+ 1
+ XCSharingToken
+ com.apple.Xcode.GFSharingToken
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 0}, {203, 355}}
+ GroupTreeTableConfiguration
+
+ MainColumn
+ 186
+
+ RubberWindowFrame
+ 373 269 690 397 0 0 1440 878
+
+ Module
+ PBXSmartGroupTreeModule
+ Proportion
+ 100%
+
+
+ Name
+ Morph
+ PreferredWidth
+ 300
+ ServiceClasses
+
+ XCModuleDock
+ PBXSmartGroupTreeModule
+
+ TableOfContents
+
+ 11E0B1FE06471DED0097A5F4
+
+ ToolbarConfiguration
+ xcode.toolbar.config.default.shortV3
+
+
+ PerspectivesBarVisible
+
+ ShelfIsVisible
+
+ SourceDescription
+ file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'
+ StatusbarIsVisible
+
+ TimeStamp
+ 0.0
+ ToolbarDisplayMode
+ 1
+ ToolbarIsVisible
+
+ ToolbarSizeMode
+ 1
+ Type
+ Perspectives
+ UpdateMessage
+ The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?
+ WindowJustification
+ 5
+ WindowOrderList
+
+ 1C530D57069F1CE1000CFCEE
+ 17F6C5D20F5F9D46000D9DA9
+ /Users/vspader/Projects/Cog/Frameworks/JNetLib/JNetLib.xcodeproj
+
+ WindowString
+ 36 241 1078 764 0 0 1680 1028
+ WindowToolsV3
+
+
+ FirstTimeWindowDisplayed
+
+ Identifier
+ windowTool.build
+ IsVertical
+
+ Layout
+
+
+ Dock
+
+
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ 1CD0528F0623707200166675
+ PBXProjectModuleLabel
+
+ StatusBarVisibility
+
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 0}, {500, 218}}
+ RubberWindowFrame
+ 57 482 500 500 0 0 1680 1028
+
+ Module
+ PBXNavigatorGroup
+ Proportion
+ 218pt
+
+
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ XCMainBuildResultsModuleGUID
+ PBXProjectModuleLabel
+ Build
+ XCBuildResultsTrigger_Collapse
+ 1021
+ XCBuildResultsTrigger_Open
+ 1011
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 223}, {500, 236}}
+ RubberWindowFrame
+ 57 482 500 500 0 0 1680 1028
+
+ Module
+ PBXBuildResultsModule
+ Proportion
+ 236pt
+
+
+ Proportion
+ 459pt
+
+
+ Name
+ Build Results
+ ServiceClasses
+
+ PBXBuildResultsModule
+
+ StatusbarIsVisible
+
+ TableOfContents
+
+ 17F6C5D20F5F9D46000D9DA9
+ 17F6C6BE0F5FA4D4000D9DA9
+ 1CD0528F0623707200166675
+ XCMainBuildResultsModuleGUID
+
+ ToolbarConfiguration
+ xcode.toolbar.config.buildV3
+ WindowString
+ 57 482 500 500 0 0 1680 1028
+ WindowToolGUID
+ 17F6C5D20F5F9D46000D9DA9
+ WindowToolIsVisible
+
+
+
+ Identifier
+ windowTool.debugger
+ Layout
+
+
+ Dock
+
+
+ ContentConfiguration
+
+ Debugger
+
+ HorizontalSplitView
+
+ _collapsingFrameDimension
+ 0.0
+ _indexOfCollapsedView
+ 0
+ _percentageOfCollapsedView
+ 0.0
+ isCollapsed
+ yes
+ sizes
+
+ {{0, 0}, {317, 164}}
+ {{317, 0}, {377, 164}}
+
+
+ VerticalSplitView
+
+ _collapsingFrameDimension
+ 0.0
+ _indexOfCollapsedView
+ 0
+ _percentageOfCollapsedView
+ 0.0
+ isCollapsed
+ yes
+ sizes
+
+ {{0, 0}, {694, 164}}
+ {{0, 164}, {694, 216}}
+
+
+
+ LauncherConfigVersion
+ 8
+ PBXProjectModuleGUID
+ 1C162984064C10D400B95A72
+ PBXProjectModuleLabel
+ Debug - GLUTExamples (Underwater)
+
+ GeometryConfiguration
+
+ DebugConsoleDrawerSize
+ {100, 120}
+ DebugConsoleVisible
+ None
+ DebugConsoleWindowFrame
+ {{200, 200}, {500, 300}}
+ DebugSTDIOWindowFrame
+ {{200, 200}, {500, 300}}
+ Frame
+ {{0, 0}, {694, 380}}
+ RubberWindowFrame
+ 321 238 694 422 0 0 1440 878
+
+ Module
+ PBXDebugSessionModule
+ Proportion
+ 100%
+
+
+ Proportion
+ 100%
+
+
+ Name
+ Debugger
+ ServiceClasses
+
+ PBXDebugSessionModule
+
+ StatusbarIsVisible
+ 1
+ TableOfContents
+
+ 1CD10A99069EF8BA00B06720
+ 1C0AD2AB069F1E9B00FABCE6
+ 1C162984064C10D400B95A72
+ 1C0AD2AC069F1E9B00FABCE6
+
+ ToolbarConfiguration
+ xcode.toolbar.config.debugV3
+ WindowString
+ 321 238 694 422 0 0 1440 878
+ WindowToolGUID
+ 1CD10A99069EF8BA00B06720
+ WindowToolIsVisible
+ 0
+
+
+ FirstTimeWindowDisplayed
+
+ Identifier
+ windowTool.find
+ IsVertical
+
+ Layout
+
+
+ Dock
+
+
+ Dock
+
+
+ BecomeActive
+
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ 1CDD528C0622207200134675
+ PBXProjectModuleLabel
+ httppost.h
+ StatusBarVisibility
+
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 0}, {1255, 537}}
+ RubberWindowFrame
+ 57 187 1255 795 0 0 1680 1028
+
+ Module
+ PBXNavigatorGroup
+ Proportion
+ 1255pt
+
+
+ Proportion
+ 537pt
+
+
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ 1CD0528E0623707200166675
+ PBXProjectModuleLabel
+ Project Find
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 542}, {1255, 212}}
+ RubberWindowFrame
+ 57 187 1255 795 0 0 1680 1028
+
+ Module
+ PBXProjectFindModule
+ Proportion
+ 212pt
+
+
+ Proportion
+ 754pt
+
+
+ Name
+ Project Find
+ ServiceClasses
+
+ PBXProjectFindModule
+
+ StatusbarIsVisible
+
+ TableOfContents
+
+ 1C530D57069F1CE1000CFCEE
+ 17F6C6C30F5FA4D4000D9DA9
+ 17F6C6C40F5FA4D4000D9DA9
+ 1CDD528C0622207200134675
+ 1CD0528E0623707200166675
+
+ WindowString
+ 57 187 1255 795 0 0 1680 1028
+ WindowToolGUID
+ 1C530D57069F1CE1000CFCEE
+ WindowToolIsVisible
+
+
+
+ Identifier
+ MENUSEPARATOR
+
+
+ Identifier
+ windowTool.debuggerConsole
+ Layout
+
+
+ Dock
+
+
+ BecomeActive
+ 1
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ 1C78EAAC065D492600B07095
+ PBXProjectModuleLabel
+ Debugger Console
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 0}, {650, 250}}
+ RubberWindowFrame
+ 516 632 650 250 0 0 1680 1027
+
+ Module
+ PBXDebugCLIModule
+ Proportion
+ 209pt
+
+
+ Proportion
+ 209pt
+
+
+ Name
+ Debugger Console
+ ServiceClasses
+
+ PBXDebugCLIModule
+
+ StatusbarIsVisible
+ 1
+ TableOfContents
+
+ 1C78EAAD065D492600B07095
+ 1C78EAAE065D492600B07095
+ 1C78EAAC065D492600B07095
+
+ ToolbarConfiguration
+ xcode.toolbar.config.consoleV3
+ WindowString
+ 650 41 650 250 0 0 1280 1002
+ WindowToolGUID
+ 1C78EAAD065D492600B07095
+ WindowToolIsVisible
+ 0
+
+
+ Identifier
+ windowTool.snapshots
+ Layout
+
+
+ Dock
+
+
+ Module
+ XCSnapshotModule
+ Proportion
+ 100%
+
+
+ Proportion
+ 100%
+
+
+ Name
+ Snapshots
+ ServiceClasses
+
+ XCSnapshotModule
+
+ StatusbarIsVisible
+ Yes
+ ToolbarConfiguration
+ xcode.toolbar.config.snapshots
+ WindowString
+ 315 824 300 550 0 0 1440 878
+ WindowToolIsVisible
+ Yes
+
+
+ Identifier
+ windowTool.scm
+ Layout
+
+
+ Dock
+
+
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ 1C78EAB2065D492600B07095
+ PBXProjectModuleLabel
+ <No Editor>
+ PBXSplitModuleInNavigatorKey
+
+ Split0
+
+ PBXProjectModuleGUID
+ 1C78EAB3065D492600B07095
+
+ SplitCount
+ 1
+
+ StatusBarVisibility
+ 1
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 0}, {452, 0}}
+ RubberWindowFrame
+ 743 379 452 308 0 0 1280 1002
+
+ Module
+ PBXNavigatorGroup
+ Proportion
+ 0pt
+
+
+ BecomeActive
+ 1
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ 1CD052920623707200166675
+ PBXProjectModuleLabel
+ SCM
+
+ GeometryConfiguration
+
+ ConsoleFrame
+ {{0, 259}, {452, 0}}
+ Frame
+ {{0, 7}, {452, 259}}
+ RubberWindowFrame
+ 743 379 452 308 0 0 1280 1002
+ TableConfiguration
+
+ Status
+ 30
+ FileName
+ 199
+ Path
+ 197.0950012207031
+
+ TableFrame
+ {{0, 0}, {452, 250}}
+
+ Module
+ PBXCVSModule
+ Proportion
+ 262pt
+
+
+ Proportion
+ 266pt
+
+
+ Name
+ SCM
+ ServiceClasses
+
+ PBXCVSModule
+
+ StatusbarIsVisible
+ 1
+ TableOfContents
+
+ 1C78EAB4065D492600B07095
+ 1C78EAB5065D492600B07095
+ 1C78EAB2065D492600B07095
+ 1CD052920623707200166675
+
+ ToolbarConfiguration
+ xcode.toolbar.config.scm
+ WindowString
+ 743 379 452 308 0 0 1280 1002
+
+
+ Identifier
+ windowTool.breakpoints
+ IsVertical
+ 0
+ Layout
+
+
+ Dock
+
+
+ BecomeActive
+ 1
+ ContentConfiguration
+
+ PBXBottomSmartGroupGIDs
+
+ 1C77FABC04509CD000000102
+
+ PBXProjectModuleGUID
+ 1CE0B1FE06471DED0097A5F4
+ PBXProjectModuleLabel
+ Files
+ PBXProjectStructureProvided
+ no
+ PBXSmartGroupTreeModuleColumnData
+
+ PBXSmartGroupTreeModuleColumnWidthsKey
+
+ 168
+
+ PBXSmartGroupTreeModuleColumnsKey_v4
+
+ MainColumn
+
+
+ PBXSmartGroupTreeModuleOutlineStateKey_v7
+
+ PBXSmartGroupTreeModuleOutlineStateExpansionKey
+
+ 1C77FABC04509CD000000102
+
+ PBXSmartGroupTreeModuleOutlineStateSelectionKey
+
+
+ 0
+
+
+ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey
+ {{0, 0}, {168, 350}}
+
+ PBXTopSmartGroupGIDs
+
+ XCIncludePerspectivesSwitch
+ 0
+
+ GeometryConfiguration
+
+ Frame
+ {{0, 0}, {185, 368}}
+ GroupTreeTableConfiguration
+
+ MainColumn
+ 168
+
+ RubberWindowFrame
+ 315 424 744 409 0 0 1440 878
+
+ Module
+ PBXSmartGroupTreeModule
+ Proportion
+ 185pt
+
+
+ ContentConfiguration
+
+ PBXProjectModuleGUID
+ 1CA1AED706398EBD00589147
+ PBXProjectModuleLabel
+ Detail
+
+ GeometryConfiguration
+
+ Frame
+ {{190, 0}, {554, 368}}
+ RubberWindowFrame
+ 315 424 744 409 0 0 1440 878
+
+ Module
+ XCDetailModule
+ Proportion
+ 554pt
+
+
+ Proportion
+ 368pt
+
+
+ MajorVersion
+ 3
+ MinorVersion
+ 0
+ Name
+ Breakpoints
+ ServiceClasses
+
+ PBXSmartGroupTreeModule
+ XCDetailModule
+
+ StatusbarIsVisible
+ 1
+ TableOfContents
+
+ 1CDDB66807F98D9800BB5817
+ 1CDDB66907F98D9800BB5817
+ 1CE0B1FE06471DED0097A5F4
+ 1CA1AED706398EBD00589147
+
+ ToolbarConfiguration
+ xcode.toolbar.config.breakpointsV3
+ WindowString
+ 315 424 744 409 0 0 1440 878
+ WindowToolGUID
+ 1CDDB66807F98D9800BB5817
+ WindowToolIsVisible
+ 1
+
+
+ Identifier
+ windowTool.debugAnimator
+ Layout
+
+
+ Dock
+
+
+ Module
+ PBXNavigatorGroup
+ Proportion
+ 100%
+
+
+ Proportion
+ 100%
+
+
+ Name
+ Debug Visualizer
+ ServiceClasses
+
+ PBXNavigatorGroup
+
+ StatusbarIsVisible
+ 1
+ ToolbarConfiguration
+ xcode.toolbar.config.debugAnimatorV3
+ WindowString
+ 100 100 700 500 0 0 1280 1002
+
+
+ Identifier
+ windowTool.bookmarks
+ Layout
+
+
+ Dock
+
+
+ Module
+ PBXBookmarksModule
+ Proportion
+ 100%
+
+
+ Proportion
+ 100%
+
+
+ Name
+ Bookmarks
+ ServiceClasses
+
+ PBXBookmarksModule
+
+ StatusbarIsVisible
+ 0
+ WindowString
+ 538 42 401 187 0 0 1280 1002
+
+
+ Identifier
+ windowTool.projectFormatConflicts
+ Layout
+
+
+ Dock
+
+
+ Module
+ XCProjectFormatConflictsModule
+ Proportion
+ 100%
+
+
+ Proportion
+ 100%
+
+
+ Name
+ Project Format Conflicts
+ ServiceClasses
+
+ XCProjectFormatConflictsModule
+
+ StatusbarIsVisible
+ 0
+ WindowContentMinSize
+ 450 300
+ WindowString
+ 50 850 472 307 0 0 1440 877
+
+
+ Identifier
+ windowTool.classBrowser
+ Layout
+
+
+ Dock
+
+
+ BecomeActive
+ 1
+ ContentConfiguration
+
+ OptionsSetName
+ Hierarchy, all classes
+ PBXProjectModuleGUID
+ 1CA6456E063B45B4001379D8
+ PBXProjectModuleLabel
+ Class Browser - NSObject
+
+ GeometryConfiguration
+
+ ClassesFrame
+ {{0, 0}, {374, 96}}
+ ClassesTreeTableConfiguration
+
+ PBXClassNameColumnIdentifier
+ 208
+ PBXClassBookColumnIdentifier
+ 22
+
+ Frame
+ {{0, 0}, {630, 331}}
+ MembersFrame
+ {{0, 105}, {374, 395}}
+ MembersTreeTableConfiguration
+
+ PBXMemberTypeIconColumnIdentifier
+ 22
+ PBXMemberNameColumnIdentifier
+ 216
+ PBXMemberTypeColumnIdentifier
+ 97
+ PBXMemberBookColumnIdentifier
+ 22
+
+ PBXModuleWindowStatusBarHidden2
+ 1
+ RubberWindowFrame
+ 385 179 630 352 0 0 1440 878
+
+ Module
+ PBXClassBrowserModule
+ Proportion
+ 332pt
+
+
+ Proportion
+ 332pt
+
+
+ Name
+ Class Browser
+ ServiceClasses
+
+ PBXClassBrowserModule
+
+ StatusbarIsVisible
+ 0
+ TableOfContents
+
+ 1C0AD2AF069F1E9B00FABCE6
+ 1C0AD2B0069F1E9B00FABCE6
+ 1CA6456E063B45B4001379D8
+
+ ToolbarConfiguration
+ xcode.toolbar.config.classbrowser
+ WindowString
+ 385 179 630 352 0 0 1440 878
+ WindowToolGUID
+ 1C0AD2AF069F1E9B00FABCE6
+ WindowToolIsVisible
+ 0
+
+
+ Identifier
+ windowTool.refactoring
+ IncludeInToolsMenu
+ 0
+ Layout
+
+
+ Dock
+
+
+ BecomeActive
+ 1
+ GeometryConfiguration
+
+ Frame
+ {0, 0}, {500, 335}
+ RubberWindowFrame
+ {0, 0}, {500, 335}
+
+ Module
+ XCRefactoringModule
+ Proportion
+ 100%
+
+
+ Proportion
+ 100%
+
+
+ Name
+ Refactoring
+ ServiceClasses
+
+ XCRefactoringModule
+
+ WindowString
+ 200 200 500 356 0 0 1920 1200
+
+
+
+
diff --git a/Frameworks/JNetLib/JNetLib.xcodeproj/vspader.pbxuser b/Frameworks/JNetLib/JNetLib.xcodeproj/vspader.pbxuser
new file mode 100644
index 000000000..bf811692e
--- /dev/null
+++ b/Frameworks/JNetLib/JNetLib.xcodeproj/vspader.pbxuser
@@ -0,0 +1,425 @@
+// !$*UTF8*$!
+{
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
+ activeBuildConfigurationName = Release;
+ activeTarget = 8DC2EF4F0486A6940098B216 /* JNetLib */;
+ addToTargets = (
+ 8DC2EF4F0486A6940098B216 /* JNetLib */,
+ );
+ codeSenseManager = 17F6C47F0F5F9D26000D9DA9 /* Code sense */;
+ perUserDictionary = {
+ PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 631,
+ 20,
+ 48,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 591,
+ 60,
+ 20,
+ 48.16259765625,
+ 43,
+ 43,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXTargetDataSource_PrimaryAttribute,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ );
+ };
+ PBXPerProjectTemplateStateSaveDate = 257925053;
+ PBXWorkspaceStateSaveDate = 257925053;
+ };
+ perUserProjectItems = {
+ 17F6C6290F5F9E23000D9DA9 /* PlistBookmark */ = 17F6C6290F5F9E23000D9DA9 /* PlistBookmark */;
+ 17F6C62A0F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C62A0F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C62B0F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C62B0F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C62C0F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C62C0F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C62D0F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C62D0F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C62E0F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C62E0F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C62F0F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C62F0F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C6300F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C6300F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C6320F5F9E23000D9DA9 /* PlistBookmark */ = 17F6C6320F5F9E23000D9DA9 /* PlistBookmark */;
+ 17F6C6330F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C6330F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C6340F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C6340F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C6350F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C6350F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C6360F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C6360F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C6370F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C6370F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C6380F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C6380F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C6390F5F9E23000D9DA9 /* PBXTextBookmark */ = 17F6C6390F5F9E23000D9DA9 /* PBXTextBookmark */;
+ 17F6C6C50F5FA4D4000D9DA9 /* PBXTextBookmark */ = 17F6C6C50F5FA4D4000D9DA9 /* PBXTextBookmark */;
+ 17F6C6C60F5FA4D4000D9DA9 /* PBXTextBookmark */ = 17F6C6C60F5FA4D4000D9DA9 /* PBXTextBookmark */;
+ 17F6C6C70F5FA4D4000D9DA9 /* PBXTextBookmark */ = 17F6C6C70F5FA4D4000D9DA9 /* PBXTextBookmark */;
+ 17F6C6C80F5FA4D4000D9DA9 /* PBXTextBookmark */ = 17F6C6C80F5FA4D4000D9DA9 /* PBXTextBookmark */;
+ 17F6C6C90F5FA4D4000D9DA9 /* PBXTextBookmark */ = 17F6C6C90F5FA4D4000D9DA9 /* PBXTextBookmark */;
+ 17F6C6CA0F5FA4D4000D9DA9 /* PBXTextBookmark */ = 17F6C6CA0F5FA4D4000D9DA9 /* PBXTextBookmark */;
+ 17F6C6CB0F5FA4D4000D9DA9 /* PBXTextBookmark */ = 17F6C6CB0F5FA4D4000D9DA9 /* PBXTextBookmark */;
+ 17F6C6CC0F5FA4D4000D9DA9 /* PBXTextBookmark */ = 17F6C6CC0F5FA4D4000D9DA9 /* PBXTextBookmark */;
+ };
+ sourceControlManager = 17F6C47E0F5F9D26000D9DA9 /* Source Control */;
+ userBuildSettings = {
+ };
+ };
+ 089C1667FE841158C02AAC07 /* English */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {809, 513}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 45}";
+ };
+ };
+ 17F6C47E0F5F9D26000D9DA9 /* Source Control */ = {
+ isa = PBXSourceControlManager;
+ fallbackIsa = XCSourceControlManager;
+ isSCMEnabled = 0;
+ scmConfiguration = {
+ };
+ };
+ 17F6C47F0F5F9D26000D9DA9 /* Code sense */ = {
+ isa = PBXCodeSenseManager;
+ indexTemplatePath = "";
+ };
+ 17F6C5DA0F5F9D5B000D9DA9 /* httpget.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {519, 6860}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 403}";
+ };
+ };
+ 17F6C5DB0F5F9D5B000D9DA9 /* httpget.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1194, 1414}}";
+ sepNavSelRange = "{2253, 0}";
+ sepNavVisRange = "{2162, 1171}";
+ };
+ };
+ 17F6C5DC0F5F9D5B000D9DA9 /* httppost.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {439, 5796}}";
+ sepNavSelRange = "{319, 0}";
+ sepNavVisRange = "{186, 269}";
+ };
+ };
+ 17F6C5DD0F5F9D5B000D9DA9 /* httppost.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {809, 1792}}";
+ sepNavSelRange = "{2769, 11}";
+ sepNavVisRange = "{2118, 667}";
+ };
+ };
+ 17F6C5E20F5F9D5B000D9DA9 /* jnetlib.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {809, 714}}";
+ sepNavSelRange = "{952, 0}";
+ sepNavVisRange = "{394, 1204}";
+ };
+ };
+ 17F6C5E30F5F9D5B000D9DA9 /* listen.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {519, 1050}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 400}";
+ };
+ };
+ 17F6C5E60F5F9D5B000D9DA9 /* netinc.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {519, 1162}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 370}";
+ };
+ };
+ 17F6C5E80F5F9D5B000D9DA9 /* sslconnection.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {918, 4396}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 290}";
+ };
+ };
+ 17F6C5E90F5F9D5B000D9DA9 /* sslconnection.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {809, 854}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{439, 1350}";
+ };
+ };
+ 17F6C5EA0F5F9D5B000D9DA9 /* ssllisten.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {762, 1820}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 498}";
+ };
+ };
+ 17F6C5EB0F5F9D5B000D9DA9 /* ssllisten.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {519, 686}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 636}";
+ };
+ };
+ 17F6C6290F5F9E23000D9DA9 /* PlistBookmark */ = {
+ isa = PlistBookmark;
+ fRef = 8DC2EF5A0486A6940098B216 /* Info.plist */;
+ fallbackIsa = PBXBookmark;
+ isK = 0;
+ kPath = (
+ );
+ name = /Users/vspader/Projects/Cog/Frameworks/JNetLib/Info.plist;
+ rLen = 0;
+ rLoc = 2147483647;
+ };
+ 17F6C62A0F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5DC0F5F9D5B000D9DA9 /* httppost.cpp */;
+ name = "httppost.cpp: 17";
+ rLen = 0;
+ rLoc = 319;
+ rType = 0;
+ vrLen = 418;
+ vrLoc = 258;
+ };
+ 17F6C62B0F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5DA0F5F9D5B000D9DA9 /* httpget.cpp */;
+ name = "httpget.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 403;
+ vrLoc = 0;
+ };
+ 17F6C62C0F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E30F5F9D5B000D9DA9 /* listen.cpp */;
+ name = "listen.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 400;
+ vrLoc = 0;
+ };
+ 17F6C62D0F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E60F5F9D5B000D9DA9 /* netinc.h */;
+ name = "netinc.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 370;
+ vrLoc = 0;
+ };
+ 17F6C62E0F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E80F5F9D5B000D9DA9 /* sslconnection.cpp */;
+ name = "sslconnection.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 290;
+ vrLoc = 0;
+ };
+ 17F6C62F0F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5EB0F5F9D5B000D9DA9 /* ssllisten.h */;
+ name = "ssllisten.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 636;
+ vrLoc = 0;
+ };
+ 17F6C6300F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5EA0F5F9D5B000D9DA9 /* ssllisten.cpp */;
+ name = "ssllisten.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 498;
+ vrLoc = 0;
+ };
+ 17F6C6320F5F9E23000D9DA9 /* PlistBookmark */ = {
+ isa = PlistBookmark;
+ fRef = 8DC2EF5A0486A6940098B216 /* Info.plist */;
+ fallbackIsa = PBXBookmark;
+ isK = 0;
+ kPath = (
+ );
+ name = /Users/vspader/Projects/Cog/Frameworks/JNetLib/Info.plist;
+ rLen = 0;
+ rLoc = 2147483647;
+ };
+ 17F6C6330F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5DC0F5F9D5B000D9DA9 /* httppost.cpp */;
+ name = "httppost.cpp: 17";
+ rLen = 0;
+ rLoc = 319;
+ rType = 0;
+ vrLen = 418;
+ vrLoc = 258;
+ };
+ 17F6C6340F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5DA0F5F9D5B000D9DA9 /* httpget.cpp */;
+ name = "httpget.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 403;
+ vrLoc = 0;
+ };
+ 17F6C6350F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E30F5F9D5B000D9DA9 /* listen.cpp */;
+ name = "listen.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 400;
+ vrLoc = 0;
+ };
+ 17F6C6360F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E60F5F9D5B000D9DA9 /* netinc.h */;
+ name = "netinc.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 370;
+ vrLoc = 0;
+ };
+ 17F6C6370F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E80F5F9D5B000D9DA9 /* sslconnection.cpp */;
+ name = "sslconnection.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 290;
+ vrLoc = 0;
+ };
+ 17F6C6380F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5EB0F5F9D5B000D9DA9 /* ssllisten.h */;
+ name = "ssllisten.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 636;
+ vrLoc = 0;
+ };
+ 17F6C6390F5F9E23000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5EA0F5F9D5B000D9DA9 /* ssllisten.cpp */;
+ name = "ssllisten.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 498;
+ vrLoc = 0;
+ };
+ 17F6C6C50F5FA4D4000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E90F5F9D5B000D9DA9 /* sslconnection.h */;
+ name = "sslconnection.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1350;
+ vrLoc = 439;
+ };
+ 17F6C6C60F5FA4D4000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 089C1667FE841158C02AAC07 /* English */;
+ name = "InfoPlist.strings: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 45;
+ vrLoc = 0;
+ };
+ 17F6C6C70F5FA4D4000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E20F5F9D5B000D9DA9 /* jnetlib.h */;
+ name = "jnetlib.h: 25";
+ rLen = 0;
+ rLoc = 952;
+ rType = 0;
+ vrLen = 1204;
+ vrLoc = 394;
+ };
+ 17F6C6C80F5FA4D4000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5DD0F5F9D5B000D9DA9 /* httppost.h */;
+ rLen = 11;
+ rLoc = 2769;
+ rType = 0;
+ };
+ 17F6C6C90F5FA4D4000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E90F5F9D5B000D9DA9 /* sslconnection.h */;
+ name = "sslconnection.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1350;
+ vrLoc = 439;
+ };
+ 17F6C6CA0F5FA4D4000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 089C1667FE841158C02AAC07 /* English */;
+ name = "InfoPlist.strings: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 45;
+ vrLoc = 0;
+ };
+ 17F6C6CB0F5FA4D4000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5E20F5F9D5B000D9DA9 /* jnetlib.h */;
+ name = "jnetlib.h: 25";
+ rLen = 0;
+ rLoc = 952;
+ rType = 0;
+ vrLen = 1204;
+ vrLoc = 394;
+ };
+ 17F6C6CC0F5FA4D4000D9DA9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 17F6C5DD0F5F9D5B000D9DA9 /* httppost.h */;
+ name = "httppost.h: 77";
+ rLen = 11;
+ rLoc = 2769;
+ rType = 0;
+ vrLen = 667;
+ vrLoc = 2118;
+ };
+ 8DC2EF4F0486A6940098B216 /* JNetLib */ = {
+ activeExec = 0;
+ };
+}
diff --git a/Frameworks/JNetLib/jnetlib/.DS_Store b/Frameworks/JNetLib/jnetlib/.DS_Store
new file mode 100644
index 000000000..c7218c523
Binary files /dev/null and b/Frameworks/JNetLib/jnetlib/.DS_Store differ
diff --git a/Frameworks/JNetLib/jnetlib/CHANGES.txt b/Frameworks/JNetLib/jnetlib/CHANGES.txt
new file mode 100755
index 000000000..fee39b7f0
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/CHANGES.txt
@@ -0,0 +1,6 @@
++03/06/2006 Joshua Teitelbaum : Added file CHANGES.txt
++03/06/2006 Joshua Teitelbaum : Added file README.txt
++03/06/2006 Joshua Teitelbaum : Basic Integration with SSL
++03/06/2006 Joshua Teitelbaum : Added new HTTP POST Test
++03/06/2006 Joshua Teitelbaum : Added HTTPS Listen Test
++03/06/2006 Joshua Teitelbaum : Added HTTPS Get Test
diff --git a/Frameworks/JNetLib/jnetlib/Makefile b/Frameworks/JNetLib/jnetlib/Makefile
new file mode 100755
index 000000000..58cab477e
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/Makefile
@@ -0,0 +1,20 @@
+# freebsd3 makefile
+default: jnl.a
+
+LDFLAGS = -pthread
+CFLAGS = -s -O2 -Wall -DTHREAD_SAFE -D_THREAD_SAFE -D_REENTRANT
+CC = gcc
+CPP = g++
+CXX = g++
+
+OBJS = asyncdns.o connection.o httpget.o httpserv.o listen.o util.o sercon.o
+
+jnl.a: ${OBJS}
+ -rm -f jnl.a
+ ar rcs jnl.a ${OBJS}
+
+test: ${OBJS} test.o
+ $(CC) ${CFLAGS} -o test test.o ${OBJS} ${LDFLAGS}
+
+clean:
+ -rm -f ${OBJS} test jnl.a test.o
diff --git a/Frameworks/JNetLib/jnetlib/README.txt b/Frameworks/JNetLib/jnetlib/README.txt
new file mode 100755
index 000000000..305c3e88c
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/README.txt
@@ -0,0 +1,76 @@
+JNetLib Readme.txt
+/*
+**
+** Justin Frankel
+** www.cockos.com
+**
+** Joshua Teitelbaum
+** www.cryptomail.org
+*/
+
+Table of Contents:
+
+I) License
+II) Introduction
+III) Features
+IV) SSL Integration
+V) Postamble
+
+I) License
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution
+
+II) Introduction
+
+Welcome to the JNetLib library, a C++ asynchronous network abstraction layer.
+
+III) Features
+
+* Works under Linux, FreeBSD, Win32, and other operating systems.
+* TCP connections support
+* Listening sockets support
+* Asynchronous DNS support
+* HTTP serving and getting support (including basic authentication, GET/POST and HTTP/1.1 support)
+* Basic HTTPS serving, getting support (including basic authentication, and HTTP/1.1 support)
+* Completely asynchronous love for single threaded apps.
+* Coming soon: support for UDP, as well as serial i/o.
+
+IV) SSL Integration
+
+JNetLib now employs the OpenSSL encryption library from www.openssl.org.
+However, it is not compiled in as the default.
+If you would like to have SSL support compiled in you have to:
+1) uncomment the #define _JNETLIB_SSL_ 1 in netinc.h
+2) Obtain the openssl requisite libraries libeay32.lib and ssleay32.lib
+2a) You can obtain these libraries either by building them yourself via aquring the source yourself or...
+2b) Download the SSL quickpack for windows, and ensure that you have the SSL quickpack in your build environment
+You will need the proper include and library paths.
+If you downloaded the quickpack to C:\, then the appropriate build environment include directory would be "c:\openssl\include", and so forth.
+
+Disclaimer:
+SSL functionality is new, and not entirely feature complete.
+The current certification authentication tactic is to allow all certificates through, without checking any CA signatures.
+
+
+V) Postamble
+Questions/Comments
+joshuat@cryptomail.org
+
+
+
+
+
diff --git a/Frameworks/JNetLib/jnetlib/asyncdns.cpp b/Frameworks/JNetLib/jnetlib/asyncdns.cpp
new file mode 100755
index 000000000..f0bcb38be
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/asyncdns.cpp
@@ -0,0 +1,262 @@
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: asyncdns.cpp - JNL portable asynchronous DNS implementation
+** License: see jnetlib.h
+*/
+
+#include "netinc.h"
+#include "util.h"
+#include "asyncdns.h"
+
+JNL_AsyncDNS::JNL_AsyncDNS(int max_cache_entries)
+{
+ m_thread_kill=1;
+ m_thread=0;
+ m_cache_size=max_cache_entries;
+ m_cache=(cache_entry *)::malloc(sizeof(cache_entry)*m_cache_size);
+ memset(m_cache,0,sizeof(cache_entry)*m_cache_size);
+}
+
+JNL_AsyncDNS::~JNL_AsyncDNS()
+{
+#ifndef NO_DNS_SUPPORT
+ m_thread_kill=1;
+
+#ifdef _WIN32
+ if (m_thread)
+ {
+ WaitForSingleObject(m_thread,INFINITE);
+ CloseHandle(m_thread);
+ }
+#else
+ if (m_thread)
+ {
+ void *p;
+ pthread_join(m_thread,&p);
+ }
+#endif//!_WIN32
+#endif//NO_DNS_SUPPORT
+ free(m_cache);
+}
+
+#ifdef _WIN32
+unsigned long WINAPI JNL_AsyncDNS::_threadfunc(LPVOID _d)
+#else
+unsigned int JNL_AsyncDNS::_threadfunc(void *_d)
+#endif
+{
+#ifndef NO_DNS_SUPPORT
+ int nowinsock=JNL::open_socketlib();
+ JNL_AsyncDNS *_this=(JNL_AsyncDNS*)_d;
+ int x;
+ for (x = 0; x < _this->m_cache_size && !_this->m_thread_kill; x ++)
+ {
+ if (_this->m_cache[x].last_used && !_this->m_cache[x].resolved)
+ {
+ if (!nowinsock)
+ {
+ if (_this->m_cache[x].mode==0)
+ {
+ struct hostent *hostentry;
+ hostentry=::gethostbyname(_this->m_cache[x].hostname);
+ if (hostentry)
+ {
+ _this->m_cache[x].addr=*((int*)hostentry->h_addr);
+ }
+ else
+ _this->m_cache[x].addr=INADDR_NONE;
+ }
+ else if (_this->m_cache[x].mode==1)
+ {
+ struct hostent *ent;
+ ent=::gethostbyaddr((const char *)&_this->m_cache[x].addr,4,AF_INET);
+ if (ent)
+ {
+ strncpy(_this->m_cache[x].hostname,ent->h_name,255);
+ _this->m_cache[x].hostname[255]=0;
+ }
+ else
+ {
+ _this->m_cache[x].hostname[0]=0;
+ }
+ }
+ _this->m_cache[x].resolved=1;
+ }
+ else
+ {
+ if (_this->m_cache[x].mode==0)
+ {
+ _this->m_cache[x].addr=INADDR_NONE;
+ _this->m_cache[x].resolved=1;
+ }
+ else if (_this->m_cache[x].mode==1)
+ {
+ _this->m_cache[x].hostname[0]=0;
+ _this->m_cache[x].resolved=1;
+ }
+ }
+ }
+ }
+ if (!nowinsock) JNL::close_socketlib();
+ _this->m_thread_kill=1;
+#endif // NO_DNS_SUPPORT
+
+ return 0;
+}
+
+int JNL_AsyncDNS::resolve(char *hostname, unsigned long *addr)
+{
+ // return 0 on success, 1 on wait, -1 on unresolvable
+ int x;
+ unsigned long ip=inet_addr(hostname);
+ if (ip != INADDR_NONE)
+ {
+ *addr=ip;
+ return 0;
+ }
+#ifndef NO_DNS_SUPPORT
+
+ for (x = 0; x < m_cache_size; x ++)
+ {
+ if (!strcasecmp(m_cache[x].hostname,hostname) && m_cache[x].mode==0)
+ {
+ m_cache[x].last_used=time(NULL);
+ if (m_cache[x].resolved)
+ {
+ if (m_cache[x].addr == INADDR_NONE)
+ {
+ return -1;
+ }
+ struct in_addr in;
+ in.s_addr=m_cache[x].addr;
+ *addr=m_cache[x].addr;
+ return 0;
+ }
+ makesurethreadisrunning();
+ return 1;
+ }
+ }
+ // add to resolve list
+ int oi=-1;
+ for (x = 0; x < m_cache_size; x ++)
+ {
+ if (!m_cache[x].last_used)
+ {
+ oi=x;
+ break;
+ }
+ if ((oi==-1 || m_cache[x].last_used < m_cache[oi].last_used) && m_cache[x].resolved)
+ {
+ oi=x;
+ }
+ }
+ if (oi == -1)
+ {
+ return -1;
+ }
+ strcpy(m_cache[oi].hostname,hostname);
+ m_cache[oi].mode=0;
+ m_cache[oi].addr=INADDR_NONE;
+ m_cache[oi].resolved=0;
+ m_cache[oi].last_used=time(NULL);
+
+ makesurethreadisrunning();
+ return 1;
+#else
+ return -1;
+#endif
+}
+
+int JNL_AsyncDNS::reverse(unsigned long addr, char *hostname)
+{
+ // return 0 on success, 1 on wait, -1 on unresolvable
+ int x;
+ if (addr == INADDR_NONE)
+ {
+ return -1;
+ }
+#ifndef NO_DNS_SUPPORT
+ for (x = 0; x < m_cache_size; x ++)
+ {
+ if (m_cache[x].addr==addr && m_cache[x].mode==1)
+ {
+ m_cache[x].last_used=time(NULL);
+ if (m_cache[x].resolved)
+ {
+ if (!m_cache[x].hostname[0])
+ {
+ return -1;
+ }
+ strncpy(hostname,m_cache[x].hostname,255);
+ hostname[255]=0;
+ return 0;
+ }
+ makesurethreadisrunning();
+ return 1;
+ }
+ }
+ // add to resolve list
+ int oi=-1;
+ for (x = 0; x < m_cache_size; x ++)
+ {
+ if (!m_cache[x].last_used)
+ {
+ oi=x;
+ break;
+ }
+ if ((oi==-1 || m_cache[x].last_used < m_cache[oi].last_used) && m_cache[x].resolved)
+ {
+ oi=x;
+ }
+ }
+ if (oi == -1)
+ {
+ return -1;
+ }
+ m_cache[oi].addr=addr;
+ m_cache[oi].hostname[0]=0;
+ m_cache[oi].resolved=0;
+ m_cache[oi].mode=1;
+ m_cache[oi].last_used=time(NULL);
+
+ makesurethreadisrunning();
+ return 1;
+#else
+ return -1;
+#endif
+}
+
+
+void JNL_AsyncDNS::makesurethreadisrunning(void)
+{
+#ifndef NO_DNS_SUPPORT
+ if (m_thread_kill)
+ {
+ #ifdef _WIN32
+ if (m_thread)
+ {
+ WaitForSingleObject(m_thread,INFINITE);
+ CloseHandle(m_thread);
+ }
+ DWORD id;
+ m_thread_kill=0;
+ m_thread=CreateThread(NULL,0,_threadfunc,(LPVOID)this,0,&id);
+ if (!m_thread)
+ {
+ #else
+ if (m_thread)
+ {
+ void *p;
+ pthread_join(m_thread,&p);
+ }
+ m_thread_kill=0;
+ if (pthread_create(&m_thread,NULL,(void *(*) (void *))_threadfunc,(void*)this) != 0)
+ {
+ #endif
+ m_thread_kill=1;
+ }
+ }
+#endif//NO_DNS_SUPPORT
+}
diff --git a/Frameworks/JNetLib/jnetlib/asyncdns.h b/Frameworks/JNetLib/jnetlib/asyncdns.h
new file mode 100755
index 000000000..527088896
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/asyncdns.h
@@ -0,0 +1,55 @@
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: asyncdns.h - JNL portable asynchronous DNS interface
+** License: see jnetlib.h
+**
+** Usage:
+** 1. Create JNL_AsyncDNS object, optionally with the number of cache entries.
+** 2. call resolve() to resolve a hostname into an address. The return value of
+** resolve is 0 on success (host successfully resolved), 1 on wait (meaning
+** try calling resolve() with the same hostname in a few hundred milliseconds
+** or so), or -1 on error (i.e. the host can't resolve).
+** 3. call reverse() to do reverse dns (ala resolve()).
+** 4. enjoy.
+*/
+
+#ifndef _ASYNCDNS_H_
+#define _ASYNCDNS_H_
+
+class JNL_AsyncDNS
+{
+public:
+ JNL_AsyncDNS(int max_cache_entries=64);
+ ~JNL_AsyncDNS();
+
+ int resolve(char *hostname, unsigned long *addr); // return 0 on success, 1 on wait, -1 on unresolvable
+ int reverse(unsigned long addr, char *hostname); // return 0 on success, 1 on wait, -1 on unresolvable. hostname must be at least 256 bytes.
+
+private:
+ typedef struct
+ {
+ int last_used; // timestamp.
+ char resolved;
+ char mode; // 1=reverse
+ char hostname[256];
+ unsigned long addr;
+ }
+ cache_entry;
+
+ cache_entry *m_cache;
+ int m_cache_size;
+ volatile int m_thread_kill;
+#ifdef _WIN32
+ HANDLE m_thread;
+ static unsigned long WINAPI _threadfunc(LPVOID _d);
+#else
+ pthread_t m_thread;
+ static unsigned int _threadfunc(void *_d);
+#endif
+ void makesurethreadisrunning(void);
+
+};
+
+#endif //_ASYNCDNS_H_
diff --git a/Frameworks/JNetLib/jnetlib/connection.cpp b/Frameworks/JNetLib/jnetlib/connection.cpp
new file mode 100755
index 000000000..25d7e58bc
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/connection.cpp
@@ -0,0 +1,520 @@
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: connection.cpp - JNL TCP connection implementation
+** License: see jnetlib.h
+*/
+
+#include "netinc.h"
+#include "util.h"
+#include "connection.h"
+
+
+JNL_Connection::JNL_Connection(JNL_AsyncDNS *dns, int sendbufsize, int recvbufsize)
+{
+ m_errorstr="";
+ if (dns == JNL_CONNECTION_AUTODNS)
+ {
+ m_dns=new JNL_AsyncDNS();
+ m_dns_owned=1;
+ }
+ else
+ {
+ m_dns=dns;
+ m_dns_owned=0;
+ }
+ m_recv_buffer_len=recvbufsize;
+ m_send_buffer_len=sendbufsize;
+ m_recv_buffer=(char*)malloc(m_recv_buffer_len);
+ m_send_buffer=(char*)malloc(m_send_buffer_len);
+ m_socket=-1;
+ memset(m_recv_buffer,0,recvbufsize);
+ memset(m_send_buffer,0,sendbufsize);
+ m_remote_port=0;
+ m_state=STATE_NOCONNECTION;
+ m_recv_len=m_recv_pos=0;
+ m_send_len=m_send_pos=0;
+ m_host[0]=0;
+ m_saddr = new struct sockaddr_in;
+ memset(m_saddr,0,sizeof(m_saddr));
+}
+
+void JNL_Connection::connect(int s, struct sockaddr_in *loc)
+{
+ close(1);
+ m_socket=s;
+ m_remote_port=0;
+ m_dns=NULL;
+ if (loc) *m_saddr=*loc;
+ else memset(m_saddr,0,sizeof(m_saddr));
+ if (m_socket != -1)
+ {
+ SET_SOCK_BLOCK(m_socket,0);
+ m_state=STATE_CONNECTED;
+ }
+ else
+ {
+ m_errorstr="invalid socket passed to connect";
+ m_state=STATE_ERROR;
+ }
+}
+
+void JNL_Connection::connect(char *hostname, int port)
+{
+ close(1);
+ m_remote_port=(short)port;
+ m_socket=::socket(AF_INET,SOCK_STREAM,0);
+ if (m_socket==-1)
+ {
+ m_errorstr="creating socket";
+ m_state=STATE_ERROR;
+ }
+ else
+ {
+ SET_SOCK_BLOCK(m_socket,0);
+ strncpy(m_host,hostname,sizeof(m_host)-1);
+ m_host[sizeof(m_host)-1]=0;
+ memset(m_saddr,0,sizeof(m_saddr));
+ if (!m_host[0])
+ {
+ m_errorstr="empty hostname";
+ m_state=STATE_ERROR;
+ }
+ else
+ {
+ m_state=STATE_RESOLVING;
+ m_saddr->sin_family=AF_INET;
+ m_saddr->sin_port=htons((unsigned short)port);
+ m_saddr->sin_addr.s_addr=inet_addr(hostname);
+ }
+ }
+}
+
+/*
+** Joshua Teitelbaum 1/27/2006
+** socket_shutdown
+** virtualization for ssl
+*/
+/* Virtual */
+void JNL_Connection::socket_shutdown()
+{
+ if (m_socket >= 0)
+ {
+ ::shutdown(m_socket, SHUT_RDWR);
+ ::closesocket(m_socket);
+ m_socket=-1;
+ }
+}
+/*
+** Joshua Teitelbaum 1/27/2006
+** socket_recv
+** virtualization for ssl
+*/
+/* Virtual */
+int JNL_Connection::socket_recv(char *buf, int len, int options)
+{
+ return ::recv(m_socket,buf,len,options);
+}
+/*
+** Joshua Teitelbaum 1/27/2006
+** socket_send
+** virtualization for ssl
+*/
+/* Virtual */
+int JNL_Connection::socket_send(char *buf, int len, int options)
+{
+ return ::send(m_socket,buf,len,options);
+}
+
+int JNL_Connection::socket_connect()
+{
+ return ::connect(m_socket,(struct sockaddr *)m_saddr,16);
+}
+JNL_Connection::~JNL_Connection()
+{
+ /*
+ ** Joshua Teitelbaum 1/27/2006
+ ** virtualization for ssl, calling socket_shtudown()
+ */
+ socket_shutdown();
+
+ free(m_recv_buffer);
+ free(m_send_buffer);
+ if (m_dns_owned)
+ {
+ delete m_dns;
+ }
+ delete m_saddr;
+}
+
+void JNL_Connection::run(int max_send_bytes, int max_recv_bytes, int *bytes_sent, int *bytes_rcvd)
+{
+ int bytes_allowed_to_send=(max_send_bytes<0)?m_send_buffer_len:max_send_bytes;
+ int bytes_allowed_to_recv=(max_recv_bytes<0)?m_recv_buffer_len:max_recv_bytes;
+
+ if (bytes_sent) *bytes_sent=0;
+ if (bytes_rcvd) *bytes_rcvd=0;
+
+ switch (m_state)
+ {
+ case STATE_RESOLVING:
+ if (m_saddr->sin_addr.s_addr == INADDR_NONE)
+ {
+ int a=m_dns?m_dns->resolve(m_host,(unsigned long int *)&m_saddr->sin_addr.s_addr):-1;
+ if (!a) { m_state=STATE_CONNECTING; }
+ else if (a == 1)
+ {
+ m_state=STATE_RESOLVING;
+ break;
+ }
+ else
+ {
+ m_errorstr="resolving hostname";
+ m_state=STATE_ERROR;
+ return;
+ }
+ }
+ /*
+ ** Joshua Teitelbaum 1/27/2006
+ ** virtualization for ssl
+ */
+ if(!socket_connect())
+ {
+ m_state=STATE_CONNECTED;
+ on_socket_connected();
+ }
+ else if (ERRNO!=EINPROGRESS)
+ {
+ m_errorstr="connecting to host";
+ m_state=STATE_ERROR;
+ }
+ else { m_state=STATE_CONNECTING; }
+ break;
+ case STATE_CONNECTING:
+ {
+ fd_set f[3];
+ FD_ZERO(&f[0]);
+ FD_ZERO(&f[1]);
+ FD_ZERO(&f[2]);
+ FD_SET(m_socket,&f[0]);
+ FD_SET(m_socket,&f[1]);
+ FD_SET(m_socket,&f[2]);
+ struct timeval tv;
+ memset(&tv,0,sizeof(tv));
+ if (select(m_socket+1,&f[0],&f[1],&f[2],&tv)==-1)
+ {
+ m_errorstr="connecting to host (calling select())";
+ m_state=STATE_ERROR;
+ }
+ else if (FD_ISSET(m_socket,&f[1]))
+ {
+ m_state=STATE_CONNECTED;
+ on_socket_connected();
+ }
+ else if (FD_ISSET(m_socket,&f[2]))
+ {
+ m_errorstr="connecting to host";
+ m_state=STATE_ERROR;
+ }
+ }
+ break;
+ case STATE_CONNECTED:
+ case STATE_CLOSING:
+ if (m_send_len>0 && bytes_allowed_to_send>0)
+ {
+ int len=m_send_buffer_len-m_send_pos;
+ if (len > m_send_len) len=m_send_len;
+ if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
+ if (len > 0)
+ {
+ int res=socket_send(m_send_buffer+m_send_pos,len,0);
+ if (res==-1 && ERRNO != EWOULDBLOCK)
+ {
+// m_state=STATE_CLOSED;
+// return;
+ }
+ if (res>0)
+ {
+ bytes_allowed_to_send-=res;
+ if (bytes_sent) *bytes_sent+=res;
+ m_send_pos+=res;
+ m_send_len-=res;
+ }
+ }
+ if (m_send_pos>=m_send_buffer_len)
+ {
+ m_send_pos=0;
+ if (m_send_len>0)
+ {
+ len=m_send_buffer_len-m_send_pos;
+ if (len > m_send_len) len=m_send_len;
+ if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
+ int res=socket_send(m_send_buffer+m_send_pos,len,0);
+ if (res==-1 && ERRNO != EWOULDBLOCK)
+ {
+// m_state=STATE_CLOSED;
+ }
+ if (res>0)
+ {
+ bytes_allowed_to_send-=res;
+ if (bytes_sent) *bytes_sent+=res;
+ m_send_pos+=res;
+ m_send_len-=res;
+ }
+ }
+ }
+ }
+ if (m_recv_len m_recv_buffer_len-m_recv_len) len=m_recv_buffer_len-m_recv_len;
+ if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
+ if (len>0)
+ {
+ /*
+ ** Joshua Teitelbaum 1/27/2006
+ ** virtualization for SSL
+ */
+ int res = socket_recv(m_recv_buffer+m_recv_pos,len,0);
+
+ if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
+ {
+ m_state=STATE_CLOSED;
+ break;
+ }
+ if (res > 0)
+ {
+ bytes_allowed_to_recv-=res;
+ if (bytes_rcvd) *bytes_rcvd+=res;
+ m_recv_pos+=res;
+ m_recv_len+=res;
+ }
+ }
+ if (m_recv_pos >= m_recv_buffer_len)
+ {
+ m_recv_pos=0;
+ if (m_recv_len < m_recv_buffer_len)
+ {
+ len=m_recv_buffer_len-m_recv_len;
+ if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
+ if (len > 0)
+ {
+ int res=socket_recv(m_recv_buffer+m_recv_pos,len,0);
+ if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
+ {
+ m_state=STATE_CLOSED;
+ break;
+ }
+ if (res > 0)
+ {
+ bytes_allowed_to_recv-=res;
+ if (bytes_rcvd) *bytes_rcvd+=res;
+ m_recv_pos+=res;
+ m_recv_len+=res;
+ }
+ }
+ }
+ }
+ }
+ if (m_state == STATE_CLOSING)
+ {
+ if (m_send_len < 1) m_state = STATE_CLOSED;
+ }
+ break;
+ default: break;
+ }
+}
+
+void JNL_Connection::on_socket_connected(void)
+{
+ return;
+}
+void JNL_Connection::close(int quick)
+{
+ if (quick || m_state == STATE_RESOLVING || m_state == STATE_CONNECTING)
+ {
+ m_state=STATE_CLOSED;
+ /*
+ ** Joshua Teitelbaum 1/27/2006
+ ** virualization for ssl
+ */
+ socket_shutdown();
+
+ m_socket=-1;
+ memset(m_recv_buffer,0,m_recv_buffer_len);
+ memset(m_send_buffer,0,m_send_buffer_len);
+ m_remote_port=0;
+ m_recv_len=m_recv_pos=0;
+ m_send_len=m_send_pos=0;
+ m_host[0]=0;
+ memset(m_saddr,0,sizeof(m_saddr));
+ }
+ else
+ {
+ if (m_state == STATE_CONNECTED) m_state=STATE_CLOSING;
+ }
+}
+
+int JNL_Connection::send_bytes_in_queue(void)
+{
+ return m_send_len;
+}
+
+int JNL_Connection::send_bytes_available(void)
+{
+ return m_send_buffer_len-m_send_len;
+}
+
+int JNL_Connection::send(const void *_data, int length)
+{
+ const char *data = static_cast(_data);
+ if (length > send_bytes_available())
+ {
+ return -1;
+ }
+
+ int write_pos=m_send_pos+m_send_len;
+ if (write_pos >= m_send_buffer_len)
+ {
+ write_pos-=m_send_buffer_len;
+ }
+
+ int len=m_send_buffer_len-write_pos;
+ if (len > length)
+ {
+ len=length;
+ }
+
+ memcpy(m_send_buffer+write_pos,data,len);
+ if (length > len)
+ {
+ memcpy(m_send_buffer,data+len,length-len);
+ }
+ m_send_len+=length;
+ return 0;
+}
+
+int JNL_Connection::send_string(const char *line)
+{
+ return send(line,strlen(line));
+}
+
+int JNL_Connection::recv_bytes_available(void)
+{
+ return m_recv_len;
+}
+
+int JNL_Connection::peek_bytes(void *_data, int maxlength)
+{
+ char *data = static_cast(_data);
+ if (maxlength > m_recv_len)
+ {
+ maxlength=m_recv_len;
+ }
+ int read_pos=m_recv_pos-m_recv_len;
+ if (read_pos < 0)
+ {
+ read_pos += m_recv_buffer_len;
+ }
+ int len=m_recv_buffer_len-read_pos;
+ if (len > maxlength)
+ {
+ len=maxlength;
+ }
+ if (data != NULL) {
+ memcpy(data,m_recv_buffer+read_pos,len);
+ if (len < maxlength)
+ {
+ memcpy(data+len,m_recv_buffer,maxlength-len);
+ }
+ }
+
+ return maxlength;
+}
+
+int JNL_Connection::recv_bytes(void *_data, int maxlength)
+{
+ char *data = static_cast(_data);
+
+ int ml=peek_bytes(data,maxlength);
+ m_recv_len-=ml;
+ return ml;
+}
+
+int JNL_Connection::getbfromrecv(int pos, int remove)
+{
+ int read_pos=m_recv_pos-m_recv_len + pos;
+ if (pos < 0 || pos > m_recv_len) return -1;
+ if (read_pos < 0)
+ {
+ read_pos += m_recv_buffer_len;
+ }
+ if (read_pos >= m_recv_buffer_len)
+ {
+ read_pos-=m_recv_buffer_len;
+ }
+ if (remove) m_recv_len--;
+ return m_recv_buffer[read_pos];
+}
+
+int JNL_Connection::recv_lines_available(void)
+{
+ int l=recv_bytes_available();
+ int lcount=0;
+ int lastch=0;
+ int pos;
+ for (pos=0; pos < l; pos ++)
+ {
+ int t=getbfromrecv(pos,0);
+ if (t == -1) return lcount;
+ if ((t=='\r' || t=='\n') &&(
+ (lastch != '\r' && lastch != '\n') || lastch==t
+ )) lcount++;
+ lastch=t;
+ }
+ return lcount;
+}
+
+int JNL_Connection::recv_line(char *line, int maxlength)
+{
+ if (maxlength > m_recv_len) maxlength=m_recv_len;
+ while (maxlength--)
+ {
+ int t=getbfromrecv(0,1);
+ if (t == -1)
+ {
+ *line=0;
+ return 0;
+ }
+ if (t == '\r' || t == '\n')
+ {
+ int r=getbfromrecv(0,0);
+ if ((r == '\r' || r == '\n') && r != t) getbfromrecv(0,1);
+ *line=0;
+ return 0;
+ }
+ *line++=(char)t;
+ }
+ return 1;
+}
+
+unsigned long JNL_Connection::get_interface(void)
+{
+ if (m_socket==-1) return 0;
+ struct sockaddr_in sin;
+ memset(&sin,0,sizeof(sin));
+ socklen_t len=16;
+ if (::getsockname(m_socket,(struct sockaddr *)&sin,&len)) return 0;
+ return (unsigned long) sin.sin_addr.s_addr;
+}
+
+unsigned long JNL_Connection::get_remote()
+{
+ return m_saddr->sin_addr.s_addr;
+}
+
+short JNL_Connection::get_remote_port()
+{
+ return m_remote_port;
+}
diff --git a/Frameworks/JNetLib/jnetlib/connection.h b/Frameworks/JNetLib/jnetlib/connection.h
new file mode 100755
index 000000000..1443364a5
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/connection.h
@@ -0,0 +1,153 @@
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: connection.h - JNL TCP connection interface
+** License: see jnetlib.h
+**
+** Usage:
+** 1. Create a JNL_Connection object, optionally specifying a JNL_AsyncDNS
+** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
+** and the send and receive buffer sizes.
+** 2. Call connect() to have it connect to a host/port (the hostname will be
+** resolved if possible).
+** 3. call run() with the maximum send/recv amounts, and optionally parameters
+** so you can tell how much has been send/received. You want to do this a lot, while:
+** 4. check get_state() to check the state of the connection. The states are:
+** JNL_Connection::STATE_ERROR
+** - an error has occured on the connection. the connection has closed,
+** and you can no longer write to the socket (there still might be
+** data in the receive buffer - use recv_bytes_available()).
+** JNL_Connection::STATE_NOCONNECTION
+** - no connection has been made yet. call connect() already! :)
+** JNL_Connection::STATE_RESOLVING
+** - the connection is still waiting for a JNL_AsycnDNS to resolve the
+** host.
+** JNL_Connection::STATE_CONNECTING
+** - the asynchronous call to connect() is still running.
+** JNL_Connection::STATE_CONNECTED
+** - the connection has connected, all is well.
+** JNL_Connection::STATE_CLOSING
+** - the connection is closing. This happens after a call to close,
+** without the quick parameter set. This means that the connection
+** will close once the data in the send buffer is sent (data could
+** still be being received when it would be closed). After it is
+** closed, the state will transition to:
+** JNL_Connection::STATE_CLOSED
+** - the connection has closed, generally without error. There still
+** might be data in the receieve buffer, use recv_bytes_available().
+** 5. Use send() and send_string() to send data. You can use
+** send_bytes_in_queue() to see how much has yet to go out, or
+** send_bytes_available() to see how much you can write. If you use send()
+** or send_string() and not enough room is available, both functions will
+** return error ( < 0)
+** 6. Use recv() and recv_line() to get data. If you want to see how much data
+** there is, use recv_bytes_available() and recv_lines_available(). If you
+** call recv() and not enough data is available, recv() will return how much
+** data was actually read. See comments at the function defs.
+**
+** 7. To close, call close(1) for a quick close, or close() for a close that will
+** make the socket close after sending all the data sent.
+**
+** 8. delete ye' ol' object.
+*/
+
+#ifndef _CONNECTION_H_
+#define _CONNECTION_H_
+
+#include "asyncdns.h"
+
+#define JNL_CONNECTION_AUTODNS ((JNL_AsyncDNS*)-1)
+
+struct sockaddr_in;
+
+class JNL_Connection
+{
+ public:
+ typedef enum
+ {
+ STATE_ERROR,
+ STATE_NOCONNECTION,
+ STATE_RESOLVING,
+ STATE_CONNECTING,
+ STATE_CONNECTED,
+ STATE_CLOSING,
+ STATE_CLOSED
+ } state;
+
+ /*
+ ** Joshua Teitelbaum, 1/27/2006 adding virtual
+ */
+ JNL_Connection(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int sendbufsize=8192, int recvbufsize=8192);
+ virtual ~JNL_Connection();
+
+public:
+ void connect(char *hostname, int port);
+ virtual void connect(int sock, struct sockaddr_in *loc=NULL); // used by the listen object, usually not needed by users.
+
+ /*
+ ** Joshua Teitelbaum 2/2/2006
+ ** Need to make this virtual to ensure SSL can init properly
+ */
+ virtual void run(int max_send_bytes=-1, int max_recv_bytes=-1, int *bytes_sent=NULL, int *bytes_rcvd=NULL);
+ int get_state() { return m_state; }
+ char *get_errstr() { return m_errorstr; }
+
+ void close(int quick=0);
+ void flush_send(void) { m_send_len=m_send_pos=0; }
+
+ int send_bytes_in_queue(void);
+ int send_bytes_available(void);
+ int send(const void *data, int length); // returns -1 if not enough room
+ inline int send_bytes(const void *data, int length) { return send(data, length); }
+ int send_string(const char *line); // returns -1 if not enough room
+
+
+ int recv_bytes_available(void);
+ int recv_bytes(void *data, int maxlength); // returns actual bytes read
+ unsigned int recv_int(void);
+ int recv_lines_available(void);
+ int recv_line(char *line, int maxlength); // returns 0 if the line was terminated with a \r or \n, 1 if not.
+ // (i.e. if you specify maxlength=10, and the line is 12 bytes long
+ // it will return 1. or if there is no \r or \n and that's all the data
+ // the connection has.)
+ int peek_bytes(void *data, int maxlength); // returns bytes peeked
+
+ unsigned long get_interface(void); // this returns the interface the connection is on
+ unsigned long get_remote(void); // remote host ip.
+ short get_remote_port(void); // this returns the remote port of connection
+
+ protected:
+ int m_socket;
+ short m_remote_port;
+ char *m_recv_buffer;
+ char *m_send_buffer;
+ int m_recv_buffer_len;
+ int m_send_buffer_len;
+
+ int m_recv_pos;
+ int m_recv_len;
+ int m_send_pos;
+ int m_send_len;
+
+ struct sockaddr_in *m_saddr;
+ char m_host[256];
+
+ JNL_AsyncDNS *m_dns;
+ int m_dns_owned;
+
+ state m_state;
+ char *m_errorstr;
+
+ int getbfromrecv(int pos, int remove); // used by recv_line*
+ /*
+ ** Joshua Teitelbaum 1/27/2006 Adding new BSD socket analogues for SSL compatibility
+ */
+ virtual void socket_shutdown();
+ virtual int socket_recv(char *buf, int len, int options);
+ virtual int socket_send(char *buf, int len, int options);
+ virtual int socket_connect();
+ virtual void on_socket_connected();
+};
+
+#endif // _Connection_H_
diff --git a/Frameworks/JNetLib/jnetlib/httpget.cpp b/Frameworks/JNetLib/jnetlib/httpget.cpp
new file mode 100755
index 000000000..6b4a68eec
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/httpget.cpp
@@ -0,0 +1,490 @@
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: httpget.cpp - JNL HTTP GET implementation
+** License: see jnetlib.h
+*/
+
+/*
+** Undefine this if you don't want SSL compiled in
+*/
+
+#include "netinc.h"
+#include "util.h"
+#include "httpget.h"
+#include "sslconnection.h"
+
+
+JNL_HTTPGet::JNL_HTTPGet(JNL_AsyncDNS *dns, int recvbufsize, char *proxy)
+{
+ m_recvbufsize=recvbufsize;
+ m_dns=dns;
+ m_con=NULL;
+ m_http_proxylpinfo=0;
+ m_http_proxyhost=0;
+ m_http_proxyport=0;
+ if (proxy && *proxy)
+ {
+ char *p=(char*)malloc(strlen(proxy)+1);
+ if (p)
+ {
+ char *r=NULL;
+ strcpy(p,proxy);
+ do_parse_url(p,&m_http_proxyhost,&m_http_proxyport,&r,&m_http_proxylpinfo);
+ free(r);
+ free(p);
+ }
+ }
+ m_sendheaders=NULL;
+ m_http_redir_url=0;
+ reinit();
+}
+
+void JNL_HTTPGet::reinit()
+{
+ m_errstr=0;
+ m_recvheaders=NULL;
+ m_recvheaders_size=0;
+ m_http_state=0;
+ m_http_port=0;
+ m_http_url=0;
+ m_reply=0;
+ m_http_host=m_http_lpinfo=m_http_request=NULL;
+}
+
+void JNL_HTTPGet::deinit()
+{
+ delete m_con; m_con = NULL;
+ free(m_recvheaders);
+
+ free(m_http_url);
+ free(m_http_host);
+ free(m_http_lpinfo);
+ free(m_http_request);
+ free(m_errstr);
+ free(m_reply);
+ reinit();
+}
+
+JNL_HTTPGet::~JNL_HTTPGet()
+{
+ deinit();
+ free(m_sendheaders);
+ free(m_http_proxylpinfo);
+ free(m_http_proxyhost);
+ free(m_http_redir_url);
+
+}
+
+
+void JNL_HTTPGet::addheader(const char *header)
+{
+ if (strstr(header,"\r") || strstr(header,"\n")) return;
+ if (!m_sendheaders)
+ {
+ m_sendheaders=(char*)malloc(strlen(header)+3);
+ if (m_sendheaders)
+ {
+ strcpy(m_sendheaders,header);
+ strcat(m_sendheaders,"\r\n");
+ }
+ }
+ else
+ {
+ char *t=(char*)malloc(strlen(header)+strlen(m_sendheaders)+1+2);
+ if (t)
+ {
+ strcpy(t,m_sendheaders);
+ strcat(t,header);
+ strcat(t,"\r\n");
+ free(m_sendheaders);
+ m_sendheaders=t;
+ }
+ }
+}
+
+void JNL_HTTPGet::do_encode_mimestr(char *in, char *out)
+{
+ char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ int shift = 0;
+ int accum = 0;
+
+ while (*in)
+ {
+ if (*in)
+ {
+ accum <<= 8;
+ shift += 8;
+ accum |= *in++;
+ }
+ while ( shift >= 6 )
+ {
+ shift -= 6;
+ *out++ = alphabet[(accum >> shift) & 0x3F];
+ }
+ }
+ if (shift == 4)
+ {
+ *out++ = alphabet[(accum & 0xF)<<2];
+ *out++='=';
+ }
+ else if (shift == 2)
+ {
+ *out++ = alphabet[(accum & 0x3)<<4];
+ *out++='=';
+ *out++='=';
+ }
+
+ *out++=0;
+}
+
+
+void JNL_HTTPGet::connect(const char *url, int ver, char *requestmethod)
+{
+ deinit();
+ m_http_url=(char*)malloc(strlen(url)+1);
+ strcpy(m_http_url,url);
+ do_parse_url(m_http_url,&m_http_host,&m_http_port,&m_http_request, &m_http_lpinfo);
+ strcpy(m_http_url,url);
+ if (!m_http_host || !m_http_host[0] || !m_http_port)
+ {
+ m_http_state=-1;
+ seterrstr("invalid URL");
+ return;
+ }
+
+ int sendbufferlen=0;
+
+ if (!m_http_proxyhost || !m_http_proxyhost[0])
+ {
+ sendbufferlen += strlen(requestmethod)+1 /* GET */ + strlen(m_http_request) + 9 /* HTTP/1.0 */ + 2;
+ }
+ else
+ {
+ sendbufferlen += strlen(requestmethod)+1 /* GET */ + strlen(m_http_url) + 9 /* HTTP/1.0 */ + 2;
+ if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
+ {
+ sendbufferlen+=58+strlen(m_http_proxylpinfo)*2; // being safe here
+ }
+ }
+ sendbufferlen += 5 /* Host: */ + strlen(m_http_host) + 2;
+
+ if (m_http_lpinfo&&m_http_lpinfo[0])
+ {
+ sendbufferlen+=46+strlen(m_http_lpinfo)*2; // being safe here
+ }
+
+ if (m_sendheaders) sendbufferlen+=strlen(m_sendheaders);
+
+ char *str=(char*)malloc(sendbufferlen+1024);
+ if (!str)
+ {
+ seterrstr("error allocating memory");
+ m_http_state=-1;
+ }
+
+ if (!m_http_proxyhost || !m_http_proxyhost[0])
+ {
+ wsprintf(str,"%s %s HTTP/1.%d\r\n",requestmethod,m_http_request,ver%10);
+ }
+ else
+ {
+ wsprintf(str,"%s %s HTTP/1.%d\r\n",requestmethod, m_http_url,ver%10);
+ }
+
+ wsprintf(str+strlen(str),"Host:%s\r\n",m_http_host);
+
+ if (m_http_lpinfo&&m_http_lpinfo[0])
+ {
+ strcat(str,"Authorization: Basic ");
+ do_encode_mimestr(m_http_lpinfo,str+strlen(str));
+ strcat(str,"\r\n");
+ }
+ if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
+ {
+ strcat(str,"Proxy-Authorization: Basic ");
+ do_encode_mimestr(m_http_proxylpinfo,str+strlen(str));
+ strcat(str,"\r\n");
+ }
+
+ if (m_sendheaders) strcat(str,m_sendheaders);
+ strcat(str,"\r\n");
+
+ int a=m_recvbufsize;
+ if (a < 4096) a=4096;
+ //m_con=new JNL_Connection(m_dns,strlen(str)+4,a);
+ /*
+ ** Joshua Teitelbaum delta 1/15/2006
+ */
+#ifdef _JNETLIB_SSL_
+ /*
+ ** Joshua Teitelbaum 1/27/2006
+ ** Check for secure
+ */
+ if(!strnicmp(m_http_url,"https:",strlen("https:")))
+ {
+ m_con=new JNL_SSL_Connection(NULL,m_dns,8192,a);
+ }
+ else
+ {
+ m_con=new JNL_Connection(m_dns,8192,a);
+ }
+#else
+ m_con=new JNL_Connection(m_dns,8192,a);
+#endif
+
+ if (m_con)
+ {
+ if (!m_http_proxyhost || !m_http_proxyhost[0])
+ {
+ m_con->connect(m_http_host,m_http_port);
+ }
+ else
+ {
+ m_con->connect(m_http_proxyhost,m_http_proxyport);
+ }
+ m_con->send_string(str);
+ }
+ else
+ {
+ m_http_state=-1;
+ seterrstr("could not create connection object");
+ }
+ free(str);
+
+}
+
+void JNL_HTTPGet::do_parse_url(char *url, char **host, int *port, char **req, char **lp)
+{
+ char *p,*np;
+ free(*host); *host=0;
+ free(*req); *req=0;
+ free(*lp); *lp=0;
+
+ if (strstr(url,"://")) np=p=strstr(url,"://")+3;
+ else np=p=url;
+ while (*np != '/' && *np) np++;
+ if (*np)
+ {
+ *req=(char*)malloc(strlen(np)+1);
+ if (*req) strcpy(*req,np);
+ *np++=0;
+ }
+ else
+ {
+ *req=(char*)malloc(2);
+ if (*req) strcpy(*req,"/");
+ }
+
+ np=p;
+ while (*np != '@' && *np) np++;
+ if (*np)
+ {
+ *np++=0;
+ *lp=(char*)malloc(strlen(p)+1);
+ if (*lp) strcpy(*lp,p);
+ p=np;
+ }
+ else
+ {
+ *lp=(char*)malloc(1);
+ if (*lp) strcpy(*lp,"");
+ }
+ np=p;
+ while (*np != ':' && *np) np++;
+ if (*np)
+ {
+ *np++=0;
+ *port=atoi(np);
+ }
+ else
+ {
+ /*
+ ** Joshua Teitelbaum 1/27/2006
+ ** HTTPS enhancements
+ */
+ if(!strnicmp(url,"https:",strlen("https:")))
+ {
+ *port = 443;
+ }
+ else
+ *port=80;
+ }
+ *host=(char*)malloc(strlen(p)+1);
+ if (*host) strcpy(*host,p);
+
+
+}
+
+
+char *JNL_HTTPGet::getallheaders()
+{ // double null terminated, null delimited list
+ if (m_recvheaders) return m_recvheaders;
+ else return "\0\0";
+}
+
+char *JNL_HTTPGet::getheader(char *headername)
+{
+ char *ret=NULL;
+ if (strlen(headername)<1||!m_recvheaders) return NULL;
+ char *buf=(char*)malloc(strlen(headername)+2);
+ strcpy(buf,headername);
+ if (buf[strlen(buf)-1]!=':') strcat(buf,":");
+ char *p=m_recvheaders;
+ while (*p)
+ {
+ if (!strnicmp(buf,p,strlen(buf)))
+ {
+ ret=p+strlen(buf);
+ while (*ret == ' ') ret++;
+ break;
+ }
+ p+=strlen(p)+1;
+ }
+ free(buf);
+ return ret;
+}
+
+int JNL_HTTPGet::run()
+{
+ int cnt=0;
+ if (m_http_state==-1||!m_con) return -1; // error
+
+
+run_again:
+ m_con->run();
+
+ if (m_con->get_state()==JNL_Connection::STATE_ERROR)
+ {
+ seterrstr(m_con->get_errstr());
+ return -1;
+ }
+ if (m_con->get_state()==JNL_Connection::STATE_CLOSED) return 1;
+
+ if (m_http_state==0) // connected, waiting for reply
+ {
+ if (m_con->recv_lines_available()>0)
+ {
+ char buf[4096];
+ m_con->recv_line(buf,4095);
+ buf[4095]=0;
+ m_reply=(char*)malloc(strlen(buf)+1);
+ strcpy(m_reply,buf);
+
+ int code=getreplycode();
+ if (code == 200 || code==206) m_http_state=2; // proceed to read headers normally
+ else if (code == 301 || code==302)
+ {
+ m_http_state=1; // redirect city
+ }
+ else
+ {
+ seterrstr(buf);
+ m_http_state=-1;
+ return -1;
+ }
+ cnt=0;
+ }
+ else if (!cnt++) goto run_again;
+ }
+ if (m_http_state == 1) // redirect
+ {
+ while (m_con->recv_lines_available() > 0)
+ {
+ char buf[4096];
+ m_con->recv_line(buf,4096);
+ if (!buf[0])
+ {
+ m_http_state=-1;
+ return -1;
+ }
+ if (!strnicmp(buf,"Location:",9))
+ {
+ char *p=buf+9; while (*p== ' ') p++;
+ if (*p)
+ {
+ free(m_http_redir_url);
+ m_http_redir_url = strdup(p);
+ connect(p);
+ return 0;
+ }
+ }
+ }
+ }
+ if (m_http_state==2)
+ {
+ if (!cnt++ && m_con->recv_lines_available() < 1) goto run_again;
+ while (m_con->recv_lines_available() > 0)
+ {
+ char buf[4096];
+ m_con->recv_line(buf,4096);
+ if (!buf[0]) { m_http_state=3; break; }
+ if (!m_recvheaders)
+ {
+ m_recvheaders_size=strlen(buf)+1;
+ m_recvheaders=(char*)malloc(m_recvheaders_size+1);
+ if (m_recvheaders)
+ {
+ strcpy(m_recvheaders,buf);
+ m_recvheaders[m_recvheaders_size]=0;
+ }
+ }
+ else
+ {
+ int oldsize=m_recvheaders_size;
+ m_recvheaders_size+=strlen(buf)+1;
+ char *n=(char*)malloc(m_recvheaders_size+1);
+ if (n)
+ {
+ memcpy(n,m_recvheaders,oldsize);
+ strcpy(n+oldsize,buf);
+ n[m_recvheaders_size]=0;
+ free(m_recvheaders);
+ m_recvheaders=n;
+ }
+ }
+ }
+ }
+ if (m_http_state==3)
+ {
+ }
+ return 0;
+}
+
+int JNL_HTTPGet::get_status() // returns 0 if connecting, 1 if reading headers,
+ // 2 if reading content, -1 if error.
+{
+ if (m_http_state < 0) return -1;
+ if (m_http_state < 2) return 0;
+ if (m_http_state == 2) return 1;
+ if (m_http_state == 3) return 2;
+ return -1;
+}
+
+int JNL_HTTPGet::getreplycode()// returns 0 if none yet, otherwise returns http reply code.
+{
+ if (!m_reply) return 0;
+ char *p=m_reply;
+ while (*p && *p != ' ') p++; // skip over HTTP/x.x
+ if (!*p) return 0;
+ return atoi(++p);
+}
+
+int JNL_HTTPGet::bytes_available()
+{
+ if (m_con && m_http_state==3) return m_con->recv_bytes_available();
+ return 0;
+}
+char *JNL_HTTPGet::getredirurl() { return m_http_redir_url; }
+
+int JNL_HTTPGet::get_bytes(char *buf, int len)
+{
+ if (m_con && m_http_state==3) return m_con->recv_bytes(buf,len);
+ return 0;
+}
+int JNL_HTTPGet::peek_bytes(char *buf, int len)
+{
+ if (m_con && m_http_state==3) return m_con->peek_bytes(buf,len);
+ return 0;
+}
diff --git a/Frameworks/JNetLib/jnetlib/httpget.h b/Frameworks/JNetLib/jnetlib/httpget.h
new file mode 100755
index 000000000..2635a37e0
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/httpget.h
@@ -0,0 +1,112 @@
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: httpget.h - JNL interface for doing HTTP GETs.
+** License: see jnetlib.h
+**
+** Usage:
+** 1. Create a JNL_HTTPGet object, optionally specifying a JNL_AsyncDNS
+** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
+** and the receive buffer size, and a string specifying proxy (or NULL
+** for none). See note on proxy string below.
+** 2. call addheader() to add whatever headers you want. It is recommended to
+** add at least the following two:
+** addheader("User-Agent:MyApp (Mozilla)");
+*/// addheader("Accept:*/*");
+/* ( the comment weirdness is there so I Can do the star-slash :)
+** 3. Call connect() with the URL you wish to GET (see URL string note below)
+** 4. Call run() once in a while, checking to see if it returns -1
+** (if it does return -1, call geterrorstr() to see what the error is).
+** (if it returns 1, no big deal, the connection has closed).
+** 5. While you're at it, you can call bytes_available() to see if any data
+** from the http stream is available, or getheader() to see if any headers
+** are available, or getreply() to see the HTTP reply, or getallheaders()
+** to get a double null terminated, null delimited list of headers returned.
+** 6. If you want to read from the stream, call get_bytes (which returns how much
+** was actually read).
+** 7. content_length() is a helper function that uses getheader() to check the
+** content-length header.
+** 8. Delete ye' ol' object when done.
+**
+** Proxy String:
+** should be in the format of host:port, or user@host:port, or
+** user:password@host:port. if port is not specified, 80 is assumed.
+** URL String:
+** should be in the format of http://user:pass@host:port/requestwhatever
+** note that user, pass, port, and /requestwhatever are all optional :)
+** note that also, http:// is really not important. if you do poo://
+** or even leave out the http:// altogether, it will still work.
+*/
+
+#ifndef _HTTPGET_H_
+#define _HTTPGET_H_
+
+#include "connection.h"
+
+class JNL_HTTPGet
+{
+ public:
+ JNL_HTTPGet(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int recvbufsize=16384, char *proxy=NULL);
+ ~JNL_HTTPGet();
+
+ void addheader(const char *header);
+
+ void connect(const char *url, int ver=0, char *requestmethod="GET");
+
+ int run(); // returns: 0 if all is OK. -1 if error (call geterrorstr()). 1 if connection closed.
+
+ int get_status(); // returns 0 if connecting, 1 if reading headers,
+ // 2 if reading content, -1 if error.
+
+ char *getallheaders(); // double null terminated, null delimited list
+ char *getheader(char *headername);
+ char *getreply() { return m_reply; }
+ int getreplycode(); // returns 0 if none yet, otherwise returns http reply code.
+
+ char *geterrorstr() { return m_errstr;}
+
+ char *getredirurl();
+
+ int bytes_available();
+ int get_bytes(char *buf, int len);
+ int peek_bytes(char *buf, int len);
+
+ int content_length() { char *p=getheader("content-length"); if (p) return atoi(p); return 0; }
+
+ JNL_Connection *get_con() { return m_con; }
+
+ protected:
+ void reinit();
+ void deinit();
+ void seterrstr(char *str) { if (m_errstr) free(m_errstr); m_errstr=(char*)malloc(strlen(str)+1); strcpy(m_errstr,str); }
+
+ void do_parse_url(char *url, char **host, int *port, char **req, char **lp);
+ void do_encode_mimestr(char *in, char *out);
+
+ JNL_AsyncDNS *m_dns;
+ JNL_Connection *m_con;
+ int m_recvbufsize;
+
+ int m_http_state;
+
+ int m_http_port;
+ char *m_http_url;
+ char *m_http_redir_url;
+ char *m_http_host;
+ char *m_http_lpinfo;
+ char *m_http_request;
+
+ char *m_http_proxylpinfo;
+ char *m_http_proxyhost;
+ int m_http_proxyport;
+
+ char *m_sendheaders;
+ char *m_recvheaders;
+ int m_recvheaders_size;
+ char *m_reply;
+
+ char *m_errstr;
+};
+
+#endif // _HTTPGET_H_
diff --git a/Frameworks/JNetLib/jnetlib/httppost.cpp b/Frameworks/JNetLib/jnetlib/httppost.cpp
new file mode 100755
index 000000000..c1ec4eff6
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/httppost.cpp
@@ -0,0 +1,412 @@
+/*
+** JNetLib
+** Copyright (C) Joshua Teitelbaum, sergent first class, 1014 army.
+** Author: Joshua Teitelbaum
+** File: httppost.cpp
+** License: see jnetlib.h
+*/
+
+#ifdef _WIN32
+#include
+#include
+#endif
+#include "netinc.h"
+#include "util.h"
+#include "httppost.h"
+
+#include
+#include
+
+static char *PREFIX = "--";
+static char *NEWLINE = "\r\n";
+
+/*
+** Joshua Teitelbaum 1/15/2006
+** 1014 Army, Sergent First Class
+** HTTP Post implementation employing HTTPGet as base class.
+*/
+/*
+** _endstack
+** when building the POST stack for a FORM, need a postamble
+*/
+void JNL_HTTPPost::_endstack()
+{
+ std::string cd;
+ cd = PREFIX;
+ cd += m_boundary;
+ cd += PREFIX;
+ cd += NEWLINE;
+
+ FILEStackObject fso;
+ fso.m_otype = 2;
+ fso.m_str = cd;
+ m_filestack.push_back(fso);
+
+}
+/*
+** prepares one field and puts it on the stack
+*/
+void JNL_HTTPPost::_preparefield(std::string &name)
+{
+ std::string cd;
+
+ cd = PREFIX;
+ cd += m_boundary;
+ cd += NEWLINE;
+ cd += "content-disposition: form-data; name=\"";
+ cd += name;
+ cd += "\"";
+ cd += NEWLINE;
+ cd += NEWLINE;
+ cd += m_fields[name];
+ cd += "\r\n";
+
+ FILEStackObject fso;
+
+ fso.m_otype = 3;
+ fso.m_str = cd;
+ m_filestack.push_back(fso);
+
+}
+/*
+** prepare all the fields, and push them on the stack
+*/
+void JNL_HTTPPost::_preparefieldstack()
+{
+ std::map::iterator it;
+
+ for(it = m_fields.begin(); it != m_fields.end(); it++)
+ {
+ std::string str = (*it).first;
+ _preparefield(str);
+ }
+}
+/*
+** prepare files and put them on the stack
+*/
+void JNL_HTTPPost::_preparefilestack()
+{
+ std::map::iterator it;
+
+ for(it = m_paths.begin(); it != m_paths.end(); it++)
+ {
+ /*
+ --boundary\r\n
+ Content-Disposition: form-data; name=""; filename=""\r\n
+ Content-Type: \r\n
+ \r\n
+ \r\n
+ */
+
+ std::string cd ;
+
+ cd = PREFIX;
+ cd += m_boundary;
+ cd += NEWLINE;
+ cd += "content-disposition: form-data; name=\"";
+ cd += (*it).first;
+ cd += "\"; filename=\"";
+ cd += m_filenames[(*it).first];
+ cd += "\"";
+ cd += NEWLINE;
+ cd += "content-type: ";
+ cd += m_content_type[(*it).first];
+ cd += NEWLINE;
+ cd += NEWLINE;
+
+
+ FILEStackObject fso;
+
+ fso.m_otype = 0;
+ fso.m_str = cd;
+ m_filestack.push_back(fso);
+
+ fso.m_otype = 1;
+ fso.m_str = (*it).first;
+ m_filestack.push_back(fso);
+
+ cd = NEWLINE;
+
+ fso.m_otype = 2;
+ fso.m_str = cd;
+ m_filestack.push_back(fso);
+ }
+
+}
+/*
+** payload function, run.
+** the tactic is this:
+** if we can't write, do normal run.
+**
+** while there is stuff on the POST stack
+** pop and item
+** write to the buffers as much as we can
+** if we can't write more, stop
+** end while
+** do normal run
+*/
+int JNL_HTTPPost::run()
+{
+ bool stop = 0;
+ std::map::iterator it;
+ int ntowrite;
+ int retval;
+ do
+ {
+ if(m_con->send_bytes_available() <= 0)
+ {
+ /*
+ ** rut roh, no buffa
+ */
+ break;
+ }
+
+ if(m_filestack.size() <= 0)
+ {
+ /*
+ ** Nothing to do
+ */
+ break;
+ }
+ /*
+ ** Get the current object off the stack
+ */
+ switch(m_filestack.front().m_otype)
+ {
+ case 0: /*preamble*/
+ case 2: /*postamble*/
+ case 3: /*plain jane field*/
+ {
+ ntowrite = m_filestack.front().m_str.length() - m_filestack.front().nwritten;
+
+ if(m_con->send_bytes_available() < ntowrite)
+ {
+ ntowrite = m_con->send_bytes_available();
+ }
+ if(ntowrite>0)
+ {
+ retval = m_con->send(m_filestack.front().m_str.c_str() + m_filestack.front().nwritten,ntowrite);
+
+ if(retval < 0)
+ {
+ break;
+ }
+
+ m_filestack.front().nwritten += ntowrite;
+ m_nwritten += ntowrite;
+
+ if( m_filestack.front().nwritten == m_filestack.front().m_str.length())
+ {
+ /*
+ ** all done with this object
+ */
+ m_filestack.pop_front();
+ }
+ }
+ else
+ {
+ retval = 0;
+ stop = true;
+ }
+ }
+ break;
+ case 1: /*MEAT*/
+ {
+ FILE *fp;
+ int sresult;
+ fp = fopen(m_paths[m_filestack.front().m_str].c_str(),"rb");
+
+ if(fp == NULL)
+ {
+ /*
+ ** someone gave this process a hot foot?
+ */
+ return -1;
+ }
+ sresult = fseek(fp,m_filestack.front().nwritten,SEEK_SET);
+
+ if(sresult < 0)
+ {
+ /*
+ ** someone gave this process a hot foot?
+ */
+ fclose(fp);
+ return -1;
+ }
+
+ if(((m_content_length[m_filestack.front().m_str] - m_filestack.front().nwritten)) > (unsigned long)m_con->send_bytes_available())
+ {
+ ntowrite = m_con->send_bytes_available();
+ }
+ else
+ {
+ ntowrite = (m_content_length[m_filestack.front().m_str] - m_filestack.front().nwritten);
+ }
+
+ char *b=NULL;
+
+ b = (char *)malloc(ntowrite);
+
+ if(b == NULL)
+ {
+ return -1;
+ /*
+ ** whiskey tango foxtrot
+ */
+ }
+ /*
+ ** read from where we left off
+ */
+ sresult = fread(b,1,ntowrite,fp);
+
+ if(sresult != ntowrite)
+ {
+ /*
+ ** hot foot with matches again
+ */
+ if(b)
+ {
+ free(b);
+ }
+ fclose(fp);
+ return -1;
+ }
+
+ fclose(fp);
+
+ retval = m_con->send(b,ntowrite);
+
+ free(b);
+
+ if(retval < 0)
+ {
+ return retval;
+ }
+
+ m_filestack.front().nwritten += ntowrite;
+
+ m_nwritten += ntowrite;
+
+ if(m_filestack.front().nwritten == m_content_length[m_filestack.front().m_str])
+ {
+ m_filestack.pop_front();
+ }
+ }
+ break;
+ }
+ } while(!stop);
+
+ return JNL_HTTPGet::run();
+}
+/*
+** addfield, adds field
+*/
+int JNL_HTTPPost::addfield(char *name, char *val)
+{
+ if(name == NULL || val == NULL)
+ {
+ return -1;
+ }
+ m_fields[name]=val;
+
+ return 0;
+}
+/*
+** addfile, adds file
+*/
+int JNL_HTTPPost::addfile(char *name, char *mimetype, char *filename, char *filepath)
+{
+ struct stat buffer;
+
+ FILE *fp=NULL;
+ if(name==NULL || filepath == NULL || mimetype == NULL || filename == NULL || (!(fp=fopen(filepath,"rb"))))
+ {
+ return -1;
+ }
+
+ m_content_type[name] = mimetype;
+ m_paths[name] = filepath;
+ m_filenames[name] = filename;
+
+ fstat(fileno(fp),&buffer);
+ fclose(fp);
+ m_content_length[name] = buffer.st_size;
+
+ return 0;
+}
+/*
+** After adding fields and files, get the content length
+*/
+int JNL_HTTPPost::contentlength()
+{
+ std::map::iterator it;
+ std::string tmp;
+ int length = 0;
+// fields
+ {
+ for (it = m_fields.begin(); it != m_fields.end(); it++)
+ {
+ std::string name = (*it).first;
+ std::string value = (*it).second;
+
+ tmp = "--" + m_boundary + "\r\n"
+ "content-disposition: form-data; name=\"" + name + "\"\r\n"
+ "\r\n";
+ tmp += value + "\r\n";
+
+ length += tmp.size();
+ }
+ }
+
+ // files
+ {
+ for (it = m_filenames.begin(); it != m_filenames.end(); it++)
+ {
+ std::string name = (*it).first;
+ std::string filename = (*it).second;
+ long content_length = m_content_length[name];
+ std::string content_type = m_content_type[name];
+ tmp = "--" + m_boundary + "\r\n"
+ "content-disposition: form-data; name=\"" + name + "\"; filename=\"" + filename + "\"\r\n"
+ "content-type: " + content_type + "\r\n"
+ "\r\n";
+ length += tmp.size();
+ length += content_length;
+ length += 2; // crlf after file
+ }
+ }
+
+ // end
+ tmp = "--" + m_boundary + "--\r\n";
+ length += tmp.size();
+
+ return length;
+
+}
+void JNL_HTTPPost::_addformheader()
+{
+ char *h;
+#ifdef _WIN32
+ srand(GetTickCount());
+#else
+ srand(time(NULL));
+#endif
+
+ int x;
+ char *preamble = "content-type:multipart/form-data; boundary=";
+ char *dashes = "----";
+
+ char *post_boundary = (char*)alloca(10+strlen(dashes));
+ memcpy(post_boundary,dashes,strlen(dashes));
+
+ for(x=strlen(dashes); x < (int)strlen(dashes)+9; x++)
+ {
+ post_boundary[x] = (char)(rand() % 9) + '0';
+ }
+ post_boundary[x] = 0;
+
+ h = (char *)alloca(strlen(preamble) + strlen(post_boundary) + 1);
+ sprintf(h,"%s%s",preamble,post_boundary);
+ addheader(h);
+ m_boundary = post_boundary;
+}
diff --git a/Frameworks/JNetLib/jnetlib/httppost.h b/Frameworks/JNetLib/jnetlib/httppost.h
new file mode 100755
index 000000000..c7351de28
--- /dev/null
+++ b/Frameworks/JNetLib/jnetlib/httppost.h
@@ -0,0 +1,129 @@
+
+/*
+** JNetLib
+** Copyright (C) Joshua Teitelbaum, sergent first class, 1014 army.
+** Author: Joshua Teitelbaum
+** File: httppost.cpp/h
+** License: see jnetlib.h
+** Usage:
+** 1. Create a JNL_HTTPPost object, optionally specifying a JNL_AsyncDNS
+** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
+** and the receive buffer size, and a string specifying proxy (or NULL
+** for none). See note on proxy string below.
+** 2. call addheader() to add whatever headers you want. It is recommended to
+** add at least the following two:
+** addheader("User-Agent:MyApp (Mozilla)");
+*/// addheader("Accept:*/*");
+/* Joshua Teitelbaum 1/15/2006
+** 2.5 call addfield to add field items to your POST
+** 2.9 call addfile to add file items to your POST
+*/
+/* ( the comment weirdness is there so I Can do the star-slash :)
+** 3. Call connect() with the URL you wish to Post (see URL string note below)
+** 4. Call run() once in a while, checking to see if it returns -1
+** (if it does return -1, call geterrorstr() to see what the error is).
+** (if it returns 1, no big deal, the connection has closed).
+** 5. While you're at it, you can call bytes_available() to see if any data
+** from the http stream is available, or getheader() to see if any headers
+** are available, or getreply() to see the HTTP reply, or getallheaders()
+** to get a double null terminated, null delimited list of headers returned.
+** 6. If you want to read from the stream, call get_bytes (which returns how much
+** was actually read).
+** 7. content_length() is a helper function that uses getheader() to check the
+** content-length header.
+** 8. Delete ye' ol' object when done.
+**
+** Proxy String:
+** should be in the format of host:port, or user@host:port, or
+** user:password@host:port. if port is not specified, 80 is assumed.
+** URL String:
+** should be in the format of http://user:pass@host:port/requestwhatever
+** note that user, pass, port, and /requestwhatever are all optional :)
+** note that also, http:// is really not important. if you do poo://
+** or even leave out the http:// altogether, it will still work.
+*/
+
+#ifndef _HTTPPOST_H_
+#define _HTTPPOST_H_
+
+#include "connection.h"
+#include "httpget.h"
+/*
+** VC6 SPEW
+*/
+#pragma warning(disable:4786)
+/*
+** END VC6 SPEW
+*/
+#include
+#include
+#include