authentication.pb.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /* Automatically generated nanopb header */
  2. /* Generated by nanopb-0.4.6-dev */
  3. #ifndef PB_PROTOBUF_AUTHENTICATION_PB_H_INCLUDED
  4. #define PB_PROTOBUF_AUTHENTICATION_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 _CpuFamily {
  11. CpuFamily_CPU_UNKNOWN = 0,
  12. CpuFamily_CPU_X86 = 1,
  13. CpuFamily_CPU_X86_64 = 2,
  14. CpuFamily_CPU_PPC = 3,
  15. CpuFamily_CPU_PPC_64 = 4,
  16. CpuFamily_CPU_ARM = 5,
  17. CpuFamily_CPU_IA64 = 6,
  18. CpuFamily_CPU_SH = 7,
  19. CpuFamily_CPU_MIPS = 8,
  20. CpuFamily_CPU_BLACKFIN = 9
  21. } CpuFamily;
  22. typedef enum _Os {
  23. Os_OS_UNKNOWN = 0,
  24. Os_OS_WINDOWS = 1,
  25. Os_OS_OSX = 2,
  26. Os_OS_IPHONE = 3,
  27. Os_OS_S60 = 4,
  28. Os_OS_LINUX = 5,
  29. Os_OS_WINDOWS_CE = 6,
  30. Os_OS_ANDROID = 7,
  31. Os_OS_PALM = 8,
  32. Os_OS_FREEBSD = 9,
  33. Os_OS_BLACKBERRY = 10,
  34. Os_OS_SONOS = 11,
  35. Os_OS_LOGITECH = 12,
  36. Os_OS_WP7 = 13,
  37. Os_OS_ONKYO = 14,
  38. Os_OS_PHILIPS = 15,
  39. Os_OS_WD = 16,
  40. Os_OS_VOLVO = 17,
  41. Os_OS_TIVO = 18,
  42. Os_OS_AWOX = 19,
  43. Os_OS_MEEGO = 20,
  44. Os_OS_QNXNTO = 21,
  45. Os_OS_BCO = 22
  46. } Os;
  47. typedef enum _AuthenticationType {
  48. AuthenticationType_AUTHENTICATION_USER_PASS = 0,
  49. AuthenticationType_AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS = 1,
  50. AuthenticationType_AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS = 2,
  51. AuthenticationType_AUTHENTICATION_SPOTIFY_TOKEN = 3,
  52. AuthenticationType_AUTHENTICATION_FACEBOOK_TOKEN = 4
  53. } AuthenticationType;
  54. /* Struct definitions */
  55. typedef PB_BYTES_ARRAY_T(512) LoginCredentials_auth_data_t;
  56. typedef struct _LoginCredentials {
  57. char username[30];
  58. AuthenticationType typ;
  59. LoginCredentials_auth_data_t auth_data;
  60. } LoginCredentials;
  61. typedef struct _SystemInfo {
  62. CpuFamily cpu_family;
  63. Os os;
  64. char system_information_string[16];
  65. char device_id[50];
  66. } SystemInfo;
  67. typedef struct _ClientResponseEncrypted {
  68. LoginCredentials login_credentials;
  69. SystemInfo system_info;
  70. bool has_version_string;
  71. char version_string[32];
  72. } ClientResponseEncrypted;
  73. /* Helper constants for enums */
  74. #define _CpuFamily_MIN CpuFamily_CPU_UNKNOWN
  75. #define _CpuFamily_MAX CpuFamily_CPU_BLACKFIN
  76. #define _CpuFamily_ARRAYSIZE ((CpuFamily)(CpuFamily_CPU_BLACKFIN+1))
  77. #define _Os_MIN Os_OS_UNKNOWN
  78. #define _Os_MAX Os_OS_BCO
  79. #define _Os_ARRAYSIZE ((Os)(Os_OS_BCO+1))
  80. #define _AuthenticationType_MIN AuthenticationType_AUTHENTICATION_USER_PASS
  81. #define _AuthenticationType_MAX AuthenticationType_AUTHENTICATION_FACEBOOK_TOKEN
  82. #define _AuthenticationType_ARRAYSIZE ((AuthenticationType)(AuthenticationType_AUTHENTICATION_FACEBOOK_TOKEN+1))
  83. #ifdef __cplusplus
  84. extern "C" {
  85. #endif
  86. /* Initializer values for message structs */
  87. #define SystemInfo_init_default {_CpuFamily_MIN, _Os_MIN, "", ""}
  88. #define LoginCredentials_init_default {"", _AuthenticationType_MIN, {0, {0}}}
  89. #define ClientResponseEncrypted_init_default {LoginCredentials_init_default, SystemInfo_init_default, false, ""}
  90. #define SystemInfo_init_zero {_CpuFamily_MIN, _Os_MIN, "", ""}
  91. #define LoginCredentials_init_zero {"", _AuthenticationType_MIN, {0, {0}}}
  92. #define ClientResponseEncrypted_init_zero {LoginCredentials_init_zero, SystemInfo_init_zero, false, ""}
  93. /* Field tags (for use in manual encoding/decoding) */
  94. #define LoginCredentials_username_tag 10
  95. #define LoginCredentials_typ_tag 20
  96. #define LoginCredentials_auth_data_tag 30
  97. #define SystemInfo_cpu_family_tag 10
  98. #define SystemInfo_os_tag 60
  99. #define SystemInfo_system_information_string_tag 90
  100. #define SystemInfo_device_id_tag 100
  101. #define ClientResponseEncrypted_login_credentials_tag 10
  102. #define ClientResponseEncrypted_system_info_tag 50
  103. #define ClientResponseEncrypted_version_string_tag 70
  104. /* Struct field encoding specification for nanopb */
  105. #define SystemInfo_FIELDLIST(X, a) \
  106. X(a, STATIC, REQUIRED, UENUM, cpu_family, 10) \
  107. X(a, STATIC, REQUIRED, UENUM, os, 60) \
  108. X(a, STATIC, REQUIRED, STRING, system_information_string, 90) \
  109. X(a, STATIC, REQUIRED, STRING, device_id, 100)
  110. #define SystemInfo_CALLBACK NULL
  111. #define SystemInfo_DEFAULT NULL
  112. #define LoginCredentials_FIELDLIST(X, a) \
  113. X(a, STATIC, REQUIRED, STRING, username, 10) \
  114. X(a, STATIC, REQUIRED, UENUM, typ, 20) \
  115. X(a, STATIC, REQUIRED, BYTES, auth_data, 30)
  116. #define LoginCredentials_CALLBACK NULL
  117. #define LoginCredentials_DEFAULT NULL
  118. #define ClientResponseEncrypted_FIELDLIST(X, a) \
  119. X(a, STATIC, REQUIRED, MESSAGE, login_credentials, 10) \
  120. X(a, STATIC, REQUIRED, MESSAGE, system_info, 50) \
  121. X(a, STATIC, OPTIONAL, STRING, version_string, 70)
  122. #define ClientResponseEncrypted_CALLBACK NULL
  123. #define ClientResponseEncrypted_DEFAULT NULL
  124. #define ClientResponseEncrypted_login_credentials_MSGTYPE LoginCredentials
  125. #define ClientResponseEncrypted_system_info_MSGTYPE SystemInfo
  126. extern const pb_msgdesc_t SystemInfo_msg;
  127. extern const pb_msgdesc_t LoginCredentials_msg;
  128. extern const pb_msgdesc_t ClientResponseEncrypted_msg;
  129. /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
  130. #define SystemInfo_fields &SystemInfo_msg
  131. #define LoginCredentials_fields &LoginCredentials_msg
  132. #define ClientResponseEncrypted_fields &ClientResponseEncrypted_msg
  133. /* Maximum encoded size of messages (where known) */
  134. #define ClientResponseEncrypted_size 665
  135. #define LoginCredentials_size 550
  136. #define SystemInfo_size 75
  137. #ifdef __cplusplus
  138. } /* extern "C" */
  139. #endif
  140. #endif