diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-12-04 13:12:05 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-12-05 12:59:44 +0100 |
| commit | 602f18fac367b2213e3651181b4eccc55c806e94 (patch) | |
| tree | c7082b75e06ff2e33bcbdee8d78bd2a07dcc7503 | |
| parent | 77a43a2b6c85c5c3473095c2cde4c6ffb8863ef2 (diff) | |
| download | mullvadvpn-602f18fac367b2213e3651181b4eccc55c806e94.tar.xz mullvadvpn-602f18fac367b2213e3651181b4eccc55c806e94.zip | |
Add NEVPNStatus+Debug
| -rw-r--r-- | ios/MullvadVPN/NEVPNStatus+Debug.swift | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ios/MullvadVPN/NEVPNStatus+Debug.swift b/ios/MullvadVPN/NEVPNStatus+Debug.swift new file mode 100644 index 0000000000..c60b53b9f8 --- /dev/null +++ b/ios/MullvadVPN/NEVPNStatus+Debug.swift @@ -0,0 +1,33 @@ +// +// NEVPNStatus+Debug.swift +// MullvadVPN +// +// Created by pronebird on 28/11/2019. +// Copyright © 2019 Amagicom AB. All rights reserved. +// + +import Foundation +import NetworkExtension + +extension NEVPNStatus: CustomDebugStringConvertible { + public var debugDescription: String { + var output = "NEVPNStatus." + switch self { + case .connected: + output += "connected" + case .connecting: + output += "connecting" + case .disconnected: + output += "disconnected" + case .disconnecting: + output += "disconnecting" + case .invalid: + output += "invalid" + case .reasserting: + output += "reasserting" + @unknown default: + output += "\(self.rawValue)" + } + return output + } +} |
