2
0

spirc.proto 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. syntax = "proto2";
  2. enum MessageType {
  3. kMessageTypeHello = 0x1;
  4. kMessageTypeGoodbye = 0x2;
  5. kMessageTypeProbe = 0x3;
  6. kMessageTypeNotify = 0xa;
  7. kMessageTypeLoad = 0x14;
  8. kMessageTypePlay = 0x15;
  9. kMessageTypePause = 0x16;
  10. kMessageTypePlayPause = 0x17;
  11. kMessageTypeSeek = 0x18;
  12. kMessageTypePrev = 0x19;
  13. kMessageTypeNext = 0x1a;
  14. kMessageTypeVolume = 0x1b;
  15. kMessageTypeShuffle = 0x1c;
  16. kMessageTypeRepeat = 0x1d;
  17. kMessageTypeVolumeDown = 0x1f;
  18. kMessageTypeVolumeUp = 0x20;
  19. kMessageTypeReplace = 0x21;
  20. kMessageTypeLogout = 0x22;
  21. kMessageTypeAction = 0x23;
  22. }
  23. enum PlayStatus {
  24. kPlayStatusStop = 0x0;
  25. kPlayStatusPlay = 0x1;
  26. kPlayStatusPause = 0x2;
  27. kPlayStatusLoading = 0x3;
  28. }
  29. message TrackRef {
  30. optional bytes gid = 0x1;
  31. optional string uri = 0x2;
  32. optional bool queued = 0x3;
  33. optional string context = 0x4;
  34. }
  35. message State {
  36. optional string context_uri = 0x2;
  37. optional uint32 index = 0x3;
  38. optional uint32 position_ms = 0x4;
  39. optional PlayStatus status = 0x5;
  40. optional uint64 position_measured_at = 0x7;
  41. optional string context_description = 0x8;
  42. optional bool shuffle = 0xd;
  43. optional bool repeat = 0xe;
  44. optional uint32 playing_track_index = 0x1a;
  45. repeated TrackRef track = 0x1b;
  46. }
  47. enum CapabilityType {
  48. kSupportedContexts = 0x1;
  49. kCanBePlayer = 0x2;
  50. kRestrictToLocal = 0x3;
  51. kDeviceType = 0x4;
  52. kGaiaEqConnectId = 0x5;
  53. kSupportsLogout = 0x6;
  54. kIsObservable = 0x7;
  55. kVolumeSteps = 0x8;
  56. kSupportedTypes = 0x9;
  57. kCommandAcks = 0xa;
  58. kSupportsRename = 0xb;
  59. kHidden = 0xc;
  60. kSupportsPlaylistV2 = 0xd;
  61. kSupportsExternalEpisodes = 0xe;
  62. }
  63. message Capability {
  64. optional CapabilityType typ = 0x1;
  65. repeated int64 intValue = 0x2;
  66. repeated string stringValue = 0x3;
  67. }
  68. message DeviceState {
  69. optional string sw_version = 0x1;
  70. optional bool is_active = 0xa;
  71. optional bool can_play = 0xb;
  72. optional uint32 volume = 0xc;
  73. optional string name = 0xd;
  74. optional uint32 error_code = 0xe;
  75. optional int64 became_active_at = 0xf;
  76. optional string error_message = 0x10;
  77. repeated Capability capabilities = 0x11;
  78. repeated string local_uris = 0x12;
  79. }
  80. message Frame {
  81. optional uint32 version = 0x1;
  82. optional string ident = 0x2;
  83. optional string protocol_version = 0x3;
  84. optional uint32 seq_nr = 0x4;
  85. optional MessageType typ = 0x5;
  86. optional DeviceState device_state = 0x7;
  87. optional State state = 0xc;
  88. optional uint32 position = 0xd;
  89. optional uint32 volume = 0xe;
  90. optional int64 state_update_id = 0x11;
  91. repeated string recipient = 0x12;
  92. }