syntax = "proto2";

import "pyatv/protocols/mrp/protobuf/ProtocolMessage.proto";
import "pyatv/protocols/mrp/protobuf/Common.proto";


extend ProtocolMessage {
  optional UpdateOutputDeviceMessage updateOutputDeviceMessage = 69;
}

message AVOutputDeviceSourceInfo {
  optional string routingContextUID = 1;
  optional bool multipleBuiltInDevices = 2;
}

message AVOutputDeviceDescriptor {
  optional string name = 1;
  optional string uniqueIdentifier = 2;
  optional string groupID = 3;
  optional string modelID = 4;
  optional bytes macAddress = 5;
  optional bool canAccessRemoteAssets = 6;
  optional bool isRemoteControllable = 7;
  optional bool isGroupLeader = 8;
  optional bool isGroupable = 9;
  optional DeviceType.Enum deviceType = 10;
  optional DeviceSubType.Enum deviceSubType = 11;
  optional bytes modelSpecificInfoData = 12;
  optional float batteryLevel = 13;
  optional bool isLocalDevice = 14;
  optional bool supportsExternalScreen = 15;
  optional bool requiresAuthorization = 16;
  optional bool shouldForceRemoteControlabillity = 17;
  optional AVOutputDeviceSourceInfo sourceInfo = 18;
  optional bool isDeviceGroupable = 19;
  optional bool canRelayCommunicationChannel = 20;
  optional string logicalDeviceID = 21;
  optional bool isProxyGroupPlayer = 22;
  optional string firmwareVersion = 23;
  optional float volume = 24;
  optional bool isVolumeControlAvailable = 25;
  optional bool canAccessAppleMusic = 26;
  optional bool canAccessiCloudMusicLibrary = 27;
  optional bool groupContainsGroupLeader = 28;
  optional bool supportsBufferedAirPlay = 29;
  optional bool canPlayEncryptedProgressiveDownloadAssets = 30;
  optional bool canFetchMediaDataFromSender = 31;
  optional bool resentsOptimizedUserInterfaceWhenPlayingFetchedAudioOnlyAssets = 32;
  optional bool isAirPlayReceiverSessionActive = 33;
  optional string parentGroupIdentifier = 34;
  optional bool parentGroupContainsDiscoverableLeader = 35;
  optional bool isAddedToHomeKit = 36;
  optional int32 volumeCapabilities = 37;
  optional string bluetoothID = 38;
  optional bool supportsHAP = 39;
  optional bool usingJSONProtocol = 40;
  repeated AVOutputDeviceDescriptor clusterCompositions = 41;
  optional uint32 clusterType = 42;
  optional string primaryUID = 43;
  optional uint32 configuredClusterSize = 44;
  optional bool producesLowFidelityAudio = 49;
}

message UpdateOutputDeviceMessage {
  repeated AVOutputDeviceDescriptor outputDevices = 1;
  optional string endpointUID = 2;
  repeated AVOutputDeviceDescriptor clusterAwareOutputDevices = 3;
}
