spirc.proto 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. syntax = "proto2";
  2. message Frame {
  3. optional uint32 version = 0x1;
  4. optional string ident = 0x2;
  5. optional string protocol_version = 0x3;
  6. optional uint32 seq_nr = 0x4;
  7. optional MessageType typ = 0x5;
  8. optional DeviceState device_state = 0x7;
  9. optional Goodbye goodbye = 0xb;
  10. optional State state = 0xc;
  11. optional uint32 position = 0xd;
  12. optional uint32 volume = 0xe;
  13. optional int64 state_update_id = 0x11;
  14. repeated string recipient = 0x12;
  15. optional bytes context_player_state = 0x13;
  16. optional string new_name = 0x14;
  17. optional Metadata metadata = 0x19;
  18. }
  19. enum MessageType {
  20. kMessageTypeHello = 0x1;
  21. kMessageTypeGoodbye = 0x2;
  22. kMessageTypeProbe = 0x3;
  23. kMessageTypeNotify = 0xa;
  24. kMessageTypeLoad = 0x14;
  25. kMessageTypePlay = 0x15;
  26. kMessageTypePause = 0x16;
  27. kMessageTypePlayPause = 0x17;
  28. kMessageTypeSeek = 0x18;
  29. kMessageTypePrev = 0x19;
  30. kMessageTypeNext = 0x1a;
  31. kMessageTypeVolume = 0x1b;
  32. kMessageTypeShuffle = 0x1c;
  33. kMessageTypeRepeat = 0x1d;
  34. kMessageTypeVolumeDown = 0x1f;
  35. kMessageTypeVolumeUp = 0x20;
  36. kMessageTypeReplace = 0x21;
  37. kMessageTypeLogout = 0x22;
  38. kMessageTypeAction = 0x23;
  39. kMessageTypeRename = 0x24;
  40. kMessageTypeUpdateMetadata = 0x80;
  41. }
  42. message DeviceState {
  43. optional string sw_version = 0x1;
  44. optional bool is_active = 0xa;
  45. optional bool can_play = 0xb;
  46. optional uint32 volume = 0xc;
  47. optional string name = 0xd;
  48. optional uint32 error_code = 0xe;
  49. optional int64 became_active_at = 0xf;
  50. optional string error_message = 0x10;
  51. repeated Capability capabilities = 0x11;
  52. optional string context_player_error = 0x14;
  53. repeated Metadata metadata = 0x19;
  54. }
  55. message Capability {
  56. optional CapabilityType typ = 0x1;
  57. repeated int64 intValue = 0x2;
  58. repeated string stringValue = 0x3;
  59. }
  60. enum CapabilityType {
  61. kSupportedContexts = 0x1;
  62. kCanBePlayer = 0x2;
  63. kRestrictToLocal = 0x3;
  64. kDeviceType = 0x4;
  65. kGaiaEqConnectId = 0x5;
  66. kSupportsLogout = 0x6;
  67. kIsObservable = 0x7;
  68. kVolumeSteps = 0x8;
  69. kSupportedTypes = 0x9;
  70. kCommandAcks = 0xa;
  71. kSupportsRename = 0xb;
  72. kHidden = 0xc;
  73. kSupportsPlaylistV2 = 0xd;
  74. }
  75. message Goodbye {
  76. optional string reason = 0x1;
  77. }
  78. message State {
  79. optional string context_uri = 0x2;
  80. optional uint32 index = 0x3;
  81. optional uint32 position_ms = 0x4;
  82. optional PlayStatus status = 0x5;
  83. optional uint64 position_measured_at = 0x7;
  84. optional string context_description = 0x8;
  85. optional bool shuffle = 0xd;
  86. optional bool repeat = 0xe;
  87. optional string last_command_ident = 0x14;
  88. optional uint32 last_command_msgid = 0x15;
  89. optional bool playing_from_fallback = 0x18;
  90. optional uint32 row = 0x19;
  91. optional uint32 playing_track_index = 0x1a;
  92. repeated TrackRef track = 0x1b;
  93. optional Ad ad = 0x1c;
  94. }
  95. enum PlayStatus {
  96. kPlayStatusStop = 0x0;
  97. kPlayStatusPlay = 0x1;
  98. kPlayStatusPause = 0x2;
  99. kPlayStatusLoading = 0x3;
  100. }
  101. message TrackRef {
  102. optional bytes gid = 0x1;
  103. optional string uri = 0x2;
  104. optional bool queued = 0x3;
  105. optional string context = 0x4;
  106. }
  107. message Ad {
  108. optional int32 next = 0x1;
  109. optional bytes ogg_fid = 0x2;
  110. optional bytes image_fid = 0x3;
  111. optional int32 duration = 0x4;
  112. optional string click_url = 0x5;
  113. optional string impression_url = 0x6;
  114. optional string product = 0x7;
  115. optional string advertiser = 0x8;
  116. optional bytes gid = 0x9;
  117. }
  118. message Metadata {
  119. optional string type = 0x1;
  120. optional string metadata = 0x2;
  121. }