From 399c771e75eca508fe8e1909bed0dc3f1d688210 Mon Sep 17 00:00:00 2001 From: emeric Date: Mon, 16 Jun 2014 14:03:31 +0200 Subject: [PATCH] Type now mandatory in AudioCollectionRequest --- remote/messages/collection.pb.cc | 11 ++++++----- remote/messages/collection.pb.h | 4 ++-- remote/proto/collection.proto | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/remote/messages/collection.pb.cc b/remote/messages/collection.pb.cc index 8eb402fe..d8d1c755 100644 --- a/remote/messages/collection.pb.cc +++ b/remote/messages/collection.pb.cc @@ -531,7 +531,7 @@ void protobuf_AddDesc_collection_2eproto() { "ypeGetGenreList\020\002\022\025\n\021TypeGetArtistList\020\003" "\022\026\n\022TypeGetReleaseList\020\004\022\024\n\020TypeGetTrack" "List\020\005\022\023\n\017TypeGetCoverArt\020\006\"\345\n\n\027AudioCol" - "lectionResponse\0222\n\004type\030\001 \001(\0162$.Remote.A" + "lectionResponse\0222\n\004type\030\001 \002(\0162$.Remote.A" "udioCollectionResponse.Type\022\034\n\005error\030\002 \001" "(\0132\r.Remote.Error\022:\n\010revision\030\003 \001(\0132(.Re" "mote.AudioCollectionResponse.Revision\022=\n" @@ -5920,7 +5920,7 @@ bool AudioCollectionResponse::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional .Remote.AudioCollectionResponse.Type type = 1; + // required .Remote.AudioCollectionResponse.Type type = 1; case 1: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { @@ -6057,7 +6057,7 @@ bool AudioCollectionResponse::MergePartialFromCodedStream( void AudioCollectionResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // optional .Remote.AudioCollectionResponse.Type type = 1; + // required .Remote.AudioCollectionResponse.Type type = 1; if (has_type()) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->type(), output); @@ -6113,7 +6113,7 @@ void AudioCollectionResponse::SerializeWithCachedSizes( ::google::protobuf::uint8* AudioCollectionResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // optional .Remote.AudioCollectionResponse.Type type = 1; + // required .Remote.AudioCollectionResponse.Type type = 1; if (has_type()) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->type(), target); @@ -6179,7 +6179,7 @@ int AudioCollectionResponse::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional .Remote.AudioCollectionResponse.Type type = 1; + // required .Remote.AudioCollectionResponse.Type type = 1; if (has_type()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); @@ -6301,6 +6301,7 @@ 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; diff --git a/remote/messages/collection.pb.h b/remote/messages/collection.pb.h index 85cf0f0d..2ebb6a1f 100644 --- a/remote/messages/collection.pb.h +++ b/remote/messages/collection.pb.h @@ -2085,7 +2085,7 @@ class AudioCollectionResponse : public ::google::protobuf::Message { // accessors ------------------------------------------------------- - // optional .Remote.AudioCollectionResponse.Type type = 1; + // required .Remote.AudioCollectionResponse.Type type = 1; inline bool has_type() const; inline void clear_type(); static const int kTypeFieldNumber = 1; @@ -3960,7 +3960,7 @@ inline void AudioCollectionResponse_Track::set_allocated_original_release_date(: // AudioCollectionResponse -// optional .Remote.AudioCollectionResponse.Type type = 1; +// required .Remote.AudioCollectionResponse.Type type = 1; inline bool AudioCollectionResponse::has_type() const { return (_has_bits_[0] & 0x00000001u) != 0; } diff --git a/remote/proto/collection.proto b/remote/proto/collection.proto index ec45a0d2..7eb10659 100644 --- a/remote/proto/collection.proto +++ b/remote/proto/collection.proto @@ -165,7 +165,7 @@ message AudioCollectionResponse } - optional Type type = 1; + required Type type = 1; optional Error error = 2; optional Revision revision = 3;