summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN/NEProviderStopReason+Debug.swift
blob: 2162212eff45a8f32eb89358fa2ac174e5064a59 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
//  NEProviderStopReason+Debug.swift
//  PacketTunnel
//
//  Created by pronebird on 14/04/2020.
//  Copyright © 2020 Mullvad VPN AB. All rights reserved.
//

import Foundation
import NetworkExtension

extension NEProviderStopReason: CustomDebugStringConvertible {
    public var debugDescription: String {
        var output = "NEProviderStopReason."
        switch self {
        case .none:
            output += "none"
        case .userInitiated:
            output += "userInitiated"
        case .providerFailed:
            output += "providerFailed"
        case .noNetworkAvailable:
            output += "noNetworkAvailable"
        case .unrecoverableNetworkChange:
            output += "unrecoverableNetworkChange"
        case .providerDisabled:
            output += "providerDisabled"
        case .authenticationCanceled:
            output += "authenticationCanceled"
        case .configurationFailed:
            output += "configurationFailed"
        case .idleTimeout:
            output += "idleTimeout"
        case .configurationDisabled:
            output += "configurationDisabled"
        case .configurationRemoved:
            output += "configurationRemoved"
        case .superceded:
            output += "superceded"
        case .userLogout:
            output += "userLogout"
        case .userSwitch:
            output += "userSwitch"
        case .connectionFailed:
            output += "connectionFailed"
        case .sleep:
            output += "sleep"
        case .appUpdate:
            output += "appUpdate"
        @unknown default:
            output += "\(self.rawValue)"
        }
        return output
    }
}