Update TunnelKit and remove unused code

ConnectionProfileHolder
This commit is contained in:
Davide De Rosa 2018-10-26 17:31:53 +02:00
parent 52ec2bebd5
commit 76f2597424
4 changed files with 5 additions and 68 deletions

View File

@ -58,7 +58,6 @@
0EBE3AA1213DC1A100BFA2F5 /* ConnectionService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EBE3A9F213DC1A100BFA2F5 /* ConnectionService.swift */; }; 0EBE3AA1213DC1A100BFA2F5 /* ConnectionService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EBE3A9F213DC1A100BFA2F5 /* ConnectionService.swift */; };
0EBE3AA5213DC1B000BFA2F5 /* HostConnectionProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EBE3AA3213DC1B000BFA2F5 /* HostConnectionProfile.swift */; }; 0EBE3AA5213DC1B000BFA2F5 /* HostConnectionProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EBE3AA3213DC1B000BFA2F5 /* HostConnectionProfile.swift */; };
0EBE3AA6213DC1B000BFA2F5 /* ProviderConnectionProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EBE3AA4213DC1B000BFA2F5 /* ProviderConnectionProfile.swift */; }; 0EBE3AA6213DC1B000BFA2F5 /* ProviderConnectionProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EBE3AA4213DC1B000BFA2F5 /* ProviderConnectionProfile.swift */; };
0EBE3AAC213DEB8800BFA2F5 /* ConnectionProfileHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EBE3AAB213DEB8800BFA2F5 /* ConnectionProfileHolder.swift */; };
0EC7F20520E24308004EA58E /* DebugLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC7F20420E24308004EA58E /* DebugLog.swift */; }; 0EC7F20520E24308004EA58E /* DebugLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC7F20420E24308004EA58E /* DebugLog.swift */; };
0ECEE44E20E1122200A6BB43 /* TableModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ECEE44D20E1122200A6BB43 /* TableModel.swift */; }; 0ECEE44E20E1122200A6BB43 /* TableModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ECEE44D20E1122200A6BB43 /* TableModel.swift */; };
0ECEE45020E1182E00A6BB43 /* Theme+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ECEE44F20E1182E00A6BB43 /* Theme+Cells.swift */; }; 0ECEE45020E1182E00A6BB43 /* Theme+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ECEE44F20E1182E00A6BB43 /* Theme+Cells.swift */; };
@ -178,7 +177,6 @@
0EBE3A9F213DC1A100BFA2F5 /* ConnectionService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionService.swift; sourceTree = "<group>"; }; 0EBE3A9F213DC1A100BFA2F5 /* ConnectionService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionService.swift; sourceTree = "<group>"; };
0EBE3AA3213DC1B000BFA2F5 /* HostConnectionProfile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HostConnectionProfile.swift; sourceTree = "<group>"; }; 0EBE3AA3213DC1B000BFA2F5 /* HostConnectionProfile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HostConnectionProfile.swift; sourceTree = "<group>"; };
0EBE3AA4213DC1B000BFA2F5 /* ProviderConnectionProfile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProviderConnectionProfile.swift; sourceTree = "<group>"; }; 0EBE3AA4213DC1B000BFA2F5 /* ProviderConnectionProfile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProviderConnectionProfile.swift; sourceTree = "<group>"; };
0EBE3AAB213DEB8800BFA2F5 /* ConnectionProfileHolder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionProfileHolder.swift; sourceTree = "<group>"; };
0EC7F20420E24308004EA58E /* DebugLog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebugLog.swift; sourceTree = "<group>"; }; 0EC7F20420E24308004EA58E /* DebugLog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebugLog.swift; sourceTree = "<group>"; };
0ECEE44D20E1122200A6BB43 /* TableModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableModel.swift; sourceTree = "<group>"; }; 0ECEE44D20E1122200A6BB43 /* TableModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableModel.swift; sourceTree = "<group>"; };
0ECEE44F20E1182E00A6BB43 /* Theme+Cells.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Theme+Cells.swift"; sourceTree = "<group>"; }; 0ECEE44F20E1182E00A6BB43 /* Theme+Cells.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Theme+Cells.swift"; sourceTree = "<group>"; };
@ -383,7 +381,6 @@
children = ( children = (
0EBE3AA2213DC1B000BFA2F5 /* Profiles */, 0EBE3AA2213DC1B000BFA2F5 /* Profiles */,
0EBE3A9E213DC1A100BFA2F5 /* ConnectionProfile.swift */, 0EBE3A9E213DC1A100BFA2F5 /* ConnectionProfile.swift */,
0EBE3AAB213DEB8800BFA2F5 /* ConnectionProfileHolder.swift */,
0EBE3A9F213DC1A100BFA2F5 /* ConnectionService.swift */, 0EBE3A9F213DC1A100BFA2F5 /* ConnectionService.swift */,
0EBBE8F42182361700106008 /* ConnectionService+Migration.swift */, 0EBBE8F42182361700106008 /* ConnectionService+Migration.swift */,
0EDE8DE620C93945004C739C /* Credentials.swift */, 0EDE8DE620C93945004C739C /* Credentials.swift */,
@ -851,7 +848,6 @@
0E89DFC8213E8FC500741BA1 /* SessionProxy+Communication.swift in Sources */, 0E89DFC8213E8FC500741BA1 /* SessionProxy+Communication.swift in Sources */,
0ED38AEA214054A50004D387 /* OptionViewController.swift in Sources */, 0ED38AEA214054A50004D387 /* OptionViewController.swift in Sources */,
0EFD943E215BE10800529B64 /* IssueReporter.swift in Sources */, 0EFD943E215BE10800529B64 /* IssueReporter.swift in Sources */,
0EBE3AAC213DEB8800BFA2F5 /* ConnectionProfileHolder.swift in Sources */,
0EB60FDA2111136E00AD27F3 /* UITextView+Search.swift in Sources */, 0EB60FDA2111136E00AD27F3 /* UITextView+Search.swift in Sources */,
0E57F63E20C83FC5008323CF /* ServiceViewController.swift in Sources */, 0E57F63E20C83FC5008323CF /* ServiceViewController.swift in Sources */,
0E39BCF0214B9EF10035E9DE /* WebServices.swift in Sources */, 0E39BCF0214B9EF10035E9DE /* WebServices.swift in Sources */,

