diff --git a/retroshare-nogui/src/retroshare-nogui.pro b/retroshare-nogui/src/retroshare-nogui.pro index 28621ebe0..d56e5c1e5 100644 --- a/retroshare-nogui/src/retroshare-nogui.pro +++ b/retroshare-nogui/src/retroshare-nogui.pro @@ -124,6 +124,7 @@ introserver { DEFINES *= RS_INTRO_SERVER } + sshserver { # This Requires libssh-0.5.* to compile. # Modify path below to point at it. @@ -176,9 +177,29 @@ sshserver { #SOURCES += rpc/proto/rpcecho.cc \ DEFINES *= RS_SSH_SERVER + + # Include Protobuf classes. + #CONFIG += protorpc +} + +protorpc { + # Proto Services + HEADERS += rpc/proto/rpcprotopeers.h \ + + SOURCES += rpc/proto/rpcprotopeers.cc \ + + # Generated ProtoBuf Code the RPC System + HEADERS += rpc/proto/gencc/base.pb.h \ + rpc/proto/gencc/peers.pb.h \ + + SOURCES += rpc/proto/gencc/base.pb.cc \ + rpc/proto/gencc/peers.pb.cc \ + + QMAKE_CFLAGS += -pthread + QMAKE_CXXFLAGS += -pthread + LIBS += -lprotobuf } - diff --git a/retroshare-nogui/src/retroshare.cc b/retroshare-nogui/src/retroshare.cc index b741966c6..36fd0172e 100644 --- a/retroshare-nogui/src/retroshare.cc +++ b/retroshare-nogui/src/retroshare.cc @@ -398,7 +398,7 @@ int main(int argc, char **argv) Menu *baseMenu = CreateMenuStructure(notify); MenuInterface *menuInterface = new MenuInterface(ssh, baseMenu, baseDrawFlags | MENU_DRAW_FLAGS_ECHO); ssh->setRpcSystem(menuInterface); - ssh->setSleepPeriods(0.2, 1); + ssh->setSleepPeriods(0.05, 0.5); } ssh->start(); diff --git a/retroshare-nogui/src/rpc/proto/gencc/NOTES.txt b/retroshare-nogui/src/rpc/proto/gencc/NOTES.txt new file mode 100644 index 000000000..cdd79634d --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/gencc/NOTES.txt @@ -0,0 +1,4 @@ + +The files in this directory are auto generated by protobuf's protoc. +Don't add any other files in here!. + diff --git a/retroshare-nogui/src/rpc/proto/gencc/base.pb.cc b/retroshare-nogui/src/rpc/proto/gencc/base.pb.cc new file mode 100644 index 000000000..0a2821fa2 --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/gencc/base.pb.cc @@ -0,0 +1,2044 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "base.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace rsctrl { +namespace base { + +namespace { + +const ::google::protobuf::Descriptor* Status_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Status_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* Status_StatusCode_descriptor_ = NULL; +const ::google::protobuf::Descriptor* Location_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Location_reflection_ = NULL; +const ::google::protobuf::Descriptor* Person_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Person_reflection_ = NULL; +const ::google::protobuf::Descriptor* File_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + File_reflection_ = NULL; +const ::google::protobuf::Descriptor* Dir_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Dir_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_base_2eproto() { + protobuf_AddDesc_base_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "base.proto"); + GOOGLE_CHECK(file != NULL); + Status_descriptor_ = file->message_type(0); + static const int Status_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Status, code_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Status, msg_), + }; + Status_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Status_descriptor_, + Status::default_instance_, + Status_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Status, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Status, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Status)); + Status_StatusCode_descriptor_ = Status_descriptor_->enum_type(0); + Location_descriptor_ = file->message_type(1); + static const int Location_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Location, ssl_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Location, location_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Location, localaddr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Location, extaddr_), + }; + Location_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Location_descriptor_, + Location::default_instance_, + Location_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Location, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Location, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Location)); + Person_descriptor_ = file->message_type(2); + static const int Person_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Person, gpg_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Person, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Person, locations_), + }; + Person_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Person_descriptor_, + Person::default_instance_, + Person_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Person, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Person, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Person)); + File_descriptor_ = file->message_type(3); + static const int File_offsets_[5] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(File, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(File, hash_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(File, size_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(File, path_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(File, avail_), + }; + File_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + File_descriptor_, + File::default_instance_, + File_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(File, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(File, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(File)); + Dir_descriptor_ = file->message_type(4); + static const int Dir_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Dir, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Dir, path_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Dir, subdirs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Dir, files_), + }; + Dir_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Dir_descriptor_, + Dir::default_instance_, + Dir_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Dir, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Dir, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Dir)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_base_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Status_descriptor_, &Status::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Location_descriptor_, &Location::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Person_descriptor_, &Person::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + File_descriptor_, &File::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Dir_descriptor_, &Dir::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_base_2eproto() { + delete Status::default_instance_; + delete Status_reflection_; + delete Location::default_instance_; + delete Location_reflection_; + delete Person::default_instance_; + delete Person_reflection_; + delete File::default_instance_; + delete File_reflection_; + delete Dir::default_instance_; + delete Dir_reflection_; +} + +void protobuf_AddDesc_base_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\nbase.proto\022\013rsctrl.base\"\212\001\n\006Status\022,\n\004" + "code\030\001 \002(\0162\036.rsctrl.base.Status.StatusCo" + "de\022\013\n\003msg\030\002 \001(\t\"E\n\nStatusCode\022\n\n\006FAILED\020" + "\000\022\021\n\rINVALID_QUERY\020\001\022\013\n\007SUCCESS\020\002\022\013\n\007REA" + "DMSG\020\003\"P\n\010Location\022\016\n\006ssl_id\030\001 \002(\t\022\020\n\010lo" + "cation\030\002 \002(\t\022\021\n\tlocaladdr\030\003 \002(\t\022\017\n\007extad" + "dr\030\004 \002(\t\"P\n\006Person\022\016\n\006gpg_id\030\001 \002(\t\022\014\n\004na" + "me\030\002 \002(\t\022(\n\tlocations\030\003 \003(\0132\025.rsctrl.bas" + "e.Location\"M\n\004File\022\014\n\004name\030\001 \002(\t\022\014\n\004hash" + "\030\002 \002(\t\022\014\n\004size\030\003 \002(\003\022\014\n\004path\030\004 \001(\t\022\r\n\005av" + "ail\030\005 \001(\t\"f\n\003Dir\022\014\n\004name\030\001 \002(\t\022\014\n\004path\030\002" + " \002(\t\022!\n\007subdirs\030\003 \003(\0132\020.rsctrl.base.Dir\022" + " \n\005files\030\004 \003(\0132\021.rsctrl.base.File", 513); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "base.proto", &protobuf_RegisterTypes); + Status::default_instance_ = new Status(); + Location::default_instance_ = new Location(); + Person::default_instance_ = new Person(); + File::default_instance_ = new File(); + Dir::default_instance_ = new Dir(); + Status::default_instance_->InitAsDefaultInstance(); + Location::default_instance_->InitAsDefaultInstance(); + Person::default_instance_->InitAsDefaultInstance(); + File::default_instance_->InitAsDefaultInstance(); + Dir::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_base_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_base_2eproto { + StaticDescriptorInitializer_base_2eproto() { + protobuf_AddDesc_base_2eproto(); + } +} static_descriptor_initializer_base_2eproto_; + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* Status_StatusCode_descriptor() { + protobuf_AssignDescriptorsOnce(); + return Status_StatusCode_descriptor_; +} +bool Status_StatusCode_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const Status_StatusCode Status::FAILED; +const Status_StatusCode Status::INVALID_QUERY; +const Status_StatusCode Status::SUCCESS; +const Status_StatusCode Status::READMSG; +const Status_StatusCode Status::StatusCode_MIN; +const Status_StatusCode Status::StatusCode_MAX; +const int Status::StatusCode_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int Status::kCodeFieldNumber; +const int Status::kMsgFieldNumber; +#endif // !_MSC_VER + +Status::Status() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Status::InitAsDefaultInstance() { +} + +Status::Status(const Status& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Status::SharedCtor() { + _cached_size_ = 0; + code_ = 0; + msg_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Status::~Status() { + SharedDtor(); +} + +void Status::SharedDtor() { + if (msg_ != &::google::protobuf::internal::kEmptyString) { + delete msg_; + } + if (this != default_instance_) { + } +} + +void Status::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Status::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Status_descriptor_; +} + +const Status& Status::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_base_2eproto(); return *default_instance_; +} + +Status* Status::default_instance_ = NULL; + +Status* Status::New() const { + return new Status; +} + +void Status::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + code_ = 0; + if (has_msg()) { + if (msg_ != &::google::protobuf::internal::kEmptyString) { + msg_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Status::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 .rsctrl.base.Status.StatusCode code = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::base::Status_StatusCode_IsValid(value)) { + set_code(static_cast< ::rsctrl::base::Status_StatusCode >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_msg; + break; + } + + // optional string msg = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_msg: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_msg())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->msg().data(), this->msg().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 Status::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.base.Status.StatusCode code = 1; + if (has_code()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->code(), output); + } + + // optional string msg = 2; + if (has_msg()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->msg().data(), this->msg().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->msg(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Status::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.base.Status.StatusCode code = 1; + if (has_code()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->code(), target); + } + + // optional string msg = 2; + if (has_msg()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->msg().data(), this->msg().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->msg(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Status::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.base.Status.StatusCode code = 1; + if (has_code()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->code()); + } + + // optional string msg = 2; + if (has_msg()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->msg()); + } + + } + 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 Status::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Status* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Status::MergeFrom(const Status& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_code()) { + set_code(from.code()); + } + if (from.has_msg()) { + set_msg(from.msg()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Status::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Status::CopyFrom(const Status& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Status::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void Status::Swap(Status* other) { + if (other != this) { + std::swap(code_, other->code_); + std::swap(msg_, other->msg_); + 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 Status::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Status_descriptor_; + metadata.reflection = Status_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Location::kSslIdFieldNumber; +const int Location::kLocationFieldNumber; +const int Location::kLocaladdrFieldNumber; +const int Location::kExtaddrFieldNumber; +#endif // !_MSC_VER + +Location::Location() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Location::InitAsDefaultInstance() { +} + +Location::Location(const Location& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Location::SharedCtor() { + _cached_size_ = 0; + ssl_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + location_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + localaddr_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + extaddr_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Location::~Location() { + SharedDtor(); +} + +void Location::SharedDtor() { + if (ssl_id_ != &::google::protobuf::internal::kEmptyString) { + delete ssl_id_; + } + if (location_ != &::google::protobuf::internal::kEmptyString) { + delete location_; + } + if (localaddr_ != &::google::protobuf::internal::kEmptyString) { + delete localaddr_; + } + if (extaddr_ != &::google::protobuf::internal::kEmptyString) { + delete extaddr_; + } + if (this != default_instance_) { + } +} + +void Location::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Location::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Location_descriptor_; +} + +const Location& Location::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_base_2eproto(); return *default_instance_; +} + +Location* Location::default_instance_ = NULL; + +Location* Location::New() const { + return new Location; +} + +void Location::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_ssl_id()) { + if (ssl_id_ != &::google::protobuf::internal::kEmptyString) { + ssl_id_->clear(); + } + } + if (has_location()) { + if (location_ != &::google::protobuf::internal::kEmptyString) { + location_->clear(); + } + } + if (has_localaddr()) { + if (localaddr_ != &::google::protobuf::internal::kEmptyString) { + localaddr_->clear(); + } + } + if (has_extaddr()) { + if (extaddr_ != &::google::protobuf::internal::kEmptyString) { + extaddr_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Location::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required string ssl_id = 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_ssl_id())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->ssl_id().data(), this->ssl_id().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_location; + break; + } + + // required string location = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_location: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_location())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->location().data(), this->location().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_localaddr; + break; + } + + // required string localaddr = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_localaddr: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_localaddr())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->localaddr().data(), this->localaddr().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_extaddr; + break; + } + + // required string extaddr = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_extaddr: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_extaddr())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->extaddr().data(), this->extaddr().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 Location::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string ssl_id = 1; + if (has_ssl_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->ssl_id().data(), this->ssl_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->ssl_id(), output); + } + + // required string location = 2; + if (has_location()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->location().data(), this->location().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->location(), output); + } + + // required string localaddr = 3; + if (has_localaddr()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->localaddr().data(), this->localaddr().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->localaddr(), output); + } + + // required string extaddr = 4; + if (has_extaddr()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->extaddr().data(), this->extaddr().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 4, this->extaddr(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Location::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string ssl_id = 1; + if (has_ssl_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->ssl_id().data(), this->ssl_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->ssl_id(), target); + } + + // required string location = 2; + if (has_location()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->location().data(), this->location().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->location(), target); + } + + // required string localaddr = 3; + if (has_localaddr()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->localaddr().data(), this->localaddr().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->localaddr(), target); + } + + // required string extaddr = 4; + if (has_extaddr()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->extaddr().data(), this->extaddr().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->extaddr(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Location::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string ssl_id = 1; + if (has_ssl_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->ssl_id()); + } + + // required string location = 2; + if (has_location()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->location()); + } + + // required string localaddr = 3; + if (has_localaddr()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->localaddr()); + } + + // required string extaddr = 4; + if (has_extaddr()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->extaddr()); + } + + } + 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 Location::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Location* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Location::MergeFrom(const Location& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_ssl_id()) { + set_ssl_id(from.ssl_id()); + } + if (from.has_location()) { + set_location(from.location()); + } + if (from.has_localaddr()) { + set_localaddr(from.localaddr()); + } + if (from.has_extaddr()) { + set_extaddr(from.extaddr()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Location::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Location::CopyFrom(const Location& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Location::IsInitialized() const { + if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false; + + return true; +} + +void Location::Swap(Location* other) { + if (other != this) { + std::swap(ssl_id_, other->ssl_id_); + std::swap(location_, other->location_); + std::swap(localaddr_, other->localaddr_); + std::swap(extaddr_, other->extaddr_); + 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 Location::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Location_descriptor_; + metadata.reflection = Location_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Person::kGpgIdFieldNumber; +const int Person::kNameFieldNumber; +const int Person::kLocationsFieldNumber; +#endif // !_MSC_VER + +Person::Person() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Person::InitAsDefaultInstance() { +} + +Person::Person(const Person& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Person::SharedCtor() { + _cached_size_ = 0; + gpg_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Person::~Person() { + SharedDtor(); +} + +void Person::SharedDtor() { + if (gpg_id_ != &::google::protobuf::internal::kEmptyString) { + delete gpg_id_; + } + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (this != default_instance_) { + } +} + +void Person::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Person::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Person_descriptor_; +} + +const Person& Person::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_base_2eproto(); return *default_instance_; +} + +Person* Person::default_instance_ = NULL; + +Person* Person::New() const { + return new Person; +} + +void Person::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_gpg_id()) { + if (gpg_id_ != &::google::protobuf::internal::kEmptyString) { + gpg_id_->clear(); + } + } + if (has_name()) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + } + } + locations_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Person::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required string gpg_id = 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_gpg_id())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->gpg_id().data(), this->gpg_id().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_name; + break; + } + + // required string name = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_locations; + break; + } + + // repeated .rsctrl.base.Location locations = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_locations: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_locations())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_locations; + 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 Person::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string gpg_id = 1; + if (has_gpg_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->gpg_id().data(), this->gpg_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->gpg_id(), output); + } + + // required string name = 2; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->name(), output); + } + + // repeated .rsctrl.base.Location locations = 3; + for (int i = 0; i < this->locations_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->locations(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Person::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string gpg_id = 1; + if (has_gpg_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->gpg_id().data(), this->gpg_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->gpg_id(), target); + } + + // required string name = 2; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->name(), target); + } + + // repeated .rsctrl.base.Location locations = 3; + for (int i = 0; i < this->locations_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->locations(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Person::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string gpg_id = 1; + if (has_gpg_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->gpg_id()); + } + + // required string name = 2; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + } + // repeated .rsctrl.base.Location locations = 3; + total_size += 1 * this->locations_size(); + for (int i = 0; i < this->locations_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->locations(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Person::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Person* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Person::MergeFrom(const Person& from) { + GOOGLE_CHECK_NE(&from, this); + locations_.MergeFrom(from.locations_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_gpg_id()) { + set_gpg_id(from.gpg_id()); + } + if (from.has_name()) { + set_name(from.name()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Person::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Person::CopyFrom(const Person& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Person::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + for (int i = 0; i < locations_size(); i++) { + if (!this->locations(i).IsInitialized()) return false; + } + return true; +} + +void Person::Swap(Person* other) { + if (other != this) { + std::swap(gpg_id_, other->gpg_id_); + std::swap(name_, other->name_); + locations_.Swap(&other->locations_); + 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 Person::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Person_descriptor_; + metadata.reflection = Person_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int File::kNameFieldNumber; +const int File::kHashFieldNumber; +const int File::kSizeFieldNumber; +const int File::kPathFieldNumber; +const int File::kAvailFieldNumber; +#endif // !_MSC_VER + +File::File() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void File::InitAsDefaultInstance() { +} + +File::File(const File& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void File::SharedCtor() { + _cached_size_ = 0; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + hash_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + size_ = GOOGLE_LONGLONG(0); + path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + avail_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +File::~File() { + SharedDtor(); +} + +void File::SharedDtor() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (hash_ != &::google::protobuf::internal::kEmptyString) { + delete hash_; + } + if (path_ != &::google::protobuf::internal::kEmptyString) { + delete path_; + } + if (avail_ != &::google::protobuf::internal::kEmptyString) { + delete avail_; + } + if (this != default_instance_) { + } +} + +void File::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* File::descriptor() { + protobuf_AssignDescriptorsOnce(); + return File_descriptor_; +} + +const File& File::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_base_2eproto(); return *default_instance_; +} + +File* File::default_instance_ = NULL; + +File* File::New() const { + return new File; +} + +void File::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_name()) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + } + if (has_hash()) { + if (hash_ != &::google::protobuf::internal::kEmptyString) { + hash_->clear(); + } + } + size_ = GOOGLE_LONGLONG(0); + if (has_path()) { + if (path_ != &::google::protobuf::internal::kEmptyString) { + path_->clear(); + } + } + if (has_avail()) { + if (avail_ != &::google::protobuf::internal::kEmptyString) { + avail_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool File::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required string name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_hash; + break; + } + + // required string hash = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_hash: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_hash())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->hash().data(), this->hash().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(24)) goto parse_size; + break; + } + + // required int64 size = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_size: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &size_))); + set_has_size(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_path; + break; + } + + // optional string path = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_path: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_path())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->path().data(), this->path().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(42)) goto parse_avail; + break; + } + + // optional string avail = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_avail: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_avail())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->avail().data(), this->avail().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 File::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->name(), output); + } + + // required string hash = 2; + if (has_hash()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->hash().data(), this->hash().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->hash(), output); + } + + // required int64 size = 3; + if (has_size()) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->size(), output); + } + + // optional string path = 4; + if (has_path()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->path().data(), this->path().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 4, this->path(), output); + } + + // optional string avail = 5; + if (has_avail()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->avail().data(), this->avail().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 5, this->avail(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* File::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // required string hash = 2; + if (has_hash()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->hash().data(), this->hash().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->hash(), target); + } + + // required int64 size = 3; + if (has_size()) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->size(), target); + } + + // optional string path = 4; + if (has_path()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->path().data(), this->path().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->path(), target); + } + + // optional string avail = 5; + if (has_avail()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->avail().data(), this->avail().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->avail(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int File::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string name = 1; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // required string hash = 2; + if (has_hash()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->hash()); + } + + // required int64 size = 3; + if (has_size()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->size()); + } + + // optional string path = 4; + if (has_path()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->path()); + } + + // optional string avail = 5; + if (has_avail()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->avail()); + } + + } + 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 File::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const File* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void File::MergeFrom(const File& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_name()) { + set_name(from.name()); + } + if (from.has_hash()) { + set_hash(from.hash()); + } + if (from.has_size()) { + set_size(from.size()); + } + if (from.has_path()) { + set_path(from.path()); + } + if (from.has_avail()) { + set_avail(from.avail()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void File::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void File::CopyFrom(const File& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool File::IsInitialized() const { + if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + + return true; +} + +void File::Swap(File* other) { + if (other != this) { + std::swap(name_, other->name_); + std::swap(hash_, other->hash_); + std::swap(size_, other->size_); + std::swap(path_, other->path_); + std::swap(avail_, other->avail_); + 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 File::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = File_descriptor_; + metadata.reflection = File_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Dir::kNameFieldNumber; +const int Dir::kPathFieldNumber; +const int Dir::kSubdirsFieldNumber; +const int Dir::kFilesFieldNumber; +#endif // !_MSC_VER + +Dir::Dir() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Dir::InitAsDefaultInstance() { +} + +Dir::Dir(const Dir& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Dir::SharedCtor() { + _cached_size_ = 0; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Dir::~Dir() { + SharedDtor(); +} + +void Dir::SharedDtor() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + delete name_; + } + if (path_ != &::google::protobuf::internal::kEmptyString) { + delete path_; + } + if (this != default_instance_) { + } +} + +void Dir::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Dir::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Dir_descriptor_; +} + +const Dir& Dir::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_base_2eproto(); return *default_instance_; +} + +Dir* Dir::default_instance_ = NULL; + +Dir* Dir::New() const { + return new Dir; +} + +void Dir::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_name()) { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + } + if (has_path()) { + if (path_ != &::google::protobuf::internal::kEmptyString) { + path_->clear(); + } + } + } + subdirs_.Clear(); + files_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Dir::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required string name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_path; + break; + } + + // required string path = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_path: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_path())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->path().data(), this->path().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_subdirs; + break; + } + + // repeated .rsctrl.base.Dir subdirs = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_subdirs: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_subdirs())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_subdirs; + if (input->ExpectTag(34)) goto parse_files; + break; + } + + // repeated .rsctrl.base.File files = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_files: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_files())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_files; + 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 Dir::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->name(), output); + } + + // required string path = 2; + if (has_path()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->path().data(), this->path().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->path(), output); + } + + // repeated .rsctrl.base.Dir subdirs = 3; + for (int i = 0; i < this->subdirs_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->subdirs(i), output); + } + + // repeated .rsctrl.base.File files = 4; + for (int i = 0; i < this->files_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->files(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Dir::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // required string path = 2; + if (has_path()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->path().data(), this->path().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->path(), target); + } + + // repeated .rsctrl.base.Dir subdirs = 3; + for (int i = 0; i < this->subdirs_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->subdirs(i), target); + } + + // repeated .rsctrl.base.File files = 4; + for (int i = 0; i < this->files_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->files(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Dir::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string name = 1; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // required string path = 2; + if (has_path()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->path()); + } + + } + // repeated .rsctrl.base.Dir subdirs = 3; + total_size += 1 * this->subdirs_size(); + for (int i = 0; i < this->subdirs_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->subdirs(i)); + } + + // repeated .rsctrl.base.File files = 4; + total_size += 1 * this->files_size(); + for (int i = 0; i < this->files_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->files(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Dir::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Dir* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Dir::MergeFrom(const Dir& from) { + GOOGLE_CHECK_NE(&from, this); + subdirs_.MergeFrom(from.subdirs_); + files_.MergeFrom(from.files_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_name()) { + set_name(from.name()); + } + if (from.has_path()) { + set_path(from.path()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Dir::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Dir::CopyFrom(const Dir& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Dir::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + for (int i = 0; i < subdirs_size(); i++) { + if (!this->subdirs(i).IsInitialized()) return false; + } + for (int i = 0; i < files_size(); i++) { + if (!this->files(i).IsInitialized()) return false; + } + return true; +} + +void Dir::Swap(Dir* other) { + if (other != this) { + std::swap(name_, other->name_); + std::swap(path_, other->path_); + subdirs_.Swap(&other->subdirs_); + files_.Swap(&other->files_); + 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 Dir::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Dir_descriptor_; + metadata.reflection = Dir_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace base +} // namespace rsctrl + +// @@protoc_insertion_point(global_scope) diff --git a/retroshare-nogui/src/rpc/proto/gencc/base.pb.h b/retroshare-nogui/src/rpc/proto/gencc/base.pb.h new file mode 100644 index 000000000..d1819b91b --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/gencc/base.pb.h @@ -0,0 +1,1608 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: base.proto + +#ifndef PROTOBUF_base_2eproto__INCLUDED +#define PROTOBUF_base_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2004001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace rsctrl { +namespace base { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_base_2eproto(); +void protobuf_AssignDesc_base_2eproto(); +void protobuf_ShutdownFile_base_2eproto(); + +class Status; +class Location; +class Person; +class File; +class Dir; + +enum Status_StatusCode { + Status_StatusCode_FAILED = 0, + Status_StatusCode_INVALID_QUERY = 1, + Status_StatusCode_SUCCESS = 2, + Status_StatusCode_READMSG = 3 +}; +bool Status_StatusCode_IsValid(int value); +const Status_StatusCode Status_StatusCode_StatusCode_MIN = Status_StatusCode_FAILED; +const Status_StatusCode Status_StatusCode_StatusCode_MAX = Status_StatusCode_READMSG; +const int Status_StatusCode_StatusCode_ARRAYSIZE = Status_StatusCode_StatusCode_MAX + 1; + +const ::google::protobuf::EnumDescriptor* Status_StatusCode_descriptor(); +inline const ::std::string& Status_StatusCode_Name(Status_StatusCode value) { + return ::google::protobuf::internal::NameOfEnum( + Status_StatusCode_descriptor(), value); +} +inline bool Status_StatusCode_Parse( + const ::std::string& name, Status_StatusCode* value) { + return ::google::protobuf::internal::ParseNamedEnum( + Status_StatusCode_descriptor(), name, value); +} +// =================================================================== + +class Status : public ::google::protobuf::Message { + public: + Status(); + virtual ~Status(); + + Status(const Status& from); + + inline Status& operator=(const Status& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Status& default_instance(); + + void Swap(Status* other); + + // implements Message ---------------------------------------------- + + Status* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Status& from); + void MergeFrom(const Status& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef Status_StatusCode StatusCode; + static const StatusCode FAILED = Status_StatusCode_FAILED; + static const StatusCode INVALID_QUERY = Status_StatusCode_INVALID_QUERY; + static const StatusCode SUCCESS = Status_StatusCode_SUCCESS; + static const StatusCode READMSG = Status_StatusCode_READMSG; + static inline bool StatusCode_IsValid(int value) { + return Status_StatusCode_IsValid(value); + } + static const StatusCode StatusCode_MIN = + Status_StatusCode_StatusCode_MIN; + static const StatusCode StatusCode_MAX = + Status_StatusCode_StatusCode_MAX; + static const int StatusCode_ARRAYSIZE = + Status_StatusCode_StatusCode_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + StatusCode_descriptor() { + return Status_StatusCode_descriptor(); + } + static inline const ::std::string& StatusCode_Name(StatusCode value) { + return Status_StatusCode_Name(value); + } + static inline bool StatusCode_Parse(const ::std::string& name, + StatusCode* value) { + return Status_StatusCode_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .rsctrl.base.Status.StatusCode code = 1; + inline bool has_code() const; + inline void clear_code(); + static const int kCodeFieldNumber = 1; + inline ::rsctrl::base::Status_StatusCode code() const; + inline void set_code(::rsctrl::base::Status_StatusCode value); + + // optional string msg = 2; + inline bool has_msg() const; + inline void clear_msg(); + static const int kMsgFieldNumber = 2; + inline const ::std::string& msg() const; + inline void set_msg(const ::std::string& value); + inline void set_msg(const char* value); + inline void set_msg(const char* value, size_t size); + inline ::std::string* mutable_msg(); + inline ::std::string* release_msg(); + + // @@protoc_insertion_point(class_scope:rsctrl.base.Status) + private: + inline void set_has_code(); + inline void clear_has_code(); + inline void set_has_msg(); + inline void clear_has_msg(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* msg_; + int code_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_base_2eproto(); + friend void protobuf_AssignDesc_base_2eproto(); + friend void protobuf_ShutdownFile_base_2eproto(); + + void InitAsDefaultInstance(); + static Status* default_instance_; +}; +// ------------------------------------------------------------------- + +class Location : public ::google::protobuf::Message { + public: + Location(); + virtual ~Location(); + + Location(const Location& from); + + inline Location& operator=(const Location& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Location& default_instance(); + + void Swap(Location* other); + + // implements Message ---------------------------------------------- + + Location* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Location& from); + void MergeFrom(const Location& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required string ssl_id = 1; + inline bool has_ssl_id() const; + inline void clear_ssl_id(); + static const int kSslIdFieldNumber = 1; + inline const ::std::string& ssl_id() const; + inline void set_ssl_id(const ::std::string& value); + inline void set_ssl_id(const char* value); + inline void set_ssl_id(const char* value, size_t size); + inline ::std::string* mutable_ssl_id(); + inline ::std::string* release_ssl_id(); + + // required string location = 2; + inline bool has_location() const; + inline void clear_location(); + static const int kLocationFieldNumber = 2; + inline const ::std::string& location() const; + inline void set_location(const ::std::string& value); + inline void set_location(const char* value); + inline void set_location(const char* value, size_t size); + inline ::std::string* mutable_location(); + inline ::std::string* release_location(); + + // required string localaddr = 3; + inline bool has_localaddr() const; + inline void clear_localaddr(); + static const int kLocaladdrFieldNumber = 3; + inline const ::std::string& localaddr() const; + inline void set_localaddr(const ::std::string& value); + inline void set_localaddr(const char* value); + inline void set_localaddr(const char* value, size_t size); + inline ::std::string* mutable_localaddr(); + inline ::std::string* release_localaddr(); + + // required string extaddr = 4; + inline bool has_extaddr() const; + inline void clear_extaddr(); + static const int kExtaddrFieldNumber = 4; + inline const ::std::string& extaddr() const; + inline void set_extaddr(const ::std::string& value); + inline void set_extaddr(const char* value); + inline void set_extaddr(const char* value, size_t size); + inline ::std::string* mutable_extaddr(); + inline ::std::string* release_extaddr(); + + // @@protoc_insertion_point(class_scope:rsctrl.base.Location) + private: + inline void set_has_ssl_id(); + inline void clear_has_ssl_id(); + inline void set_has_location(); + inline void clear_has_location(); + inline void set_has_localaddr(); + inline void clear_has_localaddr(); + inline void set_has_extaddr(); + inline void clear_has_extaddr(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* ssl_id_; + ::std::string* location_; + ::std::string* localaddr_; + ::std::string* extaddr_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_base_2eproto(); + friend void protobuf_AssignDesc_base_2eproto(); + friend void protobuf_ShutdownFile_base_2eproto(); + + void InitAsDefaultInstance(); + static Location* default_instance_; +}; +// ------------------------------------------------------------------- + +class Person : public ::google::protobuf::Message { + public: + Person(); + virtual ~Person(); + + Person(const Person& from); + + inline Person& operator=(const Person& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Person& default_instance(); + + void Swap(Person* other); + + // implements Message ---------------------------------------------- + + Person* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Person& from); + void MergeFrom(const Person& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required string gpg_id = 1; + inline bool has_gpg_id() const; + inline void clear_gpg_id(); + static const int kGpgIdFieldNumber = 1; + inline const ::std::string& gpg_id() const; + inline void set_gpg_id(const ::std::string& value); + inline void set_gpg_id(const char* value); + inline void set_gpg_id(const char* value, size_t size); + inline ::std::string* mutable_gpg_id(); + inline ::std::string* release_gpg_id(); + + // required string name = 2; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 2; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + + // repeated .rsctrl.base.Location locations = 3; + inline int locations_size() const; + inline void clear_locations(); + static const int kLocationsFieldNumber = 3; + inline const ::rsctrl::base::Location& locations(int index) const; + inline ::rsctrl::base::Location* mutable_locations(int index); + inline ::rsctrl::base::Location* add_locations(); + inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Location >& + locations() const; + inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Location >* + mutable_locations(); + + // @@protoc_insertion_point(class_scope:rsctrl.base.Person) + private: + inline void set_has_gpg_id(); + inline void clear_has_gpg_id(); + inline void set_has_name(); + inline void clear_has_name(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* gpg_id_; + ::std::string* name_; + ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Location > locations_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + + friend void protobuf_AddDesc_base_2eproto(); + friend void protobuf_AssignDesc_base_2eproto(); + friend void protobuf_ShutdownFile_base_2eproto(); + + void InitAsDefaultInstance(); + static Person* default_instance_; +}; +// ------------------------------------------------------------------- + +class File : public ::google::protobuf::Message { + public: + File(); + virtual ~File(); + + File(const File& from); + + inline File& operator=(const File& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const File& default_instance(); + + void Swap(File* other); + + // implements Message ---------------------------------------------- + + File* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const File& from); + void MergeFrom(const File& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required string name = 1; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 1; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + + // required string hash = 2; + inline bool has_hash() const; + inline void clear_hash(); + static const int kHashFieldNumber = 2; + inline const ::std::string& hash() const; + inline void set_hash(const ::std::string& value); + inline void set_hash(const char* value); + inline void set_hash(const char* value, size_t size); + inline ::std::string* mutable_hash(); + inline ::std::string* release_hash(); + + // required int64 size = 3; + inline bool has_size() const; + inline void clear_size(); + static const int kSizeFieldNumber = 3; + inline ::google::protobuf::int64 size() const; + inline void set_size(::google::protobuf::int64 value); + + // optional string path = 4; + inline bool has_path() const; + inline void clear_path(); + static const int kPathFieldNumber = 4; + inline const ::std::string& path() const; + inline void set_path(const ::std::string& value); + inline void set_path(const char* value); + inline void set_path(const char* value, size_t size); + inline ::std::string* mutable_path(); + inline ::std::string* release_path(); + + // optional string avail = 5; + inline bool has_avail() const; + inline void clear_avail(); + static const int kAvailFieldNumber = 5; + inline const ::std::string& avail() const; + inline void set_avail(const ::std::string& value); + inline void set_avail(const char* value); + inline void set_avail(const char* value, size_t size); + inline ::std::string* mutable_avail(); + inline ::std::string* release_avail(); + + // @@protoc_insertion_point(class_scope:rsctrl.base.File) + private: + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_hash(); + inline void clear_has_hash(); + inline void set_has_size(); + inline void clear_has_size(); + inline void set_has_path(); + inline void clear_has_path(); + inline void set_has_avail(); + inline void clear_has_avail(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* name_; + ::std::string* hash_; + ::google::protobuf::int64 size_; + ::std::string* path_; + ::std::string* avail_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32]; + + friend void protobuf_AddDesc_base_2eproto(); + friend void protobuf_AssignDesc_base_2eproto(); + friend void protobuf_ShutdownFile_base_2eproto(); + + void InitAsDefaultInstance(); + static File* default_instance_; +}; +// ------------------------------------------------------------------- + +class Dir : public ::google::protobuf::Message { + public: + Dir(); + virtual ~Dir(); + + Dir(const Dir& from); + + inline Dir& operator=(const Dir& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Dir& default_instance(); + + void Swap(Dir* other); + + // implements Message ---------------------------------------------- + + Dir* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Dir& from); + void MergeFrom(const Dir& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required string name = 1; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 1; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + + // required string path = 2; + inline bool has_path() const; + inline void clear_path(); + static const int kPathFieldNumber = 2; + inline const ::std::string& path() const; + inline void set_path(const ::std::string& value); + inline void set_path(const char* value); + inline void set_path(const char* value, size_t size); + inline ::std::string* mutable_path(); + inline ::std::string* release_path(); + + // repeated .rsctrl.base.Dir subdirs = 3; + inline int subdirs_size() const; + inline void clear_subdirs(); + static const int kSubdirsFieldNumber = 3; + inline const ::rsctrl::base::Dir& subdirs(int index) const; + inline ::rsctrl::base::Dir* mutable_subdirs(int index); + inline ::rsctrl::base::Dir* add_subdirs(); + inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Dir >& + subdirs() const; + inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Dir >* + mutable_subdirs(); + + // repeated .rsctrl.base.File files = 4; + inline int files_size() const; + inline void clear_files(); + static const int kFilesFieldNumber = 4; + inline const ::rsctrl::base::File& files(int index) const; + inline ::rsctrl::base::File* mutable_files(int index); + inline ::rsctrl::base::File* add_files(); + inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::File >& + files() const; + inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::File >* + mutable_files(); + + // @@protoc_insertion_point(class_scope:rsctrl.base.Dir) + private: + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_path(); + inline void clear_has_path(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* name_; + ::std::string* path_; + ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Dir > subdirs_; + ::google::protobuf::RepeatedPtrField< ::rsctrl::base::File > files_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_base_2eproto(); + friend void protobuf_AssignDesc_base_2eproto(); + friend void protobuf_ShutdownFile_base_2eproto(); + + void InitAsDefaultInstance(); + static Dir* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// Status + +// required .rsctrl.base.Status.StatusCode code = 1; +inline bool Status::has_code() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Status::set_has_code() { + _has_bits_[0] |= 0x00000001u; +} +inline void Status::clear_has_code() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Status::clear_code() { + code_ = 0; + clear_has_code(); +} +inline ::rsctrl::base::Status_StatusCode Status::code() const { + return static_cast< ::rsctrl::base::Status_StatusCode >(code_); +} +inline void Status::set_code(::rsctrl::base::Status_StatusCode value) { + GOOGLE_DCHECK(::rsctrl::base::Status_StatusCode_IsValid(value)); + set_has_code(); + code_ = value; +} + +// optional string msg = 2; +inline bool Status::has_msg() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Status::set_has_msg() { + _has_bits_[0] |= 0x00000002u; +} +inline void Status::clear_has_msg() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Status::clear_msg() { + if (msg_ != &::google::protobuf::internal::kEmptyString) { + msg_->clear(); + } + clear_has_msg(); +} +inline const ::std::string& Status::msg() const { + return *msg_; +} +inline void Status::set_msg(const ::std::string& value) { + set_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + msg_ = new ::std::string; + } + msg_->assign(value); +} +inline void Status::set_msg(const char* value) { + set_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + msg_ = new ::std::string; + } + msg_->assign(value); +} +inline void Status::set_msg(const char* value, size_t size) { + set_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + msg_ = new ::std::string; + } + msg_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Status::mutable_msg() { + set_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + msg_ = new ::std::string; + } + return msg_; +} +inline ::std::string* Status::release_msg() { + clear_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = msg_; + msg_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// ------------------------------------------------------------------- + +// Location + +// required string ssl_id = 1; +inline bool Location::has_ssl_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Location::set_has_ssl_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void Location::clear_has_ssl_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Location::clear_ssl_id() { + if (ssl_id_ != &::google::protobuf::internal::kEmptyString) { + ssl_id_->clear(); + } + clear_has_ssl_id(); +} +inline const ::std::string& Location::ssl_id() const { + return *ssl_id_; +} +inline void Location::set_ssl_id(const ::std::string& value) { + set_has_ssl_id(); + if (ssl_id_ == &::google::protobuf::internal::kEmptyString) { + ssl_id_ = new ::std::string; + } + ssl_id_->assign(value); +} +inline void Location::set_ssl_id(const char* value) { + set_has_ssl_id(); + if (ssl_id_ == &::google::protobuf::internal::kEmptyString) { + ssl_id_ = new ::std::string; + } + ssl_id_->assign(value); +} +inline void Location::set_ssl_id(const char* value, size_t size) { + set_has_ssl_id(); + if (ssl_id_ == &::google::protobuf::internal::kEmptyString) { + ssl_id_ = new ::std::string; + } + ssl_id_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Location::mutable_ssl_id() { + set_has_ssl_id(); + if (ssl_id_ == &::google::protobuf::internal::kEmptyString) { + ssl_id_ = new ::std::string; + } + return ssl_id_; +} +inline ::std::string* Location::release_ssl_id() { + clear_has_ssl_id(); + if (ssl_id_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = ssl_id_; + ssl_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string location = 2; +inline bool Location::has_location() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Location::set_has_location() { + _has_bits_[0] |= 0x00000002u; +} +inline void Location::clear_has_location() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Location::clear_location() { + if (location_ != &::google::protobuf::internal::kEmptyString) { + location_->clear(); + } + clear_has_location(); +} +inline const ::std::string& Location::location() const { + return *location_; +} +inline void Location::set_location(const ::std::string& value) { + set_has_location(); + if (location_ == &::google::protobuf::internal::kEmptyString) { + location_ = new ::std::string; + } + location_->assign(value); +} +inline void Location::set_location(const char* value) { + set_has_location(); + if (location_ == &::google::protobuf::internal::kEmptyString) { + location_ = new ::std::string; + } + location_->assign(value); +} +inline void Location::set_location(const char* value, size_t size) { + set_has_location(); + if (location_ == &::google::protobuf::internal::kEmptyString) { + location_ = new ::std::string; + } + location_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Location::mutable_location() { + set_has_location(); + if (location_ == &::google::protobuf::internal::kEmptyString) { + location_ = new ::std::string; + } + return location_; +} +inline ::std::string* Location::release_location() { + clear_has_location(); + if (location_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = location_; + location_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string localaddr = 3; +inline bool Location::has_localaddr() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void Location::set_has_localaddr() { + _has_bits_[0] |= 0x00000004u; +} +inline void Location::clear_has_localaddr() { + _has_bits_[0] &= ~0x00000004u; +} +inline void Location::clear_localaddr() { + if (localaddr_ != &::google::protobuf::internal::kEmptyString) { + localaddr_->clear(); + } + clear_has_localaddr(); +} +inline const ::std::string& Location::localaddr() const { + return *localaddr_; +} +inline void Location::set_localaddr(const ::std::string& value) { + set_has_localaddr(); + if (localaddr_ == &::google::protobuf::internal::kEmptyString) { + localaddr_ = new ::std::string; + } + localaddr_->assign(value); +} +inline void Location::set_localaddr(const char* value) { + set_has_localaddr(); + if (localaddr_ == &::google::protobuf::internal::kEmptyString) { + localaddr_ = new ::std::string; + } + localaddr_->assign(value); +} +inline void Location::set_localaddr(const char* value, size_t size) { + set_has_localaddr(); + if (localaddr_ == &::google::protobuf::internal::kEmptyString) { + localaddr_ = new ::std::string; + } + localaddr_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Location::mutable_localaddr() { + set_has_localaddr(); + if (localaddr_ == &::google::protobuf::internal::kEmptyString) { + localaddr_ = new ::std::string; + } + return localaddr_; +} +inline ::std::string* Location::release_localaddr() { + clear_has_localaddr(); + if (localaddr_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = localaddr_; + localaddr_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string extaddr = 4; +inline bool Location::has_extaddr() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void Location::set_has_extaddr() { + _has_bits_[0] |= 0x00000008u; +} +inline void Location::clear_has_extaddr() { + _has_bits_[0] &= ~0x00000008u; +} +inline void Location::clear_extaddr() { + if (extaddr_ != &::google::protobuf::internal::kEmptyString) { + extaddr_->clear(); + } + clear_has_extaddr(); +} +inline const ::std::string& Location::extaddr() const { + return *extaddr_; +} +inline void Location::set_extaddr(const ::std::string& value) { + set_has_extaddr(); + if (extaddr_ == &::google::protobuf::internal::kEmptyString) { + extaddr_ = new ::std::string; + } + extaddr_->assign(value); +} +inline void Location::set_extaddr(const char* value) { + set_has_extaddr(); + if (extaddr_ == &::google::protobuf::internal::kEmptyString) { + extaddr_ = new ::std::string; + } + extaddr_->assign(value); +} +inline void Location::set_extaddr(const char* value, size_t size) { + set_has_extaddr(); + if (extaddr_ == &::google::protobuf::internal::kEmptyString) { + extaddr_ = new ::std::string; + } + extaddr_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Location::mutable_extaddr() { + set_has_extaddr(); + if (extaddr_ == &::google::protobuf::internal::kEmptyString) { + extaddr_ = new ::std::string; + } + return extaddr_; +} +inline ::std::string* Location::release_extaddr() { + clear_has_extaddr(); + if (extaddr_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = extaddr_; + extaddr_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// ------------------------------------------------------------------- + +// Person + +// required string gpg_id = 1; +inline bool Person::has_gpg_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Person::set_has_gpg_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void Person::clear_has_gpg_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Person::clear_gpg_id() { + if (gpg_id_ != &::google::protobuf::internal::kEmptyString) { + gpg_id_->clear(); + } + clear_has_gpg_id(); +} +inline const ::std::string& Person::gpg_id() const { + return *gpg_id_; +} +inline void Person::set_gpg_id(const ::std::string& value) { + set_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + gpg_id_ = new ::std::string; + } + gpg_id_->assign(value); +} +inline void Person::set_gpg_id(const char* value) { + set_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + gpg_id_ = new ::std::string; + } + gpg_id_->assign(value); +} +inline void Person::set_gpg_id(const char* value, size_t size) { + set_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + gpg_id_ = new ::std::string; + } + gpg_id_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Person::mutable_gpg_id() { + set_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + gpg_id_ = new ::std::string; + } + return gpg_id_; +} +inline ::std::string* Person::release_gpg_id() { + clear_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = gpg_id_; + gpg_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string name = 2; +inline bool Person::has_name() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Person::set_has_name() { + _has_bits_[0] |= 0x00000002u; +} +inline void Person::clear_has_name() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Person::clear_name() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + clear_has_name(); +} +inline const ::std::string& Person::name() const { + return *name_; +} +inline void Person::set_name(const ::std::string& value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Person::set_name(const char* value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Person::set_name(const char* value, size_t size) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Person::mutable_name() { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + return name_; +} +inline ::std::string* Person::release_name() { + clear_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// repeated .rsctrl.base.Location locations = 3; +inline int Person::locations_size() const { + return locations_.size(); +} +inline void Person::clear_locations() { + locations_.Clear(); +} +inline const ::rsctrl::base::Location& Person::locations(int index) const { + return locations_.Get(index); +} +inline ::rsctrl::base::Location* Person::mutable_locations(int index) { + return locations_.Mutable(index); +} +inline ::rsctrl::base::Location* Person::add_locations() { + return locations_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Location >& +Person::locations() const { + return locations_; +} +inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Location >* +Person::mutable_locations() { + return &locations_; +} + +// ------------------------------------------------------------------- + +// File + +// required string name = 1; +inline bool File::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void File::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void File::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void File::clear_name() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + clear_has_name(); +} +inline const ::std::string& File::name() const { + return *name_; +} +inline void File::set_name(const ::std::string& value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void File::set_name(const char* value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void File::set_name(const char* value, size_t size) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* File::mutable_name() { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + return name_; +} +inline ::std::string* File::release_name() { + clear_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string hash = 2; +inline bool File::has_hash() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void File::set_has_hash() { + _has_bits_[0] |= 0x00000002u; +} +inline void File::clear_has_hash() { + _has_bits_[0] &= ~0x00000002u; +} +inline void File::clear_hash() { + if (hash_ != &::google::protobuf::internal::kEmptyString) { + hash_->clear(); + } + clear_has_hash(); +} +inline const ::std::string& File::hash() const { + return *hash_; +} +inline void File::set_hash(const ::std::string& value) { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::kEmptyString) { + hash_ = new ::std::string; + } + hash_->assign(value); +} +inline void File::set_hash(const char* value) { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::kEmptyString) { + hash_ = new ::std::string; + } + hash_->assign(value); +} +inline void File::set_hash(const char* value, size_t size) { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::kEmptyString) { + hash_ = new ::std::string; + } + hash_->assign(reinterpret_cast(value), size); +} +inline ::std::string* File::mutable_hash() { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::kEmptyString) { + hash_ = new ::std::string; + } + return hash_; +} +inline ::std::string* File::release_hash() { + clear_has_hash(); + if (hash_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = hash_; + hash_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required int64 size = 3; +inline bool File::has_size() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void File::set_has_size() { + _has_bits_[0] |= 0x00000004u; +} +inline void File::clear_has_size() { + _has_bits_[0] &= ~0x00000004u; +} +inline void File::clear_size() { + size_ = GOOGLE_LONGLONG(0); + clear_has_size(); +} +inline ::google::protobuf::int64 File::size() const { + return size_; +} +inline void File::set_size(::google::protobuf::int64 value) { + set_has_size(); + size_ = value; +} + +// optional string path = 4; +inline bool File::has_path() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void File::set_has_path() { + _has_bits_[0] |= 0x00000008u; +} +inline void File::clear_has_path() { + _has_bits_[0] &= ~0x00000008u; +} +inline void File::clear_path() { + if (path_ != &::google::protobuf::internal::kEmptyString) { + path_->clear(); + } + clear_has_path(); +} +inline const ::std::string& File::path() const { + return *path_; +} +inline void File::set_path(const ::std::string& value) { + set_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + path_ = new ::std::string; + } + path_->assign(value); +} +inline void File::set_path(const char* value) { + set_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + path_ = new ::std::string; + } + path_->assign(value); +} +inline void File::set_path(const char* value, size_t size) { + set_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + path_ = new ::std::string; + } + path_->assign(reinterpret_cast(value), size); +} +inline ::std::string* File::mutable_path() { + set_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + path_ = new ::std::string; + } + return path_; +} +inline ::std::string* File::release_path() { + clear_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = path_; + path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// optional string avail = 5; +inline bool File::has_avail() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void File::set_has_avail() { + _has_bits_[0] |= 0x00000010u; +} +inline void File::clear_has_avail() { + _has_bits_[0] &= ~0x00000010u; +} +inline void File::clear_avail() { + if (avail_ != &::google::protobuf::internal::kEmptyString) { + avail_->clear(); + } + clear_has_avail(); +} +inline const ::std::string& File::avail() const { + return *avail_; +} +inline void File::set_avail(const ::std::string& value) { + set_has_avail(); + if (avail_ == &::google::protobuf::internal::kEmptyString) { + avail_ = new ::std::string; + } + avail_->assign(value); +} +inline void File::set_avail(const char* value) { + set_has_avail(); + if (avail_ == &::google::protobuf::internal::kEmptyString) { + avail_ = new ::std::string; + } + avail_->assign(value); +} +inline void File::set_avail(const char* value, size_t size) { + set_has_avail(); + if (avail_ == &::google::protobuf::internal::kEmptyString) { + avail_ = new ::std::string; + } + avail_->assign(reinterpret_cast(value), size); +} +inline ::std::string* File::mutable_avail() { + set_has_avail(); + if (avail_ == &::google::protobuf::internal::kEmptyString) { + avail_ = new ::std::string; + } + return avail_; +} +inline ::std::string* File::release_avail() { + clear_has_avail(); + if (avail_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = avail_; + avail_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// ------------------------------------------------------------------- + +// Dir + +// required string name = 1; +inline bool Dir::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Dir::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void Dir::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Dir::clear_name() { + if (name_ != &::google::protobuf::internal::kEmptyString) { + name_->clear(); + } + clear_has_name(); +} +inline const ::std::string& Dir::name() const { + return *name_; +} +inline void Dir::set_name(const ::std::string& value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Dir::set_name(const char* value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(value); +} +inline void Dir::set_name(const char* value, size_t size) { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Dir::mutable_name() { + set_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + name_ = new ::std::string; + } + return name_; +} +inline ::std::string* Dir::release_name() { + clear_has_name(); + if (name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string path = 2; +inline bool Dir::has_path() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Dir::set_has_path() { + _has_bits_[0] |= 0x00000002u; +} +inline void Dir::clear_has_path() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Dir::clear_path() { + if (path_ != &::google::protobuf::internal::kEmptyString) { + path_->clear(); + } + clear_has_path(); +} +inline const ::std::string& Dir::path() const { + return *path_; +} +inline void Dir::set_path(const ::std::string& value) { + set_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + path_ = new ::std::string; + } + path_->assign(value); +} +inline void Dir::set_path(const char* value) { + set_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + path_ = new ::std::string; + } + path_->assign(value); +} +inline void Dir::set_path(const char* value, size_t size) { + set_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + path_ = new ::std::string; + } + path_->assign(reinterpret_cast(value), size); +} +inline ::std::string* Dir::mutable_path() { + set_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + path_ = new ::std::string; + } + return path_; +} +inline ::std::string* Dir::release_path() { + clear_has_path(); + if (path_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = path_; + path_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// repeated .rsctrl.base.Dir subdirs = 3; +inline int Dir::subdirs_size() const { + return subdirs_.size(); +} +inline void Dir::clear_subdirs() { + subdirs_.Clear(); +} +inline const ::rsctrl::base::Dir& Dir::subdirs(int index) const { + return subdirs_.Get(index); +} +inline ::rsctrl::base::Dir* Dir::mutable_subdirs(int index) { + return subdirs_.Mutable(index); +} +inline ::rsctrl::base::Dir* Dir::add_subdirs() { + return subdirs_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Dir >& +Dir::subdirs() const { + return subdirs_; +} +inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Dir >* +Dir::mutable_subdirs() { + return &subdirs_; +} + +// repeated .rsctrl.base.File files = 4; +inline int Dir::files_size() const { + return files_.size(); +} +inline void Dir::clear_files() { + files_.Clear(); +} +inline const ::rsctrl::base::File& Dir::files(int index) const { + return files_.Get(index); +} +inline ::rsctrl::base::File* Dir::mutable_files(int index) { + return files_.Mutable(index); +} +inline ::rsctrl::base::File* Dir::add_files() { + return files_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::File >& +Dir::files() const { + return files_; +} +inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::File >* +Dir::mutable_files() { + return &files_; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace base +} // namespace rsctrl + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::base::Status_StatusCode>() { + return ::rsctrl::base::Status_StatusCode_descriptor(); +} + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_base_2eproto__INCLUDED diff --git a/retroshare-nogui/src/rpc/proto/gencc/peers.pb.cc b/retroshare-nogui/src/rpc/proto/gencc/peers.pb.cc new file mode 100644 index 000000000..880cc50e4 --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/gencc/peers.pb.cc @@ -0,0 +1,2101 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "peers.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace rsctrl { +namespace peers { + +namespace { + +const ::google::protobuf::Descriptor* RequestPeers_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestPeers_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestPeers_SetOption_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestPeers_InfoOption_descriptor_ = NULL; +const ::google::protobuf::Descriptor* ResponsePeerList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ResponsePeerList_reflection_ = NULL; +const ::google::protobuf::Descriptor* RequestAddPeer_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestAddPeer_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestAddPeer_AddCmd_descriptor_ = NULL; +const ::google::protobuf::Descriptor* ResponseAddPeer_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ResponseAddPeer_reflection_ = NULL; +const ::google::protobuf::Descriptor* RequestModifyPeer_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestModifyPeer_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestModifyPeer_ModCmd_descriptor_ = NULL; +const ::google::protobuf::Descriptor* ResponseModifyPeer_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ResponseModifyPeer_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* ExtensionId_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* PackageId_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestMsgIds_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_peers_2eproto() { + protobuf_AddDesc_peers_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "peers.proto"); + GOOGLE_CHECK(file != NULL); + RequestPeers_descriptor_ = file->message_type(0); + static const int RequestPeers_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestPeers, set_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestPeers, info_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestPeers, gpg_ids_), + }; + RequestPeers_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestPeers_descriptor_, + RequestPeers::default_instance_, + RequestPeers_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestPeers, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestPeers, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestPeers)); + RequestPeers_SetOption_descriptor_ = RequestPeers_descriptor_->enum_type(0); + RequestPeers_InfoOption_descriptor_ = RequestPeers_descriptor_->enum_type(1); + ResponsePeerList_descriptor_ = file->message_type(1); + static const int ResponsePeerList_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponsePeerList, status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponsePeerList, peers_), + }; + ResponsePeerList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ResponsePeerList_descriptor_, + ResponsePeerList::default_instance_, + ResponsePeerList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponsePeerList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponsePeerList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ResponsePeerList)); + RequestAddPeer_descriptor_ = file->message_type(2); + static const int RequestAddPeer_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestAddPeer, gpg_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestAddPeer, cmd_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestAddPeer, cert_), + }; + RequestAddPeer_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestAddPeer_descriptor_, + RequestAddPeer::default_instance_, + RequestAddPeer_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestAddPeer, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestAddPeer, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestAddPeer)); + RequestAddPeer_AddCmd_descriptor_ = RequestAddPeer_descriptor_->enum_type(0); + ResponseAddPeer_descriptor_ = file->message_type(3); + static const int ResponseAddPeer_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseAddPeer, status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseAddPeer, peers_), + }; + ResponseAddPeer_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ResponseAddPeer_descriptor_, + ResponseAddPeer::default_instance_, + ResponseAddPeer_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseAddPeer, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseAddPeer, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ResponseAddPeer)); + RequestModifyPeer_descriptor_ = file->message_type(4); + static const int RequestModifyPeer_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestModifyPeer, cmd_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestModifyPeer, peers_), + }; + RequestModifyPeer_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestModifyPeer_descriptor_, + RequestModifyPeer::default_instance_, + RequestModifyPeer_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestModifyPeer, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestModifyPeer, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestModifyPeer)); + RequestModifyPeer_ModCmd_descriptor_ = RequestModifyPeer_descriptor_->enum_type(0); + ResponseModifyPeer_descriptor_ = file->message_type(5); + static const int ResponseModifyPeer_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseModifyPeer, status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseModifyPeer, peers_), + }; + ResponseModifyPeer_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ResponseModifyPeer_descriptor_, + ResponseModifyPeer::default_instance_, + ResponseModifyPeer_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseModifyPeer, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseModifyPeer, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ResponseModifyPeer)); + ExtensionId_descriptor_ = file->enum_type(0); + PackageId_descriptor_ = file->enum_type(1); + RequestMsgIds_descriptor_ = file->enum_type(2); + ResponseMsgIds_descriptor_ = file->enum_type(3); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_peers_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestPeers_descriptor_, &RequestPeers::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ResponsePeerList_descriptor_, &ResponsePeerList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestAddPeer_descriptor_, &RequestAddPeer::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ResponseAddPeer_descriptor_, &ResponseAddPeer::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestModifyPeer_descriptor_, &RequestModifyPeer::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ResponseModifyPeer_descriptor_, &ResponseModifyPeer::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_peers_2eproto() { + delete RequestPeers::default_instance_; + delete RequestPeers_reflection_; + delete ResponsePeerList::default_instance_; + delete ResponsePeerList_reflection_; + delete RequestAddPeer::default_instance_; + delete RequestAddPeer_reflection_; + delete ResponseAddPeer::default_instance_; + delete ResponseAddPeer_reflection_; + delete RequestModifyPeer::default_instance_; + delete RequestModifyPeer_reflection_; + delete ResponseModifyPeer::default_instance_; + delete ResponseModifyPeer_reflection_; +} + +void protobuf_AddDesc_peers_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::rsctrl::base::protobuf_AddDesc_base_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\013peers.proto\022\014rsctrl.peers\032\nbase.proto\"" + "\217\002\n\014RequestPeers\0221\n\003set\030\001 \002(\0162$.rsctrl.p" + "eers.RequestPeers.SetOption\0223\n\004info\030\002 \002(" + "\0162%.rsctrl.peers.RequestPeers.InfoOption" + "\022\017\n\007gpg_ids\030\003 \003(\t\"D\n\tSetOption\022\n\n\006LISTED" + "\020\001\022\n\n\006ONLINE\020\002\022\013\n\007FRIENDS\020\003\022\t\n\005VALID\020\004\022\007" + "\n\003ALL\020\005\"@\n\nInfoOption\022\014\n\010NAMEONLY\020\001\022\t\n\005B" + "ASIC\020\002\022\014\n\010LOCATION\020\003\022\013\n\007ALLINFO\020\004\"[\n\020Res" + "ponsePeerList\022#\n\006status\030\001 \002(\0132\023.rsctrl.b" + "ase.Status\022\"\n\005peers\030\002 \003(\0132\023.rsctrl.base." + "Person\"\242\001\n\016RequestAddPeer\022\016\n\006gpg_id\030\001 \002(" + "\t\0220\n\003cmd\030\002 \002(\0162#.rsctrl.peers.RequestAdd" + "Peer.AddCmd\022\014\n\004cert\030\003 \001(\t\"@\n\006AddCmd\022\010\n\004N" + "OOP\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\n\n\006IMPORT\020\003\022\013" + "\n\007EXAMINE\020\004\"Z\n\017ResponseAddPeer\022#\n\006status" + "\030\001 \002(\0132\023.rsctrl.base.Status\022\"\n\005peers\030\002 \003" + "(\0132\023.rsctrl.base.Person\"\231\001\n\021RequestModif" + "yPeer\0223\n\003cmd\030\001 \002(\0162&.rsctrl.peers.Reques" + "tModifyPeer.ModCmd\022\"\n\005peers\030\002 \003(\0132\023.rsct" + "rl.base.Person\"+\n\006ModCmd\022\010\n\004NOOP\020\000\022\013\n\007AD" + "DRESS\020\001\022\n\n\006DYNDNS\020\002\"]\n\022ResponseModifyPee" + "r\022#\n\006status\030\001 \002(\0132\023.rsctrl.base.Status\022\"" + "\n\005peers\030\002 \003(\0132\023.rsctrl.base.Person*\027\n\013Ex" + "tensionId\022\010\n\004BASE\020\000*\026\n\tPackageId\022\t\n\005PEER" + "S\020\001*^\n\rRequestMsgIds\022\026\n\022MsgId_RequestPee" + "rs\020\001\022\030\n\024MsgId_RequestAddPeer\020\002\022\033\n\027MsgId_" + "RequestModifyPeer\020\003*e\n\016ResponseMsgIds\022\032\n" + "\026MsgId_ResponsePeerList\020\001\022\031\n\025MsgId_Respo" + "nseAddPeer\020\002\022\034\n\030MsgId_ResponseModifyPeer" + "\020\003", 1162); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "peers.proto", &protobuf_RegisterTypes); + RequestPeers::default_instance_ = new RequestPeers(); + ResponsePeerList::default_instance_ = new ResponsePeerList(); + RequestAddPeer::default_instance_ = new RequestAddPeer(); + ResponseAddPeer::default_instance_ = new ResponseAddPeer(); + RequestModifyPeer::default_instance_ = new RequestModifyPeer(); + ResponseModifyPeer::default_instance_ = new ResponseModifyPeer(); + RequestPeers::default_instance_->InitAsDefaultInstance(); + ResponsePeerList::default_instance_->InitAsDefaultInstance(); + RequestAddPeer::default_instance_->InitAsDefaultInstance(); + ResponseAddPeer::default_instance_->InitAsDefaultInstance(); + RequestModifyPeer::default_instance_->InitAsDefaultInstance(); + ResponseModifyPeer::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_peers_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_peers_2eproto { + StaticDescriptorInitializer_peers_2eproto() { + protobuf_AddDesc_peers_2eproto(); + } +} static_descriptor_initializer_peers_2eproto_; + +const ::google::protobuf::EnumDescriptor* ExtensionId_descriptor() { + protobuf_AssignDescriptorsOnce(); + return ExtensionId_descriptor_; +} +bool ExtensionId_IsValid(int value) { + switch(value) { + case 0: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* PackageId_descriptor() { + protobuf_AssignDescriptorsOnce(); + return PackageId_descriptor_; +} +bool PackageId_IsValid(int value) { + switch(value) { + case 1: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* RequestMsgIds_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestMsgIds_descriptor_; +} +bool RequestMsgIds_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseMsgIds_descriptor_; +} +bool ResponseMsgIds_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* RequestPeers_SetOption_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestPeers_SetOption_descriptor_; +} +bool RequestPeers_SetOption_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const RequestPeers_SetOption RequestPeers::LISTED; +const RequestPeers_SetOption RequestPeers::ONLINE; +const RequestPeers_SetOption RequestPeers::FRIENDS; +const RequestPeers_SetOption RequestPeers::VALID; +const RequestPeers_SetOption RequestPeers::ALL; +const RequestPeers_SetOption RequestPeers::SetOption_MIN; +const RequestPeers_SetOption RequestPeers::SetOption_MAX; +const int RequestPeers::SetOption_ARRAYSIZE; +#endif // _MSC_VER +const ::google::protobuf::EnumDescriptor* RequestPeers_InfoOption_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestPeers_InfoOption_descriptor_; +} +bool RequestPeers_InfoOption_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const RequestPeers_InfoOption RequestPeers::NAMEONLY; +const RequestPeers_InfoOption RequestPeers::BASIC; +const RequestPeers_InfoOption RequestPeers::LOCATION; +const RequestPeers_InfoOption RequestPeers::ALLINFO; +const RequestPeers_InfoOption RequestPeers::InfoOption_MIN; +const RequestPeers_InfoOption RequestPeers::InfoOption_MAX; +const int RequestPeers::InfoOption_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int RequestPeers::kSetFieldNumber; +const int RequestPeers::kInfoFieldNumber; +const int RequestPeers::kGpgIdsFieldNumber; +#endif // !_MSC_VER + +RequestPeers::RequestPeers() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestPeers::InitAsDefaultInstance() { +} + +RequestPeers::RequestPeers(const RequestPeers& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestPeers::SharedCtor() { + _cached_size_ = 0; + set_ = 1; + info_ = 1; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestPeers::~RequestPeers() { + SharedDtor(); +} + +void RequestPeers::SharedDtor() { + if (this != default_instance_) { + } +} + +void RequestPeers::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestPeers::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestPeers_descriptor_; +} + +const RequestPeers& RequestPeers::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_peers_2eproto(); return *default_instance_; +} + +RequestPeers* RequestPeers::default_instance_ = NULL; + +RequestPeers* RequestPeers::New() const { + return new RequestPeers; +} + +void RequestPeers::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + set_ = 1; + info_ = 1; + } + gpg_ids_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestPeers::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 .rsctrl.peers.RequestPeers.SetOption set = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::peers::RequestPeers_SetOption_IsValid(value)) { + set_set(static_cast< ::rsctrl::peers::RequestPeers_SetOption >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_info; + break; + } + + // required .rsctrl.peers.RequestPeers.InfoOption info = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_info: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::peers::RequestPeers_InfoOption_IsValid(value)) { + set_info(static_cast< ::rsctrl::peers::RequestPeers_InfoOption >(value)); + } else { + mutable_unknown_fields()->AddVarint(2, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_gpg_ids; + break; + } + + // repeated string gpg_ids = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_gpg_ids: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_gpg_ids())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->gpg_ids(0).data(), this->gpg_ids(0).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_gpg_ids; + 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 RequestPeers::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.peers.RequestPeers.SetOption set = 1; + if (has_set()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->set(), output); + } + + // required .rsctrl.peers.RequestPeers.InfoOption info = 2; + if (has_info()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->info(), output); + } + + // repeated string gpg_ids = 3; + for (int i = 0; i < this->gpg_ids_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->gpg_ids(i).data(), this->gpg_ids(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->gpg_ids(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestPeers::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.peers.RequestPeers.SetOption set = 1; + if (has_set()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->set(), target); + } + + // required .rsctrl.peers.RequestPeers.InfoOption info = 2; + if (has_info()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->info(), target); + } + + // repeated string gpg_ids = 3; + for (int i = 0; i < this->gpg_ids_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->gpg_ids(i).data(), this->gpg_ids(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(3, this->gpg_ids(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestPeers::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.peers.RequestPeers.SetOption set = 1; + if (has_set()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->set()); + } + + // required .rsctrl.peers.RequestPeers.InfoOption info = 2; + if (has_info()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->info()); + } + + } + // repeated string gpg_ids = 3; + total_size += 1 * this->gpg_ids_size(); + for (int i = 0; i < this->gpg_ids_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->gpg_ids(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void RequestPeers::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestPeers* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestPeers::MergeFrom(const RequestPeers& from) { + GOOGLE_CHECK_NE(&from, this); + gpg_ids_.MergeFrom(from.gpg_ids_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_set()) { + set_set(from.set()); + } + if (from.has_info()) { + set_info(from.info()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestPeers::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestPeers::CopyFrom(const RequestPeers& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestPeers::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void RequestPeers::Swap(RequestPeers* other) { + if (other != this) { + std::swap(set_, other->set_); + std::swap(info_, other->info_); + gpg_ids_.Swap(&other->gpg_ids_); + 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 RequestPeers::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestPeers_descriptor_; + metadata.reflection = RequestPeers_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ResponsePeerList::kStatusFieldNumber; +const int ResponsePeerList::kPeersFieldNumber; +#endif // !_MSC_VER + +ResponsePeerList::ResponsePeerList() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ResponsePeerList::InitAsDefaultInstance() { + status_ = const_cast< ::rsctrl::base::Status*>(&::rsctrl::base::Status::default_instance()); +} + +ResponsePeerList::ResponsePeerList(const ResponsePeerList& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ResponsePeerList::SharedCtor() { + _cached_size_ = 0; + status_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ResponsePeerList::~ResponsePeerList() { + SharedDtor(); +} + +void ResponsePeerList::SharedDtor() { + if (this != default_instance_) { + delete status_; + } +} + +void ResponsePeerList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ResponsePeerList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponsePeerList_descriptor_; +} + +const ResponsePeerList& ResponsePeerList::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_peers_2eproto(); return *default_instance_; +} + +ResponsePeerList* ResponsePeerList::default_instance_ = NULL; + +ResponsePeerList* ResponsePeerList::New() const { + return new ResponsePeerList; +} + +void ResponsePeerList::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_status()) { + if (status_ != NULL) status_->::rsctrl::base::Status::Clear(); + } + } + peers_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ResponsePeerList::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 .rsctrl.base.Status status = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_status())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_peers; + break; + } + + // repeated .rsctrl.base.Person peers = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_peers: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_peers())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_peers; + 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 ResponsePeerList::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.base.Status status = 1; + if (has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->status(), output); + } + + // repeated .rsctrl.base.Person peers = 2; + for (int i = 0; i < this->peers_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->peers(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ResponsePeerList::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.base.Status status = 1; + if (has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->status(), target); + } + + // repeated .rsctrl.base.Person peers = 2; + for (int i = 0; i < this->peers_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->peers(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ResponsePeerList::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.base.Status status = 1; + if (has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->status()); + } + + } + // repeated .rsctrl.base.Person peers = 2; + total_size += 1 * this->peers_size(); + for (int i = 0; i < this->peers_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->peers(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ResponsePeerList::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ResponsePeerList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ResponsePeerList::MergeFrom(const ResponsePeerList& from) { + GOOGLE_CHECK_NE(&from, this); + peers_.MergeFrom(from.peers_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_status()) { + mutable_status()->::rsctrl::base::Status::MergeFrom(from.status()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ResponsePeerList::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResponsePeerList::CopyFrom(const ResponsePeerList& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponsePeerList::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_status()) { + if (!this->status().IsInitialized()) return false; + } + for (int i = 0; i < peers_size(); i++) { + if (!this->peers(i).IsInitialized()) return false; + } + return true; +} + +void ResponsePeerList::Swap(ResponsePeerList* other) { + if (other != this) { + std::swap(status_, other->status_); + peers_.Swap(&other->peers_); + 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 ResponsePeerList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ResponsePeerList_descriptor_; + metadata.reflection = ResponsePeerList_reflection_; + return metadata; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* RequestAddPeer_AddCmd_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestAddPeer_AddCmd_descriptor_; +} +bool RequestAddPeer_AddCmd_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const RequestAddPeer_AddCmd RequestAddPeer::NOOP; +const RequestAddPeer_AddCmd RequestAddPeer::ADD; +const RequestAddPeer_AddCmd RequestAddPeer::REMOVE; +const RequestAddPeer_AddCmd RequestAddPeer::IMPORT; +const RequestAddPeer_AddCmd RequestAddPeer::EXAMINE; +const RequestAddPeer_AddCmd RequestAddPeer::AddCmd_MIN; +const RequestAddPeer_AddCmd RequestAddPeer::AddCmd_MAX; +const int RequestAddPeer::AddCmd_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int RequestAddPeer::kGpgIdFieldNumber; +const int RequestAddPeer::kCmdFieldNumber; +const int RequestAddPeer::kCertFieldNumber; +#endif // !_MSC_VER + +RequestAddPeer::RequestAddPeer() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestAddPeer::InitAsDefaultInstance() { +} + +RequestAddPeer::RequestAddPeer(const RequestAddPeer& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestAddPeer::SharedCtor() { + _cached_size_ = 0; + gpg_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + cmd_ = 0; + cert_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestAddPeer::~RequestAddPeer() { + SharedDtor(); +} + +void RequestAddPeer::SharedDtor() { + if (gpg_id_ != &::google::protobuf::internal::kEmptyString) { + delete gpg_id_; + } + if (cert_ != &::google::protobuf::internal::kEmptyString) { + delete cert_; + } + if (this != default_instance_) { + } +} + +void RequestAddPeer::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestAddPeer::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestAddPeer_descriptor_; +} + +const RequestAddPeer& RequestAddPeer::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_peers_2eproto(); return *default_instance_; +} + +RequestAddPeer* RequestAddPeer::default_instance_ = NULL; + +RequestAddPeer* RequestAddPeer::New() const { + return new RequestAddPeer; +} + +void RequestAddPeer::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_gpg_id()) { + if (gpg_id_ != &::google::protobuf::internal::kEmptyString) { + gpg_id_->clear(); + } + } + cmd_ = 0; + if (has_cert()) { + if (cert_ != &::google::protobuf::internal::kEmptyString) { + cert_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestAddPeer::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required string gpg_id = 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_gpg_id())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->gpg_id().data(), this->gpg_id().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_cmd; + break; + } + + // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_cmd: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::peers::RequestAddPeer_AddCmd_IsValid(value)) { + set_cmd(static_cast< ::rsctrl::peers::RequestAddPeer_AddCmd >(value)); + } else { + mutable_unknown_fields()->AddVarint(2, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_cert; + break; + } + + // optional string cert = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_cert: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_cert())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->cert().data(), this->cert().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 RequestAddPeer::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string gpg_id = 1; + if (has_gpg_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->gpg_id().data(), this->gpg_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->gpg_id(), output); + } + + // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; + if (has_cmd()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->cmd(), output); + } + + // optional string cert = 3; + if (has_cert()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->cert().data(), this->cert().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->cert(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestAddPeer::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string gpg_id = 1; + if (has_gpg_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->gpg_id().data(), this->gpg_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->gpg_id(), target); + } + + // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; + if (has_cmd()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->cmd(), target); + } + + // optional string cert = 3; + if (has_cert()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->cert().data(), this->cert().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->cert(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestAddPeer::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string gpg_id = 1; + if (has_gpg_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->gpg_id()); + } + + // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; + if (has_cmd()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->cmd()); + } + + // optional string cert = 3; + if (has_cert()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->cert()); + } + + } + 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 RequestAddPeer::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestAddPeer* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestAddPeer::MergeFrom(const RequestAddPeer& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_gpg_id()) { + set_gpg_id(from.gpg_id()); + } + if (from.has_cmd()) { + set_cmd(from.cmd()); + } + if (from.has_cert()) { + set_cert(from.cert()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestAddPeer::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestAddPeer::CopyFrom(const RequestAddPeer& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestAddPeer::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void RequestAddPeer::Swap(RequestAddPeer* other) { + if (other != this) { + std::swap(gpg_id_, other->gpg_id_); + std::swap(cmd_, other->cmd_); + std::swap(cert_, other->cert_); + 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 RequestAddPeer::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestAddPeer_descriptor_; + metadata.reflection = RequestAddPeer_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ResponseAddPeer::kStatusFieldNumber; +const int ResponseAddPeer::kPeersFieldNumber; +#endif // !_MSC_VER + +ResponseAddPeer::ResponseAddPeer() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ResponseAddPeer::InitAsDefaultInstance() { + status_ = const_cast< ::rsctrl::base::Status*>(&::rsctrl::base::Status::default_instance()); +} + +ResponseAddPeer::ResponseAddPeer(const ResponseAddPeer& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ResponseAddPeer::SharedCtor() { + _cached_size_ = 0; + status_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ResponseAddPeer::~ResponseAddPeer() { + SharedDtor(); +} + +void ResponseAddPeer::SharedDtor() { + if (this != default_instance_) { + delete status_; + } +} + +void ResponseAddPeer::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ResponseAddPeer::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseAddPeer_descriptor_; +} + +const ResponseAddPeer& ResponseAddPeer::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_peers_2eproto(); return *default_instance_; +} + +ResponseAddPeer* ResponseAddPeer::default_instance_ = NULL; + +ResponseAddPeer* ResponseAddPeer::New() const { + return new ResponseAddPeer; +} + +void ResponseAddPeer::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_status()) { + if (status_ != NULL) status_->::rsctrl::base::Status::Clear(); + } + } + peers_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ResponseAddPeer::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 .rsctrl.base.Status status = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_status())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_peers; + break; + } + + // repeated .rsctrl.base.Person peers = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_peers: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_peers())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_peers; + 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 ResponseAddPeer::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.base.Status status = 1; + if (has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->status(), output); + } + + // repeated .rsctrl.base.Person peers = 2; + for (int i = 0; i < this->peers_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->peers(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ResponseAddPeer::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.base.Status status = 1; + if (has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->status(), target); + } + + // repeated .rsctrl.base.Person peers = 2; + for (int i = 0; i < this->peers_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->peers(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ResponseAddPeer::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.base.Status status = 1; + if (has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->status()); + } + + } + // repeated .rsctrl.base.Person peers = 2; + total_size += 1 * this->peers_size(); + for (int i = 0; i < this->peers_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->peers(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ResponseAddPeer::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ResponseAddPeer* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ResponseAddPeer::MergeFrom(const ResponseAddPeer& from) { + GOOGLE_CHECK_NE(&from, this); + peers_.MergeFrom(from.peers_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_status()) { + mutable_status()->::rsctrl::base::Status::MergeFrom(from.status()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ResponseAddPeer::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResponseAddPeer::CopyFrom(const ResponseAddPeer& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponseAddPeer::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_status()) { + if (!this->status().IsInitialized()) return false; + } + for (int i = 0; i < peers_size(); i++) { + if (!this->peers(i).IsInitialized()) return false; + } + return true; +} + +void ResponseAddPeer::Swap(ResponseAddPeer* other) { + if (other != this) { + std::swap(status_, other->status_); + peers_.Swap(&other->peers_); + 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 ResponseAddPeer::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ResponseAddPeer_descriptor_; + metadata.reflection = ResponseAddPeer_reflection_; + return metadata; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* RequestModifyPeer_ModCmd_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestModifyPeer_ModCmd_descriptor_; +} +bool RequestModifyPeer_ModCmd_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const RequestModifyPeer_ModCmd RequestModifyPeer::NOOP; +const RequestModifyPeer_ModCmd RequestModifyPeer::ADDRESS; +const RequestModifyPeer_ModCmd RequestModifyPeer::DYNDNS; +const RequestModifyPeer_ModCmd RequestModifyPeer::ModCmd_MIN; +const RequestModifyPeer_ModCmd RequestModifyPeer::ModCmd_MAX; +const int RequestModifyPeer::ModCmd_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int RequestModifyPeer::kCmdFieldNumber; +const int RequestModifyPeer::kPeersFieldNumber; +#endif // !_MSC_VER + +RequestModifyPeer::RequestModifyPeer() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestModifyPeer::InitAsDefaultInstance() { +} + +RequestModifyPeer::RequestModifyPeer(const RequestModifyPeer& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestModifyPeer::SharedCtor() { + _cached_size_ = 0; + cmd_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestModifyPeer::~RequestModifyPeer() { + SharedDtor(); +} + +void RequestModifyPeer::SharedDtor() { + if (this != default_instance_) { + } +} + +void RequestModifyPeer::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestModifyPeer::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestModifyPeer_descriptor_; +} + +const RequestModifyPeer& RequestModifyPeer::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_peers_2eproto(); return *default_instance_; +} + +RequestModifyPeer* RequestModifyPeer::default_instance_ = NULL; + +RequestModifyPeer* RequestModifyPeer::New() const { + return new RequestModifyPeer; +} + +void RequestModifyPeer::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + cmd_ = 0; + } + peers_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestModifyPeer::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 .rsctrl.peers.RequestModifyPeer.ModCmd cmd = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::peers::RequestModifyPeer_ModCmd_IsValid(value)) { + set_cmd(static_cast< ::rsctrl::peers::RequestModifyPeer_ModCmd >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_peers; + break; + } + + // repeated .rsctrl.base.Person peers = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_peers: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_peers())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_peers; + 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 RequestModifyPeer::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.peers.RequestModifyPeer.ModCmd cmd = 1; + if (has_cmd()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->cmd(), output); + } + + // repeated .rsctrl.base.Person peers = 2; + for (int i = 0; i < this->peers_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->peers(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestModifyPeer::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.peers.RequestModifyPeer.ModCmd cmd = 1; + if (has_cmd()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->cmd(), target); + } + + // repeated .rsctrl.base.Person peers = 2; + for (int i = 0; i < this->peers_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->peers(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestModifyPeer::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.peers.RequestModifyPeer.ModCmd cmd = 1; + if (has_cmd()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->cmd()); + } + + } + // repeated .rsctrl.base.Person peers = 2; + total_size += 1 * this->peers_size(); + for (int i = 0; i < this->peers_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->peers(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void RequestModifyPeer::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestModifyPeer* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestModifyPeer::MergeFrom(const RequestModifyPeer& from) { + GOOGLE_CHECK_NE(&from, this); + peers_.MergeFrom(from.peers_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_cmd()) { + set_cmd(from.cmd()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestModifyPeer::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestModifyPeer::CopyFrom(const RequestModifyPeer& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestModifyPeer::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + for (int i = 0; i < peers_size(); i++) { + if (!this->peers(i).IsInitialized()) return false; + } + return true; +} + +void RequestModifyPeer::Swap(RequestModifyPeer* other) { + if (other != this) { + std::swap(cmd_, other->cmd_); + peers_.Swap(&other->peers_); + 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 RequestModifyPeer::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestModifyPeer_descriptor_; + metadata.reflection = RequestModifyPeer_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ResponseModifyPeer::kStatusFieldNumber; +const int ResponseModifyPeer::kPeersFieldNumber; +#endif // !_MSC_VER + +ResponseModifyPeer::ResponseModifyPeer() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ResponseModifyPeer::InitAsDefaultInstance() { + status_ = const_cast< ::rsctrl::base::Status*>(&::rsctrl::base::Status::default_instance()); +} + +ResponseModifyPeer::ResponseModifyPeer(const ResponseModifyPeer& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ResponseModifyPeer::SharedCtor() { + _cached_size_ = 0; + status_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ResponseModifyPeer::~ResponseModifyPeer() { + SharedDtor(); +} + +void ResponseModifyPeer::SharedDtor() { + if (this != default_instance_) { + delete status_; + } +} + +void ResponseModifyPeer::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ResponseModifyPeer::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseModifyPeer_descriptor_; +} + +const ResponseModifyPeer& ResponseModifyPeer::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_peers_2eproto(); return *default_instance_; +} + +ResponseModifyPeer* ResponseModifyPeer::default_instance_ = NULL; + +ResponseModifyPeer* ResponseModifyPeer::New() const { + return new ResponseModifyPeer; +} + +void ResponseModifyPeer::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_status()) { + if (status_ != NULL) status_->::rsctrl::base::Status::Clear(); + } + } + peers_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ResponseModifyPeer::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 .rsctrl.base.Status status = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_status())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_peers; + break; + } + + // repeated .rsctrl.base.Person peers = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_peers: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_peers())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_peers; + 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 ResponseModifyPeer::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.base.Status status = 1; + if (has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->status(), output); + } + + // repeated .rsctrl.base.Person peers = 2; + for (int i = 0; i < this->peers_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->peers(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ResponseModifyPeer::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.base.Status status = 1; + if (has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->status(), target); + } + + // repeated .rsctrl.base.Person peers = 2; + for (int i = 0; i < this->peers_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->peers(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ResponseModifyPeer::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.base.Status status = 1; + if (has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->status()); + } + + } + // repeated .rsctrl.base.Person peers = 2; + total_size += 1 * this->peers_size(); + for (int i = 0; i < this->peers_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->peers(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ResponseModifyPeer::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ResponseModifyPeer* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ResponseModifyPeer::MergeFrom(const ResponseModifyPeer& from) { + GOOGLE_CHECK_NE(&from, this); + peers_.MergeFrom(from.peers_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_status()) { + mutable_status()->::rsctrl::base::Status::MergeFrom(from.status()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ResponseModifyPeer::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResponseModifyPeer::CopyFrom(const ResponseModifyPeer& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponseModifyPeer::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_status()) { + if (!this->status().IsInitialized()) return false; + } + for (int i = 0; i < peers_size(); i++) { + if (!this->peers(i).IsInitialized()) return false; + } + return true; +} + +void ResponseModifyPeer::Swap(ResponseModifyPeer* other) { + if (other != this) { + std::swap(status_, other->status_); + peers_.Swap(&other->peers_); + 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 ResponseModifyPeer::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ResponseModifyPeer_descriptor_; + metadata.reflection = ResponseModifyPeer_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace peers +} // namespace rsctrl + +// @@protoc_insertion_point(global_scope) diff --git a/retroshare-nogui/src/rpc/proto/gencc/peers.pb.h b/retroshare-nogui/src/rpc/proto/gencc/peers.pb.h new file mode 100644 index 000000000..8696bd617 --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/gencc/peers.pb.h @@ -0,0 +1,1427 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: peers.proto + +#ifndef PROTOBUF_peers_2eproto__INCLUDED +#define PROTOBUF_peers_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2004001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include "base.pb.h" +// @@protoc_insertion_point(includes) + +namespace rsctrl { +namespace peers { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_peers_2eproto(); +void protobuf_AssignDesc_peers_2eproto(); +void protobuf_ShutdownFile_peers_2eproto(); + +class RequestPeers; +class ResponsePeerList; +class RequestAddPeer; +class ResponseAddPeer; +class RequestModifyPeer; +class ResponseModifyPeer; + +enum RequestPeers_SetOption { + RequestPeers_SetOption_LISTED = 1, + RequestPeers_SetOption_ONLINE = 2, + RequestPeers_SetOption_FRIENDS = 3, + RequestPeers_SetOption_VALID = 4, + RequestPeers_SetOption_ALL = 5 +}; +bool RequestPeers_SetOption_IsValid(int value); +const RequestPeers_SetOption RequestPeers_SetOption_SetOption_MIN = RequestPeers_SetOption_LISTED; +const RequestPeers_SetOption RequestPeers_SetOption_SetOption_MAX = RequestPeers_SetOption_ALL; +const int RequestPeers_SetOption_SetOption_ARRAYSIZE = RequestPeers_SetOption_SetOption_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestPeers_SetOption_descriptor(); +inline const ::std::string& RequestPeers_SetOption_Name(RequestPeers_SetOption value) { + return ::google::protobuf::internal::NameOfEnum( + RequestPeers_SetOption_descriptor(), value); +} +inline bool RequestPeers_SetOption_Parse( + const ::std::string& name, RequestPeers_SetOption* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestPeers_SetOption_descriptor(), name, value); +} +enum RequestPeers_InfoOption { + RequestPeers_InfoOption_NAMEONLY = 1, + RequestPeers_InfoOption_BASIC = 2, + RequestPeers_InfoOption_LOCATION = 3, + RequestPeers_InfoOption_ALLINFO = 4 +}; +bool RequestPeers_InfoOption_IsValid(int value); +const RequestPeers_InfoOption RequestPeers_InfoOption_InfoOption_MIN = RequestPeers_InfoOption_NAMEONLY; +const RequestPeers_InfoOption RequestPeers_InfoOption_InfoOption_MAX = RequestPeers_InfoOption_ALLINFO; +const int RequestPeers_InfoOption_InfoOption_ARRAYSIZE = RequestPeers_InfoOption_InfoOption_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestPeers_InfoOption_descriptor(); +inline const ::std::string& RequestPeers_InfoOption_Name(RequestPeers_InfoOption value) { + return ::google::protobuf::internal::NameOfEnum( + RequestPeers_InfoOption_descriptor(), value); +} +inline bool RequestPeers_InfoOption_Parse( + const ::std::string& name, RequestPeers_InfoOption* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestPeers_InfoOption_descriptor(), name, value); +} +enum RequestAddPeer_AddCmd { + RequestAddPeer_AddCmd_NOOP = 0, + RequestAddPeer_AddCmd_ADD = 1, + RequestAddPeer_AddCmd_REMOVE = 2, + RequestAddPeer_AddCmd_IMPORT = 3, + RequestAddPeer_AddCmd_EXAMINE = 4 +}; +bool RequestAddPeer_AddCmd_IsValid(int value); +const RequestAddPeer_AddCmd RequestAddPeer_AddCmd_AddCmd_MIN = RequestAddPeer_AddCmd_NOOP; +const RequestAddPeer_AddCmd RequestAddPeer_AddCmd_AddCmd_MAX = RequestAddPeer_AddCmd_EXAMINE; +const int RequestAddPeer_AddCmd_AddCmd_ARRAYSIZE = RequestAddPeer_AddCmd_AddCmd_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestAddPeer_AddCmd_descriptor(); +inline const ::std::string& RequestAddPeer_AddCmd_Name(RequestAddPeer_AddCmd value) { + return ::google::protobuf::internal::NameOfEnum( + RequestAddPeer_AddCmd_descriptor(), value); +} +inline bool RequestAddPeer_AddCmd_Parse( + const ::std::string& name, RequestAddPeer_AddCmd* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestAddPeer_AddCmd_descriptor(), name, value); +} +enum RequestModifyPeer_ModCmd { + RequestModifyPeer_ModCmd_NOOP = 0, + RequestModifyPeer_ModCmd_ADDRESS = 1, + RequestModifyPeer_ModCmd_DYNDNS = 2 +}; +bool RequestModifyPeer_ModCmd_IsValid(int value); +const RequestModifyPeer_ModCmd RequestModifyPeer_ModCmd_ModCmd_MIN = RequestModifyPeer_ModCmd_NOOP; +const RequestModifyPeer_ModCmd RequestModifyPeer_ModCmd_ModCmd_MAX = RequestModifyPeer_ModCmd_DYNDNS; +const int RequestModifyPeer_ModCmd_ModCmd_ARRAYSIZE = RequestModifyPeer_ModCmd_ModCmd_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestModifyPeer_ModCmd_descriptor(); +inline const ::std::string& RequestModifyPeer_ModCmd_Name(RequestModifyPeer_ModCmd value) { + return ::google::protobuf::internal::NameOfEnum( + RequestModifyPeer_ModCmd_descriptor(), value); +} +inline bool RequestModifyPeer_ModCmd_Parse( + const ::std::string& name, RequestModifyPeer_ModCmd* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestModifyPeer_ModCmd_descriptor(), name, value); +} +enum ExtensionId { + BASE = 0 +}; +bool ExtensionId_IsValid(int value); +const ExtensionId ExtensionId_MIN = BASE; +const ExtensionId ExtensionId_MAX = BASE; +const int ExtensionId_ARRAYSIZE = ExtensionId_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ExtensionId_descriptor(); +inline const ::std::string& ExtensionId_Name(ExtensionId value) { + return ::google::protobuf::internal::NameOfEnum( + ExtensionId_descriptor(), value); +} +inline bool ExtensionId_Parse( + const ::std::string& name, ExtensionId* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ExtensionId_descriptor(), name, value); +} +enum PackageId { + PEERS = 1 +}; +bool PackageId_IsValid(int value); +const PackageId PackageId_MIN = PEERS; +const PackageId PackageId_MAX = PEERS; +const int PackageId_ARRAYSIZE = PackageId_MAX + 1; + +const ::google::protobuf::EnumDescriptor* PackageId_descriptor(); +inline const ::std::string& PackageId_Name(PackageId value) { + return ::google::protobuf::internal::NameOfEnum( + PackageId_descriptor(), value); +} +inline bool PackageId_Parse( + const ::std::string& name, PackageId* value) { + return ::google::protobuf::internal::ParseNamedEnum( + PackageId_descriptor(), name, value); +} +enum RequestMsgIds { + MsgId_RequestPeers = 1, + MsgId_RequestAddPeer = 2, + MsgId_RequestModifyPeer = 3 +}; +bool RequestMsgIds_IsValid(int value); +const RequestMsgIds RequestMsgIds_MIN = MsgId_RequestPeers; +const RequestMsgIds RequestMsgIds_MAX = MsgId_RequestModifyPeer; +const int RequestMsgIds_ARRAYSIZE = RequestMsgIds_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestMsgIds_descriptor(); +inline const ::std::string& RequestMsgIds_Name(RequestMsgIds value) { + return ::google::protobuf::internal::NameOfEnum( + RequestMsgIds_descriptor(), value); +} +inline bool RequestMsgIds_Parse( + const ::std::string& name, RequestMsgIds* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestMsgIds_descriptor(), name, value); +} +enum ResponseMsgIds { + MsgId_ResponsePeerList = 1, + MsgId_ResponseAddPeer = 2, + MsgId_ResponseModifyPeer = 3 +}; +bool ResponseMsgIds_IsValid(int value); +const ResponseMsgIds ResponseMsgIds_MIN = MsgId_ResponsePeerList; +const ResponseMsgIds ResponseMsgIds_MAX = MsgId_ResponseModifyPeer; +const int ResponseMsgIds_ARRAYSIZE = ResponseMsgIds_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor(); +inline const ::std::string& ResponseMsgIds_Name(ResponseMsgIds value) { + return ::google::protobuf::internal::NameOfEnum( + ResponseMsgIds_descriptor(), value); +} +inline bool ResponseMsgIds_Parse( + const ::std::string& name, ResponseMsgIds* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ResponseMsgIds_descriptor(), name, value); +} +// =================================================================== + +class RequestPeers : public ::google::protobuf::Message { + public: + RequestPeers(); + virtual ~RequestPeers(); + + RequestPeers(const RequestPeers& from); + + inline RequestPeers& operator=(const RequestPeers& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestPeers& default_instance(); + + void Swap(RequestPeers* other); + + // implements Message ---------------------------------------------- + + RequestPeers* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestPeers& from); + void MergeFrom(const RequestPeers& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef RequestPeers_SetOption SetOption; + static const SetOption LISTED = RequestPeers_SetOption_LISTED; + static const SetOption ONLINE = RequestPeers_SetOption_ONLINE; + static const SetOption FRIENDS = RequestPeers_SetOption_FRIENDS; + static const SetOption VALID = RequestPeers_SetOption_VALID; + static const SetOption ALL = RequestPeers_SetOption_ALL; + static inline bool SetOption_IsValid(int value) { + return RequestPeers_SetOption_IsValid(value); + } + static const SetOption SetOption_MIN = + RequestPeers_SetOption_SetOption_MIN; + static const SetOption SetOption_MAX = + RequestPeers_SetOption_SetOption_MAX; + static const int SetOption_ARRAYSIZE = + RequestPeers_SetOption_SetOption_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + SetOption_descriptor() { + return RequestPeers_SetOption_descriptor(); + } + static inline const ::std::string& SetOption_Name(SetOption value) { + return RequestPeers_SetOption_Name(value); + } + static inline bool SetOption_Parse(const ::std::string& name, + SetOption* value) { + return RequestPeers_SetOption_Parse(name, value); + } + + typedef RequestPeers_InfoOption InfoOption; + static const InfoOption NAMEONLY = RequestPeers_InfoOption_NAMEONLY; + static const InfoOption BASIC = RequestPeers_InfoOption_BASIC; + static const InfoOption LOCATION = RequestPeers_InfoOption_LOCATION; + static const InfoOption ALLINFO = RequestPeers_InfoOption_ALLINFO; + static inline bool InfoOption_IsValid(int value) { + return RequestPeers_InfoOption_IsValid(value); + } + static const InfoOption InfoOption_MIN = + RequestPeers_InfoOption_InfoOption_MIN; + static const InfoOption InfoOption_MAX = + RequestPeers_InfoOption_InfoOption_MAX; + static const int InfoOption_ARRAYSIZE = + RequestPeers_InfoOption_InfoOption_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + InfoOption_descriptor() { + return RequestPeers_InfoOption_descriptor(); + } + static inline const ::std::string& InfoOption_Name(InfoOption value) { + return RequestPeers_InfoOption_Name(value); + } + static inline bool InfoOption_Parse(const ::std::string& name, + InfoOption* value) { + return RequestPeers_InfoOption_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .rsctrl.peers.RequestPeers.SetOption set = 1; + inline bool has_set() const; + inline void clear_set(); + static const int kSetFieldNumber = 1; + inline ::rsctrl::peers::RequestPeers_SetOption set() const; + inline void set_set(::rsctrl::peers::RequestPeers_SetOption value); + + // required .rsctrl.peers.RequestPeers.InfoOption info = 2; + inline bool has_info() const; + inline void clear_info(); + static const int kInfoFieldNumber = 2; + inline ::rsctrl::peers::RequestPeers_InfoOption info() const; + inline void set_info(::rsctrl::peers::RequestPeers_InfoOption value); + + // repeated string gpg_ids = 3; + inline int gpg_ids_size() const; + inline void clear_gpg_ids(); + static const int kGpgIdsFieldNumber = 3; + inline const ::std::string& gpg_ids(int index) const; + inline ::std::string* mutable_gpg_ids(int index); + inline void set_gpg_ids(int index, const ::std::string& value); + inline void set_gpg_ids(int index, const char* value); + inline void set_gpg_ids(int index, const char* value, size_t size); + inline ::std::string* add_gpg_ids(); + inline void add_gpg_ids(const ::std::string& value); + inline void add_gpg_ids(const char* value); + inline void add_gpg_ids(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& gpg_ids() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_gpg_ids(); + + // @@protoc_insertion_point(class_scope:rsctrl.peers.RequestPeers) + private: + inline void set_has_set(); + inline void clear_has_set(); + inline void set_has_info(); + inline void clear_has_info(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + int set_; + int info_; + ::google::protobuf::RepeatedPtrField< ::std::string> gpg_ids_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + + friend void protobuf_AddDesc_peers_2eproto(); + friend void protobuf_AssignDesc_peers_2eproto(); + friend void protobuf_ShutdownFile_peers_2eproto(); + + void InitAsDefaultInstance(); + static RequestPeers* default_instance_; +}; +// ------------------------------------------------------------------- + +class ResponsePeerList : public ::google::protobuf::Message { + public: + ResponsePeerList(); + virtual ~ResponsePeerList(); + + ResponsePeerList(const ResponsePeerList& from); + + inline ResponsePeerList& operator=(const ResponsePeerList& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ResponsePeerList& default_instance(); + + void Swap(ResponsePeerList* other); + + // implements Message ---------------------------------------------- + + ResponsePeerList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ResponsePeerList& from); + void MergeFrom(const ResponsePeerList& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.base.Status status = 1; + inline bool has_status() const; + inline void clear_status(); + static const int kStatusFieldNumber = 1; + inline const ::rsctrl::base::Status& status() const; + inline ::rsctrl::base::Status* mutable_status(); + inline ::rsctrl::base::Status* release_status(); + + // repeated .rsctrl.base.Person peers = 2; + inline int peers_size() const; + inline void clear_peers(); + static const int kPeersFieldNumber = 2; + inline const ::rsctrl::base::Person& peers(int index) const; + inline ::rsctrl::base::Person* mutable_peers(int index); + inline ::rsctrl::base::Person* add_peers(); + inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >& + peers() const; + inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >* + mutable_peers(); + + // @@protoc_insertion_point(class_scope:rsctrl.peers.ResponsePeerList) + private: + inline void set_has_status(); + inline void clear_has_status(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::base::Status* status_; + ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person > peers_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_peers_2eproto(); + friend void protobuf_AssignDesc_peers_2eproto(); + friend void protobuf_ShutdownFile_peers_2eproto(); + + void InitAsDefaultInstance(); + static ResponsePeerList* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestAddPeer : public ::google::protobuf::Message { + public: + RequestAddPeer(); + virtual ~RequestAddPeer(); + + RequestAddPeer(const RequestAddPeer& from); + + inline RequestAddPeer& operator=(const RequestAddPeer& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestAddPeer& default_instance(); + + void Swap(RequestAddPeer* other); + + // implements Message ---------------------------------------------- + + RequestAddPeer* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestAddPeer& from); + void MergeFrom(const RequestAddPeer& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef RequestAddPeer_AddCmd AddCmd; + static const AddCmd NOOP = RequestAddPeer_AddCmd_NOOP; + static const AddCmd ADD = RequestAddPeer_AddCmd_ADD; + static const AddCmd REMOVE = RequestAddPeer_AddCmd_REMOVE; + static const AddCmd IMPORT = RequestAddPeer_AddCmd_IMPORT; + static const AddCmd EXAMINE = RequestAddPeer_AddCmd_EXAMINE; + static inline bool AddCmd_IsValid(int value) { + return RequestAddPeer_AddCmd_IsValid(value); + } + static const AddCmd AddCmd_MIN = + RequestAddPeer_AddCmd_AddCmd_MIN; + static const AddCmd AddCmd_MAX = + RequestAddPeer_AddCmd_AddCmd_MAX; + static const int AddCmd_ARRAYSIZE = + RequestAddPeer_AddCmd_AddCmd_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + AddCmd_descriptor() { + return RequestAddPeer_AddCmd_descriptor(); + } + static inline const ::std::string& AddCmd_Name(AddCmd value) { + return RequestAddPeer_AddCmd_Name(value); + } + static inline bool AddCmd_Parse(const ::std::string& name, + AddCmd* value) { + return RequestAddPeer_AddCmd_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required string gpg_id = 1; + inline bool has_gpg_id() const; + inline void clear_gpg_id(); + static const int kGpgIdFieldNumber = 1; + inline const ::std::string& gpg_id() const; + inline void set_gpg_id(const ::std::string& value); + inline void set_gpg_id(const char* value); + inline void set_gpg_id(const char* value, size_t size); + inline ::std::string* mutable_gpg_id(); + inline ::std::string* release_gpg_id(); + + // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; + inline bool has_cmd() const; + inline void clear_cmd(); + static const int kCmdFieldNumber = 2; + inline ::rsctrl::peers::RequestAddPeer_AddCmd cmd() const; + inline void set_cmd(::rsctrl::peers::RequestAddPeer_AddCmd value); + + // optional string cert = 3; + inline bool has_cert() const; + inline void clear_cert(); + static const int kCertFieldNumber = 3; + inline const ::std::string& cert() const; + inline void set_cert(const ::std::string& value); + inline void set_cert(const char* value); + inline void set_cert(const char* value, size_t size); + inline ::std::string* mutable_cert(); + inline ::std::string* release_cert(); + + // @@protoc_insertion_point(class_scope:rsctrl.peers.RequestAddPeer) + private: + inline void set_has_gpg_id(); + inline void clear_has_gpg_id(); + inline void set_has_cmd(); + inline void clear_has_cmd(); + inline void set_has_cert(); + inline void clear_has_cert(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* gpg_id_; + ::std::string* cert_; + int cmd_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + + friend void protobuf_AddDesc_peers_2eproto(); + friend void protobuf_AssignDesc_peers_2eproto(); + friend void protobuf_ShutdownFile_peers_2eproto(); + + void InitAsDefaultInstance(); + static RequestAddPeer* default_instance_; +}; +// ------------------------------------------------------------------- + +class ResponseAddPeer : public ::google::protobuf::Message { + public: + ResponseAddPeer(); + virtual ~ResponseAddPeer(); + + ResponseAddPeer(const ResponseAddPeer& from); + + inline ResponseAddPeer& operator=(const ResponseAddPeer& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ResponseAddPeer& default_instance(); + + void Swap(ResponseAddPeer* other); + + // implements Message ---------------------------------------------- + + ResponseAddPeer* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ResponseAddPeer& from); + void MergeFrom(const ResponseAddPeer& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.base.Status status = 1; + inline bool has_status() const; + inline void clear_status(); + static const int kStatusFieldNumber = 1; + inline const ::rsctrl::base::Status& status() const; + inline ::rsctrl::base::Status* mutable_status(); + inline ::rsctrl::base::Status* release_status(); + + // repeated .rsctrl.base.Person peers = 2; + inline int peers_size() const; + inline void clear_peers(); + static const int kPeersFieldNumber = 2; + inline const ::rsctrl::base::Person& peers(int index) const; + inline ::rsctrl::base::Person* mutable_peers(int index); + inline ::rsctrl::base::Person* add_peers(); + inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >& + peers() const; + inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >* + mutable_peers(); + + // @@protoc_insertion_point(class_scope:rsctrl.peers.ResponseAddPeer) + private: + inline void set_has_status(); + inline void clear_has_status(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::base::Status* status_; + ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person > peers_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_peers_2eproto(); + friend void protobuf_AssignDesc_peers_2eproto(); + friend void protobuf_ShutdownFile_peers_2eproto(); + + void InitAsDefaultInstance(); + static ResponseAddPeer* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestModifyPeer : public ::google::protobuf::Message { + public: + RequestModifyPeer(); + virtual ~RequestModifyPeer(); + + RequestModifyPeer(const RequestModifyPeer& from); + + inline RequestModifyPeer& operator=(const RequestModifyPeer& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestModifyPeer& default_instance(); + + void Swap(RequestModifyPeer* other); + + // implements Message ---------------------------------------------- + + RequestModifyPeer* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestModifyPeer& from); + void MergeFrom(const RequestModifyPeer& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef RequestModifyPeer_ModCmd ModCmd; + static const ModCmd NOOP = RequestModifyPeer_ModCmd_NOOP; + static const ModCmd ADDRESS = RequestModifyPeer_ModCmd_ADDRESS; + static const ModCmd DYNDNS = RequestModifyPeer_ModCmd_DYNDNS; + static inline bool ModCmd_IsValid(int value) { + return RequestModifyPeer_ModCmd_IsValid(value); + } + static const ModCmd ModCmd_MIN = + RequestModifyPeer_ModCmd_ModCmd_MIN; + static const ModCmd ModCmd_MAX = + RequestModifyPeer_ModCmd_ModCmd_MAX; + static const int ModCmd_ARRAYSIZE = + RequestModifyPeer_ModCmd_ModCmd_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + ModCmd_descriptor() { + return RequestModifyPeer_ModCmd_descriptor(); + } + static inline const ::std::string& ModCmd_Name(ModCmd value) { + return RequestModifyPeer_ModCmd_Name(value); + } + static inline bool ModCmd_Parse(const ::std::string& name, + ModCmd* value) { + return RequestModifyPeer_ModCmd_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .rsctrl.peers.RequestModifyPeer.ModCmd cmd = 1; + inline bool has_cmd() const; + inline void clear_cmd(); + static const int kCmdFieldNumber = 1; + inline ::rsctrl::peers::RequestModifyPeer_ModCmd cmd() const; + inline void set_cmd(::rsctrl::peers::RequestModifyPeer_ModCmd value); + + // repeated .rsctrl.base.Person peers = 2; + inline int peers_size() const; + inline void clear_peers(); + static const int kPeersFieldNumber = 2; + inline const ::rsctrl::base::Person& peers(int index) const; + inline ::rsctrl::base::Person* mutable_peers(int index); + inline ::rsctrl::base::Person* add_peers(); + inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >& + peers() const; + inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >* + mutable_peers(); + + // @@protoc_insertion_point(class_scope:rsctrl.peers.RequestModifyPeer) + private: + inline void set_has_cmd(); + inline void clear_has_cmd(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person > peers_; + int cmd_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_peers_2eproto(); + friend void protobuf_AssignDesc_peers_2eproto(); + friend void protobuf_ShutdownFile_peers_2eproto(); + + void InitAsDefaultInstance(); + static RequestModifyPeer* default_instance_; +}; +// ------------------------------------------------------------------- + +class ResponseModifyPeer : public ::google::protobuf::Message { + public: + ResponseModifyPeer(); + virtual ~ResponseModifyPeer(); + + ResponseModifyPeer(const ResponseModifyPeer& from); + + inline ResponseModifyPeer& operator=(const ResponseModifyPeer& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ResponseModifyPeer& default_instance(); + + void Swap(ResponseModifyPeer* other); + + // implements Message ---------------------------------------------- + + ResponseModifyPeer* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ResponseModifyPeer& from); + void MergeFrom(const ResponseModifyPeer& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.base.Status status = 1; + inline bool has_status() const; + inline void clear_status(); + static const int kStatusFieldNumber = 1; + inline const ::rsctrl::base::Status& status() const; + inline ::rsctrl::base::Status* mutable_status(); + inline ::rsctrl::base::Status* release_status(); + + // repeated .rsctrl.base.Person peers = 2; + inline int peers_size() const; + inline void clear_peers(); + static const int kPeersFieldNumber = 2; + inline const ::rsctrl::base::Person& peers(int index) const; + inline ::rsctrl::base::Person* mutable_peers(int index); + inline ::rsctrl::base::Person* add_peers(); + inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >& + peers() const; + inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >* + mutable_peers(); + + // @@protoc_insertion_point(class_scope:rsctrl.peers.ResponseModifyPeer) + private: + inline void set_has_status(); + inline void clear_has_status(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::base::Status* status_; + ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person > peers_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_peers_2eproto(); + friend void protobuf_AssignDesc_peers_2eproto(); + friend void protobuf_ShutdownFile_peers_2eproto(); + + void InitAsDefaultInstance(); + static ResponseModifyPeer* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// RequestPeers + +// required .rsctrl.peers.RequestPeers.SetOption set = 1; +inline bool RequestPeers::has_set() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestPeers::set_has_set() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestPeers::clear_has_set() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestPeers::clear_set() { + set_ = 1; + clear_has_set(); +} +inline ::rsctrl::peers::RequestPeers_SetOption RequestPeers::set() const { + return static_cast< ::rsctrl::peers::RequestPeers_SetOption >(set_); +} +inline void RequestPeers::set_set(::rsctrl::peers::RequestPeers_SetOption value) { + GOOGLE_DCHECK(::rsctrl::peers::RequestPeers_SetOption_IsValid(value)); + set_has_set(); + set_ = value; +} + +// required .rsctrl.peers.RequestPeers.InfoOption info = 2; +inline bool RequestPeers::has_info() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void RequestPeers::set_has_info() { + _has_bits_[0] |= 0x00000002u; +} +inline void RequestPeers::clear_has_info() { + _has_bits_[0] &= ~0x00000002u; +} +inline void RequestPeers::clear_info() { + info_ = 1; + clear_has_info(); +} +inline ::rsctrl::peers::RequestPeers_InfoOption RequestPeers::info() const { + return static_cast< ::rsctrl::peers::RequestPeers_InfoOption >(info_); +} +inline void RequestPeers::set_info(::rsctrl::peers::RequestPeers_InfoOption value) { + GOOGLE_DCHECK(::rsctrl::peers::RequestPeers_InfoOption_IsValid(value)); + set_has_info(); + info_ = value; +} + +// repeated string gpg_ids = 3; +inline int RequestPeers::gpg_ids_size() const { + return gpg_ids_.size(); +} +inline void RequestPeers::clear_gpg_ids() { + gpg_ids_.Clear(); +} +inline const ::std::string& RequestPeers::gpg_ids(int index) const { + return gpg_ids_.Get(index); +} +inline ::std::string* RequestPeers::mutable_gpg_ids(int index) { + return gpg_ids_.Mutable(index); +} +inline void RequestPeers::set_gpg_ids(int index, const ::std::string& value) { + gpg_ids_.Mutable(index)->assign(value); +} +inline void RequestPeers::set_gpg_ids(int index, const char* value) { + gpg_ids_.Mutable(index)->assign(value); +} +inline void RequestPeers::set_gpg_ids(int index, const char* value, size_t size) { + gpg_ids_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* RequestPeers::add_gpg_ids() { + return gpg_ids_.Add(); +} +inline void RequestPeers::add_gpg_ids(const ::std::string& value) { + gpg_ids_.Add()->assign(value); +} +inline void RequestPeers::add_gpg_ids(const char* value) { + gpg_ids_.Add()->assign(value); +} +inline void RequestPeers::add_gpg_ids(const char* value, size_t size) { + gpg_ids_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +RequestPeers::gpg_ids() const { + return gpg_ids_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +RequestPeers::mutable_gpg_ids() { + return &gpg_ids_; +} + +// ------------------------------------------------------------------- + +// ResponsePeerList + +// required .rsctrl.base.Status status = 1; +inline bool ResponsePeerList::has_status() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ResponsePeerList::set_has_status() { + _has_bits_[0] |= 0x00000001u; +} +inline void ResponsePeerList::clear_has_status() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ResponsePeerList::clear_status() { + if (status_ != NULL) status_->::rsctrl::base::Status::Clear(); + clear_has_status(); +} +inline const ::rsctrl::base::Status& ResponsePeerList::status() const { + return status_ != NULL ? *status_ : *default_instance_->status_; +} +inline ::rsctrl::base::Status* ResponsePeerList::mutable_status() { + set_has_status(); + if (status_ == NULL) status_ = new ::rsctrl::base::Status; + return status_; +} +inline ::rsctrl::base::Status* ResponsePeerList::release_status() { + clear_has_status(); + ::rsctrl::base::Status* temp = status_; + status_ = NULL; + return temp; +} + +// repeated .rsctrl.base.Person peers = 2; +inline int ResponsePeerList::peers_size() const { + return peers_.size(); +} +inline void ResponsePeerList::clear_peers() { + peers_.Clear(); +} +inline const ::rsctrl::base::Person& ResponsePeerList::peers(int index) const { + return peers_.Get(index); +} +inline ::rsctrl::base::Person* ResponsePeerList::mutable_peers(int index) { + return peers_.Mutable(index); +} +inline ::rsctrl::base::Person* ResponsePeerList::add_peers() { + return peers_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >& +ResponsePeerList::peers() const { + return peers_; +} +inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >* +ResponsePeerList::mutable_peers() { + return &peers_; +} + +// ------------------------------------------------------------------- + +// RequestAddPeer + +// required string gpg_id = 1; +inline bool RequestAddPeer::has_gpg_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestAddPeer::set_has_gpg_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestAddPeer::clear_has_gpg_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestAddPeer::clear_gpg_id() { + if (gpg_id_ != &::google::protobuf::internal::kEmptyString) { + gpg_id_->clear(); + } + clear_has_gpg_id(); +} +inline const ::std::string& RequestAddPeer::gpg_id() const { + return *gpg_id_; +} +inline void RequestAddPeer::set_gpg_id(const ::std::string& value) { + set_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + gpg_id_ = new ::std::string; + } + gpg_id_->assign(value); +} +inline void RequestAddPeer::set_gpg_id(const char* value) { + set_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + gpg_id_ = new ::std::string; + } + gpg_id_->assign(value); +} +inline void RequestAddPeer::set_gpg_id(const char* value, size_t size) { + set_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + gpg_id_ = new ::std::string; + } + gpg_id_->assign(reinterpret_cast(value), size); +} +inline ::std::string* RequestAddPeer::mutable_gpg_id() { + set_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + gpg_id_ = new ::std::string; + } + return gpg_id_; +} +inline ::std::string* RequestAddPeer::release_gpg_id() { + clear_has_gpg_id(); + if (gpg_id_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = gpg_id_; + gpg_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; +inline bool RequestAddPeer::has_cmd() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void RequestAddPeer::set_has_cmd() { + _has_bits_[0] |= 0x00000002u; +} +inline void RequestAddPeer::clear_has_cmd() { + _has_bits_[0] &= ~0x00000002u; +} +inline void RequestAddPeer::clear_cmd() { + cmd_ = 0; + clear_has_cmd(); +} +inline ::rsctrl::peers::RequestAddPeer_AddCmd RequestAddPeer::cmd() const { + return static_cast< ::rsctrl::peers::RequestAddPeer_AddCmd >(cmd_); +} +inline void RequestAddPeer::set_cmd(::rsctrl::peers::RequestAddPeer_AddCmd value) { + GOOGLE_DCHECK(::rsctrl::peers::RequestAddPeer_AddCmd_IsValid(value)); + set_has_cmd(); + cmd_ = value; +} + +// optional string cert = 3; +inline bool RequestAddPeer::has_cert() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void RequestAddPeer::set_has_cert() { + _has_bits_[0] |= 0x00000004u; +} +inline void RequestAddPeer::clear_has_cert() { + _has_bits_[0] &= ~0x00000004u; +} +inline void RequestAddPeer::clear_cert() { + if (cert_ != &::google::protobuf::internal::kEmptyString) { + cert_->clear(); + } + clear_has_cert(); +} +inline const ::std::string& RequestAddPeer::cert() const { + return *cert_; +} +inline void RequestAddPeer::set_cert(const ::std::string& value) { + set_has_cert(); + if (cert_ == &::google::protobuf::internal::kEmptyString) { + cert_ = new ::std::string; + } + cert_->assign(value); +} +inline void RequestAddPeer::set_cert(const char* value) { + set_has_cert(); + if (cert_ == &::google::protobuf::internal::kEmptyString) { + cert_ = new ::std::string; + } + cert_->assign(value); +} +inline void RequestAddPeer::set_cert(const char* value, size_t size) { + set_has_cert(); + if (cert_ == &::google::protobuf::internal::kEmptyString) { + cert_ = new ::std::string; + } + cert_->assign(reinterpret_cast(value), size); +} +inline ::std::string* RequestAddPeer::mutable_cert() { + set_has_cert(); + if (cert_ == &::google::protobuf::internal::kEmptyString) { + cert_ = new ::std::string; + } + return cert_; +} +inline ::std::string* RequestAddPeer::release_cert() { + clear_has_cert(); + if (cert_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = cert_; + cert_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// ------------------------------------------------------------------- + +// ResponseAddPeer + +// required .rsctrl.base.Status status = 1; +inline bool ResponseAddPeer::has_status() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ResponseAddPeer::set_has_status() { + _has_bits_[0] |= 0x00000001u; +} +inline void ResponseAddPeer::clear_has_status() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ResponseAddPeer::clear_status() { + if (status_ != NULL) status_->::rsctrl::base::Status::Clear(); + clear_has_status(); +} +inline const ::rsctrl::base::Status& ResponseAddPeer::status() const { + return status_ != NULL ? *status_ : *default_instance_->status_; +} +inline ::rsctrl::base::Status* ResponseAddPeer::mutable_status() { + set_has_status(); + if (status_ == NULL) status_ = new ::rsctrl::base::Status; + return status_; +} +inline ::rsctrl::base::Status* ResponseAddPeer::release_status() { + clear_has_status(); + ::rsctrl::base::Status* temp = status_; + status_ = NULL; + return temp; +} + +// repeated .rsctrl.base.Person peers = 2; +inline int ResponseAddPeer::peers_size() const { + return peers_.size(); +} +inline void ResponseAddPeer::clear_peers() { + peers_.Clear(); +} +inline const ::rsctrl::base::Person& ResponseAddPeer::peers(int index) const { + return peers_.Get(index); +} +inline ::rsctrl::base::Person* ResponseAddPeer::mutable_peers(int index) { + return peers_.Mutable(index); +} +inline ::rsctrl::base::Person* ResponseAddPeer::add_peers() { + return peers_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >& +ResponseAddPeer::peers() const { + return peers_; +} +inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >* +ResponseAddPeer::mutable_peers() { + return &peers_; +} + +// ------------------------------------------------------------------- + +// RequestModifyPeer + +// required .rsctrl.peers.RequestModifyPeer.ModCmd cmd = 1; +inline bool RequestModifyPeer::has_cmd() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestModifyPeer::set_has_cmd() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestModifyPeer::clear_has_cmd() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestModifyPeer::clear_cmd() { + cmd_ = 0; + clear_has_cmd(); +} +inline ::rsctrl::peers::RequestModifyPeer_ModCmd RequestModifyPeer::cmd() const { + return static_cast< ::rsctrl::peers::RequestModifyPeer_ModCmd >(cmd_); +} +inline void RequestModifyPeer::set_cmd(::rsctrl::peers::RequestModifyPeer_ModCmd value) { + GOOGLE_DCHECK(::rsctrl::peers::RequestModifyPeer_ModCmd_IsValid(value)); + set_has_cmd(); + cmd_ = value; +} + +// repeated .rsctrl.base.Person peers = 2; +inline int RequestModifyPeer::peers_size() const { + return peers_.size(); +} +inline void RequestModifyPeer::clear_peers() { + peers_.Clear(); +} +inline const ::rsctrl::base::Person& RequestModifyPeer::peers(int index) const { + return peers_.Get(index); +} +inline ::rsctrl::base::Person* RequestModifyPeer::mutable_peers(int index) { + return peers_.Mutable(index); +} +inline ::rsctrl::base::Person* RequestModifyPeer::add_peers() { + return peers_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >& +RequestModifyPeer::peers() const { + return peers_; +} +inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >* +RequestModifyPeer::mutable_peers() { + return &peers_; +} + +// ------------------------------------------------------------------- + +// ResponseModifyPeer + +// required .rsctrl.base.Status status = 1; +inline bool ResponseModifyPeer::has_status() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ResponseModifyPeer::set_has_status() { + _has_bits_[0] |= 0x00000001u; +} +inline void ResponseModifyPeer::clear_has_status() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ResponseModifyPeer::clear_status() { + if (status_ != NULL) status_->::rsctrl::base::Status::Clear(); + clear_has_status(); +} +inline const ::rsctrl::base::Status& ResponseModifyPeer::status() const { + return status_ != NULL ? *status_ : *default_instance_->status_; +} +inline ::rsctrl::base::Status* ResponseModifyPeer::mutable_status() { + set_has_status(); + if (status_ == NULL) status_ = new ::rsctrl::base::Status; + return status_; +} +inline ::rsctrl::base::Status* ResponseModifyPeer::release_status() { + clear_has_status(); + ::rsctrl::base::Status* temp = status_; + status_ = NULL; + return temp; +} + +// repeated .rsctrl.base.Person peers = 2; +inline int ResponseModifyPeer::peers_size() const { + return peers_.size(); +} +inline void ResponseModifyPeer::clear_peers() { + peers_.Clear(); +} +inline const ::rsctrl::base::Person& ResponseModifyPeer::peers(int index) const { + return peers_.Get(index); +} +inline ::rsctrl::base::Person* ResponseModifyPeer::mutable_peers(int index) { + return peers_.Mutable(index); +} +inline ::rsctrl::base::Person* ResponseModifyPeer::add_peers() { + return peers_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >& +ResponseModifyPeer::peers() const { + return peers_; +} +inline ::google::protobuf::RepeatedPtrField< ::rsctrl::base::Person >* +ResponseModifyPeer::mutable_peers() { + return &peers_; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace peers +} // namespace rsctrl + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::peers::RequestPeers_SetOption>() { + return ::rsctrl::peers::RequestPeers_SetOption_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::peers::RequestPeers_InfoOption>() { + return ::rsctrl::peers::RequestPeers_InfoOption_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::peers::RequestAddPeer_AddCmd>() { + return ::rsctrl::peers::RequestAddPeer_AddCmd_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::peers::RequestModifyPeer_ModCmd>() { + return ::rsctrl::peers::RequestModifyPeer_ModCmd_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::peers::ExtensionId>() { + return rsctrl::peers::ExtensionId_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::peers::PackageId>() { + return rsctrl::peers::PackageId_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::peers::RequestMsgIds>() { + return rsctrl::peers::RequestMsgIds_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::peers::ResponseMsgIds>() { + return rsctrl::peers::ResponseMsgIds_descriptor(); +} + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_peers_2eproto__INCLUDED diff --git a/retroshare-nogui/src/rpc/proto/rpcprotopeers.cc b/retroshare-nogui/src/rpc/proto/rpcprotopeers.cc new file mode 100644 index 000000000..7f4e07838 --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/rpcprotopeers.cc @@ -0,0 +1,255 @@ +/* + * RetroShare External Interface. + * + * Copyright 2012-2012 by Robert Fernie. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License Version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + * Please report all bugs and problems to "retroshare@lunamutt.com". + * + */ + +#include "rpc/proto/rpcprotopeers.h" +#include "rpc/proto/gencc/peers.pb.h" + +#include +#include +#include + +RpcProtoPeers::RpcProtoPeers(uint32_t serviceId) + :RpcQueueService(serviceId) +{ + return; +} + +//RpcProtoPeers::msgsAccepted(std::list &msgIds); /* not used at the moment */ + +int RpcProtoPeers::processMsg(uint32_t msg_id, uint32_t req_id, const std::string &msg) +{ + /* check the msgId */ + uint8_t topbyte = 0; + uint8_t service = 0; + uint8_t submsg = 0; + + std::cerr << "RpcProtoPeers::processMsg() topbyte: " << topbyte; + std::cerr << " service: " << service << " submsg: " << submsg; + std::cerr << std::endl; + + if (service != (uint8_t) rsctrl::peers::BASE) + { + std::cerr << "RpcProtoPeers::processMsg() Service Mismatch - not processing"; + std::cerr << std::endl; + return 0; + } + + if (!rsctrl::peers::RequestMsgIds_IsValid(submsg)) + { + std::cerr << "RpcProtoPeers::processMsg() SubMsg Mismatch - not processing"; + std::cerr << std::endl; + return 0; + } + + switch(submsg) + { + case rsctrl::peers::MsgId_RequestPeers: + processRequestPeers(msg_id, req_id, msg); + break; + case rsctrl::peers::MsgId_RequestAddPeer: + processAddPeer(msg_id, req_id, msg); + break; + case rsctrl::peers::MsgId_RequestModifyPeer: + processModifyPeer(msg_id, req_id, msg); + break; + default: + std::cerr << "RpcProtoPeers::processMsg() ERROR should never get here"; + std::cerr << std::endl; + return 0; + } + + /* must have matched id to get here */ + return 1; +} + + +int RpcProtoPeers::processAddPeer(uint32_t msg_id, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoPeers::processAddPeer() NOT FINISHED"; + std::cerr << std::endl; + + return 0; +} + + +int RpcProtoPeers::processModifyPeer(uint32_t msg_id, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoPeers::processModifyPeer() NOT FINISHED"; + std::cerr << std::endl; + + return 0; +} + + + +int RpcProtoPeers::processRequestPeers(uint32_t msg_id, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoPeers::processRequestPeers()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::peers::RequestPeers reqp; + if (!reqp.ParseFromString(msg)) + { + std::cerr << "RpcProtoPeers::processRequestPeers() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // Get the list of gpg_id to generate data for. + std::list ids; + bool onlyOnline = false; + switch(reqp.set()) + { + case rsctrl::peers::RequestPeers::OWNID: + { + std::string own_id = rsPeers->getGPGOwnId(); + ids.push_back(own_id); + break; + } + case rsctrl::peers::RequestPeers::LISTED: + { + /* extract ids from request (TODO) */ + std::string own_id = rsPeers->getGPGOwnId(); + ids.push_back(own_id); + break; + + } + case rsctrl::peers::RequestPeers::ALL: + rsPeers->getGPGAllList(ids); + break; + case rsctrl::peers::RequestPeers::ONLINE: + { + /* this ones a bit hard too */ + onlyOnline = true; + std::list ssl_ids; + std::list::const_iterator sit; + rsPeers->getOnlineList(ssl_ids); + for(sit = ssl_ids.begin(); sit != ssl_ids.end(); sit++) + { + std::string gpg_id = rsPeers->getGPGId(*sit); + if (gpg_id.size() > 0) + { + if (std::find(ids.begin(), ids.end(),gpg_id) == ids.end()) + { + ids.push_back(gpg_id); + } + } + } + break; + } + case rsctrl::peers::RequestPeers::FRIENDS: + rsPeers->getGPGAcceptedList(ids); + break; + case rsctrl::peers::RequestPeers::SIGNED: + rsPeers->getGPGSignedList(ids); + break; + case rsctrl::peers::RequestPeers::VALID: + rsPeers->getGPGSignedList(ids); + break; + } + + + // work out what data we need to request. + bool getLocations = false; + switch(reqp.info()) + { + default: + case rsctrl::peers::RequestPeers::NAMEONLY: + case rsctrl::peers::RequestPeers::BASIC: + break; + case rsctrl::peers::RequestPeers::LOCATION: + case rsctrl::peers::RequestPeers::ALLINFO: + getLocations = true; + break; + } + + // response. + rsctrl::peers::ResponsePeerList respp; + + /* now iterate through the peers and fill in the response. */ + std::list::const_iterator git; + for(git = ids.begin(); git != ids.end(); git++) + { + + RsPeerDetails details; + if (!rsPeers->getGPGDetails(*git, details)) + { + continue; /* uhm.. */ + } + + rsctrl::base::Person *person = respp.add_peers(); + + + /* fill in key gpg details */ + + + + + if (getLocations) + { + std::list ssl_ids; + std::list::const_iterator sit; + + if (!rsPeers->getAssociatedSSLIds(*git, ssl_ids)) + { + continue; /* end of this peer */ + } + + for(sit = ssl_ids.begin(); sit != ssl_ids.end(); sit++) + { + RsPeerDetails ssldetails; + if (!rsPeers->getPeerDetails(*sit, ssldetails)) + { + continue; /* uhm.. */ + } + + rsctrl::base::Location *loc = person->add_locations(); + + /* fill in ssl details */ + } + } + } + + + std::string outmsg; + if (!respp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoPeers::processRequestPeers() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = create_msg_id( + rsctrl::peers::BASE, + rsctrl::peers::MsgId_ResponsePeerList); + + // queue it. + queueResponse(out_msg_id, req_id, outmsg); +} + + + + + diff --git a/retroshare-nogui/src/rpc/proto/rpcprotopeers.h b/retroshare-nogui/src/rpc/proto/rpcprotopeers.h new file mode 100644 index 000000000..d9dd2ef1d --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/rpcprotopeers.h @@ -0,0 +1,43 @@ +/* + * RetroShare External Interface. + * + * Copyright 2012-2012 by Robert Fernie. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License Version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + * Please report all bugs and problems to "retroshare@lunamutt.com". + * + */ + + +#ifndef RS_RPC_PROTO_PEERS_H +#define RS_RPC_PROTO_PEERS_H + +#include "rpc/rpcserver.h" + +class RpcProtoPeers: RpcQueueService +{ +public: + RpcProtoPeers(uint32_t serviceId); +// virtual msgsAccepted(std::list &msgIds); /* not used at the moment */ + virtual int processMsg(uint32_t msgId, uint32_t req_id, const std::string &msg); + + virtual int processRequestPeers(uint32_t msg_id, uint32_t req_id, const std::string &msg); + virtual int processAddPeer(uint32_t msg_id, uint32_t req_id, const std::string &msg); + virtual int processModifyPeer(uint32_t msg_id, uint32_t req_id, const std::string &msg); +}; + + +#endif /* RS_PROTO_PEERS_H */