Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pyatv/protocols/mrp/protobuf/re_protos/foundation/Color.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto2";


message Color {
optional float red = 1;
optional float green = 2;
optional float blue = 3;
optional float alpha = 4;
}
264 changes: 264 additions & 0 deletions pyatv/protocols/mrp/protobuf/re_protos/foundation/Common.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
syntax = "proto2";

message RepeatMode {
enum Enum {
Unknown = 0;
Off = 1;
One = 2;
All = 3;
}
}

message ShuffleMode {
enum Enum {
Unknown = 0;
Off = 1;
Albums = 2;
Songs = 3;
}
}

message DeviceClass {
enum Enum {
Invalid = 0;
iPhone = 1;
iPod = 2;
iPad = 3;
AppleTV = 4;
iFPGA = 5;
Watch = 6;
Accessory = 7;
Bridge = 8;
Mac = 9;
Android = 10;
Web = 11;
AppleDisplay = 12;
RealityDevice = 13;
}
}

message DeviceType {
enum Enum {
Unknown = 0;
AirPlay = 1;
Bluetooth = 2;
CarPlay = 3;
BuiltIn = 4;
Wired = 5;
}
}

message DeviceSubType {
enum Enum {
Default = 0;
Speaker = 1;
Headphones = 2;
Headset = 3;
Receiver = 4;
LineOut = 5;
USB = 6;
DisplayPort = 7;
HDMI = 8;
LowEnergy = 9;
SPDIF = 10;
TV = 11;
HomePod = 12;
AppleTV = 13;
Vehicle = 14;
Cluster = 15;
SetTopBox = 16;
TVStick = 17;
Mac = 18;
iOS = 19;
Watch = 20;
Vision = 21;
}
}

message PlaybackState {
enum Enum {
Unknown = 0;
Playing = 1;
Paused = 2;
Stopped = 3;
Interrupted = 4;
Seeking = 5;
}
}


message AudioTier {
enum Enum {
LowBandwidthStereo = 1;
HighQualityStereo = 2;
Lossless = 3;
HighResolutionLossless = 4;
Spatial = 5;
}
}

message SongTraits {
enum Enum {
None = 0;
AppleDigitalMaster = 1;
Lossless = 2;
HighResolutionLossless = 4;
Spatial = 8;
Atmos = 16;
Surround = 32;
}
}

message AlbumTraits {
enum Enum {
None = 0;
AppleDigitalMaster = 1;
Lossless = 2;
HighResolutionLossless = 4;
Spatial = 8;
Atmos = 16;
Surround = 32;
}
}

message PlaylistTraits {
enum Enum {
None = 0;
Spatial = 8;
Atmos = 16;
Surround = 32;
}
}

message ActiveFormatJustification {
enum Enum {
Unknown = 0;
Unavailable = 1;
UserPreference = 100;
UserDownload = 101;
RouteIncompatible = 500;
RouteUnknownCompatibility = 501;
BandwidthInsufficient = 1000;
}
}

message FormatTier {
enum Enum {
LowBandwidthStereo = 1;
HighQualityStereo = 2;
Lossless = 4;
HighResolutionLossless = 8;
Spatial = 16;
}
}

message AudioRouteType {
enum Enum {
Unknown = 0;
DevicesSpeaker = 1;
LineOut = 2;
Headphones = 3;
BluetoothHeadphones = 4;
BluetoothSpeaker = 5;
USBAudio = 6;
CarAudio = 7;
HDMI = 8;
AirPlay = 9;
}
}
message GroupSessionRouteType {

enum Enum{
Unknown = 0;
CarKit = 1;
CarPlay = 2;
Speaker = 5;
HomePod = 8;
HomePodMini = 9;
AppleTV = 11;
}
}
message EndpointOptions {
enum Enum {
None = 0;
UpdateActiveEndpoint = 1;
FallbackToAddOutputDevices = 2;
AllowMigrateToGroup = 4;
AllowMigrateFromGroup = 8;
}
}


message PlayerOptions {
enum Enum {
None = 0;
RestoreDestinationPlaybackState = 1;
PlayDestination = 2;
PauseSource = 4;
RestorePlaybackPosition = 8;
RestorePlaybackRate = 16;
}
}
message RecipeType {
enum Enum {
NotPossible = 0;
Legacy = 1;
OneShot = 2;
}
}

message PlaybackSessionMigrateRequestEventRole {
enum Enum {
Unknown = 0;
Receptionist = 1;
Source = 2;
Destination = 3;
InApp = 4;
Hijacked = 5;
Group = 6;
}
}

message ClusterType {
enum Enum {
None = 0;
StereoPair = 1;
HomeTheater = 2;
GenericAudio = 3;
}
}

message VirtualTouchPhase {
enum Enum {
Unknown = 0;
Began = 1;
Moved = 2;
Stationary = 3;
Ended = 4;
Cancelled = 5;
}
}

message ReplaceIntent {
enum Enum {
NonDestructive = 1;
ClearUpNext = 2;
KeepUpNext = 3;
LeaveSharedSession = 4;
}
}
message PlaybackQueueType {
enum Enum {
Unknown = 1;
Generic = 2;
Custom = 3;
Empty = 4;
}
}

message ChangeType {
enum Enum {
Immediate = 0;
Deferrable = 1;
}
}
79 changes: 79 additions & 0 deletions pyatv/protocols/mrp/protobuf/re_protos/foundation/Dictionary.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
syntax = "proto2";

/*
* Dictionary
*
* A dictionary implemented as a repeated list of key/value pairs.
* Keys are strings.
* Values are dynamically typed via MRValueProtobuf.
*/
message Dictionary {

// Repeated key/value entries
repeated KeyValuePair pair = 1;
}

/*
* KeyValuePair
*
* Represents a single dictionary entry.
* - key is REQUIRED (writer crashes if missing)
* - value is REQUIRED (writer crashes if missing)
*/
message KeyValuePair {

// Dictionary key
required string key = 1;

// Dictionary value (variant type)
required Value value = 2;
}

/*
* Value
*
* Dynamically typed value container.
*
* This is NOT a proto3 oneof.
* Presence is tracked via a private _has bitfield.
*
* Supported types:
* - string
* - int64
* - float
* - double
* - bytes
* - bool
* - date (string-encoded)
* - array (repeated MRValueProtobuf)
* - dictionary (MRDictionaryProtobuf)
*/
message Value {

// String value
optional string stringValue = 1;

// Integer value
optional int64 int64Value = 2;

// Float value
optional float floatValue = 3;

// Double value
optional double doubleValue = 4;

// Raw data value
optional bytes dataValue = 5;

// Boolean value
optional bool boolValue = 6;

// Date value (string-encoded, likely ISO-8601)
optional string dateValue = 7;

// Array of values
repeated Value arrayValues = 8;

// Nested dictionary
optional Dictionary dictionaryValue = 9;
}
Loading
Loading