diff --git a/database/Artist.cpp b/database/Artist.cpp index 5bf6c3e4..3402eacc 100644 --- a/database/Artist.cpp +++ b/database/Artist.cpp @@ -31,7 +31,7 @@ Artist::getNone(Wt::Dbo::Session& session) } Wt::Dbo::collection -Artist::getAll(Wt::Dbo::Session& session) +Artist::getAll(Wt::Dbo::Session& session, std::size_t offset, std::size_t size) { - return session.find(); + return session.find().offset(offset).limit(size); } diff --git a/database/AudioTypes.hpp b/database/AudioTypes.hpp index d314e61a..0011fb8a 100644 --- a/database/AudioTypes.hpp +++ b/database/AudioTypes.hpp @@ -27,7 +27,7 @@ class Artist // Accessors static pointer getByName(Wt::Dbo::Session& session, const std::string& name); static pointer getNone(Wt::Dbo::Session& session); - static Wt::Dbo::collection getAll(Wt::Dbo::Session& session); + static Wt::Dbo::collection getAll(Wt::Dbo::Session& session, std::size_t offset, std::size_t size); const std::string& getName(void) const { return _name; } diff --git a/remote/messages/Header.hpp b/remote/messages/Header.hpp index 1e1d0dc9..b04a47bd 100644 --- a/remote/messages/Header.hpp +++ b/remote/messages/Header.hpp @@ -41,11 +41,11 @@ class Header } } - void to_ostream(std::ostream& os) +/* void to_ostream(std::ostream& os) { - } + }*/ void to_buffer(std::array& buffer) const { diff --git a/remote/messages/collection.pb.cc b/remote/messages/collection.pb.cc index 974d9418..9ffa7aac 100644 --- a/remote/messages/collection.pb.cc +++ b/remote/messages/collection.pb.cc @@ -23,6 +23,9 @@ namespace { const ::google::protobuf::Descriptor* AudioCollectionRequest_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* AudioCollectionRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* AudioCollectionRequest_BatchParameter_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + AudioCollectionRequest_BatchParameter_reflection_ = NULL; const ::google::protobuf::Descriptor* AudioCollectionRequest_GetGenreList_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* AudioCollectionRequest_GetGenreList_reflection_ = NULL; @@ -96,7 +99,23 @@ void protobuf_AssignDesc_collection_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(AudioCollectionRequest)); - AudioCollectionRequest_GetGenreList_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(0); + AudioCollectionRequest_BatchParameter_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(0); + static const int AudioCollectionRequest_BatchParameter_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_BatchParameter, offset_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_BatchParameter, size_), + }; + AudioCollectionRequest_BatchParameter_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + AudioCollectionRequest_BatchParameter_descriptor_, + AudioCollectionRequest_BatchParameter::default_instance_, + AudioCollectionRequest_BatchParameter_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_BatchParameter, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_BatchParameter, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(AudioCollectionRequest_BatchParameter)); + AudioCollectionRequest_GetGenreList_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(1); static const int AudioCollectionRequest_GetGenreList_offsets_[2] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetGenreList, filter_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetGenreList, preferred_batch_size_), @@ -112,11 +131,11 @@ void protobuf_AssignDesc_collection_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(AudioCollectionRequest_GetGenreList)); - AudioCollectionRequest_GetArtistList_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(1); + AudioCollectionRequest_GetArtistList_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(2); static const int AudioCollectionRequest_GetArtistList_offsets_[3] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetArtistList, filter_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetArtistList, filter_genre_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetArtistList, preferred_batch_size_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetArtistList, batch_parameter_), }; AudioCollectionRequest_GetArtistList_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( @@ -129,13 +148,13 @@ void protobuf_AssignDesc_collection_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(AudioCollectionRequest_GetArtistList)); - AudioCollectionRequest_GetReleaseList_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(2); + AudioCollectionRequest_GetReleaseList_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(3); static const int AudioCollectionRequest_GetReleaseList_offsets_[5] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetReleaseList, filter_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetReleaseList, artist_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetReleaseList, filter_genre_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetReleaseList, get_cover_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetReleaseList, preferred_batch_size_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetReleaseList, batch_parameter_), }; AudioCollectionRequest_GetReleaseList_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( @@ -148,7 +167,7 @@ void protobuf_AssignDesc_collection_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(AudioCollectionRequest_GetReleaseList)); - AudioCollectionRequest_GetTrackList_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(3); + AudioCollectionRequest_GetTrackList_descriptor_ = AudioCollectionRequest_descriptor_->nested_type(4); static const int AudioCollectionRequest_GetTrackList_offsets_[8] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, filter_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, release_name_), @@ -157,7 +176,7 @@ void protobuf_AssignDesc_collection_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, disc_number_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, track_number_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, get_cover_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, preferred_batch_size_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionRequest_GetTrackList, batch_parameter_), }; AudioCollectionRequest_GetTrackList_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( @@ -173,8 +192,8 @@ void protobuf_AssignDesc_collection_2eproto() { AudioCollectionRequest_Type_descriptor_ = AudioCollectionRequest_descriptor_->enum_type(0); AudioCollectionResponse_descriptor_ = file->message_type(1); static const int AudioCollectionResponse_offsets_[6] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse, error_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse, error_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse, genre_list_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse, artist_list_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse, release_list_), @@ -192,8 +211,7 @@ void protobuf_AssignDesc_collection_2eproto() { ::google::protobuf::MessageFactory::generated_factory(), sizeof(AudioCollectionResponse)); AudioCollectionResponse_GenreList_descriptor_ = AudioCollectionResponse_descriptor_->nested_type(0); - static const int AudioCollectionResponse_GenreList_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse_GenreList, last_), + static const int AudioCollectionResponse_GenreList_offsets_[1] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse_GenreList, genres_), }; AudioCollectionResponse_GenreList_reflection_ = @@ -208,8 +226,7 @@ void protobuf_AssignDesc_collection_2eproto() { ::google::protobuf::MessageFactory::generated_factory(), sizeof(AudioCollectionResponse_GenreList)); AudioCollectionResponse_ArtistList_descriptor_ = AudioCollectionResponse_descriptor_->nested_type(1); - static const int AudioCollectionResponse_ArtistList_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse_ArtistList, last_), + static const int AudioCollectionResponse_ArtistList_offsets_[1] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse_ArtistList, artists_), }; AudioCollectionResponse_ArtistList_reflection_ = @@ -224,8 +241,7 @@ void protobuf_AssignDesc_collection_2eproto() { ::google::protobuf::MessageFactory::generated_factory(), sizeof(AudioCollectionResponse_ArtistList)); AudioCollectionResponse_ReleaseList_descriptor_ = AudioCollectionResponse_descriptor_->nested_type(2); - static const int AudioCollectionResponse_ReleaseList_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse_ReleaseList, last_), + static const int AudioCollectionResponse_ReleaseList_offsets_[1] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse_ReleaseList, releases_), }; AudioCollectionResponse_ReleaseList_reflection_ = @@ -240,8 +256,7 @@ void protobuf_AssignDesc_collection_2eproto() { ::google::protobuf::MessageFactory::generated_factory(), sizeof(AudioCollectionResponse_ReleaseList)); AudioCollectionResponse_TrackList_descriptor_ = AudioCollectionResponse_descriptor_->nested_type(3); - static const int AudioCollectionResponse_TrackList_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse_TrackList, last_), + static const int AudioCollectionResponse_TrackList_offsets_[1] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AudioCollectionResponse_TrackList, tracks_), }; AudioCollectionResponse_TrackList_reflection_ = @@ -360,6 +375,8 @@ void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( AudioCollectionRequest_descriptor_, &AudioCollectionRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + AudioCollectionRequest_BatchParameter_descriptor_, &AudioCollectionRequest_BatchParameter::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( AudioCollectionRequest_GetGenreList_descriptor_, &AudioCollectionRequest_GetGenreList::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( @@ -395,6 +412,8 @@ void protobuf_RegisterTypes(const ::std::string&) { void protobuf_ShutdownFile_collection_2eproto() { delete AudioCollectionRequest::default_instance_; delete AudioCollectionRequest_reflection_; + delete AudioCollectionRequest_BatchParameter::default_instance_; + delete AudioCollectionRequest_BatchParameter_reflection_; delete AudioCollectionRequest_GetGenreList::default_instance_; delete AudioCollectionRequest_GetGenreList_reflection_; delete AudioCollectionRequest_GetArtistList::default_instance_; @@ -434,7 +453,7 @@ void protobuf_AddDesc_collection_2eproto() { ::Remote::protobuf_AddDesc_common_2eproto(); ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( "\n\020collection.proto\022\006Remote\032\014common.proto" - "\"\206\007\n\026AudioCollectionRequest\0221\n\004type\030\001 \002(" + "\"\313\010\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" @@ -442,56 +461,61 @@ void protobuf_AddDesc_collection_2eproto() { "ArtistList\022C\n\014get_releases\030\004 \001(\0132-.Remot" "e.AudioCollectionRequest.GetReleaseList\022" "\?\n\nget_tracks\030\005 \001(\0132+.Remote.AudioCollec" - "tionRequest.GetTrackList\032A\n\014GetGenreList" - "\022\023\n\013filter_name\030\001 \001(\t\022\034\n\024preferred_batch" - "_size\030\002 \001(\r\032X\n\rGetArtistList\022\023\n\013filter_n" - "ame\030\001 \001(\t\022\024\n\014filter_genre\030\002 \003(\t\022\034\n\024prefe" - "rred_batch_size\030\003 \001(\r\032\201\001\n\016GetReleaseList" - "\022\023\n\013filter_name\030\001 \001(\t\022\023\n\013artist_name\030\002 \003" - "(\t\022\024\n\014filter_genre\030\003 \003(\t\022\021\n\tget_cover\030\004 " - "\001(\010\022\034\n\024preferred_batch_size\030\005 \001(\r\032\300\001\n\014Ge" - "tTrackList\022\023\n\013filter_name\030\001 \001(\t\022\024\n\014relea" - "se_name\030\002 \003(\t\022\023\n\013artist_name\030\003 \003(\t\022\024\n\014fi" - "lter_genre\030\004 \003(\t\022\023\n\013disc_number\030\005 \001(\r\022\024\n" - "\014track_number\030\006 \001(\r\022\021\n\tget_cover\030\007 \001(\010\022\034" - "\n\024preferred_batch_size\030\010 \001(\r\"K\n\004Type\022\025\n\021" - "TypeGetArtistList\020\000\022\026\n\022TypeGetReleaseLis" - "t\020\001\022\024\n\020TypeGetTrackList\020\002\"\351\t\n\027AudioColle" - "ctionResponse\022\034\n\005error\030\001 \002(\0132\r.Remote.Er" - "ror\0222\n\004type\030\002 \001(\0162$.Remote.AudioCollecti" - "onResponse.Type\022=\n\ngenre_list\030\003 \001(\0132).Re" - "mote.AudioCollectionResponse.GenreList\022\?" - "\n\013artist_list\030\004 \001(\0132*.Remote.AudioCollec" - "tionResponse.ArtistList\022A\n\014release_list\030" - "\005 \001(\0132+.Remote.AudioCollectionResponse.R" - "eleaseList\022=\n\ntrack_list\030\006 \001(\0132).Remote." - "AudioCollectionResponse.TrackList\032P\n\tGen" - "reList\022\014\n\004last\030\001 \002(\010\0225\n\006genres\030\002 \003(\0132%.R" - "emote.AudioCollectionResponse.Genre\032S\n\nA" - "rtistList\022\014\n\004last\030\001 \002(\010\0227\n\007artists\030\002 \003(\013" - "2&.Remote.AudioCollectionResponse.Artist" - "\032V\n\013ReleaseList\022\014\n\004last\030\001 \002(\010\0229\n\010release" - "s\030\002 \003(\0132\'.Remote.AudioCollectionResponse" - ".Release\032P\n\tTrackList\022\014\n\004last\030\001 \002(\010\0225\n\006t" - "racks\030\002 \003(\0132%.Remote.AudioCollectionResp" - "onse.Track\032\025\n\005Genre\022\014\n\004name\030\001 \002(\t\032+\n\010Cov" - "erArt\022\021\n\tmime_type\030\001 \001(\t\022\014\n\004data\030\002 \003(\014\032+" - "\n\006Artist\022\014\n\004name\030\001 \002(\t\022\023\n\013nb_releases\030\002 " - "\002(\r\032}\n\007Release\022\014\n\004name\030\001 \002(\t\022\021\n\tnb_track" - "s\030\002 \002(\r\022\025\n\rduration_secs\030\003 \002(\r\022:\n\010coverA" - "rt\030\004 \001(\0132(.Remote.AudioCollectionRespons" - "e.CoverArt\032\341\001\n\005Track\022\020\n\010media_id\030\001 \002(\003\022\023" - "\n\013disc_number\030\002 \001(\r\022\024\n\014track_number\030\003 \001(" - "\r\022\016\n\006artist\030\004 \001(\t\022\017\n\007release\030\005 \001(\t\022\014\n\004na" - "me\030\006 \002(\t\022\025\n\rduration_secs\030\007 \002(\r\022\024\n\014relea" - "se_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\010coverArt\030\013 \001(\014\"U" - "\n\004Type\022\021\n\rTypeGenreList\020\001\022\022\n\016TypeArtistL" - "ist\020\002\022\023\n\017TypeReleaseList\020\003\022\021\n\rTypeTrackL" - "ist\020\004", 2205); + "tionRequest.GetTrackList\032.\n\016BatchParamet" + "er\022\016\n\006offset\030\001 \002(\r\022\014\n\004size\030\002 \002(\r\032A\n\014GetG" + "enreList\022\023\n\013filter_name\030\001 \001(\t\022\034\n\024preferr" + "ed_batch_size\030\002 \001(\r\032\202\001\n\rGetArtistList\022\023\n" + "\013filter_name\030\001 \001(\t\022\024\n\014filter_genre\030\002 \003(\t" + "\022F\n\017batch_parameter\030\003 \002(\0132-.Remote.Audio" + "CollectionRequest.BatchParameter\032\253\001\n\016Get" + "ReleaseList\022\023\n\013filter_name\030\001 \001(\t\022\023\n\013arti" + "st_name\030\002 \003(\t\022\024\n\014filter_genre\030\003 \003(\t\022\021\n\tg" + "et_cover\030\004 \001(\010\022F\n\017batch_parameter\030\005 \002(\0132" + "-.Remote.AudioCollectionRequest.BatchPar" + "ameter\032\352\001\n\014GetTrackList\022\023\n\013filter_name\030\001" + " \001(\t\022\024\n\014release_name\030\002 \003(\t\022\023\n\013artist_nam" + "e\030\003 \003(\t\022\024\n\014filter_genre\030\004 \003(\t\022\023\n\013disc_nu" + "mber\030\005 \001(\r\022\024\n\014track_number\030\006 \001(\r\022\021\n\tget_" + "cover\030\007 \001(\010\022F\n\017batch_parameter\030\010 \002(\0132-.R" + "emote.AudioCollectionRequest.BatchParame" + "ter\"a\n\004Type\022\024\n\020TypeGetGenreList\020\000\022\025\n\021Typ" + "eGetArtistList\020\001\022\026\n\022TypeGetReleaseList\020\002" + "\022\024\n\020TypeGetTrackList\020\003\"\300\t\n\027AudioCollecti" + "onResponse\0222\n\004type\030\001 \001(\0162$.Remote.AudioC" + "ollectionResponse.Type\022\034\n\005error\030\002 \001(\0132\r." + "Remote.Error\022=\n\ngenre_list\030\003 \001(\0132).Remot" + "e.AudioCollectionResponse.GenreList\022\?\n\013a" + "rtist_list\030\004 \001(\0132*.Remote.AudioCollectio" + "nResponse.ArtistList\022A\n\014release_list\030\005 \001" + "(\0132+.Remote.AudioCollectionResponse.Rele" + "aseList\022=\n\ntrack_list\030\006 \001(\0132).Remote.Aud" + "ioCollectionResponse.TrackList\032B\n\tGenreL" + "ist\0225\n\006genres\030\002 \003(\0132%.Remote.AudioCollec" + "tionResponse.Genre\032E\n\nArtistList\0227\n\007arti" + "sts\030\002 \003(\0132&.Remote.AudioCollectionRespon" + "se.Artist\032H\n\013ReleaseList\0229\n\010releases\030\002 \003" + "(\0132\'.Remote.AudioCollectionResponse.Rele" + "ase\032B\n\tTrackList\0225\n\006tracks\030\002 \003(\0132%.Remot" + "e.AudioCollectionResponse.Track\032\025\n\005Genre" + "\022\014\n\004name\030\001 \002(\t\032+\n\010CoverArt\022\021\n\tmime_type\030" + "\001 \001(\t\022\014\n\004data\030\002 \003(\014\032+\n\006Artist\022\014\n\004name\030\001 " + "\002(\t\022\023\n\013nb_releases\030\002 \002(\r\032}\n\007Release\022\014\n\004n" + "ame\030\001 \002(\t\022\021\n\tnb_tracks\030\002 \002(\r\022\025\n\rduration" + "_secs\030\003 \002(\r\022:\n\010coverArt\030\004 \001(\0132(.Remote.A" + "udioCollectionResponse.CoverArt\032\341\001\n\005Trac" + "k\022\020\n\010media_id\030\001 \002(\003\022\023\n\013disc_number\030\002 \001(\r" + "\022\024\n\014track_number\030\003 \001(\r\022\016\n\006artist\030\004 \001(\t\022\017" + "\n\007release\030\005 \001(\t\022\014\n\004name\030\006 \002(\t\022\025\n\rduratio" + "n_secs\030\007 \002(\r\022\024\n\014release_date\030\010 \001(\t\022\035\n\025or" + "iginal_release_date\030\t \001(\t\022\016\n\006genres\030\n \003(" + "\t\022\020\n\010coverArt\030\013 \001(\014\"d\n\004Type\022\r\n\tTypeError" + "\020\001\022\021\n\rTypeGenreList\020\002\022\022\n\016TypeArtistList\020" + "\003\022\023\n\017TypeReleaseList\020\004\022\021\n\rTypeTrackList\020" + "\005", 2361); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "collection.proto", &protobuf_RegisterTypes); AudioCollectionRequest::default_instance_ = new AudioCollectionRequest(); + AudioCollectionRequest_BatchParameter::default_instance_ = new AudioCollectionRequest_BatchParameter(); AudioCollectionRequest_GetGenreList::default_instance_ = new AudioCollectionRequest_GetGenreList(); AudioCollectionRequest_GetArtistList::default_instance_ = new AudioCollectionRequest_GetArtistList(); AudioCollectionRequest_GetReleaseList::default_instance_ = new AudioCollectionRequest_GetReleaseList(); @@ -507,6 +531,7 @@ void protobuf_AddDesc_collection_2eproto() { AudioCollectionResponse_Release::default_instance_ = new AudioCollectionResponse_Release(); AudioCollectionResponse_Track::default_instance_ = new AudioCollectionResponse_Track(); AudioCollectionRequest::default_instance_->InitAsDefaultInstance(); + AudioCollectionRequest_BatchParameter::default_instance_->InitAsDefaultInstance(); AudioCollectionRequest_GetGenreList::default_instance_->InitAsDefaultInstance(); AudioCollectionRequest_GetArtistList::default_instance_->InitAsDefaultInstance(); AudioCollectionRequest_GetReleaseList::default_instance_->InitAsDefaultInstance(); @@ -542,6 +567,7 @@ bool AudioCollectionRequest_Type_IsValid(int value) { case 0: case 1: case 2: + case 3: return true; default: return false; @@ -549,6 +575,7 @@ bool AudioCollectionRequest_Type_IsValid(int value) { } #ifndef _MSC_VER +const AudioCollectionRequest_Type AudioCollectionRequest::TypeGetGenreList; const AudioCollectionRequest_Type AudioCollectionRequest::TypeGetArtistList; const AudioCollectionRequest_Type AudioCollectionRequest::TypeGetReleaseList; const AudioCollectionRequest_Type AudioCollectionRequest::TypeGetTrackList; @@ -556,6 +583,255 @@ const AudioCollectionRequest_Type AudioCollectionRequest::Type_MIN; const AudioCollectionRequest_Type AudioCollectionRequest::Type_MAX; const int AudioCollectionRequest::Type_ARRAYSIZE; #endif // _MSC_VER +#ifndef _MSC_VER +const int AudioCollectionRequest_BatchParameter::kOffsetFieldNumber; +const int AudioCollectionRequest_BatchParameter::kSizeFieldNumber; +#endif // !_MSC_VER + +AudioCollectionRequest_BatchParameter::AudioCollectionRequest_BatchParameter() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void AudioCollectionRequest_BatchParameter::InitAsDefaultInstance() { +} + +AudioCollectionRequest_BatchParameter::AudioCollectionRequest_BatchParameter(const AudioCollectionRequest_BatchParameter& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void AudioCollectionRequest_BatchParameter::SharedCtor() { + _cached_size_ = 0; + offset_ = 0u; + size_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +AudioCollectionRequest_BatchParameter::~AudioCollectionRequest_BatchParameter() { + SharedDtor(); +} + +void AudioCollectionRequest_BatchParameter::SharedDtor() { + if (this != default_instance_) { + } +} + +void AudioCollectionRequest_BatchParameter::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* AudioCollectionRequest_BatchParameter::descriptor() { + protobuf_AssignDescriptorsOnce(); + return AudioCollectionRequest_BatchParameter_descriptor_; +} + +const AudioCollectionRequest_BatchParameter& AudioCollectionRequest_BatchParameter::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +AudioCollectionRequest_BatchParameter* AudioCollectionRequest_BatchParameter::default_instance_ = NULL; + +AudioCollectionRequest_BatchParameter* AudioCollectionRequest_BatchParameter::New() const { + return new AudioCollectionRequest_BatchParameter; +} + +void AudioCollectionRequest_BatchParameter::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + offset_ = 0u; + size_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool AudioCollectionRequest_BatchParameter::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required uint32 offset = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &offset_))); + set_has_offset(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_size; + break; + } + + // required uint32 size = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_size: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &size_))); + set_has_size(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void AudioCollectionRequest_BatchParameter::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 offset = 1; + if (has_offset()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->offset(), output); + } + + // required uint32 size = 2; + if (has_size()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->size(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* AudioCollectionRequest_BatchParameter::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required uint32 offset = 1; + if (has_offset()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->offset(), target); + } + + // required uint32 size = 2; + if (has_size()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->size(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int AudioCollectionRequest_BatchParameter::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 offset = 1; + if (has_offset()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->offset()); + } + + // required uint32 size = 2; + if (has_size()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->size()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void AudioCollectionRequest_BatchParameter::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const AudioCollectionRequest_BatchParameter* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void AudioCollectionRequest_BatchParameter::MergeFrom(const AudioCollectionRequest_BatchParameter& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_offset()) { + set_offset(from.offset()); + } + if (from.has_size()) { + set_size(from.size()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void AudioCollectionRequest_BatchParameter::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AudioCollectionRequest_BatchParameter::CopyFrom(const AudioCollectionRequest_BatchParameter& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AudioCollectionRequest_BatchParameter::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void AudioCollectionRequest_BatchParameter::Swap(AudioCollectionRequest_BatchParameter* other) { + if (other != this) { + std::swap(offset_, other->offset_); + std::swap(size_, other->size_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata AudioCollectionRequest_BatchParameter::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = AudioCollectionRequest_BatchParameter_descriptor_; + metadata.reflection = AudioCollectionRequest_BatchParameter_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + #ifndef _MSC_VER const int AudioCollectionRequest_GetGenreList::kFilterNameFieldNumber; const int AudioCollectionRequest_GetGenreList::kPreferredBatchSizeFieldNumber; @@ -824,7 +1100,7 @@ void AudioCollectionRequest_GetGenreList::Swap(AudioCollectionRequest_GetGenreLi #ifndef _MSC_VER const int AudioCollectionRequest_GetArtistList::kFilterNameFieldNumber; const int AudioCollectionRequest_GetArtistList::kFilterGenreFieldNumber; -const int AudioCollectionRequest_GetArtistList::kPreferredBatchSizeFieldNumber; +const int AudioCollectionRequest_GetArtistList::kBatchParameterFieldNumber; #endif // !_MSC_VER AudioCollectionRequest_GetArtistList::AudioCollectionRequest_GetArtistList() @@ -833,6 +1109,7 @@ AudioCollectionRequest_GetArtistList::AudioCollectionRequest_GetArtistList() } void AudioCollectionRequest_GetArtistList::InitAsDefaultInstance() { + batch_parameter_ = const_cast< ::Remote::AudioCollectionRequest_BatchParameter*>(&::Remote::AudioCollectionRequest_BatchParameter::default_instance()); } AudioCollectionRequest_GetArtistList::AudioCollectionRequest_GetArtistList(const AudioCollectionRequest_GetArtistList& from) @@ -844,7 +1121,7 @@ AudioCollectionRequest_GetArtistList::AudioCollectionRequest_GetArtistList(const void AudioCollectionRequest_GetArtistList::SharedCtor() { _cached_size_ = 0; filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - preferred_batch_size_ = 0u; + batch_parameter_ = NULL; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -857,6 +1134,7 @@ void AudioCollectionRequest_GetArtistList::SharedDtor() { delete filter_name_; } if (this != default_instance_) { + delete batch_parameter_; } } @@ -888,7 +1166,9 @@ void AudioCollectionRequest_GetArtistList::Clear() { filter_name_->clear(); } } - preferred_batch_size_ = 0u; + if (has_batch_parameter()) { + if (batch_parameter_ != NULL) batch_parameter_->::Remote::AudioCollectionRequest_BatchParameter::Clear(); + } } filter_genre_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); @@ -932,19 +1212,17 @@ bool AudioCollectionRequest_GetArtistList::MergePartialFromCodedStream( goto handle_uninterpreted; } if (input->ExpectTag(18)) goto parse_filter_genre; - if (input->ExpectTag(24)) goto parse_preferred_batch_size; + if (input->ExpectTag(26)) goto parse_batch_parameter; break; } - // optional uint32 preferred_batch_size = 3; + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 3; case 3: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_preferred_batch_size: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( - input, &preferred_batch_size_))); - set_has_preferred_batch_size(); + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_batch_parameter: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_batch_parameter())); } else { goto handle_uninterpreted; } @@ -988,9 +1266,10 @@ void AudioCollectionRequest_GetArtistList::SerializeWithCachedSizes( 2, this->filter_genre(i), output); } - // optional uint32 preferred_batch_size = 3; - if (has_preferred_batch_size()) { - ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->preferred_batch_size(), output); + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 3; + if (has_batch_parameter()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->batch_parameter(), output); } if (!unknown_fields().empty()) { @@ -1020,9 +1299,11 @@ void AudioCollectionRequest_GetArtistList::SerializeWithCachedSizes( WriteStringToArray(2, this->filter_genre(i), target); } - // optional uint32 preferred_batch_size = 3; - if (has_preferred_batch_size()) { - target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->preferred_batch_size(), target); + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 3; + if (has_batch_parameter()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->batch_parameter(), target); } if (!unknown_fields().empty()) { @@ -1043,11 +1324,11 @@ int AudioCollectionRequest_GetArtistList::ByteSize() const { this->filter_name()); } - // optional uint32 preferred_batch_size = 3; - if (has_preferred_batch_size()) { + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 3; + if (has_batch_parameter()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->preferred_batch_size()); + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->batch_parameter()); } } @@ -1088,8 +1369,8 @@ void AudioCollectionRequest_GetArtistList::MergeFrom(const AudioCollectionReques if (from.has_filter_name()) { set_filter_name(from.filter_name()); } - if (from.has_preferred_batch_size()) { - set_preferred_batch_size(from.preferred_batch_size()); + if (from.has_batch_parameter()) { + mutable_batch_parameter()->::Remote::AudioCollectionRequest_BatchParameter::MergeFrom(from.batch_parameter()); } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); @@ -1108,7 +1389,11 @@ void AudioCollectionRequest_GetArtistList::CopyFrom(const AudioCollectionRequest } bool AudioCollectionRequest_GetArtistList::IsInitialized() const { + if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false; + if (has_batch_parameter()) { + if (!this->batch_parameter().IsInitialized()) return false; + } return true; } @@ -1116,7 +1401,7 @@ void AudioCollectionRequest_GetArtistList::Swap(AudioCollectionRequest_GetArtist if (other != this) { std::swap(filter_name_, other->filter_name_); filter_genre_.Swap(&other->filter_genre_); - std::swap(preferred_batch_size_, other->preferred_batch_size_); + std::swap(batch_parameter_, other->batch_parameter_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); @@ -1139,7 +1424,7 @@ const int AudioCollectionRequest_GetReleaseList::kFilterNameFieldNumber; const int AudioCollectionRequest_GetReleaseList::kArtistNameFieldNumber; const int AudioCollectionRequest_GetReleaseList::kFilterGenreFieldNumber; const int AudioCollectionRequest_GetReleaseList::kGetCoverFieldNumber; -const int AudioCollectionRequest_GetReleaseList::kPreferredBatchSizeFieldNumber; +const int AudioCollectionRequest_GetReleaseList::kBatchParameterFieldNumber; #endif // !_MSC_VER AudioCollectionRequest_GetReleaseList::AudioCollectionRequest_GetReleaseList() @@ -1148,6 +1433,7 @@ AudioCollectionRequest_GetReleaseList::AudioCollectionRequest_GetReleaseList() } void AudioCollectionRequest_GetReleaseList::InitAsDefaultInstance() { + batch_parameter_ = const_cast< ::Remote::AudioCollectionRequest_BatchParameter*>(&::Remote::AudioCollectionRequest_BatchParameter::default_instance()); } AudioCollectionRequest_GetReleaseList::AudioCollectionRequest_GetReleaseList(const AudioCollectionRequest_GetReleaseList& from) @@ -1160,7 +1446,7 @@ void AudioCollectionRequest_GetReleaseList::SharedCtor() { _cached_size_ = 0; filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); get_cover_ = false; - preferred_batch_size_ = 0u; + batch_parameter_ = NULL; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -1173,6 +1459,7 @@ void AudioCollectionRequest_GetReleaseList::SharedDtor() { delete filter_name_; } if (this != default_instance_) { + delete batch_parameter_; } } @@ -1205,7 +1492,9 @@ void AudioCollectionRequest_GetReleaseList::Clear() { } } get_cover_ = false; - preferred_batch_size_ = 0u; + if (has_batch_parameter()) { + if (batch_parameter_ != NULL) batch_parameter_->::Remote::AudioCollectionRequest_BatchParameter::Clear(); + } } artist_name_.Clear(); filter_genre_.Clear(); @@ -1285,19 +1574,17 @@ bool AudioCollectionRequest_GetReleaseList::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } - if (input->ExpectTag(40)) goto parse_preferred_batch_size; + if (input->ExpectTag(42)) goto parse_batch_parameter; break; } - // optional uint32 preferred_batch_size = 5; + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5; case 5: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_preferred_batch_size: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( - input, &preferred_batch_size_))); - set_has_preferred_batch_size(); + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_batch_parameter: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_batch_parameter())); } else { goto handle_uninterpreted; } @@ -1355,9 +1642,10 @@ void AudioCollectionRequest_GetReleaseList::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->get_cover(), output); } - // optional uint32 preferred_batch_size = 5; - if (has_preferred_batch_size()) { - ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->preferred_batch_size(), output); + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5; + if (has_batch_parameter()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, this->batch_parameter(), output); } if (!unknown_fields().empty()) { @@ -1401,9 +1689,11 @@ void AudioCollectionRequest_GetReleaseList::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->get_cover(), target); } - // optional uint32 preferred_batch_size = 5; - if (has_preferred_batch_size()) { - target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->preferred_batch_size(), target); + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5; + if (has_batch_parameter()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, this->batch_parameter(), target); } if (!unknown_fields().empty()) { @@ -1429,11 +1719,11 @@ int AudioCollectionRequest_GetReleaseList::ByteSize() const { total_size += 1 + 1; } - // optional uint32 preferred_batch_size = 5; - if (has_preferred_batch_size()) { + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5; + if (has_batch_parameter()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->preferred_batch_size()); + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->batch_parameter()); } } @@ -1485,8 +1775,8 @@ void AudioCollectionRequest_GetReleaseList::MergeFrom(const AudioCollectionReque if (from.has_get_cover()) { set_get_cover(from.get_cover()); } - if (from.has_preferred_batch_size()) { - set_preferred_batch_size(from.preferred_batch_size()); + if (from.has_batch_parameter()) { + mutable_batch_parameter()->::Remote::AudioCollectionRequest_BatchParameter::MergeFrom(from.batch_parameter()); } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); @@ -1505,7 +1795,11 @@ void AudioCollectionRequest_GetReleaseList::CopyFrom(const AudioCollectionReques } bool AudioCollectionRequest_GetReleaseList::IsInitialized() const { + if ((_has_bits_[0] & 0x00000010) != 0x00000010) return false; + if (has_batch_parameter()) { + if (!this->batch_parameter().IsInitialized()) return false; + } return true; } @@ -1515,7 +1809,7 @@ void AudioCollectionRequest_GetReleaseList::Swap(AudioCollectionRequest_GetRelea artist_name_.Swap(&other->artist_name_); filter_genre_.Swap(&other->filter_genre_); std::swap(get_cover_, other->get_cover_); - std::swap(preferred_batch_size_, other->preferred_batch_size_); + std::swap(batch_parameter_, other->batch_parameter_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); @@ -1541,7 +1835,7 @@ const int AudioCollectionRequest_GetTrackList::kFilterGenreFieldNumber; const int AudioCollectionRequest_GetTrackList::kDiscNumberFieldNumber; const int AudioCollectionRequest_GetTrackList::kTrackNumberFieldNumber; const int AudioCollectionRequest_GetTrackList::kGetCoverFieldNumber; -const int AudioCollectionRequest_GetTrackList::kPreferredBatchSizeFieldNumber; +const int AudioCollectionRequest_GetTrackList::kBatchParameterFieldNumber; #endif // !_MSC_VER AudioCollectionRequest_GetTrackList::AudioCollectionRequest_GetTrackList() @@ -1550,6 +1844,7 @@ AudioCollectionRequest_GetTrackList::AudioCollectionRequest_GetTrackList() } void AudioCollectionRequest_GetTrackList::InitAsDefaultInstance() { + batch_parameter_ = const_cast< ::Remote::AudioCollectionRequest_BatchParameter*>(&::Remote::AudioCollectionRequest_BatchParameter::default_instance()); } AudioCollectionRequest_GetTrackList::AudioCollectionRequest_GetTrackList(const AudioCollectionRequest_GetTrackList& from) @@ -1564,7 +1859,7 @@ void AudioCollectionRequest_GetTrackList::SharedCtor() { disc_number_ = 0u; track_number_ = 0u; get_cover_ = false; - preferred_batch_size_ = 0u; + batch_parameter_ = NULL; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -1577,6 +1872,7 @@ void AudioCollectionRequest_GetTrackList::SharedDtor() { delete filter_name_; } if (this != default_instance_) { + delete batch_parameter_; } } @@ -1611,7 +1907,9 @@ void AudioCollectionRequest_GetTrackList::Clear() { disc_number_ = 0u; track_number_ = 0u; get_cover_ = false; - preferred_batch_size_ = 0u; + if (has_batch_parameter()) { + if (batch_parameter_ != NULL) batch_parameter_->::Remote::AudioCollectionRequest_BatchParameter::Clear(); + } } release_name_.Clear(); artist_name_.Clear(); @@ -1743,19 +2041,17 @@ bool AudioCollectionRequest_GetTrackList::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } - if (input->ExpectTag(64)) goto parse_preferred_batch_size; + if (input->ExpectTag(66)) goto parse_batch_parameter; break; } - // optional uint32 preferred_batch_size = 8; + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 8; case 8: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_preferred_batch_size: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( - input, &preferred_batch_size_))); - set_has_preferred_batch_size(); + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_batch_parameter: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_batch_parameter())); } else { goto handle_uninterpreted; } @@ -1832,9 +2128,10 @@ void AudioCollectionRequest_GetTrackList::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->get_cover(), output); } - // optional uint32 preferred_batch_size = 8; - if (has_preferred_batch_size()) { - ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->preferred_batch_size(), output); + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 8; + if (has_batch_parameter()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 8, this->batch_parameter(), output); } if (!unknown_fields().empty()) { @@ -1897,9 +2194,11 @@ void AudioCollectionRequest_GetTrackList::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->get_cover(), target); } - // optional uint32 preferred_batch_size = 8; - if (has_preferred_batch_size()) { - target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->preferred_batch_size(), target); + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 8; + if (has_batch_parameter()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 8, this->batch_parameter(), target); } if (!unknown_fields().empty()) { @@ -1939,11 +2238,11 @@ int AudioCollectionRequest_GetTrackList::ByteSize() const { total_size += 1 + 1; } - // optional uint32 preferred_batch_size = 8; - if (has_preferred_batch_size()) { + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 8; + if (has_batch_parameter()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->preferred_batch_size()); + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->batch_parameter()); } } @@ -2009,8 +2308,8 @@ void AudioCollectionRequest_GetTrackList::MergeFrom(const AudioCollectionRequest if (from.has_get_cover()) { set_get_cover(from.get_cover()); } - if (from.has_preferred_batch_size()) { - set_preferred_batch_size(from.preferred_batch_size()); + if (from.has_batch_parameter()) { + mutable_batch_parameter()->::Remote::AudioCollectionRequest_BatchParameter::MergeFrom(from.batch_parameter()); } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); @@ -2029,7 +2328,11 @@ void AudioCollectionRequest_GetTrackList::CopyFrom(const AudioCollectionRequest_ } bool AudioCollectionRequest_GetTrackList::IsInitialized() const { + if ((_has_bits_[0] & 0x00000080) != 0x00000080) return false; + if (has_batch_parameter()) { + if (!this->batch_parameter().IsInitialized()) return false; + } return true; } @@ -2042,7 +2345,7 @@ void AudioCollectionRequest_GetTrackList::Swap(AudioCollectionRequest_GetTrackLi std::swap(disc_number_, other->disc_number_); std::swap(track_number_, other->track_number_); std::swap(get_cover_, other->get_cover_); - std::swap(preferred_batch_size_, other->preferred_batch_size_); + std::swap(batch_parameter_, other->batch_parameter_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); @@ -2428,6 +2731,15 @@ void AudioCollectionRequest::CopyFrom(const AudioCollectionRequest& from) { bool AudioCollectionRequest::IsInitialized() const { if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + if (has_get_artists()) { + if (!this->get_artists().IsInitialized()) return false; + } + if (has_get_releases()) { + if (!this->get_releases().IsInitialized()) return false; + } + if (has_get_tracks()) { + if (!this->get_tracks().IsInitialized()) return false; + } return true; } @@ -2465,6 +2777,7 @@ bool AudioCollectionResponse_Type_IsValid(int value) { case 2: case 3: case 4: + case 5: return true; default: return false; @@ -2472,6 +2785,7 @@ bool AudioCollectionResponse_Type_IsValid(int value) { } #ifndef _MSC_VER +const AudioCollectionResponse_Type AudioCollectionResponse::TypeError; const AudioCollectionResponse_Type AudioCollectionResponse::TypeGenreList; const AudioCollectionResponse_Type AudioCollectionResponse::TypeArtistList; const AudioCollectionResponse_Type AudioCollectionResponse::TypeReleaseList; @@ -2481,7 +2795,6 @@ const AudioCollectionResponse_Type AudioCollectionResponse::Type_MAX; const int AudioCollectionResponse::Type_ARRAYSIZE; #endif // _MSC_VER #ifndef _MSC_VER -const int AudioCollectionResponse_GenreList::kLastFieldNumber; const int AudioCollectionResponse_GenreList::kGenresFieldNumber; #endif // !_MSC_VER @@ -2501,7 +2814,6 @@ AudioCollectionResponse_GenreList::AudioCollectionResponse_GenreList(const Audio void AudioCollectionResponse_GenreList::SharedCtor() { _cached_size_ = 0; - last_ = false; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -2536,9 +2848,6 @@ AudioCollectionResponse_GenreList* AudioCollectionResponse_GenreList::New() cons } void AudioCollectionResponse_GenreList::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - last_ = false; - } genres_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); @@ -2550,21 +2859,6 @@ bool AudioCollectionResponse_GenreList::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required bool last = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &last_))); - set_has_last(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_genres; - break; - } - // repeated .Remote.AudioCollectionResponse.Genre genres = 2; case 2: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == @@ -2598,11 +2892,6 @@ bool AudioCollectionResponse_GenreList::MergePartialFromCodedStream( void AudioCollectionResponse_GenreList::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // required bool last = 1; - if (has_last()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->last(), output); - } - // repeated .Remote.AudioCollectionResponse.Genre genres = 2; for (int i = 0; i < this->genres_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -2617,11 +2906,6 @@ void AudioCollectionResponse_GenreList::SerializeWithCachedSizes( ::google::protobuf::uint8* AudioCollectionResponse_GenreList::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // required bool last = 1; - if (has_last()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->last(), target); - } - // repeated .Remote.AudioCollectionResponse.Genre genres = 2; for (int i = 0; i < this->genres_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -2639,13 +2923,6 @@ void AudioCollectionResponse_GenreList::SerializeWithCachedSizes( int AudioCollectionResponse_GenreList::ByteSize() const { int total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required bool last = 1; - if (has_last()) { - total_size += 1 + 1; - } - - } // repeated .Remote.AudioCollectionResponse.Genre genres = 2; total_size += 1 * this->genres_size(); for (int i = 0; i < this->genres_size(); i++) { @@ -2680,11 +2957,6 @@ void AudioCollectionResponse_GenreList::MergeFrom(const ::google::protobuf::Mess void AudioCollectionResponse_GenreList::MergeFrom(const AudioCollectionResponse_GenreList& from) { GOOGLE_CHECK_NE(&from, this); genres_.MergeFrom(from.genres_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_last()) { - set_last(from.last()); - } - } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } @@ -2701,7 +2973,6 @@ void AudioCollectionResponse_GenreList::CopyFrom(const AudioCollectionResponse_G } bool AudioCollectionResponse_GenreList::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; for (int i = 0; i < genres_size(); i++) { if (!this->genres(i).IsInitialized()) return false; @@ -2711,7 +2982,6 @@ bool AudioCollectionResponse_GenreList::IsInitialized() const { void AudioCollectionResponse_GenreList::Swap(AudioCollectionResponse_GenreList* other) { if (other != this) { - std::swap(last_, other->last_); genres_.Swap(&other->genres_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); @@ -2731,7 +3001,6 @@ void AudioCollectionResponse_GenreList::Swap(AudioCollectionResponse_GenreList* // ------------------------------------------------------------------- #ifndef _MSC_VER -const int AudioCollectionResponse_ArtistList::kLastFieldNumber; const int AudioCollectionResponse_ArtistList::kArtistsFieldNumber; #endif // !_MSC_VER @@ -2751,7 +3020,6 @@ AudioCollectionResponse_ArtistList::AudioCollectionResponse_ArtistList(const Aud void AudioCollectionResponse_ArtistList::SharedCtor() { _cached_size_ = 0; - last_ = false; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -2786,9 +3054,6 @@ AudioCollectionResponse_ArtistList* AudioCollectionResponse_ArtistList::New() co } void AudioCollectionResponse_ArtistList::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - last_ = false; - } artists_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); @@ -2800,21 +3065,6 @@ bool AudioCollectionResponse_ArtistList::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required bool last = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &last_))); - set_has_last(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_artists; - break; - } - // repeated .Remote.AudioCollectionResponse.Artist artists = 2; case 2: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == @@ -2848,11 +3098,6 @@ bool AudioCollectionResponse_ArtistList::MergePartialFromCodedStream( void AudioCollectionResponse_ArtistList::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // required bool last = 1; - if (has_last()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->last(), output); - } - // repeated .Remote.AudioCollectionResponse.Artist artists = 2; for (int i = 0; i < this->artists_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -2867,11 +3112,6 @@ void AudioCollectionResponse_ArtistList::SerializeWithCachedSizes( ::google::protobuf::uint8* AudioCollectionResponse_ArtistList::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // required bool last = 1; - if (has_last()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->last(), target); - } - // repeated .Remote.AudioCollectionResponse.Artist artists = 2; for (int i = 0; i < this->artists_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -2889,13 +3129,6 @@ void AudioCollectionResponse_ArtistList::SerializeWithCachedSizes( int AudioCollectionResponse_ArtistList::ByteSize() const { int total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required bool last = 1; - if (has_last()) { - total_size += 1 + 1; - } - - } // repeated .Remote.AudioCollectionResponse.Artist artists = 2; total_size += 1 * this->artists_size(); for (int i = 0; i < this->artists_size(); i++) { @@ -2930,11 +3163,6 @@ void AudioCollectionResponse_ArtistList::MergeFrom(const ::google::protobuf::Mes void AudioCollectionResponse_ArtistList::MergeFrom(const AudioCollectionResponse_ArtistList& from) { GOOGLE_CHECK_NE(&from, this); artists_.MergeFrom(from.artists_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_last()) { - set_last(from.last()); - } - } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } @@ -2951,7 +3179,6 @@ void AudioCollectionResponse_ArtistList::CopyFrom(const AudioCollectionResponse_ } bool AudioCollectionResponse_ArtistList::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; for (int i = 0; i < artists_size(); i++) { if (!this->artists(i).IsInitialized()) return false; @@ -2961,7 +3188,6 @@ bool AudioCollectionResponse_ArtistList::IsInitialized() const { void AudioCollectionResponse_ArtistList::Swap(AudioCollectionResponse_ArtistList* other) { if (other != this) { - std::swap(last_, other->last_); artists_.Swap(&other->artists_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); @@ -2981,7 +3207,6 @@ void AudioCollectionResponse_ArtistList::Swap(AudioCollectionResponse_ArtistList // ------------------------------------------------------------------- #ifndef _MSC_VER -const int AudioCollectionResponse_ReleaseList::kLastFieldNumber; const int AudioCollectionResponse_ReleaseList::kReleasesFieldNumber; #endif // !_MSC_VER @@ -3001,7 +3226,6 @@ AudioCollectionResponse_ReleaseList::AudioCollectionResponse_ReleaseList(const A void AudioCollectionResponse_ReleaseList::SharedCtor() { _cached_size_ = 0; - last_ = false; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -3036,9 +3260,6 @@ AudioCollectionResponse_ReleaseList* AudioCollectionResponse_ReleaseList::New() } void AudioCollectionResponse_ReleaseList::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - last_ = false; - } releases_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); @@ -3050,21 +3271,6 @@ bool AudioCollectionResponse_ReleaseList::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required bool last = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &last_))); - set_has_last(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_releases; - break; - } - // repeated .Remote.AudioCollectionResponse.Release releases = 2; case 2: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == @@ -3098,11 +3304,6 @@ bool AudioCollectionResponse_ReleaseList::MergePartialFromCodedStream( void AudioCollectionResponse_ReleaseList::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // required bool last = 1; - if (has_last()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->last(), output); - } - // repeated .Remote.AudioCollectionResponse.Release releases = 2; for (int i = 0; i < this->releases_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -3117,11 +3318,6 @@ void AudioCollectionResponse_ReleaseList::SerializeWithCachedSizes( ::google::protobuf::uint8* AudioCollectionResponse_ReleaseList::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // required bool last = 1; - if (has_last()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->last(), target); - } - // repeated .Remote.AudioCollectionResponse.Release releases = 2; for (int i = 0; i < this->releases_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -3139,13 +3335,6 @@ void AudioCollectionResponse_ReleaseList::SerializeWithCachedSizes( int AudioCollectionResponse_ReleaseList::ByteSize() const { int total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required bool last = 1; - if (has_last()) { - total_size += 1 + 1; - } - - } // repeated .Remote.AudioCollectionResponse.Release releases = 2; total_size += 1 * this->releases_size(); for (int i = 0; i < this->releases_size(); i++) { @@ -3180,11 +3369,6 @@ void AudioCollectionResponse_ReleaseList::MergeFrom(const ::google::protobuf::Me void AudioCollectionResponse_ReleaseList::MergeFrom(const AudioCollectionResponse_ReleaseList& from) { GOOGLE_CHECK_NE(&from, this); releases_.MergeFrom(from.releases_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_last()) { - set_last(from.last()); - } - } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } @@ -3201,7 +3385,6 @@ void AudioCollectionResponse_ReleaseList::CopyFrom(const AudioCollectionResponse } bool AudioCollectionResponse_ReleaseList::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; for (int i = 0; i < releases_size(); i++) { if (!this->releases(i).IsInitialized()) return false; @@ -3211,7 +3394,6 @@ bool AudioCollectionResponse_ReleaseList::IsInitialized() const { void AudioCollectionResponse_ReleaseList::Swap(AudioCollectionResponse_ReleaseList* other) { if (other != this) { - std::swap(last_, other->last_); releases_.Swap(&other->releases_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); @@ -3231,7 +3413,6 @@ void AudioCollectionResponse_ReleaseList::Swap(AudioCollectionResponse_ReleaseLi // ------------------------------------------------------------------- #ifndef _MSC_VER -const int AudioCollectionResponse_TrackList::kLastFieldNumber; const int AudioCollectionResponse_TrackList::kTracksFieldNumber; #endif // !_MSC_VER @@ -3251,7 +3432,6 @@ AudioCollectionResponse_TrackList::AudioCollectionResponse_TrackList(const Audio void AudioCollectionResponse_TrackList::SharedCtor() { _cached_size_ = 0; - last_ = false; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -3286,9 +3466,6 @@ AudioCollectionResponse_TrackList* AudioCollectionResponse_TrackList::New() cons } void AudioCollectionResponse_TrackList::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - last_ = false; - } tracks_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); @@ -3300,21 +3477,6 @@ bool AudioCollectionResponse_TrackList::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required bool last = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &last_))); - set_has_last(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_tracks; - break; - } - // repeated .Remote.AudioCollectionResponse.Track tracks = 2; case 2: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == @@ -3348,11 +3510,6 @@ bool AudioCollectionResponse_TrackList::MergePartialFromCodedStream( void AudioCollectionResponse_TrackList::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // required bool last = 1; - if (has_last()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->last(), output); - } - // repeated .Remote.AudioCollectionResponse.Track tracks = 2; for (int i = 0; i < this->tracks_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -3367,11 +3524,6 @@ void AudioCollectionResponse_TrackList::SerializeWithCachedSizes( ::google::protobuf::uint8* AudioCollectionResponse_TrackList::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // required bool last = 1; - if (has_last()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->last(), target); - } - // repeated .Remote.AudioCollectionResponse.Track tracks = 2; for (int i = 0; i < this->tracks_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -3389,13 +3541,6 @@ void AudioCollectionResponse_TrackList::SerializeWithCachedSizes( int AudioCollectionResponse_TrackList::ByteSize() const { int total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required bool last = 1; - if (has_last()) { - total_size += 1 + 1; - } - - } // repeated .Remote.AudioCollectionResponse.Track tracks = 2; total_size += 1 * this->tracks_size(); for (int i = 0; i < this->tracks_size(); i++) { @@ -3430,11 +3575,6 @@ void AudioCollectionResponse_TrackList::MergeFrom(const ::google::protobuf::Mess void AudioCollectionResponse_TrackList::MergeFrom(const AudioCollectionResponse_TrackList& from) { GOOGLE_CHECK_NE(&from, this); tracks_.MergeFrom(from.tracks_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_last()) { - set_last(from.last()); - } - } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } @@ -3451,7 +3591,6 @@ void AudioCollectionResponse_TrackList::CopyFrom(const AudioCollectionResponse_T } bool AudioCollectionResponse_TrackList::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; for (int i = 0; i < tracks_size(); i++) { if (!this->tracks(i).IsInitialized()) return false; @@ -3461,7 +3600,6 @@ bool AudioCollectionResponse_TrackList::IsInitialized() const { void AudioCollectionResponse_TrackList::Swap(AudioCollectionResponse_TrackList* other) { if (other != this) { - std::swap(last_, other->last_); tracks_.Swap(&other->tracks_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); @@ -5303,8 +5441,8 @@ void AudioCollectionResponse_Track::Swap(AudioCollectionResponse_Track* other) { // ------------------------------------------------------------------- #ifndef _MSC_VER -const int AudioCollectionResponse::kErrorFieldNumber; const int AudioCollectionResponse::kTypeFieldNumber; +const int AudioCollectionResponse::kErrorFieldNumber; const int AudioCollectionResponse::kGenreListFieldNumber; const int AudioCollectionResponse::kArtistListFieldNumber; const int AudioCollectionResponse::kReleaseListFieldNumber; @@ -5332,8 +5470,8 @@ AudioCollectionResponse::AudioCollectionResponse(const AudioCollectionResponse& void AudioCollectionResponse::SharedCtor() { _cached_size_ = 0; - error_ = NULL; type_ = 1; + error_ = NULL; genre_list_ = NULL; artist_list_ = NULL; release_list_ = NULL; @@ -5378,10 +5516,10 @@ AudioCollectionResponse* AudioCollectionResponse::New() const { void AudioCollectionResponse::Clear() { if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + type_ = 1; if (has_error()) { if (error_ != NULL) error_->::Remote::Error::Clear(); } - type_ = 1; if (has_genre_list()) { if (genre_list_ != NULL) genre_list_->::Remote::AudioCollectionResponse_GenreList::Clear(); } @@ -5405,24 +5543,10 @@ bool AudioCollectionResponse::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required .Remote.Error error = 1; + // optional .Remote.AudioCollectionResponse.Type type = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_error())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_type; - break; - } - - // optional .Remote.AudioCollectionResponse.Type type = 2; - case 2: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_type: int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -5430,11 +5554,25 @@ bool AudioCollectionResponse::MergePartialFromCodedStream( if (::Remote::AudioCollectionResponse_Type_IsValid(value)) { set_type(static_cast< ::Remote::AudioCollectionResponse_Type >(value)); } else { - mutable_unknown_fields()->AddVarint(2, value); + mutable_unknown_fields()->AddVarint(1, value); } } else { goto handle_uninterpreted; } + if (input->ExpectTag(18)) goto parse_error; + break; + } + + // optional .Remote.Error error = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_error: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_error())); + } else { + goto handle_uninterpreted; + } if (input->ExpectTag(26)) goto parse_genre_list; break; } @@ -5513,16 +5651,16 @@ bool AudioCollectionResponse::MergePartialFromCodedStream( void AudioCollectionResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // required .Remote.Error error = 1; - if (has_error()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->error(), output); - } - - // optional .Remote.AudioCollectionResponse.Type type = 2; + // optional .Remote.AudioCollectionResponse.Type type = 1; if (has_type()) { ::google::protobuf::internal::WireFormatLite::WriteEnum( - 2, this->type(), output); + 1, this->type(), output); + } + + // optional .Remote.Error error = 2; + if (has_error()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->error(), output); } // optional .Remote.AudioCollectionResponse.GenreList genre_list = 3; @@ -5557,17 +5695,17 @@ void AudioCollectionResponse::SerializeWithCachedSizes( ::google::protobuf::uint8* AudioCollectionResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // required .Remote.Error error = 1; + // optional .Remote.AudioCollectionResponse.Type type = 1; + if (has_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->type(), target); + } + + // optional .Remote.Error error = 2; if (has_error()) { target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( - 1, this->error(), target); - } - - // optional .Remote.AudioCollectionResponse.Type type = 2; - if (has_type()) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 2, this->type(), target); + 2, this->error(), target); } // optional .Remote.AudioCollectionResponse.GenreList genre_list = 3; @@ -5609,19 +5747,19 @@ int AudioCollectionResponse::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required .Remote.Error error = 1; + // optional .Remote.AudioCollectionResponse.Type type = 1; + if (has_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // optional .Remote.Error error = 2; if (has_error()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( this->error()); } - // optional .Remote.AudioCollectionResponse.Type type = 2; - if (has_type()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); - } - // optional .Remote.AudioCollectionResponse.GenreList genre_list = 3; if (has_genre_list()) { total_size += 1 + @@ -5677,12 +5815,12 @@ void AudioCollectionResponse::MergeFrom(const ::google::protobuf::Message& from) void AudioCollectionResponse::MergeFrom(const AudioCollectionResponse& from) { GOOGLE_CHECK_NE(&from, this); if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_error()) { - mutable_error()->::Remote::Error::MergeFrom(from.error()); - } if (from.has_type()) { set_type(from.type()); } + if (from.has_error()) { + mutable_error()->::Remote::Error::MergeFrom(from.error()); + } if (from.has_genre_list()) { mutable_genre_list()->::Remote::AudioCollectionResponse_GenreList::MergeFrom(from.genre_list()); } @@ -5712,7 +5850,6 @@ void AudioCollectionResponse::CopyFrom(const AudioCollectionResponse& from) { } bool AudioCollectionResponse::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; if (has_error()) { if (!this->error().IsInitialized()) return false; @@ -5734,8 +5871,8 @@ bool AudioCollectionResponse::IsInitialized() const { void AudioCollectionResponse::Swap(AudioCollectionResponse* other) { if (other != this) { - std::swap(error_, other->error_); std::swap(type_, other->type_); + std::swap(error_, other->error_); std::swap(genre_list_, other->genre_list_); std::swap(artist_list_, other->artist_list_); std::swap(release_list_, other->release_list_); diff --git a/remote/messages/collection.pb.h b/remote/messages/collection.pb.h index dc88d0ff..6d9319ad 100644 --- a/remote/messages/collection.pb.h +++ b/remote/messages/collection.pb.h @@ -36,6 +36,7 @@ void protobuf_AssignDesc_collection_2eproto(); void protobuf_ShutdownFile_collection_2eproto(); class AudioCollectionRequest; +class AudioCollectionRequest_BatchParameter; class AudioCollectionRequest_GetGenreList; class AudioCollectionRequest_GetArtistList; class AudioCollectionRequest_GetReleaseList; @@ -52,12 +53,13 @@ class AudioCollectionResponse_Release; class AudioCollectionResponse_Track; enum AudioCollectionRequest_Type { - AudioCollectionRequest_Type_TypeGetArtistList = 0, - AudioCollectionRequest_Type_TypeGetReleaseList = 1, - AudioCollectionRequest_Type_TypeGetTrackList = 2 + AudioCollectionRequest_Type_TypeGetGenreList = 0, + AudioCollectionRequest_Type_TypeGetArtistList = 1, + AudioCollectionRequest_Type_TypeGetReleaseList = 2, + AudioCollectionRequest_Type_TypeGetTrackList = 3 }; bool AudioCollectionRequest_Type_IsValid(int value); -const AudioCollectionRequest_Type AudioCollectionRequest_Type_Type_MIN = AudioCollectionRequest_Type_TypeGetArtistList; +const AudioCollectionRequest_Type AudioCollectionRequest_Type_Type_MIN = AudioCollectionRequest_Type_TypeGetGenreList; const AudioCollectionRequest_Type AudioCollectionRequest_Type_Type_MAX = AudioCollectionRequest_Type_TypeGetTrackList; const int AudioCollectionRequest_Type_Type_ARRAYSIZE = AudioCollectionRequest_Type_Type_MAX + 1; @@ -72,13 +74,14 @@ inline bool AudioCollectionRequest_Type_Parse( AudioCollectionRequest_Type_descriptor(), name, value); } enum AudioCollectionResponse_Type { - AudioCollectionResponse_Type_TypeGenreList = 1, - AudioCollectionResponse_Type_TypeArtistList = 2, - AudioCollectionResponse_Type_TypeReleaseList = 3, - AudioCollectionResponse_Type_TypeTrackList = 4 + AudioCollectionResponse_Type_TypeError = 1, + AudioCollectionResponse_Type_TypeGenreList = 2, + AudioCollectionResponse_Type_TypeArtistList = 3, + AudioCollectionResponse_Type_TypeReleaseList = 4, + AudioCollectionResponse_Type_TypeTrackList = 5 }; bool AudioCollectionResponse_Type_IsValid(int value); -const AudioCollectionResponse_Type AudioCollectionResponse_Type_Type_MIN = AudioCollectionResponse_Type_TypeGenreList; +const AudioCollectionResponse_Type AudioCollectionResponse_Type_Type_MIN = AudioCollectionResponse_Type_TypeError; const AudioCollectionResponse_Type AudioCollectionResponse_Type_Type_MAX = AudioCollectionResponse_Type_TypeTrackList; const int AudioCollectionResponse_Type_Type_ARRAYSIZE = AudioCollectionResponse_Type_Type_MAX + 1; @@ -94,6 +97,98 @@ inline bool AudioCollectionResponse_Type_Parse( } // =================================================================== +class AudioCollectionRequest_BatchParameter : public ::google::protobuf::Message { + public: + AudioCollectionRequest_BatchParameter(); + virtual ~AudioCollectionRequest_BatchParameter(); + + AudioCollectionRequest_BatchParameter(const AudioCollectionRequest_BatchParameter& from); + + inline AudioCollectionRequest_BatchParameter& operator=(const AudioCollectionRequest_BatchParameter& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const AudioCollectionRequest_BatchParameter& default_instance(); + + void Swap(AudioCollectionRequest_BatchParameter* other); + + // implements Message ---------------------------------------------- + + AudioCollectionRequest_BatchParameter* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const AudioCollectionRequest_BatchParameter& from); + void MergeFrom(const AudioCollectionRequest_BatchParameter& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 offset = 1; + inline bool has_offset() const; + inline void clear_offset(); + static const int kOffsetFieldNumber = 1; + inline ::google::protobuf::uint32 offset() const; + inline void set_offset(::google::protobuf::uint32 value); + + // required uint32 size = 2; + inline bool has_size() const; + inline void clear_size(); + static const int kSizeFieldNumber = 2; + inline ::google::protobuf::uint32 size() const; + inline void set_size(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:Remote.AudioCollectionRequest.BatchParameter) + private: + inline void set_has_offset(); + inline void clear_has_offset(); + inline void set_has_size(); + inline void clear_has_size(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 offset_; + ::google::protobuf::uint32 size_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_collection_2eproto(); + friend void protobuf_AssignDesc_collection_2eproto(); + friend void protobuf_ShutdownFile_collection_2eproto(); + + void InitAsDefaultInstance(); + static AudioCollectionRequest_BatchParameter* default_instance_; +}; +// ------------------------------------------------------------------- + class AudioCollectionRequest_GetGenreList : public ::google::protobuf::Message { public: AudioCollectionRequest_GetGenreList(); @@ -273,25 +368,27 @@ class AudioCollectionRequest_GetArtistList : public ::google::protobuf::Message inline const ::google::protobuf::RepeatedPtrField< ::std::string>& filter_genre() const; inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_filter_genre(); - // optional uint32 preferred_batch_size = 3; - inline bool has_preferred_batch_size() const; - inline void clear_preferred_batch_size(); - static const int kPreferredBatchSizeFieldNumber = 3; - inline ::google::protobuf::uint32 preferred_batch_size() const; - inline void set_preferred_batch_size(::google::protobuf::uint32 value); + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 3; + inline bool has_batch_parameter() const; + inline void clear_batch_parameter(); + static const int kBatchParameterFieldNumber = 3; + inline const ::Remote::AudioCollectionRequest_BatchParameter& batch_parameter() const; + inline ::Remote::AudioCollectionRequest_BatchParameter* mutable_batch_parameter(); + inline ::Remote::AudioCollectionRequest_BatchParameter* release_batch_parameter(); + inline void set_allocated_batch_parameter(::Remote::AudioCollectionRequest_BatchParameter* batch_parameter); // @@protoc_insertion_point(class_scope:Remote.AudioCollectionRequest.GetArtistList) private: inline void set_has_filter_name(); inline void clear_has_filter_name(); - inline void set_has_preferred_batch_size(); - inline void clear_has_preferred_batch_size(); + inline void set_has_batch_parameter(); + inline void clear_has_batch_parameter(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::std::string* filter_name_; ::google::protobuf::RepeatedPtrField< ::std::string> filter_genre_; - ::google::protobuf::uint32 preferred_batch_size_; + ::Remote::AudioCollectionRequest_BatchParameter* batch_parameter_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; @@ -410,12 +507,14 @@ class AudioCollectionRequest_GetReleaseList : public ::google::protobuf::Message inline bool get_cover() const; inline void set_get_cover(bool value); - // optional uint32 preferred_batch_size = 5; - inline bool has_preferred_batch_size() const; - inline void clear_preferred_batch_size(); - static const int kPreferredBatchSizeFieldNumber = 5; - inline ::google::protobuf::uint32 preferred_batch_size() const; - inline void set_preferred_batch_size(::google::protobuf::uint32 value); + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5; + inline bool has_batch_parameter() const; + inline void clear_batch_parameter(); + 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(); + inline void set_allocated_batch_parameter(::Remote::AudioCollectionRequest_BatchParameter* batch_parameter); // @@protoc_insertion_point(class_scope:Remote.AudioCollectionRequest.GetReleaseList) private: @@ -423,16 +522,16 @@ class AudioCollectionRequest_GetReleaseList : public ::google::protobuf::Message inline void clear_has_filter_name(); inline void set_has_get_cover(); inline void clear_has_get_cover(); - inline void set_has_preferred_batch_size(); - inline void clear_has_preferred_batch_size(); + inline void set_has_batch_parameter(); + inline void clear_has_batch_parameter(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::std::string* filter_name_; ::google::protobuf::RepeatedPtrField< ::std::string> artist_name_; ::google::protobuf::RepeatedPtrField< ::std::string> filter_genre_; + ::Remote::AudioCollectionRequest_BatchParameter* batch_parameter_; bool get_cover_; - ::google::protobuf::uint32 preferred_batch_size_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32]; @@ -581,12 +680,14 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message { inline bool get_cover() const; inline void set_get_cover(bool value); - // optional uint32 preferred_batch_size = 8; - inline bool has_preferred_batch_size() const; - inline void clear_preferred_batch_size(); - static const int kPreferredBatchSizeFieldNumber = 8; - inline ::google::protobuf::uint32 preferred_batch_size() const; - inline void set_preferred_batch_size(::google::protobuf::uint32 value); + // required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 8; + inline bool has_batch_parameter() const; + inline void clear_batch_parameter(); + static const int kBatchParameterFieldNumber = 8; + inline const ::Remote::AudioCollectionRequest_BatchParameter& batch_parameter() const; + inline ::Remote::AudioCollectionRequest_BatchParameter* mutable_batch_parameter(); + inline ::Remote::AudioCollectionRequest_BatchParameter* release_batch_parameter(); + inline void set_allocated_batch_parameter(::Remote::AudioCollectionRequest_BatchParameter* batch_parameter); // @@protoc_insertion_point(class_scope:Remote.AudioCollectionRequest.GetTrackList) private: @@ -598,8 +699,8 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message { inline void clear_has_track_number(); inline void set_has_get_cover(); inline void clear_has_get_cover(); - inline void set_has_preferred_batch_size(); - inline void clear_has_preferred_batch_size(); + inline void set_has_batch_parameter(); + inline void clear_has_batch_parameter(); ::google::protobuf::UnknownFieldSet _unknown_fields_; @@ -609,8 +710,8 @@ class AudioCollectionRequest_GetTrackList : public ::google::protobuf::Message { ::google::protobuf::RepeatedPtrField< ::std::string> filter_genre_; ::google::protobuf::uint32 disc_number_; ::google::protobuf::uint32 track_number_; + ::Remote::AudioCollectionRequest_BatchParameter* batch_parameter_; bool get_cover_; - ::google::protobuf::uint32 preferred_batch_size_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; @@ -676,12 +777,14 @@ class AudioCollectionRequest : public ::google::protobuf::Message { // nested types ---------------------------------------------------- + typedef AudioCollectionRequest_BatchParameter BatchParameter; typedef AudioCollectionRequest_GetGenreList GetGenreList; typedef AudioCollectionRequest_GetArtistList GetArtistList; typedef AudioCollectionRequest_GetReleaseList GetReleaseList; typedef AudioCollectionRequest_GetTrackList GetTrackList; typedef AudioCollectionRequest_Type Type; + static const Type TypeGetGenreList = AudioCollectionRequest_Type_TypeGetGenreList; static const Type TypeGetArtistList = AudioCollectionRequest_Type_TypeGetArtistList; static const Type TypeGetReleaseList = AudioCollectionRequest_Type_TypeGetReleaseList; static const Type TypeGetTrackList = AudioCollectionRequest_Type_TypeGetTrackList; @@ -838,13 +941,6 @@ class AudioCollectionResponse_GenreList : public ::google::protobuf::Message { // accessors ------------------------------------------------------- - // required bool last = 1; - inline bool has_last() const; - inline void clear_last(); - static const int kLastFieldNumber = 1; - inline bool last() const; - inline void set_last(bool value); - // repeated .Remote.AudioCollectionResponse.Genre genres = 2; inline int genres_size() const; inline void clear_genres(); @@ -859,16 +955,13 @@ class AudioCollectionResponse_GenreList : public ::google::protobuf::Message { // @@protoc_insertion_point(class_scope:Remote.AudioCollectionResponse.GenreList) private: - inline void set_has_last(); - inline void clear_has_last(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::google::protobuf::RepeatedPtrField< ::Remote::AudioCollectionResponse_Genre > genres_; - bool last_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; friend void protobuf_AddDesc_collection_2eproto(); friend void protobuf_AssignDesc_collection_2eproto(); @@ -933,13 +1026,6 @@ class AudioCollectionResponse_ArtistList : public ::google::protobuf::Message { // accessors ------------------------------------------------------- - // required bool last = 1; - inline bool has_last() const; - inline void clear_last(); - static const int kLastFieldNumber = 1; - inline bool last() const; - inline void set_last(bool value); - // repeated .Remote.AudioCollectionResponse.Artist artists = 2; inline int artists_size() const; inline void clear_artists(); @@ -954,16 +1040,13 @@ class AudioCollectionResponse_ArtistList : public ::google::protobuf::Message { // @@protoc_insertion_point(class_scope:Remote.AudioCollectionResponse.ArtistList) private: - inline void set_has_last(); - inline void clear_has_last(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::google::protobuf::RepeatedPtrField< ::Remote::AudioCollectionResponse_Artist > artists_; - bool last_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; friend void protobuf_AddDesc_collection_2eproto(); friend void protobuf_AssignDesc_collection_2eproto(); @@ -1028,13 +1111,6 @@ class AudioCollectionResponse_ReleaseList : public ::google::protobuf::Message { // accessors ------------------------------------------------------- - // required bool last = 1; - inline bool has_last() const; - inline void clear_last(); - static const int kLastFieldNumber = 1; - inline bool last() const; - inline void set_last(bool value); - // repeated .Remote.AudioCollectionResponse.Release releases = 2; inline int releases_size() const; inline void clear_releases(); @@ -1049,16 +1125,13 @@ class AudioCollectionResponse_ReleaseList : public ::google::protobuf::Message { // @@protoc_insertion_point(class_scope:Remote.AudioCollectionResponse.ReleaseList) private: - inline void set_has_last(); - inline void clear_has_last(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::google::protobuf::RepeatedPtrField< ::Remote::AudioCollectionResponse_Release > releases_; - bool last_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; friend void protobuf_AddDesc_collection_2eproto(); friend void protobuf_AssignDesc_collection_2eproto(); @@ -1123,13 +1196,6 @@ class AudioCollectionResponse_TrackList : public ::google::protobuf::Message { // accessors ------------------------------------------------------- - // required bool last = 1; - inline bool has_last() const; - inline void clear_last(); - static const int kLastFieldNumber = 1; - inline bool last() const; - inline void set_last(bool value); - // repeated .Remote.AudioCollectionResponse.Track tracks = 2; inline int tracks_size() const; inline void clear_tracks(); @@ -1144,16 +1210,13 @@ class AudioCollectionResponse_TrackList : public ::google::protobuf::Message { // @@protoc_insertion_point(class_scope:Remote.AudioCollectionResponse.TrackList) private: - inline void set_has_last(); - inline void clear_has_last(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::google::protobuf::RepeatedPtrField< ::Remote::AudioCollectionResponse_Track > tracks_; - bool last_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; friend void protobuf_AddDesc_collection_2eproto(); friend void protobuf_AssignDesc_collection_2eproto(); @@ -1853,6 +1916,7 @@ class AudioCollectionResponse : public ::google::protobuf::Message { typedef AudioCollectionResponse_Track Track; typedef AudioCollectionResponse_Type Type; + static const Type TypeError = AudioCollectionResponse_Type_TypeError; static const Type TypeGenreList = AudioCollectionResponse_Type_TypeGenreList; static const Type TypeArtistList = AudioCollectionResponse_Type_TypeArtistList; static const Type TypeReleaseList = AudioCollectionResponse_Type_TypeReleaseList; @@ -1880,22 +1944,22 @@ class AudioCollectionResponse : public ::google::protobuf::Message { // accessors ------------------------------------------------------- - // required .Remote.Error error = 1; + // optional .Remote.AudioCollectionResponse.Type type = 1; + inline bool has_type() const; + inline void clear_type(); + static const int kTypeFieldNumber = 1; + inline ::Remote::AudioCollectionResponse_Type type() const; + inline void set_type(::Remote::AudioCollectionResponse_Type value); + + // optional .Remote.Error error = 2; inline bool has_error() const; inline void clear_error(); - static const int kErrorFieldNumber = 1; + static const int kErrorFieldNumber = 2; inline const ::Remote::Error& error() const; inline ::Remote::Error* mutable_error(); inline ::Remote::Error* release_error(); inline void set_allocated_error(::Remote::Error* error); - // optional .Remote.AudioCollectionResponse.Type type = 2; - inline bool has_type() const; - inline void clear_type(); - static const int kTypeFieldNumber = 2; - inline ::Remote::AudioCollectionResponse_Type type() const; - inline void set_type(::Remote::AudioCollectionResponse_Type value); - // optional .Remote.AudioCollectionResponse.GenreList genre_list = 3; inline bool has_genre_list() const; inline void clear_genre_list(); @@ -1934,10 +1998,10 @@ class AudioCollectionResponse : public ::google::protobuf::Message { // @@protoc_insertion_point(class_scope:Remote.AudioCollectionResponse) private: - inline void set_has_error(); - inline void clear_has_error(); inline void set_has_type(); inline void clear_has_type(); + inline void set_has_error(); + inline void clear_has_error(); inline void set_has_genre_list(); inline void clear_has_genre_list(); inline void set_has_artist_list(); @@ -1971,6 +2035,54 @@ class AudioCollectionResponse : public ::google::protobuf::Message { // =================================================================== +// AudioCollectionRequest_BatchParameter + +// required uint32 offset = 1; +inline bool AudioCollectionRequest_BatchParameter::has_offset() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void AudioCollectionRequest_BatchParameter::set_has_offset() { + _has_bits_[0] |= 0x00000001u; +} +inline void AudioCollectionRequest_BatchParameter::clear_has_offset() { + _has_bits_[0] &= ~0x00000001u; +} +inline void AudioCollectionRequest_BatchParameter::clear_offset() { + offset_ = 0u; + clear_has_offset(); +} +inline ::google::protobuf::uint32 AudioCollectionRequest_BatchParameter::offset() const { + return offset_; +} +inline void AudioCollectionRequest_BatchParameter::set_offset(::google::protobuf::uint32 value) { + set_has_offset(); + offset_ = value; +} + +// required uint32 size = 2; +inline bool AudioCollectionRequest_BatchParameter::has_size() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void AudioCollectionRequest_BatchParameter::set_has_size() { + _has_bits_[0] |= 0x00000002u; +} +inline void AudioCollectionRequest_BatchParameter::clear_has_size() { + _has_bits_[0] &= ~0x00000002u; +} +inline void AudioCollectionRequest_BatchParameter::clear_size() { + size_ = 0u; + clear_has_size(); +} +inline ::google::protobuf::uint32 AudioCollectionRequest_BatchParameter::size() const { + return size_; +} +inline void AudioCollectionRequest_BatchParameter::set_size(::google::protobuf::uint32 value) { + set_has_size(); + size_ = value; +} + +// ------------------------------------------------------------------- + // AudioCollectionRequest_GetGenreList // optional string filter_name = 1; @@ -2183,26 +2295,42 @@ AudioCollectionRequest_GetArtistList::mutable_filter_genre() { return &filter_genre_; } -// optional uint32 preferred_batch_size = 3; -inline bool AudioCollectionRequest_GetArtistList::has_preferred_batch_size() const { +// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 3; +inline bool AudioCollectionRequest_GetArtistList::has_batch_parameter() const { return (_has_bits_[0] & 0x00000004u) != 0; } -inline void AudioCollectionRequest_GetArtistList::set_has_preferred_batch_size() { +inline void AudioCollectionRequest_GetArtistList::set_has_batch_parameter() { _has_bits_[0] |= 0x00000004u; } -inline void AudioCollectionRequest_GetArtistList::clear_has_preferred_batch_size() { +inline void AudioCollectionRequest_GetArtistList::clear_has_batch_parameter() { _has_bits_[0] &= ~0x00000004u; } -inline void AudioCollectionRequest_GetArtistList::clear_preferred_batch_size() { - preferred_batch_size_ = 0u; - clear_has_preferred_batch_size(); +inline void AudioCollectionRequest_GetArtistList::clear_batch_parameter() { + if (batch_parameter_ != NULL) batch_parameter_->::Remote::AudioCollectionRequest_BatchParameter::Clear(); + clear_has_batch_parameter(); } -inline ::google::protobuf::uint32 AudioCollectionRequest_GetArtistList::preferred_batch_size() const { - return preferred_batch_size_; +inline const ::Remote::AudioCollectionRequest_BatchParameter& AudioCollectionRequest_GetArtistList::batch_parameter() const { + return batch_parameter_ != NULL ? *batch_parameter_ : *default_instance_->batch_parameter_; } -inline void AudioCollectionRequest_GetArtistList::set_preferred_batch_size(::google::protobuf::uint32 value) { - set_has_preferred_batch_size(); - preferred_batch_size_ = value; +inline ::Remote::AudioCollectionRequest_BatchParameter* AudioCollectionRequest_GetArtistList::mutable_batch_parameter() { + set_has_batch_parameter(); + if (batch_parameter_ == NULL) batch_parameter_ = new ::Remote::AudioCollectionRequest_BatchParameter; + return batch_parameter_; +} +inline ::Remote::AudioCollectionRequest_BatchParameter* AudioCollectionRequest_GetArtistList::release_batch_parameter() { + clear_has_batch_parameter(); + ::Remote::AudioCollectionRequest_BatchParameter* temp = batch_parameter_; + batch_parameter_ = NULL; + return temp; +} +inline void AudioCollectionRequest_GetArtistList::set_allocated_batch_parameter(::Remote::AudioCollectionRequest_BatchParameter* batch_parameter) { + delete batch_parameter_; + batch_parameter_ = batch_parameter; + if (batch_parameter) { + set_has_batch_parameter(); + } else { + clear_has_batch_parameter(); + } } // ------------------------------------------------------------------- @@ -2389,26 +2517,42 @@ inline void AudioCollectionRequest_GetReleaseList::set_get_cover(bool value) { get_cover_ = value; } -// optional uint32 preferred_batch_size = 5; -inline bool AudioCollectionRequest_GetReleaseList::has_preferred_batch_size() const { +// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 5; +inline bool AudioCollectionRequest_GetReleaseList::has_batch_parameter() const { return (_has_bits_[0] & 0x00000010u) != 0; } -inline void AudioCollectionRequest_GetReleaseList::set_has_preferred_batch_size() { +inline void AudioCollectionRequest_GetReleaseList::set_has_batch_parameter() { _has_bits_[0] |= 0x00000010u; } -inline void AudioCollectionRequest_GetReleaseList::clear_has_preferred_batch_size() { +inline void AudioCollectionRequest_GetReleaseList::clear_has_batch_parameter() { _has_bits_[0] &= ~0x00000010u; } -inline void AudioCollectionRequest_GetReleaseList::clear_preferred_batch_size() { - preferred_batch_size_ = 0u; - clear_has_preferred_batch_size(); +inline void AudioCollectionRequest_GetReleaseList::clear_batch_parameter() { + if (batch_parameter_ != NULL) batch_parameter_->::Remote::AudioCollectionRequest_BatchParameter::Clear(); + clear_has_batch_parameter(); } -inline ::google::protobuf::uint32 AudioCollectionRequest_GetReleaseList::preferred_batch_size() const { - return preferred_batch_size_; +inline const ::Remote::AudioCollectionRequest_BatchParameter& AudioCollectionRequest_GetReleaseList::batch_parameter() const { + return batch_parameter_ != NULL ? *batch_parameter_ : *default_instance_->batch_parameter_; } -inline void AudioCollectionRequest_GetReleaseList::set_preferred_batch_size(::google::protobuf::uint32 value) { - set_has_preferred_batch_size(); - preferred_batch_size_ = value; +inline ::Remote::AudioCollectionRequest_BatchParameter* AudioCollectionRequest_GetReleaseList::mutable_batch_parameter() { + set_has_batch_parameter(); + if (batch_parameter_ == NULL) batch_parameter_ = new ::Remote::AudioCollectionRequest_BatchParameter; + return batch_parameter_; +} +inline ::Remote::AudioCollectionRequest_BatchParameter* AudioCollectionRequest_GetReleaseList::release_batch_parameter() { + clear_has_batch_parameter(); + ::Remote::AudioCollectionRequest_BatchParameter* temp = batch_parameter_; + batch_parameter_ = NULL; + return temp; +} +inline void AudioCollectionRequest_GetReleaseList::set_allocated_batch_parameter(::Remote::AudioCollectionRequest_BatchParameter* batch_parameter) { + delete batch_parameter_; + batch_parameter_ = batch_parameter; + if (batch_parameter) { + set_has_batch_parameter(); + } else { + clear_has_batch_parameter(); + } } // ------------------------------------------------------------------- @@ -2683,26 +2827,42 @@ inline void AudioCollectionRequest_GetTrackList::set_get_cover(bool value) { get_cover_ = value; } -// optional uint32 preferred_batch_size = 8; -inline bool AudioCollectionRequest_GetTrackList::has_preferred_batch_size() const { +// required .Remote.AudioCollectionRequest.BatchParameter batch_parameter = 8; +inline bool AudioCollectionRequest_GetTrackList::has_batch_parameter() const { return (_has_bits_[0] & 0x00000080u) != 0; } -inline void AudioCollectionRequest_GetTrackList::set_has_preferred_batch_size() { +inline void AudioCollectionRequest_GetTrackList::set_has_batch_parameter() { _has_bits_[0] |= 0x00000080u; } -inline void AudioCollectionRequest_GetTrackList::clear_has_preferred_batch_size() { +inline void AudioCollectionRequest_GetTrackList::clear_has_batch_parameter() { _has_bits_[0] &= ~0x00000080u; } -inline void AudioCollectionRequest_GetTrackList::clear_preferred_batch_size() { - preferred_batch_size_ = 0u; - clear_has_preferred_batch_size(); +inline void AudioCollectionRequest_GetTrackList::clear_batch_parameter() { + if (batch_parameter_ != NULL) batch_parameter_->::Remote::AudioCollectionRequest_BatchParameter::Clear(); + clear_has_batch_parameter(); } -inline ::google::protobuf::uint32 AudioCollectionRequest_GetTrackList::preferred_batch_size() const { - return preferred_batch_size_; +inline const ::Remote::AudioCollectionRequest_BatchParameter& AudioCollectionRequest_GetTrackList::batch_parameter() const { + return batch_parameter_ != NULL ? *batch_parameter_ : *default_instance_->batch_parameter_; } -inline void AudioCollectionRequest_GetTrackList::set_preferred_batch_size(::google::protobuf::uint32 value) { - set_has_preferred_batch_size(); - preferred_batch_size_ = value; +inline ::Remote::AudioCollectionRequest_BatchParameter* AudioCollectionRequest_GetTrackList::mutable_batch_parameter() { + set_has_batch_parameter(); + if (batch_parameter_ == NULL) batch_parameter_ = new ::Remote::AudioCollectionRequest_BatchParameter; + return batch_parameter_; +} +inline ::Remote::AudioCollectionRequest_BatchParameter* AudioCollectionRequest_GetTrackList::release_batch_parameter() { + clear_has_batch_parameter(); + ::Remote::AudioCollectionRequest_BatchParameter* temp = batch_parameter_; + batch_parameter_ = NULL; + return temp; +} +inline void AudioCollectionRequest_GetTrackList::set_allocated_batch_parameter(::Remote::AudioCollectionRequest_BatchParameter* batch_parameter) { + delete batch_parameter_; + batch_parameter_ = batch_parameter; + if (batch_parameter) { + set_has_batch_parameter(); + } else { + clear_has_batch_parameter(); + } } // ------------------------------------------------------------------- @@ -2888,28 +3048,6 @@ inline void AudioCollectionRequest::set_allocated_get_tracks(::Remote::AudioColl // AudioCollectionResponse_GenreList -// required bool last = 1; -inline bool AudioCollectionResponse_GenreList::has_last() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void AudioCollectionResponse_GenreList::set_has_last() { - _has_bits_[0] |= 0x00000001u; -} -inline void AudioCollectionResponse_GenreList::clear_has_last() { - _has_bits_[0] &= ~0x00000001u; -} -inline void AudioCollectionResponse_GenreList::clear_last() { - last_ = false; - clear_has_last(); -} -inline bool AudioCollectionResponse_GenreList::last() const { - return last_; -} -inline void AudioCollectionResponse_GenreList::set_last(bool value) { - set_has_last(); - last_ = value; -} - // repeated .Remote.AudioCollectionResponse.Genre genres = 2; inline int AudioCollectionResponse_GenreList::genres_size() const { return genres_.size(); @@ -2939,28 +3077,6 @@ AudioCollectionResponse_GenreList::mutable_genres() { // AudioCollectionResponse_ArtistList -// required bool last = 1; -inline bool AudioCollectionResponse_ArtistList::has_last() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void AudioCollectionResponse_ArtistList::set_has_last() { - _has_bits_[0] |= 0x00000001u; -} -inline void AudioCollectionResponse_ArtistList::clear_has_last() { - _has_bits_[0] &= ~0x00000001u; -} -inline void AudioCollectionResponse_ArtistList::clear_last() { - last_ = false; - clear_has_last(); -} -inline bool AudioCollectionResponse_ArtistList::last() const { - return last_; -} -inline void AudioCollectionResponse_ArtistList::set_last(bool value) { - set_has_last(); - last_ = value; -} - // repeated .Remote.AudioCollectionResponse.Artist artists = 2; inline int AudioCollectionResponse_ArtistList::artists_size() const { return artists_.size(); @@ -2990,28 +3106,6 @@ AudioCollectionResponse_ArtistList::mutable_artists() { // AudioCollectionResponse_ReleaseList -// required bool last = 1; -inline bool AudioCollectionResponse_ReleaseList::has_last() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void AudioCollectionResponse_ReleaseList::set_has_last() { - _has_bits_[0] |= 0x00000001u; -} -inline void AudioCollectionResponse_ReleaseList::clear_has_last() { - _has_bits_[0] &= ~0x00000001u; -} -inline void AudioCollectionResponse_ReleaseList::clear_last() { - last_ = false; - clear_has_last(); -} -inline bool AudioCollectionResponse_ReleaseList::last() const { - return last_; -} -inline void AudioCollectionResponse_ReleaseList::set_last(bool value) { - set_has_last(); - last_ = value; -} - // repeated .Remote.AudioCollectionResponse.Release releases = 2; inline int AudioCollectionResponse_ReleaseList::releases_size() const { return releases_.size(); @@ -3041,28 +3135,6 @@ AudioCollectionResponse_ReleaseList::mutable_releases() { // AudioCollectionResponse_TrackList -// required bool last = 1; -inline bool AudioCollectionResponse_TrackList::has_last() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void AudioCollectionResponse_TrackList::set_has_last() { - _has_bits_[0] |= 0x00000001u; -} -inline void AudioCollectionResponse_TrackList::clear_has_last() { - _has_bits_[0] &= ~0x00000001u; -} -inline void AudioCollectionResponse_TrackList::clear_last() { - last_ = false; - clear_has_last(); -} -inline bool AudioCollectionResponse_TrackList::last() const { - return last_; -} -inline void AudioCollectionResponse_TrackList::set_last(bool value) { - set_has_last(); - last_ = value; -} - // repeated .Remote.AudioCollectionResponse.Track tracks = 2; inline int AudioCollectionResponse_TrackList::tracks_size() const { return tracks_.size(); @@ -4092,16 +4164,39 @@ inline void AudioCollectionResponse_Track::set_allocated_coverart(::std::string* // AudioCollectionResponse -// required .Remote.Error error = 1; -inline bool AudioCollectionResponse::has_error() const { +// optional .Remote.AudioCollectionResponse.Type type = 1; +inline bool AudioCollectionResponse::has_type() const { return (_has_bits_[0] & 0x00000001u) != 0; } -inline void AudioCollectionResponse::set_has_error() { +inline void AudioCollectionResponse::set_has_type() { _has_bits_[0] |= 0x00000001u; } -inline void AudioCollectionResponse::clear_has_error() { +inline void AudioCollectionResponse::clear_has_type() { _has_bits_[0] &= ~0x00000001u; } +inline void AudioCollectionResponse::clear_type() { + type_ = 1; + clear_has_type(); +} +inline ::Remote::AudioCollectionResponse_Type AudioCollectionResponse::type() const { + return static_cast< ::Remote::AudioCollectionResponse_Type >(type_); +} +inline void AudioCollectionResponse::set_type(::Remote::AudioCollectionResponse_Type value) { + assert(::Remote::AudioCollectionResponse_Type_IsValid(value)); + set_has_type(); + type_ = value; +} + +// optional .Remote.Error error = 2; +inline bool AudioCollectionResponse::has_error() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void AudioCollectionResponse::set_has_error() { + _has_bits_[0] |= 0x00000002u; +} +inline void AudioCollectionResponse::clear_has_error() { + _has_bits_[0] &= ~0x00000002u; +} inline void AudioCollectionResponse::clear_error() { if (error_ != NULL) error_->::Remote::Error::Clear(); clear_has_error(); @@ -4130,29 +4225,6 @@ inline void AudioCollectionResponse::set_allocated_error(::Remote::Error* error) } } -// optional .Remote.AudioCollectionResponse.Type type = 2; -inline bool AudioCollectionResponse::has_type() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void AudioCollectionResponse::set_has_type() { - _has_bits_[0] |= 0x00000002u; -} -inline void AudioCollectionResponse::clear_has_type() { - _has_bits_[0] &= ~0x00000002u; -} -inline void AudioCollectionResponse::clear_type() { - type_ = 1; - clear_has_type(); -} -inline ::Remote::AudioCollectionResponse_Type AudioCollectionResponse::type() const { - return static_cast< ::Remote::AudioCollectionResponse_Type >(type_); -} -inline void AudioCollectionResponse::set_type(::Remote::AudioCollectionResponse_Type value) { - assert(::Remote::AudioCollectionResponse_Type_IsValid(value)); - set_has_type(); - type_ = value; -} - // optional .Remote.AudioCollectionResponse.GenreList genre_list = 3; inline bool AudioCollectionResponse::has_genre_list() const { return (_has_bits_[0] & 0x00000004u) != 0; diff --git a/remote/messages/messages.pb.cc b/remote/messages/messages.pb.cc index 1099ae30..afa8eb57 100644 --- a/remote/messages/messages.pb.cc +++ b/remote/messages/messages.pb.cc @@ -129,7 +129,7 @@ void protobuf_AddDesc_messages_2eproto() { "_collection_response\030\003 \001(\0132\037.Remote.Audi" "oCollectionResponse\022-\n\016media_response\030\004 " "\001(\0132\025.Remote.MediaResponse\"H\n\004Type\022\020\n\014Au" - "thResponse\020\001\022\033\n\027AduioCollectionResponse\020" + "thResponse\020\001\022\033\n\027AudioCollectionResponse\020" "\002\022\021\n\rMediaResponse\020\003", 660); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "messages.proto", &protobuf_RegisterTypes); @@ -548,7 +548,7 @@ bool ServerMessage_Type_IsValid(int value) { #ifndef _MSC_VER const ServerMessage_Type ServerMessage::AuthResponse; -const ServerMessage_Type ServerMessage::AduioCollectionResponse; +const ServerMessage_Type ServerMessage::AudioCollectionResponse; const ServerMessage_Type ServerMessage::MediaResponse; const ServerMessage_Type ServerMessage::Type_MIN; const ServerMessage_Type ServerMessage::Type_MAX; diff --git a/remote/messages/messages.pb.h b/remote/messages/messages.pb.h index aedbb447..6f42b794 100644 --- a/remote/messages/messages.pb.h +++ b/remote/messages/messages.pb.h @@ -63,7 +63,7 @@ inline bool ClientMessage_Type_Parse( } enum ServerMessage_Type { ServerMessage_Type_AuthResponse = 1, - ServerMessage_Type_AduioCollectionResponse = 2, + ServerMessage_Type_AudioCollectionResponse = 2, ServerMessage_Type_MediaResponse = 3 }; bool ServerMessage_Type_IsValid(int value); @@ -280,7 +280,7 @@ class ServerMessage : public ::google::protobuf::Message { typedef ServerMessage_Type Type; static const Type AuthResponse = ServerMessage_Type_AuthResponse; - static const Type AduioCollectionResponse = ServerMessage_Type_AduioCollectionResponse; + static const Type AudioCollectionResponse = ServerMessage_Type_AudioCollectionResponse; static const Type MediaResponse = ServerMessage_Type_MediaResponse; static inline bool Type_IsValid(int value) { return ServerMessage_Type_IsValid(value); diff --git a/remote/proto/collection.proto b/remote/proto/collection.proto index db34fd81..b2783eac 100644 --- a/remote/proto/collection.proto +++ b/remote/proto/collection.proto @@ -5,6 +5,12 @@ package Remote; message AudioCollectionRequest { + message BatchParameter + { + required uint32 offset = 1; // First element requested + required uint32 size = 2; // Number of elements requested. Server may not honor this size if too big + } + message GetGenreList { optional string filter_name = 1; // Genre that contains 'filterName' in its name @@ -18,7 +24,7 @@ message AudioCollectionRequest optional string filter_name = 1; // Artist that contains 'filterName' in its name repeated string filter_genre = 2; // Artist that has at least a track of the genre - optional uint32 preferred_batch_size = 3; + required BatchParameter batch_parameter = 3; } message GetReleaseList @@ -29,7 +35,8 @@ message AudioCollectionRequest repeated string filter_genre = 3; // Release that has at least a track of the genre optional bool get_cover = 4; // Request cover art for each release - optional uint32 preferred_batch_size = 5; + + required BatchParameter batch_parameter = 5; } message GetTrackList @@ -43,15 +50,17 @@ message AudioCollectionRequest optional uint32 track_number = 6; // Disc number optional bool get_cover = 7; // Request cover art for each track - optional uint32 preferred_batch_size = 8; + + required BatchParameter batch_parameter = 8; } enum Type { - TypeGetArtistList = 0; - TypeGetReleaseList = 1; - TypeGetTrackList = 2; + TypeGetGenreList = 0; + TypeGetArtistList = 1; + TypeGetReleaseList = 2; + TypeGetTrackList = 3; } required Type type = 1; @@ -67,25 +76,21 @@ message AudioCollectionResponse { message GenreList { - required bool last = 1; // More messages follow if last = 0 repeated Genre genres = 2; } message ArtistList { - required bool last = 1; // More messages follow if last = 0 repeated Artist artists = 2; } message ReleaseList { - required bool last = 1; // More messages follow if last = 0 repeated Release releases = 2; } message TrackList { - required bool last = 1; // More messages follow if last = 0 repeated Track tracks = 2; } @@ -138,16 +143,17 @@ message AudioCollectionResponse } enum Type { - TypeGenreList = 1; - TypeArtistList = 2; - TypeReleaseList = 3; - TypeTrackList = 4; + TypeError = 1; + TypeGenreList = 2; + TypeArtistList = 3; + TypeReleaseList = 4; + TypeTrackList = 5; } - required Error error = 1; - optional Type type = 2; + optional Type type = 1; + optional Error error = 2; optional GenreList genre_list = 3; optional ArtistList artist_list = 4; optional ReleaseList release_list = 5; diff --git a/remote/proto/messages.proto b/remote/proto/messages.proto index d46d3add..30bef5f2 100644 --- a/remote/proto/messages.proto +++ b/remote/proto/messages.proto @@ -27,7 +27,7 @@ message ServerMessage enum Type { AuthResponse = 1; - AduioCollectionResponse = 2; + AudioCollectionResponse = 2; MediaResponse = 3; } diff --git a/remote/server/AudioCollectionRequestHandler.cpp b/remote/server/AudioCollectionRequestHandler.cpp index 2696ad2a..bda7dba1 100644 --- a/remote/server/AudioCollectionRequestHandler.cpp +++ b/remote/server/AudioCollectionRequestHandler.cpp @@ -11,14 +11,21 @@ AudioCollectionRequestHandler::AudioCollectionRequestHandler(DatabaseHandler& db bool -AudioCollectionRequestHandler::process(const AudioCollectionRequest& request, std::vector responses) +AudioCollectionRequestHandler::process(const AudioCollectionRequest& request, AudioCollectionResponse& response) { + bool res = false; + switch (request.type()) { case AudioCollectionRequest_Type_TypeGetArtistList: if (request.has_get_artists()) - return processGetArtists(request.get_artists(), responses); + { + res = processGetArtists(request.get_artists(), *response.mutable_artist_list()); + if (res) + response.set_type(AudioCollectionResponse_Type_TypeArtistList); + + } else std::cerr << "Bad AudioCollectionRequest_Type_TypeGetArtistList: message!" << std::endl; break; @@ -33,14 +40,30 @@ AudioCollectionRequestHandler::process(const AudioCollectionRequest& request, st std::cerr << "Unhandled AudioCollectionRequest_Type = " << request.type() << std::endl; } - return false; + return res; } bool -AudioCollectionRequestHandler::processGetArtists(const AudioCollectionRequest::GetArtistList& request, std::vector responses) +AudioCollectionRequestHandler::processGetArtists(const AudioCollectionRequest::GetArtistList& request, AudioCollectionResponse::ArtistList& response) { // sanity checks + if (!request.has_batch_parameter()) + { + std::cerr << "No batch parameters found!" << std::endl; + return false; + } + + if (!request.batch_parameter().has_size() + || !request.batch_parameter().has_offset()) + { + std::cerr << "Missing batch parameter details" << std::endl; + return false; + } + + std::cout << "Offset = " << request.batch_parameter().offset() << std::endl; + std::cout << "Size = " << request.batch_parameter().size() << std::endl; + if (request.has_filter_name()) std::cout << "Filter nameĀ = " << request.filter_name() << std::endl; @@ -49,9 +72,6 @@ AudioCollectionRequestHandler::processGetArtists(const AudioCollectionRequest::G std::cout << "Filter genre " << id << " = '" << request.filter_genre(id) << "'" << std::endl; } - if (request.has_preferred_batch_size()) - std::cout << "Requested batch size = " << request.preferred_batch_size() << std::endl; - // Now fetch requested data... @@ -59,7 +79,7 @@ AudioCollectionRequestHandler::processGetArtists(const AudioCollectionRequest::G Wt::Dbo::Transaction transaction( _db.getSession() ); - Wt::Dbo::collection artists = Artist::getAll( _db.getSession() ); + Wt::Dbo::collection artists = Artist::getAll( _db.getSession(), request.batch_parameter().offset(), request.batch_parameter().size() ); std::cout << "size = " << artists.size() << std::endl; @@ -67,12 +87,15 @@ AudioCollectionRequestHandler::processGetArtists(const AudioCollectionRequest::G for (Artists::iterator it = artists.begin(); it != artists.end(); ++it) { - std::cout << "Spotted artist = " << (*it)->getName() << std::endl; + AudioCollectionResponse_Artist* artist = response.add_artists(); + + artist->set_name((*it)->getName()); + artist->set_nb_releases(0); // TODO } std::cout << "Getting artists DONE" << std::endl; - return false; + return true; } } // namespace Remote diff --git a/remote/server/AudioCollectionRequestHandler.hpp b/remote/server/AudioCollectionRequestHandler.hpp index 7d7563d3..72409c35 100644 --- a/remote/server/AudioCollectionRequestHandler.hpp +++ b/remote/server/AudioCollectionRequestHandler.hpp @@ -13,11 +13,11 @@ class AudioCollectionRequestHandler public: AudioCollectionRequestHandler(DatabaseHandler& db); - bool process(const AudioCollectionRequest& request, std::vector responses); + bool process(const AudioCollectionRequest& request, AudioCollectionResponse& response); private: - bool processGetArtists(const AudioCollectionRequest::GetArtistList& request, std::vector responses); + bool processGetArtists(const AudioCollectionRequest::GetArtistList& request, AudioCollectionResponse::ArtistList& response); DatabaseHandler& _db; diff --git a/remote/server/Connection.cpp b/remote/server/Connection.cpp index 2ad5da87..4c9bfb11 100644 --- a/remote/server/Connection.cpp +++ b/remote/server/Connection.cpp @@ -105,7 +105,7 @@ Connection::handleReadMsg(const boost::system::error_code& error, std::size_t by std::istream is(&_inputStreamBuf); std::ostream os(&_outputStreamBuf); - std::vector responses; + Remote::ServerMessage response; Remote::ClientMessage request; if (!request.ParseFromIstream(&is)) @@ -115,14 +115,13 @@ Connection::handleReadMsg(const boost::system::error_code& error, std::size_t by return; } - if (!_requestHandler.process(request, responses)) + if (!_requestHandler.process(request, response)) { std::cerr << "Cannot process request!" << std::endl; _connectionManager.stop(shared_from_this()); return; } - BOOST_FOREACH(const Remote::ServerMessage& response, responses) { boost::system::error_code ec; @@ -156,9 +155,10 @@ Connection::handleReadMsg(const boost::system::error_code& error, std::size_t by boost::asio::transfer_exactly(_outputStreamBuf.size()), ec); - _outputStreamBuf.consume(n); assert(n == _outputStreamBuf.size()); + _outputStreamBuf.consume(n); + if (ec) { std::cerr << "cannot write msg: " << error.message() << std::endl; diff --git a/remote/server/RequestHandler.cpp b/remote/server/RequestHandler.cpp index ff0d78b6..c8732f73 100644 --- a/remote/server/RequestHandler.cpp +++ b/remote/server/RequestHandler.cpp @@ -11,9 +11,9 @@ _audioCollectionRequestHandler(_db) } bool -RequestHandler::process(const ClientMessage& request, std::vector responses) +RequestHandler::process(const ClientMessage& request, ServerMessage& response) { - std::cout << "TODO: process request!" << std::endl; + bool res = false; switch(request.type()) { @@ -23,7 +23,11 @@ RequestHandler::process(const ClientMessage& request, std::vector break; case ClientMessage_Type_AudioCollectionRequest: if (request.has_audio_collection_request()) - return _audioCollectionRequestHandler.process(request.audio_collection_request(), responses); + { + res = _audioCollectionRequestHandler.process(request.audio_collection_request(), *response.mutable_audio_collection_response()); + if (res) + response.set_type( ServerMessage_Type_AudioCollectionResponse); + } else std::cerr << "Malformed AudioCollectionRequest message!" << std::endl; break; @@ -35,7 +39,7 @@ RequestHandler::process(const ClientMessage& request, std::vector std::cerr << "Unhandled message type = " << request.type() << std::endl; } - return false; + return res; } diff --git a/remote/server/RequestHandler.hpp b/remote/server/RequestHandler.hpp index 7538557e..6611d584 100644 --- a/remote/server/RequestHandler.hpp +++ b/remote/server/RequestHandler.hpp @@ -18,9 +18,9 @@ class RequestHandler RequestHandler(boost::filesystem::path dbPath); - bool process(const ClientMessage& request, std::vector responses); + bool process(const ClientMessage& request, ServerMessage& response); - bool processAudioCollectionRequest(const AudioCollectionRequest& request, std::vector responses); + bool processAudioCollectionRequest(const AudioCollectionRequest& request, ServerMessage& response); private: diff --git a/test/RemoteClientServer.cpp b/test/RemoteClientServer.cpp index 9dfb0807..39ef5a33 100644 --- a/test/RemoteClientServer.cpp +++ b/test/RemoteClientServer.cpp @@ -56,20 +56,34 @@ class TestClient void getArtists(std::vector& artists) { // Send request - Remote::ClientMessage msg; + Remote::ClientMessage request; - msg.set_type( Remote::ClientMessage_Type_AudioCollectionRequest ); + request.set_type( Remote::ClientMessage_Type_AudioCollectionRequest ); - msg.mutable_audio_collection_request()->set_type( Remote::AudioCollectionRequest_Type_TypeGetArtistList); - msg.mutable_audio_collection_request()->mutable_get_artists()->set_preferred_batch_size(64); + request.mutable_audio_collection_request()->set_type( Remote::AudioCollectionRequest_Type_TypeGetArtistList); + request.mutable_audio_collection_request()->mutable_get_artists()->mutable_batch_parameter()->set_size(64); + request.mutable_audio_collection_request()->mutable_get_artists()->mutable_batch_parameter()->set_offset(0); - sendMsg(msg); + sendMsg(request); // Receive responses Remote::ServerMessage response; recvMsg(response); - // + // Process message + if (!response.has_audio_collection_response()) + throw std::runtime_error("not an audio_collection_response!"); + + if (!response.audio_collection_response().has_artist_list()) + throw std::runtime_error("not an artist_list!"); + + for (int i = 0; i < response.audio_collection_response().artist_list().artists_size(); ++i) + { + if (!response.audio_collection_response().artist_list().artists(i).has_name()) + throw std::runtime_error("no artist name!"); + + artists.push_back( response.audio_collection_response().artist_list().artists(i).name() ); + } } @@ -167,7 +181,7 @@ class TestClient }; -int main(int argc, char* argv[]) +int main() { try {