View File

@ -1,59 +0,0 @@
//
// ConnectionProfileHolder.swift
// Passepartout
//
// Created by Davide De Rosa on 9/3/18.
// Copyright (c) 2018 Davide De Rosa. All rights reserved.
//
// https://github.com/keeshux
//
// This file is part of Passepartout.
//
// Passepartout is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Passepartout is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
//
import Foundation
import TunnelKit
class ConnectionProfileHolder: Codable {
private let provider: ProviderConnectionProfile?
private let host: HostConnectionProfile?
convenience init(_ profile: ConnectionProfile) {
if let p = profile as? ProviderConnectionProfile {
self.init(p)
} else if let p = profile as? HostConnectionProfile {
self.init(p)
} else {
fatalError("Unexpected ConnectionProfile subtype: \(type(of: profile))")
}
}
init(_ provider: ProviderConnectionProfile) {
self.provider = provider
host = nil
}
init(_ host: HostConnectionProfile) {
provider = nil
self.host = host
}
var contained: ConnectionProfile? {
let found: ConnectionProfile? = provider ?? host
assert(found != nil, "Either provider or host must be non-nil")
return found
}
}

View File

@ -3,7 +3,7 @@ use_frameworks!
def shared_pods def shared_pods
#pod 'TunnelKit', '~> 1.1.2' #pod 'TunnelKit', '~> 1.1.2'
pod 'TunnelKit', :git => 'https://github.com/keeshux/tunnelkit', :commit => 'd94733f' pod 'TunnelKit', :git => 'https://github.com/keeshux/tunnelkit', :commit => '3447128'
#pod 'TunnelKit', :path => '../tunnelkit' #pod 'TunnelKit', :path => '../tunnelkit'
end end

View File

@ -14,7 +14,7 @@ PODS:
DEPENDENCIES: DEPENDENCIES:
- MBProgressHUD - MBProgressHUD
- TunnelKit (from `https://github.com/keeshux/tunnelkit`, commit `d94733f`) - TunnelKit (from `https://github.com/keeshux/tunnelkit`, commit `3447128`)
SPEC REPOS: SPEC REPOS:
https://github.com/cocoapods/specs.git: https://github.com/cocoapods/specs.git:
@ -24,12 +24,12 @@ SPEC REPOS:
EXTERNAL SOURCES: EXTERNAL SOURCES:
TunnelKit: TunnelKit:
:commit: d94733f :commit: '3447128'
:git: https://github.com/keeshux/tunnelkit :git: https://github.com/keeshux/tunnelkit
CHECKOUT OPTIONS: CHECKOUT OPTIONS:
TunnelKit: TunnelKit:
:commit: d94733f :commit: '3447128'
:git: https://github.com/keeshux/tunnelkit :git: https://github.com/keeshux/tunnelkit
SPEC CHECKSUMS: SPEC CHECKSUMS:
@ -38,6 +38,6 @@ SPEC CHECKSUMS:
SwiftyBeaver: ccfcdf85a04d429f1633f668650b0ce8020bda3a SwiftyBeaver: ccfcdf85a04d429f1633f668650b0ce8020bda3a
TunnelKit: 8e747cac28959ebfdfa4eeab589c933f1856c0fb TunnelKit: 8e747cac28959ebfdfa4eeab589c933f1856c0fb
PODFILE CHECKSUM: 38237684ab2fdb5e262da936fd6932218abca0b4 PODFILE CHECKSUM: 2e3ddf964a7da5d6afc6d39c26218d9af992c770
COCOAPODS: 1.6.0.beta.2 COCOAPODS: 1.6.0.beta.2