Compare commits
298 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b1596e12e | |||
| f3ad798d0e | |||
| ec5fc33af1 | |||
| 9e112ec3f9 | |||
| 3823aee4cf | |||
| b95391b03b | |||
| 56be11a950 | |||
| f6f4252075 | |||
| a16a78d322 | |||
| ab751a0304 | |||
| 8e46cbb105 | |||
| e178c3748a | |||
| a19f6b3088 | |||
| 6b385bd29c | |||
| aa1136a835 | |||
| d315114796 | |||
| c071f10bc8 | |||
| a9768580c1 | |||
| 37285cc86c | |||
| 7555a83c9b | |||
| 7cb2dbb5e6 | |||
| 94e6293f36 | |||
| 187a39ca14 | |||
| 6e63e74f81 | |||
| 229e4eeaa1 | |||
| e7d01c4ec1 | |||
| 3089435da0 | |||
| b8c3c4a2af | |||
| b48e47bc8b | |||
| ab9e802770 | |||
| 98dbad9ac7 | |||
| 436014cfec | |||
| d50d74b78a | |||
| 80ce1c4731 | |||
| 5ddf6d9f1a | |||
| 267cf26b2e | |||
| 580a857f11 | |||
| c3817bea15 | |||
| 492f51ce9b | |||
| 45b4e3f191 | |||
| dd72c619d3 | |||
| 43af10de88 | |||
| 7ba97e4893 | |||
| 0c24cb2262 | |||
| 7b76b76b94 | |||
| 565c44677b | |||
| 30dc3679c1 | |||
| 9a18cae265 | |||
| c04654a87b | |||
| bd7f67b3b0 | |||
| 833add707f | |||
| 9118a7688a | |||
| cba1eb36a2 | |||
| d15139d00d | |||
| c1cf9b47d8 | |||
| 986367be38 | |||
| 7d207136b3 | |||
| 0fa3b72a56 | |||
| 67d2bb3f62 | |||
| f2c333f57d | |||
| eccda7a525 | |||
| ac0d9977b5 | |||
| 6c1612f2bb | |||
| ead9bb9c41 | |||
| cc20c54967 | |||
| d5c2dd48f7 | |||
| f4336f1dde | |||
| 7ab91d9440 | |||
| 7e7a168806 | |||
| 9651351ec9 | |||
| c658616e0f | |||
| c8a40de44f | |||
| b212d1631a | |||
| 8adf701444 | |||
| b2f69d4b65 | |||
| 906d451200 | |||
| 80d2cab81c | |||
| c8bc22cbb9 | |||
| e9ca0365c7 | |||
| 52b0a7fd4e | |||
| 3651fc921b | |||
| ef3425e38e | |||
| 533e961c85 | |||
| c2f7632be4 | |||
| 245d709125 | |||
| 1ad14f016a | |||
| 03561eab36 | |||
| f2c98f9d86 | |||
| bde39be109 | |||
| 5d7ac480b2 | |||
| 3579579c80 | |||
| 47865cbcee | |||
| 054f8f2d87 | |||
| d7a02da74b | |||
| 1846597f04 | |||
| f94b3b247b | |||
| a96c17a3ad | |||
| 6276a09ced | |||
| ca92016ab9 | |||
| 21bca0e0e8 | |||
| dd02e9aecc | |||
| 77cc351bd6 | |||
| 6385afb34a | |||
| b880356dde | |||
| fdd2a5aa36 | |||
| 93f8da2f69 | |||
| a165f3e57f | |||
| d7f2221d77 | |||
| 02bda676a9 | |||
| e4bd44e939 | |||
| d83fbb1d7e | |||
| c2734a66c3 | |||
| 721f8964cf | |||
| 37ca701ae0 | |||
| c1a89eedda | |||
| 8aeb88cea3 | |||
| b776ef02a7 | |||
| 0befabb620 | |||
| 0edc193314 | |||
| 806a72efec | |||
| ea02b850f5 | |||
| ec83087712 | |||
| 798397b21c | |||
| 5677a13372 | |||
| 581f1b94bd | |||
| dbd403739b | |||
| e0af108b85 | |||
| efa95e34df | |||
| 5232879f77 | |||
| 7716a304c9 | |||
| 7ca9bfbd0b | |||
| f4afca3cab | |||
| bcd33ab9e7 | |||
| 96cb9e09e3 | |||
| 9ac93890f4 | |||
| ca232f8e8f | |||
| 9b859f0c99 | |||
| 07e5b8636f | |||
| 37b7b74914 | |||
| 78c07974bf | |||
| d44e04cd07 | |||
| d8fffe738d | |||
| 239eb94093 | |||
| c2f3731a69 | |||
| 48f80cc13d | |||
| 0396d9c6d5 | |||
| 3514b637c8 | |||
| 78ce839cc1 | |||
| 831bb20ff7 | |||
| 43dda4a2f0 | |||
| 2f0978ccc4 | |||
| 71c5eda4a1 | |||
| 4b241374ea | |||
| dd07b545c7 | |||
| af4ba6623c | |||
| 435607d170 | |||
| 8094bd2c6c | |||
| d8d22f6083 | |||
| 6fcfe2fda4 | |||
| 6ccce1875b | |||
| 433fc1a8ff | |||
| 4f64c952b8 | |||
| 139b25a7f0 | |||
| 3ee4e0fd1d | |||
| f013840cae | |||
| 79457aa13d | |||
| ac2657b7e1 | |||
| 82130f2e67 | |||
| b9573c4e8b | |||
| 6481620e7a | |||
| 35e7ead8d1 | |||
| 0f896fdaee | |||
| 8a4fceaa00 | |||
| 6007f790db | |||
| 05e7f2baa3 | |||
| 39871172e9 | |||
| 491f80741b | |||
| 0eb9ea31e1 | |||
| 8865376c3c | |||
| d86d0108ff | |||
| b45b7085ce | |||
| 91193c6b2e | |||
| 9720b1c05c | |||
| 9766a5ad6c | |||
| 1e181e7580 | |||
| f6d6c779ae | |||
| 11bb50f8d2 | |||
| d721e0ba1a | |||
| ba6066875c | |||
| 0f1a1a9de5 | |||
| a81cebf5c8 | |||
| 007ec7ab69 | |||
| b93d411f63 | |||
| 741a23809d | |||
| a92fd36c17 | |||
| e122610c04 | |||
| 0539e0bac2 | |||
| 3416161818 | |||
| 32a4aa13ea | |||
| cf188ffb6a | |||
| f1a1963ac8 | |||
| 645797b72e | |||
| b9f808f70e | |||
| 74ef3979f5 | |||
| 992879f54f | |||
| ccdf9d5d3c | |||
| 0336b5a9b6 | |||
| aefbeafd28 | |||
| bc6c07f045 | |||
| db24e66d33 | |||
| ef70f935c1 | |||
| afbf8ab6fe | |||
| d39296f496 | |||
| eafceb4645 | |||
| 83cf85a27a | |||
| 06e250a954 | |||
| 5b6622a961 | |||
| a58e291d2e | |||
| a0e1f9844e | |||
| 7d524ddeac | |||
| 94c9f7fe5a | |||
| be8a5879f3 | |||
| c657919704 | |||
| abeef21d7a | |||
| 79e3b14593 | |||
| d9a4cda9b0 | |||
| 12b316da0b | |||
| 13cade5c00 | |||
| 051e8dd6c8 | |||
| 1adea1c54e | |||
| aa51cfb2fd | |||
| 6b8885bd29 | |||
| e0fbf1ab4e | |||
| 366c6e7b77 | |||
| 378c116d9b | |||
| 58bade8ec9 | |||
| 7d7f5c40d6 | |||
| c9fd54d106 | |||
| 2f1ce799ad | |||
| 7f02f4cf99 | |||
| a9066c0d0a | |||
| 29739dba74 | |||
| d60a7094a4 | |||
| 7edd4210f6 | |||
| 2abaecbd14 | |||
| 346499e03b | |||
| bc72a52bf5 | |||
| 0ebd3cb0e7 | |||
| 5d7064ee13 | |||
| d02768ddad | |||
| dbc7b361c8 | |||
| a0de46e3c7 | |||
| 2d6e19baee | |||
| 21ec3cb2a1 | |||
| cb542da068 | |||
| 788b4e4f7a | |||
| 24b2292cba | |||
| 72866262d2 | |||
| acabbb6c03 | |||
| fff0f0befc | |||
| cf0675dac2 | |||
| 1cffa0ba74 | |||
| 9ebd8182a6 | |||
| 63a8ae7f08 | |||
| 992f94e870 | |||
| 1c476c77ad | |||
| 28bd612ca0 | |||
| 45cf2a7ac0 | |||
| f7c986c65c | |||
| ca43df4475 | |||
| ef71b6abf0 | |||
| 3ff922a2c0 | |||
| 646c371bd3 | |||
| 36401009f8 | |||
| b837554dcf | |||
| 0ba0e019ae | |||
| 8771ef3f0a | |||
| 71e7238483 | |||
| b75c10fca6 | |||
| 50f85ac103 | |||
| a7cbb84b34 | |||
| ed6789c9a5 | |||
| ca444930a4 | |||
| 21051864ec | |||
| 36d1553072 | |||
| eb14758846 | |||
| bf3a5c2422 | |||
| 98fd1342e7 | |||
| 183ed91cb8 | |||
| c241dcf1df | |||
| 8007fa6f0f | |||
| 7ab973a03b | |||
| 987be40c91 | |||
| 2e71ac6876 | |||
| c428cac537 | |||
| 18c6516df9 | |||
| fe450a7db2 | |||
| bb57f59553 |
@@ -16,6 +16,7 @@ DerivedData
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
*.DS_Store
|
||||
|
||||
# SwiftPM
|
||||
Packages/
|
||||
@@ -35,3 +36,9 @@ SlackKit.xcworkspace
|
||||
# Add this line if you want to avoid checking in source code from Carthage dependencies.
|
||||
Carthage/Checkouts
|
||||
Carthage/Build
|
||||
|
||||
# Swift Package Manager
|
||||
.swiftpm/
|
||||
|
||||
*.resolved
|
||||
.vscode
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2.2
|
||||
5.5.2
|
||||
@@ -0,0 +1,7 @@
|
||||
disabled_rules:
|
||||
- identifier_name
|
||||
- function_parameter_count
|
||||
line_length: 140
|
||||
excluded: # paths to ignore during linting. Takes precedence over `included`.
|
||||
- Carthage
|
||||
- Pods
|
||||
@@ -1,2 +1,2 @@
|
||||
github "daltoniam/Starscream" ~> 1.0
|
||||
github "glock45/swifter" "d7c820bfc9260e469094b5f8d3d101b30c4a8fac"
|
||||
github "daltoniam/Starscream" == 4.0.4
|
||||
github "httpswift/swifter" == 1.5.0
|
||||
@@ -1,2 +0,0 @@
|
||||
github "daltoniam/Starscream" "1.1.3"
|
||||
github "glock45/swifter" "d7c820bfc9260e469094b5f8d3d101b30c4a8fac"
|
||||
@@ -0,0 +1 @@
|
||||
github "pvzig/SlackKit"
|
||||
@@ -0,0 +1,275 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
262F50452259146E00A74EB1 /* Leaderbot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 262F50432259146E00A74EB1 /* Leaderbot.swift */; };
|
||||
262F50462259146E00A74EB1 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 262F50442259146E00A74EB1 /* main.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
262F50312259139400A74EB1 /* Leaderboard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Leaderboard.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
262F50362259139400A74EB1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
262F50432259146E00A74EB1 /* Leaderbot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Leaderbot.swift; path = Sources/Leaderbot.swift; sourceTree = "<group>"; };
|
||||
262F50442259146E00A74EB1 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = main.swift; path = Sources/main.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
262F502F2259139400A74EB1 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
262F50292259139400A74EB1 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
262F50332259139400A74EB1 /* Leaderboard */,
|
||||
262F50322259139400A74EB1 /* Products */,
|
||||
665E45E1CAEDB17C0745AD28 /* Pods */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
262F50322259139400A74EB1 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
262F50312259139400A74EB1 /* Leaderboard.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
262F50332259139400A74EB1 /* Leaderboard */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
262F50432259146E00A74EB1 /* Leaderbot.swift */,
|
||||
262F50442259146E00A74EB1 /* main.swift */,
|
||||
262F50362259139400A74EB1 /* Info.plist */,
|
||||
);
|
||||
path = Leaderboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
665E45E1CAEDB17C0745AD28 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
262F50302259139400A74EB1 /* Leaderboard */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 262F50392259139400A74EB1 /* Build configuration list for PBXNativeTarget "Leaderboard" */;
|
||||
buildPhases = (
|
||||
262F502E2259139400A74EB1 /* Sources */,
|
||||
262F502F2259139400A74EB1 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Leaderboard;
|
||||
productName = Leaderboard;
|
||||
productReference = 262F50312259139400A74EB1 /* Leaderboard.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
262F502A2259139400A74EB1 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1020;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "Peter Zignego";
|
||||
TargetAttributes = {
|
||||
262F50302259139400A74EB1 = {
|
||||
CreatedOnToolsVersion = 10.2;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 262F502D2259139400A74EB1 /* Build configuration list for PBXProject "Leaderboard" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 262F50292259139400A74EB1;
|
||||
productRefGroup = 262F50322259139400A74EB1 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
262F50302259139400A74EB1 /* Leaderboard */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
262F502E2259139400A74EB1 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
262F50462259146E00A74EB1 /* main.swift in Sources */,
|
||||
262F50452259146E00A74EB1 /* Leaderbot.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
262F50372259139400A74EB1 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
262F50382259139400A74EB1 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
262F503A2259139400A74EB1 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Carthage/Build/Mac\"";
|
||||
INFOPLIST_FILE = Leaderboard/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.Leaderboard;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
262F503B2259139400A74EB1 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Carthage/Build/Mac\"";
|
||||
INFOPLIST_FILE = Leaderboard/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.Leaderboard;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
262F502D2259139400A74EB1 /* Build configuration list for PBXProject "Leaderboard" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
262F50372259139400A74EB1 /* Debug */,
|
||||
262F50382259139400A74EB1 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
262F50392259139400A74EB1 /* Build configuration list for PBXNativeTarget "Leaderboard" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
262F503A2259139400A74EB1 /* Debug */,
|
||||
262F503B2259139400A74EB1 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 262F502A2259139400A74EB1 /* Project object */;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:Leaderboard.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -13,16 +13,16 @@
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.0</string>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2016 Peter Zignego. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
<string>Copyright © 2019 Peter Zignego. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
//
|
||||
// Leaderboard.swift
|
||||
//
|
||||
// Copyright © 2019 Peter Zignego. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
import SlackKit
|
||||
|
||||
class Leaderbot {
|
||||
|
||||
struct Leaderboard {
|
||||
let teamID: String
|
||||
var scores = [String: Int]()
|
||||
|
||||
init(teamID: String) {
|
||||
self.teamID = teamID
|
||||
}
|
||||
}
|
||||
|
||||
enum Command: String {
|
||||
case leaderboard = "leaderboard"
|
||||
}
|
||||
|
||||
enum Trigger: String {
|
||||
case plusPlus = "++"
|
||||
case minusMinus = "--"
|
||||
}
|
||||
|
||||
let slackkit = SlackKit()
|
||||
|
||||
var leaderboards = [String: Leaderboard]()
|
||||
let atSet = CharacterSet(charactersIn: "@")
|
||||
|
||||
init(apiToken: String) {
|
||||
slackkit.addWebAPIAccessWithToken(apiToken)
|
||||
slackkit.addRTMBotWithAPIToken(apiToken)
|
||||
slackkit.notificationForEvent(.message) { [weak self] (event, client) in
|
||||
self?.listen(client?.client, message: event.message)
|
||||
}
|
||||
}
|
||||
|
||||
init(clientID: String, clientSecret: String) {
|
||||
let oauthConfig = OAuthConfig(clientID: clientID, clientSecret: clientSecret)
|
||||
slackkit.addServer(oauth: oauthConfig)
|
||||
slackkit.notificationForEvent(.message) { [weak self] (event, client) in
|
||||
self?.listen(client?.client, message: event.message)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Leaderboard Internal Logic
|
||||
private func listen(_ client: Client?, message: Message?) {
|
||||
guard let message = message, let text = message.text, let client = client else {
|
||||
return
|
||||
}
|
||||
switch text {
|
||||
case let text where text.lowercased().contains(Command.leaderboard.rawValue) && text.optionalContains(client.authenticatedUser?.id):
|
||||
handleCommand(.leaderboard, channel: message.channel, client: client)
|
||||
case let text where text.contains(Trigger.plusPlus.rawValue):
|
||||
handleMessageWithTrigger(.plusPlus, message: message, client: client)
|
||||
case let text where text.contains(Trigger.minusMinus.rawValue):
|
||||
handleMessageWithTrigger(.minusMinus, message: message, client: client)
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
private func handleMessageWithTrigger(_ trigger: Trigger, message: Message, client: Client) {
|
||||
guard
|
||||
let text = message.text,
|
||||
let teamID = client.team?.id
|
||||
else {
|
||||
return
|
||||
}
|
||||
if leaderboards[teamID] == nil { leaderboards[teamID] = Leaderboard(teamID: teamID) }
|
||||
//Nonusers
|
||||
searchTextWithExpression("([a-z0-9_\\-\\.]+)[\\+\\-]{2}", text: text, trigger: trigger, teamID: teamID)
|
||||
//Users
|
||||
searchTextWithExpression("<@([A-Z0-9_\\-\\.]+)>[\\+\\-]{2}", text: text, trigger: trigger, teamID: teamID)
|
||||
}
|
||||
|
||||
func searchTextWithExpression(_ expression: String, text: String, trigger: Trigger, teamID: String) {
|
||||
let thingRegex = try? NSRegularExpression(pattern: expression, options: [])
|
||||
let things = thingRegex?.matches(in: text, options: [], range: NSMakeRange(0, text.utf16.count)) ?? []
|
||||
for match in things {
|
||||
let value = String(text[text.range(from: match.range(at: 1))!])
|
||||
if leaderboards[teamID]?.scores[value] == nil { leaderboards[teamID]?.scores[value] = 0 }
|
||||
switch trigger {
|
||||
case .plusPlus:
|
||||
leaderboards[teamID]?.scores[value]?+=1
|
||||
case .minusMinus:
|
||||
leaderboards[teamID]?.scores[value]?-=1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func handleCommand(_ command: Command, channel:String?, client: Client) {
|
||||
switch command {
|
||||
case .leaderboard:
|
||||
if let id = channel {
|
||||
slackkit.webAPI?.sendMessage(channel: id,
|
||||
text: "Here's the leaderboard:",
|
||||
linkNames: true,
|
||||
attachments: [constructLeaderboardAttachment(client)],
|
||||
success: nil,
|
||||
failure: { (error) in
|
||||
print("Leaderboard failed to post due to error:\(error)")
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Leaderboard Interface
|
||||
private func constructLeaderboardAttachment(_ client: Client) -> Attachment? {
|
||||
guard let teamID = client.team?.id, let leaderboard = leaderboards[teamID] else {
|
||||
return nil
|
||||
}
|
||||
let top = AttachmentField(title: ":100:", value: swapIDsForNames(client, string: topItems(leaderboard)), short: true)
|
||||
let bottom = AttachmentField(title: ":poop:", value: swapIDsForNames(client, string: bottomItems(leaderboard)), short: true)
|
||||
return Attachment(fallback: "Leaderboard", title: "Leaderboard", colorHex: AttachmentColor.good.rawValue, text: "", fields: [top, bottom])
|
||||
}
|
||||
|
||||
private func topItems(_ leaderboard: Leaderboard) -> String {
|
||||
let sortedKeys = Array(leaderboard.scores.keys).sorted(by: {leaderboard.scores[$0]! > leaderboard.scores[$1]!}).filter({leaderboard.scores[$0]! > 0})
|
||||
let sortedValues = Array(leaderboard.scores.values).sorted(by: {$0 > $1}).filter({$0 > 0})
|
||||
return leaderboardString(sortedKeys, values: sortedValues)
|
||||
}
|
||||
|
||||
private func bottomItems(_ leaderboard: Leaderboard) -> String {
|
||||
let sortedKeys = Array(leaderboard.scores.keys).sorted(by: {leaderboard.scores[$0]! < leaderboard.scores[$1]!}).filter({leaderboard.scores[$0]! < 0})
|
||||
let sortedValues = Array(leaderboard.scores.values).sorted(by: {$0 < $1}).filter({$0 < 0})
|
||||
return leaderboardString(sortedKeys, values: sortedValues)
|
||||
}
|
||||
|
||||
private func leaderboardString(_ keys: [String], values: [Int]) -> String {
|
||||
var returnValue = ""
|
||||
for i in 0..<values.count {
|
||||
returnValue += keys[i] + " (" + "\(values[i])" + ")\n"
|
||||
}
|
||||
return returnValue
|
||||
}
|
||||
|
||||
// MARK: - Utilities
|
||||
private func swapIDsForNames(_ client: Client, string: String) -> String {
|
||||
var returnString = string
|
||||
for key in client.users.keys {
|
||||
if let name = client.users[key]?.name {
|
||||
returnString = returnString.replacingOccurrences(of: key, with: "@"+name, options: NSString.CompareOptions.literal, range: returnString.startIndex..<returnString.endIndex)
|
||||
}
|
||||
}
|
||||
return returnString
|
||||
}
|
||||
}
|
||||
|
||||
extension String {
|
||||
func optionalContains(_ string: String?) -> Bool {
|
||||
guard let str = string else {
|
||||
return false
|
||||
}
|
||||
return self.contains(str)
|
||||
}
|
||||
}
|
||||
|
||||
extension String {
|
||||
func range(from nsRange: NSRange) -> Range<String.Index>? {
|
||||
guard
|
||||
let from16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location, limitedBy: utf16.endIndex),
|
||||
let to16 = utf16.index(from16, offsetBy: nsRange.length, limitedBy: utf16.endIndex),
|
||||
let from = from16.samePosition(in: self),
|
||||
let to = to16.samePosition(in: self)
|
||||
else { return nil }
|
||||
return from ..< to
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import Foundation
|
||||
|
||||
//With OAuth
|
||||
//let bot = Leaderbot(clientID: "CLIENT_ID", clientSecret: "CLIENT_SECRET")
|
||||
|
||||
//With API token
|
||||
let bot = Leaderbot(apiToken: "xoxb-SLACK_BOT_TOKEN")
|
||||
RunLoop.main.run()
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
// swift-tools-version:4.2
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "Leaderboard",
|
||||
products: [
|
||||
.executable(name: "Leaderboard", targets: ["Leaderboard"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/pvzig/SlackKit", .upToNextMinor(from: "4.6.0"))
|
||||
],
|
||||
targets: [
|
||||
.target(name: "Leaderboard",
|
||||
dependencies: ["SlackKit"],
|
||||
path: "Leaderboard/Sources")
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
platform :osx, '10.11'
|
||||
|
||||
target 'Leaderboard' do
|
||||
pod 'SlackKit', '>= 4.6.0'
|
||||
end
|
||||
@@ -0,0 +1 @@
|
||||
github "pvzig/SlackKit"
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
// swift-tools-version:4.2
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "Robot or Not Bot",
|
||||
products: [
|
||||
.executable(name: "Robot or Not Bot", targets: ["Robot or Not Bot"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/pvzig/SlackKit", .upToNextMinor(from: "4.6.0"))
|
||||
],
|
||||
targets: [
|
||||
.target(name: "Robot or Not Bot",
|
||||
dependencies: ["SlackKit"],
|
||||
path: "Robot or Not Bot/Sources")
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
platform :osx, '10.11'
|
||||
|
||||
target 'Robot Or Not Bot' do
|
||||
pod 'SlackKit', '>= 4.6.0'
|
||||
end
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
262F505D22591A9000A74EB1 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 262F505C22591A9000A74EB1 /* main.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
262F504F225919E200A74EB1 /* Robot Or Not Bot.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Robot Or Not Bot.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
262F5054225919E200A74EB1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
262F505C22591A9000A74EB1 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = main.swift; path = Sources/main.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
262F504D225919E200A74EB1 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
262F5047225919E200A74EB1 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
262F5051225919E200A74EB1 /* Robot Or Not Bot */,
|
||||
262F5050225919E200A74EB1 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
262F5050225919E200A74EB1 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
262F504F225919E200A74EB1 /* Robot Or Not Bot.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
262F5051225919E200A74EB1 /* Robot Or Not Bot */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
262F505C22591A9000A74EB1 /* main.swift */,
|
||||
262F5054225919E200A74EB1 /* Info.plist */,
|
||||
);
|
||||
path = "Robot Or Not Bot";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
262F504E225919E200A74EB1 /* Robot Or Not Bot */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 262F5057225919E200A74EB1 /* Build configuration list for PBXNativeTarget "Robot Or Not Bot" */;
|
||||
buildPhases = (
|
||||
262F504C225919E200A74EB1 /* Sources */,
|
||||
262F504D225919E200A74EB1 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "Robot Or Not Bot";
|
||||
productName = "Robot Or Not Bot";
|
||||
productReference = 262F504F225919E200A74EB1 /* Robot Or Not Bot.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
262F5048225919E200A74EB1 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1020;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "Peter Zignego";
|
||||
TargetAttributes = {
|
||||
262F504E225919E200A74EB1 = {
|
||||
CreatedOnToolsVersion = 10.2;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 262F504B225919E200A74EB1 /* Build configuration list for PBXProject "Robot Or Not Bot" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 262F5047225919E200A74EB1;
|
||||
productRefGroup = 262F5050225919E200A74EB1 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
262F504E225919E200A74EB1 /* Robot Or Not Bot */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
262F504C225919E200A74EB1 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
262F505D22591A9000A74EB1 /* main.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
262F5055225919E200A74EB1 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
262F5056225919E200A74EB1 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
262F5058225919E200A74EB1 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Carthage/Build/Mac\"";
|
||||
INFOPLIST_FILE = "Robot Or Not Bot/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.launchsoft.Robot-Or-Not-Bot";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
262F5059225919E200A74EB1 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Carthage/Build/Mac\"";
|
||||
INFOPLIST_FILE = "Robot Or Not Bot/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.launchsoft.Robot-Or-Not-Bot";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
262F504B225919E200A74EB1 /* Build configuration list for PBXProject "Robot Or Not Bot" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
262F5055225919E200A74EB1 /* Debug */,
|
||||
262F5056225919E200A74EB1 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
262F5057225919E200A74EB1 /* Build configuration list for PBXNativeTarget "Robot Or Not Bot" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
262F5058225919E200A74EB1 /* Debug */,
|
||||
262F5059225919E200A74EB1 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 262F5048225919E200A74EB1 /* Project object */;
|
||||
}
|
||||
Generated
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:Robot Or Not Bot.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
+6
-6
@@ -13,16 +13,16 @@
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.0</string>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2016 Peter Zignego. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
<string>Copyright © 2019 Peter Zignego. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,135 @@
|
||||
import Foundation
|
||||
import SlackKit
|
||||
|
||||
class RobotOrNotBot {
|
||||
|
||||
let verdicts: [String:Bool] = [
|
||||
"Mr. Roboto" : false,
|
||||
"Service Kiosks": false,
|
||||
"Darth Vader": false,
|
||||
"K-9": true,
|
||||
"Emotions": false,
|
||||
"Self-Driving Cars": false,
|
||||
"Telepresence Robots": false,
|
||||
"Roomba": true,
|
||||
"Assembly-Line Robot": false,
|
||||
"ASIMO": false,
|
||||
"KITT": false,
|
||||
"USS Enterprise": false,
|
||||
"Transformers": true,
|
||||
"Jaegers": false,
|
||||
"The Major": false,
|
||||
"Siri": false,
|
||||
"The Terminator": true,
|
||||
"Commander Data": false,
|
||||
"Marvin the Paranoid Android": true,
|
||||
"Pinocchio": false,
|
||||
"Droids": true,
|
||||
"Hitchbot": false,
|
||||
"Mars Rovers": false,
|
||||
"Space Probes": false,
|
||||
"Sasquatch": false,
|
||||
"Toaster": false,
|
||||
"Toaster Oven": false,
|
||||
"Cylons": false,
|
||||
"V'ger": true,
|
||||
"Ilia Robot": false,
|
||||
"The TARDIS": false,
|
||||
"Johnny 5": true,
|
||||
"Twiki": true,
|
||||
"Dr. Theopolis": false,
|
||||
"robots.txt": false,
|
||||
"Lobot": false,
|
||||
"Vicki": true,
|
||||
"GlaDOS": false,
|
||||
"Turrets": true,
|
||||
"Wheatley": true,
|
||||
"Herbie the Love Bug": false,
|
||||
"Iron Man": false,
|
||||
"Ultron": false,
|
||||
"The Vision": false,
|
||||
"Clockwork Droids": false,
|
||||
"Podcasts": false,
|
||||
"Cars": false,
|
||||
"Swimming Pool Cleaners": false,
|
||||
"Burritos": false,
|
||||
"Prince Robot IV": false,
|
||||
"Daleks": false,
|
||||
"Cybermen": false,
|
||||
"The Internet of Things": false,
|
||||
"Nanobots": true,
|
||||
"Two Intermeshed Gears": false,
|
||||
"Crow T. Robot": true,
|
||||
"Tom Servo": true,
|
||||
"Thomas and Friends": false,
|
||||
"Replicants": false,
|
||||
"Chatbots": false,
|
||||
"Agents": false,
|
||||
"Lego Simulated Worm Toy": true,
|
||||
"Ghosts": false,
|
||||
"Exos": true,
|
||||
"Rasputin": false,
|
||||
"Tamagotchi": false,
|
||||
"T-1000": true,
|
||||
"The Tin Woodman": false,
|
||||
"Mic N. The Robot": true,
|
||||
"Robot Or Not Bot": false
|
||||
]
|
||||
|
||||
let bot: SlackKit
|
||||
|
||||
init(token: String) {
|
||||
bot = SlackKit()
|
||||
bot.addRTMBotWithAPIToken(token)
|
||||
bot.addWebAPIAccessWithToken(token)
|
||||
bot.notificationForEvent(.message) { [weak self] (event, connection) in
|
||||
guard
|
||||
let message = event.message,
|
||||
let id = connection?.client?.authenticatedUser?.id,
|
||||
message.text?.contains(id) == true
|
||||
else {
|
||||
return
|
||||
}
|
||||
self?.handleMessage(message)
|
||||
}
|
||||
}
|
||||
|
||||
init(clientID: String, clientSecret: String) {
|
||||
bot = SlackKit()
|
||||
let oauthConfig = OAuthConfig(clientID: clientID, clientSecret: clientSecret)
|
||||
bot.addServer(oauth: oauthConfig)
|
||||
bot.notificationForEvent(.message) { [weak self] (event, connection) in
|
||||
guard
|
||||
let message = event.message,
|
||||
let id = connection?.client?.authenticatedUser?.id,
|
||||
message.text?.contains(id) == true
|
||||
else {
|
||||
return
|
||||
}
|
||||
self?.handleMessage(message)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Bot logic
|
||||
private func handleMessage(_ message: Message) {
|
||||
if let text = message.text?.lowercased(), let channel = message.channel {
|
||||
for (robot, verdict) in verdicts {
|
||||
let lowerbot = robot.lowercased()
|
||||
if text.contains(lowerbot) {
|
||||
let reaction = verdict ? "robot_face" : "no_entry_sign"
|
||||
bot.webAPI?.addReactionToMessage(name: reaction, channel: channel, timestamp: message.ts!, success: nil, failure: nil)
|
||||
return
|
||||
}
|
||||
}
|
||||
// Not found
|
||||
bot.webAPI?.addReactionToMessage(name: "question", channel: channel, timestamp: message.ts!, success: nil, failure: nil)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// With API token
|
||||
let slackbot = RobotOrNotBot(token: "xoxb-SLACK_API_TOKEN")
|
||||
// With OAuth
|
||||
// let slackbot = RobotOrNotBot(clientID: "CLIENT_ID", clientSecret: "CLIENT_SECRET")
|
||||
RunLoop.main.run()
|
||||
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BitcodeSymbolMapsPath</key>
|
||||
<string>BCSymbolMaps</string>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>Starscream.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>watchos-arm64_i386_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>Starscream.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>i386</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>watchos</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>Starscream.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BitcodeSymbolMapsPath</key>
|
||||
<string>BCSymbolMaps</string>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>Starscream.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_i386_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>Starscream.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>i386</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BitcodeSymbolMapsPath</key>
|
||||
<string>BCSymbolMaps</string>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>watchos-arm64_32_armv7k</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>Starscream.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64_32</string>
|
||||
<string>armv7k</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>watchos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>Starscream.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
+2670
File diff suppressed because it is too large
Load Diff
+2820
File diff suppressed because it is too large
Load Diff
+472
@@ -0,0 +1,472 @@
|
||||
#if 0
|
||||
#elif defined(__arm64__) && __arm64__
|
||||
// Generated by Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
#ifndef STARSCREAM_SWIFT_H
|
||||
#define STARSCREAM_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
#else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
#else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
#else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
#endif
|
||||
#if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
#else
|
||||
# define SWIFT_NOESCAPE
|
||||
#endif
|
||||
#if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
#else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
#endif
|
||||
#if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
#if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
# define SWIFT_NORETURN
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
#else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
#endif
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
@class NSStream;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream19FoundationTransport")
|
||||
@interface FoundationTransport : NSObject <NSStreamDelegate>
|
||||
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
|
||||
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
||||
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
||||
@end
|
||||
|
||||
@class NSURLSession;
|
||||
@class NSURLSessionWebSocketTask;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream12NativeEngine") SWIFT_AVAILABILITY(tvos,introduced=13.0) SWIFT_AVAILABILITY(watchos,introduced=6.0) SWIFT_AVAILABILITY(ios,introduced=13.0) SWIFT_AVAILABILITY(macos,introduced=10.15)
|
||||
@interface NativeEngine : NSObject <NSURLSessionDataDelegate, NSURLSessionWebSocketDelegate>
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didOpenWithProtocol:(NSString * _Nullable)protocol;
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(NSData * _Nullable)reason;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#elif defined(__ARM_ARCH_7A__) && __ARM_ARCH_7A__
|
||||
// Generated by Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
#ifndef STARSCREAM_SWIFT_H
|
||||
#define STARSCREAM_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
#else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
#else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
#else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
#endif
|
||||
#if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
#else
|
||||
# define SWIFT_NOESCAPE
|
||||
#endif
|
||||
#if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
#else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
#endif
|
||||
#if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
#if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
# define SWIFT_NORETURN
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
#else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
#endif
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
@class NSStream;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream19FoundationTransport")
|
||||
@interface FoundationTransport : NSObject <NSStreamDelegate>
|
||||
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
|
||||
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
||||
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
||||
@end
|
||||
|
||||
@class NSURLSession;
|
||||
@class NSURLSessionWebSocketTask;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream12NativeEngine") SWIFT_AVAILABILITY(tvos,introduced=13.0) SWIFT_AVAILABILITY(watchos,introduced=6.0) SWIFT_AVAILABILITY(ios,introduced=13.0) SWIFT_AVAILABILITY(macos,introduced=10.15)
|
||||
@interface NativeEngine : NSObject <NSURLSessionDataDelegate, NSURLSessionWebSocketDelegate>
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didOpenWithProtocol:(NSString * _Nullable)protocol;
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(NSData * _Nullable)reason;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Starscream.h
|
||||
// Starscream
|
||||
//
|
||||
// Created by Austin Cherry on 9/25/14.
|
||||
// Copyright (c) 2014 Vluxe. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for Starscream.
|
||||
FOUNDATION_EXPORT double StarscreamVersionNumber;
|
||||
|
||||
//! Project version string for Starscream.
|
||||
FOUNDATION_EXPORT const unsigned char StarscreamVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <Starscream/PublicHeader.h>
|
||||
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target arm64-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target arm64-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
+11
@@ -0,0 +1,11 @@
|
||||
framework module Starscream {
|
||||
umbrella header "Starscream.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
|
||||
module Starscream.Swift {
|
||||
header "Starscream-Swift.h"
|
||||
requires objc
|
||||
}
|
||||
BIN
Binary file not shown.
+20
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.com.vluxe.Starscream</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.0.4</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Binary file not shown.
+707
@@ -0,0 +1,707 @@
|
||||
#if 0
|
||||
#elif defined(__arm64__) && __arm64__
|
||||
// Generated by Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
#ifndef STARSCREAM_SWIFT_H
|
||||
#define STARSCREAM_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
#else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
#else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
#else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
#endif
|
||||
#if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
#else
|
||||
# define SWIFT_NOESCAPE
|
||||
#endif
|
||||
#if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
#else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
#endif
|
||||
#if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
#if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
# define SWIFT_NORETURN
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
#else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
#endif
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
@class NSStream;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream19FoundationTransport")
|
||||
@interface FoundationTransport : NSObject <NSStreamDelegate>
|
||||
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
|
||||
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
||||
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
||||
@end
|
||||
|
||||
@class NSURLSession;
|
||||
@class NSURLSessionWebSocketTask;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream12NativeEngine") SWIFT_AVAILABILITY(tvos,introduced=13.0) SWIFT_AVAILABILITY(watchos,introduced=6.0) SWIFT_AVAILABILITY(ios,introduced=13.0) SWIFT_AVAILABILITY(macos,introduced=10.15)
|
||||
@interface NativeEngine : NSObject <NSURLSessionDataDelegate, NSURLSessionWebSocketDelegate>
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didOpenWithProtocol:(NSString * _Nullable)protocol;
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(NSData * _Nullable)reason;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#elif defined(__x86_64__) && __x86_64__
|
||||
// Generated by Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
#ifndef STARSCREAM_SWIFT_H
|
||||
#define STARSCREAM_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
#else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
#else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
#else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
#endif
|
||||
#if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
#else
|
||||
# define SWIFT_NOESCAPE
|
||||
#endif
|
||||
#if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
#else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
#endif
|
||||
#if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
#if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
# define SWIFT_NORETURN
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
#else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
#endif
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
@class NSStream;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream19FoundationTransport")
|
||||
@interface FoundationTransport : NSObject <NSStreamDelegate>
|
||||
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
|
||||
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
||||
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
||||
@end
|
||||
|
||||
@class NSURLSession;
|
||||
@class NSURLSessionWebSocketTask;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream12NativeEngine") SWIFT_AVAILABILITY(tvos,introduced=13.0) SWIFT_AVAILABILITY(watchos,introduced=6.0) SWIFT_AVAILABILITY(ios,introduced=13.0) SWIFT_AVAILABILITY(macos,introduced=10.15)
|
||||
@interface NativeEngine : NSObject <NSURLSessionDataDelegate, NSURLSessionWebSocketDelegate>
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didOpenWithProtocol:(NSString * _Nullable)protocol;
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(NSData * _Nullable)reason;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#elif defined(__i386__) && __i386__
|
||||
// Generated by Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
#ifndef STARSCREAM_SWIFT_H
|
||||
#define STARSCREAM_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
#else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
#else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
#else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
#endif
|
||||
#if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
#else
|
||||
# define SWIFT_NOESCAPE
|
||||
#endif
|
||||
#if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
#else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
#endif
|
||||
#if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
#if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
# define SWIFT_NORETURN
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
#else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
#endif
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
@class NSStream;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream19FoundationTransport")
|
||||
@interface FoundationTransport : NSObject <NSStreamDelegate>
|
||||
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
|
||||
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
||||
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
||||
@end
|
||||
|
||||
@class NSURLSession;
|
||||
@class NSURLSessionWebSocketTask;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream12NativeEngine") SWIFT_AVAILABILITY(tvos,introduced=13.0) SWIFT_AVAILABILITY(watchos,introduced=6.0) SWIFT_AVAILABILITY(ios,introduced=13.0) SWIFT_AVAILABILITY(macos,introduced=10.15)
|
||||
@interface NativeEngine : NSObject <NSURLSessionDataDelegate, NSURLSessionWebSocketDelegate>
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didOpenWithProtocol:(NSString * _Nullable)protocol;
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(NSData * _Nullable)reason;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Starscream.h
|
||||
// Starscream
|
||||
//
|
||||
// Created by Austin Cherry on 9/25/14.
|
||||
// Copyright (c) 2014 Vluxe. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for Starscream.
|
||||
FOUNDATION_EXPORT double StarscreamVersionNumber;
|
||||
|
||||
//! Project version string for Starscream.
|
||||
FOUNDATION_EXPORT const unsigned char StarscreamVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <Starscream/PublicHeader.h>
|
||||
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target arm64-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target arm64-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target i386-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target i386-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target x86_64-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target x86_64-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
+11
@@ -0,0 +1,11 @@
|
||||
framework module Starscream {
|
||||
umbrella header "Starscream.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
|
||||
module Starscream.Swift {
|
||||
header "Starscream-Swift.h"
|
||||
requires objc
|
||||
}
|
||||
Executable
BIN
Binary file not shown.
+507
@@ -0,0 +1,507 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Headers/Starscream-Swift.h</key>
|
||||
<data>
|
||||
UKOsbhMVmAOEUiIn77lJZq72iTs=
|
||||
</data>
|
||||
<key>Headers/Starscream.h</key>
|
||||
<data>
|
||||
bIF/9oSljUDPWlbHwEoxEPdpaHo=
|
||||
</data>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
F5TVUKxa+9wOa9SEwJVulSppoQg=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key>
|
||||
<data>
|
||||
BvhU5gKmxQEik9SdDqeT682gOGM=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/Project/arm64.swiftsourceinfo</key>
|
||||
<data>
|
||||
BvhU5gKmxQEik9SdDqeT682gOGM=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/Project/i386-apple-ios-simulator.swiftsourceinfo</key>
|
||||
<data>
|
||||
4LX57/xDGa8yW9sb3fTe96m+mfc=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/Project/i386.swiftsourceinfo</key>
|
||||
<data>
|
||||
4LX57/xDGa8yW9sb3fTe96m+mfc=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
|
||||
<data>
|
||||
rZxdLzC+UsIJyk4nWxkYZQ7Kex0=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/Project/x86_64.swiftsourceinfo</key>
|
||||
<data>
|
||||
rZxdLzC+UsIJyk4nWxkYZQ7Kex0=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
||||
<data>
|
||||
yg7ccFWTG2RECtwAn0ZT3E8g28o=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
||||
<data>
|
||||
p1b6MKKTXPjxb3eUqqxQbRD4jZs=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
||||
<data>
|
||||
sWtFS0pMlVB/oNsM/1Y3F1Mua1o=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/arm64.swiftdoc</key>
|
||||
<data>
|
||||
yg7ccFWTG2RECtwAn0ZT3E8g28o=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/arm64.swiftinterface</key>
|
||||
<data>
|
||||
p1b6MKKTXPjxb3eUqqxQbRD4jZs=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/arm64.swiftmodule</key>
|
||||
<data>
|
||||
sWtFS0pMlVB/oNsM/1Y3F1Mua1o=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/i386-apple-ios-simulator.swiftdoc</key>
|
||||
<data>
|
||||
+HjnjK6bFP/cthGRm9KAGG+a5tE=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/i386-apple-ios-simulator.swiftinterface</key>
|
||||
<data>
|
||||
Vyv4/VkiF9KJF/b1vDZIalPpsJA=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/i386-apple-ios-simulator.swiftmodule</key>
|
||||
<data>
|
||||
YxthTo3bZtRyrufLDmckd42RGsw=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/i386.swiftdoc</key>
|
||||
<data>
|
||||
+HjnjK6bFP/cthGRm9KAGG+a5tE=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/i386.swiftinterface</key>
|
||||
<data>
|
||||
Vyv4/VkiF9KJF/b1vDZIalPpsJA=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/i386.swiftmodule</key>
|
||||
<data>
|
||||
YxthTo3bZtRyrufLDmckd42RGsw=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
||||
<data>
|
||||
gmlidh+4mYyRgrsxIMVauPOcCJk=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
||||
<data>
|
||||
SbdP7eTGvE+52uglUZ+IefzGpBc=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
||||
<data>
|
||||
40M2UBgdfdSQweuXsSRw+vVFHPo=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64.swiftdoc</key>
|
||||
<data>
|
||||
gmlidh+4mYyRgrsxIMVauPOcCJk=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64.swiftinterface</key>
|
||||
<data>
|
||||
SbdP7eTGvE+52uglUZ+IefzGpBc=
|
||||
</data>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64.swiftmodule</key>
|
||||
<data>
|
||||
40M2UBgdfdSQweuXsSRw+vVFHPo=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
sr9DR7cNfv/8frVUIbBLPHCc60g=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Headers/Starscream-Swift.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
UKOsbhMVmAOEUiIn77lJZq72iTs=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
MY+PsOCTyvq/OnT9n4YmVwZfVifGfHI0vGySEUVBM3Q=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/Starscream.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
bIF/9oSljUDPWlbHwEoxEPdpaHo=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
uDB1F1BYBSS///5Kx3sW3b25gGjxudlItQDs2UvmKGE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
BvhU5gKmxQEik9SdDqeT682gOGM=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
ioHp8jbtv0cCEs5tkVle85195JLf8gKOJDADz64nm4E=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/Project/arm64.swiftsourceinfo</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
BvhU5gKmxQEik9SdDqeT682gOGM=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
ioHp8jbtv0cCEs5tkVle85195JLf8gKOJDADz64nm4E=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/Project/i386-apple-ios-simulator.swiftsourceinfo</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
4LX57/xDGa8yW9sb3fTe96m+mfc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
SILQ35SFGdKLgR6IEYHRQu/alxRp+fi5xl+Qa9cVVYo=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/Project/i386.swiftsourceinfo</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
4LX57/xDGa8yW9sb3fTe96m+mfc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
SILQ35SFGdKLgR6IEYHRQu/alxRp+fi5xl+Qa9cVVYo=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
rZxdLzC+UsIJyk4nWxkYZQ7Kex0=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
omQAHBAsK03j6tacXDwe8vLwQD9NKHwqO3OnAgxGRPA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/Project/x86_64.swiftsourceinfo</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
rZxdLzC+UsIJyk4nWxkYZQ7Kex0=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
omQAHBAsK03j6tacXDwe8vLwQD9NKHwqO3OnAgxGRPA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
yg7ccFWTG2RECtwAn0ZT3E8g28o=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
yvCahYQDzHCVplyFoan//v8oTp/j5tQXVDu7EHxH5+I=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
p1b6MKKTXPjxb3eUqqxQbRD4jZs=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
X1md/r9jZ/CcL2pWNUxhKPHxFPFdAGIlPvD9DA5I6Rs=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
sWtFS0pMlVB/oNsM/1Y3F1Mua1o=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
bFD/N3vklOKYjbDfOYFyTEr7F459jo3LbYrS4SZxrAM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/arm64.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
yg7ccFWTG2RECtwAn0ZT3E8g28o=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
yvCahYQDzHCVplyFoan//v8oTp/j5tQXVDu7EHxH5+I=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/arm64.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
p1b6MKKTXPjxb3eUqqxQbRD4jZs=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
X1md/r9jZ/CcL2pWNUxhKPHxFPFdAGIlPvD9DA5I6Rs=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/arm64.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
sWtFS0pMlVB/oNsM/1Y3F1Mua1o=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
bFD/N3vklOKYjbDfOYFyTEr7F459jo3LbYrS4SZxrAM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/i386-apple-ios-simulator.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
+HjnjK6bFP/cthGRm9KAGG+a5tE=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
up5XDlgzU1SsyCYDJod6k/BTI9e9U/JX/vnsAk97JWM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/i386-apple-ios-simulator.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
Vyv4/VkiF9KJF/b1vDZIalPpsJA=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
+ud34Zd2eqZ+J0jmKXhVeSlYWuCV2tdWBltKnBiLUj0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/i386-apple-ios-simulator.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
YxthTo3bZtRyrufLDmckd42RGsw=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
oHZPSn+o9tX7V1aPCap+60echzdWMVOhw9kkTXJDLOc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/i386.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
+HjnjK6bFP/cthGRm9KAGG+a5tE=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
up5XDlgzU1SsyCYDJod6k/BTI9e9U/JX/vnsAk97JWM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/i386.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
Vyv4/VkiF9KJF/b1vDZIalPpsJA=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
+ud34Zd2eqZ+J0jmKXhVeSlYWuCV2tdWBltKnBiLUj0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/i386.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
YxthTo3bZtRyrufLDmckd42RGsw=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
oHZPSn+o9tX7V1aPCap+60echzdWMVOhw9kkTXJDLOc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
gmlidh+4mYyRgrsxIMVauPOcCJk=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
RGTXPuxxV1p3aLuTSfTVuBWh5ugBb6Ehz9vypo+LfO8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
SbdP7eTGvE+52uglUZ+IefzGpBc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
vHWpbnWpTMOOAUg0gaqttdhUBcybTe77dM5ouIoyMgc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
40M2UBgdfdSQweuXsSRw+vVFHPo=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
pzAriO6ga7OG1je1b4cmWNI1ChzjfEO4AkELrw5OcEM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
gmlidh+4mYyRgrsxIMVauPOcCJk=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
RGTXPuxxV1p3aLuTSfTVuBWh5ugBb6Ehz9vypo+LfO8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
SbdP7eTGvE+52uglUZ+IefzGpBc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
vHWpbnWpTMOOAUg0gaqttdhUBcybTe77dM5ouIoyMgc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/Starscream.swiftmodule/x86_64.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
40M2UBgdfdSQweuXsSRw+vVFHPo=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
pzAriO6ga7OG1je1b4cmWNI1ChzjfEO4AkELrw5OcEM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
sr9DR7cNfv/8frVUIbBLPHCc60g=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
nYTs/q5E5rMtj3rXmqMuzZYThSlmu615k3gwB/Evs/I=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.com.vluxe.Starscream</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.0.4</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
Versions/Current/Headers
|
||||
+1
@@ -0,0 +1 @@
|
||||
Versions/Current/Modules
|
||||
+1
@@ -0,0 +1 @@
|
||||
Versions/Current/Resources
|
||||
+1
@@ -0,0 +1 @@
|
||||
Versions/Current/Starscream
|
||||
+472
@@ -0,0 +1,472 @@
|
||||
#if 0
|
||||
#elif defined(__arm64__) && __arm64__
|
||||
// Generated by Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
#ifndef STARSCREAM_SWIFT_H
|
||||
#define STARSCREAM_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
#else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
#else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
#else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
#endif
|
||||
#if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
#else
|
||||
# define SWIFT_NOESCAPE
|
||||
#endif
|
||||
#if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
#else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
#endif
|
||||
#if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
#if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
# define SWIFT_NORETURN
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
#else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
#endif
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
@class NSStream;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream19FoundationTransport")
|
||||
@interface FoundationTransport : NSObject <NSStreamDelegate>
|
||||
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
|
||||
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
||||
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
||||
@end
|
||||
|
||||
@class NSURLSession;
|
||||
@class NSURLSessionWebSocketTask;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream12NativeEngine") SWIFT_AVAILABILITY(tvos,introduced=13.0) SWIFT_AVAILABILITY(watchos,introduced=6.0) SWIFT_AVAILABILITY(ios,introduced=13.0) SWIFT_AVAILABILITY(macos,introduced=10.15)
|
||||
@interface NativeEngine : NSObject <NSURLSessionDataDelegate, NSURLSessionWebSocketDelegate>
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didOpenWithProtocol:(NSString * _Nullable)protocol;
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(NSData * _Nullable)reason;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#elif defined(__x86_64__) && __x86_64__
|
||||
// Generated by Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
#ifndef STARSCREAM_SWIFT_H
|
||||
#define STARSCREAM_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
#else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
#else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
#else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
#endif
|
||||
#if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
#else
|
||||
# define SWIFT_NOESCAPE
|
||||
#endif
|
||||
#if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
#else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
#endif
|
||||
#if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
#if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
# define SWIFT_NORETURN
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
#else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
#endif
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
@class NSStream;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream19FoundationTransport")
|
||||
@interface FoundationTransport : NSObject <NSStreamDelegate>
|
||||
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
|
||||
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
||||
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
||||
@end
|
||||
|
||||
@class NSURLSession;
|
||||
@class NSURLSessionWebSocketTask;
|
||||
|
||||
SWIFT_CLASS("_TtC10Starscream12NativeEngine") SWIFT_AVAILABILITY(tvos,introduced=13.0) SWIFT_AVAILABILITY(watchos,introduced=6.0) SWIFT_AVAILABILITY(ios,introduced=13.0) SWIFT_AVAILABILITY(macos,introduced=10.15)
|
||||
@interface NativeEngine : NSObject <NSURLSessionDataDelegate, NSURLSessionWebSocketDelegate>
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didOpenWithProtocol:(NSString * _Nullable)protocol;
|
||||
- (void)URLSession:(NSURLSession * _Nonnull)session webSocketTask:(NSURLSessionWebSocketTask * _Nonnull)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(NSData * _Nullable)reason;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Starscream.h
|
||||
// Starscream
|
||||
//
|
||||
// Created by Austin Cherry on 9/25/14.
|
||||
// Copyright (c) 2014 Vluxe. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for Starscream.
|
||||
FOUNDATION_EXPORT double StarscreamVersionNumber;
|
||||
|
||||
//! Project version string for Starscream.
|
||||
FOUNDATION_EXPORT const unsigned char StarscreamVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <Starscream/PublicHeader.h>
|
||||
|
||||
|
||||
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target arm64-apple-macos10.10 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target arm64-apple-macos10.10 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target x86_64-apple-macos10.10 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+436
@@ -0,0 +1,436 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
|
||||
// swift-module-flags: -target x86_64-apple-macos10.10 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
|
||||
import CommonCrypto
|
||||
import Foundation
|
||||
import Network
|
||||
@_exported import Starscream
|
||||
import Swift
|
||||
import zlib
|
||||
public enum HTTPUpgradeError : Swift.Error {
|
||||
case notAnUpgrade(Swift.Int)
|
||||
case invalidData
|
||||
}
|
||||
public struct HTTPWSHeader {
|
||||
public static func createUpgrade(request: Foundation.URLRequest, supportsCompression: Swift.Bool, secKeyValue: Swift.String) -> Foundation.URLRequest
|
||||
public static func generateWebSocketKey() -> Swift.String
|
||||
}
|
||||
public enum HTTPEvent {
|
||||
case success([Swift.String : Swift.String])
|
||||
case failure(Swift.Error)
|
||||
}
|
||||
public protocol HTTPHandlerDelegate : AnyObject {
|
||||
func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPHandler {
|
||||
func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
func parse(data: Foundation.Data) -> Swift.Int
|
||||
}
|
||||
public protocol HTTPServerDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.HTTPEvent)
|
||||
}
|
||||
public protocol HTTPServerHandler {
|
||||
func register(delegate: Starscream.HTTPServerDelegate)
|
||||
func parse(data: Foundation.Data)
|
||||
func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
}
|
||||
public struct URLParts {
|
||||
}
|
||||
extension URL {
|
||||
public var isTLSScheme: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func getParts() -> Starscream.URLParts?
|
||||
}
|
||||
public protocol FrameCollectorDelegate : AnyObject {
|
||||
func didForm(event: Starscream.FrameCollector.Event)
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
}
|
||||
@_hasMissingDesignatedInitializers public class FrameCollector {
|
||||
public enum Event {
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
case closed(Swift.String, Swift.UInt16)
|
||||
}
|
||||
public func add(frame: Starscream.Frame)
|
||||
@objc deinit
|
||||
}
|
||||
public enum SecurityErrorCode : Swift.UInt16 {
|
||||
case acceptFailed
|
||||
case pinningFailed
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public enum PinningState {
|
||||
case success
|
||||
case failed(CoreFoundation.CFError?)
|
||||
}
|
||||
public protocol CertificatePinning : AnyObject {
|
||||
func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
public protocol HeaderValidator : AnyObject {
|
||||
func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum TCPTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.TCPTransportError, b: Starscream.TCPTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class TCPTransport : Starscream.Transport {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(connection: Network.NWConnection)
|
||||
public init()
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc deinit
|
||||
}
|
||||
public enum FoundationSecurityError : Swift.Error {
|
||||
case invalidRequest
|
||||
public static func == (a: Starscream.FoundationSecurityError, b: Starscream.FoundationSecurityError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public class FoundationSecurity {
|
||||
public init(allowSelfSigned: Swift.Bool = false)
|
||||
@objc deinit
|
||||
}
|
||||
extension FoundationSecurity : Starscream.CertificatePinning {
|
||||
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: ((Starscream.PinningState) -> ()))
|
||||
}
|
||||
extension FoundationSecurity : Starscream.HeaderValidator {
|
||||
public func validate(headers: [Swift.String : Swift.String], key: Swift.String) -> Swift.Error?
|
||||
}
|
||||
public enum FoundationTransportError : Swift.Error {
|
||||
case invalidRequest
|
||||
case invalidOutputStream
|
||||
case timeout
|
||||
public static func == (a: Starscream.FoundationTransportError, b: Starscream.FoundationTransportError) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
@objc public class FoundationTransport : ObjectiveC.NSObject, Starscream.Transport, Foundation.StreamDelegate {
|
||||
public var usingTLS: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public init(streamConfiguration: ((Foundation.InputStream, Foundation.OutputStream) -> Swift.Void)? = nil)
|
||||
@objc deinit
|
||||
public func connect(url: Foundation.URL, timeout: Swift.Double = 10, certificatePinning: Starscream.CertificatePinning? = nil)
|
||||
public func disconnect()
|
||||
public func register(delegate: Starscream.TransportEventClient)
|
||||
public func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
|
||||
@objc override dynamic public init()
|
||||
}
|
||||
public enum ErrorType : Swift.Error {
|
||||
case compressionError
|
||||
case securityError
|
||||
case protocolError
|
||||
case serverError
|
||||
public static func == (a: Starscream.ErrorType, b: Starscream.ErrorType) -> Swift.Bool
|
||||
public var hashValue: Swift.Int {
|
||||
get
|
||||
}
|
||||
public func hash(into hasher: inout Swift.Hasher)
|
||||
}
|
||||
public struct WSError : Swift.Error {
|
||||
public let type: Starscream.ErrorType
|
||||
public let message: Swift.String
|
||||
public let code: Swift.UInt16
|
||||
public init(type: Starscream.ErrorType, message: Swift.String, code: Swift.UInt16)
|
||||
}
|
||||
public protocol WebSocketClient : AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: Swift.UInt16)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
}
|
||||
extension WebSocketClient {
|
||||
public func write(string: Swift.String)
|
||||
public func write(data: Foundation.Data)
|
||||
public func write(ping: Foundation.Data)
|
||||
public func write(pong: Foundation.Data)
|
||||
public func disconnect()
|
||||
}
|
||||
public enum WebSocketEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error?)
|
||||
case viabilityChanged(Swift.Bool)
|
||||
case reconnectSuggested(Swift.Bool)
|
||||
case cancelled
|
||||
}
|
||||
public protocol WebSocketDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket)
|
||||
}
|
||||
open class WebSocket : Starscream.WebSocketClient, Starscream.EngineDelegate {
|
||||
weak public var delegate: Starscream.WebSocketDelegate?
|
||||
public var onEvent: ((Starscream.WebSocketEvent) -> Swift.Void)?
|
||||
public var request: Foundation.URLRequest
|
||||
public var callbackQueue: Dispatch.DispatchQueue
|
||||
public var respondToPingWithPong: Swift.Bool {
|
||||
get
|
||||
set
|
||||
}
|
||||
public init(request: Foundation.URLRequest, engine: Starscream.Engine)
|
||||
convenience public init(request: Foundation.URLRequest, certPinner: Starscream.CertificatePinning? = FoundationSecurity(), compressionHandler: Starscream.CompressionHandler? = nil, useCustomEngine: Swift.Bool = true)
|
||||
public func connect()
|
||||
public func disconnect(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceDisconnect()
|
||||
public func write(data: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(stringData: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(ping: Foundation.Data, completion: (() -> ())?)
|
||||
public func write(pong: Foundation.Data, completion: (() -> ())?)
|
||||
public func didReceive(event: Starscream.WebSocketEvent)
|
||||
@objc deinit
|
||||
}
|
||||
public class StringHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
public protocol EngineDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.WebSocketEvent)
|
||||
}
|
||||
public protocol Engine {
|
||||
func register(delegate: Starscream.EngineDelegate)
|
||||
func start(request: Foundation.URLRequest)
|
||||
func stop(closeCode: Swift.UInt16)
|
||||
func forceStop()
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
func write(string: Swift.String, completion: (() -> ())?)
|
||||
}
|
||||
public enum CloseCode : Swift.UInt16 {
|
||||
case normal
|
||||
case goingAway
|
||||
case protocolError
|
||||
case protocolUnhandledType
|
||||
case noStatusReceived
|
||||
case encoding
|
||||
case policyViolated
|
||||
case messageTooBig
|
||||
public typealias RawValue = Swift.UInt16
|
||||
public var rawValue: Swift.UInt16 {
|
||||
get
|
||||
}
|
||||
public init?(rawValue: Swift.UInt16)
|
||||
}
|
||||
public enum FrameOpCode : Swift.UInt8 {
|
||||
case continueFrame
|
||||
case textFrame
|
||||
case binaryFrame
|
||||
case connectionClose
|
||||
case ping
|
||||
case pong
|
||||
case unknown
|
||||
public typealias RawValue = Swift.UInt8
|
||||
public init?(rawValue: Swift.UInt8)
|
||||
public var rawValue: Swift.UInt8 {
|
||||
get
|
||||
}
|
||||
}
|
||||
public struct Frame {
|
||||
}
|
||||
public enum FrameEvent {
|
||||
case frame(Starscream.Frame)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol FramerEventClient : AnyObject {
|
||||
func frameProcessed(event: Starscream.FrameEvent)
|
||||
}
|
||||
public protocol Framer {
|
||||
func add(data: Foundation.Data)
|
||||
func register(delegate: Starscream.FramerEventClient)
|
||||
func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
func updateCompression(supports: Swift.Bool)
|
||||
func supportsCompression() -> Swift.Bool
|
||||
}
|
||||
public class WSFramer : Starscream.Framer {
|
||||
public var compressionEnabled: Swift.Bool
|
||||
public init(isServer: Swift.Bool = false)
|
||||
public func updateCompression(supports: Swift.Bool)
|
||||
public func supportsCompression() -> Swift.Bool
|
||||
public func add(data: Foundation.Data)
|
||||
public func register(delegate: Starscream.FramerEventClient)
|
||||
public func createWriteFrame(opcode: Starscream.FrameOpCode, payload: Foundation.Data, isCompressed: Swift.Bool) -> Foundation.Data
|
||||
@objc deinit
|
||||
}
|
||||
public protocol MyWSArrayType {
|
||||
}
|
||||
extension UInt8 : Starscream.MyWSArrayType {
|
||||
}
|
||||
extension Array where Element : Starscream.MyWSArrayType, Element : Swift.UnsignedInteger {
|
||||
public func readUint16(offset: Swift.Int) -> Swift.UInt16
|
||||
public func readUint64(offset: Swift.Int) -> Swift.UInt64
|
||||
public func unmaskData(maskStart: Swift.Int, offset: Swift.Int, length: Swift.Int) -> Foundation.Data
|
||||
}
|
||||
public func writeUint16(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt16)
|
||||
public func writeUint32(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt32)
|
||||
public func writeUint64(_ buffer: inout [Swift.UInt8], offset: Swift.Int, value: Swift.UInt64)
|
||||
@_hasMissingDesignatedInitializers public class FoundationHTTPServerHandler : Starscream.HTTPServerHandler {
|
||||
public func register(delegate: Starscream.HTTPServerDelegate)
|
||||
public func createResponse(headers: [Swift.String : Swift.String]) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data)
|
||||
@objc deinit
|
||||
}
|
||||
public class WSEngine : Starscream.Engine, Starscream.TransportEventClient, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.HTTPHandlerDelegate {
|
||||
public var respondToPingWithPong: Swift.Bool
|
||||
public init(transport: Starscream.Transport, certPinner: Starscream.CertificatePinning? = nil, headerValidator: Starscream.HeaderValidator = FoundationSecurity(), httpHandler: Starscream.HTTPHandler = FoundationHTTPHandler(), framer: Starscream.Framer = WSFramer(), compressionHandler: Starscream.CompressionHandler? = nil)
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceiveHTTP(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionState {
|
||||
case connected
|
||||
case waiting
|
||||
case cancelled
|
||||
case failed(Swift.Error?)
|
||||
case viability(Swift.Bool)
|
||||
case shouldReconnect(Swift.Bool)
|
||||
case receive(Foundation.Data)
|
||||
}
|
||||
public protocol TransportEventClient : AnyObject {
|
||||
func connectionChanged(state: Starscream.ConnectionState)
|
||||
}
|
||||
public protocol Transport : AnyObject {
|
||||
func register(delegate: Starscream.TransportEventClient)
|
||||
func connect(url: Foundation.URL, timeout: Swift.Double, certificatePinning: Starscream.CertificatePinning?)
|
||||
func disconnect()
|
||||
func write(data: Foundation.Data, completion: @escaping ((Swift.Error?) -> ()))
|
||||
var usingTLS: Swift.Bool { get }
|
||||
}
|
||||
extension Data {
|
||||
}
|
||||
public class FoundationHTTPHandler : Starscream.HTTPHandler {
|
||||
public init()
|
||||
public func convert(request: Foundation.URLRequest) -> Foundation.Data
|
||||
public func parse(data: Foundation.Data) -> Swift.Int
|
||||
public func register(delegate: Starscream.HTTPHandlerDelegate)
|
||||
@objc deinit
|
||||
}
|
||||
@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
public class WebSocketServer : Starscream.Server, Starscream.ConnectionDelegate {
|
||||
public var onEvent: ((Starscream.ServerEvent) -> Swift.Void)?
|
||||
public init()
|
||||
public func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
public func didReceive(event: Starscream.ServerEvent)
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers @available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
|
||||
public class ServerConnection : Starscream.Connection, Starscream.HTTPServerDelegate, Starscream.FramerEventClient, Starscream.FrameCollectorDelegate, Starscream.TransportEventClient {
|
||||
public var onEvent: ((Starscream.ConnectionEvent) -> Swift.Void)?
|
||||
weak public var delegate: Starscream.ConnectionDelegate?
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
public func connectionChanged(state: Starscream.ConnectionState)
|
||||
public func didReceive(event: Starscream.HTTPEvent)
|
||||
public func frameProcessed(event: Starscream.FrameEvent)
|
||||
public func didForm(event: Starscream.FrameCollector.Event)
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
public enum ConnectionEvent {
|
||||
case connected([Swift.String : Swift.String])
|
||||
case disconnected(Swift.String, Swift.UInt16)
|
||||
case text(Swift.String)
|
||||
case binary(Foundation.Data)
|
||||
case pong(Foundation.Data?)
|
||||
case ping(Foundation.Data?)
|
||||
case error(Swift.Error)
|
||||
}
|
||||
public protocol Connection {
|
||||
func write(data: Foundation.Data, opcode: Starscream.FrameOpCode)
|
||||
}
|
||||
public protocol ConnectionDelegate : AnyObject {
|
||||
func didReceive(event: Starscream.ServerEvent)
|
||||
}
|
||||
public enum ServerEvent {
|
||||
case connected(Starscream.Connection, [Swift.String : Swift.String])
|
||||
case disconnected(Starscream.Connection, Swift.String, Swift.UInt16)
|
||||
case text(Starscream.Connection, Swift.String)
|
||||
case binary(Starscream.Connection, Foundation.Data)
|
||||
case pong(Starscream.Connection, Foundation.Data?)
|
||||
case ping(Starscream.Connection, Foundation.Data?)
|
||||
}
|
||||
public protocol Server {
|
||||
func start(address: Swift.String, port: Swift.UInt16) -> Swift.Error?
|
||||
}
|
||||
public protocol CompressionHandler {
|
||||
func load(headers: [Swift.String : Swift.String])
|
||||
func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
}
|
||||
public class WSCompression : Starscream.CompressionHandler {
|
||||
public init()
|
||||
public func load(headers: [Swift.String : Swift.String])
|
||||
public func decompress(data: Foundation.Data, isFinal: Swift.Bool) -> Foundation.Data?
|
||||
public func compress(data: Foundation.Data) -> Foundation.Data?
|
||||
@objc deinit
|
||||
}
|
||||
@objc @_inheritsConvenienceInitializers @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public class NativeEngine : ObjectiveC.NSObject, Starscream.Engine, Foundation.URLSessionDataDelegate, Foundation.URLSessionWebSocketDelegate {
|
||||
public func register(delegate: Starscream.EngineDelegate)
|
||||
public func start(request: Foundation.URLRequest)
|
||||
public func stop(closeCode: Swift.UInt16)
|
||||
public func forceStop()
|
||||
public func write(string: Swift.String, completion: (() -> ())?)
|
||||
public func write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: (() -> ())?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didOpenWithProtocol protocol: Swift.String?)
|
||||
@objc public func urlSession(_ session: Foundation.URLSession, webSocketTask: Foundation.URLSessionWebSocketTask, didCloseWith closeCode: Foundation.URLSessionWebSocketTask.CloseCode, reason: Foundation.Data?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
extension Starscream.SecurityErrorCode : Swift.Equatable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.Hashable {}
|
||||
extension Starscream.SecurityErrorCode : Swift.RawRepresentable {}
|
||||
extension Starscream.TCPTransportError : Swift.Equatable {}
|
||||
extension Starscream.TCPTransportError : Swift.Hashable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Equatable {}
|
||||
extension Starscream.FoundationSecurityError : Swift.Hashable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Equatable {}
|
||||
extension Starscream.FoundationTransportError : Swift.Hashable {}
|
||||
extension Starscream.ErrorType : Swift.Equatable {}
|
||||
extension Starscream.ErrorType : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.Equatable {}
|
||||
extension Starscream.CloseCode : Swift.Hashable {}
|
||||
extension Starscream.CloseCode : Swift.RawRepresentable {}
|
||||
extension Starscream.FrameOpCode : Swift.Equatable {}
|
||||
extension Starscream.FrameOpCode : Swift.Hashable {}
|
||||
extension Starscream.FrameOpCode : Swift.RawRepresentable {}
|
||||
BIN
Binary file not shown.
+11
@@ -0,0 +1,11 @@
|
||||
framework module Starscream {
|
||||
umbrella header "Starscream.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
|
||||
module Starscream.Swift {
|
||||
header "Starscream-Swift.h"
|
||||
requires objc
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>20D74</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Starscream</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.vluxe.Starscream</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Starscream</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.0.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>12D4e</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>11.1</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>20C63</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx11.1</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1240</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>12D4e</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.10</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Executable
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user