spirc.proto 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. }
  18. enum MessageType {
  19. kMessageTypeHello = 0x1;
  20. kMessageTypeGoodbye = 0x2;
  21. kMessageTypeProbe = 0x3;
  22. kMessageTypeNotify = 0xa;
  23. kMessageTypeLoad = 0x14;
  24. kMessageTypePlay = 0x15;
  25. kMessageTypePause = 0x16;
  26. kMessageTypePlayPause = 0x17;
  27. kMessageTypeSeek = 0x18;
  28. kMessageTypePrev = 0x19;
  29. kMessageTypeNext = 0x1a;
  30. kMessageTypeVolume = 0x1b;
  31. kMessageTypeShuffle = 0x1c;
  32. kMessageTypeRepeat = 0x1d;
  33. kMessageTypeVolumeDown = 0x1f;
  34. kMessageTypeVolumeUp = 0x20;
  35. kMessageTypeReplace = 0x21;
  36. kMessageTypeLogout = 0x22;
  37. kMessageTypeAction = 0x23;
  38. kMessageTypeRename = 0x24;
  39. }
  40. message DeviceState {
  41. optional string sw_version = 0x1;
  42. optional bool is_active = 0xa;
  43. optional bool can_play = 0xb;
  44. optional uint32 volume = 0xc;
  45. optional string name = 0xd;
  46. optional uint32 error_code = 0xe;
  47. optional int64 became_active_at = 0xf;
  48. optional string error_message = 0x10;
  49. repeated Capability capabilities = 0x11;
  50. }
  51. message Capability {
  52. optional CapabilityType typ = 0x1;
  53. repeated int64 intValue = 0x2;
  54. repeated string stringValue = 0x3;
  55. }
  56. enum CapabilityType {
  57. kSupportedContexts = 0x1;
  58. kCanBePlayer = 0x2;
  59. kRestrictToLocal = 0x3;
  60. kDeviceType = 0x4;
  61. kGaiaEqConnectId = 0x5;
  62. kSupportsLogout = 0x6;
  63. kIsObservable = 0x7;
  64. kVolumeSteps = 0x8;
  65. kSupportedTypes = 0x9;
  66. kCommandAcks = 0xa;
  67. kSupportsRename = 0xb;
  68. }
  69. message Goodbye {
  70. optional string reason = 0x1;
  71. }
  72. message State {
  73. optional string context_uri = 0x2;
  74. optional uint32 index = 0x3;
  75. optional uint32 position_ms = 0x4;
  76. optional PlayStatus status = 0x5;
  77. optional uint64 position_measured_at = 0x7;
  78. optional string context_description = 0x8;
  79. optional bool shuffle = 0xd;
  80. optional bool repeat = 0xe;
  81. optional string last_command_ident = 0x14;
  82. optional uint32 last_command_msgid = 0x15;
  83. optional bool playing_from_fallback = 0x18;
  84. optional uint32 row = 0x19;
  85. optional uint32 playing_track_index = 0x1a;
  86. repeated TrackRef track = 0x1b;
  87. optional Ad ad = 0x1c;
  88. }
  89. enum PlayStatus {
  90. kPlayStatusStop = 0x0;
  91. kPlayStatusPlay = 0x1;
  92. kPlayStatusPause = 0x2;
  93. kPlayStatusLoading = 0x3;
  94. }
  95. message TrackRef {
  96. optional bytes gid = 0x1;
  97. optional string uri = 0x2;
  98. optional bool queued = 0x3;
  99. optional string context = 0x4;
  100. }
  101. message Ad {
  102. optional int32 next = 0x1;
  103. optional bytes ogg_fid = 0x2;
  104. optional bytes image_fid = 0x3;
  105. optional int32 duration = 0x4;
  106. optional string click_url = 0x5;
  107. optional string impression_url = 0x6;
  108. optional string product = 0x7;
  109. optional string advertiser = 0x8;
  110. optional bytes gid = 0x9;
  111. }