/* Automatically generated nanopb header */ /* Generated by nanopb-0.4.6-dev */ #ifndef PB_PROTOBUF_KEYEXCHANGE_PB_H_INCLUDED #define PB_PROTOBUF_KEYEXCHANGE_PB_H_INCLUDED #include #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. #endif /* Enum definitions */ typedef enum _Product { Product_PRODUCT_CLIENT = 0, Product_PRODUCT_LIBSPOTIFY = 1, Product_PRODUCT_MOBILE = 2, Product_PRODUCT_PARTNER = 3, Product_PRODUCT_LIBSPOTIFY_EMBEDDED = 5 } Product; typedef enum _Platform2 { Platform2_PLATFORM_WIN32_X86 = 0, Platform2_PLATFORM_OSX_X86 = 1, Platform2_PLATFORM_LINUX_X86 = 2, Platform2_PLATFORM_IPHONE_ARM = 3, Platform2_PLATFORM_S60_ARM = 4, Platform2_PLATFORM_OSX_PPC = 5, Platform2_PLATFORM_ANDROID_ARM = 6, Platform2_PLATFORM_WINDOWS_CE_ARM = 7, Platform2_PLATFORM_LINUX_X86_64 = 8, Platform2_PLATFORM_OSX_X86_64 = 9, Platform2_PLATFORM_PALM_ARM = 10, Platform2_PLATFORM_LINUX_SH = 11, Platform2_PLATFORM_FREEBSD_X86 = 12, Platform2_PLATFORM_FREEBSD_X86_64 = 13, Platform2_PLATFORM_BLACKBERRY_ARM = 14, Platform2_PLATFORM_SONOS = 15, Platform2_PLATFORM_LINUX_MIPS = 16, Platform2_PLATFORM_LINUX_ARM = 17, Platform2_PLATFORM_LOGITECH_ARM = 18, Platform2_PLATFORM_LINUX_BLACKFIN = 19, Platform2_PLATFORM_WP7_ARM = 20, Platform2_PLATFORM_ONKYO_ARM = 21, Platform2_PLATFORM_QNXNTO_ARM = 22, Platform2_PLATFORM_BCO_ARM = 23 } Platform2; typedef enum _Cryptosuite { Cryptosuite_CRYPTO_SUITE_SHANNON = 0, Cryptosuite_CRYPTO_SUITE_RC4_SHA1_HMAC = 1 } Cryptosuite; /* Struct definitions */ typedef struct _CryptoResponseUnion { char dummy_field; } CryptoResponseUnion; typedef struct _PoWResponseUnion { char dummy_field; } PoWResponseUnion; typedef struct _BuildInfo { Product product; Platform2 platform; uint64_t version; } BuildInfo; typedef struct _FeatureSet { bool has_autoupdate2; bool autoupdate2; } FeatureSet; typedef struct _LoginCryptoDiffieHellmanChallenge { pb_byte_t gs[96]; } LoginCryptoDiffieHellmanChallenge; typedef struct _LoginCryptoDiffieHellmanHello { pb_byte_t gc[96]; uint32_t server_keys_known; } LoginCryptoDiffieHellmanHello; typedef struct _LoginCryptoDiffieHellmanResponse { pb_byte_t hmac[20]; } LoginCryptoDiffieHellmanResponse; typedef struct _LoginCryptoChallengeUnion { bool has_diffie_hellman; LoginCryptoDiffieHellmanChallenge diffie_hellman; } LoginCryptoChallengeUnion; typedef struct _LoginCryptoHelloUnion { bool has_diffie_hellman; LoginCryptoDiffieHellmanHello diffie_hellman; } LoginCryptoHelloUnion; typedef struct _LoginCryptoResponseUnion { bool has_diffie_hellman; LoginCryptoDiffieHellmanResponse diffie_hellman; } LoginCryptoResponseUnion; typedef struct _APChallenge { LoginCryptoChallengeUnion login_crypto_challenge; } APChallenge; typedef struct _ClientHello { BuildInfo build_info; Cryptosuite cryptosuites_supported[1]; LoginCryptoHelloUnion login_crypto_hello; pb_byte_t client_nonce[16]; bool has_padding; pb_byte_t padding[1]; bool has_feature_set; FeatureSet feature_set; } ClientHello; typedef struct _ClientResponsePlaintext { LoginCryptoResponseUnion login_crypto_response; PoWResponseUnion pow_response; CryptoResponseUnion crypto_response; } ClientResponsePlaintext; typedef struct _APResponseMessage { bool has_challenge; APChallenge challenge; } APResponseMessage; /* Helper constants for enums */ #define _Product_MIN Product_PRODUCT_CLIENT #define _Product_MAX Product_PRODUCT_LIBSPOTIFY_EMBEDDED #define _Product_ARRAYSIZE ((Product)(Product_PRODUCT_LIBSPOTIFY_EMBEDDED+1)) #define _Platform2_MIN Platform2_PLATFORM_WIN32_X86 #define _Platform2_MAX Platform2_PLATFORM_BCO_ARM #define _Platform2_ARRAYSIZE ((Platform2)(Platform2_PLATFORM_BCO_ARM+1)) #define _Cryptosuite_MIN Cryptosuite_CRYPTO_SUITE_SHANNON #define _Cryptosuite_MAX Cryptosuite_CRYPTO_SUITE_RC4_SHA1_HMAC #define _Cryptosuite_ARRAYSIZE ((Cryptosuite)(Cryptosuite_CRYPTO_SUITE_RC4_SHA1_HMAC+1)) #ifdef __cplusplus extern "C" { #endif /* Initializer values for message structs */ #define LoginCryptoDiffieHellmanChallenge_init_default {{0}} #define LoginCryptoChallengeUnion_init_default {false, LoginCryptoDiffieHellmanChallenge_init_default} #define LoginCryptoDiffieHellmanHello_init_default {{0}, 0} #define LoginCryptoHelloUnion_init_default {false, LoginCryptoDiffieHellmanHello_init_default} #define BuildInfo_init_default {_Product_MIN, _Platform2_MIN, 0} #define FeatureSet_init_default {false, 0} #define APChallenge_init_default {LoginCryptoChallengeUnion_init_default} #define APResponseMessage_init_default {false, APChallenge_init_default} #define LoginCryptoDiffieHellmanResponse_init_default {{0}} #define LoginCryptoResponseUnion_init_default {false, LoginCryptoDiffieHellmanResponse_init_default} #define CryptoResponseUnion_init_default {0} #define PoWResponseUnion_init_default {0} #define ClientResponsePlaintext_init_default {LoginCryptoResponseUnion_init_default, PoWResponseUnion_init_default, CryptoResponseUnion_init_default} #define ClientHello_init_default {BuildInfo_init_default, {_Cryptosuite_MIN}, LoginCryptoHelloUnion_init_default, {0}, false, {0}, false, FeatureSet_init_default} #define LoginCryptoDiffieHellmanChallenge_init_zero {{0}} #define LoginCryptoChallengeUnion_init_zero {false, LoginCryptoDiffieHellmanChallenge_init_zero} #define LoginCryptoDiffieHellmanHello_init_zero {{0}, 0} #define LoginCryptoHelloUnion_init_zero {false, LoginCryptoDiffieHellmanHello_init_zero} #define BuildInfo_init_zero {_Product_MIN, _Platform2_MIN, 0} #define FeatureSet_init_zero {false, 0} #define APChallenge_init_zero {LoginCryptoChallengeUnion_init_zero} #define APResponseMessage_init_zero {false, APChallenge_init_zero} #define LoginCryptoDiffieHellmanResponse_init_zero {{0}} #define LoginCryptoResponseUnion_init_zero {false, LoginCryptoDiffieHellmanResponse_init_zero} #define CryptoResponseUnion_init_zero {0} #define PoWResponseUnion_init_zero {0} #define ClientResponsePlaintext_init_zero {LoginCryptoResponseUnion_init_zero, PoWResponseUnion_init_zero, CryptoResponseUnion_init_zero} #define ClientHello_init_zero {BuildInfo_init_zero, {_Cryptosuite_MIN}, LoginCryptoHelloUnion_init_zero, {0}, false, {0}, false, FeatureSet_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define BuildInfo_product_tag 10 #define BuildInfo_platform_tag 30 #define BuildInfo_version_tag 40 #define FeatureSet_autoupdate2_tag 1 #define LoginCryptoDiffieHellmanChallenge_gs_tag 10 #define LoginCryptoDiffieHellmanHello_gc_tag 10 #define LoginCryptoDiffieHellmanHello_server_keys_known_tag 20 #define LoginCryptoDiffieHellmanResponse_hmac_tag 10 #define LoginCryptoChallengeUnion_diffie_hellman_tag 10 #define LoginCryptoHelloUnion_diffie_hellman_tag 10 #define LoginCryptoResponseUnion_diffie_hellman_tag 10 #define APChallenge_login_crypto_challenge_tag 10 #define ClientHello_build_info_tag 10 #define ClientHello_cryptosuites_supported_tag 30 #define ClientHello_login_crypto_hello_tag 50 #define ClientHello_client_nonce_tag 60 #define ClientHello_padding_tag 70 #define ClientHello_feature_set_tag 80 #define ClientResponsePlaintext_login_crypto_response_tag 10 #define ClientResponsePlaintext_pow_response_tag 20 #define ClientResponsePlaintext_crypto_response_tag 30 #define APResponseMessage_challenge_tag 10 /* Struct field encoding specification for nanopb */ #define LoginCryptoDiffieHellmanChallenge_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, FIXED_LENGTH_BYTES, gs, 10) #define LoginCryptoDiffieHellmanChallenge_CALLBACK NULL #define LoginCryptoDiffieHellmanChallenge_DEFAULT NULL #define LoginCryptoChallengeUnion_FIELDLIST(X, a) \ X(a, STATIC, OPTIONAL, MESSAGE, diffie_hellman, 10) #define LoginCryptoChallengeUnion_CALLBACK NULL #define LoginCryptoChallengeUnion_DEFAULT NULL #define LoginCryptoChallengeUnion_diffie_hellman_MSGTYPE LoginCryptoDiffieHellmanChallenge #define LoginCryptoDiffieHellmanHello_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, FIXED_LENGTH_BYTES, gc, 10) \ X(a, STATIC, REQUIRED, UINT32, server_keys_known, 20) #define LoginCryptoDiffieHellmanHello_CALLBACK NULL #define LoginCryptoDiffieHellmanHello_DEFAULT NULL #define LoginCryptoHelloUnion_FIELDLIST(X, a) \ X(a, STATIC, OPTIONAL, MESSAGE, diffie_hellman, 10) #define LoginCryptoHelloUnion_CALLBACK NULL #define LoginCryptoHelloUnion_DEFAULT NULL #define LoginCryptoHelloUnion_diffie_hellman_MSGTYPE LoginCryptoDiffieHellmanHello #define BuildInfo_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, UENUM, product, 10) \ X(a, STATIC, REQUIRED, UENUM, platform, 30) \ X(a, STATIC, REQUIRED, UINT64, version, 40) #define BuildInfo_CALLBACK NULL #define BuildInfo_DEFAULT NULL #define FeatureSet_FIELDLIST(X, a) \ X(a, STATIC, OPTIONAL, BOOL, autoupdate2, 1) #define FeatureSet_CALLBACK NULL #define FeatureSet_DEFAULT NULL #define APChallenge_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, MESSAGE, login_crypto_challenge, 10) #define APChallenge_CALLBACK NULL #define APChallenge_DEFAULT NULL #define APChallenge_login_crypto_challenge_MSGTYPE LoginCryptoChallengeUnion #define APResponseMessage_FIELDLIST(X, a) \ X(a, STATIC, OPTIONAL, MESSAGE, challenge, 10) #define APResponseMessage_CALLBACK NULL #define APResponseMessage_DEFAULT NULL #define APResponseMessage_challenge_MSGTYPE APChallenge #define LoginCryptoDiffieHellmanResponse_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, FIXED_LENGTH_BYTES, hmac, 10) #define LoginCryptoDiffieHellmanResponse_CALLBACK NULL #define LoginCryptoDiffieHellmanResponse_DEFAULT NULL #define LoginCryptoResponseUnion_FIELDLIST(X, a) \ X(a, STATIC, OPTIONAL, MESSAGE, diffie_hellman, 10) #define LoginCryptoResponseUnion_CALLBACK NULL #define LoginCryptoResponseUnion_DEFAULT NULL #define LoginCryptoResponseUnion_diffie_hellman_MSGTYPE LoginCryptoDiffieHellmanResponse #define CryptoResponseUnion_FIELDLIST(X, a) \ #define CryptoResponseUnion_CALLBACK NULL #define CryptoResponseUnion_DEFAULT NULL #define PoWResponseUnion_FIELDLIST(X, a) \ #define PoWResponseUnion_CALLBACK NULL #define PoWResponseUnion_DEFAULT NULL #define ClientResponsePlaintext_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, MESSAGE, login_crypto_response, 10) \ X(a, STATIC, REQUIRED, MESSAGE, pow_response, 20) \ X(a, STATIC, REQUIRED, MESSAGE, crypto_response, 30) #define ClientResponsePlaintext_CALLBACK NULL #define ClientResponsePlaintext_DEFAULT NULL #define ClientResponsePlaintext_login_crypto_response_MSGTYPE LoginCryptoResponseUnion #define ClientResponsePlaintext_pow_response_MSGTYPE PoWResponseUnion #define ClientResponsePlaintext_crypto_response_MSGTYPE CryptoResponseUnion #define ClientHello_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, MESSAGE, build_info, 10) \ X(a, STATIC, FIXARRAY, UENUM, cryptosuites_supported, 30) \ X(a, STATIC, REQUIRED, MESSAGE, login_crypto_hello, 50) \ X(a, STATIC, REQUIRED, FIXED_LENGTH_BYTES, client_nonce, 60) \ X(a, STATIC, OPTIONAL, FIXED_LENGTH_BYTES, padding, 70) \ X(a, STATIC, OPTIONAL, MESSAGE, feature_set, 80) #define ClientHello_CALLBACK NULL #define ClientHello_DEFAULT NULL #define ClientHello_build_info_MSGTYPE BuildInfo #define ClientHello_login_crypto_hello_MSGTYPE LoginCryptoHelloUnion #define ClientHello_feature_set_MSGTYPE FeatureSet extern const pb_msgdesc_t LoginCryptoDiffieHellmanChallenge_msg; extern const pb_msgdesc_t LoginCryptoChallengeUnion_msg; extern const pb_msgdesc_t LoginCryptoDiffieHellmanHello_msg; extern const pb_msgdesc_t LoginCryptoHelloUnion_msg; extern const pb_msgdesc_t BuildInfo_msg; extern const pb_msgdesc_t FeatureSet_msg; extern const pb_msgdesc_t APChallenge_msg; extern const pb_msgdesc_t APResponseMessage_msg; extern const pb_msgdesc_t LoginCryptoDiffieHellmanResponse_msg; extern const pb_msgdesc_t LoginCryptoResponseUnion_msg; extern const pb_msgdesc_t CryptoResponseUnion_msg; extern const pb_msgdesc_t PoWResponseUnion_msg; extern const pb_msgdesc_t ClientResponsePlaintext_msg; extern const pb_msgdesc_t ClientHello_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define LoginCryptoDiffieHellmanChallenge_fields &LoginCryptoDiffieHellmanChallenge_msg #define LoginCryptoChallengeUnion_fields &LoginCryptoChallengeUnion_msg #define LoginCryptoDiffieHellmanHello_fields &LoginCryptoDiffieHellmanHello_msg #define LoginCryptoHelloUnion_fields &LoginCryptoHelloUnion_msg #define BuildInfo_fields &BuildInfo_msg #define FeatureSet_fields &FeatureSet_msg #define APChallenge_fields &APChallenge_msg #define APResponseMessage_fields &APResponseMessage_msg #define LoginCryptoDiffieHellmanResponse_fields &LoginCryptoDiffieHellmanResponse_msg #define LoginCryptoResponseUnion_fields &LoginCryptoResponseUnion_msg #define CryptoResponseUnion_fields &CryptoResponseUnion_msg #define PoWResponseUnion_fields &PoWResponseUnion_msg #define ClientResponsePlaintext_fields &ClientResponsePlaintext_msg #define ClientHello_fields &ClientHello_msg /* Maximum encoded size of messages (where known) */ #define APChallenge_size 102 #define APResponseMessage_size 104 #define BuildInfo_size 17 #define ClientHello_size 161 #define ClientResponsePlaintext_size 32 #define CryptoResponseUnion_size 0 #define FeatureSet_size 2 #define LoginCryptoChallengeUnion_size 100 #define LoginCryptoDiffieHellmanChallenge_size 98 #define LoginCryptoDiffieHellmanHello_size 105 #define LoginCryptoDiffieHellmanResponse_size 22 #define LoginCryptoHelloUnion_size 107 #define LoginCryptoResponseUnion_size 24 #define PoWResponseUnion_size 0 #ifdef __cplusplus } /* extern "C" */ #endif #endif