spirc.proto 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. }
  58. message Capability {
  59. optional CapabilityType typ = 0x1;
  60. repeated int64 intValue = 0x2;
  61. repeated string stringValue = 0x3;
  62. }
  63. message DeviceState {
  64. optional string sw_version = 0x1;
  65. optional bool is_active = 0xa;
  66. optional bool can_play = 0xb;
  67. optional uint32 volume = 0xc;
  68. optional string name = 0xd;
  69. optional uint32 error_code = 0xe;
  70. optional int64 became_active_at = 0xf;
  71. optional string error_message = 0x10;
  72. repeated Capability capabilities = 0x11;
  73. repeated string local_uris = 0x12;
  74. }
  75. message Frame {
  76. optional uint32 version = 0x1;
  77. optional string ident = 0x2;
  78. optional string protocol_version = 0x3;
  79. optional uint32 seq_nr = 0x4;
  80. optional MessageType typ = 0x5;
  81. optional DeviceState device_state = 0x7;
  82. optional State state = 0xc;
  83. optional uint32 position = 0xd;
  84. optional uint32 volume = 0xe;
  85. optional int64 state_update_id = 0x11;
  86. repeated string recipient = 0x12;
  87. }