TunnelsManager: Debugging helpers for tunnel status

This commit is contained in:
Roopesh Chander 2018-12-10 16:31:36 +05:30
parent 66bb9c94d4
commit 0472527617
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"
}
}
}