mirror of
https://github.com/owntone/owntone-server.git
synced 2025-10-29 07:45:04 -04:00
[spotify] librespot-c update (protobuf automake + metadata proto update)
New metadata probably necessary to support lossless
This commit is contained in:
parent
336200727d
commit
365694d863
@ -3,44 +3,63 @@ SUBDIRS = tests
|
||||
noinst_LIBRARIES = librespot-c.a
|
||||
|
||||
SHANNON_SRC = \
|
||||
src/shannon/ShannonFast.c src/shannon/Shannon.h src/shannon/ShannonInternal.h
|
||||
src/shannon/ShannonFast.c \
|
||||
src/shannon/Shannon.h \
|
||||
src/shannon/ShannonInternal.h
|
||||
|
||||
PROTO_FILES = \
|
||||
src/proto/keyexchange.proto \
|
||||
src/proto/authentication.proto \
|
||||
src/proto/mercury.proto \
|
||||
src/proto/metadata.proto \
|
||||
src/proto/connectivity.proto \
|
||||
src/proto/clienttoken.proto \
|
||||
src/proto/login5_user_info.proto \
|
||||
src/proto/login5.proto \
|
||||
src/proto/login5_identifiers.proto \
|
||||
src/proto/login5_credentials.proto \
|
||||
src/proto/login5_client_info.proto \
|
||||
src/proto/login5_challenges_hashcash.proto \
|
||||
src/proto/login5_challenges_code.proto \
|
||||
src/proto/google_duration.proto \
|
||||
src/proto/storage_resolve.proto \
|
||||
src/proto/extended_metadata.proto \
|
||||
src/proto/extension_kind.proto \
|
||||
src/proto/entity_extension_data.proto \
|
||||
src/proto/google_any.proto
|
||||
|
||||
PROTO_SRC = \
|
||||
src/proto/keyexchange.pb-c.c src/proto/keyexchange.pb-c.h \
|
||||
src/proto/authentication.pb-c.c src/proto/authentication.pb-c.h \
|
||||
src/proto/mercury.pb-c.c src/proto/mercury.pb-c.h \
|
||||
src/proto/metadata.pb-c.c src/proto/metadata.pb-c.h
|
||||
|
||||
HTTP_PROTO_SRC = \
|
||||
src/proto/connectivity.pb-c.c src/proto/connectivity.pb-c.h \
|
||||
src/proto/clienttoken.pb-c.c src/proto/clienttoken.pb-c.h \
|
||||
src/proto/login5_user_info.pb-c.h src/proto/login5_user_info.pb-c.c \
|
||||
src/proto/login5.pb-c.h src/proto/login5.pb-c.c \
|
||||
src/proto/login5_identifiers.pb-c.h src/proto/login5_identifiers.pb-c.c \
|
||||
src/proto/login5_credentials.pb-c.h src/proto/login5_credentials.pb-c.c \
|
||||
src/proto/login5_client_info.pb-c.h src/proto/login5_client_info.pb-c.c \
|
||||
src/proto/login5_challenges_hashcash.pb-c.h src/proto/login5_challenges_hashcash.pb-c.c \
|
||||
src/proto/login5_challenges_code.pb-c.h src/proto/login5_challenges_code.pb-c.c \
|
||||
src/proto/google_duration.pb-c.h src/proto/google_duration.pb-c.c \
|
||||
src/proto/storage_resolve.pb-c.h src/proto/storage_resolve.pb-c.c \
|
||||
src/proto/extended_metadata.pb-c.h src/proto/extended_metadata.pb-c.c \
|
||||
src/proto/extension_kind.pb-c.h src/proto/extension_kind.pb-c.c \
|
||||
src/proto/entity_extension_data.pb-c.h src/proto/entity_extension_data.pb-c.c \
|
||||
src/proto/google_any.pb-c.h src/proto/google_any.pb-c.c
|
||||
|
||||
$(PROTO_FILES:.proto=.pb-c.c) $(PROTO_FILES:.proto=.pb-c.h)
|
||||
|
||||
CORE_SRC = \
|
||||
src/librespot-c.c src/connection.c src/channel.c src/crypto.c src/commands.c \
|
||||
src/librespot-c.c \
|
||||
src/connection.c \
|
||||
src/channel.c \
|
||||
src/crypto.c \
|
||||
src/commands.c \
|
||||
src/http.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(PROTO_SRC)
|
||||
|
||||
librespot_c_a_SOURCES = \
|
||||
$(CORE_SRC) \
|
||||
$(SHANNON_SRC) \
|
||||
$(PROTO_SRC) \
|
||||
$(HTTP_PROTO_SRC)
|
||||
$(PROTO_SRC)
|
||||
|
||||
noinst_HEADERS = \
|
||||
librespot-c.h src/librespot-c-internal.h src/connection.h \
|
||||
src/channel.h src/crypto.h src/commands.h src/http.h
|
||||
librespot-c.h \
|
||||
src/librespot-c-internal.h \
|
||||
src/connection.h \
|
||||
src/channel.h \
|
||||
src/crypto.h \
|
||||
src/commands.h \
|
||||
src/http.h
|
||||
|
||||
EXTRA_DIST = README.md LICENSE
|
||||
EXTRA_DIST = \
|
||||
README.md \
|
||||
LICENSE \
|
||||
$(PROTO_FILES)
|
||||
|
||||
%.pb-c.c %.pb-c.h: %.proto
|
||||
$(AM_V_GEN)$(PROTOC) --proto_path=src/proto --c_out=src/proto $<
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
AC_INIT([librespot-c], [0.6])
|
||||
AC_INIT([librespot-c], [0.7])
|
||||
AC_CONFIG_AUX_DIR([.])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
AM_SILENT_RULES([yes])
|
||||
@ -10,6 +10,8 @@ AC_PROG_CC
|
||||
AM_PROG_AR
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AC_PATH_PROG([PROTOC], [protoc-c])
|
||||
|
||||
AM_CPPFLAGS="-Wall"
|
||||
AC_SUBST([AM_CPPFLAGS])
|
||||
|
||||
|
||||
@ -169,11 +169,11 @@ system_info_from_uname(SystemInfo *system_info)
|
||||
// Returns true if format of a is preferred over b (and is valid). According to
|
||||
// librespot comment most podcasts are 96 kbit.
|
||||
static bool
|
||||
format_is_preferred(AudioFile *a, AudioFile *b, enum sp_bitrates bitrate_preferred)
|
||||
format_is_preferred(Spotify__Metadata__AudioFile *a, Spotify__Metadata__AudioFile *b, enum sp_bitrates bitrate_preferred)
|
||||
{
|
||||
if (a->format != AUDIO_FILE__FORMAT__OGG_VORBIS_96 &&
|
||||
a->format != AUDIO_FILE__FORMAT__OGG_VORBIS_160 &&
|
||||
a->format != AUDIO_FILE__FORMAT__OGG_VORBIS_320)
|
||||
if (a->format != SPOTIFY__METADATA__AUDIO_FILE__FORMAT__OGG_VORBIS_96 &&
|
||||
a->format != SPOTIFY__METADATA__AUDIO_FILE__FORMAT__OGG_VORBIS_160 &&
|
||||
a->format != SPOTIFY__METADATA__AUDIO_FILE__FORMAT__OGG_VORBIS_320)
|
||||
return false;
|
||||
|
||||
if (!b)
|
||||
@ -184,9 +184,9 @@ format_is_preferred(AudioFile *a, AudioFile *b, enum sp_bitrates bitrate_preferr
|
||||
case SP_BITRATE_96:
|
||||
return (a->format < b->format); // Prefer lowest
|
||||
case SP_BITRATE_160:
|
||||
if (b->format == AUDIO_FILE__FORMAT__OGG_VORBIS_160)
|
||||
if (b->format == SPOTIFY__METADATA__AUDIO_FILE__FORMAT__OGG_VORBIS_160)
|
||||
return false;
|
||||
else if (a->format == AUDIO_FILE__FORMAT__OGG_VORBIS_160)
|
||||
else if (a->format == SPOTIFY__METADATA__AUDIO_FILE__FORMAT__OGG_VORBIS_160)
|
||||
return true;
|
||||
else
|
||||
return (a->format < b->format); // Prefer lowest
|
||||
@ -200,10 +200,10 @@ format_is_preferred(AudioFile *a, AudioFile *b, enum sp_bitrates bitrate_preferr
|
||||
}
|
||||
|
||||
int
|
||||
file_select(uint8_t *out, size_t out_len, Track *track, enum sp_bitrates bitrate_preferred)
|
||||
file_select(uint8_t *out, size_t out_len, Spotify__Metadata__Track *track, enum sp_bitrates bitrate_preferred)
|
||||
{
|
||||
AudioFile *selected = NULL;
|
||||
AudioFile *file;
|
||||
Spotify__Metadata__AudioFile *selected = NULL;
|
||||
Spotify__Metadata__AudioFile *file;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < track->n_file; i++)
|
||||
@ -461,7 +461,7 @@ mercury_free(struct sp_mercury *mercury, int content_only)
|
||||
free(mercury->parts[i].data);
|
||||
|
||||
if (mercury->parts[i].track)
|
||||
track__free_unpacked(mercury->parts[i].track, NULL);
|
||||
spotify__metadata__track__free_unpacked(mercury->parts[i].track, NULL);
|
||||
}
|
||||
|
||||
if (content_only)
|
||||
@ -546,7 +546,7 @@ mercury_parse(struct sp_mercury *mercury, uint8_t *payload, size_t payload_len)
|
||||
memcpy(mercury->parts[i].data, ptr, mercury->parts[i].len);
|
||||
ptr += mercury->parts[i].len; // 5: length += mercury->parts[i].len
|
||||
|
||||
mercury->parts[i].track = track__unpack(NULL, mercury->parts[i].len, mercury->parts[i].data);
|
||||
mercury->parts[i].track = spotify__metadata__track__unpack(NULL, mercury->parts[i].len, mercury->parts[i].data);
|
||||
}
|
||||
|
||||
header__free_unpacked(header, NULL);
|
||||
@ -1056,14 +1056,14 @@ handle_metadata_get(struct sp_message *msg, struct sp_session *session)
|
||||
{
|
||||
struct http_response *hres = &msg->payload.hres;
|
||||
struct sp_channel *channel = session->now_streaming_channel;
|
||||
Track *response = NULL;
|
||||
Spotify__Metadata__Track *response = NULL;
|
||||
int ret;
|
||||
|
||||
if (hres->code != HTTP_OK)
|
||||
goto fallback;
|
||||
|
||||
// Also works for Episode response
|
||||
response = track__unpack(NULL, hres->body_len, hres->body);
|
||||
response = spotify__metadata__track__unpack(NULL, hres->body_len, hres->body);
|
||||
if (!response)
|
||||
goto fallback;
|
||||
|
||||
@ -1071,13 +1071,13 @@ handle_metadata_get(struct sp_message *msg, struct sp_session *session)
|
||||
if (ret < 0)
|
||||
goto fallback;
|
||||
|
||||
track__free_unpacked(response, NULL);
|
||||
spotify__metadata__track__free_unpacked(response, NULL);
|
||||
return SP_OK_DONE;
|
||||
|
||||
fallback:
|
||||
sp_cb.logmsg("Couldn't find file id in metadata response, will request extended metadata\n");
|
||||
|
||||
track__free_unpacked(response, NULL);
|
||||
spotify__metadata__track__free_unpacked(response, NULL);
|
||||
return SP_OK_DONE;
|
||||
}
|
||||
|
||||
@ -1093,7 +1093,7 @@ handle_extended_metadata_get(struct sp_message *msg, struct sp_session *session)
|
||||
struct sp_channel *channel = session->now_streaming_channel;
|
||||
Spotify__Extendedmetadata__BatchedExtensionResponse *response = NULL;
|
||||
Spotify__Extendedmetadata__EntityExtensionData *entity_extension_data = NULL;
|
||||
Track *track = NULL;
|
||||
Spotify__Metadata__Track *track = NULL;
|
||||
int i, j;
|
||||
int ret;
|
||||
|
||||
@ -1128,7 +1128,7 @@ handle_extended_metadata_get(struct sp_message *msg, struct sp_session *session)
|
||||
// .Episode. If we get something else we will fail later anyway.
|
||||
|
||||
// This also works for episodes
|
||||
track = track__unpack(NULL, entity_extension_data->extension_data->value.len, entity_extension_data->extension_data->value.data);
|
||||
track = spotify__metadata__track__unpack(NULL, entity_extension_data->extension_data->value.len, entity_extension_data->extension_data->value.data);
|
||||
if (!track)
|
||||
RETURN_ERROR(SP_ERR_INVALID, "Could not parse track data in extended metadata response");
|
||||
|
||||
@ -1137,12 +1137,12 @@ handle_extended_metadata_get(struct sp_message *msg, struct sp_session *session)
|
||||
RETURN_ERROR(SP_ERR_INVALID, "Could not find track data in extended metadata response");
|
||||
|
||||
spotify__extendedmetadata__batched_extension_response__free_unpacked(response, NULL);
|
||||
track__free_unpacked(track, NULL);
|
||||
spotify__metadata__track__free_unpacked(track, NULL);
|
||||
return SP_OK_DONE;
|
||||
|
||||
error:
|
||||
spotify__extendedmetadata__batched_extension_response__free_unpacked(response, NULL);
|
||||
track__free_unpacked(track, NULL);
|
||||
spotify__metadata__track__free_unpacked(track, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -296,7 +296,7 @@ struct sp_mercury
|
||||
uint8_t *data;
|
||||
size_t len;
|
||||
|
||||
Track *track;
|
||||
Spotify__Metadata__Track *track;
|
||||
} parts[SP_MERCURY_MAX_PARTS];
|
||||
};
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
|
||||
/* Generated from: proto/authentication.proto */
|
||||
/* Generated from: authentication.proto */
|
||||
|
||||
/* Do not generate deprecated warnings for self */
|
||||
#ifndef PROTOBUF_C__NO_DEPRECATED
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
|
||||
/* Generated from: proto/authentication.proto */
|
||||
/* Generated from: authentication.proto */
|
||||
|
||||
#ifndef PROTOBUF_C_proto_2fauthentication_2eproto__INCLUDED
|
||||
#define PROTOBUF_C_proto_2fauthentication_2eproto__INCLUDED
|
||||
#ifndef PROTOBUF_C_authentication_2eproto__INCLUDED
|
||||
#define PROTOBUF_C_authentication_2eproto__INCLUDED
|
||||
|
||||
#include <protobuf-c/protobuf-c.h>
|
||||
|
||||
@ -10,27 +10,27 @@ PROTOBUF_C__BEGIN_DECLS
|
||||
|
||||
#if PROTOBUF_C_VERSION_NUMBER < 1000000
|
||||
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
|
||||
#elif 1003003 < PROTOBUF_C_MIN_COMPILER_VERSION
|
||||
#elif 1004001 < PROTOBUF_C_MIN_COMPILER_VERSION
|
||||
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _ClientResponseEncrypted ClientResponseEncrypted;
|
||||
typedef struct _LoginCredentials LoginCredentials;
|
||||
typedef struct _FingerprintResponseUnion FingerprintResponseUnion;
|
||||
typedef struct _FingerprintGrainResponse FingerprintGrainResponse;
|
||||
typedef struct _FingerprintHmacRipemdResponse FingerprintHmacRipemdResponse;
|
||||
typedef struct _PeerTicketUnion PeerTicketUnion;
|
||||
typedef struct _PeerTicketPublicKey PeerTicketPublicKey;
|
||||
typedef struct _PeerTicketOld PeerTicketOld;
|
||||
typedef struct _SystemInfo SystemInfo;
|
||||
typedef struct _LibspotifyAppKey LibspotifyAppKey;
|
||||
typedef struct _ClientInfo ClientInfo;
|
||||
typedef struct _ClientInfoFacebook ClientInfoFacebook;
|
||||
typedef struct _APWelcome APWelcome;
|
||||
typedef struct _AccountInfo AccountInfo;
|
||||
typedef struct _AccountInfoSpotify AccountInfoSpotify;
|
||||
typedef struct _AccountInfoFacebook AccountInfoFacebook;
|
||||
typedef struct ClientResponseEncrypted ClientResponseEncrypted;
|
||||
typedef struct LoginCredentials LoginCredentials;
|
||||
typedef struct FingerprintResponseUnion FingerprintResponseUnion;
|
||||
typedef struct FingerprintGrainResponse FingerprintGrainResponse;
|
||||
typedef struct FingerprintHmacRipemdResponse FingerprintHmacRipemdResponse;
|
||||
typedef struct PeerTicketUnion PeerTicketUnion;
|
||||
typedef struct PeerTicketPublicKey PeerTicketPublicKey;
|
||||
typedef struct PeerTicketOld PeerTicketOld;
|
||||
typedef struct SystemInfo SystemInfo;
|
||||
typedef struct LibspotifyAppKey LibspotifyAppKey;
|
||||
typedef struct ClientInfo ClientInfo;
|
||||
typedef struct ClientInfoFacebook ClientInfoFacebook;
|
||||
typedef struct APWelcome APWelcome;
|
||||
typedef struct AccountInfo AccountInfo;
|
||||
typedef struct AccountInfoSpotify AccountInfoSpotify;
|
||||
typedef struct AccountInfoFacebook AccountInfoFacebook;
|
||||
|
||||
|
||||
/* --- enums --- */
|
||||
@ -102,7 +102,7 @@ typedef enum _AccountType {
|
||||
|
||||
/* --- messages --- */
|
||||
|
||||
struct _ClientResponseEncrypted
|
||||
struct ClientResponseEncrypted
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
LoginCredentials *login_credentials;
|
||||
@ -121,7 +121,7 @@ struct _ClientResponseEncrypted
|
||||
, NULL, 0, ACCOUNT_CREATION__ACCOUNT_CREATION_ALWAYS_PROMPT, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
|
||||
|
||||
|
||||
struct _LoginCredentials
|
||||
struct LoginCredentials
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
char *username;
|
||||
@ -134,7 +134,7 @@ struct _LoginCredentials
|
||||
, NULL, AUTHENTICATION_TYPE__AUTHENTICATION_USER_PASS, 0, {0,NULL} }
|
||||
|
||||
|
||||
struct _FingerprintResponseUnion
|
||||
struct FingerprintResponseUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
FingerprintGrainResponse *grain;
|
||||
@ -145,7 +145,7 @@ struct _FingerprintResponseUnion
|
||||
, NULL, NULL }
|
||||
|
||||
|
||||
struct _FingerprintGrainResponse
|
||||
struct FingerprintGrainResponse
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData encrypted_key;
|
||||
@ -155,7 +155,7 @@ struct _FingerprintGrainResponse
|
||||
, {0,NULL} }
|
||||
|
||||
|
||||
struct _FingerprintHmacRipemdResponse
|
||||
struct FingerprintHmacRipemdResponse
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData hmac;
|
||||
@ -165,7 +165,7 @@ struct _FingerprintHmacRipemdResponse
|
||||
, {0,NULL} }
|
||||
|
||||
|
||||
struct _PeerTicketUnion
|
||||
struct PeerTicketUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
PeerTicketPublicKey *public_key;
|
||||
@ -176,7 +176,7 @@ struct _PeerTicketUnion
|
||||
, NULL, NULL }
|
||||
|
||||
|
||||
struct _PeerTicketPublicKey
|
||||
struct PeerTicketPublicKey
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData public_key;
|
||||
@ -186,7 +186,7 @@ struct _PeerTicketPublicKey
|
||||
, {0,NULL} }
|
||||
|
||||
|
||||
struct _PeerTicketOld
|
||||
struct PeerTicketOld
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData peer_ticket;
|
||||
@ -197,7 +197,7 @@ struct _PeerTicketOld
|
||||
, {0,NULL}, {0,NULL} }
|
||||
|
||||
|
||||
struct _SystemInfo
|
||||
struct SystemInfo
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
CpuFamily cpu_family;
|
||||
@ -222,7 +222,7 @@ struct _SystemInfo
|
||||
, CPU_FAMILY__CPU_UNKNOWN, 0, 0, 0, 0, 0, BRAND__BRAND_UNBRANDED, 0, 0, OS__OS_UNKNOWN, 0, 0, 0, 0, NULL, NULL }
|
||||
|
||||
|
||||
struct _LibspotifyAppKey
|
||||
struct LibspotifyAppKey
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
uint32_t version;
|
||||
@ -236,7 +236,7 @@ struct _LibspotifyAppKey
|
||||
, 0, {0,NULL}, {0,NULL}, NULL, {0,NULL} }
|
||||
|
||||
|
||||
struct _ClientInfo
|
||||
struct ClientInfo
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
protobuf_c_boolean has_limited;
|
||||
@ -249,7 +249,7 @@ struct _ClientInfo
|
||||
, 0, 0, NULL, NULL }
|
||||
|
||||
|
||||
struct _ClientInfoFacebook
|
||||
struct ClientInfoFacebook
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
char *machine_id;
|
||||
@ -259,7 +259,7 @@ struct _ClientInfoFacebook
|
||||
, NULL }
|
||||
|
||||
|
||||
struct _APWelcome
|
||||
struct APWelcome
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
char *canonical_username;
|
||||
@ -277,7 +277,7 @@ struct _APWelcome
|
||||
, NULL, ACCOUNT_TYPE__Spotify, ACCOUNT_TYPE__Spotify, AUTHENTICATION_TYPE__AUTHENTICATION_USER_PASS, {0,NULL}, 0, {0,NULL}, NULL, NULL }
|
||||
|
||||
|
||||
struct _AccountInfo
|
||||
struct AccountInfo
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
AccountInfoSpotify *spotify;
|
||||
@ -288,7 +288,7 @@ struct _AccountInfo
|
||||
, NULL, NULL }
|
||||
|
||||
|
||||
struct _AccountInfoSpotify
|
||||
struct AccountInfoSpotify
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
};
|
||||
@ -297,7 +297,7 @@ struct _AccountInfoSpotify
|
||||
}
|
||||
|
||||
|
||||
struct _AccountInfoFacebook
|
||||
struct AccountInfoFacebook
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
char *access_token;
|
||||
@ -694,4 +694,4 @@ extern const ProtobufCMessageDescriptor account_info_facebook__descriptor;
|
||||
PROTOBUF_C__END_DECLS
|
||||
|
||||
|
||||
#endif /* PROTOBUF_C_proto_2fauthentication_2eproto__INCLUDED */
|
||||
#endif /* PROTOBUF_C_authentication_2eproto__INCLUDED */
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
|
||||
/* Generated from: proto/keyexchange.proto */
|
||||
/* Generated from: keyexchange.proto */
|
||||
|
||||
/* Do not generate deprecated warnings for self */
|
||||
#ifndef PROTOBUF_C__NO_DEPRECATED
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
|
||||
/* Generated from: proto/keyexchange.proto */
|
||||
/* Generated from: keyexchange.proto */
|
||||
|
||||
#ifndef PROTOBUF_C_proto_2fkeyexchange_2eproto__INCLUDED
|
||||
#define PROTOBUF_C_proto_2fkeyexchange_2eproto__INCLUDED
|
||||
#ifndef PROTOBUF_C_keyexchange_2eproto__INCLUDED
|
||||
#define PROTOBUF_C_keyexchange_2eproto__INCLUDED
|
||||
|
||||
#include <protobuf-c/protobuf-c.h>
|
||||
|
||||
@ -10,38 +10,38 @@ PROTOBUF_C__BEGIN_DECLS
|
||||
|
||||
#if PROTOBUF_C_VERSION_NUMBER < 1000000
|
||||
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
|
||||
#elif 1003003 < PROTOBUF_C_MIN_COMPILER_VERSION
|
||||
#elif 1004001 < PROTOBUF_C_MIN_COMPILER_VERSION
|
||||
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _ClientHello ClientHello;
|
||||
typedef struct _BuildInfo BuildInfo;
|
||||
typedef struct _LoginCryptoHelloUnion LoginCryptoHelloUnion;
|
||||
typedef struct _LoginCryptoDiffieHellmanHello LoginCryptoDiffieHellmanHello;
|
||||
typedef struct _FeatureSet FeatureSet;
|
||||
typedef struct _APResponseMessage APResponseMessage;
|
||||
typedef struct _APChallenge APChallenge;
|
||||
typedef struct _LoginCryptoChallengeUnion LoginCryptoChallengeUnion;
|
||||
typedef struct _LoginCryptoDiffieHellmanChallenge LoginCryptoDiffieHellmanChallenge;
|
||||
typedef struct _FingerprintChallengeUnion FingerprintChallengeUnion;
|
||||
typedef struct _FingerprintGrainChallenge FingerprintGrainChallenge;
|
||||
typedef struct _FingerprintHmacRipemdChallenge FingerprintHmacRipemdChallenge;
|
||||
typedef struct _PoWChallengeUnion PoWChallengeUnion;
|
||||
typedef struct _PoWHashCashChallenge PoWHashCashChallenge;
|
||||
typedef struct _CryptoChallengeUnion CryptoChallengeUnion;
|
||||
typedef struct _CryptoShannonChallenge CryptoShannonChallenge;
|
||||
typedef struct _CryptoRc4Sha1HmacChallenge CryptoRc4Sha1HmacChallenge;
|
||||
typedef struct _UpgradeRequiredMessage UpgradeRequiredMessage;
|
||||
typedef struct _APLoginFailed APLoginFailed;
|
||||
typedef struct _ClientResponsePlaintext ClientResponsePlaintext;
|
||||
typedef struct _LoginCryptoResponseUnion LoginCryptoResponseUnion;
|
||||
typedef struct _LoginCryptoDiffieHellmanResponse LoginCryptoDiffieHellmanResponse;
|
||||
typedef struct _PoWResponseUnion PoWResponseUnion;
|
||||
typedef struct _PoWHashCashResponse PoWHashCashResponse;
|
||||
typedef struct _CryptoResponseUnion CryptoResponseUnion;
|
||||
typedef struct _CryptoShannonResponse CryptoShannonResponse;
|
||||
typedef struct _CryptoRc4Sha1HmacResponse CryptoRc4Sha1HmacResponse;
|
||||
typedef struct ClientHello ClientHello;
|
||||
typedef struct BuildInfo BuildInfo;
|
||||
typedef struct LoginCryptoHelloUnion LoginCryptoHelloUnion;
|
||||
typedef struct LoginCryptoDiffieHellmanHello LoginCryptoDiffieHellmanHello;
|
||||
typedef struct FeatureSet FeatureSet;
|
||||
typedef struct APResponseMessage APResponseMessage;
|
||||
typedef struct APChallenge APChallenge;
|
||||
typedef struct LoginCryptoChallengeUnion LoginCryptoChallengeUnion;
|
||||
typedef struct LoginCryptoDiffieHellmanChallenge LoginCryptoDiffieHellmanChallenge;
|
||||
typedef struct FingerprintChallengeUnion FingerprintChallengeUnion;
|
||||
typedef struct FingerprintGrainChallenge FingerprintGrainChallenge;
|
||||
typedef struct FingerprintHmacRipemdChallenge FingerprintHmacRipemdChallenge;
|
||||
typedef struct PoWChallengeUnion PoWChallengeUnion;
|
||||
typedef struct PoWHashCashChallenge PoWHashCashChallenge;
|
||||
typedef struct CryptoChallengeUnion CryptoChallengeUnion;
|
||||
typedef struct CryptoShannonChallenge CryptoShannonChallenge;
|
||||
typedef struct CryptoRc4Sha1HmacChallenge CryptoRc4Sha1HmacChallenge;
|
||||
typedef struct UpgradeRequiredMessage UpgradeRequiredMessage;
|
||||
typedef struct APLoginFailed APLoginFailed;
|
||||
typedef struct ClientResponsePlaintext ClientResponsePlaintext;
|
||||
typedef struct LoginCryptoResponseUnion LoginCryptoResponseUnion;
|
||||
typedef struct LoginCryptoDiffieHellmanResponse LoginCryptoDiffieHellmanResponse;
|
||||
typedef struct PoWResponseUnion PoWResponseUnion;
|
||||
typedef struct PoWHashCashResponse PoWHashCashResponse;
|
||||
typedef struct CryptoResponseUnion CryptoResponseUnion;
|
||||
typedef struct CryptoShannonResponse CryptoShannonResponse;
|
||||
typedef struct CryptoRc4Sha1HmacResponse CryptoRc4Sha1HmacResponse;
|
||||
|
||||
|
||||
/* --- enums --- */
|
||||
@ -117,7 +117,7 @@ typedef enum _ErrorCode {
|
||||
|
||||
/* --- messages --- */
|
||||
|
||||
struct _ClientHello
|
||||
struct ClientHello
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
BuildInfo *build_info;
|
||||
@ -138,7 +138,7 @@ struct _ClientHello
|
||||
, NULL, 0,NULL, 0,NULL, 0,NULL, NULL, {0,NULL}, 0, {0,NULL}, NULL }
|
||||
|
||||
|
||||
struct _BuildInfo
|
||||
struct BuildInfo
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
Product product;
|
||||
@ -152,7 +152,7 @@ struct _BuildInfo
|
||||
, PRODUCT__PRODUCT_CLIENT, 0,NULL, PLATFORM__PLATFORM_WIN32_X86, 0 }
|
||||
|
||||
|
||||
struct _LoginCryptoHelloUnion
|
||||
struct LoginCryptoHelloUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
LoginCryptoDiffieHellmanHello *diffie_hellman;
|
||||
@ -162,7 +162,7 @@ struct _LoginCryptoHelloUnion
|
||||
, NULL }
|
||||
|
||||
|
||||
struct _LoginCryptoDiffieHellmanHello
|
||||
struct LoginCryptoDiffieHellmanHello
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData gc;
|
||||
@ -173,7 +173,7 @@ struct _LoginCryptoDiffieHellmanHello
|
||||
, {0,NULL}, 0 }
|
||||
|
||||
|
||||
struct _FeatureSet
|
||||
struct FeatureSet
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
protobuf_c_boolean has_autoupdate2;
|
||||
@ -186,7 +186,7 @@ struct _FeatureSet
|
||||
, 0, 0, 0, 0 }
|
||||
|
||||
|
||||
struct _APResponseMessage
|
||||
struct APResponseMessage
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
APChallenge *challenge;
|
||||
@ -198,7 +198,7 @@ struct _APResponseMessage
|
||||
, NULL, NULL, NULL }
|
||||
|
||||
|
||||
struct _APChallenge
|
||||
struct APChallenge
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
LoginCryptoChallengeUnion *login_crypto_challenge;
|
||||
@ -214,7 +214,7 @@ struct _APChallenge
|
||||
, NULL, NULL, NULL, NULL, {0,NULL}, 0, {0,NULL} }
|
||||
|
||||
|
||||
struct _LoginCryptoChallengeUnion
|
||||
struct LoginCryptoChallengeUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
LoginCryptoDiffieHellmanChallenge *diffie_hellman;
|
||||
@ -224,7 +224,7 @@ struct _LoginCryptoChallengeUnion
|
||||
, NULL }
|
||||
|
||||
|
||||
struct _LoginCryptoDiffieHellmanChallenge
|
||||
struct LoginCryptoDiffieHellmanChallenge
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData gs;
|
||||
@ -236,7 +236,7 @@ struct _LoginCryptoDiffieHellmanChallenge
|
||||
, {0,NULL}, 0, {0,NULL} }
|
||||
|
||||
|
||||
struct _FingerprintChallengeUnion
|
||||
struct FingerprintChallengeUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
FingerprintGrainChallenge *grain;
|
||||
@ -247,7 +247,7 @@ struct _FingerprintChallengeUnion
|
||||
, NULL, NULL }
|
||||
|
||||
|
||||
struct _FingerprintGrainChallenge
|
||||
struct FingerprintGrainChallenge
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData kek;
|
||||
@ -257,7 +257,7 @@ struct _FingerprintGrainChallenge
|
||||
, {0,NULL} }
|
||||
|
||||
|
||||
struct _FingerprintHmacRipemdChallenge
|
||||
struct FingerprintHmacRipemdChallenge
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData challenge;
|
||||
@ -267,7 +267,7 @@ struct _FingerprintHmacRipemdChallenge
|
||||
, {0,NULL} }
|
||||
|
||||
|
||||
struct _PoWChallengeUnion
|
||||
struct PoWChallengeUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
PoWHashCashChallenge *hash_cash;
|
||||
@ -277,7 +277,7 @@ struct _PoWChallengeUnion
|
||||
, NULL }
|
||||
|
||||
|
||||
struct _PoWHashCashChallenge
|
||||
struct PoWHashCashChallenge
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
protobuf_c_boolean has_prefix;
|
||||
@ -292,7 +292,7 @@ struct _PoWHashCashChallenge
|
||||
, 0, {0,NULL}, 0, 0, 0, 0 }
|
||||
|
||||
|
||||
struct _CryptoChallengeUnion
|
||||
struct CryptoChallengeUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
CryptoShannonChallenge *shannon;
|
||||
@ -303,7 +303,7 @@ struct _CryptoChallengeUnion
|
||||
, NULL, NULL }
|
||||
|
||||
|
||||
struct _CryptoShannonChallenge
|
||||
struct CryptoShannonChallenge
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
};
|
||||
@ -312,7 +312,7 @@ struct _CryptoShannonChallenge
|
||||
}
|
||||
|
||||
|
||||
struct _CryptoRc4Sha1HmacChallenge
|
||||
struct CryptoRc4Sha1HmacChallenge
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
};
|
||||
@ -321,7 +321,7 @@ struct _CryptoRc4Sha1HmacChallenge
|
||||
}
|
||||
|
||||
|
||||
struct _UpgradeRequiredMessage
|
||||
struct UpgradeRequiredMessage
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData upgrade_signed_part;
|
||||
@ -333,7 +333,7 @@ struct _UpgradeRequiredMessage
|
||||
, {0,NULL}, {0,NULL}, NULL }
|
||||
|
||||
|
||||
struct _APLoginFailed
|
||||
struct APLoginFailed
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ErrorCode error_code;
|
||||
@ -348,7 +348,7 @@ struct _APLoginFailed
|
||||
, ERROR_CODE__ProtocolError, 0, 0, 0, 0, NULL }
|
||||
|
||||
|
||||
struct _ClientResponsePlaintext
|
||||
struct ClientResponsePlaintext
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
LoginCryptoResponseUnion *login_crypto_response;
|
||||
@ -360,7 +360,7 @@ struct _ClientResponsePlaintext
|
||||
, NULL, NULL, NULL }
|
||||
|
||||
|
||||
struct _LoginCryptoResponseUnion
|
||||
struct LoginCryptoResponseUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
LoginCryptoDiffieHellmanResponse *diffie_hellman;
|
||||
@ -370,7 +370,7 @@ struct _LoginCryptoResponseUnion
|
||||
, NULL }
|
||||
|
||||
|
||||
struct _LoginCryptoDiffieHellmanResponse
|
||||
struct LoginCryptoDiffieHellmanResponse
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData hmac;
|
||||
@ -380,7 +380,7 @@ struct _LoginCryptoDiffieHellmanResponse
|
||||
, {0,NULL} }
|
||||
|
||||
|
||||
struct _PoWResponseUnion
|
||||
struct PoWResponseUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
PoWHashCashResponse *hash_cash;
|
||||
@ -390,7 +390,7 @@ struct _PoWResponseUnion
|
||||
, NULL }
|
||||
|
||||
|
||||
struct _PoWHashCashResponse
|
||||
struct PoWHashCashResponse
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
ProtobufCBinaryData hash_suffix;
|
||||
@ -400,7 +400,7 @@ struct _PoWHashCashResponse
|
||||
, {0,NULL} }
|
||||
|
||||
|
||||
struct _CryptoResponseUnion
|
||||
struct CryptoResponseUnion
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
CryptoShannonResponse *shannon;
|
||||
@ -411,7 +411,7 @@ struct _CryptoResponseUnion
|
||||
, NULL, NULL }
|
||||
|
||||
|
||||
struct _CryptoShannonResponse
|
||||
struct CryptoShannonResponse
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
protobuf_c_boolean has_dummy;
|
||||
@ -422,7 +422,7 @@ struct _CryptoShannonResponse
|
||||
, 0, 0 }
|
||||
|
||||
|
||||
struct _CryptoRc4Sha1HmacResponse
|
||||
struct CryptoRc4Sha1HmacResponse
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
protobuf_c_boolean has_dummy;
|
||||
@ -1073,4 +1073,4 @@ extern const ProtobufCMessageDescriptor crypto_rc4_sha1_hmac_response__descripto
|
||||
PROTOBUF_C__END_DECLS
|
||||
|
||||
|
||||
#endif /* PROTOBUF_C_proto_2fkeyexchange_2eproto__INCLUDED */
|
||||
#endif /* PROTOBUF_C_keyexchange_2eproto__INCLUDED */
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
|
||||
/* Generated from: proto/mercury.proto */
|
||||
/* Generated from: mercury.proto */
|
||||
|
||||
/* Do not generate deprecated warnings for self */
|
||||
#ifndef PROTOBUF_C__NO_DEPRECATED
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
|
||||
/* Generated from: proto/mercury.proto */
|
||||
/* Generated from: mercury.proto */
|
||||
|
||||
#ifndef PROTOBUF_C_proto_2fmercury_2eproto__INCLUDED
|
||||
#define PROTOBUF_C_proto_2fmercury_2eproto__INCLUDED
|
||||
#ifndef PROTOBUF_C_mercury_2eproto__INCLUDED
|
||||
#define PROTOBUF_C_mercury_2eproto__INCLUDED
|
||||
|
||||
#include <protobuf-c/protobuf-c.h>
|
||||
|
||||
@ -10,17 +10,17 @@ PROTOBUF_C__BEGIN_DECLS
|
||||
|
||||
#if PROTOBUF_C_VERSION_NUMBER < 1000000
|
||||
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
|
||||
#elif 1003003 < PROTOBUF_C_MIN_COMPILER_VERSION
|
||||
#elif 1004001 < PROTOBUF_C_MIN_COMPILER_VERSION
|
||||
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _MercuryMultiGetRequest MercuryMultiGetRequest;
|
||||
typedef struct _MercuryMultiGetReply MercuryMultiGetReply;
|
||||
typedef struct _MercuryRequest MercuryRequest;
|
||||
typedef struct _MercuryReply MercuryReply;
|
||||
typedef struct _Header Header;
|
||||
typedef struct _UserField UserField;
|
||||
typedef struct MercuryMultiGetRequest MercuryMultiGetRequest;
|
||||
typedef struct MercuryMultiGetReply MercuryMultiGetReply;
|
||||
typedef struct MercuryRequest MercuryRequest;
|
||||
typedef struct MercuryReply MercuryReply;
|
||||
typedef struct Header Header;
|
||||
typedef struct UserField UserField;
|
||||
|
||||
|
||||
/* --- enums --- */
|
||||
@ -34,7 +34,7 @@ typedef enum _MercuryReply__CachePolicy {
|
||||
|
||||
/* --- messages --- */
|
||||
|
||||
struct _MercuryMultiGetRequest
|
||||
struct MercuryMultiGetRequest
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
size_t n_request;
|
||||
@ -45,7 +45,7 @@ struct _MercuryMultiGetRequest
|
||||
, 0,NULL }
|
||||
|
||||
|
||||
struct _MercuryMultiGetReply
|
||||
struct MercuryMultiGetReply
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
size_t n_reply;
|
||||
@ -56,7 +56,7 @@ struct _MercuryMultiGetReply
|
||||
, 0,NULL }
|
||||
|
||||
|
||||
struct _MercuryRequest
|
||||
struct MercuryRequest
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
char *uri;
|
||||
@ -71,7 +71,7 @@ struct _MercuryRequest
|
||||
, NULL, NULL, 0, {0,NULL}, 0, {0,NULL} }
|
||||
|
||||
|
||||
struct _MercuryReply
|
||||
struct MercuryReply
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
protobuf_c_boolean has_status_code;
|
||||
@ -92,7 +92,7 @@ struct _MercuryReply
|
||||
, 0, 0, NULL, 0, MERCURY_REPLY__CACHE_POLICY__CACHE_NO, 0, 0, 0, {0,NULL}, NULL, 0, {0,NULL} }
|
||||
|
||||
|
||||
struct _Header
|
||||
struct Header
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
char *uri;
|
||||
@ -108,7 +108,7 @@ struct _Header
|
||||
, NULL, NULL, NULL, 0, 0, 0,NULL }
|
||||
|
||||
|
||||
struct _UserField
|
||||
struct UserField
|
||||
{
|
||||
ProtobufCMessage base;
|
||||
char *key;
|
||||
@ -271,4 +271,4 @@ extern const ProtobufCMessageDescriptor user_field__descriptor;
|
||||
PROTOBUF_C__END_DECLS
|
||||
|
||||
|
||||
#endif /* PROTOBUF_C_proto_2fmercury_2eproto__INCLUDED */
|
||||
#endif /* PROTOBUF_C_mercury_2eproto__INCLUDED */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,266 +1,318 @@
|
||||
syntax = "proto2";
|
||||
|
||||
message TopTracks {
|
||||
optional string country = 0x1;
|
||||
repeated Track track = 0x2;
|
||||
}
|
||||
|
||||
message ActivityPeriod {
|
||||
optional sint32 start_year = 0x1;
|
||||
optional sint32 end_year = 0x2;
|
||||
optional sint32 decade = 0x3;
|
||||
}
|
||||
package spotify.metadata;
|
||||
|
||||
message Artist {
|
||||
optional bytes gid = 0x1;
|
||||
optional string name = 0x2;
|
||||
optional sint32 popularity = 0x3;
|
||||
repeated TopTracks top_track = 0x4;
|
||||
repeated AlbumGroup album_group = 0x5;
|
||||
repeated AlbumGroup single_group = 0x6;
|
||||
repeated AlbumGroup compilation_group = 0x7;
|
||||
repeated AlbumGroup appears_on_group = 0x8;
|
||||
repeated string genre = 0x9;
|
||||
repeated ExternalId external_id = 0xa;
|
||||
repeated Image portrait = 0xb;
|
||||
repeated Biography biography = 0xc;
|
||||
repeated ActivityPeriod activity_period = 0xd;
|
||||
repeated Restriction restriction = 0xe;
|
||||
repeated Artist related = 0xf;
|
||||
optional bool is_portrait_album_cover = 0x10;
|
||||
optional ImageGroup portrait_group = 0x11;
|
||||
}
|
||||
|
||||
message AlbumGroup {
|
||||
repeated Album album = 0x1;
|
||||
}
|
||||
|
||||
message Date {
|
||||
optional sint32 year = 0x1;
|
||||
optional sint32 month = 0x2;
|
||||
optional sint32 day = 0x3;
|
||||
optional sint32 hour = 0x4;
|
||||
optional sint32 minute = 0x5;
|
||||
optional bytes gid = 1;
|
||||
optional string name = 2;
|
||||
optional sint32 popularity = 3;
|
||||
repeated TopTracks top_track = 4;
|
||||
repeated AlbumGroup album_group = 5;
|
||||
repeated AlbumGroup single_group = 6;
|
||||
repeated AlbumGroup compilation_group = 7;
|
||||
repeated AlbumGroup appears_on_group = 8;
|
||||
repeated string genre = 9;
|
||||
repeated ExternalId external_id = 10;
|
||||
repeated Image portrait = 11;
|
||||
repeated Biography biography = 12;
|
||||
repeated ActivityPeriod activity_period = 13;
|
||||
repeated Restriction restriction = 14;
|
||||
repeated Artist related = 15;
|
||||
optional bool is_portrait_album_cover = 16;
|
||||
optional ImageGroup portrait_group = 17;
|
||||
repeated SalePeriod sale_period = 18;
|
||||
repeated Availability availability = 20;
|
||||
}
|
||||
|
||||
message Album {
|
||||
optional bytes gid = 0x1;
|
||||
optional string name = 0x2;
|
||||
repeated Artist artist = 0x3;
|
||||
optional Type typ = 0x4;
|
||||
enum Type {
|
||||
ALBUM = 0x1;
|
||||
SINGLE = 0x2;
|
||||
COMPILATION = 0x3;
|
||||
EP = 0x4;
|
||||
}
|
||||
optional string label = 0x5;
|
||||
optional Date date = 0x6;
|
||||
optional sint32 popularity = 0x7;
|
||||
repeated string genre = 0x8;
|
||||
repeated Image cover = 0x9;
|
||||
repeated ExternalId external_id = 0xa;
|
||||
repeated Disc disc = 0xb;
|
||||
repeated string review = 0xc;
|
||||
repeated Copyright copyright = 0xd;
|
||||
repeated Restriction restriction = 0xe;
|
||||
repeated Album related = 0xf;
|
||||
repeated SalePeriod sale_period = 0x10;
|
||||
optional ImageGroup cover_group = 0x11;
|
||||
optional bytes gid = 1;
|
||||
optional string name = 2;
|
||||
repeated Artist artist = 3;
|
||||
|
||||
optional Type type = 4;
|
||||
enum Type {
|
||||
ALBUM = 1;
|
||||
SINGLE = 2;
|
||||
COMPILATION = 3;
|
||||
EP = 4;
|
||||
AUDIOBOOK = 5;
|
||||
PODCAST = 6;
|
||||
}
|
||||
|
||||
optional string label = 5;
|
||||
optional Date date = 6;
|
||||
optional sint32 popularity = 7;
|
||||
repeated string genre = 8;
|
||||
repeated Image cover = 9;
|
||||
repeated ExternalId external_id = 10;
|
||||
repeated Disc disc = 11;
|
||||
repeated string review = 12;
|
||||
repeated Copyright copyright = 13;
|
||||
repeated Restriction restriction = 14;
|
||||
repeated Album related = 15;
|
||||
repeated SalePeriod sale_period = 16;
|
||||
optional ImageGroup cover_group = 17;
|
||||
optional string original_title = 18;
|
||||
optional string version_title = 19;
|
||||
optional string type_str = 20;
|
||||
repeated Availability availability = 23;
|
||||
}
|
||||
|
||||
message Track {
|
||||
optional bytes gid = 0x1;
|
||||
optional string name = 0x2;
|
||||
optional Album album = 0x3;
|
||||
repeated Artist artist = 0x4;
|
||||
optional sint32 number = 0x5;
|
||||
optional sint32 disc_number = 0x6;
|
||||
optional sint32 duration = 0x7;
|
||||
optional sint32 popularity = 0x8;
|
||||
optional bool explicit = 0x9;
|
||||
repeated ExternalId external_id = 0xa;
|
||||
repeated Restriction restriction = 0xb;
|
||||
repeated AudioFile file = 0xc;
|
||||
repeated Track alternative = 0xd;
|
||||
repeated SalePeriod sale_period = 0xe;
|
||||
repeated AudioFile preview = 0xf;
|
||||
optional bytes gid = 1;
|
||||
optional string name = 2;
|
||||
optional Album album = 3;
|
||||
repeated Artist artist = 4;
|
||||
optional sint32 number = 5;
|
||||
optional sint32 disc_number = 6;
|
||||
optional sint32 duration = 7;
|
||||
optional sint32 popularity = 8;
|
||||
optional bool explicit = 9;
|
||||
repeated ExternalId external_id = 10;
|
||||
repeated Restriction restriction = 11;
|
||||
repeated AudioFile file = 12;
|
||||
repeated Track alternative = 13;
|
||||
repeated SalePeriod sale_period = 14;
|
||||
repeated AudioFile preview = 15;
|
||||
repeated string tags = 16;
|
||||
optional int64 earliest_live_timestamp = 17;
|
||||
optional bool has_lyrics = 18;
|
||||
repeated Availability availability = 19;
|
||||
optional Licensor licensor = 21;
|
||||
repeated string language_of_performance = 22;
|
||||
repeated ContentRating content_rating = 25;
|
||||
optional string original_title = 27;
|
||||
optional string version_title = 28;
|
||||
repeated ArtistWithRole artist_with_role = 32;
|
||||
}
|
||||
|
||||
message Image {
|
||||
optional bytes file_id = 0x1;
|
||||
optional Size size = 0x2;
|
||||
enum Size {
|
||||
DEFAULT = 0x0;
|
||||
SMALL = 0x1;
|
||||
LARGE = 0x2;
|
||||
XLARGE = 0x3;
|
||||
}
|
||||
optional sint32 width = 0x3;
|
||||
optional sint32 height = 0x4;
|
||||
message ArtistWithRole {
|
||||
optional bytes artist_gid = 1;
|
||||
optional string artist_name = 2;
|
||||
|
||||
optional ArtistRole role = 3;
|
||||
enum ArtistRole {
|
||||
ARTIST_ROLE_UNKNOWN = 0;
|
||||
ARTIST_ROLE_MAIN_ARTIST = 1;
|
||||
ARTIST_ROLE_FEATURED_ARTIST = 2;
|
||||
ARTIST_ROLE_REMIXER = 3;
|
||||
ARTIST_ROLE_ACTOR = 4;
|
||||
ARTIST_ROLE_COMPOSER = 5;
|
||||
ARTIST_ROLE_CONDUCTOR = 6;
|
||||
ARTIST_ROLE_ORCHESTRA = 7;
|
||||
}
|
||||
}
|
||||
|
||||
message ImageGroup {
|
||||
repeated Image image = 0x1;
|
||||
}
|
||||
|
||||
message Biography {
|
||||
optional string text = 0x1;
|
||||
repeated Image portrait = 0x2;
|
||||
repeated ImageGroup portrait_group = 0x3;
|
||||
}
|
||||
|
||||
message Disc {
|
||||
optional sint32 number = 0x1;
|
||||
optional string name = 0x2;
|
||||
repeated Track track = 0x3;
|
||||
}
|
||||
|
||||
message Copyright {
|
||||
optional Type typ = 0x1;
|
||||
enum Type {
|
||||
P = 0x0;
|
||||
C = 0x1;
|
||||
}
|
||||
optional string text = 0x2;
|
||||
}
|
||||
|
||||
message Restriction {
|
||||
enum Catalogue {
|
||||
AD = 0;
|
||||
SUBSCRIPTION = 1;
|
||||
CATALOGUE_ALL = 2;
|
||||
SHUFFLE = 3;
|
||||
COMMERCIAL = 4;
|
||||
}
|
||||
enum Type {
|
||||
STREAMING = 0x0;
|
||||
}
|
||||
repeated Catalogue catalogue = 0x1;
|
||||
optional string countries_allowed = 0x2;
|
||||
optional string countries_forbidden = 0x3;
|
||||
optional Type typ = 0x4;
|
||||
|
||||
repeated string catalogue_str = 0x5;
|
||||
}
|
||||
|
||||
message Availability {
|
||||
repeated string catalogue_str = 0x1;
|
||||
optional Date start = 0x2;
|
||||
}
|
||||
|
||||
message SalePeriod {
|
||||
repeated Restriction restriction = 0x1;
|
||||
optional Date start = 0x2;
|
||||
optional Date end = 0x3;
|
||||
}
|
||||
|
||||
message ExternalId {
|
||||
optional string typ = 0x1;
|
||||
optional string id = 0x2;
|
||||
}
|
||||
|
||||
message AudioFile {
|
||||
optional bytes file_id = 0x1;
|
||||
optional Format format = 0x2;
|
||||
enum Format {
|
||||
OGG_VORBIS_96 = 0x0;
|
||||
OGG_VORBIS_160 = 0x1;
|
||||
OGG_VORBIS_320 = 0x2;
|
||||
MP3_256 = 0x3;
|
||||
MP3_320 = 0x4;
|
||||
MP3_160 = 0x5;
|
||||
MP3_96 = 0x6;
|
||||
MP3_160_ENC = 0x7;
|
||||
// v4
|
||||
// AAC_24 = 0x8;
|
||||
// AAC_48 = 0x9;
|
||||
MP4_128_DUAL = 0x8;
|
||||
OTHER3 = 0x9;
|
||||
AAC_160 = 0xa;
|
||||
AAC_320 = 0xb;
|
||||
MP4_128 = 0xc;
|
||||
OTHER5 = 0xd;
|
||||
}
|
||||
}
|
||||
|
||||
message VideoFile {
|
||||
optional bytes file_id = 1;
|
||||
}
|
||||
|
||||
// Podcast Protos
|
||||
message Show {
|
||||
optional bytes gid = 1;
|
||||
optional string name = 2;
|
||||
optional string description = 64;
|
||||
optional sint32 deprecated_popularity = 65;
|
||||
optional string publisher = 66;
|
||||
optional string language = 67;
|
||||
optional bool explicit = 68;
|
||||
optional ImageGroup cover_image = 69;
|
||||
repeated Episode episode = 70;
|
||||
repeated Copyright copyright = 71;
|
||||
repeated Restriction restriction = 72;
|
||||
repeated string keyword = 73;
|
||||
|
||||
optional MediaType media_type = 74;
|
||||
enum MediaType {
|
||||
MIXED = 0;
|
||||
AUDIO = 1;
|
||||
VIDEO = 2;
|
||||
MIXED = 0;
|
||||
AUDIO = 1;
|
||||
VIDEO = 2;
|
||||
}
|
||||
|
||||
optional ConsumptionOrder consumption_order = 75;
|
||||
enum ConsumptionOrder {
|
||||
SEQUENTIAL = 1;
|
||||
EPISODIC = 2;
|
||||
RECENT = 3;
|
||||
}
|
||||
enum PassthroughEnum {
|
||||
UNKNOWN = 0;
|
||||
NONE = 1;
|
||||
ALLOWED = 2;
|
||||
SEQUENTIAL = 1;
|
||||
EPISODIC = 2;
|
||||
RECENT = 3;
|
||||
}
|
||||
optional bytes gid = 0x1;
|
||||
optional string name = 0x2;
|
||||
optional string description = 0x40;
|
||||
optional sint32 deprecated_popularity = 0x41;
|
||||
optional string publisher = 0x42;
|
||||
optional string language = 0x43;
|
||||
optional bool explicit = 0x44;
|
||||
optional ImageGroup covers = 0x45;
|
||||
repeated Episode episode = 0x46;
|
||||
repeated Copyright copyright = 0x47;
|
||||
repeated Restriction restriction = 0x48;
|
||||
repeated string keyword = 0x49;
|
||||
optional MediaType media_type = 0x4A;
|
||||
optional ConsumptionOrder consumption_order = 0x4B;
|
||||
optional bool interpret_restriction_using_geoip = 0x4C;
|
||||
repeated Availability availability = 0x4E;
|
||||
optional string country_of_origin = 0x4F;
|
||||
repeated Category categories = 0x50;
|
||||
optional PassthroughEnum passthrough = 0x51;
|
||||
|
||||
repeated Availability availability = 78;
|
||||
optional string trailer_uri = 83;
|
||||
optional bool music_and_talk = 85;
|
||||
optional bool is_audiobook = 89;
|
||||
}
|
||||
|
||||
message Episode {
|
||||
optional bytes gid = 0x1;
|
||||
optional string name = 0x2;
|
||||
optional sint32 duration = 0x7;
|
||||
optional sint32 popularity = 0x8;
|
||||
repeated AudioFile file = 0xc;
|
||||
optional string description = 0x40;
|
||||
optional sint32 number = 0x41;
|
||||
optional Date publish_time = 0x42;
|
||||
optional sint32 deprecated_popularity = 0x43;
|
||||
optional ImageGroup covers = 0x44;
|
||||
optional string language = 0x45;
|
||||
optional bool explicit = 0x46;
|
||||
optional Show show = 0x47;
|
||||
repeated VideoFile video = 0x48;
|
||||
repeated VideoFile video_preview = 0x49;
|
||||
repeated AudioFile audio_preview = 0x4A;
|
||||
repeated Restriction restriction = 0x4B;
|
||||
optional ImageGroup freeze_frame = 0x4C;
|
||||
repeated string keyword = 0x4D;
|
||||
// Order of these two flags might be wrong!
|
||||
optional bool suppress_monetization = 0x4E;
|
||||
optional bool interpret_restriction_using_geoip = 0x4F;
|
||||
|
||||
optional bool allow_background_playback = 0x51;
|
||||
repeated Availability availability = 0x52;
|
||||
optional string external_url = 0x53;
|
||||
optional OriginalAudio original_audio = 0x54;
|
||||
optional bytes gid = 1;
|
||||
optional string name = 2;
|
||||
optional sint32 duration = 7;
|
||||
repeated AudioFile audio = 12;
|
||||
optional string description = 64;
|
||||
optional sint32 number = 65;
|
||||
optional Date publish_time = 66;
|
||||
optional sint32 deprecated_popularity = 67;
|
||||
optional ImageGroup cover_image = 68;
|
||||
optional string language = 69;
|
||||
optional bool explicit = 70;
|
||||
optional Show show = 71;
|
||||
repeated VideoFile video = 72;
|
||||
repeated VideoFile video_preview = 73;
|
||||
repeated AudioFile audio_preview = 74;
|
||||
repeated Restriction restriction = 75;
|
||||
optional ImageGroup freeze_frame = 76;
|
||||
repeated string keyword = 77;
|
||||
optional bool allow_background_playback = 81;
|
||||
repeated Availability availability = 82;
|
||||
optional string external_url = 83;
|
||||
|
||||
optional EpisodeType type = 87;
|
||||
enum EpisodeType {
|
||||
FULL = 0;
|
||||
TRAILER = 1;
|
||||
BONUS = 2;
|
||||
}
|
||||
|
||||
optional bool music_and_talk = 91;
|
||||
repeated ContentRating content_rating = 95;
|
||||
optional bool is_audiobook_chapter = 96;
|
||||
}
|
||||
|
||||
message Category {
|
||||
optional string name = 0x1;
|
||||
repeated Category subcategories = 0x2;
|
||||
message Licensor {
|
||||
optional bytes uuid = 1;
|
||||
}
|
||||
|
||||
message OriginalAudio {
|
||||
optional bytes uuid = 0x1;
|
||||
message TopTracks {
|
||||
optional string country = 1;
|
||||
repeated Track track = 2;
|
||||
}
|
||||
|
||||
message ActivityPeriod {
|
||||
optional sint32 start_year = 1;
|
||||
optional sint32 end_year = 2;
|
||||
optional sint32 decade = 3;
|
||||
}
|
||||
|
||||
message AlbumGroup {
|
||||
repeated Album album = 1;
|
||||
}
|
||||
|
||||
message Date {
|
||||
optional sint32 year = 1;
|
||||
optional sint32 month = 2;
|
||||
optional sint32 day = 3;
|
||||
optional sint32 hour = 4;
|
||||
optional sint32 minute = 5;
|
||||
}
|
||||
|
||||
message Image {
|
||||
optional bytes file_id = 1;
|
||||
|
||||
optional Size size = 2;
|
||||
enum Size {
|
||||
DEFAULT = 0;
|
||||
SMALL = 1;
|
||||
LARGE = 2;
|
||||
XLARGE = 3;
|
||||
}
|
||||
|
||||
optional sint32 width = 3;
|
||||
optional sint32 height = 4;
|
||||
}
|
||||
|
||||
message ImageGroup {
|
||||
repeated Image image = 1;
|
||||
}
|
||||
|
||||
message Biography {
|
||||
optional string text = 1;
|
||||
repeated Image portrait = 2;
|
||||
repeated ImageGroup portrait_group = 3;
|
||||
}
|
||||
|
||||
message Disc {
|
||||
optional sint32 number = 1;
|
||||
optional string name = 2;
|
||||
repeated Track track = 3;
|
||||
}
|
||||
|
||||
message Copyright {
|
||||
optional Type type = 1;
|
||||
enum Type {
|
||||
P = 0;
|
||||
C = 1;
|
||||
}
|
||||
|
||||
optional string text = 2;
|
||||
}
|
||||
|
||||
message Restriction {
|
||||
repeated Catalogue catalogue = 1;
|
||||
enum Catalogue {
|
||||
AD = 0;
|
||||
SUBSCRIPTION = 1;
|
||||
CATALOGUE_ALL = 2;
|
||||
SHUFFLE = 3;
|
||||
COMMERCIAL = 4;
|
||||
}
|
||||
|
||||
optional Type type = 4;
|
||||
enum Type {
|
||||
STREAMING = 0;
|
||||
}
|
||||
|
||||
repeated string catalogue_str = 5;
|
||||
|
||||
oneof country_restriction {
|
||||
string countries_allowed = 2;
|
||||
string countries_forbidden = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message Availability {
|
||||
repeated string catalogue_str = 1;
|
||||
optional Date start = 2;
|
||||
}
|
||||
|
||||
message SalePeriod {
|
||||
repeated Restriction restriction = 1;
|
||||
optional Date start = 2;
|
||||
optional Date end = 3;
|
||||
}
|
||||
|
||||
message ExternalId {
|
||||
optional string type = 1;
|
||||
optional string id = 2;
|
||||
}
|
||||
|
||||
message AudioFile {
|
||||
optional bytes file_id = 1;
|
||||
|
||||
optional Format format = 2;
|
||||
enum Format {
|
||||
OGG_VORBIS_96 = 0;
|
||||
OGG_VORBIS_160 = 1;
|
||||
OGG_VORBIS_320 = 2;
|
||||
MP3_256 = 3;
|
||||
MP3_320 = 4;
|
||||
MP3_160 = 5;
|
||||
MP3_96 = 6;
|
||||
MP3_160_ENC = 7;
|
||||
AAC_24 = 8;
|
||||
AAC_48 = 9;
|
||||
MP4_128 = 10;
|
||||
MP4_128_DUAL = 11;
|
||||
MP4_128_CBCS = 12;
|
||||
MP4_256 = 13;
|
||||
MP4_256_DUAL = 14;
|
||||
MP4_256_CBCS = 15;
|
||||
FLAC_FLAC = 16;
|
||||
XHE_AAC_24 = 18;
|
||||
XHE_AAC_16 = 19;
|
||||
XHE_AAC_12 = 20;
|
||||
FLAC_FLAC_24BIT = 22;
|
||||
}
|
||||
}
|
||||
|
||||
message VideoFile {
|
||||
optional bytes file_id = 1;
|
||||
}
|
||||
|
||||
message ContentRating {
|
||||
optional string country = 1;
|
||||
repeated string tag = 2;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user