//
// © 2019-2020 Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.
//

import Foundation

enum DeviceConnectivityState {
    case missing
    case present
    case enabled
}

struct DeviceConnectivityInfo {
    let bluetooth: DeviceConnectivityState
    let zigbee: DeviceConnectivityState
    let wifi: DeviceConnectivityState
    let avsVoiceUI: DeviceConnectivityState
    let gvaVoiceUI: DeviceConnectivityState
    let cortanaVoiceUI: DeviceConnectivityState
    let modularVoiceUI: DeviceConnectivityState

    static func allMissing() -> DeviceConnectivityInfo {
        return DeviceConnectivityInfo(bluetooth: .missing,
                                      zigbee: .missing,
                                      wifi: .missing,
                                      avsVoiceUI: .missing,
                                      gvaVoiceUI: .missing,
                                      cortanaVoiceUI: .missing,
                                      modularVoiceUI: .missing)
    }
    
    func anyPresent() -> Bool {
        return bluetooth != .missing ||
            zigbee != .missing ||
            wifi != .missing ||
            avsVoiceUI != .missing ||
            gvaVoiceUI != .missing ||
            cortanaVoiceUI != .missing ||
            modularVoiceUI != .missing
    }
}
