diff --git a/proto/Request.proto b/proto/Request.proto index d8c42780eaa6276e9b163343e07de3e177be82b5..8c9d751a7c43e3cee7b271ddedb4dcf38ef1812f 100644 --- a/proto/Request.proto +++ b/proto/Request.proto @@ -26,9 +26,8 @@ message Request message Data { - required string file_path = 1; - required int32 file_version = 2; - required string file_name = 3; + required int32 file_version = 1; + required string file_name = 2; } optional Data data = 3; diff --git a/proto/Response.proto b/proto/Response.proto index 2e0d47bc41a6eff32d6840f2d3d62c69eaed2f41..0b4214dabc5541abcd8048ba52b0e01bc85ea95c 100644 --- a/proto/Response.proto +++ b/proto/Response.proto @@ -41,6 +41,9 @@ message Response required State state = 1; required string status = 2; - required uint64 size = 3; + required string file_path = 3; + required string file_version = 4; + required string file_name = 5; + required uint64 size = 6; } } diff --git a/src/Request.pb.cc b/src/Request.pb.cc index fce1c5724547fed5c026e50e1a91aa8e89fb2f1b..7efd9fa8b8a435e4ec519785e3b4ba119e7cf8dc 100644 --- a/src/Request.pb.cc +++ b/src/Request.pb.cc @@ -74,8 +74,7 @@ void protobuf_AssignDesc_Request_2eproto() { ::google::protobuf::MessageFactory::generated_factory(), sizeof(Request_Authorization)); Request_Data_descriptor_ = Request_descriptor_->nested_type(1); - static const int Request_Data_offsets_[3] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Request_Data, file_path_), + static const int Request_Data_offsets_[2] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Request_Data, file_version_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Request_Data, file_name_), }; @@ -129,15 +128,15 @@ void protobuf_AddDesc_Request_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\rRequest.proto\022\017DataExporter_ns\"\300\002\n\007Req" + "\n\rRequest.proto\022\017DataExporter_ns\"\255\002\n\007Req" "uest\022+\n\004type\030\001 \002(\0162\035.DataExporter_ns.Req" "uest.Type\022=\n\rauthorization\030\002 \001(\0132&.DataE" "xporter_ns.Request.Authorization\022+\n\004data" "\030\003 \001(\0132\035.DataExporter_ns.Request.Data\0323\n" "\rAuthorization\022\020\n\010username\030\001 \002(\t\022\020\n\010pass" - "word\030\002 \002(\t\032B\n\004Data\022\021\n\tfile_path\030\001 \002(\t\022\024\n" - "\014file_version\030\002 \002(\005\022\021\n\tfile_name\030\003 \002(\t\"#" - "\n\004Type\022\021\n\rAUTHORIZATION\020\000\022\010\n\004DATA\020\001", 355); + "word\030\002 \002(\t\032/\n\004Data\022\024\n\014file_version\030\001 \002(\005" + "\022\021\n\tfile_name\030\002 \002(\t\"#\n\004Type\022\021\n\rAUTHORIZA" + "TION\020\000\022\010\n\004DATA\020\001", 336); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "Request.proto", &protobuf_RegisterTypes); Request::default_instance_ = new Request(); @@ -463,7 +462,6 @@ void Request_Authorization::Swap(Request_Authorization* other) { // ------------------------------------------------------------------- #ifndef _MSC_VER -const int Request_Data::kFilePathFieldNumber; const int Request_Data::kFileVersionFieldNumber; const int Request_Data::kFileNameFieldNumber; #endif // !_MSC_VER @@ -484,7 +482,6 @@ Request_Data::Request_Data(const Request_Data& from) void Request_Data::SharedCtor() { _cached_size_ = 0; - file_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); file_version_ = 0; file_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); ::memset(_has_bits_, 0, sizeof(_has_bits_)); @@ -495,9 +492,6 @@ Request_Data::~Request_Data() { } void Request_Data::SharedDtor() { - if (file_path_ != &::google::protobuf::internal::kEmptyString) { - delete file_path_; - } if (file_name_ != &::google::protobuf::internal::kEmptyString) { delete file_name_; } @@ -528,11 +522,6 @@ Request_Data* Request_Data::New() const { void Request_Data::Clear() { if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_file_path()) { - if (file_path_ != &::google::protobuf::internal::kEmptyString) { - file_path_->clear(); - } - } file_version_ = 0; if (has_file_name()) { if (file_name_ != &::google::protobuf::internal::kEmptyString) { @@ -550,27 +539,10 @@ bool Request_Data::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string file_path = 1; + // required int32 file_version = 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_file_path())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->file_path().data(), this->file_path().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_file_version; - break; - } - - // required int32 file_version = 2; - case 2: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_file_version: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &file_version_))); @@ -578,12 +550,12 @@ bool Request_Data::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } - if (input->ExpectTag(26)) goto parse_file_name; + if (input->ExpectTag(18)) goto parse_file_name; break; } - // required string file_name = 3; - case 3: { + // required string file_name = 2; + case 2: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { parse_file_name: @@ -617,27 +589,18 @@ bool Request_Data::MergePartialFromCodedStream( void Request_Data::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // required string file_path = 1; - if (has_file_path()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->file_path().data(), this->file_path().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->file_path(), output); - } - - // required int32 file_version = 2; + // required int32 file_version = 1; if (has_file_version()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->file_version(), output); + ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->file_version(), output); } - // required string file_name = 3; + // required string file_name = 2; if (has_file_name()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->file_name().data(), this->file_name().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); ::google::protobuf::internal::WireFormatLite::WriteString( - 3, this->file_name(), output); + 2, this->file_name(), output); } if (!unknown_fields().empty()) { @@ -648,29 +611,19 @@ void Request_Data::SerializeWithCachedSizes( ::google::protobuf::uint8* Request_Data::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // required string file_path = 1; - if (has_file_path()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->file_path().data(), this->file_path().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->file_path(), target); - } - - // required int32 file_version = 2; + // required int32 file_version = 1; if (has_file_version()) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->file_version(), target); + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->file_version(), target); } - // required string file_name = 3; + // required string file_name = 2; if (has_file_name()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->file_name().data(), this->file_name().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 3, this->file_name(), target); + 2, this->file_name(), target); } if (!unknown_fields().empty()) { @@ -684,21 +637,14 @@ int Request_Data::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required string file_path = 1; - if (has_file_path()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->file_path()); - } - - // required int32 file_version = 2; + // required int32 file_version = 1; if (has_file_version()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->file_version()); } - // required string file_name = 3; + // required string file_name = 2; if (has_file_name()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( @@ -732,9 +678,6 @@ void Request_Data::MergeFrom(const ::google::protobuf::Message& from) { void Request_Data::MergeFrom(const Request_Data& from) { GOOGLE_CHECK_NE(&from, this); if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_file_path()) { - set_file_path(from.file_path()); - } if (from.has_file_version()) { set_file_version(from.file_version()); } @@ -758,14 +701,13 @@ void Request_Data::CopyFrom(const Request_Data& from) { } bool Request_Data::IsInitialized() const { - if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; return true; } void Request_Data::Swap(Request_Data* other) { if (other != this) { - std::swap(file_path_, other->file_path_); std::swap(file_version_, other->file_version_); std::swap(file_name_, other->file_name_); std::swap(_has_bits_[0], other->_has_bits_[0]); diff --git a/src/Request.pb.h b/src/Request.pb.h index bfc7129d40ee9462697513dc4212363ce4ca3277..8464a129d5b097c7886af826d856410f8b7fbb5c 100644 --- a/src/Request.pb.h +++ b/src/Request.pb.h @@ -215,29 +215,17 @@ class Request_Data : public ::google::protobuf::Message { // accessors ------------------------------------------------------- - // required string file_path = 1; - inline bool has_file_path() const; - inline void clear_file_path(); - static const int kFilePathFieldNumber = 1; - inline const ::std::string& file_path() const; - inline void set_file_path(const ::std::string& value); - inline void set_file_path(const char* value); - inline void set_file_path(const char* value, size_t size); - inline ::std::string* mutable_file_path(); - inline ::std::string* release_file_path(); - inline void set_allocated_file_path(::std::string* file_path); - - // required int32 file_version = 2; + // required int32 file_version = 1; inline bool has_file_version() const; inline void clear_file_version(); - static const int kFileVersionFieldNumber = 2; + static const int kFileVersionFieldNumber = 1; inline ::google::protobuf::int32 file_version() const; inline void set_file_version(::google::protobuf::int32 value); - // required string file_name = 3; + // required string file_name = 2; inline bool has_file_name() const; inline void clear_file_name(); - static const int kFileNameFieldNumber = 3; + static const int kFileNameFieldNumber = 2; inline const ::std::string& file_name() const; inline void set_file_name(const ::std::string& value); inline void set_file_name(const char* value); @@ -248,8 +236,6 @@ class Request_Data : public ::google::protobuf::Message { // @@protoc_insertion_point(class_scope:DataExporter_ns.Request.Data) private: - inline void set_has_file_path(); - inline void clear_has_file_path(); inline void set_has_file_version(); inline void clear_has_file_version(); inline void set_has_file_name(); @@ -257,12 +243,11 @@ class Request_Data : public ::google::protobuf::Message { ::google::protobuf::UnknownFieldSet _unknown_fields_; - ::std::string* file_path_; ::std::string* file_name_; ::google::protobuf::int32 file_version_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; friend void protobuf_AddDesc_Request_2eproto(); friend void protobuf_AssignDesc_Request_2eproto(); @@ -555,85 +540,15 @@ inline void Request_Authorization::set_allocated_password(::std::string* passwor // Request_Data -// required string file_path = 1; -inline bool Request_Data::has_file_path() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void Request_Data::set_has_file_path() { - _has_bits_[0] |= 0x00000001u; -} -inline void Request_Data::clear_has_file_path() { - _has_bits_[0] &= ~0x00000001u; -} -inline void Request_Data::clear_file_path() { - if (file_path_ != &::google::protobuf::internal::kEmptyString) { - file_path_->clear(); - } - clear_has_file_path(); -} -inline const ::std::string& Request_Data::file_path() const { - return *file_path_; -} -inline void Request_Data::set_file_path(const ::std::string& value) { - set_has_file_path(); - if (file_path_ == &::google::protobuf::internal::kEmptyString) { - file_path_ = new ::std::string; - } - file_path_->assign(value); -} -inline void Request_Data::set_file_path(const char* value) { - set_has_file_path(); - if (file_path_ == &::google::protobuf::internal::kEmptyString) { - file_path_ = new ::std::string; - } - file_path_->assign(value); -} -inline void Request_Data::set_file_path(const char* value, size_t size) { - set_has_file_path(); - if (file_path_ == &::google::protobuf::internal::kEmptyString) { - file_path_ = new ::std::string; - } - file_path_->assign(reinterpret_cast<const char*>(value), size); -} -inline ::std::string* Request_Data::mutable_file_path() { - set_has_file_path(); - if (file_path_ == &::google::protobuf::internal::kEmptyString) { - file_path_ = new ::std::string; - } - return file_path_; -} -inline ::std::string* Request_Data::release_file_path() { - clear_has_file_path(); - if (file_path_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = file_path_; - file_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} -inline void Request_Data::set_allocated_file_path(::std::string* file_path) { - if (file_path_ != &::google::protobuf::internal::kEmptyString) { - delete file_path_; - } - if (file_path) { - set_has_file_path(); - file_path_ = file_path; - } else { - clear_has_file_path(); - file_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - } -} - -// required int32 file_version = 2; +// required int32 file_version = 1; inline bool Request_Data::has_file_version() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return (_has_bits_[0] & 0x00000001u) != 0; } inline void Request_Data::set_has_file_version() { - _has_bits_[0] |= 0x00000002u; + _has_bits_[0] |= 0x00000001u; } inline void Request_Data::clear_has_file_version() { - _has_bits_[0] &= ~0x00000002u; + _has_bits_[0] &= ~0x00000001u; } inline void Request_Data::clear_file_version() { file_version_ = 0; @@ -647,15 +562,15 @@ inline void Request_Data::set_file_version(::google::protobuf::int32 value) { file_version_ = value; } -// required string file_name = 3; +// required string file_name = 2; inline bool Request_Data::has_file_name() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return (_has_bits_[0] & 0x00000002u) != 0; } inline void Request_Data::set_has_file_name() { - _has_bits_[0] |= 0x00000004u; + _has_bits_[0] |= 0x00000002u; } inline void Request_Data::clear_has_file_name() { - _has_bits_[0] &= ~0x00000004u; + _has_bits_[0] &= ~0x00000002u; } inline void Request_Data::clear_file_name() { if (file_name_ != &::google::protobuf::internal::kEmptyString) { diff --git a/src/Response.pb.cc b/src/Response.pb.cc index 6ce2fab07729060bd775e1b131f7b438bf2b1444..6e1fcde68a5de253b6917e436c47cb9fcd99fbf9 100644 --- a/src/Response.pb.cc +++ b/src/Response.pb.cc @@ -76,9 +76,12 @@ void protobuf_AssignDesc_Response_2eproto() { sizeof(Response_Authorization)); Response_Authorization_State_descriptor_ = Response_Authorization_descriptor_->enum_type(0); Response_Data_descriptor_ = Response_descriptor_->nested_type(1); - static const int Response_Data_offsets_[3] = { + static const int Response_Data_offsets_[6] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Response_Data, state_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Response_Data, status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Response_Data, file_path_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Response_Data, file_version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Response_Data, file_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Response_Data, size_), }; Response_Data_reflection_ = @@ -132,18 +135,19 @@ void protobuf_AddDesc_Response_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\016Response.proto\022\017DataExporter_ns\"\242\003\n\010Re" + "\n\016Response.proto\022\017DataExporter_ns\"\337\003\n\010Re" "sponse\022,\n\004type\030\001 \002(\0162\036.DataExporter_ns.R" "esponse.Type\022>\n\rauthorization\030\002 \001(\0132\'.Da" "taExporter_ns.Response.Authorization\032\202\001\n" "\rAuthorization\022<\n\005state\030\001 \002(\0162-.DataExpo" "rter_ns.Response.Authorization.State\022\016\n\006" "status\030\002 \002(\t\"#\n\005State\022\014\n\010ACCEPTED\020\000\022\014\n\010R" - "EJECTED\020\001\032~\n\004Data\0223\n\005state\030\001 \002(\0162$.DataE" - "xporter_ns.Response.Data.State\022\016\n\006status" - "\030\002 \002(\t\022\014\n\004size\030\003 \002(\004\"#\n\005State\022\014\n\010ACCEPTE" - "D\020\000\022\014\n\010REJECTED\020\001\"#\n\004Type\022\021\n\rAUTHORIZATI" - "ON\020\000\022\010\n\004DATA\020\001", 454); + "EJECTED\020\001\032\272\001\n\004Data\0223\n\005state\030\001 \002(\0162$.Data" + "Exporter_ns.Response.Data.State\022\016\n\006statu" + "s\030\002 \002(\t\022\021\n\tfile_path\030\003 \002(\t\022\024\n\014file_versi" + "on\030\004 \002(\t\022\021\n\tfile_name\030\005 \002(\t\022\014\n\004size\030\006 \002(" + "\004\"#\n\005State\022\014\n\010ACCEPTED\020\000\022\014\n\010REJECTED\020\001\"#" + "\n\004Type\022\021\n\rAUTHORIZATION\020\000\022\010\n\004DATA\020\001", 515); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "Response.proto", &protobuf_RegisterTypes); Response::default_instance_ = new Response(); @@ -502,6 +506,9 @@ const int Response_Data::State_ARRAYSIZE; #ifndef _MSC_VER const int Response_Data::kStateFieldNumber; const int Response_Data::kStatusFieldNumber; +const int Response_Data::kFilePathFieldNumber; +const int Response_Data::kFileVersionFieldNumber; +const int Response_Data::kFileNameFieldNumber; const int Response_Data::kSizeFieldNumber; #endif // !_MSC_VER @@ -523,6 +530,9 @@ void Response_Data::SharedCtor() { _cached_size_ = 0; state_ = 0; status_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + file_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + file_version_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + file_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); size_ = GOOGLE_ULONGLONG(0); ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -535,6 +545,15 @@ void Response_Data::SharedDtor() { if (status_ != &::google::protobuf::internal::kEmptyString) { delete status_; } + if (file_path_ != &::google::protobuf::internal::kEmptyString) { + delete file_path_; + } + if (file_version_ != &::google::protobuf::internal::kEmptyString) { + delete file_version_; + } + if (file_name_ != &::google::protobuf::internal::kEmptyString) { + delete file_name_; + } if (this != default_instance_) { } } @@ -568,6 +587,21 @@ void Response_Data::Clear() { status_->clear(); } } + if (has_file_path()) { + if (file_path_ != &::google::protobuf::internal::kEmptyString) { + file_path_->clear(); + } + } + if (has_file_version()) { + if (file_version_ != &::google::protobuf::internal::kEmptyString) { + file_version_->clear(); + } + } + if (has_file_name()) { + if (file_name_ != &::google::protobuf::internal::kEmptyString) { + file_name_->clear(); + } + } size_ = GOOGLE_ULONGLONG(0); } ::memset(_has_bits_, 0, sizeof(_has_bits_)); @@ -613,12 +647,63 @@ bool Response_Data::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } - if (input->ExpectTag(24)) goto parse_size; + if (input->ExpectTag(26)) goto parse_file_path; break; } - // required uint64 size = 3; + // required string file_path = 3; case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_file_path: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_file_path())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->file_path().data(), this->file_path().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_file_version; + break; + } + + // required string file_version = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_file_version: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_file_version())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->file_version().data(), this->file_version().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(42)) goto parse_file_name; + break; + } + + // required string file_name = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_file_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_file_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->file_name().data(), this->file_name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(48)) goto parse_size; + break; + } + + // required uint64 size = 6; + case 6: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { parse_size: @@ -666,9 +751,36 @@ void Response_Data::SerializeWithCachedSizes( 2, this->status(), output); } - // required uint64 size = 3; + // required string file_path = 3; + if (has_file_path()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->file_path().data(), this->file_path().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->file_path(), output); + } + + // required string file_version = 4; + if (has_file_version()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->file_version().data(), this->file_version().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 4, this->file_version(), output); + } + + // required string file_name = 5; + if (has_file_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->file_name().data(), this->file_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 5, this->file_name(), output); + } + + // required uint64 size = 6; if (has_size()) { - ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->size(), output); + ::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->size(), output); } if (!unknown_fields().empty()) { @@ -695,9 +807,39 @@ void Response_Data::SerializeWithCachedSizes( 2, this->status(), target); } - // required uint64 size = 3; + // required string file_path = 3; + if (has_file_path()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->file_path().data(), this->file_path().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->file_path(), target); + } + + // required string file_version = 4; + if (has_file_version()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->file_version().data(), this->file_version().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->file_version(), target); + } + + // required string file_name = 5; + if (has_file_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->file_name().data(), this->file_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->file_name(), target); + } + + // required uint64 size = 6; if (has_size()) { - target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->size(), target); + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->size(), target); } if (!unknown_fields().empty()) { @@ -724,7 +866,28 @@ int Response_Data::ByteSize() const { this->status()); } - // required uint64 size = 3; + // required string file_path = 3; + if (has_file_path()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_path()); + } + + // required string file_version = 4; + if (has_file_version()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_version()); + } + + // required string file_name = 5; + if (has_file_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_name()); + } + + // required uint64 size = 6; if (has_size()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::UInt64Size( @@ -764,6 +927,15 @@ void Response_Data::MergeFrom(const Response_Data& from) { if (from.has_status()) { set_status(from.status()); } + if (from.has_file_path()) { + set_file_path(from.file_path()); + } + if (from.has_file_version()) { + set_file_version(from.file_version()); + } + if (from.has_file_name()) { + set_file_name(from.file_name()); + } if (from.has_size()) { set_size(from.size()); } @@ -784,7 +956,7 @@ void Response_Data::CopyFrom(const Response_Data& from) { } bool Response_Data::IsInitialized() const { - if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + if ((_has_bits_[0] & 0x0000003f) != 0x0000003f) return false; return true; } @@ -793,6 +965,9 @@ void Response_Data::Swap(Response_Data* other) { if (other != this) { std::swap(state_, other->state_); std::swap(status_, other->status_); + std::swap(file_path_, other->file_path_); + std::swap(file_version_, other->file_version_); + std::swap(file_name_, other->file_name_); std::swap(size_, other->size_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); diff --git a/src/Response.pb.h b/src/Response.pb.h index 1a62fe5d18a96a12dcf9a2000e7dea3e75c4d854..00b4817167e5083883bbfd44473f5478bb71b117 100644 --- a/src/Response.pb.h +++ b/src/Response.pb.h @@ -315,10 +315,46 @@ class Response_Data : public ::google::protobuf::Message { inline ::std::string* release_status(); inline void set_allocated_status(::std::string* status); - // required uint64 size = 3; + // required string file_path = 3; + inline bool has_file_path() const; + inline void clear_file_path(); + static const int kFilePathFieldNumber = 3; + inline const ::std::string& file_path() const; + inline void set_file_path(const ::std::string& value); + inline void set_file_path(const char* value); + inline void set_file_path(const char* value, size_t size); + inline ::std::string* mutable_file_path(); + inline ::std::string* release_file_path(); + inline void set_allocated_file_path(::std::string* file_path); + + // required string file_version = 4; + inline bool has_file_version() const; + inline void clear_file_version(); + static const int kFileVersionFieldNumber = 4; + inline const ::std::string& file_version() const; + inline void set_file_version(const ::std::string& value); + inline void set_file_version(const char* value); + inline void set_file_version(const char* value, size_t size); + inline ::std::string* mutable_file_version(); + inline ::std::string* release_file_version(); + inline void set_allocated_file_version(::std::string* file_version); + + // required string file_name = 5; + inline bool has_file_name() const; + inline void clear_file_name(); + static const int kFileNameFieldNumber = 5; + inline const ::std::string& file_name() const; + inline void set_file_name(const ::std::string& value); + inline void set_file_name(const char* value); + inline void set_file_name(const char* value, size_t size); + inline ::std::string* mutable_file_name(); + inline ::std::string* release_file_name(); + inline void set_allocated_file_name(::std::string* file_name); + + // required uint64 size = 6; inline bool has_size() const; inline void clear_size(); - static const int kSizeFieldNumber = 3; + static const int kSizeFieldNumber = 6; inline ::google::protobuf::uint64 size() const; inline void set_size(::google::protobuf::uint64 value); @@ -328,17 +364,26 @@ class Response_Data : public ::google::protobuf::Message { inline void clear_has_state(); inline void set_has_status(); inline void clear_has_status(); + inline void set_has_file_path(); + inline void clear_has_file_path(); + inline void set_has_file_version(); + inline void clear_has_file_version(); + inline void set_has_file_name(); + inline void clear_has_file_name(); inline void set_has_size(); inline void clear_has_size(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::std::string* status_; + ::std::string* file_path_; + ::std::string* file_version_; + ::std::string* file_name_; ::google::protobuf::uint64 size_; int state_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32]; friend void protobuf_AddDesc_Response_2eproto(); friend void protobuf_AssignDesc_Response_2eproto(); @@ -665,16 +710,226 @@ inline void Response_Data::set_allocated_status(::std::string* status) { } } -// required uint64 size = 3; -inline bool Response_Data::has_size() const { +// required string file_path = 3; +inline bool Response_Data::has_file_path() const { return (_has_bits_[0] & 0x00000004u) != 0; } -inline void Response_Data::set_has_size() { +inline void Response_Data::set_has_file_path() { _has_bits_[0] |= 0x00000004u; } -inline void Response_Data::clear_has_size() { +inline void Response_Data::clear_has_file_path() { _has_bits_[0] &= ~0x00000004u; } +inline void Response_Data::clear_file_path() { + if (file_path_ != &::google::protobuf::internal::kEmptyString) { + file_path_->clear(); + } + clear_has_file_path(); +} +inline const ::std::string& Response_Data::file_path() const { + return *file_path_; +} +inline void Response_Data::set_file_path(const ::std::string& value) { + set_has_file_path(); + if (file_path_ == &::google::protobuf::internal::kEmptyString) { + file_path_ = new ::std::string; + } + file_path_->assign(value); +} +inline void Response_Data::set_file_path(const char* value) { + set_has_file_path(); + if (file_path_ == &::google::protobuf::internal::kEmptyString) { + file_path_ = new ::std::string; + } + file_path_->assign(value); +} +inline void Response_Data::set_file_path(const char* value, size_t size) { + set_has_file_path(); + if (file_path_ == &::google::protobuf::internal::kEmptyString) { + file_path_ = new ::std::string; + } + file_path_->assign(reinterpret_cast<const char*>(value), size); +} +inline ::std::string* Response_Data::mutable_file_path() { + set_has_file_path(); + if (file_path_ == &::google::protobuf::internal::kEmptyString) { + file_path_ = new ::std::string; + } + return file_path_; +} +inline ::std::string* Response_Data::release_file_path() { + clear_has_file_path(); + if (file_path_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = file_path_; + file_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Response_Data::set_allocated_file_path(::std::string* file_path) { + if (file_path_ != &::google::protobuf::internal::kEmptyString) { + delete file_path_; + } + if (file_path) { + set_has_file_path(); + file_path_ = file_path; + } else { + clear_has_file_path(); + file_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// required string file_version = 4; +inline bool Response_Data::has_file_version() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void Response_Data::set_has_file_version() { + _has_bits_[0] |= 0x00000008u; +} +inline void Response_Data::clear_has_file_version() { + _has_bits_[0] &= ~0x00000008u; +} +inline void Response_Data::clear_file_version() { + if (file_version_ != &::google::protobuf::internal::kEmptyString) { + file_version_->clear(); + } + clear_has_file_version(); +} +inline const ::std::string& Response_Data::file_version() const { + return *file_version_; +} +inline void Response_Data::set_file_version(const ::std::string& value) { + set_has_file_version(); + if (file_version_ == &::google::protobuf::internal::kEmptyString) { + file_version_ = new ::std::string; + } + file_version_->assign(value); +} +inline void Response_Data::set_file_version(const char* value) { + set_has_file_version(); + if (file_version_ == &::google::protobuf::internal::kEmptyString) { + file_version_ = new ::std::string; + } + file_version_->assign(value); +} +inline void Response_Data::set_file_version(const char* value, size_t size) { + set_has_file_version(); + if (file_version_ == &::google::protobuf::internal::kEmptyString) { + file_version_ = new ::std::string; + } + file_version_->assign(reinterpret_cast<const char*>(value), size); +} +inline ::std::string* Response_Data::mutable_file_version() { + set_has_file_version(); + if (file_version_ == &::google::protobuf::internal::kEmptyString) { + file_version_ = new ::std::string; + } + return file_version_; +} +inline ::std::string* Response_Data::release_file_version() { + clear_has_file_version(); + if (file_version_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = file_version_; + file_version_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Response_Data::set_allocated_file_version(::std::string* file_version) { + if (file_version_ != &::google::protobuf::internal::kEmptyString) { + delete file_version_; + } + if (file_version) { + set_has_file_version(); + file_version_ = file_version; + } else { + clear_has_file_version(); + file_version_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// required string file_name = 5; +inline bool Response_Data::has_file_name() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void Response_Data::set_has_file_name() { + _has_bits_[0] |= 0x00000010u; +} +inline void Response_Data::clear_has_file_name() { + _has_bits_[0] &= ~0x00000010u; +} +inline void Response_Data::clear_file_name() { + if (file_name_ != &::google::protobuf::internal::kEmptyString) { + file_name_->clear(); + } + clear_has_file_name(); +} +inline const ::std::string& Response_Data::file_name() const { + return *file_name_; +} +inline void Response_Data::set_file_name(const ::std::string& value) { + set_has_file_name(); + if (file_name_ == &::google::protobuf::internal::kEmptyString) { + file_name_ = new ::std::string; + } + file_name_->assign(value); +} +inline void Response_Data::set_file_name(const char* value) { + set_has_file_name(); + if (file_name_ == &::google::protobuf::internal::kEmptyString) { + file_name_ = new ::std::string; + } + file_name_->assign(value); +} +inline void Response_Data::set_file_name(const char* value, size_t size) { + set_has_file_name(); + if (file_name_ == &::google::protobuf::internal::kEmptyString) { + file_name_ = new ::std::string; + } + file_name_->assign(reinterpret_cast<const char*>(value), size); +} +inline ::std::string* Response_Data::mutable_file_name() { + set_has_file_name(); + if (file_name_ == &::google::protobuf::internal::kEmptyString) { + file_name_ = new ::std::string; + } + return file_name_; +} +inline ::std::string* Response_Data::release_file_name() { + clear_has_file_name(); + if (file_name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = file_name_; + file_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} +inline void Response_Data::set_allocated_file_name(::std::string* file_name) { + if (file_name_ != &::google::protobuf::internal::kEmptyString) { + delete file_name_; + } + if (file_name) { + set_has_file_name(); + file_name_ = file_name; + } else { + clear_has_file_name(); + file_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + } +} + +// required uint64 size = 6; +inline bool Response_Data::has_size() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void Response_Data::set_has_size() { + _has_bits_[0] |= 0x00000020u; +} +inline void Response_Data::clear_has_size() { + _has_bits_[0] &= ~0x00000020u; +} inline void Response_Data::clear_size() { size_ = GOOGLE_ULONGLONG(0); clear_has_size();