From fd29cf3402ad014c1990fd6c6dc6a23fea216efe Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sat, 22 Dec 2018 15:46:28 +0530 Subject: [PATCH] TunnelStatus: Absorb NEVPNStatus+CustomStringConvertible Signed-off-by: Roopesh Chander --- WireGuard/WireGuard.xcodeproj/project.pbxproj | 4 ---- .../NEVPNStatus+CustomStringConvertible.swift | 18 ------------------ WireGuard/WireGuard/Tunnel/TunnelStatus.swift | 13 +++++++++++++ 3 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 WireGuard/WireGuard/Tunnel/NEVPNStatus+CustomStringConvertible.swift diff --git a/WireGuard/WireGuard.xcodeproj/project.pbxproj b/WireGuard/WireGuard.xcodeproj/project.pbxproj index 2ef4bd2..92a2abf 100644 --- a/WireGuard/WireGuard.xcodeproj/project.pbxproj +++ b/WireGuard/WireGuard.xcodeproj/project.pbxproj @@ -16,7 +16,6 @@ 5F4541A221C2D6DF00994C13 /* BorderedTextButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4541A121C2D6DF00994C13 /* BorderedTextButton.swift */; }; 5F4541A621C4449E00994C13 /* ButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4541A521C4449E00994C13 /* ButtonCell.swift */; }; 5F4541A921C451D100994C13 /* TunnelStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4541A821C451D100994C13 /* TunnelStatus.swift */; }; - 5F4541AE21C7704300994C13 /* NEVPNStatus+CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4541AD21C7704300994C13 /* NEVPNStatus+CustomStringConvertible.swift */; }; 5F4541B221CBFAEE00994C13 /* String+ArrayConversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4541B121CBFAEE00994C13 /* String+ArrayConversion.swift */; }; 5F9696AA21CD6AE6008063FE /* LegacyConfigMigration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9696A921CD6AE6008063FE /* LegacyConfigMigration.swift */; }; 5F9696AB21CD6AE6008063FE /* LegacyConfigMigration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9696A921CD6AE6008063FE /* LegacyConfigMigration.swift */; }; @@ -123,7 +122,6 @@ 5F4541A121C2D6DF00994C13 /* BorderedTextButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BorderedTextButton.swift; sourceTree = ""; }; 5F4541A521C4449E00994C13 /* ButtonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonCell.swift; sourceTree = ""; }; 5F4541A821C451D100994C13 /* TunnelStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelStatus.swift; sourceTree = ""; }; - 5F4541AD21C7704300994C13 /* NEVPNStatus+CustomStringConvertible.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NEVPNStatus+CustomStringConvertible.swift"; sourceTree = ""; }; 5F4541B121CBFAEE00994C13 /* String+ArrayConversion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+ArrayConversion.swift"; sourceTree = ""; }; 5F9696A921CD6AE6008063FE /* LegacyConfigMigration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyConfigMigration.swift; sourceTree = ""; }; 5F9696AF21CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TunnelConfiguration+WgQuickConfig.swift"; sourceTree = ""; }; @@ -315,7 +313,6 @@ 6FFA5DA32197085D0001E2F7 /* ActivateOnDemandSetting.swift */, 5F4541A821C451D100994C13 /* TunnelStatus.swift */, 6FB1017821C57DE600766195 /* MockTunnels.swift */, - 5F4541AD21C7704300994C13 /* NEVPNStatus+CustomStringConvertible.swift */, 6F7F7E5E21C7D74B00527607 /* TunnelErrors.swift */, ); path = Tunnel; @@ -723,7 +720,6 @@ 5F45418C21C2D48200994C13 /* TunnelEditKeyValueCell.swift in Sources */, 6FE254FB219C10800028284D /* ZipImporter.swift in Sources */, 6F7774EA217229DB006A79B3 /* IPAddressRange.swift in Sources */, - 5F4541AE21C7704300994C13 /* NEVPNStatus+CustomStringConvertible.swift in Sources */, 6F7774E82172020C006A79B3 /* TunnelConfiguration.swift in Sources */, 6FDEF7FB21863B6100D8FBF6 /* unzip.c in Sources */, 6F6899A8218044FC0012E523 /* Curve25519.swift in Sources */, diff --git a/WireGuard/WireGuard/Tunnel/NEVPNStatus+CustomStringConvertible.swift b/WireGuard/WireGuard/Tunnel/NEVPNStatus+CustomStringConvertible.swift deleted file mode 100644 index 0668b8a..0000000 --- a/WireGuard/WireGuard/Tunnel/NEVPNStatus+CustomStringConvertible.swift +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -// Copyright © 2018 WireGuard LLC. All Rights Reserved. - -import Foundation -import NetworkExtension - -extension NEVPNStatus: CustomDebugStringConvertible { - public var debugDescription: String { - switch self { - case .connected: return "connected" - case .connecting: return "connecting" - case .disconnected: return "disconnected" - case .disconnecting: return "disconnecting" - case .reasserting: return "reasserting" - case .invalid: return "invalid" - } - } -} diff --git a/WireGuard/WireGuard/Tunnel/TunnelStatus.swift b/WireGuard/WireGuard/Tunnel/TunnelStatus.swift index cfa1307..522e016 100644 --- a/WireGuard/WireGuard/Tunnel/TunnelStatus.swift +++ b/WireGuard/WireGuard/Tunnel/TunnelStatus.swift @@ -44,3 +44,16 @@ extension TunnelStatus: CustomDebugStringConvertible { } } } + +extension NEVPNStatus: CustomDebugStringConvertible { + public var debugDescription: String { + switch self { + case .connected: return "connected" + case .connecting: return "connecting" + case .disconnected: return "disconnected" + case .disconnecting: return "disconnecting" + case .reasserting: return "reasserting" + case .invalid: return "invalid" + } + } +}