spirc.pb.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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 struct _State {
  59. char *context_uri;
  60. bool has_index;
  61. uint32_t index;
  62. bool has_position_ms;
  63. uint32_t position_ms;
  64. bool has_status;
  65. PlayStatus status;
  66. bool has_position_measured_at;
  67. uint64_t position_measured_at;
  68. pb_callback_t context_description;
  69. bool has_shuffle;
  70. bool shuffle;
  71. bool has_repeat;
  72. bool repeat;
  73. bool has_playing_track_index;
  74. uint32_t playing_track_index;
  75. pb_size_t track_count;
  76. struct _TrackRef *track;
  77. } State;
  78. typedef struct _TrackRef {
  79. pb_bytes_array_t *gid;
  80. char *uri;
  81. bool has_queued;
  82. bool queued;
  83. char *context;
  84. } TrackRef;
  85. typedef struct _DeviceState {
  86. char *sw_version;
  87. bool has_is_active;
  88. bool is_active;
  89. bool has_can_play;
  90. bool can_play;
  91. bool has_volume;
  92. uint32_t volume;
  93. char *name;
  94. bool has_error_code;
  95. uint32_t error_code;
  96. bool has_became_active_at;
  97. int64_t became_active_at;
  98. pb_callback_t error_message;
  99. pb_size_t capabilities_count;
  100. Capability capabilities[17];
  101. pb_callback_t local_uris;
  102. } DeviceState;
  103. typedef struct _Frame {
  104. bool has_version;
  105. uint32_t version;
  106. char *ident;
  107. char *protocol_version;
  108. bool has_seq_nr;
  109. uint32_t seq_nr;
  110. bool has_typ;
  111. MessageType typ;
  112. bool has_device_state;
  113. DeviceState device_state;
  114. bool has_state;
  115. State state;
  116. bool has_position;
  117. uint32_t position;
  118. bool has_volume;
  119. uint32_t volume;
  120. bool has_state_update_id;
  121. int64_t state_update_id;
  122. pb_size_t recipient_count;
  123. char **recipient;
  124. } Frame;
  125. /* Helper constants for enums */
  126. #define _MessageType_MIN MessageType_kMessageTypeHello
  127. #define _MessageType_MAX MessageType_kMessageTypeAction
  128. #define _MessageType_ARRAYSIZE ((MessageType)(MessageType_kMessageTypeAction+1))
  129. #define _PlayStatus_MIN PlayStatus_kPlayStatusStop
  130. #define _PlayStatus_MAX PlayStatus_kPlayStatusLoading
  131. #define _PlayStatus_ARRAYSIZE ((PlayStatus)(PlayStatus_kPlayStatusLoading+1))
  132. #define _CapabilityType_MIN CapabilityType_kSupportedContexts
  133. #define _CapabilityType_MAX CapabilityType_kCommandAcks
  134. #define _CapabilityType_ARRAYSIZE ((CapabilityType)(CapabilityType_kCommandAcks+1))
  135. #ifdef __cplusplus
  136. extern "C" {
  137. #endif
  138. /* Initializer values for message structs */
  139. #define TrackRef_init_default {NULL, NULL, false, 0, NULL}
  140. #define State_init_default {NULL, false, 0, false, 0, false, _PlayStatus_MIN, false, 0, {{NULL}, NULL}, false, 0, false, 0, false, 0, 0, NULL}
  141. #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, {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}}
  142. #define DeviceState_init_default {NULL, false, 0, false, 0, false, 0, NULL, 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}}
  143. #define Frame_init_default {false, 0, NULL, NULL, false, 0, false, _MessageType_MIN, false, DeviceState_init_default, false, State_init_default, false, 0, false, 0, false, 0, 0, NULL}
  144. #define TrackRef_init_zero {NULL, NULL, false, 0, NULL}
  145. #define State_init_zero {NULL, false, 0, false, 0, false, _PlayStatus_MIN, false, 0, {{NULL}, NULL}, false, 0, false, 0, false, 0, 0, NULL}
  146. #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, {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}}
  147. #define DeviceState_init_zero {NULL, false, 0, false, 0, false, 0, NULL, 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}}
  148. #define Frame_init_zero {false, 0, NULL, NULL, false, 0, false, _MessageType_MIN, false, DeviceState_init_zero, false, State_init_zero, false, 0, false, 0, false, 0, 0, NULL}
  149. /* Field tags (for use in manual encoding/decoding) */
  150. #define Capability_typ_tag 1
  151. #define Capability_intValue_tag 2
  152. #define Capability_stringValue_tag 3
  153. #define State_context_uri_tag 2
  154. #define State_index_tag 3
  155. #define State_position_ms_tag 4
  156. #define State_status_tag 5
  157. #define State_position_measured_at_tag 7
  158. #define State_context_description_tag 8
  159. #define State_shuffle_tag 13
  160. #define State_repeat_tag 14
  161. #define State_playing_track_index_tag 26
  162. #define State_track_tag 27
  163. #define TrackRef_gid_tag 1
  164. #define TrackRef_uri_tag 2
  165. #define TrackRef_queued_tag 3
  166. #define TrackRef_context_tag 4
  167. #define DeviceState_sw_version_tag 1
  168. #define DeviceState_is_active_tag 10
  169. #define DeviceState_can_play_tag 11
  170. #define DeviceState_volume_tag 12
  171. #define DeviceState_name_tag 13
  172. #define DeviceState_error_code_tag 14
  173. #define DeviceState_became_active_at_tag 15
  174. #define DeviceState_error_message_tag 16
  175. #define DeviceState_capabilities_tag 17
  176. #define DeviceState_local_uris_tag 18
  177. #define Frame_version_tag 1
  178. #define Frame_ident_tag 2
  179. #define Frame_protocol_version_tag 3
  180. #define Frame_seq_nr_tag 4
  181. #define Frame_typ_tag 5
  182. #define Frame_device_state_tag 7
  183. #define Frame_state_tag 12
  184. #define Frame_position_tag 13
  185. #define Frame_volume_tag 14
  186. #define Frame_state_update_id_tag 17
  187. #define Frame_recipient_tag 18
  188. /* Struct field encoding specification for nanopb */
  189. #define TrackRef_FIELDLIST(X, a) \
  190. X(a, POINTER, OPTIONAL, BYTES, gid, 1) \
  191. X(a, POINTER, OPTIONAL, STRING, uri, 2) \
  192. X(a, STATIC, OPTIONAL, BOOL, queued, 3) \
  193. X(a, POINTER, OPTIONAL, STRING, context, 4)
  194. #define TrackRef_CALLBACK NULL
  195. #define TrackRef_DEFAULT NULL
  196. #define State_FIELDLIST(X, a) \
  197. X(a, POINTER, OPTIONAL, STRING, context_uri, 2) \
  198. X(a, STATIC, OPTIONAL, UINT32, index, 3) \
  199. X(a, STATIC, OPTIONAL, UINT32, position_ms, 4) \
  200. X(a, STATIC, OPTIONAL, UENUM, status, 5) \
  201. X(a, STATIC, OPTIONAL, UINT64, position_measured_at, 7) \
  202. X(a, CALLBACK, OPTIONAL, STRING, context_description, 8) \
  203. X(a, STATIC, OPTIONAL, BOOL, shuffle, 13) \
  204. X(a, STATIC, OPTIONAL, BOOL, repeat, 14) \
  205. X(a, STATIC, OPTIONAL, UINT32, playing_track_index, 26) \
  206. X(a, POINTER, REPEATED, MESSAGE, track, 27)
  207. #define State_CALLBACK pb_default_field_callback
  208. #define State_DEFAULT NULL
  209. #define State_track_MSGTYPE TrackRef
  210. #define Capability_FIELDLIST(X, a) \
  211. X(a, STATIC, OPTIONAL, UENUM, typ, 1) \
  212. X(a, STATIC, REPEATED, INT64, intValue, 2) \
  213. X(a, STATIC, REPEATED, STRING, stringValue, 3)
  214. #define Capability_CALLBACK NULL
  215. #define Capability_DEFAULT (const pb_byte_t*)"\x08\x01\x00"
  216. #define DeviceState_FIELDLIST(X, a) \
  217. X(a, POINTER, OPTIONAL, STRING, sw_version, 1) \
  218. X(a, STATIC, OPTIONAL, BOOL, is_active, 10) \
  219. X(a, STATIC, OPTIONAL, BOOL, can_play, 11) \
  220. X(a, STATIC, OPTIONAL, UINT32, volume, 12) \
  221. X(a, POINTER, OPTIONAL, STRING, name, 13) \
  222. X(a, STATIC, OPTIONAL, UINT32, error_code, 14) \
  223. X(a, STATIC, OPTIONAL, INT64, became_active_at, 15) \
  224. X(a, CALLBACK, OPTIONAL, STRING, error_message, 16) \
  225. X(a, STATIC, REPEATED, MESSAGE, capabilities, 17) \
  226. X(a, CALLBACK, REPEATED, STRING, local_uris, 18)
  227. #define DeviceState_CALLBACK pb_default_field_callback
  228. #define DeviceState_DEFAULT NULL
  229. #define DeviceState_capabilities_MSGTYPE Capability
  230. #define Frame_FIELDLIST(X, a) \
  231. X(a, STATIC, OPTIONAL, UINT32, version, 1) \
  232. X(a, POINTER, OPTIONAL, STRING, ident, 2) \
  233. X(a, POINTER, OPTIONAL, STRING, protocol_version, 3) \
  234. X(a, STATIC, OPTIONAL, UINT32, seq_nr, 4) \
  235. X(a, STATIC, OPTIONAL, UENUM, typ, 5) \
  236. X(a, STATIC, OPTIONAL, MESSAGE, device_state, 7) \
  237. X(a, STATIC, OPTIONAL, MESSAGE, state, 12) \
  238. X(a, STATIC, OPTIONAL, UINT32, position, 13) \
  239. X(a, STATIC, OPTIONAL, UINT32, volume, 14) \
  240. X(a, STATIC, OPTIONAL, INT64, state_update_id, 17) \
  241. X(a, POINTER, REPEATED, STRING, recipient, 18)
  242. #define Frame_CALLBACK NULL
  243. #define Frame_DEFAULT (const pb_byte_t*)"\x28\x01\x00"
  244. #define Frame_device_state_MSGTYPE DeviceState
  245. #define Frame_state_MSGTYPE State
  246. extern const pb_msgdesc_t TrackRef_msg;
  247. extern const pb_msgdesc_t State_msg;
  248. extern const pb_msgdesc_t Capability_msg;
  249. extern const pb_msgdesc_t DeviceState_msg;
  250. extern const pb_msgdesc_t Frame_msg;
  251. /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
  252. #define TrackRef_fields &TrackRef_msg
  253. #define State_fields &State_msg
  254. #define Capability_fields &Capability_msg
  255. #define DeviceState_fields &DeviceState_msg
  256. #define Frame_fields &Frame_msg
  257. /* Maximum encoded size of messages (where known) */
  258. /* TrackRef_size depends on runtime parameters */
  259. /* State_size depends on runtime parameters */
  260. /* DeviceState_size depends on runtime parameters */
  261. /* Frame_size depends on runtime parameters */
  262. #define Capability_size 3102
  263. #ifdef __cplusplus
  264. } /* extern "C" */
  265. #endif
  266. #endif