367 lines
11 KiB
C++
367 lines
11 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: common.proto
|
|
|
|
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
|
#include "common.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/stubs/common.h>
|
|
#include <google/protobuf/stubs/once.h>
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/wire_format_lite_inl.h>
|
|
#include <google/protobuf/descriptor.h>
|
|
#include <google/protobuf/generated_message_reflection.h>
|
|
#include <google/protobuf/reflection_ops.h>
|
|
#include <google/protobuf/wire_format.h>
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
namespace Remote {
|
|
|
|
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\022\006Remote\"\'\n\005Error\022\r\n\005error"
|
|
"\030\001 \002(\010\022\017\n\007message\030\002 \001(\t", 63);
|
|
::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<const Error*>(
|
|
&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)
|
|
|
|
} // namespace Remote
|
|
|
|
// @@protoc_insertion_point(global_scope)
|