mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
1236 lines
41 KiB
C++
1236 lines
41 KiB
C++
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||
|
// source: netcon.proto
|
||
|
|
||
|
#include "netcon.pb.h"
|
||
|
|
||
|
#include <algorithm>
|
||
|
|
||
|
#include <thirdparty/protobuf/io/coded_stream.h>
|
||
|
#include <thirdparty/protobuf/extension_set.h>
|
||
|
#include <thirdparty/protobuf/wire_format_lite.h>
|
||
|
#include <thirdparty/protobuf/io/zero_copy_stream_impl_lite.h>
|
||
|
// @@protoc_insertion_point(includes)
|
||
|
#include <thirdparty/protobuf/port_def.inc>
|
||
|
|
||
|
PROTOBUF_PRAGMA_INIT_SEG
|
||
|
|
||
|
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
|
||
|
namespace _pbi = _pb::internal;
|
||
|
|
||
|
namespace netcon {
|
||
|
PROTOBUF_CONSTEXPR request::request(
|
||
|
::_pbi::ConstantInitialized): _impl_{
|
||
|
/*decltype(_impl_._has_bits_)*/{}
|
||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||
|
, /*decltype(_impl_.requestmsg_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||
|
, /*decltype(_impl_.requestval_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||
|
, /*decltype(_impl_.messageid_)*/0
|
||
|
, /*decltype(_impl_.messagetype_)*/0
|
||
|
, /*decltype(_impl_.requesttype_)*/0} {}
|
||
|
struct requestDefaultTypeInternal {
|
||
|
PROTOBUF_CONSTEXPR requestDefaultTypeInternal()
|
||
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
||
|
~requestDefaultTypeInternal() {}
|
||
|
union {
|
||
|
request _instance;
|
||
|
};
|
||
|
};
|
||
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 requestDefaultTypeInternal _request_default_instance_;
|
||
|
PROTOBUF_CONSTEXPR response::response(
|
||
|
::_pbi::ConstantInitialized): _impl_{
|
||
|
/*decltype(_impl_._has_bits_)*/{}
|
||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||
|
, /*decltype(_impl_.responsemsg_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||
|
, /*decltype(_impl_.responseval_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||
|
, /*decltype(_impl_.messageid_)*/0
|
||
|
, /*decltype(_impl_.messagetype_)*/0
|
||
|
, /*decltype(_impl_.responsetype_)*/0} {}
|
||
|
struct responseDefaultTypeInternal {
|
||
|
PROTOBUF_CONSTEXPR responseDefaultTypeInternal()
|
||
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
||
|
~responseDefaultTypeInternal() {}
|
||
|
union {
|
||
|
response _instance;
|
||
|
};
|
||
|
};
|
||
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 responseDefaultTypeInternal _response_default_instance_;
|
||
|
PROTOBUF_CONSTEXPR envelope::envelope(
|
||
|
::_pbi::ConstantInitialized): _impl_{
|
||
|
/*decltype(_impl_.nonce_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||
|
, /*decltype(_impl_.data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||
|
, /*decltype(_impl_.encrypted_)*/false
|
||
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||
|
struct envelopeDefaultTypeInternal {
|
||
|
PROTOBUF_CONSTEXPR envelopeDefaultTypeInternal()
|
||
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
||
|
~envelopeDefaultTypeInternal() {}
|
||
|
union {
|
||
|
envelope _instance;
|
||
|
};
|
||
|
};
|
||
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 envelopeDefaultTypeInternal _envelope_default_instance_;
|
||
|
} // namespace netcon
|
||
|
namespace netcon {
|
||
|
bool request_e_IsValid(int value) {
|
||
|
switch (value) {
|
||
|
case 0:
|
||
|
case 1:
|
||
|
case 2:
|
||
|
return true;
|
||
|
default:
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> request_e_strings[3] = {};
|
||
|
|
||
|
static const char request_e_names[] =
|
||
|
"SERVERDATA_REQUEST_AUTH"
|
||
|
"SERVERDATA_REQUEST_EXECCOMMAND"
|
||
|
"SERVERDATA_REQUEST_SEND_CONSOLE_LOG";
|
||
|
|
||
|
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry request_e_entries[] = {
|
||
|
{ {request_e_names + 0, 23}, 1 },
|
||
|
{ {request_e_names + 23, 30}, 0 },
|
||
|
{ {request_e_names + 53, 35}, 2 },
|
||
|
};
|
||
|
|
||
|
static const int request_e_entries_by_number[] = {
|
||
|
1, // 0 -> SERVERDATA_REQUEST_EXECCOMMAND
|
||
|
0, // 1 -> SERVERDATA_REQUEST_AUTH
|
||
|
2, // 2 -> SERVERDATA_REQUEST_SEND_CONSOLE_LOG
|
||
|
};
|
||
|
|
||
|
const std::string& request_e_Name(
|
||
|
request_e value) {
|
||
|
static const bool dummy =
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
|
||
|
request_e_entries,
|
||
|
request_e_entries_by_number,
|
||
|
3, request_e_strings);
|
||
|
(void) dummy;
|
||
|
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
|
||
|
request_e_entries,
|
||
|
request_e_entries_by_number,
|
||
|
3, value);
|
||
|
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
|
||
|
request_e_strings[idx].get();
|
||
|
}
|
||
|
bool request_e_Parse(
|
||
|
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, request_e* value) {
|
||
|
int int_value;
|
||
|
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
|
||
|
request_e_entries, 3, name, &int_value);
|
||
|
if (success) {
|
||
|
*value = static_cast<request_e>(int_value);
|
||
|
}
|
||
|
return success;
|
||
|
}
|
||
|
bool response_e_IsValid(int value) {
|
||
|
switch (value) {
|
||
|
case 0:
|
||
|
case 1:
|
||
|
return true;
|
||
|
default:
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> response_e_strings[2] = {};
|
||
|
|
||
|
static const char response_e_names[] =
|
||
|
"SERVERDATA_RESPONSE_AUTH"
|
||
|
"SERVERDATA_RESPONSE_CONSOLE_LOG";
|
||
|
|
||
|
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry response_e_entries[] = {
|
||
|
{ {response_e_names + 0, 24}, 0 },
|
||
|
{ {response_e_names + 24, 31}, 1 },
|
||
|
};
|
||
|
|
||
|
static const int response_e_entries_by_number[] = {
|
||
|
0, // 0 -> SERVERDATA_RESPONSE_AUTH
|
||
|
1, // 1 -> SERVERDATA_RESPONSE_CONSOLE_LOG
|
||
|
};
|
||
|
|
||
|
const std::string& response_e_Name(
|
||
|
response_e value) {
|
||
|
static const bool dummy =
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
|
||
|
response_e_entries,
|
||
|
response_e_entries_by_number,
|
||
|
2, response_e_strings);
|
||
|
(void) dummy;
|
||
|
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
|
||
|
response_e_entries,
|
||
|
response_e_entries_by_number,
|
||
|
2, value);
|
||
|
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
|
||
|
response_e_strings[idx].get();
|
||
|
}
|
||
|
bool response_e_Parse(
|
||
|
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, response_e* value) {
|
||
|
int int_value;
|
||
|
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
|
||
|
response_e_entries, 2, name, &int_value);
|
||
|
if (success) {
|
||
|
*value = static_cast<response_e>(int_value);
|
||
|
}
|
||
|
return success;
|
||
|
}
|
||
|
|
||
|
// ===================================================================
|
||
|
|
||
|
class request::_Internal {
|
||
|
public:
|
||
|
using HasBits = decltype(std::declval<request>()._impl_._has_bits_);
|
||
|
static void set_has_messageid(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 4u;
|
||
|
}
|
||
|
static void set_has_messagetype(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 8u;
|
||
|
}
|
||
|
static void set_has_requesttype(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 16u;
|
||
|
}
|
||
|
static void set_has_requestmsg(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 1u;
|
||
|
}
|
||
|
static void set_has_requestval(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 2u;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
request::request(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||
|
bool is_message_owned)
|
||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
|
||
|
SharedCtor(arena, is_message_owned);
|
||
|
// @@protoc_insertion_point(arena_constructor:netcon.request)
|
||
|
}
|
||
|
request::request(const request& from)
|
||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
|
||
|
request* const _this = this; (void)_this;
|
||
|
new (&_impl_) Impl_{
|
||
|
decltype(_impl_._has_bits_){from._impl_._has_bits_}
|
||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||
|
, decltype(_impl_.requestmsg_){}
|
||
|
, decltype(_impl_.requestval_){}
|
||
|
, decltype(_impl_.messageid_){}
|
||
|
, decltype(_impl_.messagetype_){}
|
||
|
, decltype(_impl_.requesttype_){}};
|
||
|
|
||
|
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||
|
_impl_.requestmsg_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.requestmsg_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
if (from._internal_has_requestmsg()) {
|
||
|
_this->_impl_.requestmsg_.Set(from._internal_requestmsg(),
|
||
|
_this->GetArenaForAllocation());
|
||
|
}
|
||
|
_impl_.requestval_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.requestval_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
if (from._internal_has_requestval()) {
|
||
|
_this->_impl_.requestval_.Set(from._internal_requestval(),
|
||
|
_this->GetArenaForAllocation());
|
||
|
}
|
||
|
::memcpy(&_impl_.messageid_, &from._impl_.messageid_,
|
||
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.requesttype_) -
|
||
|
reinterpret_cast<char*>(&_impl_.messageid_)) + sizeof(_impl_.requesttype_));
|
||
|
// @@protoc_insertion_point(copy_constructor:netcon.request)
|
||
|
}
|
||
|
|
||
|
inline void request::SharedCtor(
|
||
|
::_pb::Arena* arena, bool is_message_owned) {
|
||
|
(void)arena;
|
||
|
(void)is_message_owned;
|
||
|
new (&_impl_) Impl_{
|
||
|
decltype(_impl_._has_bits_){}
|
||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||
|
, decltype(_impl_.requestmsg_){}
|
||
|
, decltype(_impl_.requestval_){}
|
||
|
, decltype(_impl_.messageid_){0}
|
||
|
, decltype(_impl_.messagetype_){0}
|
||
|
, decltype(_impl_.requesttype_){0}
|
||
|
};
|
||
|
_impl_.requestmsg_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.requestmsg_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.requestval_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.requestval_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
}
|
||
|
|
||
|
request::~request() {
|
||
|
// @@protoc_insertion_point(destructor:netcon.request)
|
||
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
|
||
|
(void)arena;
|
||
|
return;
|
||
|
}
|
||
|
SharedDtor();
|
||
|
}
|
||
|
|
||
|
inline void request::SharedDtor() {
|
||
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||
|
_impl_.requestmsg_.Destroy();
|
||
|
_impl_.requestval_.Destroy();
|
||
|
}
|
||
|
|
||
|
void request::SetCachedSize(int size) const {
|
||
|
_impl_._cached_size_.Set(size);
|
||
|
}
|
||
|
|
||
|
void request::Clear() {
|
||
|
// @@protoc_insertion_point(message_clear_start:netcon.request)
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
cached_has_bits = _impl_._has_bits_[0];
|
||
|
if (cached_has_bits & 0x00000003u) {
|
||
|
if (cached_has_bits & 0x00000001u) {
|
||
|
_impl_.requestmsg_.ClearNonDefaultToEmpty();
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000002u) {
|
||
|
_impl_.requestval_.ClearNonDefaultToEmpty();
|
||
|
}
|
||
|
}
|
||
|
if (cached_has_bits & 0x0000001cu) {
|
||
|
::memset(&_impl_.messageid_, 0, static_cast<size_t>(
|
||
|
reinterpret_cast<char*>(&_impl_.requesttype_) -
|
||
|
reinterpret_cast<char*>(&_impl_.messageid_)) + sizeof(_impl_.requesttype_));
|
||
|
}
|
||
|
_impl_._has_bits_.Clear();
|
||
|
_internal_metadata_.Clear<std::string>();
|
||
|
}
|
||
|
|
||
|
const char* request::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
||
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||
|
_Internal::HasBits has_bits{};
|
||
|
while (!ctx->Done(&ptr)) {
|
||
|
uint32_t tag;
|
||
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
||
|
switch (tag >> 3) {
|
||
|
// optional int32 messageId = 1;
|
||
|
case 1:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
||
|
_Internal::set_has_messageid(&has_bits);
|
||
|
_impl_.messageid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||
|
CHK_(ptr);
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// optional int32 messageType = 2;
|
||
|
case 2:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
||
|
_Internal::set_has_messagetype(&has_bits);
|
||
|
_impl_.messagetype_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||
|
CHK_(ptr);
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// optional .netcon.request_e requestType = 3;
|
||
|
case 3:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
|
||
|
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||
|
CHK_(ptr);
|
||
|
_internal_set_requesttype(static_cast<::netcon::request_e>(val));
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// optional string requestMsg = 4;
|
||
|
case 4:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
|
||
|
auto str = _internal_mutable_requestmsg();
|
||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||
|
CHK_(ptr);
|
||
|
CHK_(::_pbi::VerifyUTF8(str, nullptr));
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// optional string requestVal = 5;
|
||
|
case 5:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
||
|
auto str = _internal_mutable_requestval();
|
||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||
|
CHK_(ptr);
|
||
|
CHK_(::_pbi::VerifyUTF8(str, nullptr));
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
default:
|
||
|
goto handle_unusual;
|
||
|
} // switch
|
||
|
handle_unusual:
|
||
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
||
|
CHK_(ptr);
|
||
|
ctx->SetLastTag(tag);
|
||
|
goto message_done;
|
||
|
}
|
||
|
ptr = UnknownFieldParse(
|
||
|
tag,
|
||
|
_internal_metadata_.mutable_unknown_fields<std::string>(),
|
||
|
ptr, ctx);
|
||
|
CHK_(ptr != nullptr);
|
||
|
} // while
|
||
|
message_done:
|
||
|
_impl_._has_bits_.Or(has_bits);
|
||
|
return ptr;
|
||
|
failure:
|
||
|
ptr = nullptr;
|
||
|
goto message_done;
|
||
|
#undef CHK_
|
||
|
}
|
||
|
|
||
|
uint8_t* request::_InternalSerialize(
|
||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||
|
// @@protoc_insertion_point(serialize_to_array_start:netcon.request)
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
// optional int32 messageId = 1;
|
||
|
if (_internal_has_messageid()) {
|
||
|
target = stream->EnsureSpace(target);
|
||
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_messageid(), target);
|
||
|
}
|
||
|
|
||
|
// optional int32 messageType = 2;
|
||
|
if (_internal_has_messagetype()) {
|
||
|
target = stream->EnsureSpace(target);
|
||
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_messagetype(), target);
|
||
|
}
|
||
|
|
||
|
// optional .netcon.request_e requestType = 3;
|
||
|
if (_internal_has_requesttype()) {
|
||
|
target = stream->EnsureSpace(target);
|
||
|
target = ::_pbi::WireFormatLite::WriteEnumToArray(
|
||
|
3, this->_internal_requesttype(), target);
|
||
|
}
|
||
|
|
||
|
// optional string requestMsg = 4;
|
||
|
if (_internal_has_requestmsg()) {
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||
|
this->_internal_requestmsg().data(), static_cast<int>(this->_internal_requestmsg().length()),
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||
|
"netcon.request.requestMsg");
|
||
|
target = stream->WriteStringMaybeAliased(
|
||
|
4, this->_internal_requestmsg(), target);
|
||
|
}
|
||
|
|
||
|
// optional string requestVal = 5;
|
||
|
if (_internal_has_requestval()) {
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||
|
this->_internal_requestval().data(), static_cast<int>(this->_internal_requestval().length()),
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||
|
"netcon.request.requestVal");
|
||
|
target = stream->WriteStringMaybeAliased(
|
||
|
5, this->_internal_requestval(), target);
|
||
|
}
|
||
|
|
||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||
|
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
|
||
|
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
|
||
|
}
|
||
|
// @@protoc_insertion_point(serialize_to_array_end:netcon.request)
|
||
|
return target;
|
||
|
}
|
||
|
|
||
|
size_t request::ByteSizeLong() const {
|
||
|
// @@protoc_insertion_point(message_byte_size_start:netcon.request)
|
||
|
size_t total_size = 0;
|
||
|
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
cached_has_bits = _impl_._has_bits_[0];
|
||
|
if (cached_has_bits & 0x0000001fu) {
|
||
|
// optional string requestMsg = 4;
|
||
|
if (cached_has_bits & 0x00000001u) {
|
||
|
total_size += 1 +
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||
|
this->_internal_requestmsg());
|
||
|
}
|
||
|
|
||
|
// optional string requestVal = 5;
|
||
|
if (cached_has_bits & 0x00000002u) {
|
||
|
total_size += 1 +
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||
|
this->_internal_requestval());
|
||
|
}
|
||
|
|
||
|
// optional int32 messageId = 1;
|
||
|
if (cached_has_bits & 0x00000004u) {
|
||
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_messageid());
|
||
|
}
|
||
|
|
||
|
// optional int32 messageType = 2;
|
||
|
if (cached_has_bits & 0x00000008u) {
|
||
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_messagetype());
|
||
|
}
|
||
|
|
||
|
// optional .netcon.request_e requestType = 3;
|
||
|
if (cached_has_bits & 0x00000010u) {
|
||
|
total_size += 1 +
|
||
|
::_pbi::WireFormatLite::EnumSize(this->_internal_requesttype());
|
||
|
}
|
||
|
|
||
|
}
|
||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||
|
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
|
||
|
}
|
||
|
int cached_size = ::_pbi::ToCachedSize(total_size);
|
||
|
SetCachedSize(cached_size);
|
||
|
return total_size;
|
||
|
}
|
||
|
|
||
|
void request::CheckTypeAndMergeFrom(
|
||
|
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
|
||
|
MergeFrom(*::_pbi::DownCast<const request*>(
|
||
|
&from));
|
||
|
}
|
||
|
|
||
|
void request::MergeFrom(const request& from) {
|
||
|
request* const _this = this;
|
||
|
// @@protoc_insertion_point(class_specific_merge_from_start:netcon.request)
|
||
|
GOOGLE_DCHECK_NE(&from, _this);
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
cached_has_bits = from._impl_._has_bits_[0];
|
||
|
if (cached_has_bits & 0x0000001fu) {
|
||
|
if (cached_has_bits & 0x00000001u) {
|
||
|
_this->_internal_set_requestmsg(from._internal_requestmsg());
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000002u) {
|
||
|
_this->_internal_set_requestval(from._internal_requestval());
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000004u) {
|
||
|
_this->_impl_.messageid_ = from._impl_.messageid_;
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000008u) {
|
||
|
_this->_impl_.messagetype_ = from._impl_.messagetype_;
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000010u) {
|
||
|
_this->_impl_.requesttype_ = from._impl_.requesttype_;
|
||
|
}
|
||
|
_this->_impl_._has_bits_[0] |= cached_has_bits;
|
||
|
}
|
||
|
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||
|
}
|
||
|
|
||
|
void request::CopyFrom(const request& from) {
|
||
|
// @@protoc_insertion_point(class_specific_copy_from_start:netcon.request)
|
||
|
if (&from == this) return;
|
||
|
Clear();
|
||
|
MergeFrom(from);
|
||
|
}
|
||
|
|
||
|
bool request::IsInitialized() const {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
void request::InternalSwap(request* other) {
|
||
|
using std::swap;
|
||
|
auto* lhs_arena = GetArenaForAllocation();
|
||
|
auto* rhs_arena = other->GetArenaForAllocation();
|
||
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||
|
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||
|
&_impl_.requestmsg_, lhs_arena,
|
||
|
&other->_impl_.requestmsg_, rhs_arena
|
||
|
);
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||
|
&_impl_.requestval_, lhs_arena,
|
||
|
&other->_impl_.requestval_, rhs_arena
|
||
|
);
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||
|
PROTOBUF_FIELD_OFFSET(request, _impl_.requesttype_)
|
||
|
+ sizeof(request::_impl_.requesttype_)
|
||
|
- PROTOBUF_FIELD_OFFSET(request, _impl_.messageid_)>(
|
||
|
reinterpret_cast<char*>(&_impl_.messageid_),
|
||
|
reinterpret_cast<char*>(&other->_impl_.messageid_));
|
||
|
}
|
||
|
|
||
|
std::string request::GetTypeName() const {
|
||
|
return "netcon.request";
|
||
|
}
|
||
|
|
||
|
|
||
|
// ===================================================================
|
||
|
|
||
|
class response::_Internal {
|
||
|
public:
|
||
|
using HasBits = decltype(std::declval<response>()._impl_._has_bits_);
|
||
|
static void set_has_messageid(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 4u;
|
||
|
}
|
||
|
static void set_has_messagetype(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 8u;
|
||
|
}
|
||
|
static void set_has_responsetype(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 16u;
|
||
|
}
|
||
|
static void set_has_responsemsg(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 1u;
|
||
|
}
|
||
|
static void set_has_responseval(HasBits* has_bits) {
|
||
|
(*has_bits)[0] |= 2u;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
response::response(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||
|
bool is_message_owned)
|
||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
|
||
|
SharedCtor(arena, is_message_owned);
|
||
|
// @@protoc_insertion_point(arena_constructor:netcon.response)
|
||
|
}
|
||
|
response::response(const response& from)
|
||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
|
||
|
response* const _this = this; (void)_this;
|
||
|
new (&_impl_) Impl_{
|
||
|
decltype(_impl_._has_bits_){from._impl_._has_bits_}
|
||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||
|
, decltype(_impl_.responsemsg_){}
|
||
|
, decltype(_impl_.responseval_){}
|
||
|
, decltype(_impl_.messageid_){}
|
||
|
, decltype(_impl_.messagetype_){}
|
||
|
, decltype(_impl_.responsetype_){}};
|
||
|
|
||
|
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||
|
_impl_.responsemsg_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.responsemsg_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
if (from._internal_has_responsemsg()) {
|
||
|
_this->_impl_.responsemsg_.Set(from._internal_responsemsg(),
|
||
|
_this->GetArenaForAllocation());
|
||
|
}
|
||
|
_impl_.responseval_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.responseval_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
if (from._internal_has_responseval()) {
|
||
|
_this->_impl_.responseval_.Set(from._internal_responseval(),
|
||
|
_this->GetArenaForAllocation());
|
||
|
}
|
||
|
::memcpy(&_impl_.messageid_, &from._impl_.messageid_,
|
||
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.responsetype_) -
|
||
|
reinterpret_cast<char*>(&_impl_.messageid_)) + sizeof(_impl_.responsetype_));
|
||
|
// @@protoc_insertion_point(copy_constructor:netcon.response)
|
||
|
}
|
||
|
|
||
|
inline void response::SharedCtor(
|
||
|
::_pb::Arena* arena, bool is_message_owned) {
|
||
|
(void)arena;
|
||
|
(void)is_message_owned;
|
||
|
new (&_impl_) Impl_{
|
||
|
decltype(_impl_._has_bits_){}
|
||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||
|
, decltype(_impl_.responsemsg_){}
|
||
|
, decltype(_impl_.responseval_){}
|
||
|
, decltype(_impl_.messageid_){0}
|
||
|
, decltype(_impl_.messagetype_){0}
|
||
|
, decltype(_impl_.responsetype_){0}
|
||
|
};
|
||
|
_impl_.responsemsg_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.responsemsg_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.responseval_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.responseval_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
}
|
||
|
|
||
|
response::~response() {
|
||
|
// @@protoc_insertion_point(destructor:netcon.response)
|
||
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
|
||
|
(void)arena;
|
||
|
return;
|
||
|
}
|
||
|
SharedDtor();
|
||
|
}
|
||
|
|
||
|
inline void response::SharedDtor() {
|
||
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||
|
_impl_.responsemsg_.Destroy();
|
||
|
_impl_.responseval_.Destroy();
|
||
|
}
|
||
|
|
||
|
void response::SetCachedSize(int size) const {
|
||
|
_impl_._cached_size_.Set(size);
|
||
|
}
|
||
|
|
||
|
void response::Clear() {
|
||
|
// @@protoc_insertion_point(message_clear_start:netcon.response)
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
cached_has_bits = _impl_._has_bits_[0];
|
||
|
if (cached_has_bits & 0x00000003u) {
|
||
|
if (cached_has_bits & 0x00000001u) {
|
||
|
_impl_.responsemsg_.ClearNonDefaultToEmpty();
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000002u) {
|
||
|
_impl_.responseval_.ClearNonDefaultToEmpty();
|
||
|
}
|
||
|
}
|
||
|
if (cached_has_bits & 0x0000001cu) {
|
||
|
::memset(&_impl_.messageid_, 0, static_cast<size_t>(
|
||
|
reinterpret_cast<char*>(&_impl_.responsetype_) -
|
||
|
reinterpret_cast<char*>(&_impl_.messageid_)) + sizeof(_impl_.responsetype_));
|
||
|
}
|
||
|
_impl_._has_bits_.Clear();
|
||
|
_internal_metadata_.Clear<std::string>();
|
||
|
}
|
||
|
|
||
|
const char* response::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
||
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||
|
_Internal::HasBits has_bits{};
|
||
|
while (!ctx->Done(&ptr)) {
|
||
|
uint32_t tag;
|
||
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
||
|
switch (tag >> 3) {
|
||
|
// optional int32 messageId = 1;
|
||
|
case 1:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
||
|
_Internal::set_has_messageid(&has_bits);
|
||
|
_impl_.messageid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||
|
CHK_(ptr);
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// optional int32 messageType = 2;
|
||
|
case 2:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
||
|
_Internal::set_has_messagetype(&has_bits);
|
||
|
_impl_.messagetype_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||
|
CHK_(ptr);
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// optional .netcon.response_e responseType = 3;
|
||
|
case 3:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
|
||
|
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||
|
CHK_(ptr);
|
||
|
_internal_set_responsetype(static_cast<::netcon::response_e>(val));
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// optional string responseMsg = 4;
|
||
|
case 4:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
|
||
|
auto str = _internal_mutable_responsemsg();
|
||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||
|
CHK_(ptr);
|
||
|
CHK_(::_pbi::VerifyUTF8(str, nullptr));
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// optional string responseVal = 5;
|
||
|
case 5:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
||
|
auto str = _internal_mutable_responseval();
|
||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||
|
CHK_(ptr);
|
||
|
CHK_(::_pbi::VerifyUTF8(str, nullptr));
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
default:
|
||
|
goto handle_unusual;
|
||
|
} // switch
|
||
|
handle_unusual:
|
||
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
||
|
CHK_(ptr);
|
||
|
ctx->SetLastTag(tag);
|
||
|
goto message_done;
|
||
|
}
|
||
|
ptr = UnknownFieldParse(
|
||
|
tag,
|
||
|
_internal_metadata_.mutable_unknown_fields<std::string>(),
|
||
|
ptr, ctx);
|
||
|
CHK_(ptr != nullptr);
|
||
|
} // while
|
||
|
message_done:
|
||
|
_impl_._has_bits_.Or(has_bits);
|
||
|
return ptr;
|
||
|
failure:
|
||
|
ptr = nullptr;
|
||
|
goto message_done;
|
||
|
#undef CHK_
|
||
|
}
|
||
|
|
||
|
uint8_t* response::_InternalSerialize(
|
||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||
|
// @@protoc_insertion_point(serialize_to_array_start:netcon.response)
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
// optional int32 messageId = 1;
|
||
|
if (_internal_has_messageid()) {
|
||
|
target = stream->EnsureSpace(target);
|
||
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_messageid(), target);
|
||
|
}
|
||
|
|
||
|
// optional int32 messageType = 2;
|
||
|
if (_internal_has_messagetype()) {
|
||
|
target = stream->EnsureSpace(target);
|
||
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_messagetype(), target);
|
||
|
}
|
||
|
|
||
|
// optional .netcon.response_e responseType = 3;
|
||
|
if (_internal_has_responsetype()) {
|
||
|
target = stream->EnsureSpace(target);
|
||
|
target = ::_pbi::WireFormatLite::WriteEnumToArray(
|
||
|
3, this->_internal_responsetype(), target);
|
||
|
}
|
||
|
|
||
|
// optional string responseMsg = 4;
|
||
|
if (_internal_has_responsemsg()) {
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||
|
this->_internal_responsemsg().data(), static_cast<int>(this->_internal_responsemsg().length()),
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||
|
"netcon.response.responseMsg");
|
||
|
target = stream->WriteStringMaybeAliased(
|
||
|
4, this->_internal_responsemsg(), target);
|
||
|
}
|
||
|
|
||
|
// optional string responseVal = 5;
|
||
|
if (_internal_has_responseval()) {
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||
|
this->_internal_responseval().data(), static_cast<int>(this->_internal_responseval().length()),
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||
|
"netcon.response.responseVal");
|
||
|
target = stream->WriteStringMaybeAliased(
|
||
|
5, this->_internal_responseval(), target);
|
||
|
}
|
||
|
|
||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||
|
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
|
||
|
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
|
||
|
}
|
||
|
// @@protoc_insertion_point(serialize_to_array_end:netcon.response)
|
||
|
return target;
|
||
|
}
|
||
|
|
||
|
size_t response::ByteSizeLong() const {
|
||
|
// @@protoc_insertion_point(message_byte_size_start:netcon.response)
|
||
|
size_t total_size = 0;
|
||
|
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
cached_has_bits = _impl_._has_bits_[0];
|
||
|
if (cached_has_bits & 0x0000001fu) {
|
||
|
// optional string responseMsg = 4;
|
||
|
if (cached_has_bits & 0x00000001u) {
|
||
|
total_size += 1 +
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||
|
this->_internal_responsemsg());
|
||
|
}
|
||
|
|
||
|
// optional string responseVal = 5;
|
||
|
if (cached_has_bits & 0x00000002u) {
|
||
|
total_size += 1 +
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||
|
this->_internal_responseval());
|
||
|
}
|
||
|
|
||
|
// optional int32 messageId = 1;
|
||
|
if (cached_has_bits & 0x00000004u) {
|
||
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_messageid());
|
||
|
}
|
||
|
|
||
|
// optional int32 messageType = 2;
|
||
|
if (cached_has_bits & 0x00000008u) {
|
||
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_messagetype());
|
||
|
}
|
||
|
|
||
|
// optional .netcon.response_e responseType = 3;
|
||
|
if (cached_has_bits & 0x00000010u) {
|
||
|
total_size += 1 +
|
||
|
::_pbi::WireFormatLite::EnumSize(this->_internal_responsetype());
|
||
|
}
|
||
|
|
||
|
}
|
||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||
|
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
|
||
|
}
|
||
|
int cached_size = ::_pbi::ToCachedSize(total_size);
|
||
|
SetCachedSize(cached_size);
|
||
|
return total_size;
|
||
|
}
|
||
|
|
||
|
void response::CheckTypeAndMergeFrom(
|
||
|
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
|
||
|
MergeFrom(*::_pbi::DownCast<const response*>(
|
||
|
&from));
|
||
|
}
|
||
|
|
||
|
void response::MergeFrom(const response& from) {
|
||
|
response* const _this = this;
|
||
|
// @@protoc_insertion_point(class_specific_merge_from_start:netcon.response)
|
||
|
GOOGLE_DCHECK_NE(&from, _this);
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
cached_has_bits = from._impl_._has_bits_[0];
|
||
|
if (cached_has_bits & 0x0000001fu) {
|
||
|
if (cached_has_bits & 0x00000001u) {
|
||
|
_this->_internal_set_responsemsg(from._internal_responsemsg());
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000002u) {
|
||
|
_this->_internal_set_responseval(from._internal_responseval());
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000004u) {
|
||
|
_this->_impl_.messageid_ = from._impl_.messageid_;
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000008u) {
|
||
|
_this->_impl_.messagetype_ = from._impl_.messagetype_;
|
||
|
}
|
||
|
if (cached_has_bits & 0x00000010u) {
|
||
|
_this->_impl_.responsetype_ = from._impl_.responsetype_;
|
||
|
}
|
||
|
_this->_impl_._has_bits_[0] |= cached_has_bits;
|
||
|
}
|
||
|
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||
|
}
|
||
|
|
||
|
void response::CopyFrom(const response& from) {
|
||
|
// @@protoc_insertion_point(class_specific_copy_from_start:netcon.response)
|
||
|
if (&from == this) return;
|
||
|
Clear();
|
||
|
MergeFrom(from);
|
||
|
}
|
||
|
|
||
|
bool response::IsInitialized() const {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
void response::InternalSwap(response* other) {
|
||
|
using std::swap;
|
||
|
auto* lhs_arena = GetArenaForAllocation();
|
||
|
auto* rhs_arena = other->GetArenaForAllocation();
|
||
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||
|
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||
|
&_impl_.responsemsg_, lhs_arena,
|
||
|
&other->_impl_.responsemsg_, rhs_arena
|
||
|
);
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||
|
&_impl_.responseval_, lhs_arena,
|
||
|
&other->_impl_.responseval_, rhs_arena
|
||
|
);
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||
|
PROTOBUF_FIELD_OFFSET(response, _impl_.responsetype_)
|
||
|
+ sizeof(response::_impl_.responsetype_)
|
||
|
- PROTOBUF_FIELD_OFFSET(response, _impl_.messageid_)>(
|
||
|
reinterpret_cast<char*>(&_impl_.messageid_),
|
||
|
reinterpret_cast<char*>(&other->_impl_.messageid_));
|
||
|
}
|
||
|
|
||
|
std::string response::GetTypeName() const {
|
||
|
return "netcon.response";
|
||
|
}
|
||
|
|
||
|
|
||
|
// ===================================================================
|
||
|
|
||
|
class envelope::_Internal {
|
||
|
public:
|
||
|
};
|
||
|
|
||
|
envelope::envelope(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||
|
bool is_message_owned)
|
||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
|
||
|
SharedCtor(arena, is_message_owned);
|
||
|
// @@protoc_insertion_point(arena_constructor:netcon.envelope)
|
||
|
}
|
||
|
envelope::envelope(const envelope& from)
|
||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
|
||
|
envelope* const _this = this; (void)_this;
|
||
|
new (&_impl_) Impl_{
|
||
|
decltype(_impl_.nonce_){}
|
||
|
, decltype(_impl_.data_){}
|
||
|
, decltype(_impl_.encrypted_){}
|
||
|
, /*decltype(_impl_._cached_size_)*/{}};
|
||
|
|
||
|
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||
|
_impl_.nonce_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.nonce_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
if (!from._internal_nonce().empty()) {
|
||
|
_this->_impl_.nonce_.Set(from._internal_nonce(),
|
||
|
_this->GetArenaForAllocation());
|
||
|
}
|
||
|
_impl_.data_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.data_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
if (!from._internal_data().empty()) {
|
||
|
_this->_impl_.data_.Set(from._internal_data(),
|
||
|
_this->GetArenaForAllocation());
|
||
|
}
|
||
|
_this->_impl_.encrypted_ = from._impl_.encrypted_;
|
||
|
// @@protoc_insertion_point(copy_constructor:netcon.envelope)
|
||
|
}
|
||
|
|
||
|
inline void envelope::SharedCtor(
|
||
|
::_pb::Arena* arena, bool is_message_owned) {
|
||
|
(void)arena;
|
||
|
(void)is_message_owned;
|
||
|
new (&_impl_) Impl_{
|
||
|
decltype(_impl_.nonce_){}
|
||
|
, decltype(_impl_.data_){}
|
||
|
, decltype(_impl_.encrypted_){false}
|
||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||
|
};
|
||
|
_impl_.nonce_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.nonce_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.data_.InitDefault();
|
||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
_impl_.data_.Set("", GetArenaForAllocation());
|
||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||
|
}
|
||
|
|
||
|
envelope::~envelope() {
|
||
|
// @@protoc_insertion_point(destructor:netcon.envelope)
|
||
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
|
||
|
(void)arena;
|
||
|
return;
|
||
|
}
|
||
|
SharedDtor();
|
||
|
}
|
||
|
|
||
|
inline void envelope::SharedDtor() {
|
||
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||
|
_impl_.nonce_.Destroy();
|
||
|
_impl_.data_.Destroy();
|
||
|
}
|
||
|
|
||
|
void envelope::SetCachedSize(int size) const {
|
||
|
_impl_._cached_size_.Set(size);
|
||
|
}
|
||
|
|
||
|
void envelope::Clear() {
|
||
|
// @@protoc_insertion_point(message_clear_start:netcon.envelope)
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
_impl_.nonce_.ClearToEmpty();
|
||
|
_impl_.data_.ClearToEmpty();
|
||
|
_impl_.encrypted_ = false;
|
||
|
_internal_metadata_.Clear<std::string>();
|
||
|
}
|
||
|
|
||
|
const char* envelope::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
||
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||
|
while (!ctx->Done(&ptr)) {
|
||
|
uint32_t tag;
|
||
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
||
|
switch (tag >> 3) {
|
||
|
// bool encrypted = 1;
|
||
|
case 1:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
||
|
_impl_.encrypted_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||
|
CHK_(ptr);
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// bytes nonce = 2;
|
||
|
case 2:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
||
|
auto str = _internal_mutable_nonce();
|
||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||
|
CHK_(ptr);
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
// bytes data = 3;
|
||
|
case 3:
|
||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
||
|
auto str = _internal_mutable_data();
|
||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||
|
CHK_(ptr);
|
||
|
} else
|
||
|
goto handle_unusual;
|
||
|
continue;
|
||
|
default:
|
||
|
goto handle_unusual;
|
||
|
} // switch
|
||
|
handle_unusual:
|
||
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
||
|
CHK_(ptr);
|
||
|
ctx->SetLastTag(tag);
|
||
|
goto message_done;
|
||
|
}
|
||
|
ptr = UnknownFieldParse(
|
||
|
tag,
|
||
|
_internal_metadata_.mutable_unknown_fields<std::string>(),
|
||
|
ptr, ctx);
|
||
|
CHK_(ptr != nullptr);
|
||
|
} // while
|
||
|
message_done:
|
||
|
return ptr;
|
||
|
failure:
|
||
|
ptr = nullptr;
|
||
|
goto message_done;
|
||
|
#undef CHK_
|
||
|
}
|
||
|
|
||
|
uint8_t* envelope::_InternalSerialize(
|
||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||
|
// @@protoc_insertion_point(serialize_to_array_start:netcon.envelope)
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
// bool encrypted = 1;
|
||
|
if (this->_internal_encrypted() != 0) {
|
||
|
target = stream->EnsureSpace(target);
|
||
|
target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_encrypted(), target);
|
||
|
}
|
||
|
|
||
|
// bytes nonce = 2;
|
||
|
if (!this->_internal_nonce().empty()) {
|
||
|
target = stream->WriteBytesMaybeAliased(
|
||
|
2, this->_internal_nonce(), target);
|
||
|
}
|
||
|
|
||
|
// bytes data = 3;
|
||
|
if (!this->_internal_data().empty()) {
|
||
|
target = stream->WriteBytesMaybeAliased(
|
||
|
3, this->_internal_data(), target);
|
||
|
}
|
||
|
|
||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||
|
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
|
||
|
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
|
||
|
}
|
||
|
// @@protoc_insertion_point(serialize_to_array_end:netcon.envelope)
|
||
|
return target;
|
||
|
}
|
||
|
|
||
|
size_t envelope::ByteSizeLong() const {
|
||
|
// @@protoc_insertion_point(message_byte_size_start:netcon.envelope)
|
||
|
size_t total_size = 0;
|
||
|
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
// bytes nonce = 2;
|
||
|
if (!this->_internal_nonce().empty()) {
|
||
|
total_size += 1 +
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
|
||
|
this->_internal_nonce());
|
||
|
}
|
||
|
|
||
|
// bytes data = 3;
|
||
|
if (!this->_internal_data().empty()) {
|
||
|
total_size += 1 +
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
|
||
|
this->_internal_data());
|
||
|
}
|
||
|
|
||
|
// bool encrypted = 1;
|
||
|
if (this->_internal_encrypted() != 0) {
|
||
|
total_size += 1 + 1;
|
||
|
}
|
||
|
|
||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||
|
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
|
||
|
}
|
||
|
int cached_size = ::_pbi::ToCachedSize(total_size);
|
||
|
SetCachedSize(cached_size);
|
||
|
return total_size;
|
||
|
}
|
||
|
|
||
|
void envelope::CheckTypeAndMergeFrom(
|
||
|
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
|
||
|
MergeFrom(*::_pbi::DownCast<const envelope*>(
|
||
|
&from));
|
||
|
}
|
||
|
|
||
|
void envelope::MergeFrom(const envelope& from) {
|
||
|
envelope* const _this = this;
|
||
|
// @@protoc_insertion_point(class_specific_merge_from_start:netcon.envelope)
|
||
|
GOOGLE_DCHECK_NE(&from, _this);
|
||
|
uint32_t cached_has_bits = 0;
|
||
|
(void) cached_has_bits;
|
||
|
|
||
|
if (!from._internal_nonce().empty()) {
|
||
|
_this->_internal_set_nonce(from._internal_nonce());
|
||
|
}
|
||
|
if (!from._internal_data().empty()) {
|
||
|
_this->_internal_set_data(from._internal_data());
|
||
|
}
|
||
|
if (from._internal_encrypted() != 0) {
|
||
|
_this->_internal_set_encrypted(from._internal_encrypted());
|
||
|
}
|
||
|
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||
|
}
|
||
|
|
||
|
void envelope::CopyFrom(const envelope& from) {
|
||
|
// @@protoc_insertion_point(class_specific_copy_from_start:netcon.envelope)
|
||
|
if (&from == this) return;
|
||
|
Clear();
|
||
|
MergeFrom(from);
|
||
|
}
|
||
|
|
||
|
bool envelope::IsInitialized() const {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
void envelope::InternalSwap(envelope* other) {
|
||
|
using std::swap;
|
||
|
auto* lhs_arena = GetArenaForAllocation();
|
||
|
auto* rhs_arena = other->GetArenaForAllocation();
|
||
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||
|
&_impl_.nonce_, lhs_arena,
|
||
|
&other->_impl_.nonce_, rhs_arena
|
||
|
);
|
||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||
|
&_impl_.data_, lhs_arena,
|
||
|
&other->_impl_.data_, rhs_arena
|
||
|
);
|
||
|
swap(_impl_.encrypted_, other->_impl_.encrypted_);
|
||
|
}
|
||
|
|
||
|
std::string envelope::GetTypeName() const {
|
||
|
return "netcon.envelope";
|
||
|
}
|
||
|
|
||
|
|
||
|
// @@protoc_insertion_point(namespace_scope)
|
||
|
} // namespace netcon
|
||
|
PROTOBUF_NAMESPACE_OPEN
|
||
|
template<> PROTOBUF_NOINLINE ::netcon::request*
|
||
|
Arena::CreateMaybeMessage< ::netcon::request >(Arena* arena) {
|
||
|
return Arena::CreateMessageInternal< ::netcon::request >(arena);
|
||
|
}
|
||
|
template<> PROTOBUF_NOINLINE ::netcon::response*
|
||
|
Arena::CreateMaybeMessage< ::netcon::response >(Arena* arena) {
|
||
|
return Arena::CreateMessageInternal< ::netcon::response >(arena);
|
||
|
}
|
||
|
template<> PROTOBUF_NOINLINE ::netcon::envelope*
|
||
|
Arena::CreateMaybeMessage< ::netcon::envelope >(Arena* arena) {
|
||
|
return Arena::CreateMessageInternal< ::netcon::envelope >(arena);
|
||
|
}
|
||
|
PROTOBUF_NAMESPACE_CLOSE
|
||
|
|
||
|
// @@protoc_insertion_point(global_scope)
|
||
|
#include <thirdparty/protobuf/port_undef.inc>
|