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

import Foundation

enum HomeTheaterNotificationReason {
    case availabilityChanged
    case volumeChanged
}

struct HomeTheaterNotificationPayload {
    var channel: IoTHomeTheaterChannel
}

struct HomeTheaterNotification: PlayerControllerNotification {
    static var name = Notification.Name.HomeTheaterStateDidChangeNotification
    var sender: PlayerControllerProtocol
    var player: IoTPlayer
    var reason: HomeTheaterNotificationReason
    var payload: HomeTheaterNotificationPayload
}

extension IoTHomeTheaterChannel {

    static func allValues() -> [IoTHomeTheaterChannel] {
        return [IoTHomeTheaterChannel.subwoofer,
                IoTHomeTheaterChannel.leftSurround,
                IoTHomeTheaterChannel.rightSurround,
                IoTHomeTheaterChannel.leftRearSurround,
                IoTHomeTheaterChannel.rightRearSurround,
                IoTHomeTheaterChannel.leftUpfiringSurround,
                IoTHomeTheaterChannel.rightUpfiringSurround,
                IoTHomeTheaterChannel.leftRearUpfiringSurround,
                IoTHomeTheaterChannel.rightRearUpfiringSurround]
    }
}
