diff --git a/remote/proto/.messages.proto.swp b/remote/proto/.messages.proto.swp new file mode 100644 index 00000000..5b440535 Binary files /dev/null and b/remote/proto/.messages.proto.swp differ diff --git a/remote/proto/auth.pb.cc b/remote/proto/auth.pb.cc new file mode 100644 index 00000000..078c9b52 --- /dev/null +++ b/remote/proto/auth.pb.cc @@ -0,0 +1,625 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: auth.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "auth.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace { + +const ::google::protobuf::Descriptor* AuthRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + AuthRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* AuthResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + AuthResponse_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_auth_2eproto() { + protobuf_AddDesc_auth_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "auth.proto"); + GOOGLE_CHECK(file != NULL); + AuthRequest_descriptor_ = file->message_type(0); + static const int AuthRequest_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AuthRequest, user_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AuthRequest, user_password_), + }; + AuthRequest_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + AuthRequest_descriptor_, + AuthRequest::default_instance_, + AuthRequest_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AuthRequest, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AuthRequest, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(AuthRequest)); + AuthResponse_descriptor_ = file->message_type(1); + static const int AuthResponse_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AuthResponse, error_), + }; + AuthResponse_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + AuthResponse_descriptor_, + AuthResponse::default_instance_, + AuthResponse_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AuthResponse, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AuthResponse, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(AuthResponse)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_auth_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + AuthRequest_descriptor_, &AuthRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + AuthResponse_descriptor_, &AuthResponse::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_auth_2eproto() { + delete AuthRequest::default_instance_; + delete AuthRequest_reflection_; + delete AuthResponse::default_instance_; + delete AuthResponse_reflection_; +} + +void protobuf_AddDesc_auth_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::protobuf_AddDesc_common_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\nauth.proto\032\014common.proto\"7\n\013AuthReques" + "t\022\021\n\tuser_name\030\001 \002(\t\022\025\n\ruser_password\030\002 " + "\002(\t\"%\n\014AuthResponse\022\025\n\005error\030\001 \002(\0132\006.Err" + "or", 122); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "auth.proto", &protobuf_RegisterTypes); + AuthRequest::default_instance_ = new AuthRequest(); + AuthResponse::default_instance_ = new AuthResponse(); + AuthRequest::default_instance_->InitAsDefaultInstance(); + AuthResponse::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_auth_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_auth_2eproto { + StaticDescriptorInitializer_auth_2eproto() { + protobuf_AddDesc_auth_2eproto(); + } +} static_descriptor_initializer_auth_2eproto_; + +// =================================================================== + +#ifndef _MSC_VER +const int AuthRequest::kUserNameFieldNumber; +const int AuthRequest::kUserPasswordFieldNumber; +#endif // !_MSC_VER + +AuthRequest::AuthRequest() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void AuthRequest::InitAsDefaultInstance() { +} + +AuthRequest::AuthRequest(const AuthRequest& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void AuthRequest::SharedCtor() { + _cached_size_ = 0; + user_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + user_password_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +AuthRequest::~AuthRequest() { + SharedDtor(); +} + +void AuthRequest::SharedDtor() { + if (user_name_ != &::google::protobuf::internal::kEmptyString) { + delete user_name_; + } + if (user_password_ != &::google::protobuf::internal::kEmptyString) { + delete user_password_; + } + if (this != default_instance_) { + } +} + +void AuthRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* AuthRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return AuthRequest_descriptor_; +} + +const AuthRequest& AuthRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_auth_2eproto(); + return *default_instance_; +} + +AuthRequest* AuthRequest::default_instance_ = NULL; + +AuthRequest* AuthRequest::New() const { + return new AuthRequest; +} + +void AuthRequest::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_user_name()) { + if (user_name_ != &::google::protobuf::internal::kEmptyString) { + user_name_->clear(); + } + } + if (has_user_password()) { + if (user_password_ != &::google::protobuf::internal::kEmptyString) { + user_password_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool AuthRequest::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 string user_name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_user_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->user_name().data(), this->user_name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_user_password; + break; + } + + // required string user_password = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_user_password: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_user_password())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->user_password().data(), this->user_password().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } 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 AuthRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string user_name = 1; + if (has_user_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->user_name().data(), this->user_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->user_name(), output); + } + + // required string user_password = 2; + if (has_user_password()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->user_password().data(), this->user_password().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->user_password(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* AuthRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string user_name = 1; + if (has_user_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->user_name().data(), this->user_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->user_name(), target); + } + + // required string user_password = 2; + if (has_user_password()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->user_password().data(), this->user_password().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->user_password(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int AuthRequest::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string user_name = 1; + if (has_user_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->user_name()); + } + + // required string user_password = 2; + if (has_user_password()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->user_password()); + } + + } + 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 AuthRequest::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const AuthRequest* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void AuthRequest::MergeFrom(const AuthRequest& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_user_name()) { + set_user_name(from.user_name()); + } + if (from.has_user_password()) { + set_user_password(from.user_password()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void AuthRequest::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AuthRequest::CopyFrom(const AuthRequest& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AuthRequest::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void AuthRequest::Swap(AuthRequest* other) { + if (other != this) { + std::swap(user_name_, other->user_name_); + std::swap(user_password_, other->user_password_); + 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 AuthRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = AuthRequest_descriptor_; + metadata.reflection = AuthRequest_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int AuthResponse::kErrorFieldNumber; +#endif // !_MSC_VER + +AuthResponse::AuthResponse() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void AuthResponse::InitAsDefaultInstance() { + error_ = const_cast< ::Error*>(&::Error::default_instance()); +} + +AuthResponse::AuthResponse(const AuthResponse& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void AuthResponse::SharedCtor() { + _cached_size_ = 0; + error_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +AuthResponse::~AuthResponse() { + SharedDtor(); +} + +void AuthResponse::SharedDtor() { + if (this != default_instance_) { + delete error_; + } +} + +void AuthResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* AuthResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return AuthResponse_descriptor_; +} + +const AuthResponse& AuthResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_auth_2eproto(); + return *default_instance_; +} + +AuthResponse* AuthResponse::default_instance_ = NULL; + +AuthResponse* AuthResponse::New() const { + return new AuthResponse; +} + +void AuthResponse::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_error()) { + if (error_ != NULL) error_->::Error::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool AuthResponse::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 .Error error = 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->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 AuthResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .Error error = 1; + if (has_error()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->error(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* AuthResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .Error error = 1; + if (has_error()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->error(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int AuthResponse::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .Error error = 1; + if (has_error()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->error()); + } + + } + 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 AuthResponse::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const AuthResponse* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void AuthResponse::MergeFrom(const AuthResponse& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_error()) { + mutable_error()->::Error::MergeFrom(from.error()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void AuthResponse::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AuthResponse::CopyFrom(const AuthResponse& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AuthResponse::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_error()) { + if (!this->error().IsInitialized()) return false; + } + return true; +} + +void AuthResponse::Swap(AuthResponse* other) { + if (other != this) { + std::swap(error_, other->error_); + 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 AuthResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = AuthResponse_descriptor_; + metadata.reflection = AuthResponse_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +// @@protoc_insertion_point(global_scope) diff --git a/remote/proto/auth.pb.h b/remote/proto/auth.pb.h new file mode 100644 index 00000000..07f150e3 --- /dev/null +++ b/remote/proto/auth.pb.h @@ -0,0 +1,427 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: auth.proto + +#ifndef PROTOBUF_auth_2eproto__INCLUDED +#define PROTOBUF_auth_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2005000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include "common.pb.h" +// @@protoc_insertion_point(includes) + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_auth_2eproto(); +void protobuf_AssignDesc_auth_2eproto(); +void protobuf_ShutdownFile_auth_2eproto(); + +class AuthRequest; +class AuthResponse; + +// =================================================================== + +class AuthRequest : public ::google::protobuf::Message { + public: + AuthRequest(); + virtual ~AuthRequest(); + + AuthRequest(const AuthRequest& from); + + inline AuthRequest& operator=(const AuthRequest& 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 AuthRequest& default_instance(); + + void Swap(AuthRequest* other); + + // implements Message ---------------------------------------------- + + AuthRequest* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const AuthRequest& from); + void MergeFrom(const AuthRequest& 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 string user_name = 1; + inline bool has_user_name() const; + inline void clear_user_name(); + static const int kUserNameFieldNumber = 1; + inline const ::std::string& user_name() const; + inline void set_user_name(const ::std::string& value); + inline void set_user_name(const char* value); + inline void set_user_name(const char* value, size_t size); + inline ::std::string* mutable_user_name(); + inline ::std::string* release_user_name(); + inline void set_allocated_user_name(::std::string* user_name); + + // required string user_password = 2; + inline bool has_user_password() const; + inline void clear_user_password(); + static const int kUserPasswordFieldNumber = 2; + inline const ::std::string& user_password() const; + inline void set_user_password(const ::std::string& value); + inline void set_user_password(const char* value); + inline void set_user_password(const char* value, size_t size); + inline ::std::string* mutable_user_password(); + inline ::std::string* release_user_password(); + inline void set_allocated_user_password(::std::string* user_password); + + // @@protoc_insertion_point(class_scope:AuthRequest) + private: + inline void set_has_user_name(); + inline void clear_has_user_name(); + inline void set_has_user_password(); + inline void clear_has_user_password(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* user_name_; + ::std::string* user_password_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_auth_2eproto(); + friend void protobuf_AssignDesc_auth_2eproto(); + friend void protobuf_ShutdownFile_auth_2eproto(); + + void InitAsDefaultInstance(); + static AuthRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class AuthResponse : public ::google::protobuf::Message { + public: + AuthResponse(); + virtual ~AuthResponse(); + + AuthResponse(const AuthResponse& from); + + inline AuthResponse& operator=(const AuthResponse& 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 AuthResponse& default_instance(); + + void Swap(AuthResponse* other); + + // implements Message ---------------------------------------------- + + AuthResponse* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const AuthResponse& from); + void MergeFrom(const AuthResponse& 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 .Error error = 1; + inline bool has_error() const; + inline void clear_error(); + static const int kErrorFieldNumber = 1; + inline const ::Error& error() const; + inline ::Error* mutable_error(); + inline ::Error* release_error(); + inline void set_allocated_error(::Error* error); + + // @@protoc_insertion_point(class_scope:AuthResponse) + private: + inline void set_has_error(); + inline void clear_has_error(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::Error* error_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_auth_2eproto(); + friend void protobuf_AssignDesc_auth_2eproto(); + friend void protobuf_ShutdownFile_auth_2eproto(); + + void InitAsDefaultInstance(); + static AuthResponse* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// AuthRequest + +// required string user_name = 1; +inline bool AuthRequest::has_user_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void AuthRequest::set_has_user_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void AuthRequest::clear_has_user_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void AuthRequest::clear_user_name() { + if (user_name_ != &::google::protobuf::internal::kEmptyString) { + user_name_->clear(); + } + clear_has_user_name(); +} +inline const ::std::string& AuthRequest::user_name() const { + return *user_name_; +} +inline void AuthRequest::set_user_name(const ::std::string& value) { + set_has_user_name(); + if (user_name_ == &::google::protobuf::internal::kEmptyString) { + user_name_ = new ::std::string; + } + user_name_->assign(value); +} +inline void AuthRequest::set_user_name(const char* value) { + set_has_user_name(); + if (user_name_ == &::google::protobuf::internal::kEmptyString) { + user_name_ = new ::std::string; + } + user_name_->assign(value); +} +inline void AuthRequest::set_user_name(const char* value, size_t size) { + set_has_user_name(); + if (user_name_ == &::google::protobuf::internal::kEmptyString) { + user_name_ = new ::std::string; + } + user_name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* AuthRequest::mutable_user_name() { + set_has_user_name(); + if (user_name_ == &::google::protobuf::internal::kEmptyString) { + user_name_ = new ::std::string; + } + return user_name_; +} +inline ::std::string* AuthRequest::release_user_name() { + clear_has_user_name(); + if (user_name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = user_name_; + user_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void AuthRequest::set_allocated_user_name(::std::string* user_name) { + if (user_name_ != &::google::protobuf::internal::kEmptyString) { + delete user_name_; + } + if (user_name) { + set_has_user_name(); + user_name_ = user_name; + } else { + clear_has_user_name(); + user_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// required string user_password = 2; +inline bool AuthRequest::has_user_password() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void AuthRequest::set_has_user_password() { + _has_bits_[0] |= 0x00000002u; +} +inline void AuthRequest::clear_has_user_password() { + _has_bits_[0] &= ~0x00000002u; +} +inline void AuthRequest::clear_user_password() { + if (user_password_ != &::google::protobuf::internal::kEmptyString) { + user_password_->clear(); + } + clear_has_user_password(); +} +inline const ::std::string& AuthRequest::user_password() const { + return *user_password_; +} +inline void AuthRequest::set_user_password(const ::std::string& value) { + set_has_user_password(); + if (user_password_ == &::google::protobuf::internal::kEmptyString) { + user_password_ = new ::std::string; + } + user_password_->assign(value); +} +inline void AuthRequest::set_user_password(const char* value) { + set_has_user_password(); + if (user_password_ == &::google::protobuf::internal::kEmptyString) { + user_password_ = new ::std::string; + } + user_password_->assign(value); +} +inline void AuthRequest::set_user_password(const char* value, size_t size) { + set_has_user_password(); + if (user_password_ == &::google::protobuf::internal::kEmptyString) { + user_password_ = new ::std::string; + } + user_password_->assign(reinterpret_cast(value), size); +} +inline ::std::string* AuthRequest::mutable_user_password() { + set_has_user_password(); + if (user_password_ == &::google::protobuf::internal::kEmptyString) { + user_password_ = new ::std::string; + } + return user_password_; +} +inline ::std::string* AuthRequest::release_user_password() { + clear_has_user_password(); + if (user_password_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = user_password_; + user_password_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void AuthRequest::set_allocated_user_password(::std::string* user_password) { + if (user_password_ != &::google::protobuf::internal::kEmptyString) { + delete user_password_; + } + if (user_password) { + set_has_user_password(); + user_password_ = user_password; + } else { + clear_has_user_password(); + user_password_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// ------------------------------------------------------------------- + +// AuthResponse + +// required .Error error = 1; +inline bool AuthResponse::has_error() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void AuthResponse::set_has_error() { + _has_bits_[0] |= 0x00000001u; +} +inline void AuthResponse::clear_has_error() { + _has_bits_[0] &= ~0x00000001u; +} +inline void AuthResponse::clear_error() { + if (error_ != NULL) error_->::Error::Clear(); + clear_has_error(); +} +inline const ::Error& AuthResponse::error() const { + return error_ != NULL ? *error_ : *default_instance_->error_; +} +inline ::Error* AuthResponse::mutable_error() { + set_has_error(); + if (error_ == NULL) error_ = new ::Error; + return error_; +} +inline ::Error* AuthResponse::release_error() { + clear_has_error(); + ::Error* temp = error_; + error_ = NULL; + return temp; +} +inline void AuthResponse::set_allocated_error(::Error* error) { + delete error_; + error_ = error; + if (error) { + set_has_error(); + } else { + clear_has_error(); + } +} + + +// @@protoc_insertion_point(namespace_scope) + +#ifndef SWIG +namespace google { +namespace protobuf { + + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_auth_2eproto__INCLUDED diff --git a/remote/proto/auth.proto b/remote/proto/auth.proto new file mode 100644 index 00000000..74fb95b3 --- /dev/null +++ b/remote/proto/auth.proto @@ -0,0 +1,13 @@ +import "common.proto"; + +message AuthRequest +{ + required string user_name = 1; + required string user_password = 2; +} + +message AuthResponse +{ + required Error error = 1; +} + diff --git a/remote/proto/collection.pb.cc b/remote/proto/collection.pb.cc new file mode 100644 index 00000000..c5e47eae --- /dev/null +++ b/remote/proto/collection.pb.cc @@ -0,0 +1,5701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: collection.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "collection.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace { + +const ::google::protobuf::Descriptor* CollectionRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + CollectionRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* CollectionRequest_GetGenreList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + CollectionRequest_GetGenreList_reflection_ = NULL; +const ::google::protobuf::Descriptor* CollectionRequest_GetArtistList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + CollectionRequest_GetArtistList_reflection_ = NULL; +const ::google::protobuf::Descriptor* CollectionRequest_GetReleaseList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + CollectionRequest_GetReleaseList_reflection_ = NULL; +const ::google::protobuf::Descriptor* CollectionRequest_GetTrackList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + CollectionRequest_GetTrackList_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* CollectionRequest_Type_descriptor_ = NULL; +const ::google::protobuf::Descriptor* CollectionResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + CollectionResponse_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* CollectionResponse_Type_descriptor_ = NULL; +const ::google::protobuf::Descriptor* GenreList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + GenreList_reflection_ = NULL; +const ::google::protobuf::Descriptor* ArtistList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ArtistList_reflection_ = NULL; +const ::google::protobuf::Descriptor* ReleaseList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ReleaseList_reflection_ = NULL; +const ::google::protobuf::Descriptor* TrackList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + TrackList_reflection_ = NULL; +const ::google::protobuf::Descriptor* Genre_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Genre_reflection_ = NULL; +const ::google::protobuf::Descriptor* CoverArt_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + CoverArt_reflection_ = NULL; +const ::google::protobuf::Descriptor* Artist_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Artist_reflection_ = NULL; +const ::google::protobuf::Descriptor* Release_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Release_reflection_ = NULL; +const ::google::protobuf::Descriptor* Track_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Track_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_collection_2eproto() { + protobuf_AddDesc_collection_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "collection.proto"); + GOOGLE_CHECK(file != NULL); + CollectionRequest_descriptor_ = file->message_type(0); + static const int CollectionRequest_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest, get_artists_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest, get_releases_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest, get_tracks_), + }; + CollectionRequest_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + CollectionRequest_descriptor_, + CollectionRequest::default_instance_, + CollectionRequest_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(CollectionRequest)); + CollectionRequest_GetGenreList_descriptor_ = CollectionRequest_descriptor_->nested_type(0); + static const int CollectionRequest_GetGenreList_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetGenreList, filter_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetGenreList, preferred_batch_size_), + }; + CollectionRequest_GetGenreList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + CollectionRequest_GetGenreList_descriptor_, + CollectionRequest_GetGenreList::default_instance_, + CollectionRequest_GetGenreList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetGenreList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetGenreList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(CollectionRequest_GetGenreList)); + CollectionRequest_GetArtistList_descriptor_ = CollectionRequest_descriptor_->nested_type(1); + static const int CollectionRequest_GetArtistList_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetArtistList, filter_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetArtistList, filter_genre_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetArtistList, preferred_batch_size_), + }; + CollectionRequest_GetArtistList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + CollectionRequest_GetArtistList_descriptor_, + CollectionRequest_GetArtistList::default_instance_, + CollectionRequest_GetArtistList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetArtistList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetArtistList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(CollectionRequest_GetArtistList)); + CollectionRequest_GetReleaseList_descriptor_ = CollectionRequest_descriptor_->nested_type(2); + static const int CollectionRequest_GetReleaseList_offsets_[5] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetReleaseList, filter_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetReleaseList, artist_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetReleaseList, filter_genre_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetReleaseList, get_cover_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetReleaseList, preferred_batch_size_), + }; + CollectionRequest_GetReleaseList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + CollectionRequest_GetReleaseList_descriptor_, + CollectionRequest_GetReleaseList::default_instance_, + CollectionRequest_GetReleaseList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetReleaseList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetReleaseList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(CollectionRequest_GetReleaseList)); + CollectionRequest_GetTrackList_descriptor_ = CollectionRequest_descriptor_->nested_type(3); + static const int CollectionRequest_GetTrackList_offsets_[8] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, filter_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, release_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, artist_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, filter_genre_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, disc_number_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, track_number_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, get_cover_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, preferred_batch_size_), + }; + CollectionRequest_GetTrackList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + CollectionRequest_GetTrackList_descriptor_, + CollectionRequest_GetTrackList::default_instance_, + CollectionRequest_GetTrackList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionRequest_GetTrackList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(CollectionRequest_GetTrackList)); + CollectionRequest_Type_descriptor_ = CollectionRequest_descriptor_->enum_type(0); + CollectionResponse_descriptor_ = file->message_type(1); + static const int CollectionResponse_offsets_[6] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionResponse, error_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionResponse, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionResponse, genre_list_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionResponse, artist_list_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionResponse, release_list_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionResponse, track_list_), + }; + CollectionResponse_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + CollectionResponse_descriptor_, + CollectionResponse::default_instance_, + CollectionResponse_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionResponse, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionResponse, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(CollectionResponse)); + CollectionResponse_Type_descriptor_ = CollectionResponse_descriptor_->enum_type(0); + GenreList_descriptor_ = file->message_type(2); + static const int GenreList_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GenreList, last_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GenreList, genres_), + }; + GenreList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + GenreList_descriptor_, + GenreList::default_instance_, + GenreList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GenreList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GenreList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(GenreList)); + ArtistList_descriptor_ = file->message_type(3); + static const int ArtistList_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArtistList, last_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArtistList, artists_), + }; + ArtistList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ArtistList_descriptor_, + ArtistList::default_instance_, + ArtistList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArtistList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArtistList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ArtistList)); + ReleaseList_descriptor_ = file->message_type(4); + static const int ReleaseList_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReleaseList, last_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReleaseList, releases_), + }; + ReleaseList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ReleaseList_descriptor_, + ReleaseList::default_instance_, + ReleaseList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReleaseList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReleaseList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ReleaseList)); + TrackList_descriptor_ = file->message_type(5); + static const int TrackList_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TrackList, last_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TrackList, tracks_), + }; + TrackList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + TrackList_descriptor_, + TrackList::default_instance_, + TrackList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TrackList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TrackList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(TrackList)); + Genre_descriptor_ = file->message_type(6); + static const int Genre_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Genre, name_), + }; + Genre_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Genre_descriptor_, + Genre::default_instance_, + Genre_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Genre, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Genre, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Genre)); + CoverArt_descriptor_ = file->message_type(7); + static const int CoverArt_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CoverArt, mime_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CoverArt, data_), + }; + CoverArt_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + CoverArt_descriptor_, + CoverArt::default_instance_, + CoverArt_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CoverArt, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CoverArt, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(CoverArt)); + Artist_descriptor_ = file->message_type(8); + static const int Artist_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Artist, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Artist, nb_releases_), + }; + Artist_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Artist_descriptor_, + Artist::default_instance_, + Artist_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Artist, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Artist, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Artist)); + Release_descriptor_ = file->message_type(9); + static const int Release_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Release, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Release, nb_tracks_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Release, duration_secs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Release, coverart_), + }; + Release_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Release_descriptor_, + Release::default_instance_, + Release_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Release, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Release, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Release)); + Track_descriptor_ = file->message_type(10); + static const int Track_offsets_[11] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, media_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, disc_number_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, track_number_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, artist_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, release_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, duration_secs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, release_date_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, original_release_date_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, genres_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, coverart_), + }; + Track_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Track_descriptor_, + Track::default_instance_, + Track_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Track, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Track)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_collection_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + CollectionRequest_descriptor_, &CollectionRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + CollectionRequest_GetGenreList_descriptor_, &CollectionRequest_GetGenreList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + CollectionRequest_GetArtistList_descriptor_, &CollectionRequest_GetArtistList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + CollectionRequest_GetReleaseList_descriptor_, &CollectionRequest_GetReleaseList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + CollectionRequest_GetTrackList_descriptor_, &CollectionRequest_GetTrackList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + CollectionResponse_descriptor_, &CollectionResponse::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + GenreList_descriptor_, &GenreList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ArtistList_descriptor_, &ArtistList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ReleaseList_descriptor_, &ReleaseList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + TrackList_descriptor_, &TrackList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Genre_descriptor_, &Genre::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + CoverArt_descriptor_, &CoverArt::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Artist_descriptor_, &Artist::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Release_descriptor_, &Release::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Track_descriptor_, &Track::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_collection_2eproto() { + delete CollectionRequest::default_instance_; + delete CollectionRequest_reflection_; + delete CollectionRequest_GetGenreList::default_instance_; + delete CollectionRequest_GetGenreList_reflection_; + delete CollectionRequest_GetArtistList::default_instance_; + delete CollectionRequest_GetArtistList_reflection_; + delete CollectionRequest_GetReleaseList::default_instance_; + delete CollectionRequest_GetReleaseList_reflection_; + delete CollectionRequest_GetTrackList::default_instance_; + delete CollectionRequest_GetTrackList_reflection_; + delete CollectionResponse::default_instance_; + delete CollectionResponse_reflection_; + delete GenreList::default_instance_; + delete GenreList_reflection_; + delete ArtistList::default_instance_; + delete ArtistList_reflection_; + delete ReleaseList::default_instance_; + delete ReleaseList_reflection_; + delete TrackList::default_instance_; + delete TrackList_reflection_; + delete Genre::default_instance_; + delete Genre_reflection_; + delete CoverArt::default_instance_; + delete CoverArt_reflection_; + delete Artist::default_instance_; + delete Artist_reflection_; + delete Release::default_instance_; + delete Release_reflection_; + delete Track::default_instance_; + delete Track_reflection_; +} + +void protobuf_AddDesc_collection_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::protobuf_AddDesc_common_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\020collection.proto\032\014common.proto\"\220\006\n\021Col" + "lectionRequest\022%\n\004type\030\001 \002(\0162\027.Collectio" + "nRequest.Type\0225\n\013get_artists\030\002 \001(\0132 .Col" + "lectionRequest.GetArtistList\0227\n\014get_rele" + "ases\030\003 \001(\0132!.CollectionRequest.GetReleas" + "eList\0223\n\nget_tracks\030\004 \001(\0132\037.CollectionRe" + "quest.GetTrackList\032A\n\014GetGenreList\022\023\n\013fi" + "lter_name\030\001 \001(\t\022\034\n\024preferred_batch_size\030" + "\002 \001(\r\032X\n\rGetArtistList\022\023\n\013filter_name\030\001 " + "\001(\t\022\024\n\014filter_genre\030\002 \003(\t\022\034\n\024preferred_b" + "atch_size\030\003 \001(\r\032\201\001\n\016GetReleaseList\022\023\n\013fi" + "lter_name\030\001 \001(\t\022\023\n\013artist_name\030\002 \003(\t\022\024\n\014" + "filter_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\014GetTrack" + "List\022\023\n\013filter_name\030\001 \001(\t\022\024\n\014release_nam" + "e\030\002 \003(\t\022\023\n\013artist_name\030\003 \003(\t\022\024\n\014filter_g" + "enre\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\024pref" + "erred_batch_size\030\010 \001(\r\"K\n\004Type\022\025\n\021TypeGe" + "tArtistList\020\000\022\026\n\022TypeGetReleaseList\020\001\022\024\n" + "\020TypeGetTrackList\020\002\"\260\002\n\022CollectionRespon" + "se\022\025\n\005error\030\001 \002(\0132\006.Error\022&\n\004type\030\002 \002(\0162" + "\030.CollectionResponse.Type\022\036\n\ngenre_list\030" + "\003 \001(\0132\n.GenreList\022 \n\013artist_list\030\004 \001(\0132\013" + ".ArtistList\022\"\n\014release_list\030\005 \001(\0132\014.Rele" + "aseList\022\036\n\ntrack_list\030\006 \001(\0132\n.TrackList\"" + "U\n\004Type\022\021\n\rTypeGenreList\020\001\022\022\n\016TypeArtist" + "List\020\002\022\023\n\017TypeReleaseList\020\003\022\021\n\rTypeTrack" + "List\020\004\"1\n\tGenreList\022\014\n\004last\030\001 \002(\010\022\026\n\006gen" + "res\030\002 \003(\0132\006.Genre\"4\n\nArtistList\022\014\n\004last\030" + "\001 \002(\010\022\030\n\007artists\030\002 \003(\0132\007.Artist\"7\n\013Relea" + "seList\022\014\n\004last\030\001 \002(\010\022\032\n\010releases\030\002 \003(\0132\010" + ".Release\"1\n\tTrackList\022\014\n\004last\030\001 \002(\010\022\026\n\006t" + "racks\030\002 \003(\0132\006.Track\"\025\n\005Genre\022\014\n\004name\030\001 \002" + "(\t\"+\n\010CoverArt\022\021\n\tmime_type\030\001 \001(\t\022\014\n\004dat" + "a\030\002 \003(\014\"+\n\006Artist\022\014\n\004name\030\001 \002(\t\022\023\n\013nb_re" + "leases\030\002 \002(\r\"^\n\007Release\022\014\n\004name\030\001 \002(\t\022\021\n" + "\tnb_tracks\030\002 \002(\r\022\025\n\rduration_secs\030\003 \002(\r\022" + "\033\n\010coverArt\030\004 \001(\0132\t.CoverArt\"\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\007r" + "elease\030\005 \001(\t\022\014\n\004name\030\006 \002(\t\022\025\n\rduration_s" + "ecs\030\007 \002(\r\022\024\n\014release_date\030\010 \001(\t\022\035\n\025origi" + "nal_release_date\030\t \001(\t\022\016\n\006genres\030\n \003(\t\022\020" + "\n\010coverArt\030\013 \001(\014", 1776); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "collection.proto", &protobuf_RegisterTypes); + CollectionRequest::default_instance_ = new CollectionRequest(); + CollectionRequest_GetGenreList::default_instance_ = new CollectionRequest_GetGenreList(); + CollectionRequest_GetArtistList::default_instance_ = new CollectionRequest_GetArtistList(); + CollectionRequest_GetReleaseList::default_instance_ = new CollectionRequest_GetReleaseList(); + CollectionRequest_GetTrackList::default_instance_ = new CollectionRequest_GetTrackList(); + CollectionResponse::default_instance_ = new CollectionResponse(); + GenreList::default_instance_ = new GenreList(); + ArtistList::default_instance_ = new ArtistList(); + ReleaseList::default_instance_ = new ReleaseList(); + TrackList::default_instance_ = new TrackList(); + Genre::default_instance_ = new Genre(); + CoverArt::default_instance_ = new CoverArt(); + Artist::default_instance_ = new Artist(); + Release::default_instance_ = new Release(); + Track::default_instance_ = new Track(); + CollectionRequest::default_instance_->InitAsDefaultInstance(); + CollectionRequest_GetGenreList::default_instance_->InitAsDefaultInstance(); + CollectionRequest_GetArtistList::default_instance_->InitAsDefaultInstance(); + CollectionRequest_GetReleaseList::default_instance_->InitAsDefaultInstance(); + CollectionRequest_GetTrackList::default_instance_->InitAsDefaultInstance(); + CollectionResponse::default_instance_->InitAsDefaultInstance(); + GenreList::default_instance_->InitAsDefaultInstance(); + ArtistList::default_instance_->InitAsDefaultInstance(); + ReleaseList::default_instance_->InitAsDefaultInstance(); + TrackList::default_instance_->InitAsDefaultInstance(); + Genre::default_instance_->InitAsDefaultInstance(); + CoverArt::default_instance_->InitAsDefaultInstance(); + Artist::default_instance_->InitAsDefaultInstance(); + Release::default_instance_->InitAsDefaultInstance(); + Track::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_collection_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_collection_2eproto { + StaticDescriptorInitializer_collection_2eproto() { + protobuf_AddDesc_collection_2eproto(); + } +} static_descriptor_initializer_collection_2eproto_; + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* CollectionRequest_Type_descriptor() { + protobuf_AssignDescriptorsOnce(); + return CollectionRequest_Type_descriptor_; +} +bool CollectionRequest_Type_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const CollectionRequest_Type CollectionRequest::TypeGetArtistList; +const CollectionRequest_Type CollectionRequest::TypeGetReleaseList; +const CollectionRequest_Type CollectionRequest::TypeGetTrackList; +const CollectionRequest_Type CollectionRequest::Type_MIN; +const CollectionRequest_Type CollectionRequest::Type_MAX; +const int CollectionRequest::Type_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int CollectionRequest_GetGenreList::kFilterNameFieldNumber; +const int CollectionRequest_GetGenreList::kPreferredBatchSizeFieldNumber; +#endif // !_MSC_VER + +CollectionRequest_GetGenreList::CollectionRequest_GetGenreList() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void CollectionRequest_GetGenreList::InitAsDefaultInstance() { +} + +CollectionRequest_GetGenreList::CollectionRequest_GetGenreList(const CollectionRequest_GetGenreList& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void CollectionRequest_GetGenreList::SharedCtor() { + _cached_size_ = 0; + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + preferred_batch_size_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +CollectionRequest_GetGenreList::~CollectionRequest_GetGenreList() { + SharedDtor(); +} + +void CollectionRequest_GetGenreList::SharedDtor() { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + delete filter_name_; + } + if (this != default_instance_) { + } +} + +void CollectionRequest_GetGenreList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* CollectionRequest_GetGenreList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return CollectionRequest_GetGenreList_descriptor_; +} + +const CollectionRequest_GetGenreList& CollectionRequest_GetGenreList::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +CollectionRequest_GetGenreList* CollectionRequest_GetGenreList::default_instance_ = NULL; + +CollectionRequest_GetGenreList* CollectionRequest_GetGenreList::New() const { + return new CollectionRequest_GetGenreList; +} + +void CollectionRequest_GetGenreList::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_filter_name()) { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + filter_name_->clear(); + } + } + preferred_batch_size_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool CollectionRequest_GetGenreList::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)) { + // optional string filter_name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_filter_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_preferred_batch_size; + break; + } + + // optional uint32 preferred_batch_size = 2; + case 2: { + 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(); + } 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 CollectionRequest_GetGenreList::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // optional string filter_name = 1; + if (has_filter_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->filter_name(), output); + } + + // optional uint32 preferred_batch_size = 2; + if (has_preferred_batch_size()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->preferred_batch_size(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* CollectionRequest_GetGenreList::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // optional string filter_name = 1; + if (has_filter_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->filter_name(), target); + } + + // optional uint32 preferred_batch_size = 2; + if (has_preferred_batch_size()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->preferred_batch_size(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int CollectionRequest_GetGenreList::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional string filter_name = 1; + if (has_filter_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->filter_name()); + } + + // optional uint32 preferred_batch_size = 2; + if (has_preferred_batch_size()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->preferred_batch_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 CollectionRequest_GetGenreList::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const CollectionRequest_GetGenreList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void CollectionRequest_GetGenreList::MergeFrom(const CollectionRequest_GetGenreList& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + 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()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void CollectionRequest_GetGenreList::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CollectionRequest_GetGenreList::CopyFrom(const CollectionRequest_GetGenreList& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CollectionRequest_GetGenreList::IsInitialized() const { + + return true; +} + +void CollectionRequest_GetGenreList::Swap(CollectionRequest_GetGenreList* other) { + if (other != this) { + std::swap(filter_name_, other->filter_name_); + std::swap(preferred_batch_size_, other->preferred_batch_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 CollectionRequest_GetGenreList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = CollectionRequest_GetGenreList_descriptor_; + metadata.reflection = CollectionRequest_GetGenreList_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int CollectionRequest_GetArtistList::kFilterNameFieldNumber; +const int CollectionRequest_GetArtistList::kFilterGenreFieldNumber; +const int CollectionRequest_GetArtistList::kPreferredBatchSizeFieldNumber; +#endif // !_MSC_VER + +CollectionRequest_GetArtistList::CollectionRequest_GetArtistList() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void CollectionRequest_GetArtistList::InitAsDefaultInstance() { +} + +CollectionRequest_GetArtistList::CollectionRequest_GetArtistList(const CollectionRequest_GetArtistList& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void CollectionRequest_GetArtistList::SharedCtor() { + _cached_size_ = 0; + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + preferred_batch_size_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +CollectionRequest_GetArtistList::~CollectionRequest_GetArtistList() { + SharedDtor(); +} + +void CollectionRequest_GetArtistList::SharedDtor() { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + delete filter_name_; + } + if (this != default_instance_) { + } +} + +void CollectionRequest_GetArtistList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* CollectionRequest_GetArtistList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return CollectionRequest_GetArtistList_descriptor_; +} + +const CollectionRequest_GetArtistList& CollectionRequest_GetArtistList::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +CollectionRequest_GetArtistList* CollectionRequest_GetArtistList::default_instance_ = NULL; + +CollectionRequest_GetArtistList* CollectionRequest_GetArtistList::New() const { + return new CollectionRequest_GetArtistList; +} + +void CollectionRequest_GetArtistList::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_filter_name()) { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + filter_name_->clear(); + } + } + preferred_batch_size_ = 0u; + } + filter_genre_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool CollectionRequest_GetArtistList::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)) { + // optional string filter_name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_filter_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_filter_genre; + break; + } + + // repeated string filter_genre = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_filter_genre: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_filter_genre())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_genre(this->filter_genre_size() - 1).data(), + this->filter_genre(this->filter_genre_size() - 1).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_filter_genre; + if (input->ExpectTag(24)) goto parse_preferred_batch_size; + break; + } + + // optional uint32 preferred_batch_size = 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(); + } 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 CollectionRequest_GetArtistList::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // optional string filter_name = 1; + if (has_filter_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->filter_name(), output); + } + + // repeated string filter_genre = 2; + for (int i = 0; i < this->filter_genre_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_genre(i).data(), this->filter_genre(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 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); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* CollectionRequest_GetArtistList::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // optional string filter_name = 1; + if (has_filter_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->filter_name(), target); + } + + // repeated string filter_genre = 2; + for (int i = 0; i < this->filter_genre_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_genre(i).data(), this->filter_genre(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + 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); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int CollectionRequest_GetArtistList::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional string filter_name = 1; + if (has_filter_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->filter_name()); + } + + // optional uint32 preferred_batch_size = 3; + if (has_preferred_batch_size()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->preferred_batch_size()); + } + + } + // repeated string filter_genre = 2; + total_size += 1 * this->filter_genre_size(); + for (int i = 0; i < this->filter_genre_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->filter_genre(i)); + } + + 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 CollectionRequest_GetArtistList::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const CollectionRequest_GetArtistList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void CollectionRequest_GetArtistList::MergeFrom(const CollectionRequest_GetArtistList& from) { + GOOGLE_CHECK_NE(&from, this); + filter_genre_.MergeFrom(from.filter_genre_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + 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()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void CollectionRequest_GetArtistList::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CollectionRequest_GetArtistList::CopyFrom(const CollectionRequest_GetArtistList& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CollectionRequest_GetArtistList::IsInitialized() const { + + return true; +} + +void CollectionRequest_GetArtistList::Swap(CollectionRequest_GetArtistList* other) { + 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(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata CollectionRequest_GetArtistList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = CollectionRequest_GetArtistList_descriptor_; + metadata.reflection = CollectionRequest_GetArtistList_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int CollectionRequest_GetReleaseList::kFilterNameFieldNumber; +const int CollectionRequest_GetReleaseList::kArtistNameFieldNumber; +const int CollectionRequest_GetReleaseList::kFilterGenreFieldNumber; +const int CollectionRequest_GetReleaseList::kGetCoverFieldNumber; +const int CollectionRequest_GetReleaseList::kPreferredBatchSizeFieldNumber; +#endif // !_MSC_VER + +CollectionRequest_GetReleaseList::CollectionRequest_GetReleaseList() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void CollectionRequest_GetReleaseList::InitAsDefaultInstance() { +} + +CollectionRequest_GetReleaseList::CollectionRequest_GetReleaseList(const CollectionRequest_GetReleaseList& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void CollectionRequest_GetReleaseList::SharedCtor() { + _cached_size_ = 0; + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + get_cover_ = false; + preferred_batch_size_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +CollectionRequest_GetReleaseList::~CollectionRequest_GetReleaseList() { + SharedDtor(); +} + +void CollectionRequest_GetReleaseList::SharedDtor() { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + delete filter_name_; + } + if (this != default_instance_) { + } +} + +void CollectionRequest_GetReleaseList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* CollectionRequest_GetReleaseList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return CollectionRequest_GetReleaseList_descriptor_; +} + +const CollectionRequest_GetReleaseList& CollectionRequest_GetReleaseList::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +CollectionRequest_GetReleaseList* CollectionRequest_GetReleaseList::default_instance_ = NULL; + +CollectionRequest_GetReleaseList* CollectionRequest_GetReleaseList::New() const { + return new CollectionRequest_GetReleaseList; +} + +void CollectionRequest_GetReleaseList::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_filter_name()) { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + filter_name_->clear(); + } + } + get_cover_ = false; + preferred_batch_size_ = 0u; + } + artist_name_.Clear(); + filter_genre_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool CollectionRequest_GetReleaseList::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)) { + // optional string filter_name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_filter_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_artist_name; + break; + } + + // repeated string artist_name = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_artist_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_artist_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->artist_name(this->artist_name_size() - 1).data(), + this->artist_name(this->artist_name_size() - 1).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_artist_name; + if (input->ExpectTag(26)) goto parse_filter_genre; + break; + } + + // repeated string filter_genre = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_filter_genre: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_filter_genre())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_genre(this->filter_genre_size() - 1).data(), + this->filter_genre(this->filter_genre_size() - 1).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_filter_genre; + if (input->ExpectTag(32)) goto parse_get_cover; + break; + } + + // optional bool get_cover = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_get_cover: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &get_cover_))); + set_has_get_cover(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(40)) goto parse_preferred_batch_size; + break; + } + + // optional uint32 preferred_batch_size = 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(); + } 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 CollectionRequest_GetReleaseList::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // optional string filter_name = 1; + if (has_filter_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->filter_name(), output); + } + + // repeated string artist_name = 2; + for (int i = 0; i < this->artist_name_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->artist_name(i).data(), this->artist_name(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->artist_name(i), output); + } + + // repeated string filter_genre = 3; + for (int i = 0; i < this->filter_genre_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_genre(i).data(), this->filter_genre(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->filter_genre(i), output); + } + + // optional bool get_cover = 4; + if (has_get_cover()) { + ::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); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* CollectionRequest_GetReleaseList::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // optional string filter_name = 1; + if (has_filter_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->filter_name(), target); + } + + // repeated string artist_name = 2; + for (int i = 0; i < this->artist_name_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->artist_name(i).data(), this->artist_name(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(2, this->artist_name(i), target); + } + + // repeated string filter_genre = 3; + for (int i = 0; i < this->filter_genre_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_genre(i).data(), this->filter_genre(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(3, this->filter_genre(i), target); + } + + // optional bool get_cover = 4; + if (has_get_cover()) { + 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); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int CollectionRequest_GetReleaseList::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional string filter_name = 1; + if (has_filter_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->filter_name()); + } + + // optional bool get_cover = 4; + if (has_get_cover()) { + total_size += 1 + 1; + } + + // optional uint32 preferred_batch_size = 5; + if (has_preferred_batch_size()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->preferred_batch_size()); + } + + } + // repeated string artist_name = 2; + total_size += 1 * this->artist_name_size(); + for (int i = 0; i < this->artist_name_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->artist_name(i)); + } + + // repeated string filter_genre = 3; + total_size += 1 * this->filter_genre_size(); + for (int i = 0; i < this->filter_genre_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->filter_genre(i)); + } + + 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 CollectionRequest_GetReleaseList::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const CollectionRequest_GetReleaseList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void CollectionRequest_GetReleaseList::MergeFrom(const CollectionRequest_GetReleaseList& from) { + GOOGLE_CHECK_NE(&from, this); + artist_name_.MergeFrom(from.artist_name_); + filter_genre_.MergeFrom(from.filter_genre_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_filter_name()) { + set_filter_name(from.filter_name()); + } + 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()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void CollectionRequest_GetReleaseList::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CollectionRequest_GetReleaseList::CopyFrom(const CollectionRequest_GetReleaseList& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CollectionRequest_GetReleaseList::IsInitialized() const { + + return true; +} + +void CollectionRequest_GetReleaseList::Swap(CollectionRequest_GetReleaseList* other) { + if (other != this) { + std::swap(filter_name_, other->filter_name_); + 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(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata CollectionRequest_GetReleaseList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = CollectionRequest_GetReleaseList_descriptor_; + metadata.reflection = CollectionRequest_GetReleaseList_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int CollectionRequest_GetTrackList::kFilterNameFieldNumber; +const int CollectionRequest_GetTrackList::kReleaseNameFieldNumber; +const int CollectionRequest_GetTrackList::kArtistNameFieldNumber; +const int CollectionRequest_GetTrackList::kFilterGenreFieldNumber; +const int CollectionRequest_GetTrackList::kDiscNumberFieldNumber; +const int CollectionRequest_GetTrackList::kTrackNumberFieldNumber; +const int CollectionRequest_GetTrackList::kGetCoverFieldNumber; +const int CollectionRequest_GetTrackList::kPreferredBatchSizeFieldNumber; +#endif // !_MSC_VER + +CollectionRequest_GetTrackList::CollectionRequest_GetTrackList() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void CollectionRequest_GetTrackList::InitAsDefaultInstance() { +} + +CollectionRequest_GetTrackList::CollectionRequest_GetTrackList(const CollectionRequest_GetTrackList& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void CollectionRequest_GetTrackList::SharedCtor() { + _cached_size_ = 0; + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + disc_number_ = 0u; + track_number_ = 0u; + get_cover_ = false; + preferred_batch_size_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +CollectionRequest_GetTrackList::~CollectionRequest_GetTrackList() { + SharedDtor(); +} + +void CollectionRequest_GetTrackList::SharedDtor() { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + delete filter_name_; + } + if (this != default_instance_) { + } +} + +void CollectionRequest_GetTrackList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* CollectionRequest_GetTrackList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return CollectionRequest_GetTrackList_descriptor_; +} + +const CollectionRequest_GetTrackList& CollectionRequest_GetTrackList::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +CollectionRequest_GetTrackList* CollectionRequest_GetTrackList::default_instance_ = NULL; + +CollectionRequest_GetTrackList* CollectionRequest_GetTrackList::New() const { + return new CollectionRequest_GetTrackList; +} + +void CollectionRequest_GetTrackList::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_filter_name()) { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + filter_name_->clear(); + } + } + disc_number_ = 0u; + track_number_ = 0u; + get_cover_ = false; + preferred_batch_size_ = 0u; + } + release_name_.Clear(); + artist_name_.Clear(); + filter_genre_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool CollectionRequest_GetTrackList::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)) { + // optional string filter_name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_filter_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_release_name; + break; + } + + // repeated string release_name = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_release_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_release_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->release_name(this->release_name_size() - 1).data(), + this->release_name(this->release_name_size() - 1).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_release_name; + if (input->ExpectTag(26)) goto parse_artist_name; + break; + } + + // repeated string artist_name = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_artist_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_artist_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->artist_name(this->artist_name_size() - 1).data(), + this->artist_name(this->artist_name_size() - 1).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_artist_name; + if (input->ExpectTag(34)) goto parse_filter_genre; + break; + } + + // repeated string filter_genre = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_filter_genre: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_filter_genre())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_genre(this->filter_genre_size() - 1).data(), + this->filter_genre(this->filter_genre_size() - 1).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_filter_genre; + if (input->ExpectTag(40)) goto parse_disc_number; + break; + } + + // optional uint32 disc_number = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_disc_number: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &disc_number_))); + set_has_disc_number(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(48)) goto parse_track_number; + break; + } + + // optional uint32 track_number = 6; + case 6: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_track_number: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &track_number_))); + set_has_track_number(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(56)) goto parse_get_cover; + break; + } + + // optional bool get_cover = 7; + case 7: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_get_cover: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &get_cover_))); + set_has_get_cover(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(64)) goto parse_preferred_batch_size; + break; + } + + // optional uint32 preferred_batch_size = 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(); + } 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 CollectionRequest_GetTrackList::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // optional string filter_name = 1; + if (has_filter_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->filter_name(), output); + } + + // repeated string release_name = 2; + for (int i = 0; i < this->release_name_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->release_name(i).data(), this->release_name(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->release_name(i), output); + } + + // repeated string artist_name = 3; + for (int i = 0; i < this->artist_name_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->artist_name(i).data(), this->artist_name(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->artist_name(i), output); + } + + // repeated string filter_genre = 4; + for (int i = 0; i < this->filter_genre_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_genre(i).data(), this->filter_genre(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 4, this->filter_genre(i), output); + } + + // optional uint32 disc_number = 5; + if (has_disc_number()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->disc_number(), output); + } + + // optional uint32 track_number = 6; + if (has_track_number()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->track_number(), output); + } + + // optional bool get_cover = 7; + if (has_get_cover()) { + ::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); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* CollectionRequest_GetTrackList::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // optional string filter_name = 1; + if (has_filter_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_name().data(), this->filter_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->filter_name(), target); + } + + // repeated string release_name = 2; + for (int i = 0; i < this->release_name_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->release_name(i).data(), this->release_name(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(2, this->release_name(i), target); + } + + // repeated string artist_name = 3; + for (int i = 0; i < this->artist_name_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->artist_name(i).data(), this->artist_name(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(3, this->artist_name(i), target); + } + + // repeated string filter_genre = 4; + for (int i = 0; i < this->filter_genre_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->filter_genre(i).data(), this->filter_genre(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(4, this->filter_genre(i), target); + } + + // optional uint32 disc_number = 5; + if (has_disc_number()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->disc_number(), target); + } + + // optional uint32 track_number = 6; + if (has_track_number()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->track_number(), target); + } + + // optional bool get_cover = 7; + if (has_get_cover()) { + 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); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int CollectionRequest_GetTrackList::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional string filter_name = 1; + if (has_filter_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->filter_name()); + } + + // optional uint32 disc_number = 5; + if (has_disc_number()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->disc_number()); + } + + // optional uint32 track_number = 6; + if (has_track_number()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->track_number()); + } + + // optional bool get_cover = 7; + if (has_get_cover()) { + total_size += 1 + 1; + } + + // optional uint32 preferred_batch_size = 8; + if (has_preferred_batch_size()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->preferred_batch_size()); + } + + } + // repeated string release_name = 2; + total_size += 1 * this->release_name_size(); + for (int i = 0; i < this->release_name_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->release_name(i)); + } + + // repeated string artist_name = 3; + total_size += 1 * this->artist_name_size(); + for (int i = 0; i < this->artist_name_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->artist_name(i)); + } + + // repeated string filter_genre = 4; + total_size += 1 * this->filter_genre_size(); + for (int i = 0; i < this->filter_genre_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->filter_genre(i)); + } + + 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 CollectionRequest_GetTrackList::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const CollectionRequest_GetTrackList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void CollectionRequest_GetTrackList::MergeFrom(const CollectionRequest_GetTrackList& from) { + GOOGLE_CHECK_NE(&from, this); + release_name_.MergeFrom(from.release_name_); + artist_name_.MergeFrom(from.artist_name_); + filter_genre_.MergeFrom(from.filter_genre_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_filter_name()) { + set_filter_name(from.filter_name()); + } + if (from.has_disc_number()) { + set_disc_number(from.disc_number()); + } + if (from.has_track_number()) { + set_track_number(from.track_number()); + } + 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()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void CollectionRequest_GetTrackList::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CollectionRequest_GetTrackList::CopyFrom(const CollectionRequest_GetTrackList& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CollectionRequest_GetTrackList::IsInitialized() const { + + return true; +} + +void CollectionRequest_GetTrackList::Swap(CollectionRequest_GetTrackList* other) { + if (other != this) { + std::swap(filter_name_, other->filter_name_); + release_name_.Swap(&other->release_name_); + artist_name_.Swap(&other->artist_name_); + filter_genre_.Swap(&other->filter_genre_); + 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(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata CollectionRequest_GetTrackList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = CollectionRequest_GetTrackList_descriptor_; + metadata.reflection = CollectionRequest_GetTrackList_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int CollectionRequest::kTypeFieldNumber; +const int CollectionRequest::kGetArtistsFieldNumber; +const int CollectionRequest::kGetReleasesFieldNumber; +const int CollectionRequest::kGetTracksFieldNumber; +#endif // !_MSC_VER + +CollectionRequest::CollectionRequest() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void CollectionRequest::InitAsDefaultInstance() { + get_artists_ = const_cast< ::CollectionRequest_GetArtistList*>(&::CollectionRequest_GetArtistList::default_instance()); + get_releases_ = const_cast< ::CollectionRequest_GetReleaseList*>(&::CollectionRequest_GetReleaseList::default_instance()); + get_tracks_ = const_cast< ::CollectionRequest_GetTrackList*>(&::CollectionRequest_GetTrackList::default_instance()); +} + +CollectionRequest::CollectionRequest(const CollectionRequest& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void CollectionRequest::SharedCtor() { + _cached_size_ = 0; + type_ = 0; + get_artists_ = NULL; + get_releases_ = NULL; + get_tracks_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +CollectionRequest::~CollectionRequest() { + SharedDtor(); +} + +void CollectionRequest::SharedDtor() { + if (this != default_instance_) { + delete get_artists_; + delete get_releases_; + delete get_tracks_; + } +} + +void CollectionRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* CollectionRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return CollectionRequest_descriptor_; +} + +const CollectionRequest& CollectionRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +CollectionRequest* CollectionRequest::default_instance_ = NULL; + +CollectionRequest* CollectionRequest::New() const { + return new CollectionRequest; +} + +void CollectionRequest::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + type_ = 0; + if (has_get_artists()) { + if (get_artists_ != NULL) get_artists_->::CollectionRequest_GetArtistList::Clear(); + } + if (has_get_releases()) { + if (get_releases_ != NULL) get_releases_->::CollectionRequest_GetReleaseList::Clear(); + } + if (has_get_tracks()) { + if (get_tracks_ != NULL) get_tracks_->::CollectionRequest_GetTrackList::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool CollectionRequest::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 .CollectionRequest.Type type = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::CollectionRequest_Type_IsValid(value)) { + set_type(static_cast< ::CollectionRequest_Type >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_get_artists; + break; + } + + // optional .CollectionRequest.GetArtistList get_artists = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_get_artists: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_get_artists())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_get_releases; + break; + } + + // optional .CollectionRequest.GetReleaseList get_releases = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_get_releases: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_get_releases())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_get_tracks; + break; + } + + // optional .CollectionRequest.GetTrackList get_tracks = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_get_tracks: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_get_tracks())); + } 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 CollectionRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .CollectionRequest.Type type = 1; + if (has_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->type(), output); + } + + // optional .CollectionRequest.GetArtistList get_artists = 2; + if (has_get_artists()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->get_artists(), output); + } + + // optional .CollectionRequest.GetReleaseList get_releases = 3; + if (has_get_releases()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->get_releases(), output); + } + + // optional .CollectionRequest.GetTrackList get_tracks = 4; + if (has_get_tracks()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->get_tracks(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* CollectionRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .CollectionRequest.Type type = 1; + if (has_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->type(), target); + } + + // optional .CollectionRequest.GetArtistList get_artists = 2; + if (has_get_artists()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->get_artists(), target); + } + + // optional .CollectionRequest.GetReleaseList get_releases = 3; + if (has_get_releases()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->get_releases(), target); + } + + // optional .CollectionRequest.GetTrackList get_tracks = 4; + if (has_get_tracks()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->get_tracks(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int CollectionRequest::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .CollectionRequest.Type type = 1; + if (has_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // optional .CollectionRequest.GetArtistList get_artists = 2; + if (has_get_artists()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->get_artists()); + } + + // optional .CollectionRequest.GetReleaseList get_releases = 3; + if (has_get_releases()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->get_releases()); + } + + // optional .CollectionRequest.GetTrackList get_tracks = 4; + if (has_get_tracks()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->get_tracks()); + } + + } + 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 CollectionRequest::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const CollectionRequest* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void CollectionRequest::MergeFrom(const CollectionRequest& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_type()) { + set_type(from.type()); + } + if (from.has_get_artists()) { + mutable_get_artists()->::CollectionRequest_GetArtistList::MergeFrom(from.get_artists()); + } + if (from.has_get_releases()) { + mutable_get_releases()->::CollectionRequest_GetReleaseList::MergeFrom(from.get_releases()); + } + if (from.has_get_tracks()) { + mutable_get_tracks()->::CollectionRequest_GetTrackList::MergeFrom(from.get_tracks()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void CollectionRequest::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CollectionRequest::CopyFrom(const CollectionRequest& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CollectionRequest::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void CollectionRequest::Swap(CollectionRequest* other) { + if (other != this) { + std::swap(type_, other->type_); + std::swap(get_artists_, other->get_artists_); + std::swap(get_releases_, other->get_releases_); + std::swap(get_tracks_, other->get_tracks_); + 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 CollectionRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = CollectionRequest_descriptor_; + metadata.reflection = CollectionRequest_reflection_; + return metadata; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* CollectionResponse_Type_descriptor() { + protobuf_AssignDescriptorsOnce(); + return CollectionResponse_Type_descriptor_; +} +bool CollectionResponse_Type_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const CollectionResponse_Type CollectionResponse::TypeGenreList; +const CollectionResponse_Type CollectionResponse::TypeArtistList; +const CollectionResponse_Type CollectionResponse::TypeReleaseList; +const CollectionResponse_Type CollectionResponse::TypeTrackList; +const CollectionResponse_Type CollectionResponse::Type_MIN; +const CollectionResponse_Type CollectionResponse::Type_MAX; +const int CollectionResponse::Type_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int CollectionResponse::kErrorFieldNumber; +const int CollectionResponse::kTypeFieldNumber; +const int CollectionResponse::kGenreListFieldNumber; +const int CollectionResponse::kArtistListFieldNumber; +const int CollectionResponse::kReleaseListFieldNumber; +const int CollectionResponse::kTrackListFieldNumber; +#endif // !_MSC_VER + +CollectionResponse::CollectionResponse() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void CollectionResponse::InitAsDefaultInstance() { + error_ = const_cast< ::Error*>(&::Error::default_instance()); + genre_list_ = const_cast< ::GenreList*>(&::GenreList::default_instance()); + artist_list_ = const_cast< ::ArtistList*>(&::ArtistList::default_instance()); + release_list_ = const_cast< ::ReleaseList*>(&::ReleaseList::default_instance()); + track_list_ = const_cast< ::TrackList*>(&::TrackList::default_instance()); +} + +CollectionResponse::CollectionResponse(const CollectionResponse& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void CollectionResponse::SharedCtor() { + _cached_size_ = 0; + error_ = NULL; + type_ = 1; + genre_list_ = NULL; + artist_list_ = NULL; + release_list_ = NULL; + track_list_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +CollectionResponse::~CollectionResponse() { + SharedDtor(); +} + +void CollectionResponse::SharedDtor() { + if (this != default_instance_) { + delete error_; + delete genre_list_; + delete artist_list_; + delete release_list_; + delete track_list_; + } +} + +void CollectionResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* CollectionResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return CollectionResponse_descriptor_; +} + +const CollectionResponse& CollectionResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +CollectionResponse* CollectionResponse::default_instance_ = NULL; + +CollectionResponse* CollectionResponse::New() const { + return new CollectionResponse; +} + +void CollectionResponse::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_error()) { + if (error_ != NULL) error_->::Error::Clear(); + } + type_ = 1; + if (has_genre_list()) { + if (genre_list_ != NULL) genre_list_->::GenreList::Clear(); + } + if (has_artist_list()) { + if (artist_list_ != NULL) artist_list_->::ArtistList::Clear(); + } + if (has_release_list()) { + if (release_list_ != NULL) release_list_->::ReleaseList::Clear(); + } + if (has_track_list()) { + if (track_list_ != NULL) track_list_->::TrackList::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool CollectionResponse::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 .Error error = 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; + } + + // required .CollectionResponse.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>( + input, &value))); + if (::CollectionResponse_Type_IsValid(value)) { + set_type(static_cast< ::CollectionResponse_Type >(value)); + } else { + mutable_unknown_fields()->AddVarint(2, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_genre_list; + break; + } + + // optional .GenreList genre_list = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_genre_list: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_genre_list())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_artist_list; + break; + } + + // optional .ArtistList artist_list = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_artist_list: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_artist_list())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(42)) goto parse_release_list; + break; + } + + // optional .ReleaseList release_list = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_release_list: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_release_list())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(50)) goto parse_track_list; + break; + } + + // optional .TrackList track_list = 6; + case 6: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_track_list: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_track_list())); + } 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 CollectionResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .Error error = 1; + if (has_error()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->error(), output); + } + + // required .CollectionResponse.Type type = 2; + if (has_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->type(), output); + } + + // optional .GenreList genre_list = 3; + if (has_genre_list()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->genre_list(), output); + } + + // optional .ArtistList artist_list = 4; + if (has_artist_list()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->artist_list(), output); + } + + // optional .ReleaseList release_list = 5; + if (has_release_list()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, this->release_list(), output); + } + + // optional .TrackList track_list = 6; + if (has_track_list()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, this->track_list(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* CollectionResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .Error error = 1; + if (has_error()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->error(), target); + } + + // required .CollectionResponse.Type type = 2; + if (has_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->type(), target); + } + + // optional .GenreList genre_list = 3; + if (has_genre_list()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->genre_list(), target); + } + + // optional .ArtistList artist_list = 4; + if (has_artist_list()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->artist_list(), target); + } + + // optional .ReleaseList release_list = 5; + if (has_release_list()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, this->release_list(), target); + } + + // optional .TrackList track_list = 6; + if (has_track_list()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 6, this->track_list(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int CollectionResponse::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .Error error = 1; + if (has_error()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->error()); + } + + // required .CollectionResponse.Type type = 2; + if (has_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // optional .GenreList genre_list = 3; + if (has_genre_list()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->genre_list()); + } + + // optional .ArtistList artist_list = 4; + if (has_artist_list()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->artist_list()); + } + + // optional .ReleaseList release_list = 5; + if (has_release_list()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->release_list()); + } + + // optional .TrackList track_list = 6; + if (has_track_list()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->track_list()); + } + + } + 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 CollectionResponse::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const CollectionResponse* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void CollectionResponse::MergeFrom(const CollectionResponse& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_error()) { + mutable_error()->::Error::MergeFrom(from.error()); + } + if (from.has_type()) { + set_type(from.type()); + } + if (from.has_genre_list()) { + mutable_genre_list()->::GenreList::MergeFrom(from.genre_list()); + } + if (from.has_artist_list()) { + mutable_artist_list()->::ArtistList::MergeFrom(from.artist_list()); + } + if (from.has_release_list()) { + mutable_release_list()->::ReleaseList::MergeFrom(from.release_list()); + } + if (from.has_track_list()) { + mutable_track_list()->::TrackList::MergeFrom(from.track_list()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void CollectionResponse::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CollectionResponse::CopyFrom(const CollectionResponse& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CollectionResponse::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + if (has_error()) { + if (!this->error().IsInitialized()) return false; + } + if (has_genre_list()) { + if (!this->genre_list().IsInitialized()) return false; + } + if (has_artist_list()) { + if (!this->artist_list().IsInitialized()) return false; + } + if (has_release_list()) { + if (!this->release_list().IsInitialized()) return false; + } + if (has_track_list()) { + if (!this->track_list().IsInitialized()) return false; + } + return true; +} + +void CollectionResponse::Swap(CollectionResponse* other) { + if (other != this) { + std::swap(error_, other->error_); + std::swap(type_, other->type_); + std::swap(genre_list_, other->genre_list_); + std::swap(artist_list_, other->artist_list_); + std::swap(release_list_, other->release_list_); + std::swap(track_list_, other->track_list_); + 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 CollectionResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = CollectionResponse_descriptor_; + metadata.reflection = CollectionResponse_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int GenreList::kLastFieldNumber; +const int GenreList::kGenresFieldNumber; +#endif // !_MSC_VER + +GenreList::GenreList() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void GenreList::InitAsDefaultInstance() { +} + +GenreList::GenreList(const GenreList& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void GenreList::SharedCtor() { + _cached_size_ = 0; + last_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +GenreList::~GenreList() { + SharedDtor(); +} + +void GenreList::SharedDtor() { + if (this != default_instance_) { + } +} + +void GenreList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* GenreList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return GenreList_descriptor_; +} + +const GenreList& GenreList::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +GenreList* GenreList::default_instance_ = NULL; + +GenreList* GenreList::New() const { + return new GenreList; +} + +void 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(); +} + +bool GenreList::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 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 .Genre genres = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_genres: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_genres())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_genres; + 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 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 .Genre genres = 2; + for (int i = 0; i < this->genres_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->genres(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* 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 .Genre genres = 2; + for (int i = 0; i < this->genres_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->genres(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int 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 .Genre genres = 2; + total_size += 1 * this->genres_size(); + for (int i = 0; i < this->genres_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->genres(i)); + } + + 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 GenreList::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const GenreList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void GenreList::MergeFrom(const 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()); +} + +void GenreList::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void GenreList::CopyFrom(const GenreList& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool 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; + } + return true; +} + +void GenreList::Swap(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_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata GenreList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = GenreList_descriptor_; + metadata.reflection = GenreList_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ArtistList::kLastFieldNumber; +const int ArtistList::kArtistsFieldNumber; +#endif // !_MSC_VER + +ArtistList::ArtistList() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ArtistList::InitAsDefaultInstance() { +} + +ArtistList::ArtistList(const ArtistList& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ArtistList::SharedCtor() { + _cached_size_ = 0; + last_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ArtistList::~ArtistList() { + SharedDtor(); +} + +void ArtistList::SharedDtor() { + if (this != default_instance_) { + } +} + +void ArtistList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ArtistList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ArtistList_descriptor_; +} + +const ArtistList& ArtistList::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +ArtistList* ArtistList::default_instance_ = NULL; + +ArtistList* ArtistList::New() const { + return new ArtistList; +} + +void 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(); +} + +bool ArtistList::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 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 .Artist artists = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_artists: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_artists())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_artists; + 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 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 .Artist artists = 2; + for (int i = 0; i < this->artists_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->artists(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* 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 .Artist artists = 2; + for (int i = 0; i < this->artists_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->artists(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int 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 .Artist artists = 2; + total_size += 1 * this->artists_size(); + for (int i = 0; i < this->artists_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->artists(i)); + } + + 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 ArtistList::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ArtistList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ArtistList::MergeFrom(const 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()); +} + +void ArtistList::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ArtistList::CopyFrom(const ArtistList& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool 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; + } + return true; +} + +void ArtistList::Swap(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_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ArtistList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ArtistList_descriptor_; + metadata.reflection = ArtistList_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ReleaseList::kLastFieldNumber; +const int ReleaseList::kReleasesFieldNumber; +#endif // !_MSC_VER + +ReleaseList::ReleaseList() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ReleaseList::InitAsDefaultInstance() { +} + +ReleaseList::ReleaseList(const ReleaseList& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ReleaseList::SharedCtor() { + _cached_size_ = 0; + last_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ReleaseList::~ReleaseList() { + SharedDtor(); +} + +void ReleaseList::SharedDtor() { + if (this != default_instance_) { + } +} + +void ReleaseList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ReleaseList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ReleaseList_descriptor_; +} + +const ReleaseList& ReleaseList::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +ReleaseList* ReleaseList::default_instance_ = NULL; + +ReleaseList* ReleaseList::New() const { + return new ReleaseList; +} + +void 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(); +} + +bool ReleaseList::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 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 .Release releases = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_releases: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_releases())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_releases; + 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 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 .Release releases = 2; + for (int i = 0; i < this->releases_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->releases(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* 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 .Release releases = 2; + for (int i = 0; i < this->releases_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->releases(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int 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 .Release releases = 2; + total_size += 1 * this->releases_size(); + for (int i = 0; i < this->releases_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->releases(i)); + } + + 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 ReleaseList::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ReleaseList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ReleaseList::MergeFrom(const 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()); +} + +void ReleaseList::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ReleaseList::CopyFrom(const ReleaseList& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool 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; + } + return true; +} + +void ReleaseList::Swap(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_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ReleaseList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ReleaseList_descriptor_; + metadata.reflection = ReleaseList_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int TrackList::kLastFieldNumber; +const int TrackList::kTracksFieldNumber; +#endif // !_MSC_VER + +TrackList::TrackList() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void TrackList::InitAsDefaultInstance() { +} + +TrackList::TrackList(const TrackList& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void TrackList::SharedCtor() { + _cached_size_ = 0; + last_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +TrackList::~TrackList() { + SharedDtor(); +} + +void TrackList::SharedDtor() { + if (this != default_instance_) { + } +} + +void TrackList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TrackList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return TrackList_descriptor_; +} + +const TrackList& TrackList::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +TrackList* TrackList::default_instance_ = NULL; + +TrackList* TrackList::New() const { + return new TrackList; +} + +void 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(); +} + +bool TrackList::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 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 .Track tracks = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_tracks: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_tracks())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_tracks; + 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 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 .Track tracks = 2; + for (int i = 0; i < this->tracks_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->tracks(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* 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 .Track tracks = 2; + for (int i = 0; i < this->tracks_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->tracks(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int 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 .Track tracks = 2; + total_size += 1 * this->tracks_size(); + for (int i = 0; i < this->tracks_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->tracks(i)); + } + + 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 TrackList::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const TrackList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void TrackList::MergeFrom(const 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()); +} + +void TrackList::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TrackList::CopyFrom(const TrackList& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool 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; + } + return true; +} + +void TrackList::Swap(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_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata TrackList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = TrackList_descriptor_; + metadata.reflection = TrackList_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Genre::kNameFieldNumber; +#endif // !_MSC_VER + +Genre::Genre() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Genre::InitAsDefaultInstance() { +} + +Genre::Genre(const Genre& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Genre::SharedCtor() { + _cached_size_ = 0; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Genre::~Genre() { + SharedDtor(); +} + +void Genre::SharedDtor() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (this != default_instance_) { + } +} + +void Genre::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Genre::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Genre_descriptor_; +} + +const Genre& Genre::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +Genre* Genre::default_instance_ = NULL; + +Genre* Genre::New() const { + return new Genre; +} + +void Genre::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_name()) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Genre::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 string name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } 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 Genre::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->name(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Genre::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Genre::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string name = 1; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + } + 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 Genre::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Genre* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Genre::MergeFrom(const Genre& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_name()) { + set_name(from.name()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Genre::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Genre::CopyFrom(const Genre& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Genre::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void Genre::Swap(Genre* other) { + if (other != this) { + std::swap(name_, other->name_); + 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 Genre::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Genre_descriptor_; + metadata.reflection = Genre_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int CoverArt::kMimeTypeFieldNumber; +const int CoverArt::kDataFieldNumber; +#endif // !_MSC_VER + +CoverArt::CoverArt() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void CoverArt::InitAsDefaultInstance() { +} + +CoverArt::CoverArt(const CoverArt& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void CoverArt::SharedCtor() { + _cached_size_ = 0; + mime_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +CoverArt::~CoverArt() { + SharedDtor(); +} + +void CoverArt::SharedDtor() { + if (mime_type_ != &::google::protobuf::internal::kEmptyString) { + delete mime_type_; + } + if (this != default_instance_) { + } +} + +void CoverArt::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* CoverArt::descriptor() { + protobuf_AssignDescriptorsOnce(); + return CoverArt_descriptor_; +} + +const CoverArt& CoverArt::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +CoverArt* CoverArt::default_instance_ = NULL; + +CoverArt* CoverArt::New() const { + return new CoverArt; +} + +void CoverArt::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_mime_type()) { + if (mime_type_ != &::google::protobuf::internal::kEmptyString) { + mime_type_->clear(); + } + } + } + data_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool CoverArt::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)) { + // optional string mime_type = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_mime_type())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->mime_type().data(), this->mime_type().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_data; + break; + } + + // repeated bytes data = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_data: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->add_data())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_data; + 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 CoverArt::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // optional string mime_type = 1; + if (has_mime_type()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->mime_type().data(), this->mime_type().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->mime_type(), output); + } + + // repeated bytes data = 2; + for (int i = 0; i < this->data_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 2, this->data(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* CoverArt::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // optional string mime_type = 1; + if (has_mime_type()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->mime_type().data(), this->mime_type().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->mime_type(), target); + } + + // repeated bytes data = 2; + for (int i = 0; i < this->data_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBytesToArray(2, this->data(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int CoverArt::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional string mime_type = 1; + if (has_mime_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->mime_type()); + } + + } + // repeated bytes data = 2; + total_size += 1 * this->data_size(); + for (int i = 0; i < this->data_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this->data(i)); + } + + 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 CoverArt::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const CoverArt* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void CoverArt::MergeFrom(const CoverArt& from) { + GOOGLE_CHECK_NE(&from, this); + data_.MergeFrom(from.data_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_mime_type()) { + set_mime_type(from.mime_type()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void CoverArt::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CoverArt::CopyFrom(const CoverArt& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CoverArt::IsInitialized() const { + + return true; +} + +void CoverArt::Swap(CoverArt* other) { + if (other != this) { + std::swap(mime_type_, other->mime_type_); + data_.Swap(&other->data_); + 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 CoverArt::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = CoverArt_descriptor_; + metadata.reflection = CoverArt_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Artist::kNameFieldNumber; +const int Artist::kNbReleasesFieldNumber; +#endif // !_MSC_VER + +Artist::Artist() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Artist::InitAsDefaultInstance() { +} + +Artist::Artist(const Artist& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Artist::SharedCtor() { + _cached_size_ = 0; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + nb_releases_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Artist::~Artist() { + SharedDtor(); +} + +void Artist::SharedDtor() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (this != default_instance_) { + } +} + +void Artist::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Artist::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Artist_descriptor_; +} + +const Artist& Artist::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +Artist* Artist::default_instance_ = NULL; + +Artist* Artist::New() const { + return new Artist; +} + +void Artist::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_name()) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + } + nb_releases_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Artist::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 string name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_nb_releases; + break; + } + + // required uint32 nb_releases = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_nb_releases: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &nb_releases_))); + set_has_nb_releases(); + } 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 Artist::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->name(), output); + } + + // required uint32 nb_releases = 2; + if (has_nb_releases()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->nb_releases(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Artist::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // required uint32 nb_releases = 2; + if (has_nb_releases()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->nb_releases(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Artist::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string name = 1; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // required uint32 nb_releases = 2; + if (has_nb_releases()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->nb_releases()); + } + + } + 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 Artist::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Artist* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Artist::MergeFrom(const Artist& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_name()) { + set_name(from.name()); + } + if (from.has_nb_releases()) { + set_nb_releases(from.nb_releases()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Artist::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Artist::CopyFrom(const Artist& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Artist::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void Artist::Swap(Artist* other) { + if (other != this) { + std::swap(name_, other->name_); + std::swap(nb_releases_, other->nb_releases_); + 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 Artist::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Artist_descriptor_; + metadata.reflection = Artist_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Release::kNameFieldNumber; +const int Release::kNbTracksFieldNumber; +const int Release::kDurationSecsFieldNumber; +const int Release::kCoverArtFieldNumber; +#endif // !_MSC_VER + +Release::Release() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Release::InitAsDefaultInstance() { + coverart_ = const_cast< ::CoverArt*>(&::CoverArt::default_instance()); +} + +Release::Release(const Release& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Release::SharedCtor() { + _cached_size_ = 0; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + nb_tracks_ = 0u; + duration_secs_ = 0u; + coverart_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Release::~Release() { + SharedDtor(); +} + +void Release::SharedDtor() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (this != default_instance_) { + delete coverart_; + } +} + +void Release::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Release::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Release_descriptor_; +} + +const Release& Release::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +Release* Release::default_instance_ = NULL; + +Release* Release::New() const { + return new Release; +} + +void Release::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_name()) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + } + nb_tracks_ = 0u; + duration_secs_ = 0u; + if (has_coverart()) { + if (coverart_ != NULL) coverart_->::CoverArt::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Release::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 string name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_nb_tracks; + break; + } + + // required uint32 nb_tracks = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_nb_tracks: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &nb_tracks_))); + set_has_nb_tracks(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(24)) goto parse_duration_secs; + break; + } + + // required uint32 duration_secs = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_duration_secs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &duration_secs_))); + set_has_duration_secs(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_coverArt; + break; + } + + // optional .CoverArt coverArt = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_coverArt: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_coverart())); + } 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 Release::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->name(), output); + } + + // required uint32 nb_tracks = 2; + if (has_nb_tracks()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->nb_tracks(), output); + } + + // required uint32 duration_secs = 3; + if (has_duration_secs()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->duration_secs(), output); + } + + // optional .CoverArt coverArt = 4; + if (has_coverart()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->coverart(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Release::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // required uint32 nb_tracks = 2; + if (has_nb_tracks()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->nb_tracks(), target); + } + + // required uint32 duration_secs = 3; + if (has_duration_secs()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->duration_secs(), target); + } + + // optional .CoverArt coverArt = 4; + if (has_coverart()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->coverart(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Release::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string name = 1; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // required uint32 nb_tracks = 2; + if (has_nb_tracks()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->nb_tracks()); + } + + // required uint32 duration_secs = 3; + if (has_duration_secs()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->duration_secs()); + } + + // optional .CoverArt coverArt = 4; + if (has_coverart()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->coverart()); + } + + } + 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 Release::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Release* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Release::MergeFrom(const Release& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_name()) { + set_name(from.name()); + } + if (from.has_nb_tracks()) { + set_nb_tracks(from.nb_tracks()); + } + if (from.has_duration_secs()) { + set_duration_secs(from.duration_secs()); + } + if (from.has_coverart()) { + mutable_coverart()->::CoverArt::MergeFrom(from.coverart()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Release::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Release::CopyFrom(const Release& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Release::IsInitialized() const { + if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + + return true; +} + +void Release::Swap(Release* other) { + if (other != this) { + std::swap(name_, other->name_); + std::swap(nb_tracks_, other->nb_tracks_); + std::swap(duration_secs_, other->duration_secs_); + std::swap(coverart_, other->coverart_); + 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 Release::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Release_descriptor_; + metadata.reflection = Release_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Track::kMediaIdFieldNumber; +const int Track::kDiscNumberFieldNumber; +const int Track::kTrackNumberFieldNumber; +const int Track::kArtistFieldNumber; +const int Track::kReleaseFieldNumber; +const int Track::kNameFieldNumber; +const int Track::kDurationSecsFieldNumber; +const int Track::kReleaseDateFieldNumber; +const int Track::kOriginalReleaseDateFieldNumber; +const int Track::kGenresFieldNumber; +const int Track::kCoverArtFieldNumber; +#endif // !_MSC_VER + +Track::Track() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Track::InitAsDefaultInstance() { +} + +Track::Track(const Track& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Track::SharedCtor() { + _cached_size_ = 0; + media_id_ = GOOGLE_LONGLONG(0); + disc_number_ = 0u; + track_number_ = 0u; + artist_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + release_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + duration_secs_ = 0u; + release_date_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + original_release_date_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + coverart_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Track::~Track() { + SharedDtor(); +} + +void Track::SharedDtor() { + if (artist_ != &::google::protobuf::internal::kEmptyString) { + delete artist_; + } + if (release_ != &::google::protobuf::internal::kEmptyString) { + delete release_; + } + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (release_date_ != &::google::protobuf::internal::kEmptyString) { + delete release_date_; + } + if (original_release_date_ != &::google::protobuf::internal::kEmptyString) { + delete original_release_date_; + } + if (coverart_ != &::google::protobuf::internal::kEmptyString) { + delete coverart_; + } + if (this != default_instance_) { + } +} + +void Track::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Track::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Track_descriptor_; +} + +const Track& Track::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_collection_2eproto(); + return *default_instance_; +} + +Track* Track::default_instance_ = NULL; + +Track* Track::New() const { + return new Track; +} + +void Track::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + media_id_ = GOOGLE_LONGLONG(0); + disc_number_ = 0u; + track_number_ = 0u; + if (has_artist()) { + if (artist_ != &::google::protobuf::internal::kEmptyString) { + artist_->clear(); + } + } + if (has_release()) { + if (release_ != &::google::protobuf::internal::kEmptyString) { + release_->clear(); + } + } + if (has_name()) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + } + duration_secs_ = 0u; + if (has_release_date()) { + if (release_date_ != &::google::protobuf::internal::kEmptyString) { + release_date_->clear(); + } + } + } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { + if (has_original_release_date()) { + if (original_release_date_ != &::google::protobuf::internal::kEmptyString) { + original_release_date_->clear(); + } + } + if (has_coverart()) { + if (coverart_ != &::google::protobuf::internal::kEmptyString) { + coverart_->clear(); + } + } + } + genres_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Track::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 int64 media_id = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &media_id_))); + set_has_media_id(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_disc_number; + break; + } + + // optional uint32 disc_number = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_disc_number: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &disc_number_))); + set_has_disc_number(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(24)) goto parse_track_number; + break; + } + + // optional uint32 track_number = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_track_number: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &track_number_))); + set_has_track_number(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_artist; + break; + } + + // optional string artist = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_artist: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_artist())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->artist().data(), this->artist().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(42)) goto parse_release; + break; + } + + // optional string release = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_release: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_release())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->release().data(), this->release().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(50)) goto parse_name; + break; + } + + // required string name = 6; + case 6: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(56)) goto parse_duration_secs; + break; + } + + // required uint32 duration_secs = 7; + case 7: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_duration_secs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &duration_secs_))); + set_has_duration_secs(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(66)) goto parse_release_date; + break; + } + + // optional string release_date = 8; + case 8: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_release_date: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_release_date())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->release_date().data(), this->release_date().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(74)) goto parse_original_release_date; + break; + } + + // optional string original_release_date = 9; + case 9: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_original_release_date: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_original_release_date())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->original_release_date().data(), this->original_release_date().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(82)) goto parse_genres; + break; + } + + // repeated string genres = 10; + case 10: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_genres: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_genres())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->genres(this->genres_size() - 1).data(), + this->genres(this->genres_size() - 1).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(82)) goto parse_genres; + if (input->ExpectTag(90)) goto parse_coverArt; + break; + } + + // optional bytes coverArt = 11; + case 11: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_coverArt: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_coverart())); + } 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 Track::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required int64 media_id = 1; + if (has_media_id()) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->media_id(), output); + } + + // optional uint32 disc_number = 2; + if (has_disc_number()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->disc_number(), output); + } + + // optional uint32 track_number = 3; + if (has_track_number()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->track_number(), output); + } + + // optional string artist = 4; + if (has_artist()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->artist().data(), this->artist().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 4, this->artist(), output); + } + + // optional string release = 5; + if (has_release()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->release().data(), this->release().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 5, this->release(), output); + } + + // required string name = 6; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 6, this->name(), output); + } + + // required uint32 duration_secs = 7; + if (has_duration_secs()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->duration_secs(), output); + } + + // optional string release_date = 8; + if (has_release_date()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->release_date().data(), this->release_date().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 8, this->release_date(), output); + } + + // optional string original_release_date = 9; + if (has_original_release_date()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->original_release_date().data(), this->original_release_date().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 9, this->original_release_date(), output); + } + + // repeated string genres = 10; + for (int i = 0; i < this->genres_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->genres(i).data(), this->genres(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 10, this->genres(i), output); + } + + // optional bytes coverArt = 11; + if (has_coverart()) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 11, this->coverart(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Track::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required int64 media_id = 1; + if (has_media_id()) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->media_id(), target); + } + + // optional uint32 disc_number = 2; + if (has_disc_number()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->disc_number(), target); + } + + // optional uint32 track_number = 3; + if (has_track_number()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->track_number(), target); + } + + // optional string artist = 4; + if (has_artist()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->artist().data(), this->artist().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->artist(), target); + } + + // optional string release = 5; + if (has_release()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->release().data(), this->release().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->release(), target); + } + + // required string name = 6; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->name(), target); + } + + // required uint32 duration_secs = 7; + if (has_duration_secs()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->duration_secs(), target); + } + + // optional string release_date = 8; + if (has_release_date()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->release_date().data(), this->release_date().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 8, this->release_date(), target); + } + + // optional string original_release_date = 9; + if (has_original_release_date()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->original_release_date().data(), this->original_release_date().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 9, this->original_release_date(), target); + } + + // repeated string genres = 10; + for (int i = 0; i < this->genres_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->genres(i).data(), this->genres(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(10, this->genres(i), target); + } + + // optional bytes coverArt = 11; + if (has_coverart()) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 11, this->coverart(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Track::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required int64 media_id = 1; + if (has_media_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->media_id()); + } + + // optional uint32 disc_number = 2; + if (has_disc_number()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->disc_number()); + } + + // optional uint32 track_number = 3; + if (has_track_number()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->track_number()); + } + + // optional string artist = 4; + if (has_artist()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->artist()); + } + + // optional string release = 5; + if (has_release()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->release()); + } + + // required string name = 6; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // required uint32 duration_secs = 7; + if (has_duration_secs()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->duration_secs()); + } + + // optional string release_date = 8; + if (has_release_date()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->release_date()); + } + + } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { + // optional string original_release_date = 9; + if (has_original_release_date()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->original_release_date()); + } + + // optional bytes coverArt = 11; + if (has_coverart()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->coverart()); + } + + } + // repeated string genres = 10; + total_size += 1 * this->genres_size(); + for (int i = 0; i < this->genres_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->genres(i)); + } + + 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 Track::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Track* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Track::MergeFrom(const Track& from) { + GOOGLE_CHECK_NE(&from, this); + genres_.MergeFrom(from.genres_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_media_id()) { + set_media_id(from.media_id()); + } + if (from.has_disc_number()) { + set_disc_number(from.disc_number()); + } + if (from.has_track_number()) { + set_track_number(from.track_number()); + } + if (from.has_artist()) { + set_artist(from.artist()); + } + if (from.has_release()) { + set_release(from.release()); + } + if (from.has_name()) { + set_name(from.name()); + } + if (from.has_duration_secs()) { + set_duration_secs(from.duration_secs()); + } + if (from.has_release_date()) { + set_release_date(from.release_date()); + } + } + if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { + if (from.has_original_release_date()) { + set_original_release_date(from.original_release_date()); + } + if (from.has_coverart()) { + set_coverart(from.coverart()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Track::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Track::CopyFrom(const Track& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Track::IsInitialized() const { + if ((_has_bits_[0] & 0x00000061) != 0x00000061) return false; + + return true; +} + +void Track::Swap(Track* other) { + if (other != this) { + std::swap(media_id_, other->media_id_); + std::swap(disc_number_, other->disc_number_); + std::swap(track_number_, other->track_number_); + std::swap(artist_, other->artist_); + std::swap(release_, other->release_); + std::swap(name_, other->name_); + std::swap(duration_secs_, other->duration_secs_); + std::swap(release_date_, other->release_date_); + std::swap(original_release_date_, other->original_release_date_); + genres_.Swap(&other->genres_); + std::swap(coverart_, other->coverart_); + 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 Track::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Track_descriptor_; + metadata.reflection = Track_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +// @@protoc_insertion_point(global_scope) diff --git a/remote/proto/collection.pb.h b/remote/proto/collection.pb.h new file mode 100644 index 00000000..09b3eff2 --- /dev/null +++ b/remote/proto/collection.pb.h @@ -0,0 +1,4268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: collection.proto + +#ifndef PROTOBUF_collection_2eproto__INCLUDED +#define PROTOBUF_collection_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2005000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include "common.pb.h" +// @@protoc_insertion_point(includes) + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_collection_2eproto(); +void protobuf_AssignDesc_collection_2eproto(); +void protobuf_ShutdownFile_collection_2eproto(); + +class CollectionRequest; +class CollectionRequest_GetGenreList; +class CollectionRequest_GetArtistList; +class CollectionRequest_GetReleaseList; +class CollectionRequest_GetTrackList; +class CollectionResponse; +class GenreList; +class ArtistList; +class ReleaseList; +class TrackList; +class Genre; +class CoverArt; +class Artist; +class Release; +class Track; + +enum CollectionRequest_Type { + CollectionRequest_Type_TypeGetArtistList = 0, + CollectionRequest_Type_TypeGetReleaseList = 1, + CollectionRequest_Type_TypeGetTrackList = 2 +}; +bool CollectionRequest_Type_IsValid(int value); +const CollectionRequest_Type CollectionRequest_Type_Type_MIN = CollectionRequest_Type_TypeGetArtistList; +const CollectionRequest_Type CollectionRequest_Type_Type_MAX = CollectionRequest_Type_TypeGetTrackList; +const int CollectionRequest_Type_Type_ARRAYSIZE = CollectionRequest_Type_Type_MAX + 1; + +const ::google::protobuf::EnumDescriptor* CollectionRequest_Type_descriptor(); +inline const ::std::string& CollectionRequest_Type_Name(CollectionRequest_Type value) { + return ::google::protobuf::internal::NameOfEnum( + CollectionRequest_Type_descriptor(), value); +} +inline bool CollectionRequest_Type_Parse( + const ::std::string& name, CollectionRequest_Type* value) { + return ::google::protobuf::internal::ParseNamedEnum( + CollectionRequest_Type_descriptor(), name, value); +} +enum CollectionResponse_Type { + CollectionResponse_Type_TypeGenreList = 1, + CollectionResponse_Type_TypeArtistList = 2, + CollectionResponse_Type_TypeReleaseList = 3, + CollectionResponse_Type_TypeTrackList = 4 +}; +bool CollectionResponse_Type_IsValid(int value); +const CollectionResponse_Type CollectionResponse_Type_Type_MIN = CollectionResponse_Type_TypeGenreList; +const CollectionResponse_Type CollectionResponse_Type_Type_MAX = CollectionResponse_Type_TypeTrackList; +const int CollectionResponse_Type_Type_ARRAYSIZE = CollectionResponse_Type_Type_MAX + 1; + +const ::google::protobuf::EnumDescriptor* CollectionResponse_Type_descriptor(); +inline const ::std::string& CollectionResponse_Type_Name(CollectionResponse_Type value) { + return ::google::protobuf::internal::NameOfEnum( + CollectionResponse_Type_descriptor(), value); +} +inline bool CollectionResponse_Type_Parse( + const ::std::string& name, CollectionResponse_Type* value) { + return ::google::protobuf::internal::ParseNamedEnum( + CollectionResponse_Type_descriptor(), name, value); +} +// =================================================================== + +class CollectionRequest_GetGenreList : public ::google::protobuf::Message { + public: + CollectionRequest_GetGenreList(); + virtual ~CollectionRequest_GetGenreList(); + + CollectionRequest_GetGenreList(const CollectionRequest_GetGenreList& from); + + inline CollectionRequest_GetGenreList& operator=(const CollectionRequest_GetGenreList& 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 CollectionRequest_GetGenreList& default_instance(); + + void Swap(CollectionRequest_GetGenreList* other); + + // implements Message ---------------------------------------------- + + CollectionRequest_GetGenreList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const CollectionRequest_GetGenreList& from); + void MergeFrom(const CollectionRequest_GetGenreList& 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 ------------------------------------------------------- + + // optional string filter_name = 1; + inline bool has_filter_name() const; + inline void clear_filter_name(); + static const int kFilterNameFieldNumber = 1; + inline const ::std::string& filter_name() const; + inline void set_filter_name(const ::std::string& value); + inline void set_filter_name(const char* value); + inline void set_filter_name(const char* value, size_t size); + inline ::std::string* mutable_filter_name(); + inline ::std::string* release_filter_name(); + inline void set_allocated_filter_name(::std::string* filter_name); + + // optional uint32 preferred_batch_size = 2; + inline bool has_preferred_batch_size() const; + inline void clear_preferred_batch_size(); + static const int kPreferredBatchSizeFieldNumber = 2; + inline ::google::protobuf::uint32 preferred_batch_size() const; + inline void set_preferred_batch_size(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:CollectionRequest.GetGenreList) + 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(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* filter_name_; + ::google::protobuf::uint32 preferred_batch_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 CollectionRequest_GetGenreList* default_instance_; +}; +// ------------------------------------------------------------------- + +class CollectionRequest_GetArtistList : public ::google::protobuf::Message { + public: + CollectionRequest_GetArtistList(); + virtual ~CollectionRequest_GetArtistList(); + + CollectionRequest_GetArtistList(const CollectionRequest_GetArtistList& from); + + inline CollectionRequest_GetArtistList& operator=(const CollectionRequest_GetArtistList& 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 CollectionRequest_GetArtistList& default_instance(); + + void Swap(CollectionRequest_GetArtistList* other); + + // implements Message ---------------------------------------------- + + CollectionRequest_GetArtistList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const CollectionRequest_GetArtistList& from); + void MergeFrom(const CollectionRequest_GetArtistList& 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 ------------------------------------------------------- + + // optional string filter_name = 1; + inline bool has_filter_name() const; + inline void clear_filter_name(); + static const int kFilterNameFieldNumber = 1; + inline const ::std::string& filter_name() const; + inline void set_filter_name(const ::std::string& value); + inline void set_filter_name(const char* value); + inline void set_filter_name(const char* value, size_t size); + inline ::std::string* mutable_filter_name(); + inline ::std::string* release_filter_name(); + inline void set_allocated_filter_name(::std::string* filter_name); + + // repeated string filter_genre = 2; + inline int filter_genre_size() const; + inline void clear_filter_genre(); + static const int kFilterGenreFieldNumber = 2; + inline const ::std::string& filter_genre(int index) const; + inline ::std::string* mutable_filter_genre(int index); + inline void set_filter_genre(int index, const ::std::string& value); + inline void set_filter_genre(int index, const char* value); + inline void set_filter_genre(int index, const char* value, size_t size); + inline ::std::string* add_filter_genre(); + inline void add_filter_genre(const ::std::string& value); + inline void add_filter_genre(const char* value); + inline void add_filter_genre(const char* value, size_t size); + 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); + + // @@protoc_insertion_point(class_scope:CollectionRequest.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(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* filter_name_; + ::google::protobuf::RepeatedPtrField< ::std::string> filter_genre_; + ::google::protobuf::uint32 preferred_batch_size_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + + friend void protobuf_AddDesc_collection_2eproto(); + friend void protobuf_AssignDesc_collection_2eproto(); + friend void protobuf_ShutdownFile_collection_2eproto(); + + void InitAsDefaultInstance(); + static CollectionRequest_GetArtistList* default_instance_; +}; +// ------------------------------------------------------------------- + +class CollectionRequest_GetReleaseList : public ::google::protobuf::Message { + public: + CollectionRequest_GetReleaseList(); + virtual ~CollectionRequest_GetReleaseList(); + + CollectionRequest_GetReleaseList(const CollectionRequest_GetReleaseList& from); + + inline CollectionRequest_GetReleaseList& operator=(const CollectionRequest_GetReleaseList& 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 CollectionRequest_GetReleaseList& default_instance(); + + void Swap(CollectionRequest_GetReleaseList* other); + + // implements Message ---------------------------------------------- + + CollectionRequest_GetReleaseList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const CollectionRequest_GetReleaseList& from); + void MergeFrom(const CollectionRequest_GetReleaseList& 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 ------------------------------------------------------- + + // optional string filter_name = 1; + inline bool has_filter_name() const; + inline void clear_filter_name(); + static const int kFilterNameFieldNumber = 1; + inline const ::std::string& filter_name() const; + inline void set_filter_name(const ::std::string& value); + inline void set_filter_name(const char* value); + inline void set_filter_name(const char* value, size_t size); + inline ::std::string* mutable_filter_name(); + inline ::std::string* release_filter_name(); + inline void set_allocated_filter_name(::std::string* filter_name); + + // repeated string artist_name = 2; + inline int artist_name_size() const; + inline void clear_artist_name(); + static const int kArtistNameFieldNumber = 2; + inline const ::std::string& artist_name(int index) const; + inline ::std::string* mutable_artist_name(int index); + inline void set_artist_name(int index, const ::std::string& value); + inline void set_artist_name(int index, const char* value); + inline void set_artist_name(int index, const char* value, size_t size); + inline ::std::string* add_artist_name(); + inline void add_artist_name(const ::std::string& value); + inline void add_artist_name(const char* value); + inline void add_artist_name(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& artist_name() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_artist_name(); + + // repeated string filter_genre = 3; + inline int filter_genre_size() const; + inline void clear_filter_genre(); + static const int kFilterGenreFieldNumber = 3; + inline const ::std::string& filter_genre(int index) const; + inline ::std::string* mutable_filter_genre(int index); + inline void set_filter_genre(int index, const ::std::string& value); + inline void set_filter_genre(int index, const char* value); + inline void set_filter_genre(int index, const char* value, size_t size); + inline ::std::string* add_filter_genre(); + inline void add_filter_genre(const ::std::string& value); + inline void add_filter_genre(const char* value); + inline void add_filter_genre(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& filter_genre() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_filter_genre(); + + // optional bool get_cover = 4; + inline bool has_get_cover() const; + inline void clear_get_cover(); + static const int kGetCoverFieldNumber = 4; + 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); + + // @@protoc_insertion_point(class_scope:CollectionRequest.GetReleaseList) + private: + inline void set_has_filter_name(); + inline void clear_has_filter_name(); + inline void set_has_get_cover(); + inline void clear_has_get_cover(); + inline void set_has_preferred_batch_size(); + inline void clear_has_preferred_batch_size(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* filter_name_; + ::google::protobuf::RepeatedPtrField< ::std::string> artist_name_; + ::google::protobuf::RepeatedPtrField< ::std::string> filter_genre_; + bool get_cover_; + ::google::protobuf::uint32 preferred_batch_size_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32]; + + friend void protobuf_AddDesc_collection_2eproto(); + friend void protobuf_AssignDesc_collection_2eproto(); + friend void protobuf_ShutdownFile_collection_2eproto(); + + void InitAsDefaultInstance(); + static CollectionRequest_GetReleaseList* default_instance_; +}; +// ------------------------------------------------------------------- + +class CollectionRequest_GetTrackList : public ::google::protobuf::Message { + public: + CollectionRequest_GetTrackList(); + virtual ~CollectionRequest_GetTrackList(); + + CollectionRequest_GetTrackList(const CollectionRequest_GetTrackList& from); + + inline CollectionRequest_GetTrackList& operator=(const CollectionRequest_GetTrackList& 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 CollectionRequest_GetTrackList& default_instance(); + + void Swap(CollectionRequest_GetTrackList* other); + + // implements Message ---------------------------------------------- + + CollectionRequest_GetTrackList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const CollectionRequest_GetTrackList& from); + void MergeFrom(const CollectionRequest_GetTrackList& 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 ------------------------------------------------------- + + // optional string filter_name = 1; + inline bool has_filter_name() const; + inline void clear_filter_name(); + static const int kFilterNameFieldNumber = 1; + inline const ::std::string& filter_name() const; + inline void set_filter_name(const ::std::string& value); + inline void set_filter_name(const char* value); + inline void set_filter_name(const char* value, size_t size); + inline ::std::string* mutable_filter_name(); + inline ::std::string* release_filter_name(); + inline void set_allocated_filter_name(::std::string* filter_name); + + // repeated string release_name = 2; + inline int release_name_size() const; + inline void clear_release_name(); + static const int kReleaseNameFieldNumber = 2; + inline const ::std::string& release_name(int index) const; + inline ::std::string* mutable_release_name(int index); + inline void set_release_name(int index, const ::std::string& value); + inline void set_release_name(int index, const char* value); + inline void set_release_name(int index, const char* value, size_t size); + inline ::std::string* add_release_name(); + inline void add_release_name(const ::std::string& value); + inline void add_release_name(const char* value); + inline void add_release_name(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& release_name() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_release_name(); + + // repeated string artist_name = 3; + inline int artist_name_size() const; + inline void clear_artist_name(); + static const int kArtistNameFieldNumber = 3; + inline const ::std::string& artist_name(int index) const; + inline ::std::string* mutable_artist_name(int index); + inline void set_artist_name(int index, const ::std::string& value); + inline void set_artist_name(int index, const char* value); + inline void set_artist_name(int index, const char* value, size_t size); + inline ::std::string* add_artist_name(); + inline void add_artist_name(const ::std::string& value); + inline void add_artist_name(const char* value); + inline void add_artist_name(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& artist_name() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_artist_name(); + + // repeated string filter_genre = 4; + inline int filter_genre_size() const; + inline void clear_filter_genre(); + static const int kFilterGenreFieldNumber = 4; + inline const ::std::string& filter_genre(int index) const; + inline ::std::string* mutable_filter_genre(int index); + inline void set_filter_genre(int index, const ::std::string& value); + inline void set_filter_genre(int index, const char* value); + inline void set_filter_genre(int index, const char* value, size_t size); + inline ::std::string* add_filter_genre(); + inline void add_filter_genre(const ::std::string& value); + inline void add_filter_genre(const char* value); + inline void add_filter_genre(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& filter_genre() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_filter_genre(); + + // optional uint32 disc_number = 5; + inline bool has_disc_number() const; + inline void clear_disc_number(); + static const int kDiscNumberFieldNumber = 5; + inline ::google::protobuf::uint32 disc_number() const; + inline void set_disc_number(::google::protobuf::uint32 value); + + // optional uint32 track_number = 6; + inline bool has_track_number() const; + inline void clear_track_number(); + static const int kTrackNumberFieldNumber = 6; + inline ::google::protobuf::uint32 track_number() const; + inline void set_track_number(::google::protobuf::uint32 value); + + // optional bool get_cover = 7; + inline bool has_get_cover() const; + inline void clear_get_cover(); + static const int kGetCoverFieldNumber = 7; + 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); + + // @@protoc_insertion_point(class_scope:CollectionRequest.GetTrackList) + private: + inline void set_has_filter_name(); + inline void clear_has_filter_name(); + inline void set_has_disc_number(); + inline void clear_has_disc_number(); + inline void set_has_track_number(); + 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(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* filter_name_; + ::google::protobuf::RepeatedPtrField< ::std::string> release_name_; + ::google::protobuf::RepeatedPtrField< ::std::string> artist_name_; + ::google::protobuf::RepeatedPtrField< ::std::string> filter_genre_; + ::google::protobuf::uint32 disc_number_; + ::google::protobuf::uint32 track_number_; + bool get_cover_; + ::google::protobuf::uint32 preferred_batch_size_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; + + friend void protobuf_AddDesc_collection_2eproto(); + friend void protobuf_AssignDesc_collection_2eproto(); + friend void protobuf_ShutdownFile_collection_2eproto(); + + void InitAsDefaultInstance(); + static CollectionRequest_GetTrackList* default_instance_; +}; +// ------------------------------------------------------------------- + +class CollectionRequest : public ::google::protobuf::Message { + public: + CollectionRequest(); + virtual ~CollectionRequest(); + + CollectionRequest(const CollectionRequest& from); + + inline CollectionRequest& operator=(const CollectionRequest& 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 CollectionRequest& default_instance(); + + void Swap(CollectionRequest* other); + + // implements Message ---------------------------------------------- + + CollectionRequest* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const CollectionRequest& from); + void MergeFrom(const CollectionRequest& 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 ---------------------------------------------------- + + typedef CollectionRequest_GetGenreList GetGenreList; + typedef CollectionRequest_GetArtistList GetArtistList; + typedef CollectionRequest_GetReleaseList GetReleaseList; + typedef CollectionRequest_GetTrackList GetTrackList; + + typedef CollectionRequest_Type Type; + static const Type TypeGetArtistList = CollectionRequest_Type_TypeGetArtistList; + static const Type TypeGetReleaseList = CollectionRequest_Type_TypeGetReleaseList; + static const Type TypeGetTrackList = CollectionRequest_Type_TypeGetTrackList; + static inline bool Type_IsValid(int value) { + return CollectionRequest_Type_IsValid(value); + } + static const Type Type_MIN = + CollectionRequest_Type_Type_MIN; + static const Type Type_MAX = + CollectionRequest_Type_Type_MAX; + static const int Type_ARRAYSIZE = + CollectionRequest_Type_Type_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + Type_descriptor() { + return CollectionRequest_Type_descriptor(); + } + static inline const ::std::string& Type_Name(Type value) { + return CollectionRequest_Type_Name(value); + } + static inline bool Type_Parse(const ::std::string& name, + Type* value) { + return CollectionRequest_Type_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .CollectionRequest.Type type = 1; + inline bool has_type() const; + inline void clear_type(); + static const int kTypeFieldNumber = 1; + inline ::CollectionRequest_Type type() const; + inline void set_type(::CollectionRequest_Type value); + + // optional .CollectionRequest.GetArtistList get_artists = 2; + inline bool has_get_artists() const; + inline void clear_get_artists(); + static const int kGetArtistsFieldNumber = 2; + inline const ::CollectionRequest_GetArtistList& get_artists() const; + inline ::CollectionRequest_GetArtistList* mutable_get_artists(); + inline ::CollectionRequest_GetArtistList* release_get_artists(); + inline void set_allocated_get_artists(::CollectionRequest_GetArtistList* get_artists); + + // optional .CollectionRequest.GetReleaseList get_releases = 3; + inline bool has_get_releases() const; + inline void clear_get_releases(); + static const int kGetReleasesFieldNumber = 3; + inline const ::CollectionRequest_GetReleaseList& get_releases() const; + inline ::CollectionRequest_GetReleaseList* mutable_get_releases(); + inline ::CollectionRequest_GetReleaseList* release_get_releases(); + inline void set_allocated_get_releases(::CollectionRequest_GetReleaseList* get_releases); + + // optional .CollectionRequest.GetTrackList get_tracks = 4; + inline bool has_get_tracks() const; + inline void clear_get_tracks(); + static const int kGetTracksFieldNumber = 4; + inline const ::CollectionRequest_GetTrackList& get_tracks() const; + inline ::CollectionRequest_GetTrackList* mutable_get_tracks(); + inline ::CollectionRequest_GetTrackList* release_get_tracks(); + inline void set_allocated_get_tracks(::CollectionRequest_GetTrackList* get_tracks); + + // @@protoc_insertion_point(class_scope:CollectionRequest) + private: + inline void set_has_type(); + inline void clear_has_type(); + inline void set_has_get_artists(); + inline void clear_has_get_artists(); + inline void set_has_get_releases(); + inline void clear_has_get_releases(); + inline void set_has_get_tracks(); + inline void clear_has_get_tracks(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::CollectionRequest_GetArtistList* get_artists_; + ::CollectionRequest_GetReleaseList* get_releases_; + ::CollectionRequest_GetTrackList* get_tracks_; + int type_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_collection_2eproto(); + friend void protobuf_AssignDesc_collection_2eproto(); + friend void protobuf_ShutdownFile_collection_2eproto(); + + void InitAsDefaultInstance(); + static CollectionRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class CollectionResponse : public ::google::protobuf::Message { + public: + CollectionResponse(); + virtual ~CollectionResponse(); + + CollectionResponse(const CollectionResponse& from); + + inline CollectionResponse& operator=(const CollectionResponse& 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 CollectionResponse& default_instance(); + + void Swap(CollectionResponse* other); + + // implements Message ---------------------------------------------- + + CollectionResponse* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const CollectionResponse& from); + void MergeFrom(const CollectionResponse& 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 ---------------------------------------------------- + + typedef CollectionResponse_Type Type; + static const Type TypeGenreList = CollectionResponse_Type_TypeGenreList; + static const Type TypeArtistList = CollectionResponse_Type_TypeArtistList; + static const Type TypeReleaseList = CollectionResponse_Type_TypeReleaseList; + static const Type TypeTrackList = CollectionResponse_Type_TypeTrackList; + static inline bool Type_IsValid(int value) { + return CollectionResponse_Type_IsValid(value); + } + static const Type Type_MIN = + CollectionResponse_Type_Type_MIN; + static const Type Type_MAX = + CollectionResponse_Type_Type_MAX; + static const int Type_ARRAYSIZE = + CollectionResponse_Type_Type_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + Type_descriptor() { + return CollectionResponse_Type_descriptor(); + } + static inline const ::std::string& Type_Name(Type value) { + return CollectionResponse_Type_Name(value); + } + static inline bool Type_Parse(const ::std::string& name, + Type* value) { + return CollectionResponse_Type_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .Error error = 1; + inline bool has_error() const; + inline void clear_error(); + static const int kErrorFieldNumber = 1; + inline const ::Error& error() const; + inline ::Error* mutable_error(); + inline ::Error* release_error(); + inline void set_allocated_error(::Error* error); + + // required .CollectionResponse.Type type = 2; + inline bool has_type() const; + inline void clear_type(); + static const int kTypeFieldNumber = 2; + inline ::CollectionResponse_Type type() const; + inline void set_type(::CollectionResponse_Type value); + + // optional .GenreList genre_list = 3; + inline bool has_genre_list() const; + inline void clear_genre_list(); + static const int kGenreListFieldNumber = 3; + inline const ::GenreList& genre_list() const; + inline ::GenreList* mutable_genre_list(); + inline ::GenreList* release_genre_list(); + inline void set_allocated_genre_list(::GenreList* genre_list); + + // optional .ArtistList artist_list = 4; + inline bool has_artist_list() const; + inline void clear_artist_list(); + static const int kArtistListFieldNumber = 4; + inline const ::ArtistList& artist_list() const; + inline ::ArtistList* mutable_artist_list(); + inline ::ArtistList* release_artist_list(); + inline void set_allocated_artist_list(::ArtistList* artist_list); + + // optional .ReleaseList release_list = 5; + inline bool has_release_list() const; + inline void clear_release_list(); + static const int kReleaseListFieldNumber = 5; + inline const ::ReleaseList& release_list() const; + inline ::ReleaseList* mutable_release_list(); + inline ::ReleaseList* release_release_list(); + inline void set_allocated_release_list(::ReleaseList* release_list); + + // optional .TrackList track_list = 6; + inline bool has_track_list() const; + inline void clear_track_list(); + static const int kTrackListFieldNumber = 6; + inline const ::TrackList& track_list() const; + inline ::TrackList* mutable_track_list(); + inline ::TrackList* release_track_list(); + inline void set_allocated_track_list(::TrackList* track_list); + + // @@protoc_insertion_point(class_scope:CollectionResponse) + 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_genre_list(); + inline void clear_has_genre_list(); + inline void set_has_artist_list(); + inline void clear_has_artist_list(); + inline void set_has_release_list(); + inline void clear_has_release_list(); + inline void set_has_track_list(); + inline void clear_has_track_list(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::Error* error_; + ::GenreList* genre_list_; + ::ArtistList* artist_list_; + ::ReleaseList* release_list_; + ::TrackList* track_list_; + int type_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32]; + + friend void protobuf_AddDesc_collection_2eproto(); + friend void protobuf_AssignDesc_collection_2eproto(); + friend void protobuf_ShutdownFile_collection_2eproto(); + + void InitAsDefaultInstance(); + static CollectionResponse* default_instance_; +}; +// ------------------------------------------------------------------- + +class GenreList : public ::google::protobuf::Message { + public: + GenreList(); + virtual ~GenreList(); + + GenreList(const GenreList& from); + + inline GenreList& operator=(const GenreList& 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 GenreList& default_instance(); + + void Swap(GenreList* other); + + // implements Message ---------------------------------------------- + + GenreList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const GenreList& from); + void MergeFrom(const GenreList& 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 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 .Genre genres = 2; + inline int genres_size() const; + inline void clear_genres(); + static const int kGenresFieldNumber = 2; + inline const ::Genre& genres(int index) const; + inline ::Genre* mutable_genres(int index); + inline ::Genre* add_genres(); + inline const ::google::protobuf::RepeatedPtrField< ::Genre >& + genres() const; + inline ::google::protobuf::RepeatedPtrField< ::Genre >* + mutable_genres(); + + // @@protoc_insertion_point(class_scope:GenreList) + private: + inline void set_has_last(); + inline void clear_has_last(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::RepeatedPtrField< ::Genre > genres_; + bool last_; + + 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 GenreList* default_instance_; +}; +// ------------------------------------------------------------------- + +class ArtistList : public ::google::protobuf::Message { + public: + ArtistList(); + virtual ~ArtistList(); + + ArtistList(const ArtistList& from); + + inline ArtistList& operator=(const ArtistList& 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 ArtistList& default_instance(); + + void Swap(ArtistList* other); + + // implements Message ---------------------------------------------- + + ArtistList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ArtistList& from); + void MergeFrom(const ArtistList& 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 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 .Artist artists = 2; + inline int artists_size() const; + inline void clear_artists(); + static const int kArtistsFieldNumber = 2; + inline const ::Artist& artists(int index) const; + inline ::Artist* mutable_artists(int index); + inline ::Artist* add_artists(); + inline const ::google::protobuf::RepeatedPtrField< ::Artist >& + artists() const; + inline ::google::protobuf::RepeatedPtrField< ::Artist >* + mutable_artists(); + + // @@protoc_insertion_point(class_scope:ArtistList) + private: + inline void set_has_last(); + inline void clear_has_last(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::RepeatedPtrField< ::Artist > artists_; + bool last_; + + 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 ArtistList* default_instance_; +}; +// ------------------------------------------------------------------- + +class ReleaseList : public ::google::protobuf::Message { + public: + ReleaseList(); + virtual ~ReleaseList(); + + ReleaseList(const ReleaseList& from); + + inline ReleaseList& operator=(const ReleaseList& 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 ReleaseList& default_instance(); + + void Swap(ReleaseList* other); + + // implements Message ---------------------------------------------- + + ReleaseList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ReleaseList& from); + void MergeFrom(const ReleaseList& 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 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 .Release releases = 2; + inline int releases_size() const; + inline void clear_releases(); + static const int kReleasesFieldNumber = 2; + inline const ::Release& releases(int index) const; + inline ::Release* mutable_releases(int index); + inline ::Release* add_releases(); + inline const ::google::protobuf::RepeatedPtrField< ::Release >& + releases() const; + inline ::google::protobuf::RepeatedPtrField< ::Release >* + mutable_releases(); + + // @@protoc_insertion_point(class_scope:ReleaseList) + private: + inline void set_has_last(); + inline void clear_has_last(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::RepeatedPtrField< ::Release > releases_; + bool last_; + + 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 ReleaseList* default_instance_; +}; +// ------------------------------------------------------------------- + +class TrackList : public ::google::protobuf::Message { + public: + TrackList(); + virtual ~TrackList(); + + TrackList(const TrackList& from); + + inline TrackList& operator=(const TrackList& 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 TrackList& default_instance(); + + void Swap(TrackList* other); + + // implements Message ---------------------------------------------- + + TrackList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const TrackList& from); + void MergeFrom(const TrackList& 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 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 .Track tracks = 2; + inline int tracks_size() const; + inline void clear_tracks(); + static const int kTracksFieldNumber = 2; + inline const ::Track& tracks(int index) const; + inline ::Track* mutable_tracks(int index); + inline ::Track* add_tracks(); + inline const ::google::protobuf::RepeatedPtrField< ::Track >& + tracks() const; + inline ::google::protobuf::RepeatedPtrField< ::Track >* + mutable_tracks(); + + // @@protoc_insertion_point(class_scope:TrackList) + private: + inline void set_has_last(); + inline void clear_has_last(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::RepeatedPtrField< ::Track > tracks_; + bool last_; + + 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 TrackList* default_instance_; +}; +// ------------------------------------------------------------------- + +class Genre : public ::google::protobuf::Message { + public: + Genre(); + virtual ~Genre(); + + Genre(const Genre& from); + + inline Genre& operator=(const Genre& 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 Genre& default_instance(); + + void Swap(Genre* other); + + // implements Message ---------------------------------------------- + + Genre* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Genre& from); + void MergeFrom(const Genre& 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 string name = 1; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 1; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // @@protoc_insertion_point(class_scope:Genre) + private: + inline void set_has_name(); + inline void clear_has_name(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* name_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_collection_2eproto(); + friend void protobuf_AssignDesc_collection_2eproto(); + friend void protobuf_ShutdownFile_collection_2eproto(); + + void InitAsDefaultInstance(); + static Genre* default_instance_; +}; +// ------------------------------------------------------------------- + +class CoverArt : public ::google::protobuf::Message { + public: + CoverArt(); + virtual ~CoverArt(); + + CoverArt(const CoverArt& from); + + inline CoverArt& operator=(const CoverArt& 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 CoverArt& default_instance(); + + void Swap(CoverArt* other); + + // implements Message ---------------------------------------------- + + CoverArt* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const CoverArt& from); + void MergeFrom(const CoverArt& 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 ------------------------------------------------------- + + // optional string mime_type = 1; + inline bool has_mime_type() const; + inline void clear_mime_type(); + static const int kMimeTypeFieldNumber = 1; + inline const ::std::string& mime_type() const; + inline void set_mime_type(const ::std::string& value); + inline void set_mime_type(const char* value); + inline void set_mime_type(const char* value, size_t size); + inline ::std::string* mutable_mime_type(); + inline ::std::string* release_mime_type(); + inline void set_allocated_mime_type(::std::string* mime_type); + + // repeated bytes data = 2; + inline int data_size() const; + inline void clear_data(); + static const int kDataFieldNumber = 2; + inline const ::std::string& data(int index) const; + inline ::std::string* mutable_data(int index); + inline void set_data(int index, const ::std::string& value); + inline void set_data(int index, const char* value); + inline void set_data(int index, const void* value, size_t size); + inline ::std::string* add_data(); + inline void add_data(const ::std::string& value); + inline void add_data(const char* value); + inline void add_data(const void* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& data() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_data(); + + // @@protoc_insertion_point(class_scope:CoverArt) + private: + inline void set_has_mime_type(); + inline void clear_has_mime_type(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* mime_type_; + ::google::protobuf::RepeatedPtrField< ::std::string> data_; + + 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 CoverArt* default_instance_; +}; +// ------------------------------------------------------------------- + +class Artist : public ::google::protobuf::Message { + public: + Artist(); + virtual ~Artist(); + + Artist(const Artist& from); + + inline Artist& operator=(const Artist& 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 Artist& default_instance(); + + void Swap(Artist* other); + + // implements Message ---------------------------------------------- + + Artist* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Artist& from); + void MergeFrom(const Artist& 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 string name = 1; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 1; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // required uint32 nb_releases = 2; + inline bool has_nb_releases() const; + inline void clear_nb_releases(); + static const int kNbReleasesFieldNumber = 2; + inline ::google::protobuf::uint32 nb_releases() const; + inline void set_nb_releases(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:Artist) + private: + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_nb_releases(); + inline void clear_has_nb_releases(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* name_; + ::google::protobuf::uint32 nb_releases_; + + 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 Artist* default_instance_; +}; +// ------------------------------------------------------------------- + +class Release : public ::google::protobuf::Message { + public: + Release(); + virtual ~Release(); + + Release(const Release& from); + + inline Release& operator=(const Release& 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 Release& default_instance(); + + void Swap(Release* other); + + // implements Message ---------------------------------------------- + + Release* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Release& from); + void MergeFrom(const Release& 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 string name = 1; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 1; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // required uint32 nb_tracks = 2; + inline bool has_nb_tracks() const; + inline void clear_nb_tracks(); + static const int kNbTracksFieldNumber = 2; + inline ::google::protobuf::uint32 nb_tracks() const; + inline void set_nb_tracks(::google::protobuf::uint32 value); + + // required uint32 duration_secs = 3; + inline bool has_duration_secs() const; + inline void clear_duration_secs(); + static const int kDurationSecsFieldNumber = 3; + inline ::google::protobuf::uint32 duration_secs() const; + inline void set_duration_secs(::google::protobuf::uint32 value); + + // optional .CoverArt coverArt = 4; + inline bool has_coverart() const; + inline void clear_coverart(); + static const int kCoverArtFieldNumber = 4; + inline const ::CoverArt& coverart() const; + inline ::CoverArt* mutable_coverart(); + inline ::CoverArt* release_coverart(); + inline void set_allocated_coverart(::CoverArt* coverart); + + // @@protoc_insertion_point(class_scope:Release) + private: + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_nb_tracks(); + inline void clear_has_nb_tracks(); + inline void set_has_duration_secs(); + inline void clear_has_duration_secs(); + inline void set_has_coverart(); + inline void clear_has_coverart(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* name_; + ::google::protobuf::uint32 nb_tracks_; + ::google::protobuf::uint32 duration_secs_; + ::CoverArt* coverart_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_collection_2eproto(); + friend void protobuf_AssignDesc_collection_2eproto(); + friend void protobuf_ShutdownFile_collection_2eproto(); + + void InitAsDefaultInstance(); + static Release* default_instance_; +}; +// ------------------------------------------------------------------- + +class Track : public ::google::protobuf::Message { + public: + Track(); + virtual ~Track(); + + Track(const Track& from); + + inline Track& operator=(const Track& 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 Track& default_instance(); + + void Swap(Track* other); + + // implements Message ---------------------------------------------- + + Track* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Track& from); + void MergeFrom(const Track& 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 int64 media_id = 1; + inline bool has_media_id() const; + inline void clear_media_id(); + static const int kMediaIdFieldNumber = 1; + inline ::google::protobuf::int64 media_id() const; + inline void set_media_id(::google::protobuf::int64 value); + + // optional uint32 disc_number = 2; + inline bool has_disc_number() const; + inline void clear_disc_number(); + static const int kDiscNumberFieldNumber = 2; + inline ::google::protobuf::uint32 disc_number() const; + inline void set_disc_number(::google::protobuf::uint32 value); + + // optional uint32 track_number = 3; + inline bool has_track_number() const; + inline void clear_track_number(); + static const int kTrackNumberFieldNumber = 3; + inline ::google::protobuf::uint32 track_number() const; + inline void set_track_number(::google::protobuf::uint32 value); + + // optional string artist = 4; + inline bool has_artist() const; + inline void clear_artist(); + static const int kArtistFieldNumber = 4; + inline const ::std::string& artist() const; + inline void set_artist(const ::std::string& value); + inline void set_artist(const char* value); + inline void set_artist(const char* value, size_t size); + inline ::std::string* mutable_artist(); + inline ::std::string* release_artist(); + inline void set_allocated_artist(::std::string* artist); + + // optional string release = 5; + inline bool has_release() const; + inline void clear_release(); + static const int kReleaseFieldNumber = 5; + inline const ::std::string& release() const; + inline void set_release(const ::std::string& value); + inline void set_release(const char* value); + inline void set_release(const char* value, size_t size); + inline ::std::string* mutable_release(); + inline ::std::string* release_release(); + inline void set_allocated_release(::std::string* release); + + // required string name = 6; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 6; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // required uint32 duration_secs = 7; + inline bool has_duration_secs() const; + inline void clear_duration_secs(); + static const int kDurationSecsFieldNumber = 7; + inline ::google::protobuf::uint32 duration_secs() const; + inline void set_duration_secs(::google::protobuf::uint32 value); + + // optional string release_date = 8; + inline bool has_release_date() const; + inline void clear_release_date(); + static const int kReleaseDateFieldNumber = 8; + inline const ::std::string& release_date() const; + inline void set_release_date(const ::std::string& value); + inline void set_release_date(const char* value); + inline void set_release_date(const char* value, size_t size); + inline ::std::string* mutable_release_date(); + inline ::std::string* release_release_date(); + inline void set_allocated_release_date(::std::string* release_date); + + // optional string original_release_date = 9; + inline bool has_original_release_date() const; + inline void clear_original_release_date(); + static const int kOriginalReleaseDateFieldNumber = 9; + inline const ::std::string& original_release_date() const; + inline void set_original_release_date(const ::std::string& value); + inline void set_original_release_date(const char* value); + inline void set_original_release_date(const char* value, size_t size); + inline ::std::string* mutable_original_release_date(); + inline ::std::string* release_original_release_date(); + inline void set_allocated_original_release_date(::std::string* original_release_date); + + // repeated string genres = 10; + inline int genres_size() const; + inline void clear_genres(); + static const int kGenresFieldNumber = 10; + inline const ::std::string& genres(int index) const; + inline ::std::string* mutable_genres(int index); + inline void set_genres(int index, const ::std::string& value); + inline void set_genres(int index, const char* value); + inline void set_genres(int index, const char* value, size_t size); + inline ::std::string* add_genres(); + inline void add_genres(const ::std::string& value); + inline void add_genres(const char* value); + inline void add_genres(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& genres() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_genres(); + + // optional bytes coverArt = 11; + inline bool has_coverart() const; + inline void clear_coverart(); + static const int kCoverArtFieldNumber = 11; + inline const ::std::string& coverart() const; + inline void set_coverart(const ::std::string& value); + inline void set_coverart(const char* value); + inline void set_coverart(const void* value, size_t size); + inline ::std::string* mutable_coverart(); + inline ::std::string* release_coverart(); + inline void set_allocated_coverart(::std::string* coverart); + + // @@protoc_insertion_point(class_scope:Track) + private: + inline void set_has_media_id(); + inline void clear_has_media_id(); + inline void set_has_disc_number(); + inline void clear_has_disc_number(); + inline void set_has_track_number(); + inline void clear_has_track_number(); + inline void set_has_artist(); + inline void clear_has_artist(); + inline void set_has_release(); + inline void clear_has_release(); + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_duration_secs(); + inline void clear_has_duration_secs(); + inline void set_has_release_date(); + inline void clear_has_release_date(); + inline void set_has_original_release_date(); + inline void clear_has_original_release_date(); + inline void set_has_coverart(); + inline void clear_has_coverart(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::int64 media_id_; + ::google::protobuf::uint32 disc_number_; + ::google::protobuf::uint32 track_number_; + ::std::string* artist_; + ::std::string* release_; + ::std::string* name_; + ::std::string* release_date_; + ::std::string* original_release_date_; + ::google::protobuf::RepeatedPtrField< ::std::string> genres_; + ::std::string* coverart_; + ::google::protobuf::uint32 duration_secs_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(11 + 31) / 32]; + + friend void protobuf_AddDesc_collection_2eproto(); + friend void protobuf_AssignDesc_collection_2eproto(); + friend void protobuf_ShutdownFile_collection_2eproto(); + + void InitAsDefaultInstance(); + static Track* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// CollectionRequest_GetGenreList + +// optional string filter_name = 1; +inline bool CollectionRequest_GetGenreList::has_filter_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void CollectionRequest_GetGenreList::set_has_filter_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void CollectionRequest_GetGenreList::clear_has_filter_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void CollectionRequest_GetGenreList::clear_filter_name() { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + filter_name_->clear(); + } + clear_has_filter_name(); +} +inline const ::std::string& CollectionRequest_GetGenreList::filter_name() const { + return *filter_name_; +} +inline void CollectionRequest_GetGenreList::set_filter_name(const ::std::string& value) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(value); +} +inline void CollectionRequest_GetGenreList::set_filter_name(const char* value) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(value); +} +inline void CollectionRequest_GetGenreList::set_filter_name(const char* value, size_t size) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetGenreList::mutable_filter_name() { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + return filter_name_; +} +inline ::std::string* CollectionRequest_GetGenreList::release_filter_name() { + clear_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = filter_name_; + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void CollectionRequest_GetGenreList::set_allocated_filter_name(::std::string* filter_name) { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + delete filter_name_; + } + if (filter_name) { + set_has_filter_name(); + filter_name_ = filter_name; + } else { + clear_has_filter_name(); + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// optional uint32 preferred_batch_size = 2; +inline bool CollectionRequest_GetGenreList::has_preferred_batch_size() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void CollectionRequest_GetGenreList::set_has_preferred_batch_size() { + _has_bits_[0] |= 0x00000002u; +} +inline void CollectionRequest_GetGenreList::clear_has_preferred_batch_size() { + _has_bits_[0] &= ~0x00000002u; +} +inline void CollectionRequest_GetGenreList::clear_preferred_batch_size() { + preferred_batch_size_ = 0u; + clear_has_preferred_batch_size(); +} +inline ::google::protobuf::uint32 CollectionRequest_GetGenreList::preferred_batch_size() const { + return preferred_batch_size_; +} +inline void CollectionRequest_GetGenreList::set_preferred_batch_size(::google::protobuf::uint32 value) { + set_has_preferred_batch_size(); + preferred_batch_size_ = value; +} + +// ------------------------------------------------------------------- + +// CollectionRequest_GetArtistList + +// optional string filter_name = 1; +inline bool CollectionRequest_GetArtistList::has_filter_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void CollectionRequest_GetArtistList::set_has_filter_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void CollectionRequest_GetArtistList::clear_has_filter_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void CollectionRequest_GetArtistList::clear_filter_name() { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + filter_name_->clear(); + } + clear_has_filter_name(); +} +inline const ::std::string& CollectionRequest_GetArtistList::filter_name() const { + return *filter_name_; +} +inline void CollectionRequest_GetArtistList::set_filter_name(const ::std::string& value) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(value); +} +inline void CollectionRequest_GetArtistList::set_filter_name(const char* value) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(value); +} +inline void CollectionRequest_GetArtistList::set_filter_name(const char* value, size_t size) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetArtistList::mutable_filter_name() { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + return filter_name_; +} +inline ::std::string* CollectionRequest_GetArtistList::release_filter_name() { + clear_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = filter_name_; + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void CollectionRequest_GetArtistList::set_allocated_filter_name(::std::string* filter_name) { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + delete filter_name_; + } + if (filter_name) { + set_has_filter_name(); + filter_name_ = filter_name; + } else { + clear_has_filter_name(); + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// repeated string filter_genre = 2; +inline int CollectionRequest_GetArtistList::filter_genre_size() const { + return filter_genre_.size(); +} +inline void CollectionRequest_GetArtistList::clear_filter_genre() { + filter_genre_.Clear(); +} +inline const ::std::string& CollectionRequest_GetArtistList::filter_genre(int index) const { + return filter_genre_.Get(index); +} +inline ::std::string* CollectionRequest_GetArtistList::mutable_filter_genre(int index) { + return filter_genre_.Mutable(index); +} +inline void CollectionRequest_GetArtistList::set_filter_genre(int index, const ::std::string& value) { + filter_genre_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetArtistList::set_filter_genre(int index, const char* value) { + filter_genre_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetArtistList::set_filter_genre(int index, const char* value, size_t size) { + filter_genre_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetArtistList::add_filter_genre() { + return filter_genre_.Add(); +} +inline void CollectionRequest_GetArtistList::add_filter_genre(const ::std::string& value) { + filter_genre_.Add()->assign(value); +} +inline void CollectionRequest_GetArtistList::add_filter_genre(const char* value) { + filter_genre_.Add()->assign(value); +} +inline void CollectionRequest_GetArtistList::add_filter_genre(const char* value, size_t size) { + filter_genre_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +CollectionRequest_GetArtistList::filter_genre() const { + return filter_genre_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +CollectionRequest_GetArtistList::mutable_filter_genre() { + return &filter_genre_; +} + +// optional uint32 preferred_batch_size = 3; +inline bool CollectionRequest_GetArtistList::has_preferred_batch_size() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void CollectionRequest_GetArtistList::set_has_preferred_batch_size() { + _has_bits_[0] |= 0x00000004u; +} +inline void CollectionRequest_GetArtistList::clear_has_preferred_batch_size() { + _has_bits_[0] &= ~0x00000004u; +} +inline void CollectionRequest_GetArtistList::clear_preferred_batch_size() { + preferred_batch_size_ = 0u; + clear_has_preferred_batch_size(); +} +inline ::google::protobuf::uint32 CollectionRequest_GetArtistList::preferred_batch_size() const { + return preferred_batch_size_; +} +inline void CollectionRequest_GetArtistList::set_preferred_batch_size(::google::protobuf::uint32 value) { + set_has_preferred_batch_size(); + preferred_batch_size_ = value; +} + +// ------------------------------------------------------------------- + +// CollectionRequest_GetReleaseList + +// optional string filter_name = 1; +inline bool CollectionRequest_GetReleaseList::has_filter_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void CollectionRequest_GetReleaseList::set_has_filter_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void CollectionRequest_GetReleaseList::clear_has_filter_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void CollectionRequest_GetReleaseList::clear_filter_name() { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + filter_name_->clear(); + } + clear_has_filter_name(); +} +inline const ::std::string& CollectionRequest_GetReleaseList::filter_name() const { + return *filter_name_; +} +inline void CollectionRequest_GetReleaseList::set_filter_name(const ::std::string& value) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(value); +} +inline void CollectionRequest_GetReleaseList::set_filter_name(const char* value) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(value); +} +inline void CollectionRequest_GetReleaseList::set_filter_name(const char* value, size_t size) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetReleaseList::mutable_filter_name() { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + return filter_name_; +} +inline ::std::string* CollectionRequest_GetReleaseList::release_filter_name() { + clear_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = filter_name_; + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void CollectionRequest_GetReleaseList::set_allocated_filter_name(::std::string* filter_name) { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + delete filter_name_; + } + if (filter_name) { + set_has_filter_name(); + filter_name_ = filter_name; + } else { + clear_has_filter_name(); + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// repeated string artist_name = 2; +inline int CollectionRequest_GetReleaseList::artist_name_size() const { + return artist_name_.size(); +} +inline void CollectionRequest_GetReleaseList::clear_artist_name() { + artist_name_.Clear(); +} +inline const ::std::string& CollectionRequest_GetReleaseList::artist_name(int index) const { + return artist_name_.Get(index); +} +inline ::std::string* CollectionRequest_GetReleaseList::mutable_artist_name(int index) { + return artist_name_.Mutable(index); +} +inline void CollectionRequest_GetReleaseList::set_artist_name(int index, const ::std::string& value) { + artist_name_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetReleaseList::set_artist_name(int index, const char* value) { + artist_name_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetReleaseList::set_artist_name(int index, const char* value, size_t size) { + artist_name_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetReleaseList::add_artist_name() { + return artist_name_.Add(); +} +inline void CollectionRequest_GetReleaseList::add_artist_name(const ::std::string& value) { + artist_name_.Add()->assign(value); +} +inline void CollectionRequest_GetReleaseList::add_artist_name(const char* value) { + artist_name_.Add()->assign(value); +} +inline void CollectionRequest_GetReleaseList::add_artist_name(const char* value, size_t size) { + artist_name_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +CollectionRequest_GetReleaseList::artist_name() const { + return artist_name_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +CollectionRequest_GetReleaseList::mutable_artist_name() { + return &artist_name_; +} + +// repeated string filter_genre = 3; +inline int CollectionRequest_GetReleaseList::filter_genre_size() const { + return filter_genre_.size(); +} +inline void CollectionRequest_GetReleaseList::clear_filter_genre() { + filter_genre_.Clear(); +} +inline const ::std::string& CollectionRequest_GetReleaseList::filter_genre(int index) const { + return filter_genre_.Get(index); +} +inline ::std::string* CollectionRequest_GetReleaseList::mutable_filter_genre(int index) { + return filter_genre_.Mutable(index); +} +inline void CollectionRequest_GetReleaseList::set_filter_genre(int index, const ::std::string& value) { + filter_genre_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetReleaseList::set_filter_genre(int index, const char* value) { + filter_genre_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetReleaseList::set_filter_genre(int index, const char* value, size_t size) { + filter_genre_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetReleaseList::add_filter_genre() { + return filter_genre_.Add(); +} +inline void CollectionRequest_GetReleaseList::add_filter_genre(const ::std::string& value) { + filter_genre_.Add()->assign(value); +} +inline void CollectionRequest_GetReleaseList::add_filter_genre(const char* value) { + filter_genre_.Add()->assign(value); +} +inline void CollectionRequest_GetReleaseList::add_filter_genre(const char* value, size_t size) { + filter_genre_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +CollectionRequest_GetReleaseList::filter_genre() const { + return filter_genre_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +CollectionRequest_GetReleaseList::mutable_filter_genre() { + return &filter_genre_; +} + +// optional bool get_cover = 4; +inline bool CollectionRequest_GetReleaseList::has_get_cover() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void CollectionRequest_GetReleaseList::set_has_get_cover() { + _has_bits_[0] |= 0x00000008u; +} +inline void CollectionRequest_GetReleaseList::clear_has_get_cover() { + _has_bits_[0] &= ~0x00000008u; +} +inline void CollectionRequest_GetReleaseList::clear_get_cover() { + get_cover_ = false; + clear_has_get_cover(); +} +inline bool CollectionRequest_GetReleaseList::get_cover() const { + return get_cover_; +} +inline void CollectionRequest_GetReleaseList::set_get_cover(bool value) { + set_has_get_cover(); + get_cover_ = value; +} + +// optional uint32 preferred_batch_size = 5; +inline bool CollectionRequest_GetReleaseList::has_preferred_batch_size() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void CollectionRequest_GetReleaseList::set_has_preferred_batch_size() { + _has_bits_[0] |= 0x00000010u; +} +inline void CollectionRequest_GetReleaseList::clear_has_preferred_batch_size() { + _has_bits_[0] &= ~0x00000010u; +} +inline void CollectionRequest_GetReleaseList::clear_preferred_batch_size() { + preferred_batch_size_ = 0u; + clear_has_preferred_batch_size(); +} +inline ::google::protobuf::uint32 CollectionRequest_GetReleaseList::preferred_batch_size() const { + return preferred_batch_size_; +} +inline void CollectionRequest_GetReleaseList::set_preferred_batch_size(::google::protobuf::uint32 value) { + set_has_preferred_batch_size(); + preferred_batch_size_ = value; +} + +// ------------------------------------------------------------------- + +// CollectionRequest_GetTrackList + +// optional string filter_name = 1; +inline bool CollectionRequest_GetTrackList::has_filter_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void CollectionRequest_GetTrackList::set_has_filter_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void CollectionRequest_GetTrackList::clear_has_filter_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void CollectionRequest_GetTrackList::clear_filter_name() { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + filter_name_->clear(); + } + clear_has_filter_name(); +} +inline const ::std::string& CollectionRequest_GetTrackList::filter_name() const { + return *filter_name_; +} +inline void CollectionRequest_GetTrackList::set_filter_name(const ::std::string& value) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(value); +} +inline void CollectionRequest_GetTrackList::set_filter_name(const char* value) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(value); +} +inline void CollectionRequest_GetTrackList::set_filter_name(const char* value, size_t size) { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + filter_name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetTrackList::mutable_filter_name() { + set_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + filter_name_ = new ::std::string; + } + return filter_name_; +} +inline ::std::string* CollectionRequest_GetTrackList::release_filter_name() { + clear_has_filter_name(); + if (filter_name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = filter_name_; + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void CollectionRequest_GetTrackList::set_allocated_filter_name(::std::string* filter_name) { + if (filter_name_ != &::google::protobuf::internal::kEmptyString) { + delete filter_name_; + } + if (filter_name) { + set_has_filter_name(); + filter_name_ = filter_name; + } else { + clear_has_filter_name(); + filter_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// repeated string release_name = 2; +inline int CollectionRequest_GetTrackList::release_name_size() const { + return release_name_.size(); +} +inline void CollectionRequest_GetTrackList::clear_release_name() { + release_name_.Clear(); +} +inline const ::std::string& CollectionRequest_GetTrackList::release_name(int index) const { + return release_name_.Get(index); +} +inline ::std::string* CollectionRequest_GetTrackList::mutable_release_name(int index) { + return release_name_.Mutable(index); +} +inline void CollectionRequest_GetTrackList::set_release_name(int index, const ::std::string& value) { + release_name_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetTrackList::set_release_name(int index, const char* value) { + release_name_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetTrackList::set_release_name(int index, const char* value, size_t size) { + release_name_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetTrackList::add_release_name() { + return release_name_.Add(); +} +inline void CollectionRequest_GetTrackList::add_release_name(const ::std::string& value) { + release_name_.Add()->assign(value); +} +inline void CollectionRequest_GetTrackList::add_release_name(const char* value) { + release_name_.Add()->assign(value); +} +inline void CollectionRequest_GetTrackList::add_release_name(const char* value, size_t size) { + release_name_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +CollectionRequest_GetTrackList::release_name() const { + return release_name_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +CollectionRequest_GetTrackList::mutable_release_name() { + return &release_name_; +} + +// repeated string artist_name = 3; +inline int CollectionRequest_GetTrackList::artist_name_size() const { + return artist_name_.size(); +} +inline void CollectionRequest_GetTrackList::clear_artist_name() { + artist_name_.Clear(); +} +inline const ::std::string& CollectionRequest_GetTrackList::artist_name(int index) const { + return artist_name_.Get(index); +} +inline ::std::string* CollectionRequest_GetTrackList::mutable_artist_name(int index) { + return artist_name_.Mutable(index); +} +inline void CollectionRequest_GetTrackList::set_artist_name(int index, const ::std::string& value) { + artist_name_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetTrackList::set_artist_name(int index, const char* value) { + artist_name_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetTrackList::set_artist_name(int index, const char* value, size_t size) { + artist_name_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetTrackList::add_artist_name() { + return artist_name_.Add(); +} +inline void CollectionRequest_GetTrackList::add_artist_name(const ::std::string& value) { + artist_name_.Add()->assign(value); +} +inline void CollectionRequest_GetTrackList::add_artist_name(const char* value) { + artist_name_.Add()->assign(value); +} +inline void CollectionRequest_GetTrackList::add_artist_name(const char* value, size_t size) { + artist_name_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +CollectionRequest_GetTrackList::artist_name() const { + return artist_name_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +CollectionRequest_GetTrackList::mutable_artist_name() { + return &artist_name_; +} + +// repeated string filter_genre = 4; +inline int CollectionRequest_GetTrackList::filter_genre_size() const { + return filter_genre_.size(); +} +inline void CollectionRequest_GetTrackList::clear_filter_genre() { + filter_genre_.Clear(); +} +inline const ::std::string& CollectionRequest_GetTrackList::filter_genre(int index) const { + return filter_genre_.Get(index); +} +inline ::std::string* CollectionRequest_GetTrackList::mutable_filter_genre(int index) { + return filter_genre_.Mutable(index); +} +inline void CollectionRequest_GetTrackList::set_filter_genre(int index, const ::std::string& value) { + filter_genre_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetTrackList::set_filter_genre(int index, const char* value) { + filter_genre_.Mutable(index)->assign(value); +} +inline void CollectionRequest_GetTrackList::set_filter_genre(int index, const char* value, size_t size) { + filter_genre_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* CollectionRequest_GetTrackList::add_filter_genre() { + return filter_genre_.Add(); +} +inline void CollectionRequest_GetTrackList::add_filter_genre(const ::std::string& value) { + filter_genre_.Add()->assign(value); +} +inline void CollectionRequest_GetTrackList::add_filter_genre(const char* value) { + filter_genre_.Add()->assign(value); +} +inline void CollectionRequest_GetTrackList::add_filter_genre(const char* value, size_t size) { + filter_genre_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +CollectionRequest_GetTrackList::filter_genre() const { + return filter_genre_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +CollectionRequest_GetTrackList::mutable_filter_genre() { + return &filter_genre_; +} + +// optional uint32 disc_number = 5; +inline bool CollectionRequest_GetTrackList::has_disc_number() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void CollectionRequest_GetTrackList::set_has_disc_number() { + _has_bits_[0] |= 0x00000010u; +} +inline void CollectionRequest_GetTrackList::clear_has_disc_number() { + _has_bits_[0] &= ~0x00000010u; +} +inline void CollectionRequest_GetTrackList::clear_disc_number() { + disc_number_ = 0u; + clear_has_disc_number(); +} +inline ::google::protobuf::uint32 CollectionRequest_GetTrackList::disc_number() const { + return disc_number_; +} +inline void CollectionRequest_GetTrackList::set_disc_number(::google::protobuf::uint32 value) { + set_has_disc_number(); + disc_number_ = value; +} + +// optional uint32 track_number = 6; +inline bool CollectionRequest_GetTrackList::has_track_number() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void CollectionRequest_GetTrackList::set_has_track_number() { + _has_bits_[0] |= 0x00000020u; +} +inline void CollectionRequest_GetTrackList::clear_has_track_number() { + _has_bits_[0] &= ~0x00000020u; +} +inline void CollectionRequest_GetTrackList::clear_track_number() { + track_number_ = 0u; + clear_has_track_number(); +} +inline ::google::protobuf::uint32 CollectionRequest_GetTrackList::track_number() const { + return track_number_; +} +inline void CollectionRequest_GetTrackList::set_track_number(::google::protobuf::uint32 value) { + set_has_track_number(); + track_number_ = value; +} + +// optional bool get_cover = 7; +inline bool CollectionRequest_GetTrackList::has_get_cover() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +inline void CollectionRequest_GetTrackList::set_has_get_cover() { + _has_bits_[0] |= 0x00000040u; +} +inline void CollectionRequest_GetTrackList::clear_has_get_cover() { + _has_bits_[0] &= ~0x00000040u; +} +inline void CollectionRequest_GetTrackList::clear_get_cover() { + get_cover_ = false; + clear_has_get_cover(); +} +inline bool CollectionRequest_GetTrackList::get_cover() const { + return get_cover_; +} +inline void CollectionRequest_GetTrackList::set_get_cover(bool value) { + set_has_get_cover(); + get_cover_ = value; +} + +// optional uint32 preferred_batch_size = 8; +inline bool CollectionRequest_GetTrackList::has_preferred_batch_size() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +inline void CollectionRequest_GetTrackList::set_has_preferred_batch_size() { + _has_bits_[0] |= 0x00000080u; +} +inline void CollectionRequest_GetTrackList::clear_has_preferred_batch_size() { + _has_bits_[0] &= ~0x00000080u; +} +inline void CollectionRequest_GetTrackList::clear_preferred_batch_size() { + preferred_batch_size_ = 0u; + clear_has_preferred_batch_size(); +} +inline ::google::protobuf::uint32 CollectionRequest_GetTrackList::preferred_batch_size() const { + return preferred_batch_size_; +} +inline void CollectionRequest_GetTrackList::set_preferred_batch_size(::google::protobuf::uint32 value) { + set_has_preferred_batch_size(); + preferred_batch_size_ = value; +} + +// ------------------------------------------------------------------- + +// CollectionRequest + +// required .CollectionRequest.Type type = 1; +inline bool CollectionRequest::has_type() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void CollectionRequest::set_has_type() { + _has_bits_[0] |= 0x00000001u; +} +inline void CollectionRequest::clear_has_type() { + _has_bits_[0] &= ~0x00000001u; +} +inline void CollectionRequest::clear_type() { + type_ = 0; + clear_has_type(); +} +inline ::CollectionRequest_Type CollectionRequest::type() const { + return static_cast< ::CollectionRequest_Type >(type_); +} +inline void CollectionRequest::set_type(::CollectionRequest_Type value) { + assert(::CollectionRequest_Type_IsValid(value)); + set_has_type(); + type_ = value; +} + +// optional .CollectionRequest.GetArtistList get_artists = 2; +inline bool CollectionRequest::has_get_artists() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void CollectionRequest::set_has_get_artists() { + _has_bits_[0] |= 0x00000002u; +} +inline void CollectionRequest::clear_has_get_artists() { + _has_bits_[0] &= ~0x00000002u; +} +inline void CollectionRequest::clear_get_artists() { + if (get_artists_ != NULL) get_artists_->::CollectionRequest_GetArtistList::Clear(); + clear_has_get_artists(); +} +inline const ::CollectionRequest_GetArtistList& CollectionRequest::get_artists() const { + return get_artists_ != NULL ? *get_artists_ : *default_instance_->get_artists_; +} +inline ::CollectionRequest_GetArtistList* CollectionRequest::mutable_get_artists() { + set_has_get_artists(); + if (get_artists_ == NULL) get_artists_ = new ::CollectionRequest_GetArtistList; + return get_artists_; +} +inline ::CollectionRequest_GetArtistList* CollectionRequest::release_get_artists() { + clear_has_get_artists(); + ::CollectionRequest_GetArtistList* temp = get_artists_; + get_artists_ = NULL; + return temp; +} +inline void CollectionRequest::set_allocated_get_artists(::CollectionRequest_GetArtistList* get_artists) { + delete get_artists_; + get_artists_ = get_artists; + if (get_artists) { + set_has_get_artists(); + } else { + clear_has_get_artists(); + } +} + +// optional .CollectionRequest.GetReleaseList get_releases = 3; +inline bool CollectionRequest::has_get_releases() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void CollectionRequest::set_has_get_releases() { + _has_bits_[0] |= 0x00000004u; +} +inline void CollectionRequest::clear_has_get_releases() { + _has_bits_[0] &= ~0x00000004u; +} +inline void CollectionRequest::clear_get_releases() { + if (get_releases_ != NULL) get_releases_->::CollectionRequest_GetReleaseList::Clear(); + clear_has_get_releases(); +} +inline const ::CollectionRequest_GetReleaseList& CollectionRequest::get_releases() const { + return get_releases_ != NULL ? *get_releases_ : *default_instance_->get_releases_; +} +inline ::CollectionRequest_GetReleaseList* CollectionRequest::mutable_get_releases() { + set_has_get_releases(); + if (get_releases_ == NULL) get_releases_ = new ::CollectionRequest_GetReleaseList; + return get_releases_; +} +inline ::CollectionRequest_GetReleaseList* CollectionRequest::release_get_releases() { + clear_has_get_releases(); + ::CollectionRequest_GetReleaseList* temp = get_releases_; + get_releases_ = NULL; + return temp; +} +inline void CollectionRequest::set_allocated_get_releases(::CollectionRequest_GetReleaseList* get_releases) { + delete get_releases_; + get_releases_ = get_releases; + if (get_releases) { + set_has_get_releases(); + } else { + clear_has_get_releases(); + } +} + +// optional .CollectionRequest.GetTrackList get_tracks = 4; +inline bool CollectionRequest::has_get_tracks() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void CollectionRequest::set_has_get_tracks() { + _has_bits_[0] |= 0x00000008u; +} +inline void CollectionRequest::clear_has_get_tracks() { + _has_bits_[0] &= ~0x00000008u; +} +inline void CollectionRequest::clear_get_tracks() { + if (get_tracks_ != NULL) get_tracks_->::CollectionRequest_GetTrackList::Clear(); + clear_has_get_tracks(); +} +inline const ::CollectionRequest_GetTrackList& CollectionRequest::get_tracks() const { + return get_tracks_ != NULL ? *get_tracks_ : *default_instance_->get_tracks_; +} +inline ::CollectionRequest_GetTrackList* CollectionRequest::mutable_get_tracks() { + set_has_get_tracks(); + if (get_tracks_ == NULL) get_tracks_ = new ::CollectionRequest_GetTrackList; + return get_tracks_; +} +inline ::CollectionRequest_GetTrackList* CollectionRequest::release_get_tracks() { + clear_has_get_tracks(); + ::CollectionRequest_GetTrackList* temp = get_tracks_; + get_tracks_ = NULL; + return temp; +} +inline void CollectionRequest::set_allocated_get_tracks(::CollectionRequest_GetTrackList* get_tracks) { + delete get_tracks_; + get_tracks_ = get_tracks; + if (get_tracks) { + set_has_get_tracks(); + } else { + clear_has_get_tracks(); + } +} + +// ------------------------------------------------------------------- + +// CollectionResponse + +// required .Error error = 1; +inline bool CollectionResponse::has_error() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void CollectionResponse::set_has_error() { + _has_bits_[0] |= 0x00000001u; +} +inline void CollectionResponse::clear_has_error() { + _has_bits_[0] &= ~0x00000001u; +} +inline void CollectionResponse::clear_error() { + if (error_ != NULL) error_->::Error::Clear(); + clear_has_error(); +} +inline const ::Error& CollectionResponse::error() const { + return error_ != NULL ? *error_ : *default_instance_->error_; +} +inline ::Error* CollectionResponse::mutable_error() { + set_has_error(); + if (error_ == NULL) error_ = new ::Error; + return error_; +} +inline ::Error* CollectionResponse::release_error() { + clear_has_error(); + ::Error* temp = error_; + error_ = NULL; + return temp; +} +inline void CollectionResponse::set_allocated_error(::Error* error) { + delete error_; + error_ = error; + if (error) { + set_has_error(); + } else { + clear_has_error(); + } +} + +// required .CollectionResponse.Type type = 2; +inline bool CollectionResponse::has_type() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void CollectionResponse::set_has_type() { + _has_bits_[0] |= 0x00000002u; +} +inline void CollectionResponse::clear_has_type() { + _has_bits_[0] &= ~0x00000002u; +} +inline void CollectionResponse::clear_type() { + type_ = 1; + clear_has_type(); +} +inline ::CollectionResponse_Type CollectionResponse::type() const { + return static_cast< ::CollectionResponse_Type >(type_); +} +inline void CollectionResponse::set_type(::CollectionResponse_Type value) { + assert(::CollectionResponse_Type_IsValid(value)); + set_has_type(); + type_ = value; +} + +// optional .GenreList genre_list = 3; +inline bool CollectionResponse::has_genre_list() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void CollectionResponse::set_has_genre_list() { + _has_bits_[0] |= 0x00000004u; +} +inline void CollectionResponse::clear_has_genre_list() { + _has_bits_[0] &= ~0x00000004u; +} +inline void CollectionResponse::clear_genre_list() { + if (genre_list_ != NULL) genre_list_->::GenreList::Clear(); + clear_has_genre_list(); +} +inline const ::GenreList& CollectionResponse::genre_list() const { + return genre_list_ != NULL ? *genre_list_ : *default_instance_->genre_list_; +} +inline ::GenreList* CollectionResponse::mutable_genre_list() { + set_has_genre_list(); + if (genre_list_ == NULL) genre_list_ = new ::GenreList; + return genre_list_; +} +inline ::GenreList* CollectionResponse::release_genre_list() { + clear_has_genre_list(); + ::GenreList* temp = genre_list_; + genre_list_ = NULL; + return temp; +} +inline void CollectionResponse::set_allocated_genre_list(::GenreList* genre_list) { + delete genre_list_; + genre_list_ = genre_list; + if (genre_list) { + set_has_genre_list(); + } else { + clear_has_genre_list(); + } +} + +// optional .ArtistList artist_list = 4; +inline bool CollectionResponse::has_artist_list() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void CollectionResponse::set_has_artist_list() { + _has_bits_[0] |= 0x00000008u; +} +inline void CollectionResponse::clear_has_artist_list() { + _has_bits_[0] &= ~0x00000008u; +} +inline void CollectionResponse::clear_artist_list() { + if (artist_list_ != NULL) artist_list_->::ArtistList::Clear(); + clear_has_artist_list(); +} +inline const ::ArtistList& CollectionResponse::artist_list() const { + return artist_list_ != NULL ? *artist_list_ : *default_instance_->artist_list_; +} +inline ::ArtistList* CollectionResponse::mutable_artist_list() { + set_has_artist_list(); + if (artist_list_ == NULL) artist_list_ = new ::ArtistList; + return artist_list_; +} +inline ::ArtistList* CollectionResponse::release_artist_list() { + clear_has_artist_list(); + ::ArtistList* temp = artist_list_; + artist_list_ = NULL; + return temp; +} +inline void CollectionResponse::set_allocated_artist_list(::ArtistList* artist_list) { + delete artist_list_; + artist_list_ = artist_list; + if (artist_list) { + set_has_artist_list(); + } else { + clear_has_artist_list(); + } +} + +// optional .ReleaseList release_list = 5; +inline bool CollectionResponse::has_release_list() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void CollectionResponse::set_has_release_list() { + _has_bits_[0] |= 0x00000010u; +} +inline void CollectionResponse::clear_has_release_list() { + _has_bits_[0] &= ~0x00000010u; +} +inline void CollectionResponse::clear_release_list() { + if (release_list_ != NULL) release_list_->::ReleaseList::Clear(); + clear_has_release_list(); +} +inline const ::ReleaseList& CollectionResponse::release_list() const { + return release_list_ != NULL ? *release_list_ : *default_instance_->release_list_; +} +inline ::ReleaseList* CollectionResponse::mutable_release_list() { + set_has_release_list(); + if (release_list_ == NULL) release_list_ = new ::ReleaseList; + return release_list_; +} +inline ::ReleaseList* CollectionResponse::release_release_list() { + clear_has_release_list(); + ::ReleaseList* temp = release_list_; + release_list_ = NULL; + return temp; +} +inline void CollectionResponse::set_allocated_release_list(::ReleaseList* release_list) { + delete release_list_; + release_list_ = release_list; + if (release_list) { + set_has_release_list(); + } else { + clear_has_release_list(); + } +} + +// optional .TrackList track_list = 6; +inline bool CollectionResponse::has_track_list() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void CollectionResponse::set_has_track_list() { + _has_bits_[0] |= 0x00000020u; +} +inline void CollectionResponse::clear_has_track_list() { + _has_bits_[0] &= ~0x00000020u; +} +inline void CollectionResponse::clear_track_list() { + if (track_list_ != NULL) track_list_->::TrackList::Clear(); + clear_has_track_list(); +} +inline const ::TrackList& CollectionResponse::track_list() const { + return track_list_ != NULL ? *track_list_ : *default_instance_->track_list_; +} +inline ::TrackList* CollectionResponse::mutable_track_list() { + set_has_track_list(); + if (track_list_ == NULL) track_list_ = new ::TrackList; + return track_list_; +} +inline ::TrackList* CollectionResponse::release_track_list() { + clear_has_track_list(); + ::TrackList* temp = track_list_; + track_list_ = NULL; + return temp; +} +inline void CollectionResponse::set_allocated_track_list(::TrackList* track_list) { + delete track_list_; + track_list_ = track_list; + if (track_list) { + set_has_track_list(); + } else { + clear_has_track_list(); + } +} + +// ------------------------------------------------------------------- + +// GenreList + +// required bool last = 1; +inline bool GenreList::has_last() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void GenreList::set_has_last() { + _has_bits_[0] |= 0x00000001u; +} +inline void GenreList::clear_has_last() { + _has_bits_[0] &= ~0x00000001u; +} +inline void GenreList::clear_last() { + last_ = false; + clear_has_last(); +} +inline bool GenreList::last() const { + return last_; +} +inline void GenreList::set_last(bool value) { + set_has_last(); + last_ = value; +} + +// repeated .Genre genres = 2; +inline int GenreList::genres_size() const { + return genres_.size(); +} +inline void GenreList::clear_genres() { + genres_.Clear(); +} +inline const ::Genre& GenreList::genres(int index) const { + return genres_.Get(index); +} +inline ::Genre* GenreList::mutable_genres(int index) { + return genres_.Mutable(index); +} +inline ::Genre* GenreList::add_genres() { + return genres_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::Genre >& +GenreList::genres() const { + return genres_; +} +inline ::google::protobuf::RepeatedPtrField< ::Genre >* +GenreList::mutable_genres() { + return &genres_; +} + +// ------------------------------------------------------------------- + +// ArtistList + +// required bool last = 1; +inline bool ArtistList::has_last() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ArtistList::set_has_last() { + _has_bits_[0] |= 0x00000001u; +} +inline void ArtistList::clear_has_last() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ArtistList::clear_last() { + last_ = false; + clear_has_last(); +} +inline bool ArtistList::last() const { + return last_; +} +inline void ArtistList::set_last(bool value) { + set_has_last(); + last_ = value; +} + +// repeated .Artist artists = 2; +inline int ArtistList::artists_size() const { + return artists_.size(); +} +inline void ArtistList::clear_artists() { + artists_.Clear(); +} +inline const ::Artist& ArtistList::artists(int index) const { + return artists_.Get(index); +} +inline ::Artist* ArtistList::mutable_artists(int index) { + return artists_.Mutable(index); +} +inline ::Artist* ArtistList::add_artists() { + return artists_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::Artist >& +ArtistList::artists() const { + return artists_; +} +inline ::google::protobuf::RepeatedPtrField< ::Artist >* +ArtistList::mutable_artists() { + return &artists_; +} + +// ------------------------------------------------------------------- + +// ReleaseList + +// required bool last = 1; +inline bool ReleaseList::has_last() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ReleaseList::set_has_last() { + _has_bits_[0] |= 0x00000001u; +} +inline void ReleaseList::clear_has_last() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ReleaseList::clear_last() { + last_ = false; + clear_has_last(); +} +inline bool ReleaseList::last() const { + return last_; +} +inline void ReleaseList::set_last(bool value) { + set_has_last(); + last_ = value; +} + +// repeated .Release releases = 2; +inline int ReleaseList::releases_size() const { + return releases_.size(); +} +inline void ReleaseList::clear_releases() { + releases_.Clear(); +} +inline const ::Release& ReleaseList::releases(int index) const { + return releases_.Get(index); +} +inline ::Release* ReleaseList::mutable_releases(int index) { + return releases_.Mutable(index); +} +inline ::Release* ReleaseList::add_releases() { + return releases_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::Release >& +ReleaseList::releases() const { + return releases_; +} +inline ::google::protobuf::RepeatedPtrField< ::Release >* +ReleaseList::mutable_releases() { + return &releases_; +} + +// ------------------------------------------------------------------- + +// TrackList + +// required bool last = 1; +inline bool TrackList::has_last() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void TrackList::set_has_last() { + _has_bits_[0] |= 0x00000001u; +} +inline void TrackList::clear_has_last() { + _has_bits_[0] &= ~0x00000001u; +} +inline void TrackList::clear_last() { + last_ = false; + clear_has_last(); +} +inline bool TrackList::last() const { + return last_; +} +inline void TrackList::set_last(bool value) { + set_has_last(); + last_ = value; +} + +// repeated .Track tracks = 2; +inline int TrackList::tracks_size() const { + return tracks_.size(); +} +inline void TrackList::clear_tracks() { + tracks_.Clear(); +} +inline const ::Track& TrackList::tracks(int index) const { + return tracks_.Get(index); +} +inline ::Track* TrackList::mutable_tracks(int index) { + return tracks_.Mutable(index); +} +inline ::Track* TrackList::add_tracks() { + return tracks_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::Track >& +TrackList::tracks() const { + return tracks_; +} +inline ::google::protobuf::RepeatedPtrField< ::Track >* +TrackList::mutable_tracks() { + return &tracks_; +} + +// ------------------------------------------------------------------- + +// Genre + +// required string name = 1; +inline bool Genre::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Genre::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void Genre::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Genre::clear_name() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + clear_has_name(); +} +inline const ::std::string& Genre::name() const { + return *name_; +} +inline void Genre::set_name(const ::std::string& value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Genre::set_name(const char* value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Genre::set_name(const char* value, size_t size) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Genre::mutable_name() { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + return name_; +} +inline ::std::string* Genre::release_name() { + clear_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Genre::set_allocated_name(::std::string* name) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (name) { + set_has_name(); + name_ = name; + } else { + clear_has_name(); + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// ------------------------------------------------------------------- + +// CoverArt + +// optional string mime_type = 1; +inline bool CoverArt::has_mime_type() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void CoverArt::set_has_mime_type() { + _has_bits_[0] |= 0x00000001u; +} +inline void CoverArt::clear_has_mime_type() { + _has_bits_[0] &= ~0x00000001u; +} +inline void CoverArt::clear_mime_type() { + if (mime_type_ != &::google::protobuf::internal::kEmptyString) { + mime_type_->clear(); + } + clear_has_mime_type(); +} +inline const ::std::string& CoverArt::mime_type() const { + return *mime_type_; +} +inline void CoverArt::set_mime_type(const ::std::string& value) { + set_has_mime_type(); + if (mime_type_ == &::google::protobuf::internal::kEmptyString) { + mime_type_ = new ::std::string; + } + mime_type_->assign(value); +} +inline void CoverArt::set_mime_type(const char* value) { + set_has_mime_type(); + if (mime_type_ == &::google::protobuf::internal::kEmptyString) { + mime_type_ = new ::std::string; + } + mime_type_->assign(value); +} +inline void CoverArt::set_mime_type(const char* value, size_t size) { + set_has_mime_type(); + if (mime_type_ == &::google::protobuf::internal::kEmptyString) { + mime_type_ = new ::std::string; + } + mime_type_->assign(reinterpret_cast(value), size); +} +inline ::std::string* CoverArt::mutable_mime_type() { + set_has_mime_type(); + if (mime_type_ == &::google::protobuf::internal::kEmptyString) { + mime_type_ = new ::std::string; + } + return mime_type_; +} +inline ::std::string* CoverArt::release_mime_type() { + clear_has_mime_type(); + if (mime_type_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = mime_type_; + mime_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void CoverArt::set_allocated_mime_type(::std::string* mime_type) { + if (mime_type_ != &::google::protobuf::internal::kEmptyString) { + delete mime_type_; + } + if (mime_type) { + set_has_mime_type(); + mime_type_ = mime_type; + } else { + clear_has_mime_type(); + mime_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// repeated bytes data = 2; +inline int CoverArt::data_size() const { + return data_.size(); +} +inline void CoverArt::clear_data() { + data_.Clear(); +} +inline const ::std::string& CoverArt::data(int index) const { + return data_.Get(index); +} +inline ::std::string* CoverArt::mutable_data(int index) { + return data_.Mutable(index); +} +inline void CoverArt::set_data(int index, const ::std::string& value) { + data_.Mutable(index)->assign(value); +} +inline void CoverArt::set_data(int index, const char* value) { + data_.Mutable(index)->assign(value); +} +inline void CoverArt::set_data(int index, const void* value, size_t size) { + data_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* CoverArt::add_data() { + return data_.Add(); +} +inline void CoverArt::add_data(const ::std::string& value) { + data_.Add()->assign(value); +} +inline void CoverArt::add_data(const char* value) { + data_.Add()->assign(value); +} +inline void CoverArt::add_data(const void* value, size_t size) { + data_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +CoverArt::data() const { + return data_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +CoverArt::mutable_data() { + return &data_; +} + +// ------------------------------------------------------------------- + +// Artist + +// required string name = 1; +inline bool Artist::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Artist::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void Artist::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Artist::clear_name() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + clear_has_name(); +} +inline const ::std::string& Artist::name() const { + return *name_; +} +inline void Artist::set_name(const ::std::string& value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Artist::set_name(const char* value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Artist::set_name(const char* value, size_t size) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Artist::mutable_name() { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + return name_; +} +inline ::std::string* Artist::release_name() { + clear_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Artist::set_allocated_name(::std::string* name) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (name) { + set_has_name(); + name_ = name; + } else { + clear_has_name(); + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// required uint32 nb_releases = 2; +inline bool Artist::has_nb_releases() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Artist::set_has_nb_releases() { + _has_bits_[0] |= 0x00000002u; +} +inline void Artist::clear_has_nb_releases() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Artist::clear_nb_releases() { + nb_releases_ = 0u; + clear_has_nb_releases(); +} +inline ::google::protobuf::uint32 Artist::nb_releases() const { + return nb_releases_; +} +inline void Artist::set_nb_releases(::google::protobuf::uint32 value) { + set_has_nb_releases(); + nb_releases_ = value; +} + +// ------------------------------------------------------------------- + +// Release + +// required string name = 1; +inline bool Release::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Release::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void Release::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Release::clear_name() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + clear_has_name(); +} +inline const ::std::string& Release::name() const { + return *name_; +} +inline void Release::set_name(const ::std::string& value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Release::set_name(const char* value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Release::set_name(const char* value, size_t size) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Release::mutable_name() { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + return name_; +} +inline ::std::string* Release::release_name() { + clear_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Release::set_allocated_name(::std::string* name) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (name) { + set_has_name(); + name_ = name; + } else { + clear_has_name(); + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// required uint32 nb_tracks = 2; +inline bool Release::has_nb_tracks() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Release::set_has_nb_tracks() { + _has_bits_[0] |= 0x00000002u; +} +inline void Release::clear_has_nb_tracks() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Release::clear_nb_tracks() { + nb_tracks_ = 0u; + clear_has_nb_tracks(); +} +inline ::google::protobuf::uint32 Release::nb_tracks() const { + return nb_tracks_; +} +inline void Release::set_nb_tracks(::google::protobuf::uint32 value) { + set_has_nb_tracks(); + nb_tracks_ = value; +} + +// required uint32 duration_secs = 3; +inline bool Release::has_duration_secs() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void Release::set_has_duration_secs() { + _has_bits_[0] |= 0x00000004u; +} +inline void Release::clear_has_duration_secs() { + _has_bits_[0] &= ~0x00000004u; +} +inline void Release::clear_duration_secs() { + duration_secs_ = 0u; + clear_has_duration_secs(); +} +inline ::google::protobuf::uint32 Release::duration_secs() const { + return duration_secs_; +} +inline void Release::set_duration_secs(::google::protobuf::uint32 value) { + set_has_duration_secs(); + duration_secs_ = value; +} + +// optional .CoverArt coverArt = 4; +inline bool Release::has_coverart() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void Release::set_has_coverart() { + _has_bits_[0] |= 0x00000008u; +} +inline void Release::clear_has_coverart() { + _has_bits_[0] &= ~0x00000008u; +} +inline void Release::clear_coverart() { + if (coverart_ != NULL) coverart_->::CoverArt::Clear(); + clear_has_coverart(); +} +inline const ::CoverArt& Release::coverart() const { + return coverart_ != NULL ? *coverart_ : *default_instance_->coverart_; +} +inline ::CoverArt* Release::mutable_coverart() { + set_has_coverart(); + if (coverart_ == NULL) coverart_ = new ::CoverArt; + return coverart_; +} +inline ::CoverArt* Release::release_coverart() { + clear_has_coverart(); + ::CoverArt* temp = coverart_; + coverart_ = NULL; + return temp; +} +inline void Release::set_allocated_coverart(::CoverArt* coverart) { + delete coverart_; + coverart_ = coverart; + if (coverart) { + set_has_coverart(); + } else { + clear_has_coverart(); + } +} + +// ------------------------------------------------------------------- + +// Track + +// required int64 media_id = 1; +inline bool Track::has_media_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Track::set_has_media_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void Track::clear_has_media_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Track::clear_media_id() { + media_id_ = GOOGLE_LONGLONG(0); + clear_has_media_id(); +} +inline ::google::protobuf::int64 Track::media_id() const { + return media_id_; +} +inline void Track::set_media_id(::google::protobuf::int64 value) { + set_has_media_id(); + media_id_ = value; +} + +// optional uint32 disc_number = 2; +inline bool Track::has_disc_number() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Track::set_has_disc_number() { + _has_bits_[0] |= 0x00000002u; +} +inline void Track::clear_has_disc_number() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Track::clear_disc_number() { + disc_number_ = 0u; + clear_has_disc_number(); +} +inline ::google::protobuf::uint32 Track::disc_number() const { + return disc_number_; +} +inline void Track::set_disc_number(::google::protobuf::uint32 value) { + set_has_disc_number(); + disc_number_ = value; +} + +// optional uint32 track_number = 3; +inline bool Track::has_track_number() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void Track::set_has_track_number() { + _has_bits_[0] |= 0x00000004u; +} +inline void Track::clear_has_track_number() { + _has_bits_[0] &= ~0x00000004u; +} +inline void Track::clear_track_number() { + track_number_ = 0u; + clear_has_track_number(); +} +inline ::google::protobuf::uint32 Track::track_number() const { + return track_number_; +} +inline void Track::set_track_number(::google::protobuf::uint32 value) { + set_has_track_number(); + track_number_ = value; +} + +// optional string artist = 4; +inline bool Track::has_artist() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void Track::set_has_artist() { + _has_bits_[0] |= 0x00000008u; +} +inline void Track::clear_has_artist() { + _has_bits_[0] &= ~0x00000008u; +} +inline void Track::clear_artist() { + if (artist_ != &::google::protobuf::internal::kEmptyString) { + artist_->clear(); + } + clear_has_artist(); +} +inline const ::std::string& Track::artist() const { + return *artist_; +} +inline void Track::set_artist(const ::std::string& value) { + set_has_artist(); + if (artist_ == &::google::protobuf::internal::kEmptyString) { + artist_ = new ::std::string; + } + artist_->assign(value); +} +inline void Track::set_artist(const char* value) { + set_has_artist(); + if (artist_ == &::google::protobuf::internal::kEmptyString) { + artist_ = new ::std::string; + } + artist_->assign(value); +} +inline void Track::set_artist(const char* value, size_t size) { + set_has_artist(); + if (artist_ == &::google::protobuf::internal::kEmptyString) { + artist_ = new ::std::string; + } + artist_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Track::mutable_artist() { + set_has_artist(); + if (artist_ == &::google::protobuf::internal::kEmptyString) { + artist_ = new ::std::string; + } + return artist_; +} +inline ::std::string* Track::release_artist() { + clear_has_artist(); + if (artist_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = artist_; + artist_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Track::set_allocated_artist(::std::string* artist) { + if (artist_ != &::google::protobuf::internal::kEmptyString) { + delete artist_; + } + if (artist) { + set_has_artist(); + artist_ = artist; + } else { + clear_has_artist(); + artist_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// optional string release = 5; +inline bool Track::has_release() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void Track::set_has_release() { + _has_bits_[0] |= 0x00000010u; +} +inline void Track::clear_has_release() { + _has_bits_[0] &= ~0x00000010u; +} +inline void Track::clear_release() { + if (release_ != &::google::protobuf::internal::kEmptyString) { + release_->clear(); + } + clear_has_release(); +} +inline const ::std::string& Track::release() const { + return *release_; +} +inline void Track::set_release(const ::std::string& value) { + set_has_release(); + if (release_ == &::google::protobuf::internal::kEmptyString) { + release_ = new ::std::string; + } + release_->assign(value); +} +inline void Track::set_release(const char* value) { + set_has_release(); + if (release_ == &::google::protobuf::internal::kEmptyString) { + release_ = new ::std::string; + } + release_->assign(value); +} +inline void Track::set_release(const char* value, size_t size) { + set_has_release(); + if (release_ == &::google::protobuf::internal::kEmptyString) { + release_ = new ::std::string; + } + release_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Track::mutable_release() { + set_has_release(); + if (release_ == &::google::protobuf::internal::kEmptyString) { + release_ = new ::std::string; + } + return release_; +} +inline ::std::string* Track::release_release() { + clear_has_release(); + if (release_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = release_; + release_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Track::set_allocated_release(::std::string* release) { + if (release_ != &::google::protobuf::internal::kEmptyString) { + delete release_; + } + if (release) { + set_has_release(); + release_ = release; + } else { + clear_has_release(); + release_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// required string name = 6; +inline bool Track::has_name() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void Track::set_has_name() { + _has_bits_[0] |= 0x00000020u; +} +inline void Track::clear_has_name() { + _has_bits_[0] &= ~0x00000020u; +} +inline void Track::clear_name() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + clear_has_name(); +} +inline const ::std::string& Track::name() const { + return *name_; +} +inline void Track::set_name(const ::std::string& value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Track::set_name(const char* value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Track::set_name(const char* value, size_t size) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Track::mutable_name() { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + return name_; +} +inline ::std::string* Track::release_name() { + clear_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Track::set_allocated_name(::std::string* name) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (name) { + set_has_name(); + name_ = name; + } else { + clear_has_name(); + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// required uint32 duration_secs = 7; +inline bool Track::has_duration_secs() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +inline void Track::set_has_duration_secs() { + _has_bits_[0] |= 0x00000040u; +} +inline void Track::clear_has_duration_secs() { + _has_bits_[0] &= ~0x00000040u; +} +inline void Track::clear_duration_secs() { + duration_secs_ = 0u; + clear_has_duration_secs(); +} +inline ::google::protobuf::uint32 Track::duration_secs() const { + return duration_secs_; +} +inline void Track::set_duration_secs(::google::protobuf::uint32 value) { + set_has_duration_secs(); + duration_secs_ = value; +} + +// optional string release_date = 8; +inline bool Track::has_release_date() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +inline void Track::set_has_release_date() { + _has_bits_[0] |= 0x00000080u; +} +inline void Track::clear_has_release_date() { + _has_bits_[0] &= ~0x00000080u; +} +inline void Track::clear_release_date() { + if (release_date_ != &::google::protobuf::internal::kEmptyString) { + release_date_->clear(); + } + clear_has_release_date(); +} +inline const ::std::string& Track::release_date() const { + return *release_date_; +} +inline void Track::set_release_date(const ::std::string& value) { + set_has_release_date(); + if (release_date_ == &::google::protobuf::internal::kEmptyString) { + release_date_ = new ::std::string; + } + release_date_->assign(value); +} +inline void Track::set_release_date(const char* value) { + set_has_release_date(); + if (release_date_ == &::google::protobuf::internal::kEmptyString) { + release_date_ = new ::std::string; + } + release_date_->assign(value); +} +inline void Track::set_release_date(const char* value, size_t size) { + set_has_release_date(); + if (release_date_ == &::google::protobuf::internal::kEmptyString) { + release_date_ = new ::std::string; + } + release_date_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Track::mutable_release_date() { + set_has_release_date(); + if (release_date_ == &::google::protobuf::internal::kEmptyString) { + release_date_ = new ::std::string; + } + return release_date_; +} +inline ::std::string* Track::release_release_date() { + clear_has_release_date(); + if (release_date_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = release_date_; + release_date_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Track::set_allocated_release_date(::std::string* release_date) { + if (release_date_ != &::google::protobuf::internal::kEmptyString) { + delete release_date_; + } + if (release_date) { + set_has_release_date(); + release_date_ = release_date; + } else { + clear_has_release_date(); + release_date_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// optional string original_release_date = 9; +inline bool Track::has_original_release_date() const { + return (_has_bits_[0] & 0x00000100u) != 0; +} +inline void Track::set_has_original_release_date() { + _has_bits_[0] |= 0x00000100u; +} +inline void Track::clear_has_original_release_date() { + _has_bits_[0] &= ~0x00000100u; +} +inline void Track::clear_original_release_date() { + if (original_release_date_ != &::google::protobuf::internal::kEmptyString) { + original_release_date_->clear(); + } + clear_has_original_release_date(); +} +inline const ::std::string& Track::original_release_date() const { + return *original_release_date_; +} +inline void Track::set_original_release_date(const ::std::string& value) { + set_has_original_release_date(); + if (original_release_date_ == &::google::protobuf::internal::kEmptyString) { + original_release_date_ = new ::std::string; + } + original_release_date_->assign(value); +} +inline void Track::set_original_release_date(const char* value) { + set_has_original_release_date(); + if (original_release_date_ == &::google::protobuf::internal::kEmptyString) { + original_release_date_ = new ::std::string; + } + original_release_date_->assign(value); +} +inline void Track::set_original_release_date(const char* value, size_t size) { + set_has_original_release_date(); + if (original_release_date_ == &::google::protobuf::internal::kEmptyString) { + original_release_date_ = new ::std::string; + } + original_release_date_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Track::mutable_original_release_date() { + set_has_original_release_date(); + if (original_release_date_ == &::google::protobuf::internal::kEmptyString) { + original_release_date_ = new ::std::string; + } + return original_release_date_; +} +inline ::std::string* Track::release_original_release_date() { + clear_has_original_release_date(); + if (original_release_date_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = original_release_date_; + original_release_date_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Track::set_allocated_original_release_date(::std::string* original_release_date) { + if (original_release_date_ != &::google::protobuf::internal::kEmptyString) { + delete original_release_date_; + } + if (original_release_date) { + set_has_original_release_date(); + original_release_date_ = original_release_date; + } else { + clear_has_original_release_date(); + original_release_date_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// repeated string genres = 10; +inline int Track::genres_size() const { + return genres_.size(); +} +inline void Track::clear_genres() { + genres_.Clear(); +} +inline const ::std::string& Track::genres(int index) const { + return genres_.Get(index); +} +inline ::std::string* Track::mutable_genres(int index) { + return genres_.Mutable(index); +} +inline void Track::set_genres(int index, const ::std::string& value) { + genres_.Mutable(index)->assign(value); +} +inline void Track::set_genres(int index, const char* value) { + genres_.Mutable(index)->assign(value); +} +inline void Track::set_genres(int index, const char* value, size_t size) { + genres_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* Track::add_genres() { + return genres_.Add(); +} +inline void Track::add_genres(const ::std::string& value) { + genres_.Add()->assign(value); +} +inline void Track::add_genres(const char* value) { + genres_.Add()->assign(value); +} +inline void Track::add_genres(const char* value, size_t size) { + genres_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +Track::genres() const { + return genres_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +Track::mutable_genres() { + return &genres_; +} + +// optional bytes coverArt = 11; +inline bool Track::has_coverart() const { + return (_has_bits_[0] & 0x00000400u) != 0; +} +inline void Track::set_has_coverart() { + _has_bits_[0] |= 0x00000400u; +} +inline void Track::clear_has_coverart() { + _has_bits_[0] &= ~0x00000400u; +} +inline void Track::clear_coverart() { + if (coverart_ != &::google::protobuf::internal::kEmptyString) { + coverart_->clear(); + } + clear_has_coverart(); +} +inline const ::std::string& Track::coverart() const { + return *coverart_; +} +inline void Track::set_coverart(const ::std::string& value) { + set_has_coverart(); + if (coverart_ == &::google::protobuf::internal::kEmptyString) { + coverart_ = new ::std::string; + } + coverart_->assign(value); +} +inline void Track::set_coverart(const char* value) { + set_has_coverart(); + if (coverart_ == &::google::protobuf::internal::kEmptyString) { + coverart_ = new ::std::string; + } + coverart_->assign(value); +} +inline void Track::set_coverart(const void* value, size_t size) { + set_has_coverart(); + if (coverart_ == &::google::protobuf::internal::kEmptyString) { + coverart_ = new ::std::string; + } + coverart_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Track::mutable_coverart() { + set_has_coverart(); + if (coverart_ == &::google::protobuf::internal::kEmptyString) { + coverart_ = new ::std::string; + } + return coverart_; +} +inline ::std::string* Track::release_coverart() { + clear_has_coverart(); + if (coverart_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = coverart_; + coverart_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Track::set_allocated_coverart(::std::string* coverart) { + if (coverart_ != &::google::protobuf::internal::kEmptyString) { + delete coverart_; + } + if (coverart) { + set_has_coverart(); + coverart_ = coverart; + } else { + clear_has_coverart(); + coverart_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + + +// @@protoc_insertion_point(namespace_scope) + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::CollectionRequest_Type>() { + return ::CollectionRequest_Type_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::CollectionResponse_Type>() { + return ::CollectionResponse_Type_descriptor(); +} + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_collection_2eproto__INCLUDED diff --git a/remote/proto/collection.proto b/remote/proto/collection.proto new file mode 100644 index 00000000..cc501265 --- /dev/null +++ b/remote/proto/collection.proto @@ -0,0 +1,155 @@ +import "common.proto"; + +message CollectionRequest +{ + + message GetGenreList + { + optional string filter_name = 1; // Genre that contains 'filterName' in its name + + optional uint32 preferred_batch_size = 2; + } + + message GetArtistList + { + // Search Filters + 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; + } + + message GetReleaseList + { + // Search filters + optional string filter_name = 1; // Release that contains 'filterName' in its name + repeated string artist_name = 2; // Release that contains at least a track of this artist + 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; + } + + message GetTrackList + { + // Search filters + optional string filter_name = 1; // Track that contains 'filterName' in its name + repeated string release_name = 2; // Track that is part of the release + repeated string artist_name = 3; // Track made by this artist + repeated string filter_genre = 4; // Track that has at least a track of the genre + optional uint32 disc_number = 5; // Track number + optional uint32 track_number = 6; // Disc number + + optional bool get_cover = 7; // Request cover art for each track + optional uint32 preferred_batch_size = 8; + } + + + enum Type + { + TypeGetArtistList = 0; + TypeGetReleaseList = 1; + TypeGetTrackList = 2; + } + + required Type type = 1; + + optional GetArtistList get_artists = 2; + optional GetReleaseList get_releases = 3; + optional GetTrackList get_tracks = 4; +} + + +message CollectionResponse +{ + enum Type { + TypeGenreList = 1; + TypeArtistList = 2; + TypeReleaseList = 3; + TypeTrackList = 4; + } + + required Error error = 1; + + required Type type = 2; + + optional GenreList genre_list = 3; + optional ArtistList artist_list = 4; + optional ReleaseList release_list = 5; + optional TrackList track_list = 6; +} + +message GenreList +{ + required bool last = 1; + repeated Genre genres = 2; +} + +message ArtistList +{ + required bool last = 1; + repeated Artist artists = 2; +} + +message ReleaseList +{ + required bool last = 1; + repeated Release releases = 2; +} + +message TrackList +{ + required bool last = 1; + repeated Track tracks = 2; +} + +message Genre +{ + required string name = 1; +} + +message CoverArt +{ + optional string mime_type = 1; + repeated bytes data = 2; +} + +message Artist +{ + required string name = 1; + required uint32 nb_releases = 2; +} + +message Release +{ + required string name = 1; + + required uint32 nb_tracks = 2; + required uint32 duration_secs = 3; + + optional CoverArt coverArt = 4; +} + +message Track +{ + required int64 media_id = 1; + optional uint32 disc_number = 2; + optional uint32 track_number = 3; + + optional string artist = 4; + optional string release = 5; + + required string name = 6; + + required uint32 duration_secs = 7; + + optional string release_date = 8; + optional string original_release_date = 9; + + repeated string genres = 10; + + optional bytes coverArt = 11; +} + + + diff --git a/remote/proto/common.pb.cc b/remote/proto/common.pb.cc new file mode 100644 index 00000000..ae7eaf49 --- /dev/null +++ b/remote/proto/common.pb.cc @@ -0,0 +1,362 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: common.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "common.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace { + +const ::google::protobuf::Descriptor* Error_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Error_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_common_2eproto() { + protobuf_AddDesc_common_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "common.proto"); + GOOGLE_CHECK(file != NULL); + Error_descriptor_ = file->message_type(0); + static const int Error_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Error, error_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Error, message_), + }; + Error_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Error_descriptor_, + Error::default_instance_, + Error_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Error, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Error, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Error)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_common_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Error_descriptor_, &Error::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_common_2eproto() { + delete Error::default_instance_; + delete Error_reflection_; +} + +void protobuf_AddDesc_common_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\014common.proto\"\'\n\005Error\022\r\n\005error\030\001 \002(\010\022\017" + "\n\007message\030\002 \001(\t", 55); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "common.proto", &protobuf_RegisterTypes); + Error::default_instance_ = new Error(); + Error::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_common_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_common_2eproto { + StaticDescriptorInitializer_common_2eproto() { + protobuf_AddDesc_common_2eproto(); + } +} static_descriptor_initializer_common_2eproto_; + +// =================================================================== + +#ifndef _MSC_VER +const int Error::kErrorFieldNumber; +const int Error::kMessageFieldNumber; +#endif // !_MSC_VER + +Error::Error() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Error::InitAsDefaultInstance() { +} + +Error::Error(const Error& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Error::SharedCtor() { + _cached_size_ = 0; + error_ = false; + message_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Error::~Error() { + SharedDtor(); +} + +void Error::SharedDtor() { + if (message_ != &::google::protobuf::internal::kEmptyString) { + delete message_; + } + if (this != default_instance_) { + } +} + +void Error::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Error::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Error_descriptor_; +} + +const Error& Error::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_common_2eproto(); + return *default_instance_; +} + +Error* Error::default_instance_ = NULL; + +Error* Error::New() const { + return new Error; +} + +void Error::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + error_ = false; + if (has_message()) { + if (message_ != &::google::protobuf::internal::kEmptyString) { + message_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Error::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 bool error = 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, &error_))); + set_has_error(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_message; + break; + } + + // optional string message = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_message: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_message())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->message().data(), this->message().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } 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 Error::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required bool error = 1; + if (has_error()) { + ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->error(), output); + } + + // optional string message = 2; + if (has_message()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->message().data(), this->message().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->message(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Error::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required bool error = 1; + if (has_error()) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->error(), target); + } + + // optional string message = 2; + if (has_message()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->message().data(), this->message().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->message(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Error::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required bool error = 1; + if (has_error()) { + total_size += 1 + 1; + } + + // optional string message = 2; + if (has_message()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->message()); + } + + } + 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 Error::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Error* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Error::MergeFrom(const Error& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_error()) { + set_error(from.error()); + } + if (from.has_message()) { + set_message(from.message()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Error::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Error::CopyFrom(const Error& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Error::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void Error::Swap(Error* other) { + if (other != this) { + std::swap(error_, other->error_); + std::swap(message_, other->message_); + 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 Error::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Error_descriptor_; + metadata.reflection = Error_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +// @@protoc_insertion_point(global_scope) diff --git a/remote/proto/common.pb.h b/remote/proto/common.pb.h new file mode 100644 index 00000000..4819347a --- /dev/null +++ b/remote/proto/common.pb.h @@ -0,0 +1,246 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: common.proto + +#ifndef PROTOBUF_common_2eproto__INCLUDED +#define PROTOBUF_common_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2005000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_common_2eproto(); +void protobuf_AssignDesc_common_2eproto(); +void protobuf_ShutdownFile_common_2eproto(); + +class Error; + +// =================================================================== + +class Error : public ::google::protobuf::Message { + public: + Error(); + virtual ~Error(); + + Error(const Error& from); + + inline Error& operator=(const Error& 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 Error& default_instance(); + + void Swap(Error* other); + + // implements Message ---------------------------------------------- + + Error* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Error& from); + void MergeFrom(const Error& 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 bool error = 1; + inline bool has_error() const; + inline void clear_error(); + static const int kErrorFieldNumber = 1; + inline bool error() const; + inline void set_error(bool value); + + // optional string message = 2; + inline bool has_message() const; + inline void clear_message(); + static const int kMessageFieldNumber = 2; + inline const ::std::string& message() const; + inline void set_message(const ::std::string& value); + inline void set_message(const char* value); + inline void set_message(const char* value, size_t size); + inline ::std::string* mutable_message(); + inline ::std::string* release_message(); + inline void set_allocated_message(::std::string* message); + + // @@protoc_insertion_point(class_scope:Error) + private: + inline void set_has_error(); + inline void clear_has_error(); + inline void set_has_message(); + inline void clear_has_message(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* message_; + bool error_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_common_2eproto(); + friend void protobuf_AssignDesc_common_2eproto(); + friend void protobuf_ShutdownFile_common_2eproto(); + + void InitAsDefaultInstance(); + static Error* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// Error + +// required bool error = 1; +inline bool Error::has_error() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Error::set_has_error() { + _has_bits_[0] |= 0x00000001u; +} +inline void Error::clear_has_error() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Error::clear_error() { + error_ = false; + clear_has_error(); +} +inline bool Error::error() const { + return error_; +} +inline void Error::set_error(bool value) { + set_has_error(); + error_ = value; +} + +// optional string message = 2; +inline bool Error::has_message() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Error::set_has_message() { + _has_bits_[0] |= 0x00000002u; +} +inline void Error::clear_has_message() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Error::clear_message() { + if (message_ != &::google::protobuf::internal::kEmptyString) { + message_->clear(); + } + clear_has_message(); +} +inline const ::std::string& Error::message() const { + return *message_; +} +inline void Error::set_message(const ::std::string& value) { + set_has_message(); + if (message_ == &::google::protobuf::internal::kEmptyString) { + message_ = new ::std::string; + } + message_->assign(value); +} +inline void Error::set_message(const char* value) { + set_has_message(); + if (message_ == &::google::protobuf::internal::kEmptyString) { + message_ = new ::std::string; + } + message_->assign(value); +} +inline void Error::set_message(const char* value, size_t size) { + set_has_message(); + if (message_ == &::google::protobuf::internal::kEmptyString) { + message_ = new ::std::string; + } + message_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Error::mutable_message() { + set_has_message(); + if (message_ == &::google::protobuf::internal::kEmptyString) { + message_ = new ::std::string; + } + return message_; +} +inline ::std::string* Error::release_message() { + clear_has_message(); + if (message_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = message_; + message_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Error::set_allocated_message(::std::string* message) { + if (message_ != &::google::protobuf::internal::kEmptyString) { + delete message_; + } + if (message) { + set_has_message(); + message_ = message; + } else { + clear_has_message(); + message_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + + +// @@protoc_insertion_point(namespace_scope) + +#ifndef SWIG +namespace google { +namespace protobuf { + + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_common_2eproto__INCLUDED diff --git a/remote/proto/common.proto b/remote/proto/common.proto new file mode 100644 index 00000000..1bb18909 --- /dev/null +++ b/remote/proto/common.proto @@ -0,0 +1,7 @@ + +message Error +{ + required bool error = 1; + optional string message = 2; +} + diff --git a/remote/proto/media.pb.cc b/remote/proto/media.pb.cc new file mode 100644 index 00000000..7bb89d5a --- /dev/null +++ b/remote/proto/media.pb.cc @@ -0,0 +1,2083 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: media.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "media.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace { + +const ::google::protobuf::Descriptor* MediaRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + MediaRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* MediaRequest_Prepare_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + MediaRequest_Prepare_reflection_ = NULL; +const ::google::protobuf::Descriptor* MediaRequest_GetPart_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + MediaRequest_GetPart_reflection_ = NULL; +const ::google::protobuf::Descriptor* MediaRequest_Terminate_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + MediaRequest_Terminate_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* MediaRequest_Type_descriptor_ = NULL; +const ::google::protobuf::Descriptor* MediaResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + MediaResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* MediaResponse_MediaPart_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + MediaResponse_MediaPart_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* MediaResponse_Type_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* CodecType_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_media_2eproto() { + protobuf_AddDesc_media_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "media.proto"); + GOOGLE_CHECK(file != NULL); + MediaRequest_descriptor_ = file->message_type(0); + static const int MediaRequest_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest, request_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest, prepare_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest, get_part_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest, terminate_), + }; + MediaRequest_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + MediaRequest_descriptor_, + MediaRequest::default_instance_, + MediaRequest_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(MediaRequest)); + MediaRequest_Prepare_descriptor_ = MediaRequest_descriptor_->nested_type(0); + static const int MediaRequest_Prepare_offsets_[8] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, offset_secs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, codec_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, audio_bitrate_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, video_bitrate_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, audio_stream_idx_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, video_stream_idx_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, subtitle_stream_idx_), + }; + MediaRequest_Prepare_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + MediaRequest_Prepare_descriptor_, + MediaRequest_Prepare::default_instance_, + MediaRequest_Prepare_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Prepare, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(MediaRequest_Prepare)); + MediaRequest_GetPart_descriptor_ = MediaRequest_descriptor_->nested_type(1); + static const int MediaRequest_GetPart_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_GetPart, requested_data_size_), + }; + MediaRequest_GetPart_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + MediaRequest_GetPart_descriptor_, + MediaRequest_GetPart::default_instance_, + MediaRequest_GetPart_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_GetPart, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_GetPart, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(MediaRequest_GetPart)); + MediaRequest_Terminate_descriptor_ = MediaRequest_descriptor_->nested_type(2); + static const int MediaRequest_Terminate_offsets_[1] = { + }; + MediaRequest_Terminate_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + MediaRequest_Terminate_descriptor_, + MediaRequest_Terminate::default_instance_, + MediaRequest_Terminate_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Terminate, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaRequest_Terminate, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(MediaRequest_Terminate)); + MediaRequest_Type_descriptor_ = MediaRequest_descriptor_->enum_type(0); + MediaResponse_descriptor_ = file->message_type(1); + static const int MediaResponse_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaResponse, error_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaResponse, response_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaResponse, part_), + }; + MediaResponse_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + MediaResponse_descriptor_, + MediaResponse::default_instance_, + MediaResponse_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaResponse, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaResponse, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(MediaResponse)); + MediaResponse_MediaPart_descriptor_ = MediaResponse_descriptor_->nested_type(0); + static const int MediaResponse_MediaPart_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaResponse_MediaPart, byte_offset_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaResponse_MediaPart, data_), + }; + MediaResponse_MediaPart_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + MediaResponse_MediaPart_descriptor_, + MediaResponse_MediaPart::default_instance_, + MediaResponse_MediaPart_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaResponse_MediaPart, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaResponse_MediaPart, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(MediaResponse_MediaPart)); + MediaResponse_Type_descriptor_ = MediaResponse_descriptor_->enum_type(0); + CodecType_descriptor_ = file->enum_type(0); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_media_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + MediaRequest_descriptor_, &MediaRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + MediaRequest_Prepare_descriptor_, &MediaRequest_Prepare::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + MediaRequest_GetPart_descriptor_, &MediaRequest_GetPart::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + MediaRequest_Terminate_descriptor_, &MediaRequest_Terminate::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + MediaResponse_descriptor_, &MediaResponse::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + MediaResponse_MediaPart_descriptor_, &MediaResponse_MediaPart::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_media_2eproto() { + delete MediaRequest::default_instance_; + delete MediaRequest_reflection_; + delete MediaRequest_Prepare::default_instance_; + delete MediaRequest_Prepare_reflection_; + delete MediaRequest_GetPart::default_instance_; + delete MediaRequest_GetPart_reflection_; + delete MediaRequest_Terminate::default_instance_; + delete MediaRequest_Terminate_reflection_; + delete MediaResponse::default_instance_; + delete MediaResponse_reflection_; + delete MediaResponse_MediaPart::default_instance_; + delete MediaResponse_MediaPart_reflection_; +} + +void protobuf_AddDesc_media_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::protobuf_AddDesc_common_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\013media.proto\032\014common.proto\"\376\003\n\014MediaReq" + "uest\022(\n\014request_type\030\001 \002(\0162\022.MediaReques" + "t.Type\022&\n\007prepare\030\002 \001(\0132\025.MediaRequest.P" + "repare\022\'\n\010get_part\030\003 \001(\0132\025.MediaRequest." + "GetPart\022*\n\tterminate\030\004 \001(\0132\027.MediaReques" + "t.Terminate\032\311\001\n\007Prepare\022\n\n\002id\030\001 \002(\003\022\023\n\013o" + "ffset_secs\030\002 \002(\r\022\036\n\ncodec_type\030\003 \001(\0162\n.C" + "odecType\022\025\n\raudio_bitrate\030\004 \001(\r\022\025\n\rvideo" + "_bitrate\030\005 \001(\r\022\030\n\020audio_stream_idx\030\006 \001(\r" + "\022\030\n\020video_stream_idx\030\007 \001(\r\022\033\n\023subtitle_s" + "tream_idx\030\010 \001(\r\032&\n\007GetPart\022\033\n\023requested_" + "data_size\030\001 \002(\r\032\013\n\tTerminate\"F\n\004Type\022\024\n\020" + "TypeMediaPrepare\020\001\022\020\n\014TypeMediaGet\020\002\022\026\n\022" + "TypeMediaTerminate\020\003\"\305\001\n\rMediaResponse\022\025" + "\n\005error\030\001 \002(\0132\006.Error\022*\n\rresponse_type\030\002" + " \002(\0162\023.MediaResponse.Type\022&\n\004part\030\003 \001(\0132" + "\030.MediaResponse.MediaPart\032.\n\tMediaPart\022\023" + "\n\013byte_offset\030\001 \002(\004\022\014\n\004data\030\002 \003(\014\"\031\n\004Typ" + "e\022\021\n\rTypeMediaPart\020\001*\035\n\tCodecType\022\020\n\014Cod" + "ecTypeOGG\020\001", 771); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "media.proto", &protobuf_RegisterTypes); + MediaRequest::default_instance_ = new MediaRequest(); + MediaRequest_Prepare::default_instance_ = new MediaRequest_Prepare(); + MediaRequest_GetPart::default_instance_ = new MediaRequest_GetPart(); + MediaRequest_Terminate::default_instance_ = new MediaRequest_Terminate(); + MediaResponse::default_instance_ = new MediaResponse(); + MediaResponse_MediaPart::default_instance_ = new MediaResponse_MediaPart(); + MediaRequest::default_instance_->InitAsDefaultInstance(); + MediaRequest_Prepare::default_instance_->InitAsDefaultInstance(); + MediaRequest_GetPart::default_instance_->InitAsDefaultInstance(); + MediaRequest_Terminate::default_instance_->InitAsDefaultInstance(); + MediaResponse::default_instance_->InitAsDefaultInstance(); + MediaResponse_MediaPart::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_media_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_media_2eproto { + StaticDescriptorInitializer_media_2eproto() { + protobuf_AddDesc_media_2eproto(); + } +} static_descriptor_initializer_media_2eproto_; +const ::google::protobuf::EnumDescriptor* CodecType_descriptor() { + protobuf_AssignDescriptorsOnce(); + return CodecType_descriptor_; +} +bool CodecType_IsValid(int value) { + switch(value) { + case 1: + return true; + default: + return false; + } +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* MediaRequest_Type_descriptor() { + protobuf_AssignDescriptorsOnce(); + return MediaRequest_Type_descriptor_; +} +bool MediaRequest_Type_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const MediaRequest_Type MediaRequest::TypeMediaPrepare; +const MediaRequest_Type MediaRequest::TypeMediaGet; +const MediaRequest_Type MediaRequest::TypeMediaTerminate; +const MediaRequest_Type MediaRequest::Type_MIN; +const MediaRequest_Type MediaRequest::Type_MAX; +const int MediaRequest::Type_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int MediaRequest_Prepare::kIdFieldNumber; +const int MediaRequest_Prepare::kOffsetSecsFieldNumber; +const int MediaRequest_Prepare::kCodecTypeFieldNumber; +const int MediaRequest_Prepare::kAudioBitrateFieldNumber; +const int MediaRequest_Prepare::kVideoBitrateFieldNumber; +const int MediaRequest_Prepare::kAudioStreamIdxFieldNumber; +const int MediaRequest_Prepare::kVideoStreamIdxFieldNumber; +const int MediaRequest_Prepare::kSubtitleStreamIdxFieldNumber; +#endif // !_MSC_VER + +MediaRequest_Prepare::MediaRequest_Prepare() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void MediaRequest_Prepare::InitAsDefaultInstance() { +} + +MediaRequest_Prepare::MediaRequest_Prepare(const MediaRequest_Prepare& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void MediaRequest_Prepare::SharedCtor() { + _cached_size_ = 0; + id_ = GOOGLE_LONGLONG(0); + offset_secs_ = 0u; + codec_type_ = 1; + audio_bitrate_ = 0u; + video_bitrate_ = 0u; + audio_stream_idx_ = 0u; + video_stream_idx_ = 0u; + subtitle_stream_idx_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +MediaRequest_Prepare::~MediaRequest_Prepare() { + SharedDtor(); +} + +void MediaRequest_Prepare::SharedDtor() { + if (this != default_instance_) { + } +} + +void MediaRequest_Prepare::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* MediaRequest_Prepare::descriptor() { + protobuf_AssignDescriptorsOnce(); + return MediaRequest_Prepare_descriptor_; +} + +const MediaRequest_Prepare& MediaRequest_Prepare::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_media_2eproto(); + return *default_instance_; +} + +MediaRequest_Prepare* MediaRequest_Prepare::default_instance_ = NULL; + +MediaRequest_Prepare* MediaRequest_Prepare::New() const { + return new MediaRequest_Prepare; +} + +void MediaRequest_Prepare::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + id_ = GOOGLE_LONGLONG(0); + offset_secs_ = 0u; + codec_type_ = 1; + audio_bitrate_ = 0u; + video_bitrate_ = 0u; + audio_stream_idx_ = 0u; + video_stream_idx_ = 0u; + subtitle_stream_idx_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool MediaRequest_Prepare::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 int64 id = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &id_))); + set_has_id(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_offset_secs; + break; + } + + // required uint32 offset_secs = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_offset_secs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &offset_secs_))); + set_has_offset_secs(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(24)) goto parse_codec_type; + break; + } + + // optional .CodecType codec_type = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_codec_type: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::CodecType_IsValid(value)) { + set_codec_type(static_cast< ::CodecType >(value)); + } else { + mutable_unknown_fields()->AddVarint(3, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(32)) goto parse_audio_bitrate; + break; + } + + // optional uint32 audio_bitrate = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_audio_bitrate: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &audio_bitrate_))); + set_has_audio_bitrate(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(40)) goto parse_video_bitrate; + break; + } + + // optional uint32 video_bitrate = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_video_bitrate: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &video_bitrate_))); + set_has_video_bitrate(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(48)) goto parse_audio_stream_idx; + break; + } + + // optional uint32 audio_stream_idx = 6; + case 6: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_audio_stream_idx: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &audio_stream_idx_))); + set_has_audio_stream_idx(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(56)) goto parse_video_stream_idx; + break; + } + + // optional uint32 video_stream_idx = 7; + case 7: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_video_stream_idx: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &video_stream_idx_))); + set_has_video_stream_idx(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(64)) goto parse_subtitle_stream_idx; + break; + } + + // optional uint32 subtitle_stream_idx = 8; + case 8: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_subtitle_stream_idx: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &subtitle_stream_idx_))); + set_has_subtitle_stream_idx(); + } 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 MediaRequest_Prepare::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required int64 id = 1; + if (has_id()) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->id(), output); + } + + // required uint32 offset_secs = 2; + if (has_offset_secs()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->offset_secs(), output); + } + + // optional .CodecType codec_type = 3; + if (has_codec_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 3, this->codec_type(), output); + } + + // optional uint32 audio_bitrate = 4; + if (has_audio_bitrate()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->audio_bitrate(), output); + } + + // optional uint32 video_bitrate = 5; + if (has_video_bitrate()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->video_bitrate(), output); + } + + // optional uint32 audio_stream_idx = 6; + if (has_audio_stream_idx()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->audio_stream_idx(), output); + } + + // optional uint32 video_stream_idx = 7; + if (has_video_stream_idx()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->video_stream_idx(), output); + } + + // optional uint32 subtitle_stream_idx = 8; + if (has_subtitle_stream_idx()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->subtitle_stream_idx(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* MediaRequest_Prepare::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required int64 id = 1; + if (has_id()) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->id(), target); + } + + // required uint32 offset_secs = 2; + if (has_offset_secs()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->offset_secs(), target); + } + + // optional .CodecType codec_type = 3; + if (has_codec_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 3, this->codec_type(), target); + } + + // optional uint32 audio_bitrate = 4; + if (has_audio_bitrate()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->audio_bitrate(), target); + } + + // optional uint32 video_bitrate = 5; + if (has_video_bitrate()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->video_bitrate(), target); + } + + // optional uint32 audio_stream_idx = 6; + if (has_audio_stream_idx()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->audio_stream_idx(), target); + } + + // optional uint32 video_stream_idx = 7; + if (has_video_stream_idx()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->video_stream_idx(), target); + } + + // optional uint32 subtitle_stream_idx = 8; + if (has_subtitle_stream_idx()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->subtitle_stream_idx(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int MediaRequest_Prepare::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required int64 id = 1; + if (has_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->id()); + } + + // required uint32 offset_secs = 2; + if (has_offset_secs()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->offset_secs()); + } + + // optional .CodecType codec_type = 3; + if (has_codec_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->codec_type()); + } + + // optional uint32 audio_bitrate = 4; + if (has_audio_bitrate()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->audio_bitrate()); + } + + // optional uint32 video_bitrate = 5; + if (has_video_bitrate()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->video_bitrate()); + } + + // optional uint32 audio_stream_idx = 6; + if (has_audio_stream_idx()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->audio_stream_idx()); + } + + // optional uint32 video_stream_idx = 7; + if (has_video_stream_idx()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->video_stream_idx()); + } + + // optional uint32 subtitle_stream_idx = 8; + if (has_subtitle_stream_idx()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->subtitle_stream_idx()); + } + + } + 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 MediaRequest_Prepare::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const MediaRequest_Prepare* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void MediaRequest_Prepare::MergeFrom(const MediaRequest_Prepare& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_id()) { + set_id(from.id()); + } + if (from.has_offset_secs()) { + set_offset_secs(from.offset_secs()); + } + if (from.has_codec_type()) { + set_codec_type(from.codec_type()); + } + if (from.has_audio_bitrate()) { + set_audio_bitrate(from.audio_bitrate()); + } + if (from.has_video_bitrate()) { + set_video_bitrate(from.video_bitrate()); + } + if (from.has_audio_stream_idx()) { + set_audio_stream_idx(from.audio_stream_idx()); + } + if (from.has_video_stream_idx()) { + set_video_stream_idx(from.video_stream_idx()); + } + if (from.has_subtitle_stream_idx()) { + set_subtitle_stream_idx(from.subtitle_stream_idx()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void MediaRequest_Prepare::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void MediaRequest_Prepare::CopyFrom(const MediaRequest_Prepare& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MediaRequest_Prepare::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void MediaRequest_Prepare::Swap(MediaRequest_Prepare* other) { + if (other != this) { + std::swap(id_, other->id_); + std::swap(offset_secs_, other->offset_secs_); + std::swap(codec_type_, other->codec_type_); + std::swap(audio_bitrate_, other->audio_bitrate_); + std::swap(video_bitrate_, other->video_bitrate_); + std::swap(audio_stream_idx_, other->audio_stream_idx_); + std::swap(video_stream_idx_, other->video_stream_idx_); + std::swap(subtitle_stream_idx_, other->subtitle_stream_idx_); + 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 MediaRequest_Prepare::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = MediaRequest_Prepare_descriptor_; + metadata.reflection = MediaRequest_Prepare_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int MediaRequest_GetPart::kRequestedDataSizeFieldNumber; +#endif // !_MSC_VER + +MediaRequest_GetPart::MediaRequest_GetPart() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void MediaRequest_GetPart::InitAsDefaultInstance() { +} + +MediaRequest_GetPart::MediaRequest_GetPart(const MediaRequest_GetPart& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void MediaRequest_GetPart::SharedCtor() { + _cached_size_ = 0; + requested_data_size_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +MediaRequest_GetPart::~MediaRequest_GetPart() { + SharedDtor(); +} + +void MediaRequest_GetPart::SharedDtor() { + if (this != default_instance_) { + } +} + +void MediaRequest_GetPart::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* MediaRequest_GetPart::descriptor() { + protobuf_AssignDescriptorsOnce(); + return MediaRequest_GetPart_descriptor_; +} + +const MediaRequest_GetPart& MediaRequest_GetPart::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_media_2eproto(); + return *default_instance_; +} + +MediaRequest_GetPart* MediaRequest_GetPart::default_instance_ = NULL; + +MediaRequest_GetPart* MediaRequest_GetPart::New() const { + return new MediaRequest_GetPart; +} + +void MediaRequest_GetPart::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + requested_data_size_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool MediaRequest_GetPart::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 requested_data_size = 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, &requested_data_size_))); + set_has_requested_data_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 MediaRequest_GetPart::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 requested_data_size = 1; + if (has_requested_data_size()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->requested_data_size(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* MediaRequest_GetPart::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required uint32 requested_data_size = 1; + if (has_requested_data_size()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->requested_data_size(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int MediaRequest_GetPart::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 requested_data_size = 1; + if (has_requested_data_size()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->requested_data_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 MediaRequest_GetPart::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const MediaRequest_GetPart* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void MediaRequest_GetPart::MergeFrom(const MediaRequest_GetPart& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_requested_data_size()) { + set_requested_data_size(from.requested_data_size()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void MediaRequest_GetPart::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void MediaRequest_GetPart::CopyFrom(const MediaRequest_GetPart& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MediaRequest_GetPart::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void MediaRequest_GetPart::Swap(MediaRequest_GetPart* other) { + if (other != this) { + std::swap(requested_data_size_, other->requested_data_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 MediaRequest_GetPart::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = MediaRequest_GetPart_descriptor_; + metadata.reflection = MediaRequest_GetPart_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +#endif // !_MSC_VER + +MediaRequest_Terminate::MediaRequest_Terminate() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void MediaRequest_Terminate::InitAsDefaultInstance() { +} + +MediaRequest_Terminate::MediaRequest_Terminate(const MediaRequest_Terminate& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void MediaRequest_Terminate::SharedCtor() { + _cached_size_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +MediaRequest_Terminate::~MediaRequest_Terminate() { + SharedDtor(); +} + +void MediaRequest_Terminate::SharedDtor() { + if (this != default_instance_) { + } +} + +void MediaRequest_Terminate::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* MediaRequest_Terminate::descriptor() { + protobuf_AssignDescriptorsOnce(); + return MediaRequest_Terminate_descriptor_; +} + +const MediaRequest_Terminate& MediaRequest_Terminate::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_media_2eproto(); + return *default_instance_; +} + +MediaRequest_Terminate* MediaRequest_Terminate::default_instance_ = NULL; + +MediaRequest_Terminate* MediaRequest_Terminate::New() const { + return new MediaRequest_Terminate; +} + +void MediaRequest_Terminate::Clear() { + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool MediaRequest_Terminate::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + 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())); + } + return true; +#undef DO_ +} + +void MediaRequest_Terminate::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* MediaRequest_Terminate::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int MediaRequest_Terminate::ByteSize() const { + int total_size = 0; + + 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 MediaRequest_Terminate::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const MediaRequest_Terminate* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void MediaRequest_Terminate::MergeFrom(const MediaRequest_Terminate& from) { + GOOGLE_CHECK_NE(&from, this); + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void MediaRequest_Terminate::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void MediaRequest_Terminate::CopyFrom(const MediaRequest_Terminate& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MediaRequest_Terminate::IsInitialized() const { + + return true; +} + +void MediaRequest_Terminate::Swap(MediaRequest_Terminate* other) { + if (other != this) { + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata MediaRequest_Terminate::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = MediaRequest_Terminate_descriptor_; + metadata.reflection = MediaRequest_Terminate_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int MediaRequest::kRequestTypeFieldNumber; +const int MediaRequest::kPrepareFieldNumber; +const int MediaRequest::kGetPartFieldNumber; +const int MediaRequest::kTerminateFieldNumber; +#endif // !_MSC_VER + +MediaRequest::MediaRequest() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void MediaRequest::InitAsDefaultInstance() { + prepare_ = const_cast< ::MediaRequest_Prepare*>(&::MediaRequest_Prepare::default_instance()); + get_part_ = const_cast< ::MediaRequest_GetPart*>(&::MediaRequest_GetPart::default_instance()); + terminate_ = const_cast< ::MediaRequest_Terminate*>(&::MediaRequest_Terminate::default_instance()); +} + +MediaRequest::MediaRequest(const MediaRequest& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void MediaRequest::SharedCtor() { + _cached_size_ = 0; + request_type_ = 1; + prepare_ = NULL; + get_part_ = NULL; + terminate_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +MediaRequest::~MediaRequest() { + SharedDtor(); +} + +void MediaRequest::SharedDtor() { + if (this != default_instance_) { + delete prepare_; + delete get_part_; + delete terminate_; + } +} + +void MediaRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* MediaRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return MediaRequest_descriptor_; +} + +const MediaRequest& MediaRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_media_2eproto(); + return *default_instance_; +} + +MediaRequest* MediaRequest::default_instance_ = NULL; + +MediaRequest* MediaRequest::New() const { + return new MediaRequest; +} + +void MediaRequest::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + request_type_ = 1; + if (has_prepare()) { + if (prepare_ != NULL) prepare_->::MediaRequest_Prepare::Clear(); + } + if (has_get_part()) { + if (get_part_ != NULL) get_part_->::MediaRequest_GetPart::Clear(); + } + if (has_terminate()) { + if (terminate_ != NULL) terminate_->::MediaRequest_Terminate::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool MediaRequest::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 .MediaRequest.Type request_type = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::MediaRequest_Type_IsValid(value)) { + set_request_type(static_cast< ::MediaRequest_Type >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_prepare; + break; + } + + // optional .MediaRequest.Prepare prepare = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_prepare: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_prepare())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_get_part; + break; + } + + // optional .MediaRequest.GetPart get_part = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_get_part: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_get_part())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_terminate; + break; + } + + // optional .MediaRequest.Terminate terminate = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_terminate: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_terminate())); + } 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 MediaRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .MediaRequest.Type request_type = 1; + if (has_request_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->request_type(), output); + } + + // optional .MediaRequest.Prepare prepare = 2; + if (has_prepare()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->prepare(), output); + } + + // optional .MediaRequest.GetPart get_part = 3; + if (has_get_part()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->get_part(), output); + } + + // optional .MediaRequest.Terminate terminate = 4; + if (has_terminate()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->terminate(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* MediaRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .MediaRequest.Type request_type = 1; + if (has_request_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->request_type(), target); + } + + // optional .MediaRequest.Prepare prepare = 2; + if (has_prepare()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->prepare(), target); + } + + // optional .MediaRequest.GetPart get_part = 3; + if (has_get_part()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->get_part(), target); + } + + // optional .MediaRequest.Terminate terminate = 4; + if (has_terminate()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->terminate(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int MediaRequest::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .MediaRequest.Type request_type = 1; + if (has_request_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->request_type()); + } + + // optional .MediaRequest.Prepare prepare = 2; + if (has_prepare()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->prepare()); + } + + // optional .MediaRequest.GetPart get_part = 3; + if (has_get_part()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->get_part()); + } + + // optional .MediaRequest.Terminate terminate = 4; + if (has_terminate()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->terminate()); + } + + } + 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 MediaRequest::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const MediaRequest* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void MediaRequest::MergeFrom(const MediaRequest& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_request_type()) { + set_request_type(from.request_type()); + } + if (from.has_prepare()) { + mutable_prepare()->::MediaRequest_Prepare::MergeFrom(from.prepare()); + } + if (from.has_get_part()) { + mutable_get_part()->::MediaRequest_GetPart::MergeFrom(from.get_part()); + } + if (from.has_terminate()) { + mutable_terminate()->::MediaRequest_Terminate::MergeFrom(from.terminate()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void MediaRequest::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void MediaRequest::CopyFrom(const MediaRequest& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MediaRequest::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_prepare()) { + if (!this->prepare().IsInitialized()) return false; + } + if (has_get_part()) { + if (!this->get_part().IsInitialized()) return false; + } + return true; +} + +void MediaRequest::Swap(MediaRequest* other) { + if (other != this) { + std::swap(request_type_, other->request_type_); + std::swap(prepare_, other->prepare_); + std::swap(get_part_, other->get_part_); + std::swap(terminate_, other->terminate_); + 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 MediaRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = MediaRequest_descriptor_; + metadata.reflection = MediaRequest_reflection_; + return metadata; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* MediaResponse_Type_descriptor() { + protobuf_AssignDescriptorsOnce(); + return MediaResponse_Type_descriptor_; +} +bool MediaResponse_Type_IsValid(int value) { + switch(value) { + case 1: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const MediaResponse_Type MediaResponse::TypeMediaPart; +const MediaResponse_Type MediaResponse::Type_MIN; +const MediaResponse_Type MediaResponse::Type_MAX; +const int MediaResponse::Type_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int MediaResponse_MediaPart::kByteOffsetFieldNumber; +const int MediaResponse_MediaPart::kDataFieldNumber; +#endif // !_MSC_VER + +MediaResponse_MediaPart::MediaResponse_MediaPart() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void MediaResponse_MediaPart::InitAsDefaultInstance() { +} + +MediaResponse_MediaPart::MediaResponse_MediaPart(const MediaResponse_MediaPart& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void MediaResponse_MediaPart::SharedCtor() { + _cached_size_ = 0; + byte_offset_ = GOOGLE_ULONGLONG(0); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +MediaResponse_MediaPart::~MediaResponse_MediaPart() { + SharedDtor(); +} + +void MediaResponse_MediaPart::SharedDtor() { + if (this != default_instance_) { + } +} + +void MediaResponse_MediaPart::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* MediaResponse_MediaPart::descriptor() { + protobuf_AssignDescriptorsOnce(); + return MediaResponse_MediaPart_descriptor_; +} + +const MediaResponse_MediaPart& MediaResponse_MediaPart::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_media_2eproto(); + return *default_instance_; +} + +MediaResponse_MediaPart* MediaResponse_MediaPart::default_instance_ = NULL; + +MediaResponse_MediaPart* MediaResponse_MediaPart::New() const { + return new MediaResponse_MediaPart; +} + +void MediaResponse_MediaPart::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + byte_offset_ = GOOGLE_ULONGLONG(0); + } + data_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool MediaResponse_MediaPart::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 uint64 byte_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::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &byte_offset_))); + set_has_byte_offset(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_data; + break; + } + + // repeated bytes data = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_data: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->add_data())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_data; + 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 MediaResponse_MediaPart::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint64 byte_offset = 1; + if (has_byte_offset()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->byte_offset(), output); + } + + // repeated bytes data = 2; + for (int i = 0; i < this->data_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 2, this->data(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* MediaResponse_MediaPart::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required uint64 byte_offset = 1; + if (has_byte_offset()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->byte_offset(), target); + } + + // repeated bytes data = 2; + for (int i = 0; i < this->data_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBytesToArray(2, this->data(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int MediaResponse_MediaPart::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint64 byte_offset = 1; + if (has_byte_offset()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->byte_offset()); + } + + } + // repeated bytes data = 2; + total_size += 1 * this->data_size(); + for (int i = 0; i < this->data_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this->data(i)); + } + + 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 MediaResponse_MediaPart::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const MediaResponse_MediaPart* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void MediaResponse_MediaPart::MergeFrom(const MediaResponse_MediaPart& from) { + GOOGLE_CHECK_NE(&from, this); + data_.MergeFrom(from.data_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_byte_offset()) { + set_byte_offset(from.byte_offset()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void MediaResponse_MediaPart::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void MediaResponse_MediaPart::CopyFrom(const MediaResponse_MediaPart& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MediaResponse_MediaPart::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void MediaResponse_MediaPart::Swap(MediaResponse_MediaPart* other) { + if (other != this) { + std::swap(byte_offset_, other->byte_offset_); + data_.Swap(&other->data_); + 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 MediaResponse_MediaPart::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = MediaResponse_MediaPart_descriptor_; + metadata.reflection = MediaResponse_MediaPart_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int MediaResponse::kErrorFieldNumber; +const int MediaResponse::kResponseTypeFieldNumber; +const int MediaResponse::kPartFieldNumber; +#endif // !_MSC_VER + +MediaResponse::MediaResponse() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void MediaResponse::InitAsDefaultInstance() { + error_ = const_cast< ::Error*>(&::Error::default_instance()); + part_ = const_cast< ::MediaResponse_MediaPart*>(&::MediaResponse_MediaPart::default_instance()); +} + +MediaResponse::MediaResponse(const MediaResponse& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void MediaResponse::SharedCtor() { + _cached_size_ = 0; + error_ = NULL; + response_type_ = 1; + part_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +MediaResponse::~MediaResponse() { + SharedDtor(); +} + +void MediaResponse::SharedDtor() { + if (this != default_instance_) { + delete error_; + delete part_; + } +} + +void MediaResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* MediaResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return MediaResponse_descriptor_; +} + +const MediaResponse& MediaResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_media_2eproto(); + return *default_instance_; +} + +MediaResponse* MediaResponse::default_instance_ = NULL; + +MediaResponse* MediaResponse::New() const { + return new MediaResponse; +} + +void MediaResponse::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_error()) { + if (error_ != NULL) error_->::Error::Clear(); + } + response_type_ = 1; + if (has_part()) { + if (part_ != NULL) part_->::MediaResponse_MediaPart::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool MediaResponse::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 .Error error = 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_response_type; + break; + } + + // required .MediaResponse.Type response_type = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_response_type: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::MediaResponse_Type_IsValid(value)) { + set_response_type(static_cast< ::MediaResponse_Type >(value)); + } else { + mutable_unknown_fields()->AddVarint(2, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_part; + break; + } + + // optional .MediaResponse.MediaPart part = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_part: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_part())); + } 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 MediaResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .Error error = 1; + if (has_error()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->error(), output); + } + + // required .MediaResponse.Type response_type = 2; + if (has_response_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->response_type(), output); + } + + // optional .MediaResponse.MediaPart part = 3; + if (has_part()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->part(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* MediaResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .Error error = 1; + if (has_error()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->error(), target); + } + + // required .MediaResponse.Type response_type = 2; + if (has_response_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->response_type(), target); + } + + // optional .MediaResponse.MediaPart part = 3; + if (has_part()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->part(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int MediaResponse::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .Error error = 1; + if (has_error()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->error()); + } + + // required .MediaResponse.Type response_type = 2; + if (has_response_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->response_type()); + } + + // optional .MediaResponse.MediaPart part = 3; + if (has_part()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->part()); + } + + } + 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 MediaResponse::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const MediaResponse* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void MediaResponse::MergeFrom(const MediaResponse& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_error()) { + mutable_error()->::Error::MergeFrom(from.error()); + } + if (from.has_response_type()) { + set_response_type(from.response_type()); + } + if (from.has_part()) { + mutable_part()->::MediaResponse_MediaPart::MergeFrom(from.part()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void MediaResponse::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void MediaResponse::CopyFrom(const MediaResponse& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MediaResponse::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + if (has_error()) { + if (!this->error().IsInitialized()) return false; + } + if (has_part()) { + if (!this->part().IsInitialized()) return false; + } + return true; +} + +void MediaResponse::Swap(MediaResponse* other) { + if (other != this) { + std::swap(error_, other->error_); + std::swap(response_type_, other->response_type_); + std::swap(part_, other->part_); + 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 MediaResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = MediaResponse_descriptor_; + metadata.reflection = MediaResponse_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +// @@protoc_insertion_point(global_scope) diff --git a/remote/proto/media.pb.h b/remote/proto/media.pb.h new file mode 100644 index 00000000..efb0c103 --- /dev/null +++ b/remote/proto/media.pb.h @@ -0,0 +1,1336 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: media.proto + +#ifndef PROTOBUF_media_2eproto__INCLUDED +#define PROTOBUF_media_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2005000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include "common.pb.h" +// @@protoc_insertion_point(includes) + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_media_2eproto(); +void protobuf_AssignDesc_media_2eproto(); +void protobuf_ShutdownFile_media_2eproto(); + +class MediaRequest; +class MediaRequest_Prepare; +class MediaRequest_GetPart; +class MediaRequest_Terminate; +class MediaResponse; +class MediaResponse_MediaPart; + +enum MediaRequest_Type { + MediaRequest_Type_TypeMediaPrepare = 1, + MediaRequest_Type_TypeMediaGet = 2, + MediaRequest_Type_TypeMediaTerminate = 3 +}; +bool MediaRequest_Type_IsValid(int value); +const MediaRequest_Type MediaRequest_Type_Type_MIN = MediaRequest_Type_TypeMediaPrepare; +const MediaRequest_Type MediaRequest_Type_Type_MAX = MediaRequest_Type_TypeMediaTerminate; +const int MediaRequest_Type_Type_ARRAYSIZE = MediaRequest_Type_Type_MAX + 1; + +const ::google::protobuf::EnumDescriptor* MediaRequest_Type_descriptor(); +inline const ::std::string& MediaRequest_Type_Name(MediaRequest_Type value) { + return ::google::protobuf::internal::NameOfEnum( + MediaRequest_Type_descriptor(), value); +} +inline bool MediaRequest_Type_Parse( + const ::std::string& name, MediaRequest_Type* value) { + return ::google::protobuf::internal::ParseNamedEnum( + MediaRequest_Type_descriptor(), name, value); +} +enum MediaResponse_Type { + MediaResponse_Type_TypeMediaPart = 1 +}; +bool MediaResponse_Type_IsValid(int value); +const MediaResponse_Type MediaResponse_Type_Type_MIN = MediaResponse_Type_TypeMediaPart; +const MediaResponse_Type MediaResponse_Type_Type_MAX = MediaResponse_Type_TypeMediaPart; +const int MediaResponse_Type_Type_ARRAYSIZE = MediaResponse_Type_Type_MAX + 1; + +const ::google::protobuf::EnumDescriptor* MediaResponse_Type_descriptor(); +inline const ::std::string& MediaResponse_Type_Name(MediaResponse_Type value) { + return ::google::protobuf::internal::NameOfEnum( + MediaResponse_Type_descriptor(), value); +} +inline bool MediaResponse_Type_Parse( + const ::std::string& name, MediaResponse_Type* value) { + return ::google::protobuf::internal::ParseNamedEnum( + MediaResponse_Type_descriptor(), name, value); +} +enum CodecType { + CodecTypeOGG = 1 +}; +bool CodecType_IsValid(int value); +const CodecType CodecType_MIN = CodecTypeOGG; +const CodecType CodecType_MAX = CodecTypeOGG; +const int CodecType_ARRAYSIZE = CodecType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* CodecType_descriptor(); +inline const ::std::string& CodecType_Name(CodecType value) { + return ::google::protobuf::internal::NameOfEnum( + CodecType_descriptor(), value); +} +inline bool CodecType_Parse( + const ::std::string& name, CodecType* value) { + return ::google::protobuf::internal::ParseNamedEnum( + CodecType_descriptor(), name, value); +} +// =================================================================== + +class MediaRequest_Prepare : public ::google::protobuf::Message { + public: + MediaRequest_Prepare(); + virtual ~MediaRequest_Prepare(); + + MediaRequest_Prepare(const MediaRequest_Prepare& from); + + inline MediaRequest_Prepare& operator=(const MediaRequest_Prepare& 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 MediaRequest_Prepare& default_instance(); + + void Swap(MediaRequest_Prepare* other); + + // implements Message ---------------------------------------------- + + MediaRequest_Prepare* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const MediaRequest_Prepare& from); + void MergeFrom(const MediaRequest_Prepare& 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 int64 id = 1; + inline bool has_id() const; + inline void clear_id(); + static const int kIdFieldNumber = 1; + inline ::google::protobuf::int64 id() const; + inline void set_id(::google::protobuf::int64 value); + + // required uint32 offset_secs = 2; + inline bool has_offset_secs() const; + inline void clear_offset_secs(); + static const int kOffsetSecsFieldNumber = 2; + inline ::google::protobuf::uint32 offset_secs() const; + inline void set_offset_secs(::google::protobuf::uint32 value); + + // optional .CodecType codec_type = 3; + inline bool has_codec_type() const; + inline void clear_codec_type(); + static const int kCodecTypeFieldNumber = 3; + inline ::CodecType codec_type() const; + inline void set_codec_type(::CodecType value); + + // optional uint32 audio_bitrate = 4; + inline bool has_audio_bitrate() const; + inline void clear_audio_bitrate(); + static const int kAudioBitrateFieldNumber = 4; + inline ::google::protobuf::uint32 audio_bitrate() const; + inline void set_audio_bitrate(::google::protobuf::uint32 value); + + // optional uint32 video_bitrate = 5; + inline bool has_video_bitrate() const; + inline void clear_video_bitrate(); + static const int kVideoBitrateFieldNumber = 5; + inline ::google::protobuf::uint32 video_bitrate() const; + inline void set_video_bitrate(::google::protobuf::uint32 value); + + // optional uint32 audio_stream_idx = 6; + inline bool has_audio_stream_idx() const; + inline void clear_audio_stream_idx(); + static const int kAudioStreamIdxFieldNumber = 6; + inline ::google::protobuf::uint32 audio_stream_idx() const; + inline void set_audio_stream_idx(::google::protobuf::uint32 value); + + // optional uint32 video_stream_idx = 7; + inline bool has_video_stream_idx() const; + inline void clear_video_stream_idx(); + static const int kVideoStreamIdxFieldNumber = 7; + inline ::google::protobuf::uint32 video_stream_idx() const; + inline void set_video_stream_idx(::google::protobuf::uint32 value); + + // optional uint32 subtitle_stream_idx = 8; + inline bool has_subtitle_stream_idx() const; + inline void clear_subtitle_stream_idx(); + static const int kSubtitleStreamIdxFieldNumber = 8; + inline ::google::protobuf::uint32 subtitle_stream_idx() const; + inline void set_subtitle_stream_idx(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:MediaRequest.Prepare) + private: + inline void set_has_id(); + inline void clear_has_id(); + inline void set_has_offset_secs(); + inline void clear_has_offset_secs(); + inline void set_has_codec_type(); + inline void clear_has_codec_type(); + inline void set_has_audio_bitrate(); + inline void clear_has_audio_bitrate(); + inline void set_has_video_bitrate(); + inline void clear_has_video_bitrate(); + inline void set_has_audio_stream_idx(); + inline void clear_has_audio_stream_idx(); + inline void set_has_video_stream_idx(); + inline void clear_has_video_stream_idx(); + inline void set_has_subtitle_stream_idx(); + inline void clear_has_subtitle_stream_idx(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::int64 id_; + ::google::protobuf::uint32 offset_secs_; + int codec_type_; + ::google::protobuf::uint32 audio_bitrate_; + ::google::protobuf::uint32 video_bitrate_; + ::google::protobuf::uint32 audio_stream_idx_; + ::google::protobuf::uint32 video_stream_idx_; + ::google::protobuf::uint32 subtitle_stream_idx_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; + + friend void protobuf_AddDesc_media_2eproto(); + friend void protobuf_AssignDesc_media_2eproto(); + friend void protobuf_ShutdownFile_media_2eproto(); + + void InitAsDefaultInstance(); + static MediaRequest_Prepare* default_instance_; +}; +// ------------------------------------------------------------------- + +class MediaRequest_GetPart : public ::google::protobuf::Message { + public: + MediaRequest_GetPart(); + virtual ~MediaRequest_GetPart(); + + MediaRequest_GetPart(const MediaRequest_GetPart& from); + + inline MediaRequest_GetPart& operator=(const MediaRequest_GetPart& 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 MediaRequest_GetPart& default_instance(); + + void Swap(MediaRequest_GetPart* other); + + // implements Message ---------------------------------------------- + + MediaRequest_GetPart* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const MediaRequest_GetPart& from); + void MergeFrom(const MediaRequest_GetPart& 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 requested_data_size = 1; + inline bool has_requested_data_size() const; + inline void clear_requested_data_size(); + static const int kRequestedDataSizeFieldNumber = 1; + inline ::google::protobuf::uint32 requested_data_size() const; + inline void set_requested_data_size(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:MediaRequest.GetPart) + private: + inline void set_has_requested_data_size(); + inline void clear_has_requested_data_size(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 requested_data_size_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_media_2eproto(); + friend void protobuf_AssignDesc_media_2eproto(); + friend void protobuf_ShutdownFile_media_2eproto(); + + void InitAsDefaultInstance(); + static MediaRequest_GetPart* default_instance_; +}; +// ------------------------------------------------------------------- + +class MediaRequest_Terminate : public ::google::protobuf::Message { + public: + MediaRequest_Terminate(); + virtual ~MediaRequest_Terminate(); + + MediaRequest_Terminate(const MediaRequest_Terminate& from); + + inline MediaRequest_Terminate& operator=(const MediaRequest_Terminate& 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 MediaRequest_Terminate& default_instance(); + + void Swap(MediaRequest_Terminate* other); + + // implements Message ---------------------------------------------- + + MediaRequest_Terminate* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const MediaRequest_Terminate& from); + void MergeFrom(const MediaRequest_Terminate& 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 ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:MediaRequest.Terminate) + private: + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[1]; + + friend void protobuf_AddDesc_media_2eproto(); + friend void protobuf_AssignDesc_media_2eproto(); + friend void protobuf_ShutdownFile_media_2eproto(); + + void InitAsDefaultInstance(); + static MediaRequest_Terminate* default_instance_; +}; +// ------------------------------------------------------------------- + +class MediaRequest : public ::google::protobuf::Message { + public: + MediaRequest(); + virtual ~MediaRequest(); + + MediaRequest(const MediaRequest& from); + + inline MediaRequest& operator=(const MediaRequest& 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 MediaRequest& default_instance(); + + void Swap(MediaRequest* other); + + // implements Message ---------------------------------------------- + + MediaRequest* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const MediaRequest& from); + void MergeFrom(const MediaRequest& 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 ---------------------------------------------------- + + typedef MediaRequest_Prepare Prepare; + typedef MediaRequest_GetPart GetPart; + typedef MediaRequest_Terminate Terminate; + + typedef MediaRequest_Type Type; + static const Type TypeMediaPrepare = MediaRequest_Type_TypeMediaPrepare; + static const Type TypeMediaGet = MediaRequest_Type_TypeMediaGet; + static const Type TypeMediaTerminate = MediaRequest_Type_TypeMediaTerminate; + static inline bool Type_IsValid(int value) { + return MediaRequest_Type_IsValid(value); + } + static const Type Type_MIN = + MediaRequest_Type_Type_MIN; + static const Type Type_MAX = + MediaRequest_Type_Type_MAX; + static const int Type_ARRAYSIZE = + MediaRequest_Type_Type_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + Type_descriptor() { + return MediaRequest_Type_descriptor(); + } + static inline const ::std::string& Type_Name(Type value) { + return MediaRequest_Type_Name(value); + } + static inline bool Type_Parse(const ::std::string& name, + Type* value) { + return MediaRequest_Type_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .MediaRequest.Type request_type = 1; + inline bool has_request_type() const; + inline void clear_request_type(); + static const int kRequestTypeFieldNumber = 1; + inline ::MediaRequest_Type request_type() const; + inline void set_request_type(::MediaRequest_Type value); + + // optional .MediaRequest.Prepare prepare = 2; + inline bool has_prepare() const; + inline void clear_prepare(); + static const int kPrepareFieldNumber = 2; + inline const ::MediaRequest_Prepare& prepare() const; + inline ::MediaRequest_Prepare* mutable_prepare(); + inline ::MediaRequest_Prepare* release_prepare(); + inline void set_allocated_prepare(::MediaRequest_Prepare* prepare); + + // optional .MediaRequest.GetPart get_part = 3; + inline bool has_get_part() const; + inline void clear_get_part(); + static const int kGetPartFieldNumber = 3; + inline const ::MediaRequest_GetPart& get_part() const; + inline ::MediaRequest_GetPart* mutable_get_part(); + inline ::MediaRequest_GetPart* release_get_part(); + inline void set_allocated_get_part(::MediaRequest_GetPart* get_part); + + // optional .MediaRequest.Terminate terminate = 4; + inline bool has_terminate() const; + inline void clear_terminate(); + static const int kTerminateFieldNumber = 4; + inline const ::MediaRequest_Terminate& terminate() const; + inline ::MediaRequest_Terminate* mutable_terminate(); + inline ::MediaRequest_Terminate* release_terminate(); + inline void set_allocated_terminate(::MediaRequest_Terminate* terminate); + + // @@protoc_insertion_point(class_scope:MediaRequest) + private: + inline void set_has_request_type(); + inline void clear_has_request_type(); + inline void set_has_prepare(); + inline void clear_has_prepare(); + inline void set_has_get_part(); + inline void clear_has_get_part(); + inline void set_has_terminate(); + inline void clear_has_terminate(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::MediaRequest_Prepare* prepare_; + ::MediaRequest_GetPart* get_part_; + ::MediaRequest_Terminate* terminate_; + int request_type_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_media_2eproto(); + friend void protobuf_AssignDesc_media_2eproto(); + friend void protobuf_ShutdownFile_media_2eproto(); + + void InitAsDefaultInstance(); + static MediaRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class MediaResponse_MediaPart : public ::google::protobuf::Message { + public: + MediaResponse_MediaPart(); + virtual ~MediaResponse_MediaPart(); + + MediaResponse_MediaPart(const MediaResponse_MediaPart& from); + + inline MediaResponse_MediaPart& operator=(const MediaResponse_MediaPart& 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 MediaResponse_MediaPart& default_instance(); + + void Swap(MediaResponse_MediaPart* other); + + // implements Message ---------------------------------------------- + + MediaResponse_MediaPart* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const MediaResponse_MediaPart& from); + void MergeFrom(const MediaResponse_MediaPart& 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 uint64 byte_offset = 1; + inline bool has_byte_offset() const; + inline void clear_byte_offset(); + static const int kByteOffsetFieldNumber = 1; + inline ::google::protobuf::uint64 byte_offset() const; + inline void set_byte_offset(::google::protobuf::uint64 value); + + // repeated bytes data = 2; + inline int data_size() const; + inline void clear_data(); + static const int kDataFieldNumber = 2; + inline const ::std::string& data(int index) const; + inline ::std::string* mutable_data(int index); + inline void set_data(int index, const ::std::string& value); + inline void set_data(int index, const char* value); + inline void set_data(int index, const void* value, size_t size); + inline ::std::string* add_data(); + inline void add_data(const ::std::string& value); + inline void add_data(const char* value); + inline void add_data(const void* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& data() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_data(); + + // @@protoc_insertion_point(class_scope:MediaResponse.MediaPart) + private: + inline void set_has_byte_offset(); + inline void clear_has_byte_offset(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint64 byte_offset_; + ::google::protobuf::RepeatedPtrField< ::std::string> data_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_media_2eproto(); + friend void protobuf_AssignDesc_media_2eproto(); + friend void protobuf_ShutdownFile_media_2eproto(); + + void InitAsDefaultInstance(); + static MediaResponse_MediaPart* default_instance_; +}; +// ------------------------------------------------------------------- + +class MediaResponse : public ::google::protobuf::Message { + public: + MediaResponse(); + virtual ~MediaResponse(); + + MediaResponse(const MediaResponse& from); + + inline MediaResponse& operator=(const MediaResponse& 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 MediaResponse& default_instance(); + + void Swap(MediaResponse* other); + + // implements Message ---------------------------------------------- + + MediaResponse* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const MediaResponse& from); + void MergeFrom(const MediaResponse& 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 ---------------------------------------------------- + + typedef MediaResponse_MediaPart MediaPart; + + typedef MediaResponse_Type Type; + static const Type TypeMediaPart = MediaResponse_Type_TypeMediaPart; + static inline bool Type_IsValid(int value) { + return MediaResponse_Type_IsValid(value); + } + static const Type Type_MIN = + MediaResponse_Type_Type_MIN; + static const Type Type_MAX = + MediaResponse_Type_Type_MAX; + static const int Type_ARRAYSIZE = + MediaResponse_Type_Type_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + Type_descriptor() { + return MediaResponse_Type_descriptor(); + } + static inline const ::std::string& Type_Name(Type value) { + return MediaResponse_Type_Name(value); + } + static inline bool Type_Parse(const ::std::string& name, + Type* value) { + return MediaResponse_Type_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .Error error = 1; + inline bool has_error() const; + inline void clear_error(); + static const int kErrorFieldNumber = 1; + inline const ::Error& error() const; + inline ::Error* mutable_error(); + inline ::Error* release_error(); + inline void set_allocated_error(::Error* error); + + // required .MediaResponse.Type response_type = 2; + inline bool has_response_type() const; + inline void clear_response_type(); + static const int kResponseTypeFieldNumber = 2; + inline ::MediaResponse_Type response_type() const; + inline void set_response_type(::MediaResponse_Type value); + + // optional .MediaResponse.MediaPart part = 3; + inline bool has_part() const; + inline void clear_part(); + static const int kPartFieldNumber = 3; + inline const ::MediaResponse_MediaPart& part() const; + inline ::MediaResponse_MediaPart* mutable_part(); + inline ::MediaResponse_MediaPart* release_part(); + inline void set_allocated_part(::MediaResponse_MediaPart* part); + + // @@protoc_insertion_point(class_scope:MediaResponse) + private: + inline void set_has_error(); + inline void clear_has_error(); + inline void set_has_response_type(); + inline void clear_has_response_type(); + inline void set_has_part(); + inline void clear_has_part(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::Error* error_; + ::MediaResponse_MediaPart* part_; + int response_type_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + + friend void protobuf_AddDesc_media_2eproto(); + friend void protobuf_AssignDesc_media_2eproto(); + friend void protobuf_ShutdownFile_media_2eproto(); + + void InitAsDefaultInstance(); + static MediaResponse* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// MediaRequest_Prepare + +// required int64 id = 1; +inline bool MediaRequest_Prepare::has_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void MediaRequest_Prepare::set_has_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void MediaRequest_Prepare::clear_has_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void MediaRequest_Prepare::clear_id() { + id_ = GOOGLE_LONGLONG(0); + clear_has_id(); +} +inline ::google::protobuf::int64 MediaRequest_Prepare::id() const { + return id_; +} +inline void MediaRequest_Prepare::set_id(::google::protobuf::int64 value) { + set_has_id(); + id_ = value; +} + +// required uint32 offset_secs = 2; +inline bool MediaRequest_Prepare::has_offset_secs() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void MediaRequest_Prepare::set_has_offset_secs() { + _has_bits_[0] |= 0x00000002u; +} +inline void MediaRequest_Prepare::clear_has_offset_secs() { + _has_bits_[0] &= ~0x00000002u; +} +inline void MediaRequest_Prepare::clear_offset_secs() { + offset_secs_ = 0u; + clear_has_offset_secs(); +} +inline ::google::protobuf::uint32 MediaRequest_Prepare::offset_secs() const { + return offset_secs_; +} +inline void MediaRequest_Prepare::set_offset_secs(::google::protobuf::uint32 value) { + set_has_offset_secs(); + offset_secs_ = value; +} + +// optional .CodecType codec_type = 3; +inline bool MediaRequest_Prepare::has_codec_type() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void MediaRequest_Prepare::set_has_codec_type() { + _has_bits_[0] |= 0x00000004u; +} +inline void MediaRequest_Prepare::clear_has_codec_type() { + _has_bits_[0] &= ~0x00000004u; +} +inline void MediaRequest_Prepare::clear_codec_type() { + codec_type_ = 1; + clear_has_codec_type(); +} +inline ::CodecType MediaRequest_Prepare::codec_type() const { + return static_cast< ::CodecType >(codec_type_); +} +inline void MediaRequest_Prepare::set_codec_type(::CodecType value) { + assert(::CodecType_IsValid(value)); + set_has_codec_type(); + codec_type_ = value; +} + +// optional uint32 audio_bitrate = 4; +inline bool MediaRequest_Prepare::has_audio_bitrate() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void MediaRequest_Prepare::set_has_audio_bitrate() { + _has_bits_[0] |= 0x00000008u; +} +inline void MediaRequest_Prepare::clear_has_audio_bitrate() { + _has_bits_[0] &= ~0x00000008u; +} +inline void MediaRequest_Prepare::clear_audio_bitrate() { + audio_bitrate_ = 0u; + clear_has_audio_bitrate(); +} +inline ::google::protobuf::uint32 MediaRequest_Prepare::audio_bitrate() const { + return audio_bitrate_; +} +inline void MediaRequest_Prepare::set_audio_bitrate(::google::protobuf::uint32 value) { + set_has_audio_bitrate(); + audio_bitrate_ = value; +} + +// optional uint32 video_bitrate = 5; +inline bool MediaRequest_Prepare::has_video_bitrate() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void MediaRequest_Prepare::set_has_video_bitrate() { + _has_bits_[0] |= 0x00000010u; +} +inline void MediaRequest_Prepare::clear_has_video_bitrate() { + _has_bits_[0] &= ~0x00000010u; +} +inline void MediaRequest_Prepare::clear_video_bitrate() { + video_bitrate_ = 0u; + clear_has_video_bitrate(); +} +inline ::google::protobuf::uint32 MediaRequest_Prepare::video_bitrate() const { + return video_bitrate_; +} +inline void MediaRequest_Prepare::set_video_bitrate(::google::protobuf::uint32 value) { + set_has_video_bitrate(); + video_bitrate_ = value; +} + +// optional uint32 audio_stream_idx = 6; +inline bool MediaRequest_Prepare::has_audio_stream_idx() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void MediaRequest_Prepare::set_has_audio_stream_idx() { + _has_bits_[0] |= 0x00000020u; +} +inline void MediaRequest_Prepare::clear_has_audio_stream_idx() { + _has_bits_[0] &= ~0x00000020u; +} +inline void MediaRequest_Prepare::clear_audio_stream_idx() { + audio_stream_idx_ = 0u; + clear_has_audio_stream_idx(); +} +inline ::google::protobuf::uint32 MediaRequest_Prepare::audio_stream_idx() const { + return audio_stream_idx_; +} +inline void MediaRequest_Prepare::set_audio_stream_idx(::google::protobuf::uint32 value) { + set_has_audio_stream_idx(); + audio_stream_idx_ = value; +} + +// optional uint32 video_stream_idx = 7; +inline bool MediaRequest_Prepare::has_video_stream_idx() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +inline void MediaRequest_Prepare::set_has_video_stream_idx() { + _has_bits_[0] |= 0x00000040u; +} +inline void MediaRequest_Prepare::clear_has_video_stream_idx() { + _has_bits_[0] &= ~0x00000040u; +} +inline void MediaRequest_Prepare::clear_video_stream_idx() { + video_stream_idx_ = 0u; + clear_has_video_stream_idx(); +} +inline ::google::protobuf::uint32 MediaRequest_Prepare::video_stream_idx() const { + return video_stream_idx_; +} +inline void MediaRequest_Prepare::set_video_stream_idx(::google::protobuf::uint32 value) { + set_has_video_stream_idx(); + video_stream_idx_ = value; +} + +// optional uint32 subtitle_stream_idx = 8; +inline bool MediaRequest_Prepare::has_subtitle_stream_idx() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +inline void MediaRequest_Prepare::set_has_subtitle_stream_idx() { + _has_bits_[0] |= 0x00000080u; +} +inline void MediaRequest_Prepare::clear_has_subtitle_stream_idx() { + _has_bits_[0] &= ~0x00000080u; +} +inline void MediaRequest_Prepare::clear_subtitle_stream_idx() { + subtitle_stream_idx_ = 0u; + clear_has_subtitle_stream_idx(); +} +inline ::google::protobuf::uint32 MediaRequest_Prepare::subtitle_stream_idx() const { + return subtitle_stream_idx_; +} +inline void MediaRequest_Prepare::set_subtitle_stream_idx(::google::protobuf::uint32 value) { + set_has_subtitle_stream_idx(); + subtitle_stream_idx_ = value; +} + +// ------------------------------------------------------------------- + +// MediaRequest_GetPart + +// required uint32 requested_data_size = 1; +inline bool MediaRequest_GetPart::has_requested_data_size() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void MediaRequest_GetPart::set_has_requested_data_size() { + _has_bits_[0] |= 0x00000001u; +} +inline void MediaRequest_GetPart::clear_has_requested_data_size() { + _has_bits_[0] &= ~0x00000001u; +} +inline void MediaRequest_GetPart::clear_requested_data_size() { + requested_data_size_ = 0u; + clear_has_requested_data_size(); +} +inline ::google::protobuf::uint32 MediaRequest_GetPart::requested_data_size() const { + return requested_data_size_; +} +inline void MediaRequest_GetPart::set_requested_data_size(::google::protobuf::uint32 value) { + set_has_requested_data_size(); + requested_data_size_ = value; +} + +// ------------------------------------------------------------------- + +// MediaRequest_Terminate + +// ------------------------------------------------------------------- + +// MediaRequest + +// required .MediaRequest.Type request_type = 1; +inline bool MediaRequest::has_request_type() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void MediaRequest::set_has_request_type() { + _has_bits_[0] |= 0x00000001u; +} +inline void MediaRequest::clear_has_request_type() { + _has_bits_[0] &= ~0x00000001u; +} +inline void MediaRequest::clear_request_type() { + request_type_ = 1; + clear_has_request_type(); +} +inline ::MediaRequest_Type MediaRequest::request_type() const { + return static_cast< ::MediaRequest_Type >(request_type_); +} +inline void MediaRequest::set_request_type(::MediaRequest_Type value) { + assert(::MediaRequest_Type_IsValid(value)); + set_has_request_type(); + request_type_ = value; +} + +// optional .MediaRequest.Prepare prepare = 2; +inline bool MediaRequest::has_prepare() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void MediaRequest::set_has_prepare() { + _has_bits_[0] |= 0x00000002u; +} +inline void MediaRequest::clear_has_prepare() { + _has_bits_[0] &= ~0x00000002u; +} +inline void MediaRequest::clear_prepare() { + if (prepare_ != NULL) prepare_->::MediaRequest_Prepare::Clear(); + clear_has_prepare(); +} +inline const ::MediaRequest_Prepare& MediaRequest::prepare() const { + return prepare_ != NULL ? *prepare_ : *default_instance_->prepare_; +} +inline ::MediaRequest_Prepare* MediaRequest::mutable_prepare() { + set_has_prepare(); + if (prepare_ == NULL) prepare_ = new ::MediaRequest_Prepare; + return prepare_; +} +inline ::MediaRequest_Prepare* MediaRequest::release_prepare() { + clear_has_prepare(); + ::MediaRequest_Prepare* temp = prepare_; + prepare_ = NULL; + return temp; +} +inline void MediaRequest::set_allocated_prepare(::MediaRequest_Prepare* prepare) { + delete prepare_; + prepare_ = prepare; + if (prepare) { + set_has_prepare(); + } else { + clear_has_prepare(); + } +} + +// optional .MediaRequest.GetPart get_part = 3; +inline bool MediaRequest::has_get_part() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void MediaRequest::set_has_get_part() { + _has_bits_[0] |= 0x00000004u; +} +inline void MediaRequest::clear_has_get_part() { + _has_bits_[0] &= ~0x00000004u; +} +inline void MediaRequest::clear_get_part() { + if (get_part_ != NULL) get_part_->::MediaRequest_GetPart::Clear(); + clear_has_get_part(); +} +inline const ::MediaRequest_GetPart& MediaRequest::get_part() const { + return get_part_ != NULL ? *get_part_ : *default_instance_->get_part_; +} +inline ::MediaRequest_GetPart* MediaRequest::mutable_get_part() { + set_has_get_part(); + if (get_part_ == NULL) get_part_ = new ::MediaRequest_GetPart; + return get_part_; +} +inline ::MediaRequest_GetPart* MediaRequest::release_get_part() { + clear_has_get_part(); + ::MediaRequest_GetPart* temp = get_part_; + get_part_ = NULL; + return temp; +} +inline void MediaRequest::set_allocated_get_part(::MediaRequest_GetPart* get_part) { + delete get_part_; + get_part_ = get_part; + if (get_part) { + set_has_get_part(); + } else { + clear_has_get_part(); + } +} + +// optional .MediaRequest.Terminate terminate = 4; +inline bool MediaRequest::has_terminate() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void MediaRequest::set_has_terminate() { + _has_bits_[0] |= 0x00000008u; +} +inline void MediaRequest::clear_has_terminate() { + _has_bits_[0] &= ~0x00000008u; +} +inline void MediaRequest::clear_terminate() { + if (terminate_ != NULL) terminate_->::MediaRequest_Terminate::Clear(); + clear_has_terminate(); +} +inline const ::MediaRequest_Terminate& MediaRequest::terminate() const { + return terminate_ != NULL ? *terminate_ : *default_instance_->terminate_; +} +inline ::MediaRequest_Terminate* MediaRequest::mutable_terminate() { + set_has_terminate(); + if (terminate_ == NULL) terminate_ = new ::MediaRequest_Terminate; + return terminate_; +} +inline ::MediaRequest_Terminate* MediaRequest::release_terminate() { + clear_has_terminate(); + ::MediaRequest_Terminate* temp = terminate_; + terminate_ = NULL; + return temp; +} +inline void MediaRequest::set_allocated_terminate(::MediaRequest_Terminate* terminate) { + delete terminate_; + terminate_ = terminate; + if (terminate) { + set_has_terminate(); + } else { + clear_has_terminate(); + } +} + +// ------------------------------------------------------------------- + +// MediaResponse_MediaPart + +// required uint64 byte_offset = 1; +inline bool MediaResponse_MediaPart::has_byte_offset() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void MediaResponse_MediaPart::set_has_byte_offset() { + _has_bits_[0] |= 0x00000001u; +} +inline void MediaResponse_MediaPart::clear_has_byte_offset() { + _has_bits_[0] &= ~0x00000001u; +} +inline void MediaResponse_MediaPart::clear_byte_offset() { + byte_offset_ = GOOGLE_ULONGLONG(0); + clear_has_byte_offset(); +} +inline ::google::protobuf::uint64 MediaResponse_MediaPart::byte_offset() const { + return byte_offset_; +} +inline void MediaResponse_MediaPart::set_byte_offset(::google::protobuf::uint64 value) { + set_has_byte_offset(); + byte_offset_ = value; +} + +// repeated bytes data = 2; +inline int MediaResponse_MediaPart::data_size() const { + return data_.size(); +} +inline void MediaResponse_MediaPart::clear_data() { + data_.Clear(); +} +inline const ::std::string& MediaResponse_MediaPart::data(int index) const { + return data_.Get(index); +} +inline ::std::string* MediaResponse_MediaPart::mutable_data(int index) { + return data_.Mutable(index); +} +inline void MediaResponse_MediaPart::set_data(int index, const ::std::string& value) { + data_.Mutable(index)->assign(value); +} +inline void MediaResponse_MediaPart::set_data(int index, const char* value) { + data_.Mutable(index)->assign(value); +} +inline void MediaResponse_MediaPart::set_data(int index, const void* value, size_t size) { + data_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* MediaResponse_MediaPart::add_data() { + return data_.Add(); +} +inline void MediaResponse_MediaPart::add_data(const ::std::string& value) { + data_.Add()->assign(value); +} +inline void MediaResponse_MediaPart::add_data(const char* value) { + data_.Add()->assign(value); +} +inline void MediaResponse_MediaPart::add_data(const void* value, size_t size) { + data_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +MediaResponse_MediaPart::data() const { + return data_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +MediaResponse_MediaPart::mutable_data() { + return &data_; +} + +// ------------------------------------------------------------------- + +// MediaResponse + +// required .Error error = 1; +inline bool MediaResponse::has_error() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void MediaResponse::set_has_error() { + _has_bits_[0] |= 0x00000001u; +} +inline void MediaResponse::clear_has_error() { + _has_bits_[0] &= ~0x00000001u; +} +inline void MediaResponse::clear_error() { + if (error_ != NULL) error_->::Error::Clear(); + clear_has_error(); +} +inline const ::Error& MediaResponse::error() const { + return error_ != NULL ? *error_ : *default_instance_->error_; +} +inline ::Error* MediaResponse::mutable_error() { + set_has_error(); + if (error_ == NULL) error_ = new ::Error; + return error_; +} +inline ::Error* MediaResponse::release_error() { + clear_has_error(); + ::Error* temp = error_; + error_ = NULL; + return temp; +} +inline void MediaResponse::set_allocated_error(::Error* error) { + delete error_; + error_ = error; + if (error) { + set_has_error(); + } else { + clear_has_error(); + } +} + +// required .MediaResponse.Type response_type = 2; +inline bool MediaResponse::has_response_type() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void MediaResponse::set_has_response_type() { + _has_bits_[0] |= 0x00000002u; +} +inline void MediaResponse::clear_has_response_type() { + _has_bits_[0] &= ~0x00000002u; +} +inline void MediaResponse::clear_response_type() { + response_type_ = 1; + clear_has_response_type(); +} +inline ::MediaResponse_Type MediaResponse::response_type() const { + return static_cast< ::MediaResponse_Type >(response_type_); +} +inline void MediaResponse::set_response_type(::MediaResponse_Type value) { + assert(::MediaResponse_Type_IsValid(value)); + set_has_response_type(); + response_type_ = value; +} + +// optional .MediaResponse.MediaPart part = 3; +inline bool MediaResponse::has_part() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void MediaResponse::set_has_part() { + _has_bits_[0] |= 0x00000004u; +} +inline void MediaResponse::clear_has_part() { + _has_bits_[0] &= ~0x00000004u; +} +inline void MediaResponse::clear_part() { + if (part_ != NULL) part_->::MediaResponse_MediaPart::Clear(); + clear_has_part(); +} +inline const ::MediaResponse_MediaPart& MediaResponse::part() const { + return part_ != NULL ? *part_ : *default_instance_->part_; +} +inline ::MediaResponse_MediaPart* MediaResponse::mutable_part() { + set_has_part(); + if (part_ == NULL) part_ = new ::MediaResponse_MediaPart; + return part_; +} +inline ::MediaResponse_MediaPart* MediaResponse::release_part() { + clear_has_part(); + ::MediaResponse_MediaPart* temp = part_; + part_ = NULL; + return temp; +} +inline void MediaResponse::set_allocated_part(::MediaResponse_MediaPart* part) { + delete part_; + part_ = part; + if (part) { + set_has_part(); + } else { + clear_has_part(); + } +} + + +// @@protoc_insertion_point(namespace_scope) + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::MediaRequest_Type>() { + return ::MediaRequest_Type_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::MediaResponse_Type>() { + return ::MediaResponse_Type_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::CodecType>() { + return ::CodecType_descriptor(); +} + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_media_2eproto__INCLUDED diff --git a/remote/proto/media.proto b/remote/proto/media.proto new file mode 100644 index 00000000..99e6c7c7 --- /dev/null +++ b/remote/proto/media.proto @@ -0,0 +1,73 @@ +import "common.proto"; + +enum CodecType +{ + CodecTypeOGG = 1; +} + + +message MediaRequest +{ + + message Prepare + { + required int64 id = 1; // Id if the media + + required uint32 offset_secs = 2; // Offset in seconds + optional CodecType codec_type = 3; // Codec of the media + + optional uint32 audio_bitrate = 4; + + // Video specifics + optional uint32 video_bitrate = 5; + optional uint32 audio_stream_idx = 6; + optional uint32 video_stream_idx = 7; + optional uint32 subtitle_stream_idx = 8; + } + + message GetPart + { + required uint32 requested_data_size = 1; // Amount of data requested. May receive more or less + + } + + message Terminate + { + + } + + enum Type + { + TypeMediaPrepare = 1; + TypeMediaGet = 2; + TypeMediaTerminate = 3; + } + + required Type request_type = 1; + + optional Prepare prepare = 2; + optional GetPart get_part = 3; + optional Terminate terminate = 4; + +} // MediaRequest + +message MediaResponse +{ + message MediaPart + { + required uint64 byte_offset = 1; + repeated bytes data = 2; + } + + enum Type + { + TypeMediaPart = 1; + } + + required Error error = 1; + + required Type response_type = 2; + + optional MediaPart part = 3; +} + diff --git a/remote/proto/messages.pb.cc b/remote/proto/messages.pb.cc new file mode 100644 index 00000000..691724ef --- /dev/null +++ b/remote/proto/messages.pb.cc @@ -0,0 +1,912 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: messages.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "messages.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace { + +const ::google::protobuf::Descriptor* ClientMessage_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ClientMessage_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* ClientMessage_Type_descriptor_ = NULL; +const ::google::protobuf::Descriptor* ServerMessage_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ServerMessage_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* ServerMessage_Type_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_messages_2eproto() { + protobuf_AddDesc_messages_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "messages.proto"); + GOOGLE_CHECK(file != NULL); + ClientMessage_descriptor_ = file->message_type(0); + static const int ClientMessage_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, auth_request_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, collection_request_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, media_request_), + }; + ClientMessage_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ClientMessage_descriptor_, + ClientMessage::default_instance_, + ClientMessage_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ClientMessage)); + ClientMessage_Type_descriptor_ = ClientMessage_descriptor_->enum_type(0); + ServerMessage_descriptor_ = file->message_type(1); + static const int ServerMessage_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, auth_response_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, collection_response_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, media_response_), + }; + ServerMessage_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ServerMessage_descriptor_, + ServerMessage::default_instance_, + ServerMessage_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ServerMessage)); + ServerMessage_Type_descriptor_ = ServerMessage_descriptor_->enum_type(0); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_messages_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ClientMessage_descriptor_, &ClientMessage::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ServerMessage_descriptor_, &ServerMessage::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_messages_2eproto() { + delete ClientMessage::default_instance_; + delete ClientMessage_reflection_; + delete ServerMessage::default_instance_; + delete ServerMessage_reflection_; +} + +void protobuf_AddDesc_messages_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::protobuf_AddDesc_common_2eproto(); + ::protobuf_AddDesc_auth_2eproto(); + ::protobuf_AddDesc_collection_2eproto(); + ::protobuf_AddDesc_media_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\016messages.proto\032\014common.proto\032\nauth.pro" + "to\032\020collection.proto\032\013media.proto\"\356\001\n\rCl" + "ientMessage\022!\n\004type\030\001 \002(\0162\023.ClientMessag" + "e.Type\022\"\n\014auth_request\030\002 \001(\0132\014.AuthReque" + "st\022.\n\022collection_request\030\003 \001(\0132\022.Collect" + "ionRequest\022$\n\rmedia_request\030\004 \001(\0132\r.Medi" + "aRequest\"@\n\004Type\022\017\n\013AuthRequest\020\001\022\025\n\021Col" + "lectionRequest\020\002\022\020\n\014MediaRequest\020\003\"\367\001\n\rS" + "erverMessage\022!\n\004type\030\001 \002(\0162\023.ServerMessa" + "ge.Type\022$\n\rauth_response\030\002 \001(\0132\r.AuthRes" + "ponse\0220\n\023collection_response\030\003 \001(\0132\023.Col" + "lectionResponse\022&\n\016media_response\030\004 \001(\0132" + "\016.MediaResponse\"C\n\004Type\022\020\n\014AuthResponse\020" + "\001\022\026\n\022CollectionResponse\020\002\022\021\n\rMediaRespon" + "se\020\003", 564); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "messages.proto", &protobuf_RegisterTypes); + ClientMessage::default_instance_ = new ClientMessage(); + ServerMessage::default_instance_ = new ServerMessage(); + ClientMessage::default_instance_->InitAsDefaultInstance(); + ServerMessage::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_messages_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_messages_2eproto { + StaticDescriptorInitializer_messages_2eproto() { + protobuf_AddDesc_messages_2eproto(); + } +} static_descriptor_initializer_messages_2eproto_; + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* ClientMessage_Type_descriptor() { + protobuf_AssignDescriptorsOnce(); + return ClientMessage_Type_descriptor_; +} +bool ClientMessage_Type_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const ClientMessage_Type ClientMessage::AuthRequest; +const ClientMessage_Type ClientMessage::CollectionRequest; +const ClientMessage_Type ClientMessage::MediaRequest; +const ClientMessage_Type ClientMessage::Type_MIN; +const ClientMessage_Type ClientMessage::Type_MAX; +const int ClientMessage::Type_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int ClientMessage::kTypeFieldNumber; +const int ClientMessage::kAuthRequestFieldNumber; +const int ClientMessage::kCollectionRequestFieldNumber; +const int ClientMessage::kMediaRequestFieldNumber; +#endif // !_MSC_VER + +ClientMessage::ClientMessage() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ClientMessage::InitAsDefaultInstance() { + auth_request_ = const_cast< ::AuthRequest*>(&::AuthRequest::default_instance()); + collection_request_ = const_cast< ::CollectionRequest*>(&::CollectionRequest::default_instance()); + media_request_ = const_cast< ::MediaRequest*>(&::MediaRequest::default_instance()); +} + +ClientMessage::ClientMessage(const ClientMessage& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ClientMessage::SharedCtor() { + _cached_size_ = 0; + type_ = 1; + auth_request_ = NULL; + collection_request_ = NULL; + media_request_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ClientMessage::~ClientMessage() { + SharedDtor(); +} + +void ClientMessage::SharedDtor() { + if (this != default_instance_) { + delete auth_request_; + delete collection_request_; + delete media_request_; + } +} + +void ClientMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ClientMessage::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ClientMessage_descriptor_; +} + +const ClientMessage& ClientMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_messages_2eproto(); + return *default_instance_; +} + +ClientMessage* ClientMessage::default_instance_ = NULL; + +ClientMessage* ClientMessage::New() const { + return new ClientMessage; +} + +void ClientMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + type_ = 1; + if (has_auth_request()) { + if (auth_request_ != NULL) auth_request_->::AuthRequest::Clear(); + } + if (has_collection_request()) { + if (collection_request_ != NULL) collection_request_->::CollectionRequest::Clear(); + } + if (has_media_request()) { + if (media_request_ != NULL) media_request_->::MediaRequest::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ClientMessage::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 .ClientMessage.Type type = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::ClientMessage_Type_IsValid(value)) { + set_type(static_cast< ::ClientMessage_Type >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_auth_request; + break; + } + + // optional .AuthRequest auth_request = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_auth_request: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_auth_request())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_collection_request; + break; + } + + // optional .CollectionRequest collection_request = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_collection_request: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_collection_request())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_media_request; + break; + } + + // optional .MediaRequest media_request = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_media_request: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_media_request())); + } 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 ClientMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .ClientMessage.Type type = 1; + if (has_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->type(), output); + } + + // optional .AuthRequest auth_request = 2; + if (has_auth_request()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->auth_request(), output); + } + + // optional .CollectionRequest collection_request = 3; + if (has_collection_request()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->collection_request(), output); + } + + // optional .MediaRequest media_request = 4; + if (has_media_request()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->media_request(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ClientMessage::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .ClientMessage.Type type = 1; + if (has_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->type(), target); + } + + // optional .AuthRequest auth_request = 2; + if (has_auth_request()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->auth_request(), target); + } + + // optional .CollectionRequest collection_request = 3; + if (has_collection_request()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->collection_request(), target); + } + + // optional .MediaRequest media_request = 4; + if (has_media_request()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->media_request(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ClientMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .ClientMessage.Type type = 1; + if (has_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // optional .AuthRequest auth_request = 2; + if (has_auth_request()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->auth_request()); + } + + // optional .CollectionRequest collection_request = 3; + if (has_collection_request()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->collection_request()); + } + + // optional .MediaRequest media_request = 4; + if (has_media_request()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->media_request()); + } + + } + 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 ClientMessage::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ClientMessage* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ClientMessage::MergeFrom(const ClientMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_type()) { + set_type(from.type()); + } + if (from.has_auth_request()) { + mutable_auth_request()->::AuthRequest::MergeFrom(from.auth_request()); + } + if (from.has_collection_request()) { + mutable_collection_request()->::CollectionRequest::MergeFrom(from.collection_request()); + } + if (from.has_media_request()) { + mutable_media_request()->::MediaRequest::MergeFrom(from.media_request()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ClientMessage::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ClientMessage::CopyFrom(const ClientMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ClientMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_auth_request()) { + if (!this->auth_request().IsInitialized()) return false; + } + if (has_collection_request()) { + if (!this->collection_request().IsInitialized()) return false; + } + if (has_media_request()) { + if (!this->media_request().IsInitialized()) return false; + } + return true; +} + +void ClientMessage::Swap(ClientMessage* other) { + if (other != this) { + std::swap(type_, other->type_); + std::swap(auth_request_, other->auth_request_); + std::swap(collection_request_, other->collection_request_); + std::swap(media_request_, other->media_request_); + 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 ClientMessage::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ClientMessage_descriptor_; + metadata.reflection = ClientMessage_reflection_; + return metadata; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* ServerMessage_Type_descriptor() { + protobuf_AssignDescriptorsOnce(); + return ServerMessage_Type_descriptor_; +} +bool ServerMessage_Type_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const ServerMessage_Type ServerMessage::AuthResponse; +const ServerMessage_Type ServerMessage::CollectionResponse; +const ServerMessage_Type ServerMessage::MediaResponse; +const ServerMessage_Type ServerMessage::Type_MIN; +const ServerMessage_Type ServerMessage::Type_MAX; +const int ServerMessage::Type_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int ServerMessage::kTypeFieldNumber; +const int ServerMessage::kAuthResponseFieldNumber; +const int ServerMessage::kCollectionResponseFieldNumber; +const int ServerMessage::kMediaResponseFieldNumber; +#endif // !_MSC_VER + +ServerMessage::ServerMessage() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ServerMessage::InitAsDefaultInstance() { + auth_response_ = const_cast< ::AuthResponse*>(&::AuthResponse::default_instance()); + collection_response_ = const_cast< ::CollectionResponse*>(&::CollectionResponse::default_instance()); + media_response_ = const_cast< ::MediaResponse*>(&::MediaResponse::default_instance()); +} + +ServerMessage::ServerMessage(const ServerMessage& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ServerMessage::SharedCtor() { + _cached_size_ = 0; + type_ = 1; + auth_response_ = NULL; + collection_response_ = NULL; + media_response_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ServerMessage::~ServerMessage() { + SharedDtor(); +} + +void ServerMessage::SharedDtor() { + if (this != default_instance_) { + delete auth_response_; + delete collection_response_; + delete media_response_; + } +} + +void ServerMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ServerMessage::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ServerMessage_descriptor_; +} + +const ServerMessage& ServerMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_messages_2eproto(); + return *default_instance_; +} + +ServerMessage* ServerMessage::default_instance_ = NULL; + +ServerMessage* ServerMessage::New() const { + return new ServerMessage; +} + +void ServerMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + type_ = 1; + if (has_auth_response()) { + if (auth_response_ != NULL) auth_response_->::AuthResponse::Clear(); + } + if (has_collection_response()) { + if (collection_response_ != NULL) collection_response_->::CollectionResponse::Clear(); + } + if (has_media_response()) { + if (media_response_ != NULL) media_response_->::MediaResponse::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ServerMessage::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 .ServerMessage.Type type = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::ServerMessage_Type_IsValid(value)) { + set_type(static_cast< ::ServerMessage_Type >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_auth_response; + break; + } + + // optional .AuthResponse auth_response = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_auth_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_auth_response())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_collection_response; + break; + } + + // optional .CollectionResponse collection_response = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_collection_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_collection_response())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_media_response; + break; + } + + // optional .MediaResponse media_response = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_media_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_media_response())); + } 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 ServerMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .ServerMessage.Type type = 1; + if (has_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->type(), output); + } + + // optional .AuthResponse auth_response = 2; + if (has_auth_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->auth_response(), output); + } + + // optional .CollectionResponse collection_response = 3; + if (has_collection_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->collection_response(), output); + } + + // optional .MediaResponse media_response = 4; + if (has_media_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->media_response(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ServerMessage::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .ServerMessage.Type type = 1; + if (has_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->type(), target); + } + + // optional .AuthResponse auth_response = 2; + if (has_auth_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->auth_response(), target); + } + + // optional .CollectionResponse collection_response = 3; + if (has_collection_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->collection_response(), target); + } + + // optional .MediaResponse media_response = 4; + if (has_media_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->media_response(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ServerMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .ServerMessage.Type type = 1; + if (has_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // optional .AuthResponse auth_response = 2; + if (has_auth_response()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->auth_response()); + } + + // optional .CollectionResponse collection_response = 3; + if (has_collection_response()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->collection_response()); + } + + // optional .MediaResponse media_response = 4; + if (has_media_response()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->media_response()); + } + + } + 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 ServerMessage::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ServerMessage* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ServerMessage::MergeFrom(const ServerMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_type()) { + set_type(from.type()); + } + if (from.has_auth_response()) { + mutable_auth_response()->::AuthResponse::MergeFrom(from.auth_response()); + } + if (from.has_collection_response()) { + mutable_collection_response()->::CollectionResponse::MergeFrom(from.collection_response()); + } + if (from.has_media_response()) { + mutable_media_response()->::MediaResponse::MergeFrom(from.media_response()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ServerMessage::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ServerMessage::CopyFrom(const ServerMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ServerMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_auth_response()) { + if (!this->auth_response().IsInitialized()) return false; + } + if (has_collection_response()) { + if (!this->collection_response().IsInitialized()) return false; + } + if (has_media_response()) { + if (!this->media_response().IsInitialized()) return false; + } + return true; +} + +void ServerMessage::Swap(ServerMessage* other) { + if (other != this) { + std::swap(type_, other->type_); + std::swap(auth_response_, other->auth_response_); + std::swap(collection_response_, other->collection_response_); + std::swap(media_response_, other->media_response_); + 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 ServerMessage::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ServerMessage_descriptor_; + metadata.reflection = ServerMessage_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +// @@protoc_insertion_point(global_scope) diff --git a/remote/proto/messages.pb.h b/remote/proto/messages.pb.h new file mode 100644 index 00000000..a921b6a0 --- /dev/null +++ b/remote/proto/messages.pb.h @@ -0,0 +1,675 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: messages.proto + +#ifndef PROTOBUF_messages_2eproto__INCLUDED +#define PROTOBUF_messages_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2005000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include "common.pb.h" +#include "auth.pb.h" +#include "collection.pb.h" +#include "media.pb.h" +// @@protoc_insertion_point(includes) + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_messages_2eproto(); +void protobuf_AssignDesc_messages_2eproto(); +void protobuf_ShutdownFile_messages_2eproto(); + +class ClientMessage; +class ServerMessage; + +enum ClientMessage_Type { + ClientMessage_Type_AuthRequest = 1, + ClientMessage_Type_CollectionRequest = 2, + ClientMessage_Type_MediaRequest = 3 +}; +bool ClientMessage_Type_IsValid(int value); +const ClientMessage_Type ClientMessage_Type_Type_MIN = ClientMessage_Type_AuthRequest; +const ClientMessage_Type ClientMessage_Type_Type_MAX = ClientMessage_Type_MediaRequest; +const int ClientMessage_Type_Type_ARRAYSIZE = ClientMessage_Type_Type_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ClientMessage_Type_descriptor(); +inline const ::std::string& ClientMessage_Type_Name(ClientMessage_Type value) { + return ::google::protobuf::internal::NameOfEnum( + ClientMessage_Type_descriptor(), value); +} +inline bool ClientMessage_Type_Parse( + const ::std::string& name, ClientMessage_Type* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ClientMessage_Type_descriptor(), name, value); +} +enum ServerMessage_Type { + ServerMessage_Type_AuthResponse = 1, + ServerMessage_Type_CollectionResponse = 2, + ServerMessage_Type_MediaResponse = 3 +}; +bool ServerMessage_Type_IsValid(int value); +const ServerMessage_Type ServerMessage_Type_Type_MIN = ServerMessage_Type_AuthResponse; +const ServerMessage_Type ServerMessage_Type_Type_MAX = ServerMessage_Type_MediaResponse; +const int ServerMessage_Type_Type_ARRAYSIZE = ServerMessage_Type_Type_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ServerMessage_Type_descriptor(); +inline const ::std::string& ServerMessage_Type_Name(ServerMessage_Type value) { + return ::google::protobuf::internal::NameOfEnum( + ServerMessage_Type_descriptor(), value); +} +inline bool ServerMessage_Type_Parse( + const ::std::string& name, ServerMessage_Type* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ServerMessage_Type_descriptor(), name, value); +} +// =================================================================== + +class ClientMessage : public ::google::protobuf::Message { + public: + ClientMessage(); + virtual ~ClientMessage(); + + ClientMessage(const ClientMessage& from); + + inline ClientMessage& operator=(const ClientMessage& 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 ClientMessage& default_instance(); + + void Swap(ClientMessage* other); + + // implements Message ---------------------------------------------- + + ClientMessage* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ClientMessage& from); + void MergeFrom(const ClientMessage& 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 ---------------------------------------------------- + + typedef ClientMessage_Type Type; + static const Type AuthRequest = ClientMessage_Type_AuthRequest; + static const Type CollectionRequest = ClientMessage_Type_CollectionRequest; + static const Type MediaRequest = ClientMessage_Type_MediaRequest; + static inline bool Type_IsValid(int value) { + return ClientMessage_Type_IsValid(value); + } + static const Type Type_MIN = + ClientMessage_Type_Type_MIN; + static const Type Type_MAX = + ClientMessage_Type_Type_MAX; + static const int Type_ARRAYSIZE = + ClientMessage_Type_Type_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + Type_descriptor() { + return ClientMessage_Type_descriptor(); + } + static inline const ::std::string& Type_Name(Type value) { + return ClientMessage_Type_Name(value); + } + static inline bool Type_Parse(const ::std::string& name, + Type* value) { + return ClientMessage_Type_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .ClientMessage.Type type = 1; + inline bool has_type() const; + inline void clear_type(); + static const int kTypeFieldNumber = 1; + inline ::ClientMessage_Type type() const; + inline void set_type(::ClientMessage_Type value); + + // optional .AuthRequest auth_request = 2; + inline bool has_auth_request() const; + inline void clear_auth_request(); + static const int kAuthRequestFieldNumber = 2; + inline const ::AuthRequest& auth_request() const; + inline ::AuthRequest* mutable_auth_request(); + inline ::AuthRequest* release_auth_request(); + inline void set_allocated_auth_request(::AuthRequest* auth_request); + + // optional .CollectionRequest collection_request = 3; + inline bool has_collection_request() const; + inline void clear_collection_request(); + static const int kCollectionRequestFieldNumber = 3; + inline const ::CollectionRequest& collection_request() const; + inline ::CollectionRequest* mutable_collection_request(); + inline ::CollectionRequest* release_collection_request(); + inline void set_allocated_collection_request(::CollectionRequest* collection_request); + + // optional .MediaRequest media_request = 4; + inline bool has_media_request() const; + inline void clear_media_request(); + static const int kMediaRequestFieldNumber = 4; + inline const ::MediaRequest& media_request() const; + inline ::MediaRequest* mutable_media_request(); + inline ::MediaRequest* release_media_request(); + inline void set_allocated_media_request(::MediaRequest* media_request); + + // @@protoc_insertion_point(class_scope:ClientMessage) + private: + inline void set_has_type(); + inline void clear_has_type(); + inline void set_has_auth_request(); + inline void clear_has_auth_request(); + inline void set_has_collection_request(); + inline void clear_has_collection_request(); + inline void set_has_media_request(); + inline void clear_has_media_request(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::AuthRequest* auth_request_; + ::CollectionRequest* collection_request_; + ::MediaRequest* media_request_; + int type_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_messages_2eproto(); + friend void protobuf_AssignDesc_messages_2eproto(); + friend void protobuf_ShutdownFile_messages_2eproto(); + + void InitAsDefaultInstance(); + static ClientMessage* default_instance_; +}; +// ------------------------------------------------------------------- + +class ServerMessage : public ::google::protobuf::Message { + public: + ServerMessage(); + virtual ~ServerMessage(); + + ServerMessage(const ServerMessage& from); + + inline ServerMessage& operator=(const ServerMessage& 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 ServerMessage& default_instance(); + + void Swap(ServerMessage* other); + + // implements Message ---------------------------------------------- + + ServerMessage* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ServerMessage& from); + void MergeFrom(const ServerMessage& 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 ---------------------------------------------------- + + typedef ServerMessage_Type Type; + static const Type AuthResponse = ServerMessage_Type_AuthResponse; + static const Type CollectionResponse = ServerMessage_Type_CollectionResponse; + static const Type MediaResponse = ServerMessage_Type_MediaResponse; + static inline bool Type_IsValid(int value) { + return ServerMessage_Type_IsValid(value); + } + static const Type Type_MIN = + ServerMessage_Type_Type_MIN; + static const Type Type_MAX = + ServerMessage_Type_Type_MAX; + static const int Type_ARRAYSIZE = + ServerMessage_Type_Type_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + Type_descriptor() { + return ServerMessage_Type_descriptor(); + } + static inline const ::std::string& Type_Name(Type value) { + return ServerMessage_Type_Name(value); + } + static inline bool Type_Parse(const ::std::string& name, + Type* value) { + return ServerMessage_Type_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .ServerMessage.Type type = 1; + inline bool has_type() const; + inline void clear_type(); + static const int kTypeFieldNumber = 1; + inline ::ServerMessage_Type type() const; + inline void set_type(::ServerMessage_Type value); + + // optional .AuthResponse auth_response = 2; + inline bool has_auth_response() const; + inline void clear_auth_response(); + static const int kAuthResponseFieldNumber = 2; + inline const ::AuthResponse& auth_response() const; + inline ::AuthResponse* mutable_auth_response(); + inline ::AuthResponse* release_auth_response(); + inline void set_allocated_auth_response(::AuthResponse* auth_response); + + // optional .CollectionResponse collection_response = 3; + inline bool has_collection_response() const; + inline void clear_collection_response(); + static const int kCollectionResponseFieldNumber = 3; + inline const ::CollectionResponse& collection_response() const; + inline ::CollectionResponse* mutable_collection_response(); + inline ::CollectionResponse* release_collection_response(); + inline void set_allocated_collection_response(::CollectionResponse* collection_response); + + // optional .MediaResponse media_response = 4; + inline bool has_media_response() const; + inline void clear_media_response(); + static const int kMediaResponseFieldNumber = 4; + inline const ::MediaResponse& media_response() const; + inline ::MediaResponse* mutable_media_response(); + inline ::MediaResponse* release_media_response(); + inline void set_allocated_media_response(::MediaResponse* media_response); + + // @@protoc_insertion_point(class_scope:ServerMessage) + private: + inline void set_has_type(); + inline void clear_has_type(); + inline void set_has_auth_response(); + inline void clear_has_auth_response(); + inline void set_has_collection_response(); + inline void clear_has_collection_response(); + inline void set_has_media_response(); + inline void clear_has_media_response(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::AuthResponse* auth_response_; + ::CollectionResponse* collection_response_; + ::MediaResponse* media_response_; + int type_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_messages_2eproto(); + friend void protobuf_AssignDesc_messages_2eproto(); + friend void protobuf_ShutdownFile_messages_2eproto(); + + void InitAsDefaultInstance(); + static ServerMessage* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// ClientMessage + +// required .ClientMessage.Type type = 1; +inline bool ClientMessage::has_type() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ClientMessage::set_has_type() { + _has_bits_[0] |= 0x00000001u; +} +inline void ClientMessage::clear_has_type() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ClientMessage::clear_type() { + type_ = 1; + clear_has_type(); +} +inline ::ClientMessage_Type ClientMessage::type() const { + return static_cast< ::ClientMessage_Type >(type_); +} +inline void ClientMessage::set_type(::ClientMessage_Type value) { + assert(::ClientMessage_Type_IsValid(value)); + set_has_type(); + type_ = value; +} + +// optional .AuthRequest auth_request = 2; +inline bool ClientMessage::has_auth_request() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ClientMessage::set_has_auth_request() { + _has_bits_[0] |= 0x00000002u; +} +inline void ClientMessage::clear_has_auth_request() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ClientMessage::clear_auth_request() { + if (auth_request_ != NULL) auth_request_->::AuthRequest::Clear(); + clear_has_auth_request(); +} +inline const ::AuthRequest& ClientMessage::auth_request() const { + return auth_request_ != NULL ? *auth_request_ : *default_instance_->auth_request_; +} +inline ::AuthRequest* ClientMessage::mutable_auth_request() { + set_has_auth_request(); + if (auth_request_ == NULL) auth_request_ = new ::AuthRequest; + return auth_request_; +} +inline ::AuthRequest* ClientMessage::release_auth_request() { + clear_has_auth_request(); + ::AuthRequest* temp = auth_request_; + auth_request_ = NULL; + return temp; +} +inline void ClientMessage::set_allocated_auth_request(::AuthRequest* auth_request) { + delete auth_request_; + auth_request_ = auth_request; + if (auth_request) { + set_has_auth_request(); + } else { + clear_has_auth_request(); + } +} + +// optional .CollectionRequest collection_request = 3; +inline bool ClientMessage::has_collection_request() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void ClientMessage::set_has_collection_request() { + _has_bits_[0] |= 0x00000004u; +} +inline void ClientMessage::clear_has_collection_request() { + _has_bits_[0] &= ~0x00000004u; +} +inline void ClientMessage::clear_collection_request() { + if (collection_request_ != NULL) collection_request_->::CollectionRequest::Clear(); + clear_has_collection_request(); +} +inline const ::CollectionRequest& ClientMessage::collection_request() const { + return collection_request_ != NULL ? *collection_request_ : *default_instance_->collection_request_; +} +inline ::CollectionRequest* ClientMessage::mutable_collection_request() { + set_has_collection_request(); + if (collection_request_ == NULL) collection_request_ = new ::CollectionRequest; + return collection_request_; +} +inline ::CollectionRequest* ClientMessage::release_collection_request() { + clear_has_collection_request(); + ::CollectionRequest* temp = collection_request_; + collection_request_ = NULL; + return temp; +} +inline void ClientMessage::set_allocated_collection_request(::CollectionRequest* collection_request) { + delete collection_request_; + collection_request_ = collection_request; + if (collection_request) { + set_has_collection_request(); + } else { + clear_has_collection_request(); + } +} + +// optional .MediaRequest media_request = 4; +inline bool ClientMessage::has_media_request() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void ClientMessage::set_has_media_request() { + _has_bits_[0] |= 0x00000008u; +} +inline void ClientMessage::clear_has_media_request() { + _has_bits_[0] &= ~0x00000008u; +} +inline void ClientMessage::clear_media_request() { + if (media_request_ != NULL) media_request_->::MediaRequest::Clear(); + clear_has_media_request(); +} +inline const ::MediaRequest& ClientMessage::media_request() const { + return media_request_ != NULL ? *media_request_ : *default_instance_->media_request_; +} +inline ::MediaRequest* ClientMessage::mutable_media_request() { + set_has_media_request(); + if (media_request_ == NULL) media_request_ = new ::MediaRequest; + return media_request_; +} +inline ::MediaRequest* ClientMessage::release_media_request() { + clear_has_media_request(); + ::MediaRequest* temp = media_request_; + media_request_ = NULL; + return temp; +} +inline void ClientMessage::set_allocated_media_request(::MediaRequest* media_request) { + delete media_request_; + media_request_ = media_request; + if (media_request) { + set_has_media_request(); + } else { + clear_has_media_request(); + } +} + +// ------------------------------------------------------------------- + +// ServerMessage + +// required .ServerMessage.Type type = 1; +inline bool ServerMessage::has_type() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ServerMessage::set_has_type() { + _has_bits_[0] |= 0x00000001u; +} +inline void ServerMessage::clear_has_type() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ServerMessage::clear_type() { + type_ = 1; + clear_has_type(); +} +inline ::ServerMessage_Type ServerMessage::type() const { + return static_cast< ::ServerMessage_Type >(type_); +} +inline void ServerMessage::set_type(::ServerMessage_Type value) { + assert(::ServerMessage_Type_IsValid(value)); + set_has_type(); + type_ = value; +} + +// optional .AuthResponse auth_response = 2; +inline bool ServerMessage::has_auth_response() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ServerMessage::set_has_auth_response() { + _has_bits_[0] |= 0x00000002u; +} +inline void ServerMessage::clear_has_auth_response() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ServerMessage::clear_auth_response() { + if (auth_response_ != NULL) auth_response_->::AuthResponse::Clear(); + clear_has_auth_response(); +} +inline const ::AuthResponse& ServerMessage::auth_response() const { + return auth_response_ != NULL ? *auth_response_ : *default_instance_->auth_response_; +} +inline ::AuthResponse* ServerMessage::mutable_auth_response() { + set_has_auth_response(); + if (auth_response_ == NULL) auth_response_ = new ::AuthResponse; + return auth_response_; +} +inline ::AuthResponse* ServerMessage::release_auth_response() { + clear_has_auth_response(); + ::AuthResponse* temp = auth_response_; + auth_response_ = NULL; + return temp; +} +inline void ServerMessage::set_allocated_auth_response(::AuthResponse* auth_response) { + delete auth_response_; + auth_response_ = auth_response; + if (auth_response) { + set_has_auth_response(); + } else { + clear_has_auth_response(); + } +} + +// optional .CollectionResponse collection_response = 3; +inline bool ServerMessage::has_collection_response() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void ServerMessage::set_has_collection_response() { + _has_bits_[0] |= 0x00000004u; +} +inline void ServerMessage::clear_has_collection_response() { + _has_bits_[0] &= ~0x00000004u; +} +inline void ServerMessage::clear_collection_response() { + if (collection_response_ != NULL) collection_response_->::CollectionResponse::Clear(); + clear_has_collection_response(); +} +inline const ::CollectionResponse& ServerMessage::collection_response() const { + return collection_response_ != NULL ? *collection_response_ : *default_instance_->collection_response_; +} +inline ::CollectionResponse* ServerMessage::mutable_collection_response() { + set_has_collection_response(); + if (collection_response_ == NULL) collection_response_ = new ::CollectionResponse; + return collection_response_; +} +inline ::CollectionResponse* ServerMessage::release_collection_response() { + clear_has_collection_response(); + ::CollectionResponse* temp = collection_response_; + collection_response_ = NULL; + return temp; +} +inline void ServerMessage::set_allocated_collection_response(::CollectionResponse* collection_response) { + delete collection_response_; + collection_response_ = collection_response; + if (collection_response) { + set_has_collection_response(); + } else { + clear_has_collection_response(); + } +} + +// optional .MediaResponse media_response = 4; +inline bool ServerMessage::has_media_response() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void ServerMessage::set_has_media_response() { + _has_bits_[0] |= 0x00000008u; +} +inline void ServerMessage::clear_has_media_response() { + _has_bits_[0] &= ~0x00000008u; +} +inline void ServerMessage::clear_media_response() { + if (media_response_ != NULL) media_response_->::MediaResponse::Clear(); + clear_has_media_response(); +} +inline const ::MediaResponse& ServerMessage::media_response() const { + return media_response_ != NULL ? *media_response_ : *default_instance_->media_response_; +} +inline ::MediaResponse* ServerMessage::mutable_media_response() { + set_has_media_response(); + if (media_response_ == NULL) media_response_ = new ::MediaResponse; + return media_response_; +} +inline ::MediaResponse* ServerMessage::release_media_response() { + clear_has_media_response(); + ::MediaResponse* temp = media_response_; + media_response_ = NULL; + return temp; +} +inline void ServerMessage::set_allocated_media_response(::MediaResponse* media_response) { + delete media_response_; + media_response_ = media_response; + if (media_response) { + set_has_media_response(); + } else { + clear_has_media_response(); + } +} + + +// @@protoc_insertion_point(namespace_scope) + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::ClientMessage_Type>() { + return ::ClientMessage_Type_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::ServerMessage_Type>() { + return ::ServerMessage_Type_descriptor(); +} + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_messages_2eproto__INCLUDED diff --git a/remote/proto/messages.proto b/remote/proto/messages.proto new file mode 100644 index 00000000..51181eaf --- /dev/null +++ b/remote/proto/messages.proto @@ -0,0 +1,39 @@ +import "common.proto"; +import "auth.proto"; +import "collection.proto"; +import "media.proto"; + +message ClientMessage +{ + enum Type + { + AuthRequest = 1; + CollectionRequest = 2; + MediaRequest = 3; + } + + required Type type = 1; + + optional AuthRequest auth_request = 2; + optional CollectionRequest collection_request = 3; + optional MediaRequest media_request = 4; +} + + +message ServerMessage +{ + enum Type + { + AuthResponse = 1; + CollectionResponse = 2; + MediaResponse = 3; + } + + required Type type = 1; + + optional AuthResponse auth_response = 2; + optional CollectionResponse collection_response = 3; + optional MediaResponse media_response = 4; +} + +