summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN/NEVPNStatus+Debug.swift
blob: 387a9f73a6e737a4caeb4dba9a8caaa8a616fd8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
//  NEVPNStatus+Debug.swift
//  MullvadVPN
//
//  Created by pronebird on 28/11/2019.
//  Copyright © 2019 Mullvad VPN 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
    }
}