2
0

spirc.pb.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. /* Automatically generated nanopb header */
  2. /* Generated by nanopb-0.4.6-dev */
  3. #ifndef PB_PROTOBUF_SPIRC_PB_H_INCLUDED
  4. #define PB_PROTOBUF_SPIRC_PB_H_INCLUDED
  5. #include <pb.h>
  6. #if PB_PROTO_HEADER_VERSION != 40
  7. #error Regenerate this file with the current version of nanopb generator.
  8. #endif
  9. /* Enum definitions */
  10. typedef enum _MessageType {
  11. MessageType_kMessageTypeHello = 1,
  12. MessageType_kMessageTypeGoodbye = 2,
  13. MessageType_kMessageTypeProbe = 3,
  14. MessageType_kMessageTypeNotify = 10,
  15. MessageType_kMessageTypeLoad = 20,
  16. MessageType_kMessageTypePlay = 21,
  17. MessageType_kMessageTypePause = 22,
  18. MessageType_kMessageTypePlayPause = 23,
  19. MessageType_kMessageTypeSeek = 24,
  20. MessageType_kMessageTypePrev = 25,
  21. MessageType_kMessageTypeNext = 26,
  22. MessageType_kMessageTypeVolume = 27,
  23. MessageType_kMessageTypeShuffle = 28,
  24. MessageType_kMessageTypeRepeat = 29,
  25. MessageType_kMessageTypeVolumeDown = 31,
  26. MessageType_kMessageTypeVolumeUp = 32,
  27. MessageType_kMessageTypeReplace = 33,
  28. MessageType_kMessageTypeLogout = 34,
  29. MessageType_kMessageTypeAction = 35
  30. } MessageType;
  31. typedef enum _PlayStatus {
  32. PlayStatus_kPlayStatusStop = 0,
  33. PlayStatus_kPlayStatusPlay = 1,
  34. PlayStatus_kPlayStatusPause = 2,
  35. PlayStatus_kPlayStatusLoading = 3
  36. } PlayStatus;
  37. typedef enum _CapabilityType {
  38. CapabilityType_kSupportedContexts = 1,
  39. CapabilityType_kCanBePlayer = 2,
  40. CapabilityType_kRestrictToLocal = 3,
  41. CapabilityType_kDeviceType = 4,
  42. CapabilityType_kGaiaEqConnectId = 5,
  43. CapabilityType_kSupportsLogout = 6,
  44. CapabilityType_kIsObservable = 7,
  45. CapabilityType_kVolumeSteps = 8,
  46. CapabilityType_kSupportedTypes = 9,
  47. CapabilityType_kCommandAcks = 10
  48. } CapabilityType;
  49. /* Struct definitions */
  50. typedef struct _Capability {
  51. bool has_typ;
  52. CapabilityType typ;
  53. pb_size_t intValue_count;
  54. int64_t intValue[50];
  55. pb_size_t stringValue_count;
  56. char stringValue[50][50];
  57. } Capability;
  58. typedef PB_BYTES_ARRAY_T(128) TrackRef_gid_t;
  59. typedef struct _TrackRef {
  60. bool has_gid;
  61. TrackRef_gid_t gid;
  62. bool has_uri;
  63. char uri[256];
  64. bool has_queued;
  65. bool queued;
  66. pb_callback_t context;
  67. } TrackRef;
  68. typedef struct _DeviceState {
  69. bool has_sw_version;
  70. char sw_version[64];
  71. bool has_is_active;
  72. bool is_active;
  73. bool has_can_play;
  74. bool can_play;
  75. bool has_volume;
  76. uint32_t volume;
  77. bool has_name;
  78. char name[64];
  79. bool has_error_code;
  80. uint32_t error_code;
  81. bool has_became_active_at;
  82. int64_t became_active_at;
  83. pb_callback_t error_message;
  84. pb_size_t capabilities_count;
  85. Capability capabilities[17];
  86. pb_callback_t local_uris;
  87. } DeviceState;
  88. typedef struct _State {
  89. bool has_context_uri;
  90. char context_uri[256];
  91. bool has_index;
  92. uint32_t index;
  93. bool has_position_ms;
  94. uint32_t position_ms;
  95. bool has_status;
  96. PlayStatus status;
  97. bool has_position_measured_at;
  98. uint64_t position_measured_at;
  99. pb_callback_t context_description;
  100. bool has_shuffle;
  101. bool shuffle;
  102. bool has_repeat;
  103. bool repeat;
  104. bool has_playing_track_index;
  105. uint32_t playing_track_index;
  106. pb_size_t track_count;
  107. TrackRef track[100];
  108. } State;
  109. typedef struct _Frame {
  110. bool has_version;
  111. uint32_t version;
  112. bool has_ident;
  113. char ident[64];
  114. bool has_protocol_version;
  115. char protocol_version[64];
  116. bool has_seq_nr;
  117. uint32_t seq_nr;
  118. bool has_typ;
  119. MessageType typ;
  120. bool has_device_state;
  121. DeviceState device_state;
  122. bool has_state;
  123. State state;
  124. bool has_position;
  125. uint32_t position;
  126. bool has_volume;
  127. uint32_t volume;
  128. bool has_state_update_id;
  129. int64_t state_update_id;
  130. pb_size_t recipient_count;
  131. char recipient[64][64];
  132. } Frame;
  133. /* Helper constants for enums */
  134. #define _MessageType_MIN MessageType_kMessageTypeHello
  135. #define _MessageType_MAX MessageType_kMessageTypeAction
  136. #define _MessageType_ARRAYSIZE ((MessageType)(MessageType_kMessageTypeAction+1))
  137. #define _PlayStatus_MIN PlayStatus_kPlayStatusStop
  138. #define _PlayStatus_MAX PlayStatus_kPlayStatusLoading
  139. #define _PlayStatus_ARRAYSIZE ((PlayStatus)(PlayStatus_kPlayStatusLoading+1))
  140. #define _CapabilityType_MIN CapabilityType_kSupportedContexts
  141. #define _CapabilityType_MAX CapabilityType_kCommandAcks
  142. #define _CapabilityType_ARRAYSIZE ((CapabilityType)(CapabilityType_kCommandAcks+1))
  143. #ifdef __cplusplus
  144. extern "C" {
  145. #endif
  146. /* Initializer values for message structs */
  147. #define TrackRef_init_default {false, {0, {0}}, false, "", false, 0, {{NULL}, NULL}}
  148. #define State_init_default {false, "", false, 0, false, 0, false, _PlayStatus_MIN, false, 0, {{NULL}, NULL}, false, 0, false, 0, false, 0, 0, {TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default, TrackRef_init_default}}
  149. #define Capability_init_default {false, _CapabilityType_MIN, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}}
  150. #define DeviceState_init_default {false, "", false, 0, false, 0, false, 0, false, "", false, 0, false, 0, {{NULL}, NULL}, 0, {Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default, Capability_init_default}, {{NULL}, NULL}}
  151. #define Frame_init_default {false, 0, false, "", false, "", false, 0, false, _MessageType_MIN, false, DeviceState_init_default, false, State_init_default, false, 0, false, 0, false, 0, 0, {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}}
  152. #define TrackRef_init_zero {false, {0, {0}}, false, "", false, 0, {{NULL}, NULL}}
  153. #define State_init_zero {false, "", false, 0, false, 0, false, _PlayStatus_MIN, false, 0, {{NULL}, NULL}, false, 0, false, 0, false, 0, 0, {TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero, TrackRef_init_zero}}
  154. #define Capability_init_zero {false, _CapabilityType_MIN, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}}
  155. #define DeviceState_init_zero {false, "", false, 0, false, 0, false, 0, false, "", false, 0, false, 0, {{NULL}, NULL}, 0, {Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero, Capability_init_zero}, {{NULL}, NULL}}
  156. #define Frame_init_zero {false, 0, false, "", false, "", false, 0, false, _MessageType_MIN, false, DeviceState_init_zero, false, State_init_zero, false, 0, false, 0, false, 0, 0, {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}}
  157. /* Field tags (for use in manual encoding/decoding) */
  158. #define Capability_typ_tag 1
  159. #define Capability_intValue_tag 2
  160. #define Capability_stringValue_tag 3
  161. #define TrackRef_gid_tag 1
  162. #define TrackRef_uri_tag 2
  163. #define TrackRef_queued_tag 3
  164. #define TrackRef_context_tag 4
  165. #define DeviceState_sw_version_tag 1
  166. #define DeviceState_is_active_tag 10
  167. #define DeviceState_can_play_tag 11
  168. #define DeviceState_volume_tag 12
  169. #define DeviceState_name_tag 13
  170. #define DeviceState_error_code_tag 14
  171. #define DeviceState_became_active_at_tag 15
  172. #define DeviceState_error_message_tag 16
  173. #define DeviceState_capabilities_tag 17
  174. #define DeviceState_local_uris_tag 18
  175. #define State_context_uri_tag 2
  176. #define State_index_tag 3
  177. #define State_position_ms_tag 4
  178. #define State_status_tag 5
  179. #define State_position_measured_at_tag 7
  180. #define State_context_description_tag 8
  181. #define State_shuffle_tag 13
  182. #define State_repeat_tag 14
  183. #define State_playing_track_index_tag 26
  184. #define State_track_tag 27
  185. #define Frame_version_tag 1
  186. #define Frame_ident_tag 2
  187. #define Frame_protocol_version_tag 3
  188. #define Frame_seq_nr_tag 4
  189. #define Frame_typ_tag 5
  190. #define Frame_device_state_tag 7
  191. #define Frame_state_tag 12
  192. #define Frame_position_tag 13
  193. #define Frame_volume_tag 14
  194. #define Frame_state_update_id_tag 17
  195. #define Frame_recipient_tag 18
  196. /* Struct field encoding specification for nanopb */
  197. #define TrackRef_FIELDLIST(X, a) \
  198. X(a, STATIC, OPTIONAL, BYTES, gid, 1) \
  199. X(a, STATIC, OPTIONAL, STRING, uri, 2) \
  200. X(a, STATIC, OPTIONAL, BOOL, queued, 3) \
  201. X(a, CALLBACK, OPTIONAL, STRING, context, 4)
  202. #define TrackRef_CALLBACK pb_default_field_callback
  203. #define TrackRef_DEFAULT NULL
  204. #define State_FIELDLIST(X, a) \
  205. X(a, STATIC, OPTIONAL, STRING, context_uri, 2) \
  206. X(a, STATIC, OPTIONAL, UINT32, index, 3) \
  207. X(a, STATIC, OPTIONAL, UINT32, position_ms, 4) \
  208. X(a, STATIC, OPTIONAL, UENUM, status, 5) \
  209. X(a, STATIC, OPTIONAL, UINT64, position_measured_at, 7) \
  210. X(a, CALLBACK, OPTIONAL, STRING, context_description, 8) \
  211. X(a, STATIC, OPTIONAL, BOOL, shuffle, 13) \
  212. X(a, STATIC, OPTIONAL, BOOL, repeat, 14) \
  213. X(a, STATIC, OPTIONAL, UINT32, playing_track_index, 26) \
  214. X(a, STATIC, REPEATED, MESSAGE, track, 27)
  215. #define State_CALLBACK pb_default_field_callback
  216. #define State_DEFAULT NULL
  217. #define State_track_MSGTYPE TrackRef
  218. #define Capability_FIELDLIST(X, a) \
  219. X(a, STATIC, OPTIONAL, UENUM, typ, 1) \
  220. X(a, STATIC, REPEATED, INT64, intValue, 2) \
  221. X(a, STATIC, REPEATED, STRING, stringValue, 3)
  222. #define Capability_CALLBACK NULL
  223. #define Capability_DEFAULT (const pb_byte_t*)"\x08\x01\x00"
  224. #define DeviceState_FIELDLIST(X, a) \
  225. X(a, STATIC, OPTIONAL, STRING, sw_version, 1) \
  226. X(a, STATIC, OPTIONAL, BOOL, is_active, 10) \
  227. X(a, STATIC, OPTIONAL, BOOL, can_play, 11) \
  228. X(a, STATIC, OPTIONAL, UINT32, volume, 12) \
  229. X(a, STATIC, OPTIONAL, STRING, name, 13) \
  230. X(a, STATIC, OPTIONAL, UINT32, error_code, 14) \
  231. X(a, STATIC, OPTIONAL, INT64, became_active_at, 15) \
  232. X(a, CALLBACK, OPTIONAL, STRING, error_message, 16) \
  233. X(a, STATIC, REPEATED, MESSAGE, capabilities, 17) \
  234. X(a, CALLBACK, REPEATED, STRING, local_uris, 18)
  235. #define DeviceState_CALLBACK pb_default_field_callback
  236. #define DeviceState_DEFAULT NULL
  237. #define DeviceState_capabilities_MSGTYPE Capability
  238. #define Frame_FIELDLIST(X, a) \
  239. X(a, STATIC, OPTIONAL, UINT32, version, 1) \
  240. X(a, STATIC, OPTIONAL, STRING, ident, 2) \
  241. X(a, STATIC, OPTIONAL, STRING, protocol_version, 3) \
  242. X(a, STATIC, OPTIONAL, UINT32, seq_nr, 4) \
  243. X(a, STATIC, OPTIONAL, UENUM, typ, 5) \
  244. X(a, STATIC, OPTIONAL, MESSAGE, device_state, 7) \
  245. X(a, STATIC, OPTIONAL, MESSAGE, state, 12) \
  246. X(a, STATIC, OPTIONAL, UINT32, position, 13) \
  247. X(a, STATIC, OPTIONAL, UINT32, volume, 14) \
  248. X(a, STATIC, OPTIONAL, INT64, state_update_id, 17) \
  249. X(a, STATIC, REPEATED, STRING, recipient, 18)
  250. #define Frame_CALLBACK NULL
  251. #define Frame_DEFAULT (const pb_byte_t*)"\x28\x01\x00"
  252. #define Frame_device_state_MSGTYPE DeviceState
  253. #define Frame_state_MSGTYPE State
  254. extern const pb_msgdesc_t TrackRef_msg;
  255. extern const pb_msgdesc_t State_msg;
  256. extern const pb_msgdesc_t Capability_msg;
  257. extern const pb_msgdesc_t DeviceState_msg;
  258. extern const pb_msgdesc_t Frame_msg;
  259. /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
  260. #define TrackRef_fields &TrackRef_msg
  261. #define State_fields &State_msg
  262. #define Capability_fields &Capability_msg
  263. #define DeviceState_fields &DeviceState_msg
  264. #define Frame_fields &Frame_msg
  265. /* Maximum encoded size of messages (where known) */
  266. /* TrackRef_size depends on runtime parameters */
  267. /* State_size depends on runtime parameters */
  268. /* DeviceState_size depends on runtime parameters */
  269. /* Frame_size depends on runtime parameters */
  270. #define Capability_size 3102
  271. #ifdef __cplusplus
  272. } /* extern "C" */
  273. #endif
  274. #endif