Compare commits

...

76 Commits

Author SHA1 Message Date
Peter Zignego 3089435da0 Rebuild with Xcode 11.3, module stability (#176)
* Framework dependencies BUILD_LIBRARY_FOR_DISTRIBUTION = YES

* Set BUILD_LIBRARY_FOR_DISTRIBUTION
2019-12-20 00:07:55 -05:00
noppefoxwolf b8c3c4a2af Support search request (#173) 2019-11-21 23:56:58 -05:00
Peter Zignego b48e47bc8b Update simulator destination (#174) 2019-11-21 23:55:04 -05:00
noppefoxwolf ab9e802770 Add convesations replies (#169)
* Add convesation replies
2019-10-23 21:19:27 -04:00
Peter Zignego 98dbad9ac7 5.1.1 (#170) 2019-10-14 21:59:53 -04:00
Peter Zignego 436014cfec Update for Swift 5.1 and Xcode 11 (#168)
* Rebuild dependencies with 5.1

* Import FoundationNetworking if found
2019-10-09 21:55:56 -04:00
Peter Zignego d50d74b78a Merge pull request #166 from RomanPodymov/master
Codable vol.2 - CustomProfileField, DoNotDisturbStatus, TeamIcon and Topic
2019-08-14 21:36:10 -04:00
Roman Podymov 80ce1c4731 missing tests 2019-07-31 23:46:05 +02:00
Roman Podymov 5ddf6d9f1a json for tests 2019-07-31 23:21:49 +02:00
Peter Zignego 267cf26b2e Merge pull request #165 from vasilenkoigor/UsersLookupByEmail-Endpoint
Added missed users.lookupByEmail endpoint
2019-07-25 21:20:42 -04:00
Roman Podymov 580a857f11 CustomProfileField, DoNotDisturbStatus, TeamIcon, Topic conform to Codable 2019-07-25 22:33:14 +02:00
i.v.vasilenko c3817bea15 Added missed parameter for users.lookupByEmail endpoint 2019-07-21 21:53:30 +03:00
i.v.vasilenko 492f51ce9b Added missed endpoint users.lookupByEmail 2019-07-21 21:33:38 +03:00
Roman Podymov 45b4e3f191 Merge pull request #1 from pvzig/master
Update master
2019-07-21 16:34:21 +02:00
Peter Zignego dd72c619d3 Merge pull request #164 from RobotsAndPencils/add_block_support
Adding Blocks support
2019-07-17 09:50:25 -04:00
Peter Zignego 43af10de88 Merge branch 'master' into add_block_support 2019-07-17 09:43:55 -04:00
Brad Brown 7ba97e4893 Adding Blocks support 2019-07-16 09:26:14 -05:00
Peter Zignego 0c24cb2262 Merge pull request #163 from RomanPodymov/master
Action, AttachmentField, Edited and Reply conform to Codable
2019-07-12 10:30:23 -04:00
Roman Podymov 7b76b76b94 Update XCTestManifests.swift 2019-06-26 00:33:52 +02:00
Roman Podymov 565c44677b Update XCTestManifests.swift 2019-06-26 00:33:38 +02:00
Roman Podymov 30dc3679c1 Fixed tests 2019-06-26 00:26:19 +02:00
Roman Podymov 9a18cae265 removed \n 2019-06-23 22:39:44 +02:00
Roman Podymov c04654a87b tests for Action 2019-06-23 22:38:45 +02:00
Roman Podymov bd7f67b3b0 attachmentfield tests 2019-06-22 17:03:01 +02:00
Roman Podymov 833add707f removed \n 2019-06-22 16:49:28 +02:00
Roman Podymov 9118a7688a tests for Reply (added missing files) 2019-06-22 16:46:36 +02:00
Roman Podymov cba1eb36a2 Tests for Reply 2019-06-22 16:45:11 +02:00
Roman Podymov d15139d00d Update Reply.swift 2019-06-22 14:53:35 +02:00
Roman Podymov c1cf9b47d8 Update AttachmentField.swift 2019-06-22 14:49:43 +02:00
Roman Podymov 986367be38 Update Action.swift 2019-06-22 14:48:08 +02:00
Peter Zignego 7d207136b3 Merge pull request #162 from pvzig/ci-update
Update to Azure Pipelines to macOS 10.14 and Xcode 10.2
2019-04-11 20:40:16 -04:00
Peter Zignego 0fa3b72a56 Workspace path 2019-04-11 20:36:18 -04:00
Peter Zignego 67d2bb3f62 xcodeVersion 2019-04-11 20:08:26 -04:00
Peter Zignego f2c333f57d Update to macOS 10.14 and Xcode 10.2 2019-04-11 20:01:40 -04:00
Peter Zignego eccda7a525 Merge pull request #161 from victorgama/fix/typo
Fix typo SKRMTAPI -> SKRTMAPI
2019-04-06 20:58:16 -04:00
Victor Gama ac0d9977b5 Fix typo SKRMTAPI -> SKRTMAPI 2019-04-06 20:29:34 -03:00
Peter Zignego 6c1612f2bb Merge pull request #160 from pvzig/examples
Support CocoaPods and Carthage for examples
2019-04-06 13:52:38 -04:00
Peter Zignego ead9bb9c41 Support CocoaPods and Carthage for examples 2019-04-06 13:46:27 -04:00
Peter Zignego cc20c54967 Update README.md 2019-04-05 11:29:39 -04:00
Peter Zignego d5c2dd48f7 Update README.md 2019-04-05 11:29:21 -04:00
Peter Zignego f4336f1dde Update README.md 2019-04-05 11:29:06 -04:00
Peter Zignego 7ab91d9440 Update README.md 2019-04-05 11:28:30 -04:00
Peter Zignego 7e7a168806 Update README.md 2019-04-05 11:27:59 -04:00
Peter Zignego 9651351ec9 Update README.md 2019-04-05 11:25:58 -04:00
Peter Zignego c658616e0f Merge pull request #159 from pvzig/swift5
Swift 5
2019-04-04 21:44:49 -04:00
Peter Zignego c8a40de44f Fix package 2019-03-28 00:21:30 -04:00
Peter Zignego b212d1631a Pacakge tools 4.2 2019-03-28 00:16:50 -04:00
Peter Zignego 8adf701444 Update linux build steps to Swift 5 2019-03-28 00:05:30 -04:00
Peter Zignego b2f69d4b65 Swift 5 2019-03-27 23:57:06 -04:00
Peter Zignego 906d451200 Merge pull request #157 from tandinhle/master
Add missing endpoint of Channels API
2019-03-21 10:06:41 -04:00
Tan Le 80d2cab81c Add missing endpoint of Channels API
Add enpoints: join, leave, archive, unarchive, rename, kick
2019-03-19 10:57:38 -05:00
Peter Zignego c8bc22cbb9 Merge pull request #155 from allenhumphreys/ah/issue-151-support-threaded-ephemeral
Support sending ephemeral messages in threads
2019-03-09 19:50:57 -05:00
Peter Zignego e9ca0365c7 Merge pull request #154 from allenhumphreys/ah/change-thread-count
Change the number of threads to 1 for VaporEngineRTM
2019-03-09 19:50:15 -05:00
Allen Humphreys 52b0a7fd4e Support sending ephemeral messages in threads 2019-03-09 18:06:00 -06:00
Allen Humphreys 3651fc921b Change the number of threads to 1 2019-03-08 09:44:54 -06:00
Peter Zignego ef3425e38e Merge pull request #153 from rectalogic/edited
Edited is in nestedMessage for message_changed subtype.
2019-03-07 16:06:09 -05:00
Andrew Wason 533e961c85 Edited is in nestedMessage for message_changed subtype.
https://api.slack.com/events/message/message_changed
2019-03-07 15:18:20 -05:00
Peter Zignego c2f7632be4 Merge pull request #150 from pvzig/member-leave-join-events
Add support for member_joined_channel and member_left_channel events
2019-03-05 23:21:09 -05:00
Peter Zignego 245d709125 Guess not 2019-03-05 23:17:24 -05:00
Peter Zignego 1ad14f016a Remove old files 2019-03-05 23:11:37 -05:00
Peter Zignego 03561eab36 Generate test files on CI 2019-03-05 23:11:25 -05:00
Peter Zignego f2c98f9d86 Add support for member_left_channel and member_joined_channel events 2019-03-05 23:10:59 -05:00
Peter Zignego bde39be109 Readme 2019-03-05 21:17:44 -05:00
Peter Zignego 5d7ac480b2 More readme changes 2019-03-05 21:05:56 -05:00
Peter Zignego 3579579c80 Readme updates 2019-03-05 20:47:43 -05:00
Peter Zignego 47865cbcee Merge pull request #149 from henry2423/master
Fix MessageActionRequest Issue
2019-02-28 18:32:36 -05:00
Henry Huang 054f8f2d87 [FIX] ActionRequest JSON decoder 2019-02-28 16:59:10 -06:00
Henry d7a02da74b Merge pull request #1 from pvzig/master
Merge
2019-02-28 16:56:35 -06:00
Peter Zignego 1846597f04 Update README.md 2019-02-25 09:32:00 -05:00
Peter Zignego f94b3b247b Merge pull request #147 from pvzig/tests
Add testing
2019-02-24 20:07:50 -05:00
Peter Zignego a96c17a3ad Fix tests 2019-02-24 20:00:06 -05:00
Peter Zignego 6276a09ced Fix CI tests 2019-02-24 19:50:03 -05:00
Peter Zignego ca92016ab9 Fix job names 2019-02-24 19:14:59 -05:00
Peter Zignego 21bca0e0e8 Fix illegal character 2019-02-24 18:57:58 -05:00
Peter Zignego dd02e9aecc Testing setup 2019-02-24 18:52:08 -05:00
Peter Zignego 77cc351bd6 Exclude VaporEngineRTM from CocoaPod 2019-02-20 11:41:50 -05:00
207 changed files with 18556 additions and 700 deletions
+1 -1
View File
@@ -1 +1 @@
4.2
5.1
+2 -2
View File
@@ -1,2 +1,2 @@
github "daltoniam/Starscream" == 3.0.6
github "httpswift/swifter" == 1.4.5
github "daltoniam/Starscream" == 3.1.0
github "httpswift/swifter" == 1.4.6
+1
View File
@@ -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 */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Leaderboard.xcodeproj">
</FileRef>
</Workspace>
@@ -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>
@@ -0,0 +1,28 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 Peter Zignego. All rights reserved.</string>
</dict>
</plist>
@@ -1,7 +1,7 @@
//
// Leaderboard.swift
//
// Copyright © 2017 Peter Zignego. All rights reserved.
// 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
@@ -100,7 +100,7 @@ class Leaderbot {
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 = text.substring(with: text.range(from: match.range(at: 1))!)
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:
+3 -3
View File
@@ -8,11 +8,11 @@ let package = Package(
.executable(name: "Leaderboard", targets: ["Leaderboard"]),
],
dependencies: [
.package(url: "https://github.com/SlackKit/SlackKit", .upToNextMajor(from: "4.0.0"))
.package(url: "https://github.com/pvzig/SlackKit", .upToNextMinor(from: "4.3.0"))
],
targets: [
.target(name: "Leaderboard",
dependencies: ["SlackKit"],
path: "Sources")
dependencies: ["SlackKit"],
path: "Leaderboard/Sources")
]
)
+6
View File
@@ -0,0 +1,6 @@
platform :osx, '10.11'
target 'Leaderboard' do
use_frameworks!
pod 'SlackKit', '>= 4.3.0'
end
+1
View File
@@ -0,0 +1 @@
github "pvzig/SlackKit"
+2 -2
View File
@@ -8,11 +8,11 @@ let package = Package(
.executable(name: "Robot or Not Bot", targets: ["Robot or Not Bot"]),
],
dependencies: [
.package(url: "https://github.com/SlackKit/SlackKit", .upToNextMajor(from: "4.0.0"))
.package(url: "https://github.com/pvzig/SlackKit", .upToNextMinor(from: "4.3.0"))
],
targets: [
.target(name: "Robot or Not Bot",
dependencies: ["SlackKit"],
path: "Sources")
path: "Robot or Not Bot/Sources")
]
)
+7
View File
@@ -0,0 +1,7 @@
platform :osx, '10.11'
target 'Robot Or Not Bot' do
use_frameworks!
pod 'SlackKit', '>= 4.3.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 */;
}
@@ -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>
@@ -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>
@@ -0,0 +1,28 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 Peter Zignego. All rights reserved.</string>
</dict>
</plist>
@@ -1,4 +1,10 @@
// Generated by Apple Swift version 4.2.1 effective-4.1.50 (swiftlang-1000.11.42 clang-1000.11.45.1)
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
#if 0
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -20,7 +26,7 @@
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <objc/NSObject.h>
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
@@ -110,6 +116,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# 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
@@ -151,6 +166,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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
@@ -162,7 +180,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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
@@ -195,10 +219,690 @@ SWIFT_CLASS("_TtC10Starscream16FoundationStream")
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#elif defined(__i386__) && __i386__
// Generated by Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#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(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("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#else
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#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(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("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#elif defined(__ARM_ARCH_7A__) && __ARM_ARCH_7A__
// Generated by Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#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(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("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#endif
Binary file not shown.
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target armv7-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
import CommonCrypto
import CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target arm64-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
import CommonCrypto
import CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target arm64-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
import CommonCrypto
import CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target armv7-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
import CommonCrypto
import CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target armv7-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
import CommonCrypto
import CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target i386-apple-ios8.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
import CommonCrypto
import CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target i386-apple-ios8.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
import CommonCrypto
import CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target x86_64-apple-ios8.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
import CommonCrypto
import CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target x86_64-apple-ios8.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Starscream
import CommonCrypto
import CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
Binary file not shown.
@@ -1,4 +1,10 @@
// Generated by Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
#if 0
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -20,7 +26,7 @@
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <objc/NSObject.h>
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
@@ -110,6 +116,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# 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
@@ -151,6 +166,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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
@@ -162,7 +180,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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;
#endif
@@ -189,3 +213,644 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#elif defined(__i386__) && __i386__
// Generated by Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#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(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;
#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="Swifter",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#else
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#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(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;
#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="Swifter",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#elif defined(__ARM_ARCH_7A__) && __ARM_ARCH_7A__
// Generated by Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#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(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;
#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="Swifter",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#endif
Binary file not shown.
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target armv7-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target arm64-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target arm64-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target armv7-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target armv7-apple-ios8.0 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target i386-apple-ios8.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target i386-apple-ios8.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target x86_64-apple-ios8.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target x86_64-apple-ios8.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
Binary file not shown.
@@ -1,4 +1,4 @@
// Generated by Apple Swift version 4.2.1 effective-4.1.50 (swiftlang-1000.11.42 clang-1000.11.45.1)
// Generated by Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -20,7 +20,7 @@
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <objc/NSObject.h>
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
@@ -110,6 +110,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# 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
@@ -151,6 +160,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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
@@ -162,7 +174,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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
@@ -195,7 +213,7 @@ SWIFT_CLASS("_TtC10Starscream16FoundationStream")
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// 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 CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -0,0 +1,219 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// 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 CoreFoundation
import Foundation
import Security
@_exported import Starscream
import Swift
import zlib
public let WebsocketDidConnectNotification: Swift.String
public let WebsocketDidDisconnectNotification: Swift.String
public let WebsocketDisconnectionErrorKeyName: Swift.String
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 init?(rawValue: Swift.UInt16)
public var rawValue: Swift.UInt16 {
get
}
}
public enum ErrorType : Swift.Error {
case outputStreamWriteError
case compressionError
case invalidSSLError
case writeTimeoutError
case protocolError
case upgradeError
case closeError
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.Int
}
public protocol WebSocketClient : AnyObject {
var delegate: Starscream.WebSocketDelegate? { get set }
var pongDelegate: Starscream.WebSocketPongDelegate? { get set }
var disableSSLCertValidation: Swift.Bool { get set }
var overrideTrustHostname: Swift.Bool { get set }
var desiredTrustHostname: Swift.String? { get set }
var sslClientCertificate: Starscream.SSLClientCertificate? { get set }
var security: Starscream.SSLTrustValidator? { get set }
var enabledSSLCipherSuites: [Security.SSLCipherSuite]? { get set }
var isConnected: Swift.Bool { get }
func connect()
func disconnect(forceTimeout: Foundation.TimeInterval?, closeCode: Swift.UInt16)
func write(string: Swift.String, 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 struct SSLSettings {
public let useSSL: Swift.Bool
public let disableCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public let sslClientCertificate: Starscream.SSLClientCertificate?
public let cipherSuites: [Security.SSLCipherSuite]?
}
public protocol WSStreamDelegate : AnyObject {
func newBytesInStream()
func streamDidError(error: Swift.Error?)
}
public protocol WSStream {
var delegate: Starscream.WSStreamDelegate? { get set }
func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
func write(data: Foundation.Data) -> Swift.Int
func read() -> Foundation.Data?
func cleanup()
func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
}
@objc open class FoundationStream : ObjectiveC.NSObject, Starscream.WSStream, Foundation.StreamDelegate {
weak public var delegate: Starscream.WSStreamDelegate?
public var enableSOCKSProxy: Swift.Bool
public func connect(url: Foundation.URL, port: Swift.Int, timeout: Foundation.TimeInterval, ssl: Starscream.SSLSettings, completion: @escaping ((Swift.Error?) -> Swift.Void))
public func write(data: Foundation.Data) -> Swift.Int
public func read() -> Foundation.Data?
public func cleanup()
public func sslTrust() -> (trust: Security.SecTrust?, domain: Swift.String?)
@objc open func stream(_ aStream: Foundation.Stream, handle eventCode: Foundation.Stream.Event)
@objc override dynamic public init()
@objc deinit
}
public protocol WebSocketDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocketClient)
func websocketDidDisconnect(socket: Starscream.WebSocketClient, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocketClient, text: Swift.String)
func websocketDidReceiveData(socket: Starscream.WebSocketClient, data: Foundation.Data)
}
public protocol WebSocketPongDelegate : AnyObject {
func websocketDidReceivePong(socket: Starscream.WebSocketClient, data: Foundation.Data?)
}
public protocol WebSocketAdvancedDelegate : AnyObject {
func websocketDidConnect(socket: Starscream.WebSocket)
func websocketDidDisconnect(socket: Starscream.WebSocket, error: Swift.Error?)
func websocketDidReceiveMessage(socket: Starscream.WebSocket, text: Swift.String, response: Starscream.WebSocket.WSResponse)
func websocketDidReceiveData(socket: Starscream.WebSocket, data: Foundation.Data, response: Starscream.WebSocket.WSResponse)
func websocketHttpUpgrade(socket: Starscream.WebSocket, request: Swift.String)
func websocketHttpUpgrade(socket: Starscream.WebSocket, response: Swift.String)
}
@objc open class WebSocket : ObjectiveC.NSObject, Foundation.StreamDelegate, Starscream.WebSocketClient, Starscream.WSStreamDelegate {
public enum OpCode : Swift.UInt8 {
case continueFrame
case textFrame
case binaryFrame
case connectionClose
case ping
case pong
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public static let ErrorDomain: Swift.String
public var callbackQueue: Dispatch.DispatchQueue
public class WSResponse {
public var code: Starscream.WebSocket.OpCode
public var frameCount: Swift.Int
public var buffer: Foundation.NSMutableData?
final public let firstFrame: Foundation.Date
@objc deinit
}
weak public var delegate: Starscream.WebSocketDelegate?
weak public var advancedDelegate: Starscream.WebSocketAdvancedDelegate?
weak public var pongDelegate: Starscream.WebSocketPongDelegate?
public var onConnect: (() -> Swift.Void)?
public var onDisconnect: ((Swift.Error?) -> Swift.Void)?
public var onText: ((Swift.String) -> Swift.Void)?
public var onData: ((Foundation.Data) -> Swift.Void)?
public var onPong: ((Foundation.Data?) -> Swift.Void)?
public var onHttpResponseHeaders: (([Swift.String : Swift.String]) -> Swift.Void)?
public var disableSSLCertValidation: Swift.Bool
public var overrideTrustHostname: Swift.Bool
public var desiredTrustHostname: Swift.String?
public var sslClientCertificate: Starscream.SSLClientCertificate?
public var enableCompression: Swift.Bool
public var security: Starscream.SSLTrustValidator?
public var enabledSSLCipherSuites: [Security.SSLCipherSuite]?
public var isConnected: Swift.Bool {
get
}
public var request: Foundation.URLRequest
public var currentURL: Foundation.URL {
get
}
public var respondToPingWithPong: Swift.Bool
public init(request: Foundation.URLRequest, protocols: [Swift.String]? = nil, stream: Starscream.WSStream = FoundationStream())
convenience public init(url: Foundation.URL, protocols: [Swift.String]? = nil)
convenience public init(url: Foundation.URL, writeQueueQOS: Foundation.QualityOfService, protocols: [Swift.String]? = nil)
open func connect()
open func disconnect(forceTimeout: Foundation.TimeInterval? = nil, closeCode: Swift.UInt16 = CloseCode.normal.rawValue)
open func write(string: Swift.String, completion: (() -> ())? = nil)
open func write(data: Foundation.Data, completion: (() -> ())? = nil)
open func write(ping: Foundation.Data, completion: (() -> ())? = nil)
open func write(pong: Foundation.Data, completion: (() -> ())? = nil)
public func newBytesInStream()
public func streamDidError(error: Swift.Error?)
@objc deinit
@objc override dynamic public init()
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
open class SSLCert {
public init(data: Foundation.Data)
public init(key: Security.SecKey)
@objc deinit
}
open class SSLSecurity : Starscream.SSLTrustValidator {
public var validatedDN: Swift.Bool
public var validateEntireChain: Swift.Bool
convenience public init(usePublicKeys: Swift.Bool = false)
public init(certs: [Starscream.SSLCert], usePublicKeys: Swift.Bool)
open func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
public func extractPublicKey(_ data: Foundation.Data) -> Security.SecKey?
public func extractPublicKey(_ cert: Security.SecCertificate, policy: Security.SecPolicy) -> Security.SecKey?
public func certificateChain(_ trust: Security.SecTrust) -> [Foundation.Data]
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
public struct SSLClientCertificateError : Foundation.LocalizedError {
public var errorDescription: Swift.String?
}
public class SSLClientCertificate {
convenience public init(pkcs12Path: Swift.String, password: Swift.String) throws
public init(identity: Security.SecIdentity, identityCertificate: Security.SecCertificate)
convenience public init(pkcs12Url: Foundation.URL, password: Swift.String) throws
public init(pkcs12Url: Foundation.URL, importOptions: CoreFoundation.CFDictionary) throws
@objc deinit
}
extension Starscream.CloseCode : Swift.Equatable {}
extension Starscream.CloseCode : Swift.Hashable {}
extension Starscream.CloseCode : Swift.RawRepresentable {}
extension Starscream.ErrorType : Swift.Equatable {}
extension Starscream.ErrorType : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.Equatable {}
extension Starscream.WebSocket.OpCode : Swift.Hashable {}
extension Starscream.WebSocket.OpCode : Swift.RawRepresentable {}
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18C54</string>
<string>19C57</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -29,17 +29,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10B61</string>
<string>11C29</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18B71</string>
<string>19B90</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1010</string>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>10B61</string>
<string>11C29</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
@@ -1,4 +1,4 @@
// Generated by Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
// Generated by Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -20,7 +20,7 @@
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <objc/NSObject.h>
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
@@ -110,6 +110,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# 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
@@ -151,6 +160,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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
@@ -162,7 +174,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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;
#endif
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target x86_64-apple-macos10.9 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -0,0 +1,570 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.3 effective-4.2 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
// swift-module-flags: -target x86_64-apple-macos10.9 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name Swifter
import Dispatch
import Foundation
import Swift
extension String {
public enum FileError : Swift.Error {
case error(Swift.Int32)
}
public class File {
public init(_ pointer: Swift.UnsafeMutablePointer<Darwin.FILE>)
public func close()
public func seek(_ offset: Swift.Int) -> Swift.Bool
public func read(_ data: inout [Swift.UInt8]) throws -> Swift.Int
public func write(_ data: [Swift.UInt8]) throws
public static func currentWorkingDirectory() throws -> Swift.String
@objc deinit
}
public static var pathSeparator: Swift.String
public func openNewForWriting() throws -> Swift.String.File
public func openForReading() throws -> Swift.String.File
public func openForWritingAndReading() throws -> Swift.String.File
public func openFileForMode(_ path: Swift.String, _ mode: Swift.String) throws -> Swift.String.File
public func exists() throws -> Swift.Bool
public func directory() throws -> Swift.Bool
public func files() throws -> [Swift.String]
}
public enum SerializationError : Swift.Error {
case invalidObject
case notSupported
public static func == (a: Swifter.SerializationError, b: Swifter.SerializationError) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public protocol HttpResponseBodyWriter {
func write(_ file: Swift.String.File) throws
func write(_ data: [Swift.UInt8]) throws
func write(_ data: Swift.ArraySlice<Swift.UInt8>) throws
func write(_ data: Foundation.NSData) throws
func write(_ data: Foundation.Data) throws
}
public enum HttpResponseBody {
case json(Swift.AnyObject)
case html(Swift.String)
case text(Swift.String)
case data(Foundation.Data)
case custom(Any, (Any) throws -> Swift.String)
}
public enum HttpResponse {
case switchProtocols([Swift.String : Swift.String], (Swifter.Socket) -> Swift.Void)
case ok(Swifter.HttpResponseBody), created, accepted
case movedPermanently(Swift.String)
case movedTemporarily(Swift.String)
case badRequest(Swifter.HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Swift.Int, Swift.String, [Swift.String : Swift.String]?, ((Swifter.HttpResponseBodyWriter) throws -> Swift.Void)?)
}
public func scopes(_ scope: @escaping Swifter.Closure) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public typealias Closure = () -> Swift.Void
public var idd: Swift.String?
public var dir: Swift.String?
public var rel: Swift.String?
public var rev: Swift.String?
public var alt: Swift.String?
public var forr: Swift.String?
public var src: Swift.String?
public var type: Swift.String?
public var href: Swift.String?
public var text: Swift.String?
public var abbr: Swift.String?
public var size: Swift.String?
public var face: Swift.String?
public var char: Swift.String?
public var cite: Swift.String?
public var span: Swift.String?
public var data: Swift.String?
public var axis: Swift.String?
public var Name: Swift.String?
public var name: Swift.String?
public var code: Swift.String?
public var link: Swift.String?
public var lang: Swift.String?
public var cols: Swift.String?
public var rows: Swift.String?
public var ismap: Swift.String?
public var shape: Swift.String?
public var style: Swift.String?
public var alink: Swift.String?
public var width: Swift.String?
public var rules: Swift.String?
public var align: Swift.String?
public var frame: Swift.String?
public var vlink: Swift.String?
public var deferr: Swift.String?
public var color: Swift.String?
public var media: Swift.String?
public var title: Swift.String?
public var scope: Swift.String?
public var classs: Swift.String?
public var value: Swift.String?
public var clear: Swift.String?
public var start: Swift.String?
public var label: Swift.String?
public var action: Swift.String?
public var height: Swift.String?
public var method: Swift.String?
public var acceptt: Swift.String?
public var object: Swift.String?
public var scheme: Swift.String?
public var coords: Swift.String?
public var usemap: Swift.String?
public var onblur: Swift.String?
public var nohref: Swift.String?
public var nowrap: Swift.String?
public var hspace: Swift.String?
public var border: Swift.String?
public var valign: Swift.String?
public var vspace: Swift.String?
public var onload: Swift.String?
public var target: Swift.String?
public var prompt: Swift.String?
public var onfocus: Swift.String?
public var enctype: Swift.String?
public var onclick: Swift.String?
public var onkeyup: Swift.String?
public var profile: Swift.String?
public var version: Swift.String?
public var onreset: Swift.String?
public var charset: Swift.String?
public var standby: Swift.String?
public var colspan: Swift.String?
public var charoff: Swift.String?
public var classid: Swift.String?
public var compact: Swift.String?
public var declare: Swift.String?
public var rowspan: Swift.String?
public var checked: Swift.String?
public var archive: Swift.String?
public var bgcolor: Swift.String?
public var content: Swift.String?
public var noshade: Swift.String?
public var summary: Swift.String?
public var headers: Swift.String?
public var onselect: Swift.String?
public var readonly: Swift.String?
public var tabindex: Swift.String?
public var onchange: Swift.String?
public var noresize: Swift.String?
public var disabled: Swift.String?
public var longdesc: Swift.String?
public var codebase: Swift.String?
public var language: Swift.String?
public var datetime: Swift.String?
public var selected: Swift.String?
public var hreflang: Swift.String?
public var onsubmit: Swift.String?
public var multiple: Swift.String?
public var onunload: Swift.String?
public var codetype: Swift.String?
public var scrolling: Swift.String?
public var onkeydown: Swift.String?
public var maxlength: Swift.String?
public var valuetype: Swift.String?
public var accesskey: Swift.String?
public var onmouseup: Swift.String?
public var autofocus: Swift.String?
public var onkeypress: Swift.String?
public var ondblclick: Swift.String?
public var onmouseout: Swift.String?
public var httpEquiv: Swift.String?
public var background: Swift.String?
public var onmousemove: Swift.String?
public var onmouseover: Swift.String?
public var cellpadding: Swift.String?
public var onmousedown: Swift.String?
public var frameborder: Swift.String?
public var marginwidth: Swift.String?
public var cellspacing: Swift.String?
public var placeholder: Swift.String?
public var marginheight: Swift.String?
public var acceptCharset: Swift.String?
public var inner: Swift.String?
public func a(_ c: () -> Swift.Void)
public func b(_ c: () -> Swift.Void)
public func i(_ c: () -> Swift.Void)
public func p(_ c: () -> Swift.Void)
public func q(_ c: () -> Swift.Void)
public func s(_ c: () -> Swift.Void)
public func u(_ c: () -> Swift.Void)
public func br(_ c: () -> Swift.Void)
public func dd(_ c: () -> Swift.Void)
public func dl(_ c: () -> Swift.Void)
public func dt(_ c: () -> Swift.Void)
public func em(_ c: () -> Swift.Void)
public func hr(_ c: () -> Swift.Void)
public func li(_ c: () -> Swift.Void)
public func ol(_ c: () -> Swift.Void)
public func rp(_ c: () -> Swift.Void)
public func rt(_ c: () -> Swift.Void)
public func td(_ c: () -> Swift.Void)
public func th(_ c: () -> Swift.Void)
public func tr(_ c: () -> Swift.Void)
public func tt(_ c: () -> Swift.Void)
public func ul(_ c: () -> Swift.Void)
public func ul<T>(_ collection: T, _ c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func h1(_ c: () -> Swift.Void)
public func h2(_ c: () -> Swift.Void)
public func h3(_ c: () -> Swift.Void)
public func h4(_ c: () -> Swift.Void)
public func h5(_ c: () -> Swift.Void)
public func h6(_ c: () -> Swift.Void)
public func bdi(_ c: () -> Swift.Void)
public func bdo(_ c: () -> Swift.Void)
public func big(_ c: () -> Swift.Void)
public func col(_ c: () -> Swift.Void)
public func del(_ c: () -> Swift.Void)
public func dfn(_ c: () -> Swift.Void)
public func dir(_ c: () -> Swift.Void)
public func div(_ c: () -> Swift.Void)
public func img(_ c: () -> Swift.Void)
public func ins(_ c: () -> Swift.Void)
public func kbd(_ c: () -> Swift.Void)
public func map(_ c: () -> Swift.Void)
public func nav(_ c: () -> Swift.Void)
public func pre(_ c: () -> Swift.Void)
public func rtc(_ c: () -> Swift.Void)
public func sub(_ c: () -> Swift.Void)
public func sup(_ c: () -> Swift.Void)
public func varr(_ c: () -> Swift.Void)
public func wbr(_ c: () -> Swift.Void)
public func xmp(_ c: () -> Swift.Void)
public func abbr(_ c: () -> Swift.Void)
public func area(_ c: () -> Swift.Void)
public func base(_ c: () -> Swift.Void)
public func body(_ c: () -> Swift.Void)
public func cite(_ c: () -> Swift.Void)
public func code(_ c: () -> Swift.Void)
public func data(_ c: () -> Swift.Void)
public func font(_ c: () -> Swift.Void)
public func form(_ c: () -> Swift.Void)
public func head(_ c: () -> Swift.Void)
public func html(_ c: () -> Swift.Void)
public func link(_ c: () -> Swift.Void)
public func main(_ c: () -> Swift.Void)
public func mark(_ c: () -> Swift.Void)
public func menu(_ c: () -> Swift.Void)
public func meta(_ c: () -> Swift.Void)
public func nobr(_ c: () -> Swift.Void)
public func ruby(_ c: () -> Swift.Void)
public func samp(_ c: () -> Swift.Void)
public func span(_ c: () -> Swift.Void)
public func time(_ c: () -> Swift.Void)
public func aside(_ c: () -> Swift.Void)
public func audio(_ c: () -> Swift.Void)
public func blink(_ c: () -> Swift.Void)
public func embed(_ c: () -> Swift.Void)
public func frame(_ c: () -> Swift.Void)
public func image(_ c: () -> Swift.Void)
public func input(_ c: () -> Swift.Void)
public func label(_ c: () -> Swift.Void)
public func meter(_ c: () -> Swift.Void)
public func param(_ c: () -> Swift.Void)
public func small(_ c: () -> Swift.Void)
public func style(_ c: () -> Swift.Void)
public func table(_ c: () -> Swift.Void)
public func table<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tbody(_ c: () -> Swift.Void)
public func tbody<T>(_ collection: T, c: @escaping (T.Iterator.Element) -> Swift.Void) where T : Swift.Sequence
public func tfoot(_ c: () -> Swift.Void)
public func thead(_ c: () -> Swift.Void)
public func title(_ c: () -> Swift.Void)
public func track(_ c: () -> Swift.Void)
public func video(_ c: () -> Swift.Void)
public func applet(_ c: () -> Swift.Void)
public func button(_ c: () -> Swift.Void)
public func canvas(_ c: () -> Swift.Void)
public func center(_ c: () -> Swift.Void)
public func dialog(_ c: () -> Swift.Void)
public func figure(_ c: () -> Swift.Void)
public func footer(_ c: () -> Swift.Void)
public func header(_ c: () -> Swift.Void)
public func hgroup(_ c: () -> Swift.Void)
public func iframe(_ c: () -> Swift.Void)
public func keygen(_ c: () -> Swift.Void)
public func legend(_ c: () -> Swift.Void)
public func object(_ c: () -> Swift.Void)
public func option(_ c: () -> Swift.Void)
public func output(_ c: () -> Swift.Void)
public func script(_ c: () -> Swift.Void)
public func select(_ c: () -> Swift.Void)
public func shadow(_ c: () -> Swift.Void)
public func source(_ c: () -> Swift.Void)
public func spacer(_ c: () -> Swift.Void)
public func strike(_ c: () -> Swift.Void)
public func strong(_ c: () -> Swift.Void)
public func acronym(_ c: () -> Swift.Void)
public func address(_ c: () -> Swift.Void)
public func article(_ c: () -> Swift.Void)
public func bgsound(_ c: () -> Swift.Void)
public func caption(_ c: () -> Swift.Void)
public func command(_ c: () -> Swift.Void)
public func content(_ c: () -> Swift.Void)
public func details(_ c: () -> Swift.Void)
public func elementt(_ c: () -> Swift.Void)
public func isindex(_ c: () -> Swift.Void)
public func listing(_ c: () -> Swift.Void)
public func marquee(_ c: () -> Swift.Void)
public func noembed(_ c: () -> Swift.Void)
public func picture(_ c: () -> Swift.Void)
public func section(_ c: () -> Swift.Void)
public func summary(_ c: () -> Swift.Void)
public func basefont(_ c: () -> Swift.Void)
public func colgroup(_ c: () -> Swift.Void)
public func datalist(_ c: () -> Swift.Void)
public func fieldset(_ c: () -> Swift.Void)
public func frameset(_ c: () -> Swift.Void)
public func menuitem(_ c: () -> Swift.Void)
public func multicol(_ c: () -> Swift.Void)
public func noframes(_ c: () -> Swift.Void)
public func noscript(_ c: () -> Swift.Void)
public func optgroup(_ c: () -> Swift.Void)
public func progress(_ c: () -> Swift.Void)
public func template(_ c: () -> Swift.Void)
public func textarea(_ c: () -> Swift.Void)
public func plaintext(_ c: () -> Swift.Void)
public func javascript(_ c: () -> Swift.Void)
public func blockquote(_ c: () -> Swift.Void)
public func figcaption(_ c: () -> Swift.Void)
public func stylesheet(_ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ c: () -> Swift.Void)
public func element(_ node: Swift.String, _ attrs: [Swift.String : Swift.String?] = [:], _ c: () -> Swift.Void)
public class Process {
public static var pid: Swift.Int {
get
}
public static var tid: Swift.UInt64 {
get
}
public static func watchSignals(_ callback: @escaping (Swift.Int32) -> Swift.Void)
@objc deinit
}
public class HttpParser {
public init()
public func readHttpRequest(_ socket: Swifter.Socket) throws -> Swifter.HttpRequest
@objc deinit
}
extension String {
public func unquote() -> Swift.String
}
extension Unicode.Scalar {
public func asWhitespace() -> Swift.UInt8?
}
@available(*, deprecated, message: "Use websocket(text:binary:pong:connected:disconnected:) instead.")
public func websocket(_ text: @escaping (Swifter.WebSocketSession, Swift.String) -> Swift.Void, _ binary: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void, _ pong: @escaping (Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func websocket(text: ((Swifter.WebSocketSession, Swift.String) -> Swift.Void)? = nil, binary: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, pong: ((Swifter.WebSocketSession, [Swift.UInt8]) -> Swift.Void)? = nil, connected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil, disconnected: ((Swifter.WebSocketSession) -> Swift.Void)? = nil) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public class WebSocketSession : Swift.Hashable, Swift.Equatable {
public enum WsError : Swift.Error {
case unknownOpCode(Swift.String), unMaskedFrame(Swift.String), protocolError(Swift.String), invalidUTF8(Swift.String)
}
public enum OpCode : Swift.UInt8 {
case `continue`, close, ping, pong, text, binary
public typealias RawValue = Swift.UInt8
public init?(rawValue: Swift.UInt8)
public var rawValue: Swift.UInt8 {
get
}
}
public enum Control : Swift.Error {
case close
public static func == (a: Swifter.WebSocketSession.Control, b: Swifter.WebSocketSession.Control) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
public func hash(into hasher: inout Swift.Hasher)
}
public class Frame {
public var opcode: Swifter.WebSocketSession.OpCode
public var fin: Swift.Bool
public var rsv1: Swift.UInt8
public var rsv2: Swift.UInt8
public var rsv3: Swift.UInt8
public var payload: [Swift.UInt8]
@objc deinit
}
final public let socket: Swifter.Socket
public init(_ socket: Swifter.Socket)
@objc deinit
public func writeText(_ text: Swift.String)
public func writeBinary(_ binary: [Swift.UInt8])
public func writeBinary(_ binary: Swift.ArraySlice<Swift.UInt8>)
public func writeFrame(_ data: Swift.ArraySlice<Swift.UInt8>, _ op: Swifter.WebSocketSession.OpCode, _ fin: Swift.Bool = true)
public func writeCloseFrame()
public func readFrame() throws -> Swifter.WebSocketSession.Frame
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public func == (webSocketSession1: Swifter.WebSocketSession, webSocketSession2: Swifter.WebSocketSession) -> Swift.Bool
public class HttpServer : Swifter.HttpServerIO {
public static let VERSION: Swift.String
override public init()
public var DELETE: Swifter.HttpServer.MethodRoute, PATCH: Swifter.HttpServer.MethodRoute, HEAD: Swifter.HttpServer.MethodRoute, POST: Swifter.HttpServer.MethodRoute, GET: Swifter.HttpServer.MethodRoute, PUT: Swifter.HttpServer.MethodRoute
public var delete: Swifter.HttpServer.MethodRoute, patch: Swifter.HttpServer.MethodRoute, head: Swifter.HttpServer.MethodRoute, post: Swifter.HttpServer.MethodRoute, get: Swifter.HttpServer.MethodRoute, put: Swifter.HttpServer.MethodRoute
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
public var routes: [Swift.String] {
get
}
public var notFoundHandler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?
public var middleware: [(Swifter.HttpRequest) -> Swifter.HttpResponse?]
override public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
public struct MethodRoute {
public let method: Swift.String
public let router: Swifter.HttpRouter
public subscript(path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)? {
get
set
}
}
@objc deinit
}
public class HttpRequest {
public var path: Swift.String
public var queryParams: [(Swift.String, Swift.String)]
public var method: Swift.String
public var headers: [Swift.String : Swift.String]
public var body: [Swift.UInt8]
public var address: Swift.String?
public var params: [Swift.String : Swift.String]
public init()
public func hasTokenForHeader(_ headerName: Swift.String, token: Swift.String) -> Swift.Bool
public func parseUrlencodedForm() -> [(Swift.String, Swift.String)]
public struct MultiPart {
public let headers: [Swift.String : Swift.String]
public let body: [Swift.UInt8]
public var name: Swift.String? {
get
}
public var fileName: Swift.String? {
get
}
}
public func parseMultiPartFormData() -> [Swifter.HttpRequest.MultiPart]
@objc deinit
}
public func demoServer(_ publicDir: Swift.String) -> Swifter.HttpServer
extension Socket {
public func writeFile(_ file: Swift.String.File) throws
}
public enum SocketError : Swift.Error {
case socketCreationFailed(Swift.String)
case socketSettingReUseAddrFailed(Swift.String)
case bindFailed(Swift.String)
case listenFailed(Swift.String)
case writeFailed(Swift.String)
case getPeerNameFailed(Swift.String)
case convertingPeerNameFailed
case getNameInfoFailed(Swift.String)
case acceptFailed(Swift.String)
case recvFailed(Swift.String)
case getSockNameFailed(Swift.String)
}
open class Socket : Swift.Hashable, Swift.Equatable {
public init(socketFileDescriptor: Swift.Int32)
@objc deinit
public func hash(into hasher: inout Swift.Hasher)
public func close()
public func port() throws -> Darwin.in_port_t
public func isIPv4() throws -> Swift.Bool
public func writeUTF8(_ string: Swift.String) throws
public func writeUInt8(_ data: [Swift.UInt8]) throws
public func writeUInt8(_ data: Swift.ArraySlice<Swift.UInt8>) throws
public func writeData(_ data: Foundation.NSData) throws
public func writeData(_ data: Foundation.Data) throws
open func read() throws -> Swift.UInt8
open func read(length: Swift.Int) throws -> [Swift.UInt8]
public func readLine() throws -> Swift.String
public func peername() throws -> Swift.String
public class func setNoSigPipe(_ socket: Swift.Int32)
public class func close(_ socket: Swift.Int32)
open var hashValue: Swift.Int {
get
}
}
public func == (socket1: Swifter.Socket, socket2: Swifter.Socket) -> Swift.Bool
public protocol HttpServerIODelegate : AnyObject {
func socketConnectionReceived(_ socket: Swifter.Socket)
}
public class HttpServerIO {
weak public var delegate: Swifter.HttpServerIODelegate?
public enum HttpServerIOState : Swift.Int32 {
case starting
case running
case stopping
case stopped
public typealias RawValue = Swift.Int32
public var rawValue: Swift.Int32 {
get
}
public init?(rawValue: Swift.Int32)
}
public var state: Swifter.HttpServerIO.HttpServerIOState {
get
}
public var operating: Swift.Bool {
get
}
public var listenAddressIPv4: Swift.String?
public var listenAddressIPv6: Swift.String?
public func port() throws -> Swift.Int
public func isIPv4() throws -> Swift.Bool
@objc deinit
@available(OSX 10.10, *)
public func start(_ port: Darwin.in_port_t = 8080, forceIPv4: Swift.Bool = false, priority: Dispatch.DispatchQoS.QoSClass = DispatchQoS.QoSClass.background) throws
public func stop()
public func dispatch(_ request: Swifter.HttpRequest) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)
}
public func shareFile(_ path: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func shareFilesFromDirectory(_ directoryPath: Swift.String, defaults: [Swift.String] = ["index.html", "default.html"]) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
public func directoryBrowser(_ dir: Swift.String) -> ((Swifter.HttpRequest) -> Swifter.HttpResponse)
open class HttpRouter {
public init()
public func routes() -> [Swift.String]
public func register(_ method: Swift.String?, path: Swift.String, handler: ((Swifter.HttpRequest) -> Swifter.HttpResponse)?)
public func route(_ method: Swift.String?, path: Swift.String) -> ([Swift.String : Swift.String], (Swifter.HttpRequest) -> Swifter.HttpResponse)?
@objc deinit
}
extension NSURL {
public func mimeType() -> Swift.String
}
extension NSString {
public func mimeType() -> Swift.String
}
extension String {
public func mimeType() -> Swift.String
}
public struct SHA1 {
public static func hash(_ input: [Swift.UInt8]) -> [Swift.UInt8]
}
extension String {
public func sha1() -> [Swift.UInt8]
public func sha1() -> Swift.String
}
extension Socket {
public class func tcpSocketForListen(_ port: Darwin.in_port_t, _ forceIPv4: Swift.Bool = false, _ maxPendingConnection: Swift.Int32 = SOMAXCONN, _ listenAddress: Swift.String? = nil) throws -> Swifter.Socket
public func acceptClientSocket() throws -> Swifter.Socket
}
public class Errno {
public class func description() -> Swift.String
@objc deinit
}
extension String {
public static func toBase64(_ data: [Swift.UInt8]) -> Swift.String?
}
extension Swifter.SerializationError : Swift.Equatable {}
extension Swifter.SerializationError : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.Equatable {}
extension Swifter.WebSocketSession.OpCode : Swift.Hashable {}
extension Swifter.WebSocketSession.OpCode : Swift.RawRepresentable {}
extension Swifter.WebSocketSession.Control : Swift.Equatable {}
extension Swifter.WebSocketSession.Control : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Equatable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.Hashable {}
extension Swifter.HttpServerIO.HttpServerIOState : Swift.RawRepresentable {}
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18C54</string>
<string>19C57</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.4.5</string>
<string>1.4.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@@ -25,21 +25,23 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.4.3</string>
<string>1.4.6</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10B61</string>
<string>11C29</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18B71</string>
<string>19B90</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1010</string>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>10B61</string>
<string>11C29</string>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Damian Kołakowski. All rights reserved.</string>
<key>UIDeviceFamily</key>
@@ -1,4 +1,8 @@
// Generated by Apple Swift version 4.2.1 effective-4.1.50 (swiftlang-1000.11.42 clang-1000.11.45.1)
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
// Generated by Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -20,7 +24,7 @@
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <objc/NSObject.h>
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
@@ -110,6 +114,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# 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
@@ -151,6 +164,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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
@@ -162,7 +178,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#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
@@ -195,10 +217,236 @@ SWIFT_CLASS("_TtC10Starscream16FoundationStream")
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#else
// Generated by Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
#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(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("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More