TunnelsManager: Debugging helpers for tunnel status

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2018-12-10 16:31:36 +05:30
parent b491b9c371
commit 663bb02c68
1 changed files with 27 additions and 0 deletions

View File

@ -483,3 +483,30 @@ class TunnelContainer: NSObject {
}
}
}
extension TunnelStatus: CustomDebugStringConvertible {
public var debugDescription: String {
switch (self) {
case .inactive: return "inactive"
case .activating: return "activating"
case .active: return "active"
case .deactivating: return "deactivating"
case .reasserting: return "reasserting"
case .restarting: return "restarting"
case .waiting: return "waiting"
}
}
}
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"
}
}
}