aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-22 15:46:28 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-22 15:46:28 +0530
commitfd29cf3402ad014c1990fd6c6dc6a23fea216efe (patch)
treef2ad9921bc63262312d815aec3e43bfd9a4dab24 /WireGuard/WireGuard
parentAlso refresh status (diff)
downloadwireguard-apple-fd29cf3402ad014c1990fd6c6dc6a23fea216efe.tar.xz
wireguard-apple-fd29cf3402ad014c1990fd6c6dc6a23fea216efe.zip
TunnelStatus: Absorb NEVPNStatus+CustomStringConvertible
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard')
-rw-r--r--WireGuard/WireGuard/Tunnel/NEVPNStatus+CustomStringConvertible.swift18
-rw-r--r--WireGuard/WireGuard/Tunnel/TunnelStatus.swift13
2 files changed, 13 insertions, 18 deletions
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"
+ }
+ }
+}