WIP, Using table for filters in Audio Widget

This commit is contained in:
emeric
2014-05-20 19:06:29 +02:00
parent df74634014
commit eadb0fbec3
7 changed files with 183 additions and 319 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ Artist::getNone(Wt::Dbo::Session& session)
}
Wt::Dbo::collection<Artist::pointer>
Artist::getAll(Wt::Dbo::Session& session, std::size_t offset, std::size_t size)
Artist::getAll(Wt::Dbo::Session& session, int offset, int size)
{
return session.find<Artist>().offset(offset).limit(size);
}
+5 -2
View File
@@ -20,14 +20,15 @@ class Artist
public:
typedef Wt::Dbo::ptr<Artist> pointer;
typedef Wt::Dbo::dbo_traits<Artist>::IdType id_type;
Artist() {}
Artist(const std::string& p_name);
// Accessors
static pointer getByName(Wt::Dbo::Session& session, const std::string& name);
static pointer getNone(Wt::Dbo::Session& session);
static Wt::Dbo::collection<pointer> getAll(Wt::Dbo::Session& session, std::size_t offset, std::size_t size);
static Wt::Dbo::collection<pointer> getAll(Wt::Dbo::Session& session, int offset = -1, int size = -1);
const std::string& getName(void) const { return _name; }
@@ -66,6 +67,8 @@ class Release
static pointer getByName(Wt::Dbo::Session& session, const std::string& name);
static pointer getNone(Wt::Dbo::Session& session);
static Wt::Dbo::collection<pointer> getAll(Wt::Dbo::Session& session, Artist::id_type id, int offset = -1, int size = -1);
// Create
static pointer create(Wt::Dbo::Session& session, const std::string& name);
+6
View File
@@ -27,3 +27,9 @@ Release::create(Wt::Dbo::Session& session, const std::string& name)
return session.add(new Release(name));
}
Wt::Dbo::collection<Release::pointer>
Release::getAll(Wt::Dbo::Session& session, Artist::id_type id, int offset, int size)
{
return session.query<Release::pointer>("select * from Release INNER JOIN Release.id = Artist.id").where("artist.id = ?").bind(id);
}
+127 -185
View File
@@ -165,8 +165,7 @@ void protobuf_AssignDesc_collection_2eproto() {
::google::protobuf::MessageFactory::generated_factory(),
sizeof(AudioCollectionRequest_GetReleaseList));
AudioCollectionRequest_GetTrackList_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(4);
static const int AudioCollectionRequest_GetTrackList_offsets_[6] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, filter_name_),
static const int AudioCollectionRequest_GetTrackList_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, artist_id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, release_id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, genre_id_),
@@ -452,7 +451,7 @@ void protobuf_AddDesc_collection_2eproto() {
::Remote::protobuf_AddDesc_common_2eproto();
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\020collection.proto\022\006Remote\032\014common.proto"
"\"\374\007\n\026AudioCollectionRequest\0221\n\004type\030\001 \002("
"\"\347\007\n\026AudioCollectionRequest\0221\n\004type\030\001 \002("
"\0162#.Remote.AudioCollectionRequest.Type\022\?"
"\n\nget_genres\030\002 \001(\0132+.Remote.AudioCollect"
"ionRequest.GetGenreList\022A\n\013get_artists\030\003"
@@ -467,49 +466,48 @@ void protobuf_AddDesc_collection_2eproto() {
"\032i\n\rGetArtistList\022\020\n\010genre_id\030\002 \003(\004\022F\n\017b"
"atch_parameter\030\003 \002(\0132-.Remote.AudioColle"
"ctionRequest.BatchParameter\032\224\001\n\016GetRelea"
"seList\022\021\n\tartist_id\030\002 \003(\004\022\024\n\014filter_genr"
"e\030\003 \003(\004\022\021\n\tget_cover\030\004 \001(\010\022F\n\017batch_para"
"meter\030\005 \002(\0132-.Remote.AudioCollectionRequ"
"est.BatchParameter\032\267\001\n\014GetTrackList\022\023\n\013f"
"ilter_name\030\001 \001(\t\022\021\n\tartist_id\030\002 \003(\004\022\022\n\nr"
"elease_id\030\003 \003(\004\022\020\n\010genre_id\030\004 \003(\004\022\021\n\tget"
"_cover\030\005 \001(\010\022F\n\017batch_parameter\030\006 \002(\0132-."
"Remote.AudioCollectionRequest.BatchParam"
"eter\"a\n\004Type\022\024\n\020TypeGetGenreList\020\001\022\025\n\021Ty"
"peGetArtistList\020\002\022\026\n\022TypeGetReleaseList\020"
"\003\022\024\n\020TypeGetTrackList\020\004\"\365\t\n\027AudioCollect"
"ionResponse\0222\n\004type\030\001 \001(\0162$.Remote.Audio"
"CollectionResponse.Type\022\034\n\005error\030\002 \001(\0132\r"
".Remote.Error\022=\n\ngenre_list\030\003 \001(\0132).Remo"
"te.AudioCollectionResponse.GenreList\022\?\n\013"
"artist_list\030\004 \001(\0132*.Remote.AudioCollecti"
"onResponse.ArtistList\022A\n\014release_list\030\005 "
"\001(\0132+.Remote.AudioCollectionResponse.Rel"
"easeList\022=\n\ntrack_list\030\006 \001(\0132).Remote.Au"
"dioCollectionResponse.TrackList\032B\n\tGenre"
"List\0225\n\006genres\030\002 \003(\0132%.Remote.AudioColle"
"ctionResponse.Genre\032E\n\nArtistList\0227\n\007art"
"ists\030\002 \003(\0132&.Remote.AudioCollectionRespo"
"nse.Artist\032H\n\013ReleaseList\0229\n\010releases\030\002 "
"\003(\0132\'.Remote.AudioCollectionResponse.Rel"
"ease\032B\n\tTrackList\0225\n\006tracks\030\002 \003(\0132%.Remo"
"te.AudioCollectionResponse.Track\032+\n\010Cove"
"rArt\022\021\n\tmime_type\030\001 \001(\t\022\014\n\004data\030\002 \003(\014\032!\n"
"\005Genre\022\n\n\002id\030\001 \002(\004\022\014\n\004name\030\002 \002(\t\0327\n\006Arti"
"st\022\n\n\002id\030\001 \002(\004\022\014\n\004name\030\002 \002(\t\022\023\n\013nb_relea"
"ses\030\003 \002(\r\032\237\001\n\007Release\022\n\n\002id\030\001 \002(\004\022\014\n\004nam"
"e\030\002 \002(\t\022\021\n\tnb_tracks\030\003 \002(\r\022\025\n\rduration_s"
"ecs\030\004 \002(\r\022\024\n\014release_date\030\005 \001(\t\022:\n\010cover"
"Art\030\006 \001(\0132(.Remote.AudioCollectionRespon"
"se.CoverArt\032\333\001\n\005Track\022\n\n\002id\030\001 \002(\004\022\023\n\013dis"
"c_number\030\002 \001(\r\022\024\n\014track_number\030\003 \001(\r\022\016\n\006"
"artist\030\004 \001(\t\022\017\n\007release\030\005 \001(\t\022\014\n\004name\030\006 "
"\002(\t\022\025\n\rduration_secs\030\007 \002(\r\022\024\n\014release_da"
"te\030\010 \001(\t\022\035\n\025original_release_date\030\t \001(\t\022"
"\016\n\006genres\030\n \003(\t\022\020\n\010coverArt\030\013 \001(\014\"d\n\004Typ"
"e\022\r\n\tTypeError\020\001\022\021\n\rTypeGenreList\020\002\022\022\n\016T"
"ypeArtistList\020\003\022\023\n\017TypeReleaseList\020\004\022\021\n\r"
"TypeTrackList\020\005", 2335);
"seList\022\021\n\tartist_id\030\001 \003(\004\022\024\n\014filter_genr"
"e\030\002 \003(\004\022\021\n\tget_cover\030\003 \001(\010\022F\n\017batch_para"
"meter\030\004 \002(\0132-.Remote.AudioCollectionRequ"
"est.BatchParameter\032\242\001\n\014GetTrackList\022\021\n\ta"
"rtist_id\030\001 \003(\004\022\022\n\nrelease_id\030\002 \003(\004\022\020\n\010ge"
"nre_id\030\003 \003(\004\022\021\n\tget_cover\030\004 \001(\010\022F\n\017batch"
"_parameter\030\005 \002(\0132-.Remote.AudioCollectio"
"nRequest.BatchParameter\"a\n\004Type\022\024\n\020TypeG"
"etGenreList\020\001\022\025\n\021TypeGetArtistList\020\002\022\026\n\022"
"TypeGetReleaseList\020\003\022\024\n\020TypeGetTrackList"
"\020\004\"\365\t\n\027AudioCollectionResponse\0222\n\004type\030\001"
" \001(\0162$.Remote.AudioCollectionResponse.Ty"
"pe\022\034\n\005error\030\002 \001(\0132\r.Remote.Error\022=\n\ngenr"
"e_list\030\003 \001(\0132).Remote.AudioCollectionRes"
"ponse.GenreList\022\?\n\013artist_list\030\004 \001(\0132*.R"
"emote.AudioCollectionResponse.ArtistList"
"\022A\n\014release_list\030\005 \001(\0132+.Remote.AudioCol"
"lectionResponse.ReleaseList\022=\n\ntrack_lis"
"t\030\006 \001(\0132).Remote.AudioCollectionResponse"
".TrackList\032B\n\tGenreList\0225\n\006genres\030\002 \003(\0132"
"%.Remote.AudioCollectionResponse.Genre\032E"
"\n\nArtistList\0227\n\007artists\030\002 \003(\0132&.Remote.A"
"udioCollectionResponse.Artist\032H\n\013Release"
"List\0229\n\010releases\030\002 \003(\0132\'.Remote.AudioCol"
"lectionResponse.Release\032B\n\tTrackList\0225\n\006"
"tracks\030\002 \003(\0132%.Remote.AudioCollectionRes"
"ponse.Track\032+\n\010CoverArt\022\021\n\tmime_type\030\001 \001"
"(\t\022\014\n\004data\030\002 \003(\014\032!\n\005Genre\022\n\n\002id\030\001 \002(\004\022\014\n"
"\004name\030\002 \002(\t\0327\n\006Artist\022\n\n\002id\030\001 \002(\004\022\014\n\004nam"
"e\030\002 \002(\t\022\023\n\013nb_releases\030\003 \002(\r\032\237\001\n\007Release"
"\022\n\n\002id\030\001 \002(\004\022\014\n\004name\030\002 \002(\t\022\021\n\tnb_tracks\030"
"\003 \002(\r\022\025\n\rduration_secs\030\004 \002(\r\022\024\n\014release_"
"date\030\005 \001(\t\022:\n\010coverArt\030\006 \001(\0132(.Remote.Au"
"dioCollectionResponse.CoverArt\032\333\001\n\005Track"
"\022\n\n\002id\030\001 \002(\004\022\023\n\013disc_number\030\002 \001(\r\022\024\n\014tra"
"ck_number\030\003 \001(\r\022\016\n\006artist\030\004 \001(\t\022\017\n\007relea"
"se\030\005 \001(\t\022\014\n\004name\030\006 \002(\t\022\025\n\rduration_secs\030"
"\007 \002(\r\022\024\n\014release_date\030\010 \001(\t\022\035\n\025original_"
"release_date\030\t \001(\t\022\016\n\006genres\030\n \003(\t\022\020\n\010co"
"verArt\030\013 \001(\014\"d\n\004Type\022\r\n\tTypeError\020\001\022\021\n\rT"
"ypeGenreList\020\002\022\022\n\016TypeArtistList\020\003\022\023\n\017Ty"
"peReleaseList\020\004\022\021\n\rTypeTrackList\020\005", 2314);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"collection.proto", &protobuf_RegisterTypes);
AudioCollectionRequest::default_instance_ = new AudioCollectionRequest();
@@ -1392,14 +1390,14 @@ bool AudioCollectionRequest_GetReleaseList::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated uint64 artist_id = 2;
case 2: {
// repeated uint64 artist_id = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_artist_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1, 16, input, this->mutable_artist_id())));
1, 8, input, this->mutable_artist_id())));
} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
@@ -1409,19 +1407,19 @@ bool AudioCollectionRequest_GetReleaseList::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_artist_id;
if (input->ExpectTag(24)) goto parse_filter_genre;
if (input->ExpectTag(8)) goto parse_artist_id;
if (input->ExpectTag(16)) goto parse_filter_genre;
break;
}
// repeated uint64 filter_genre = 3;
case 3: {
// repeated uint64 filter_genre = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_filter_genre:
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1, 24, input, this->mutable_filter_genre())));
1, 16, input, this->mutable_filter_genre())));
} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
@@ -1431,13 +1429,13 @@ bool AudioCollectionRequest_GetReleaseList::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_filter_genre;
if (input->ExpectTag(32)) goto parse_get_cover;
if (input->ExpectTag(16)) goto parse_filter_genre;
if (input->ExpectTag(24)) goto parse_get_cover;
break;
}
// optional bool get_cover = 4;
case 4: {
// optional bool get_cover = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_get_cover:
@@ -1448,12 +1446,12 @@ bool AudioCollectionRequest_GetReleaseList::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(42)) goto parse_batch_parameter;
if (input->ExpectTag(34)) goto parse_batch_parameter;
break;
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
case 5: {
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_batch_parameter:
@@ -1484,27 +1482,27 @@ bool AudioCollectionRequest_GetReleaseList::MergePartialFromCodedStream(
void AudioCollectionRequest_GetReleaseList::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
for (int i = 0; i < this->artist_id_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(
2, this->artist_id(i), output);
1, this->artist_id(i), output);
}
// repeated uint64 filter_genre = 3;
// repeated uint64 filter_genre = 2;
for (int i = 0; i < this->filter_genre_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(
3, this->filter_genre(i), output);
2, this->filter_genre(i), output);
}
// optional bool get_cover = 4;
// optional bool get_cover = 3;
if (has_get_cover()) {
::google::protobuf::internal::WireFormatLite::WriteBool(4, this->get_cover(), output);
::google::protobuf::internal::WireFormatLite::WriteBool(3, this->get_cover(), output);
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 4;
if (has_batch_parameter()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
5, this->batch_parameter(), output);
4, this->batch_parameter(), output);
}
if (!unknown_fields().empty()) {
@@ -1515,28 +1513,28 @@ void AudioCollectionRequest_GetReleaseList::SerializeWithCachedSizes(
::google::protobuf::uint8* AudioCollectionRequest_GetReleaseList::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
for (int i = 0; i < this->artist_id_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteUInt64ToArray(2, this->artist_id(i), target);
WriteUInt64ToArray(1, this->artist_id(i), target);
}
// repeated uint64 filter_genre = 3;
// repeated uint64 filter_genre = 2;
for (int i = 0; i < this->filter_genre_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteUInt64ToArray(3, this->filter_genre(i), target);
WriteUInt64ToArray(2, this->filter_genre(i), target);
}
// optional bool get_cover = 4;
// optional bool get_cover = 3;
if (has_get_cover()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->get_cover(), target);
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->get_cover(), target);
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 4;
if (has_batch_parameter()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
5, this->batch_parameter(), target);
4, this->batch_parameter(), target);
}
if (!unknown_fields().empty()) {
@@ -1550,12 +1548,12 @@ int AudioCollectionRequest_GetReleaseList::ByteSize() const {
int total_size = 0;
if (_has_bits_[2 / 32] & (0xffu << (2 % 32))) {
// optional bool get_cover = 4;
// optional bool get_cover = 3;
if (has_get_cover()) {
total_size += 1 + 1;
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 4;
if (has_batch_parameter()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
@@ -1563,7 +1561,7 @@ int AudioCollectionRequest_GetReleaseList::ByteSize() const {
}
}
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
{
int data_size = 0;
for (int i = 0; i < this->artist_id_size(); i++) {
@@ -1573,7 +1571,7 @@ int AudioCollectionRequest_GetReleaseList::ByteSize() const {
total_size += 1 * this->artist_id_size() + data_size;
}
// repeated uint64 filter_genre = 3;
// repeated uint64 filter_genre = 2;
{
int data_size = 0;
for (int i = 0; i < this->filter_genre_size(); i++) {
@@ -1666,7 +1664,6 @@ void AudioCollectionRequest_GetReleaseList::Swap(AudioCollectionRequest_GetRelea
// -------------------------------------------------------------------
#ifndef _MSC_VER
const int AudioCollectionRequest_GetTrackList::kFilterNameFieldNumber;
const int AudioCollectionRequest_GetTrackList::kArtistIdFieldNumber;
const int AudioCollectionRequest_GetTrackList::kReleaseIdFieldNumber;
const int AudioCollectionRequest_GetTrackList::kGenreIdFieldNumber;
@@ -1691,7 +1688,6 @@ AudioCollectionRequest_GetTrackList::AudioCollectionRequest_GetTrackList(const A
void AudioCollectionRequest_GetTrackList::SharedCtor() {
_cached_size_ = 0;
filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
get_cover_ = false;
batch_parameter_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
@@ -1702,9 +1698,6 @@ AudioCollectionRequest_GetTrackList::~AudioCollectionRequest_GetTrackList() {
}
void AudioCollectionRequest_GetTrackList::SharedDtor() {
if (filter_name_ != &::google::protobuf::internal::kEmptyString) {
delete filter_name_;
}
if (this != default_instance_) {
delete batch_parameter_;
}
@@ -1732,12 +1725,7 @@ AudioCollectionRequest_GetTrackList* AudioCollectionRequest_GetTrackList::New()
}
void AudioCollectionRequest_GetTrackList::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_filter_name()) {
if (filter_name_ != &::google::protobuf::internal::kEmptyString) {
filter_name_->clear();
}
}
if (_has_bits_[3 / 32] & (0xffu << (3 % 32))) {
get_cover_ = false;
if (has_batch_parameter()) {
if (batch_parameter_ != NULL) batch_parameter_->::Remote::AudioCollectionRequest_BatchParameter::Clear();
@@ -1756,30 +1744,14 @@ bool AudioCollectionRequest_GetTrackList::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string filter_name = 1;
// repeated uint64 artist_id = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_filter_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->filter_name().data(), this->filter_name().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_artist_id;
break;
}
// repeated uint64 artist_id = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_artist_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1, 16, input, this->mutable_artist_id())));
1, 8, input, this->mutable_artist_id())));
} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
@@ -1789,19 +1761,19 @@ bool AudioCollectionRequest_GetTrackList::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_artist_id;
if (input->ExpectTag(24)) goto parse_release_id;
if (input->ExpectTag(8)) goto parse_artist_id;
if (input->ExpectTag(16)) goto parse_release_id;
break;
}
// repeated uint64 release_id = 3;
case 3: {
// repeated uint64 release_id = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_release_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1, 24, input, this->mutable_release_id())));
1, 16, input, this->mutable_release_id())));
} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
@@ -1811,19 +1783,19 @@ bool AudioCollectionRequest_GetTrackList::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_release_id;
if (input->ExpectTag(32)) goto parse_genre_id;
if (input->ExpectTag(16)) goto parse_release_id;
if (input->ExpectTag(24)) goto parse_genre_id;
break;
}
// repeated uint64 genre_id = 4;
case 4: {
// repeated uint64 genre_id = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_genre_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1, 32, input, this->mutable_genre_id())));
1, 24, input, this->mutable_genre_id())));
} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
@@ -1833,13 +1805,13 @@ bool AudioCollectionRequest_GetTrackList::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_genre_id;
if (input->ExpectTag(40)) goto parse_get_cover;
if (input->ExpectTag(24)) goto parse_genre_id;
if (input->ExpectTag(32)) goto parse_get_cover;
break;
}
// optional bool get_cover = 5;
case 5: {
// optional bool get_cover = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_get_cover:
@@ -1850,12 +1822,12 @@ bool AudioCollectionRequest_GetTrackList::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(50)) goto parse_batch_parameter;
if (input->ExpectTag(42)) goto parse_batch_parameter;
break;
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 6;
case 6: {
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_batch_parameter:
@@ -1886,42 +1858,33 @@ bool AudioCollectionRequest_GetTrackList::MergePartialFromCodedStream(
void AudioCollectionRequest_GetTrackList::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string filter_name = 1;
if (has_filter_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->filter_name().data(), this->filter_name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->filter_name(), output);
}
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
for (int i = 0; i < this->artist_id_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(
2, this->artist_id(i), output);
1, this->artist_id(i), output);
}
// repeated uint64 release_id = 3;
// repeated uint64 release_id = 2;
for (int i = 0; i < this->release_id_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(
3, this->release_id(i), output);
2, this->release_id(i), output);
}
// repeated uint64 genre_id = 4;
// repeated uint64 genre_id = 3;
for (int i = 0; i < this->genre_id_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(
4, this->genre_id(i), output);
3, this->genre_id(i), output);
}
// optional bool get_cover = 5;
// optional bool get_cover = 4;
if (has_get_cover()) {
::google::protobuf::internal::WireFormatLite::WriteBool(5, this->get_cover(), output);
::google::protobuf::internal::WireFormatLite::WriteBool(4, this->get_cover(), output);
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 6;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
if (has_batch_parameter()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
6, this->batch_parameter(), output);
5, this->batch_parameter(), output);
}
if (!unknown_fields().empty()) {
@@ -1932,44 +1895,34 @@ void AudioCollectionRequest_GetTrackList::SerializeWithCachedSizes(
::google::protobuf::uint8* AudioCollectionRequest_GetTrackList::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string filter_name = 1;
if (has_filter_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->filter_name().data(), this->filter_name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->filter_name(), target);
}
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
for (int i = 0; i < this->artist_id_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteUInt64ToArray(2, this->artist_id(i), target);
WriteUInt64ToArray(1, this->artist_id(i), target);
}
// repeated uint64 release_id = 3;
// repeated uint64 release_id = 2;
for (int i = 0; i < this->release_id_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteUInt64ToArray(3, this->release_id(i), target);
WriteUInt64ToArray(2, this->release_id(i), target);
}
// repeated uint64 genre_id = 4;
// repeated uint64 genre_id = 3;
for (int i = 0; i < this->genre_id_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteUInt64ToArray(4, this->genre_id(i), target);
WriteUInt64ToArray(3, this->genre_id(i), target);
}
// optional bool get_cover = 5;
// optional bool get_cover = 4;
if (has_get_cover()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->get_cover(), target);
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->get_cover(), target);
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 6;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
if (has_batch_parameter()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
6, this->batch_parameter(), target);
5, this->batch_parameter(), target);
}
if (!unknown_fields().empty()) {
@@ -1982,20 +1935,13 @@ void AudioCollectionRequest_GetTrackList::SerializeWithCachedSizes(
int AudioCollectionRequest_GetTrackList::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional string filter_name = 1;
if (has_filter_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->filter_name());
}
// optional bool get_cover = 5;
if (_has_bits_[3 / 32] & (0xffu << (3 % 32))) {
// optional bool get_cover = 4;
if (has_get_cover()) {
total_size += 1 + 1;
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 6;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
if (has_batch_parameter()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
@@ -2003,7 +1949,7 @@ int AudioCollectionRequest_GetTrackList::ByteSize() const {
}
}
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
{
int data_size = 0;
for (int i = 0; i < this->artist_id_size(); i++) {
@@ -2013,7 +1959,7 @@ int AudioCollectionRequest_GetTrackList::ByteSize() const {
total_size += 1 * this->artist_id_size() + data_size;
}
// repeated uint64 release_id = 3;
// repeated uint64 release_id = 2;
{
int data_size = 0;
for (int i = 0; i < this->release_id_size(); i++) {
@@ -2023,7 +1969,7 @@ int AudioCollectionRequest_GetTrackList::ByteSize() const {
total_size += 1 * this->release_id_size() + data_size;
}
// repeated uint64 genre_id = 4;
// repeated uint64 genre_id = 3;
{
int data_size = 0;
for (int i = 0; i < this->genre_id_size(); i++) {
@@ -2061,10 +2007,7 @@ void AudioCollectionRequest_GetTrackList::MergeFrom(const AudioCollectionRequest
artist_id_.MergeFrom(from.artist_id_);
release_id_.MergeFrom(from.release_id_);
genre_id_.MergeFrom(from.genre_id_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_filter_name()) {
set_filter_name(from.filter_name());
}
if (from._has_bits_[3 / 32] & (0xffu << (3 % 32))) {
if (from.has_get_cover()) {
set_get_cover(from.get_cover());
}
@@ -2088,7 +2031,7 @@ void AudioCollectionRequest_GetTrackList::CopyFrom(const AudioCollectionRequest_
}
bool AudioCollectionRequest_GetTrackList::IsInitialized() const {
if ((_has_bits_[0] & 0x00000020) != 0x00000020) return false;
if ((_has_bits_[0] & 0x00000010) != 0x00000010) return false;
if (has_batch_parameter()) {
if (!this->batch_parameter().IsInitialized()) return false;
@@ -2098,7 +2041,6 @@ bool AudioCollectionRequest_GetTrackList::IsInitialized() const {
void AudioCollectionRequest_GetTrackList::Swap(AudioCollectionRequest_GetTrackList* other) {
if (other != this) {
std::swap(filter_name_, other->filter_name_);
artist_id_.Swap(&other->artist_id_);
release_id_.Swap(&other->release_id_);
genre_id_.Swap(&other->genre_id_);
+34 -119
View File
@@ -424,10 +424,10 @@ class AudioCollectionRequest_GetReleaseList : public ::google::protobuf::Message
// accessors -------------------------------------------------------
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
inline int artist_id_size() const;
inline void clear_artist_id();
static const int kArtistIdFieldNumber = 2;
static const int kArtistIdFieldNumber = 1;
inline ::google::protobuf::uint64 artist_id(int index) const;
inline void set_artist_id(int index, ::google::protobuf::uint64 value);
inline void add_artist_id(::google::protobuf::uint64 value);
@@ -436,10 +436,10 @@ class AudioCollectionRequest_GetReleaseList : public ::google::protobuf::Message
inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
mutable_artist_id();
// repeated uint64 filter_genre = 3;
// repeated uint64 filter_genre = 2;
inline int filter_genre_size() const;
inline void clear_filter_genre();
static const int kFilterGenreFieldNumber = 3;
static const int kFilterGenreFieldNumber = 2;
inline ::google::protobuf::uint64 filter_genre(int index) const;
inline void set_filter_genre(int index, ::google::protobuf::uint64 value);
inline void add_filter_genre(::google::protobuf::uint64 value);
@@ -448,17 +448,17 @@ class AudioCollectionRequest_GetReleaseList : public ::google::protobuf::Message
inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
mutable_filter_genre();
// optional bool get_cover = 4;
// optional bool get_cover = 3;
inline bool has_get_cover() const;
inline void clear_get_cover();
static const int kGetCoverFieldNumber = 4;
static const int kGetCoverFieldNumber = 3;
inline bool get_cover() const;
inline void set_get_cover(bool value);
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 4;
inline bool has_batch_parameter() const;
inline void clear_batch_parameter();
static const int kBatchParameterFieldNumber = 5;
static const int kBatchParameterFieldNumber = 4;
inline const ::Remote::AudioCollectionRequest_BatchParameter& batch_parameter() const;
inline ::Remote::AudioCollectionRequest_BatchParameter* mutable_batch_parameter();
inline ::Remote::AudioCollectionRequest_BatchParameter* release_batch_parameter();
@@ -544,22 +544,10 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message {
// accessors -------------------------------------------------------
// optional string filter_name = 1;
inline bool has_filter_name() const;
inline void clear_filter_name();
static const int kFilterNameFieldNumber = 1;
inline const ::std::string& filter_name() const;
inline void set_filter_name(const ::std::string& value);
inline void set_filter_name(const char* value);
inline void set_filter_name(const char* value, size_t size);
inline ::std::string* mutable_filter_name();
inline ::std::string* release_filter_name();
inline void set_allocated_filter_name(::std::string* filter_name);
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
inline int artist_id_size() const;
inline void clear_artist_id();
static const int kArtistIdFieldNumber = 2;
static const int kArtistIdFieldNumber = 1;
inline ::google::protobuf::uint64 artist_id(int index) const;
inline void set_artist_id(int index, ::google::protobuf::uint64 value);
inline void add_artist_id(::google::protobuf::uint64 value);
@@ -568,10 +556,10 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message {
inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
mutable_artist_id();
// repeated uint64 release_id = 3;
// repeated uint64 release_id = 2;
inline int release_id_size() const;
inline void clear_release_id();
static const int kReleaseIdFieldNumber = 3;
static const int kReleaseIdFieldNumber = 2;
inline ::google::protobuf::uint64 release_id(int index) const;
inline void set_release_id(int index, ::google::protobuf::uint64 value);
inline void add_release_id(::google::protobuf::uint64 value);
@@ -580,10 +568,10 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message {
inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
mutable_release_id();
// repeated uint64 genre_id = 4;
// repeated uint64 genre_id = 3;
inline int genre_id_size() const;
inline void clear_genre_id();
static const int kGenreIdFieldNumber = 4;
static const int kGenreIdFieldNumber = 3;
inline ::google::protobuf::uint64 genre_id(int index) const;
inline void set_genre_id(int index, ::google::protobuf::uint64 value);
inline void add_genre_id(::google::protobuf::uint64 value);
@@ -592,17 +580,17 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message {
inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
mutable_genre_id();
// optional bool get_cover = 5;
// optional bool get_cover = 4;
inline bool has_get_cover() const;
inline void clear_get_cover();
static const int kGetCoverFieldNumber = 5;
static const int kGetCoverFieldNumber = 4;
inline bool get_cover() const;
inline void set_get_cover(bool value);
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 6;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
inline bool has_batch_parameter() const;
inline void clear_batch_parameter();
static const int kBatchParameterFieldNumber = 6;
static const int kBatchParameterFieldNumber = 5;
inline const ::Remote::AudioCollectionRequest_BatchParameter& batch_parameter() const;
inline ::Remote::AudioCollectionRequest_BatchParameter* mutable_batch_parameter();
inline ::Remote::AudioCollectionRequest_BatchParameter* release_batch_parameter();
@@ -610,8 +598,6 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message {
// @@protoc_insertion_point(class_scope:Remote.AudioCollectionRequest.GetTrackList)
private:
inline void set_has_filter_name();
inline void clear_has_filter_name();
inline void set_has_get_cover();
inline void clear_has_get_cover();
inline void set_has_batch_parameter();
@@ -619,7 +605,6 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message {
::google::protobuf::UnknownFieldSet _unknown_fields_;
::std::string* filter_name_;
::google::protobuf::RepeatedField< ::google::protobuf::uint64 > artist_id_;
::google::protobuf::RepeatedField< ::google::protobuf::uint64 > release_id_;
::google::protobuf::RepeatedField< ::google::protobuf::uint64 > genre_id_;
@@ -627,7 +612,7 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message {
bool get_cover_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
friend void protobuf_AddDesc_collection_2eproto();
friend void protobuf_AssignDesc_collection_2eproto();
@@ -2152,7 +2137,7 @@ inline void AudioCollectionRequest_GetArtistList::set_allocated_batch_parameter(
// AudioCollectionRequest_GetReleaseList
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
inline int AudioCollectionRequest_GetReleaseList::artist_id_size() const {
return artist_id_.size();
}
@@ -2177,7 +2162,7 @@ AudioCollectionRequest_GetReleaseList::mutable_artist_id() {
return &artist_id_;
}
// repeated uint64 filter_genre = 3;
// repeated uint64 filter_genre = 2;
inline int AudioCollectionRequest_GetReleaseList::filter_genre_size() const {
return filter_genre_.size();
}
@@ -2202,7 +2187,7 @@ AudioCollectionRequest_GetReleaseList::mutable_filter_genre() {
return &filter_genre_;
}
// optional bool get_cover = 4;
// optional bool get_cover = 3;
inline bool AudioCollectionRequest_GetReleaseList::has_get_cover() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
@@ -2224,7 +2209,7 @@ inline void AudioCollectionRequest_GetReleaseList::set_get_cover(bool value) {
get_cover_ = value;
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 4;
inline bool AudioCollectionRequest_GetReleaseList::has_batch_parameter() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
@@ -2266,77 +2251,7 @@ inline void AudioCollectionRequest_GetReleaseList::set_allocated_batch_parameter
// AudioCollectionRequest_GetTrackList
// optional string filter_name = 1;
inline bool AudioCollectionRequest_GetTrackList::has_filter_name() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void AudioCollectionRequest_GetTrackList::set_has_filter_name() {
_has_bits_[0] |= 0x00000001u;
}
inline void AudioCollectionRequest_GetTrackList::clear_has_filter_name() {
_has_bits_[0] &= ~0x00000001u;
}
inline void AudioCollectionRequest_GetTrackList::clear_filter_name() {
if (filter_name_ != &::google::protobuf::internal::kEmptyString) {
filter_name_->clear();
}
clear_has_filter_name();
}
inline const ::std::string& AudioCollectionRequest_GetTrackList::filter_name() const {
return *filter_name_;
}
inline void AudioCollectionRequest_GetTrackList::set_filter_name(const ::std::string& value) {
set_has_filter_name();
if (filter_name_ == &::google::protobuf::internal::kEmptyString) {
filter_name_ = new ::std::string;
}
filter_name_->assign(value);
}
inline void AudioCollectionRequest_GetTrackList::set_filter_name(const char* value) {
set_has_filter_name();
if (filter_name_ == &::google::protobuf::internal::kEmptyString) {
filter_name_ = new ::std::string;
}
filter_name_->assign(value);
}
inline void AudioCollectionRequest_GetTrackList::set_filter_name(const char* value, size_t size) {
set_has_filter_name();
if (filter_name_ == &::google::protobuf::internal::kEmptyString) {
filter_name_ = new ::std::string;
}
filter_name_->assign(reinterpret_cast<const char*>(value), size);
}
inline ::std::string* AudioCollectionRequest_GetTrackList::mutable_filter_name() {
set_has_filter_name();
if (filter_name_ == &::google::protobuf::internal::kEmptyString) {
filter_name_ = new ::std::string;
}
return filter_name_;
}
inline ::std::string* AudioCollectionRequest_GetTrackList::release_filter_name() {
clear_has_filter_name();
if (filter_name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = filter_name_;
filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void AudioCollectionRequest_GetTrackList::set_allocated_filter_name(::std::string* filter_name) {
if (filter_name_ != &::google::protobuf::internal::kEmptyString) {
delete filter_name_;
}
if (filter_name) {
set_has_filter_name();
filter_name_ = filter_name;
} else {
clear_has_filter_name();
filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
}
// repeated uint64 artist_id = 2;
// repeated uint64 artist_id = 1;
inline int AudioCollectionRequest_GetTrackList::artist_id_size() const {
return artist_id_.size();
}
@@ -2361,7 +2276,7 @@ AudioCollectionRequest_GetTrackList::mutable_artist_id() {
return &artist_id_;
}
// repeated uint64 release_id = 3;
// repeated uint64 release_id = 2;
inline int AudioCollectionRequest_GetTrackList::release_id_size() const {
return release_id_.size();
}
@@ -2386,7 +2301,7 @@ AudioCollectionRequest_GetTrackList::mutable_release_id() {
return &release_id_;
}
// repeated uint64 genre_id = 4;
// repeated uint64 genre_id = 3;
inline int AudioCollectionRequest_GetTrackList::genre_id_size() const {
return genre_id_.size();
}
@@ -2411,15 +2326,15 @@ AudioCollectionRequest_GetTrackList::mutable_genre_id() {
return &genre_id_;
}
// optional bool get_cover = 5;
// optional bool get_cover = 4;
inline bool AudioCollectionRequest_GetTrackList::has_get_cover() const {
return (_has_bits_[0] & 0x00000010u) != 0;
return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void AudioCollectionRequest_GetTrackList::set_has_get_cover() {
_has_bits_[0] |= 0x00000010u;
_has_bits_[0] |= 0x00000008u;
}
inline void AudioCollectionRequest_GetTrackList::clear_has_get_cover() {
_has_bits_[0] &= ~0x00000010u;
_has_bits_[0] &= ~0x00000008u;
}
inline void AudioCollectionRequest_GetTrackList::clear_get_cover() {
get_cover_ = false;
@@ -2433,15 +2348,15 @@ inline void AudioCollectionRequest_GetTrackList::set_get_cover(bool value) {
get_cover_ = value;
}
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 6;
// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5;
inline bool AudioCollectionRequest_GetTrackList::has_batch_parameter() const {
return (_has_bits_[0] & 0x00000020u) != 0;
return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void AudioCollectionRequest_GetTrackList::set_has_batch_parameter() {
_has_bits_[0] |= 0x00000020u;
_has_bits_[0] |= 0x00000010u;
}
inline void AudioCollectionRequest_GetTrackList::clear_has_batch_parameter() {
_has_bits_[0] &= ~0x00000020u;
_has_bits_[0] &= ~0x00000010u;
}
inline void AudioCollectionRequest_GetTrackList::clear_batch_parameter() {
if (batch_parameter_ != NULL) batch_parameter_->::Remote::AudioCollectionRequest_BatchParameter::Clear();
+9 -11
View File
@@ -26,26 +26,24 @@ message AudioCollectionRequest
message GetReleaseList
{
// Search filters
repeated uint64 artist_id = 2; // Release that contains at least a track of this artist
repeated uint64 filter_genre = 3; // Release that has at least a track of the genre
repeated uint64 artist_id = 1; // Release that contains at least a track of this artist
repeated uint64 filter_genre = 2; // Release that has at least a track of the genre
optional bool get_cover = 4; // Request cover art for each release
optional bool get_cover = 3; // Request cover art for each release
required BatchParameter batch_parameter = 5;
required BatchParameter batch_parameter = 4;
}
message GetTrackList
{
// Search filters
optional string filter_name = 1; // Track that contains 'filterName' in its name
repeated uint64 artist_id = 1; // Track that belongs to these artists
repeated uint64 release_id = 2; // Track that is part of these releases
repeated uint64 genre_id = 3; // Track that has at least a track of the genre
repeated uint64 artist_id = 2; // Track that belongs to these artists
repeated uint64 release_id = 3; // Track that is part of these releases
repeated uint64 genre_id = 4; // Track that has at least a track of the genre
optional bool get_cover = 4; // Request cover art for each track
optional bool get_cover = 5; // Request cover art for each track
required BatchParameter batch_parameter = 6;
required BatchParameter batch_parameter = 5;
}
+1 -1
View File
@@ -305,7 +305,7 @@ int main()
std::vector<GenreInfo> genres;
client.getGenres(genres);
// Dum genres
// Dump genres
std::cout << "Got " << genres.size() << " genres!" << std::endl;
BOOST_FOREACH(const GenreInfo& genre, genres)
std::cout << "Genre: '" << genre << "'" << std::endl;