metadata.pb.h 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. /* Automatically generated nanopb header */
  2. /* Generated by nanopb-0.4.6-dev */
  3. #ifndef PB_PROTOBUF_METADATA_PB_H_INCLUDED
  4. #define PB_PROTOBUF_METADATA_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 _AudioFormat {
  11. AudioFormat_OGG_VORBIS_96 = 0,
  12. AudioFormat_OGG_VORBIS_160 = 1,
  13. AudioFormat_OGG_VORBIS_320 = 2,
  14. AudioFormat_MP3_256 = 3,
  15. AudioFormat_MP3_320 = 4,
  16. AudioFormat_MP3_160 = 5,
  17. AudioFormat_MP3_96 = 6,
  18. AudioFormat_MP3_160_ENC = 7,
  19. AudioFormat_AAC_24 = 8,
  20. AudioFormat_AAC_48 = 9
  21. } AudioFormat;
  22. /* Struct definitions */
  23. typedef struct _Artist {
  24. pb_bytes_array_t *gid;
  25. char *name;
  26. } Artist;
  27. typedef struct _Image {
  28. pb_bytes_array_t *file_id;
  29. } Image;
  30. typedef struct _ImageGroup {
  31. pb_size_t image_count;
  32. struct _Image *image;
  33. } ImageGroup;
  34. typedef struct _Restriction {
  35. char *countries_allowed;
  36. char *countries_forbidden;
  37. } Restriction;
  38. typedef struct _Album {
  39. pb_callback_t gid;
  40. char *name;
  41. bool has_cover_group;
  42. ImageGroup cover_group;
  43. } Album;
  44. typedef struct _AudioFile {
  45. pb_bytes_array_t *file_id;
  46. bool has_format;
  47. AudioFormat format;
  48. } AudioFile;
  49. typedef struct _Episode {
  50. pb_bytes_array_t *gid;
  51. char *name;
  52. bool has_duration;
  53. int32_t duration;
  54. pb_size_t audio_count;
  55. struct _AudioFile *audio;
  56. struct _ImageGroup *covers;
  57. } Episode;
  58. typedef struct _Track {
  59. pb_bytes_array_t *gid;
  60. char *name;
  61. bool has_album;
  62. Album album;
  63. pb_size_t artist_count;
  64. struct _Artist *artist;
  65. bool has_duration;
  66. int32_t duration;
  67. pb_size_t restriction_count;
  68. struct _Restriction *restriction;
  69. pb_size_t file_count;
  70. struct _AudioFile *file;
  71. pb_size_t alternative_count;
  72. struct _Track *alternative;
  73. } Track;
  74. /* Helper constants for enums */
  75. #define _AudioFormat_MIN AudioFormat_OGG_VORBIS_96
  76. #define _AudioFormat_MAX AudioFormat_AAC_48
  77. #define _AudioFormat_ARRAYSIZE ((AudioFormat)(AudioFormat_AAC_48+1))
  78. #ifdef __cplusplus
  79. extern "C" {
  80. #endif
  81. /* Initializer values for message structs */
  82. #define AudioFile_init_default {NULL, false, _AudioFormat_MIN}
  83. #define Restriction_init_default {NULL, NULL}
  84. #define Image_init_default {NULL}
  85. #define ImageGroup_init_default {0, NULL}
  86. #define Album_init_default {{{NULL}, NULL}, NULL, false, ImageGroup_init_default}
  87. #define Artist_init_default {NULL, NULL}
  88. #define Track_init_default {NULL, NULL, false, Album_init_default, 0, NULL, false, 0, 0, NULL, 0, NULL, 0, NULL}
  89. #define Episode_init_default {NULL, NULL, false, 0, 0, NULL, NULL}
  90. #define AudioFile_init_zero {NULL, false, _AudioFormat_MIN}
  91. #define Restriction_init_zero {NULL, NULL}
  92. #define Image_init_zero {NULL}
  93. #define ImageGroup_init_zero {0, NULL}
  94. #define Album_init_zero {{{NULL}, NULL}, NULL, false, ImageGroup_init_zero}
  95. #define Artist_init_zero {NULL, NULL}
  96. #define Track_init_zero {NULL, NULL, false, Album_init_zero, 0, NULL, false, 0, 0, NULL, 0, NULL, 0, NULL}
  97. #define Episode_init_zero {NULL, NULL, false, 0, 0, NULL, NULL}
  98. /* Field tags (for use in manual encoding/decoding) */
  99. #define Artist_gid_tag 1
  100. #define Artist_name_tag 2
  101. #define Image_file_id_tag 1
  102. #define ImageGroup_image_tag 1
  103. #define Restriction_countries_allowed_tag 2
  104. #define Restriction_countries_forbidden_tag 3
  105. #define Album_gid_tag 1
  106. #define Album_name_tag 2
  107. #define Album_cover_group_tag 17
  108. #define AudioFile_file_id_tag 1
  109. #define AudioFile_format_tag 2
  110. #define Episode_gid_tag 1
  111. #define Episode_name_tag 2
  112. #define Episode_duration_tag 7
  113. #define Episode_audio_tag 12
  114. #define Episode_covers_tag 68
  115. #define Track_gid_tag 1
  116. #define Track_name_tag 2
  117. #define Track_album_tag 3
  118. #define Track_artist_tag 4
  119. #define Track_duration_tag 7
  120. #define Track_restriction_tag 11
  121. #define Track_file_tag 12
  122. #define Track_alternative_tag 13
  123. /* Struct field encoding specification for nanopb */
  124. #define AudioFile_FIELDLIST(X, a) \
  125. X(a, POINTER, OPTIONAL, BYTES, file_id, 1) \
  126. X(a, STATIC, OPTIONAL, UENUM, format, 2)
  127. #define AudioFile_CALLBACK NULL
  128. #define AudioFile_DEFAULT NULL
  129. #define Restriction_FIELDLIST(X, a) \
  130. X(a, POINTER, OPTIONAL, STRING, countries_allowed, 2) \
  131. X(a, POINTER, OPTIONAL, STRING, countries_forbidden, 3)
  132. #define Restriction_CALLBACK NULL
  133. #define Restriction_DEFAULT NULL
  134. #define Image_FIELDLIST(X, a) \
  135. X(a, POINTER, OPTIONAL, BYTES, file_id, 1)
  136. #define Image_CALLBACK NULL
  137. #define Image_DEFAULT NULL
  138. #define ImageGroup_FIELDLIST(X, a) \
  139. X(a, POINTER, REPEATED, MESSAGE, image, 1)
  140. #define ImageGroup_CALLBACK NULL
  141. #define ImageGroup_DEFAULT NULL
  142. #define ImageGroup_image_MSGTYPE Image
  143. #define Album_FIELDLIST(X, a) \
  144. X(a, CALLBACK, OPTIONAL, BYTES, gid, 1) \
  145. X(a, POINTER, OPTIONAL, STRING, name, 2) \
  146. X(a, STATIC, OPTIONAL, MESSAGE, cover_group, 17)
  147. #define Album_CALLBACK pb_default_field_callback
  148. #define Album_DEFAULT NULL
  149. #define Album_cover_group_MSGTYPE ImageGroup
  150. #define Artist_FIELDLIST(X, a) \
  151. X(a, POINTER, OPTIONAL, BYTES, gid, 1) \
  152. X(a, POINTER, OPTIONAL, STRING, name, 2)
  153. #define Artist_CALLBACK NULL
  154. #define Artist_DEFAULT NULL
  155. #define Track_FIELDLIST(X, a) \
  156. X(a, POINTER, OPTIONAL, BYTES, gid, 1) \
  157. X(a, POINTER, OPTIONAL, STRING, name, 2) \
  158. X(a, STATIC, OPTIONAL, MESSAGE, album, 3) \
  159. X(a, POINTER, REPEATED, MESSAGE, artist, 4) \
  160. X(a, STATIC, OPTIONAL, SINT32, duration, 7) \
  161. X(a, POINTER, REPEATED, MESSAGE, restriction, 11) \
  162. X(a, POINTER, REPEATED, MESSAGE, file, 12) \
  163. X(a, POINTER, REPEATED, MESSAGE, alternative, 13)
  164. #define Track_CALLBACK NULL
  165. #define Track_DEFAULT NULL
  166. #define Track_album_MSGTYPE Album
  167. #define Track_artist_MSGTYPE Artist
  168. #define Track_restriction_MSGTYPE Restriction
  169. #define Track_file_MSGTYPE AudioFile
  170. #define Track_alternative_MSGTYPE Track
  171. #define Episode_FIELDLIST(X, a) \
  172. X(a, POINTER, OPTIONAL, BYTES, gid, 1) \
  173. X(a, POINTER, OPTIONAL, STRING, name, 2) \
  174. X(a, STATIC, OPTIONAL, SINT32, duration, 7) \
  175. X(a, POINTER, REPEATED, MESSAGE, audio, 12) \
  176. X(a, POINTER, OPTIONAL, MESSAGE, covers, 68)
  177. #define Episode_CALLBACK NULL
  178. #define Episode_DEFAULT NULL
  179. #define Episode_audio_MSGTYPE AudioFile
  180. #define Episode_covers_MSGTYPE ImageGroup
  181. extern const pb_msgdesc_t AudioFile_msg;
  182. extern const pb_msgdesc_t Restriction_msg;
  183. extern const pb_msgdesc_t Image_msg;
  184. extern const pb_msgdesc_t ImageGroup_msg;
  185. extern const pb_msgdesc_t Album_msg;
  186. extern const pb_msgdesc_t Artist_msg;
  187. extern const pb_msgdesc_t Track_msg;
  188. extern const pb_msgdesc_t Episode_msg;
  189. /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
  190. #define AudioFile_fields &AudioFile_msg
  191. #define Restriction_fields &Restriction_msg
  192. #define Image_fields &Image_msg
  193. #define ImageGroup_fields &ImageGroup_msg
  194. #define Album_fields &Album_msg
  195. #define Artist_fields &Artist_msg
  196. #define Track_fields &Track_msg
  197. #define Episode_fields &Episode_msg
  198. /* Maximum encoded size of messages (where known) */
  199. /* AudioFile_size depends on runtime parameters */
  200. /* Restriction_size depends on runtime parameters */
  201. /* Image_size depends on runtime parameters */
  202. /* ImageGroup_size depends on runtime parameters */
  203. /* Album_size depends on runtime parameters */
  204. /* Artist_size depends on runtime parameters */
  205. /* Track_size depends on runtime parameters */
  206. /* Episode_size depends on runtime parameters */
  207. #ifdef __cplusplus
  208. } /* extern "C" */
  209. #endif
  210. #endif