spirc.proto 2.6 KB

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