diff --git a/retroshare-nogui/src/rpc/proto/gencc/core.pb.cc b/retroshare-nogui/src/rpc/proto/gencc/core.pb.cc index 060ad0993..4fdc68e0c 100644 --- a/retroshare-nogui/src/rpc/proto/gencc/core.pb.cc +++ b/retroshare-nogui/src/rpc/proto/gencc/core.pb.cc @@ -39,6 +39,9 @@ const ::google::protobuf::internal::GeneratedMessageReflection* const ::google::protobuf::Descriptor* Dir_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* Dir_reflection_ = NULL; +const ::google::protobuf::Descriptor* Timestamp_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Timestamp_reflection_ = NULL; const ::google::protobuf::Descriptor* SystemStatus_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* SystemStatus_reflection_ = NULL; @@ -168,7 +171,23 @@ void protobuf_AssignDesc_core_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(Dir)); - SystemStatus_descriptor_ = file->message_type(6); + Timestamp_descriptor_ = file->message_type(6); + static const int Timestamp_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Timestamp, secs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Timestamp, microsecs_), + }; + Timestamp_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Timestamp_descriptor_, + Timestamp::default_instance_, + Timestamp_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Timestamp, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Timestamp, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Timestamp)); + SystemStatus_descriptor_ = file->message_type(7); static const int SystemStatus_offsets_[2] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SystemStatus, net_status_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SystemStatus, msg_), @@ -185,7 +204,7 @@ void protobuf_AssignDesc_core_2eproto() { ::google::protobuf::MessageFactory::generated_factory(), sizeof(SystemStatus)); SystemStatus_NetCode_descriptor_ = SystemStatus_descriptor_->enum_type(0); - Bandwidth_descriptor_ = file->message_type(7); + Bandwidth_descriptor_ = file->message_type(8); static const int Bandwidth_offsets_[3] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bandwidth, up_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bandwidth, down_), @@ -202,7 +221,7 @@ void protobuf_AssignDesc_core_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(Bandwidth)); - BandwidthSet_descriptor_ = file->message_type(8); + BandwidthSet_descriptor_ = file->message_type(9); static const int BandwidthSet_offsets_[1] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BandwidthSet, bandwidths_), }; @@ -243,6 +262,8 @@ void protobuf_RegisterTypes(const ::std::string&) { File_descriptor_, &File::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( Dir_descriptor_, &Dir::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Timestamp_descriptor_, &Timestamp::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( SystemStatus_descriptor_, &SystemStatus::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( @@ -266,6 +287,8 @@ void protobuf_ShutdownFile_core_2eproto() { delete File_reflection_; delete Dir::default_instance_; delete Dir_reflection_; + delete Timestamp::default_instance_; + delete Timestamp_reflection_; delete SystemStatus::default_instance_; delete SystemStatus_reflection_; delete Bandwidth::default_instance_; @@ -302,18 +325,20 @@ void protobuf_AddDesc_core_2eproto() { "(\t\022\014\n\004size\030\003 \002(\004\"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.co" "re.Dir\022 \n\005files\030\004 \003(\0132\021.rsctrl.core.File" - "\"\372\001\n\014SystemStatus\0225\n\nnet_status\030\001 \002(\0162!." - "rsctrl.core.SystemStatus.NetCode\022\013\n\003msg\030" - "\002 \001(\t\"\245\001\n\007NetCode\022\017\n\013BAD_UNKNOWN\020\000\022\017\n\013BA" - "D_OFFLINE\020\001\022\016\n\nBAD_NATSYM\020\002\022\021\n\rBAD_NODHT" - "_NAT\020\003\022\023\n\017WARNING_RESTART\020\004\022\022\n\016WARNING_N" - "ATTED\020\005\022\021\n\rWARNING_NODHT\020\006\022\010\n\004GOOD\020\007\022\017\n\013" - "ADV_FORWARD\020\010\"3\n\tBandwidth\022\n\n\002up\030\001 \002(\002\022\014" - "\n\004down\030\002 \002(\002\022\014\n\004name\030\003 \001(\t\":\n\014BandwidthS" - "et\022*\n\nbandwidths\030\001 \003(\0132\026.rsctrl.core.Ban" - "dwidth*\027\n\013ExtensionId\022\010\n\004CORE\020\000*M\n\tPacka" - "geId\022\t\n\005PEERS\020\001\022\n\n\006SYSTEM\020\002\022\010\n\004CHAT\020\003\022\n\n" - "\006SEARCH\020\004\022\t\n\005FILES\020\005\022\010\n\003GXS\020\350\007", 1310); + "\",\n\tTimestamp\022\014\n\004secs\030\001 \002(\004\022\021\n\tmicrosecs" + "\030\002 \002(\r\"\372\001\n\014SystemStatus\0225\n\nnet_status\030\001 " + "\002(\0162!.rsctrl.core.SystemStatus.NetCode\022\013" + "\n\003msg\030\002 \001(\t\"\245\001\n\007NetCode\022\017\n\013BAD_UNKNOWN\020\000" + "\022\017\n\013BAD_OFFLINE\020\001\022\016\n\nBAD_NATSYM\020\002\022\021\n\rBAD" + "_NODHT_NAT\020\003\022\023\n\017WARNING_RESTART\020\004\022\022\n\016WAR" + "NING_NATTED\020\005\022\021\n\rWARNING_NODHT\020\006\022\010\n\004GOOD" + "\020\007\022\017\n\013ADV_FORWARD\020\010\"3\n\tBandwidth\022\n\n\002up\030\001" + " \002(\002\022\014\n\004down\030\002 \002(\002\022\014\n\004name\030\003 \001(\t\":\n\014Band" + "widthSet\022*\n\nbandwidths\030\001 \003(\0132\026.rsctrl.co" + "re.Bandwidth*\027\n\013ExtensionId\022\010\n\004CORE\020\000*Y\n" + "\tPackageId\022\t\n\005PEERS\020\001\022\n\n\006SYSTEM\020\002\022\010\n\004CHA" + "T\020\003\022\n\n\006SEARCH\020\004\022\t\n\005FILES\020\005\022\n\n\006STREAM\020\006\022\010" + "\n\003GXS\020\350\007", 1368); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "core.proto", &protobuf_RegisterTypes); Status::default_instance_ = new Status(); @@ -322,6 +347,7 @@ void protobuf_AddDesc_core_2eproto() { Person::default_instance_ = new Person(); File::default_instance_ = new File(); Dir::default_instance_ = new Dir(); + Timestamp::default_instance_ = new Timestamp(); SystemStatus::default_instance_ = new SystemStatus(); Bandwidth::default_instance_ = new Bandwidth(); BandwidthSet::default_instance_ = new BandwidthSet(); @@ -331,6 +357,7 @@ void protobuf_AddDesc_core_2eproto() { Person::default_instance_->InitAsDefaultInstance(); File::default_instance_->InitAsDefaultInstance(); Dir::default_instance_->InitAsDefaultInstance(); + Timestamp::default_instance_->InitAsDefaultInstance(); SystemStatus::default_instance_->InitAsDefaultInstance(); Bandwidth::default_instance_->InitAsDefaultInstance(); BandwidthSet::default_instance_->InitAsDefaultInstance(); @@ -368,6 +395,7 @@ bool PackageId_IsValid(int value) { case 3: case 4: case 5: + case 6: case 1000: return true; default: @@ -2470,6 +2498,254 @@ void Dir::Swap(Dir* other) { } +// =================================================================== + +#ifndef _MSC_VER +const int Timestamp::kSecsFieldNumber; +const int Timestamp::kMicrosecsFieldNumber; +#endif // !_MSC_VER + +Timestamp::Timestamp() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void Timestamp::InitAsDefaultInstance() { +} + +Timestamp::Timestamp(const Timestamp& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void Timestamp::SharedCtor() { + _cached_size_ = 0; + secs_ = GOOGLE_ULONGLONG(0); + microsecs_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Timestamp::~Timestamp() { + SharedDtor(); +} + +void Timestamp::SharedDtor() { + if (this != default_instance_) { + } +} + +void Timestamp::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Timestamp::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Timestamp_descriptor_; +} + +const Timestamp& Timestamp::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_core_2eproto(); return *default_instance_; +} + +Timestamp* Timestamp::default_instance_ = NULL; + +Timestamp* Timestamp::New() const { + return new Timestamp; +} + +void Timestamp::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + secs_ = GOOGLE_ULONGLONG(0); + microsecs_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Timestamp::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required uint64 secs = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &secs_))); + set_has_secs(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_microsecs; + break; + } + + // required uint32 microsecs = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_microsecs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, µsecs_))); + set_has_microsecs(); + } 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 Timestamp::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint64 secs = 1; + if (has_secs()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->secs(), output); + } + + // required uint32 microsecs = 2; + if (has_microsecs()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->microsecs(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* Timestamp::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required uint64 secs = 1; + if (has_secs()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->secs(), target); + } + + // required uint32 microsecs = 2; + if (has_microsecs()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->microsecs(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int Timestamp::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint64 secs = 1; + if (has_secs()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->secs()); + } + + // required uint32 microsecs = 2; + if (has_microsecs()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->microsecs()); + } + + } + 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 Timestamp::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Timestamp* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Timestamp::MergeFrom(const Timestamp& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_secs()) { + set_secs(from.secs()); + } + if (from.has_microsecs()) { + set_microsecs(from.microsecs()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Timestamp::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Timestamp::CopyFrom(const Timestamp& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Timestamp::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void Timestamp::Swap(Timestamp* other) { + if (other != this) { + std::swap(secs_, other->secs_); + std::swap(microsecs_, other->microsecs_); + 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 Timestamp::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Timestamp_descriptor_; + metadata.reflection = Timestamp_reflection_; + return metadata; +} + + // =================================================================== const ::google::protobuf::EnumDescriptor* SystemStatus_NetCode_descriptor() { diff --git a/retroshare-nogui/src/rpc/proto/gencc/core.pb.h b/retroshare-nogui/src/rpc/proto/gencc/core.pb.h index 8b319a2d3..9f6871fa1 100644 --- a/retroshare-nogui/src/rpc/proto/gencc/core.pb.h +++ b/retroshare-nogui/src/rpc/proto/gencc/core.pb.h @@ -39,6 +39,7 @@ class Location; class Person; class File; class Dir; +class Timestamp; class SystemStatus; class Bandwidth; class BandwidthSet; @@ -158,6 +159,7 @@ enum PackageId { CHAT = 3, SEARCH = 4, FILES = 5, + STREAM = 6, GXS = 1000 }; bool PackageId_IsValid(int value); @@ -940,6 +942,98 @@ class Dir : public ::google::protobuf::Message { }; // ------------------------------------------------------------------- +class Timestamp : public ::google::protobuf::Message { + public: + Timestamp(); + virtual ~Timestamp(); + + Timestamp(const Timestamp& from); + + inline Timestamp& operator=(const Timestamp& 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 Timestamp& default_instance(); + + void Swap(Timestamp* other); + + // implements Message ---------------------------------------------- + + Timestamp* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Timestamp& from); + void MergeFrom(const Timestamp& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint64 secs = 1; + inline bool has_secs() const; + inline void clear_secs(); + static const int kSecsFieldNumber = 1; + inline ::google::protobuf::uint64 secs() const; + inline void set_secs(::google::protobuf::uint64 value); + + // required uint32 microsecs = 2; + inline bool has_microsecs() const; + inline void clear_microsecs(); + static const int kMicrosecsFieldNumber = 2; + inline ::google::protobuf::uint32 microsecs() const; + inline void set_microsecs(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:rsctrl.core.Timestamp) + private: + inline void set_has_secs(); + inline void clear_has_secs(); + inline void set_has_microsecs(); + inline void clear_has_microsecs(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint64 secs_; + ::google::protobuf::uint32 microsecs_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_core_2eproto(); + friend void protobuf_AssignDesc_core_2eproto(); + friend void protobuf_ShutdownFile_core_2eproto(); + + void InitAsDefaultInstance(); + static Timestamp* default_instance_; +}; +// ------------------------------------------------------------------- + class SystemStatus : public ::google::protobuf::Message { public: SystemStatus(); @@ -2110,6 +2204,54 @@ Dir::mutable_files() { // ------------------------------------------------------------------- +// Timestamp + +// required uint64 secs = 1; +inline bool Timestamp::has_secs() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Timestamp::set_has_secs() { + _has_bits_[0] |= 0x00000001u; +} +inline void Timestamp::clear_has_secs() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Timestamp::clear_secs() { + secs_ = GOOGLE_ULONGLONG(0); + clear_has_secs(); +} +inline ::google::protobuf::uint64 Timestamp::secs() const { + return secs_; +} +inline void Timestamp::set_secs(::google::protobuf::uint64 value) { + set_has_secs(); + secs_ = value; +} + +// required uint32 microsecs = 2; +inline bool Timestamp::has_microsecs() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Timestamp::set_has_microsecs() { + _has_bits_[0] |= 0x00000002u; +} +inline void Timestamp::clear_has_microsecs() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Timestamp::clear_microsecs() { + microsecs_ = 0u; + clear_has_microsecs(); +} +inline ::google::protobuf::uint32 Timestamp::microsecs() const { + return microsecs_; +} +inline void Timestamp::set_microsecs(::google::protobuf::uint32 value) { + set_has_microsecs(); + microsecs_ = value; +} + +// ------------------------------------------------------------------- + // SystemStatus // required .rsctrl.core.SystemStatus.NetCode net_status = 1; diff --git a/retroshare-nogui/src/rpc/proto/gencc/peers.pb.cc b/retroshare-nogui/src/rpc/proto/gencc/peers.pb.cc index 948feed64..e2e559bd9 100644 --- a/retroshare-nogui/src/rpc/proto/gencc/peers.pb.cc +++ b/retroshare-nogui/src/rpc/proto/gencc/peers.pb.cc @@ -30,16 +30,14 @@ 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::Descriptor* RequestExaminePeer_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - ResponseAddPeer_reflection_ = NULL; + RequestExaminePeer_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestExaminePeer_ExamineCmd_descriptor_ = 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* RequestMsgIds_descriptor_ = NULL; const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor_ = NULL; @@ -56,7 +54,7 @@ void protobuf_AssignDesc_peers_2eproto() { 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_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestPeers, pgp_ids_), }; RequestPeers_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( @@ -89,9 +87,9 @@ void protobuf_AssignDesc_peers_2eproto() { 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_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestAddPeer, pgp_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestAddPeer, ssl_id_), }; RequestAddPeer_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( @@ -105,22 +103,24 @@ void protobuf_AssignDesc_peers_2eproto() { ::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_), + RequestExaminePeer_descriptor_ = file->message_type(3); + static const int RequestExaminePeer_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestExaminePeer, pgp_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestExaminePeer, cmd_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestExaminePeer, cert_), }; - ResponseAddPeer_reflection_ = + RequestExaminePeer_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_), + RequestExaminePeer_descriptor_, + RequestExaminePeer::default_instance_, + RequestExaminePeer_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestExaminePeer, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestExaminePeer, _unknown_fields_), -1, ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), - sizeof(ResponseAddPeer)); + sizeof(RequestExaminePeer)); + RequestExaminePeer_ExamineCmd_descriptor_ = RequestExaminePeer_descriptor_->enum_type(0); RequestModifyPeer_descriptor_ = file->message_type(4); static const int RequestModifyPeer_offsets_[2] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestModifyPeer, cmd_), @@ -138,22 +138,6 @@ void protobuf_AssignDesc_peers_2eproto() { ::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)); RequestMsgIds_descriptor_ = file->enum_type(0); ResponseMsgIds_descriptor_ = file->enum_type(1); } @@ -175,11 +159,9 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( RequestAddPeer_descriptor_, &RequestAddPeer::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ResponseAddPeer_descriptor_, &ResponseAddPeer::default_instance()); + RequestExaminePeer_descriptor_, &RequestExaminePeer::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( RequestModifyPeer_descriptor_, &RequestModifyPeer::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ResponseModifyPeer_descriptor_, &ResponseModifyPeer::default_instance()); } } // namespace @@ -191,12 +173,10 @@ void protobuf_ShutdownFile_peers_2eproto() { delete ResponsePeerList_reflection_; delete RequestAddPeer::default_instance_; delete RequestAddPeer_reflection_; - delete ResponseAddPeer::default_instance_; - delete ResponseAddPeer_reflection_; + delete RequestExaminePeer::default_instance_; + delete RequestExaminePeer_reflection_; delete RequestModifyPeer::default_instance_; delete RequestModifyPeer_reflection_; - delete ResponseModifyPeer::default_instance_; - delete ResponseModifyPeer_reflection_; } void protobuf_AddDesc_peers_2eproto() { @@ -211,45 +191,41 @@ void protobuf_AddDesc_peers_2eproto() { "\251\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\"^\n\tSetOption\022\t\n\005OWNID\020" + "\022\017\n\007pgp_ids\030\003 \003(\t\"^\n\tSetOption\022\t\n\005OWNID\020" "\001\022\n\n\006LISTED\020\002\022\r\n\tCONNECTED\020\003\022\013\n\007FRIENDS\020" "\004\022\t\n\005VALID\020\005\022\n\n\006SIGNED\020\006\022\007\n\003ALL\020\007\"@\n\nInf" "oOption\022\014\n\010NAMEONLY\020\001\022\t\n\005BASIC\020\002\022\014\n\010LOCA" "TION\020\003\022\013\n\007ALLINFO\020\004\"[\n\020ResponsePeerList\022" "#\n\006status\030\001 \002(\0132\023.rsctrl.core.Status\022\"\n\005" - "peers\030\002 \003(\0132\023.rsctrl.core.Person\"\242\001\n\016Req" - "uestAddPeer\022\016\n\006gpg_id\030\001 \002(\t\0220\n\003cmd\030\002 \002(\016" - "2#.rsctrl.peers.RequestAddPeer.AddCmd\022\014\n" - "\004cert\030\003 \001(\t\"@\n\006AddCmd\022\010\n\004NOOP\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.rsctr" - "l.core.Status\022\"\n\005peers\030\002 \003(\0132\023.rsctrl.co" - "re.Person\"\231\001\n\021RequestModifyPeer\0223\n\003cmd\030\001" - " \002(\0162&.rsctrl.peers.RequestModifyPeer.Mo" - "dCmd\022\"\n\005peers\030\002 \003(\0132\023.rsctrl.core.Person" - "\"+\n\006ModCmd\022\010\n\004NOOP\020\000\022\013\n\007ADDRESS\020\001\022\n\n\006DYN" - "DNS\020\002\"]\n\022ResponseModifyPeer\022#\n\006status\030\001 " - "\002(\0132\023.rsctrl.core.Status\022\"\n\005peers\030\002 \003(\0132" - "\023.rsctrl.core.Person*^\n\rRequestMsgIds\022\026\n" - "\022MsgId_RequestPeers\020\001\022\030\n\024MsgId_RequestAd" - "dPeer\020\002\022\033\n\027MsgId_RequestModifyPeer\020\003*e\n\016" + "peers\030\002 \003(\0132\023.rsctrl.core.Person\"\201\001\n\016Req" + "uestAddPeer\0220\n\003cmd\030\001 \002(\0162#.rsctrl.peers." + "RequestAddPeer.AddCmd\022\016\n\006pgp_id\030\002 \002(\t\022\016\n" + "\006ssl_id\030\003 \001(\t\"\035\n\006AddCmd\022\007\n\003ADD\020\001\022\n\n\006REMO" + "VE\020\002\"\223\001\n\022RequestExaminePeer\022\016\n\006pgp_id\030\001 " + "\002(\t\0228\n\003cmd\030\002 \002(\0162+.rsctrl.peers.RequestE" + "xaminePeer.ExamineCmd\022\014\n\004cert\030\003 \002(\t\"%\n\nE" + "xamineCmd\022\n\n\006IMPORT\020\003\022\013\n\007EXAMINE\020\004\"\231\001\n\021R" + "equestModifyPeer\0223\n\003cmd\030\001 \002(\0162&.rsctrl.p" + "eers.RequestModifyPeer.ModCmd\022\"\n\005peers\030\002" + " \003(\0132\023.rsctrl.core.Person\"+\n\006ModCmd\022\010\n\004N" + "OOP\020\000\022\013\n\007ADDRESS\020\001\022\n\n\006DYNDNS\020\002*|\n\rReques" + "tMsgIds\022\026\n\022MsgId_RequestPeers\020\001\022\030\n\024MsgId" + "_RequestAddPeer\020\002\022\034\n\030MsgId_RequestExamin" + "ePeer\020\003\022\033\n\027MsgId_RequestModifyPeer\020\004*,\n\016" "ResponseMsgIds\022\032\n\026MsgId_ResponsePeerList" - "\020\001\022\031\n\025MsgId_ResponseAddPeer\020\002\022\034\n\030MsgId_R" - "esponseModifyPeer\020\003", 1139); + "\020\001", 1042); ::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(); + RequestExaminePeer::default_instance_ = new RequestExaminePeer(); 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(); + RequestExaminePeer::default_instance_->InitAsDefaultInstance(); RequestModifyPeer::default_instance_->InitAsDefaultInstance(); - ResponseModifyPeer::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_peers_2eproto); } @@ -269,6 +245,7 @@ bool RequestMsgIds_IsValid(int value) { case 1: case 2: case 3: + case 4: return true; default: return false; @@ -282,8 +259,6 @@ const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor() { bool ResponseMsgIds_IsValid(int value) { switch(value) { case 1: - case 2: - case 3: return true; default: return false; @@ -352,7 +327,7 @@ const int RequestPeers::InfoOption_ARRAYSIZE; #ifndef _MSC_VER const int RequestPeers::kSetFieldNumber; const int RequestPeers::kInfoFieldNumber; -const int RequestPeers::kGpgIdsFieldNumber; +const int RequestPeers::kPgpIdsFieldNumber; #endif // !_MSC_VER RequestPeers::RequestPeers() @@ -410,7 +385,7 @@ void RequestPeers::Clear() { set_ = 1; info_ = 1; } - gpg_ids_.Clear(); + pgp_ids_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); } @@ -458,24 +433,24 @@ bool RequestPeers::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } - if (input->ExpectTag(26)) goto parse_gpg_ids; + if (input->ExpectTag(26)) goto parse_pgp_ids; break; } - // repeated string gpg_ids = 3; + // repeated string pgp_ids = 3; case 3: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_gpg_ids: + parse_pgp_ids: DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_gpg_ids())); + input, this->add_pgp_ids())); ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->gpg_ids(0).data(), this->gpg_ids(0).length(), + this->pgp_ids(0).data(), this->pgp_ids(0).length(), ::google::protobuf::internal::WireFormat::PARSE); } else { goto handle_uninterpreted; } - if (input->ExpectTag(26)) goto parse_gpg_ids; + if (input->ExpectTag(26)) goto parse_pgp_ids; if (input->ExpectAtEnd()) return true; break; } @@ -510,13 +485,13 @@ void RequestPeers::SerializeWithCachedSizes( 2, this->info(), output); } - // repeated string gpg_ids = 3; - for (int i = 0; i < this->gpg_ids_size(); i++) { + // repeated string pgp_ids = 3; + for (int i = 0; i < this->pgp_ids_size(); i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->gpg_ids(i).data(), this->gpg_ids(i).length(), + this->pgp_ids(i).data(), this->pgp_ids(i).length(), ::google::protobuf::internal::WireFormat::SERIALIZE); ::google::protobuf::internal::WireFormatLite::WriteString( - 3, this->gpg_ids(i), output); + 3, this->pgp_ids(i), output); } if (!unknown_fields().empty()) { @@ -539,13 +514,13 @@ void RequestPeers::SerializeWithCachedSizes( 2, this->info(), target); } - // repeated string gpg_ids = 3; - for (int i = 0; i < this->gpg_ids_size(); i++) { + // repeated string pgp_ids = 3; + for (int i = 0; i < this->pgp_ids_size(); i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->gpg_ids(i).data(), this->gpg_ids(i).length(), + this->pgp_ids(i).data(), this->pgp_ids(i).length(), ::google::protobuf::internal::WireFormat::SERIALIZE); target = ::google::protobuf::internal::WireFormatLite:: - WriteStringToArray(3, this->gpg_ids(i), target); + WriteStringToArray(3, this->pgp_ids(i), target); } if (!unknown_fields().empty()) { @@ -572,11 +547,11 @@ int RequestPeers::ByteSize() const { } } - // repeated string gpg_ids = 3; - total_size += 1 * this->gpg_ids_size(); - for (int i = 0; i < this->gpg_ids_size(); i++) { + // repeated string pgp_ids = 3; + total_size += 1 * this->pgp_ids_size(); + for (int i = 0; i < this->pgp_ids_size(); i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - this->gpg_ids(i)); + this->pgp_ids(i)); } if (!unknown_fields().empty()) { @@ -604,7 +579,7 @@ void RequestPeers::MergeFrom(const ::google::protobuf::Message& from) { void RequestPeers::MergeFrom(const RequestPeers& from) { GOOGLE_CHECK_NE(&from, this); - gpg_ids_.MergeFrom(from.gpg_ids_); + pgp_ids_.MergeFrom(from.pgp_ids_); if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { if (from.has_set()) { set_set(from.set()); @@ -638,7 +613,7 @@ void RequestPeers::Swap(RequestPeers* other) { if (other != this) { std::swap(set_, other->set_); std::swap(info_, other->info_); - gpg_ids_.Swap(&other->gpg_ids_); + pgp_ids_.Swap(&other->pgp_ids_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); @@ -921,11 +896,8 @@ const ::google::protobuf::EnumDescriptor* 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; @@ -933,19 +905,16 @@ bool RequestAddPeer_AddCmd_IsValid(int value) { } #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; +const int RequestAddPeer::kPgpIdFieldNumber; +const int RequestAddPeer::kSslIdFieldNumber; #endif // !_MSC_VER RequestAddPeer::RequestAddPeer() @@ -964,9 +933,9 @@ RequestAddPeer::RequestAddPeer(const RequestAddPeer& 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); + cmd_ = 1; + pgp_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ssl_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -975,11 +944,11 @@ RequestAddPeer::~RequestAddPeer() { } void RequestAddPeer::SharedDtor() { - if (gpg_id_ != &::google::protobuf::internal::kEmptyString) { - delete gpg_id_; + if (pgp_id_ != &::google::protobuf::internal::kEmptyString) { + delete pgp_id_; } - if (cert_ != &::google::protobuf::internal::kEmptyString) { - delete cert_; + if (ssl_id_ != &::google::protobuf::internal::kEmptyString) { + delete ssl_id_; } if (this != default_instance_) { } @@ -1007,15 +976,15 @@ RequestAddPeer* RequestAddPeer::New() const { 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_ = 1; + if (has_pgp_id()) { + if (pgp_id_ != &::google::protobuf::internal::kEmptyString) { + pgp_id_->clear(); } } - cmd_ = 0; - if (has_cert()) { - if (cert_ != &::google::protobuf::internal::kEmptyString) { - cert_->clear(); + if (has_ssl_id()) { + if (ssl_id_ != &::google::protobuf::internal::kEmptyString) { + ssl_id_->clear(); } } } @@ -1029,14 +998,363 @@ bool RequestAddPeer::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string gpg_id = 1; + // required .rsctrl.peers.RequestAddPeer.AddCmd 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::RequestAddPeer_AddCmd_IsValid(value)) { + set_cmd(static_cast< ::rsctrl::peers::RequestAddPeer_AddCmd >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_pgp_id; + break; + } + + // required string pgp_id = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_pgp_id: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_pgp_id())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->pgp_id().data(), this->pgp_id().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_ssl_id; + break; + } + + // optional string ssl_id = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_ssl_id: + 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->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 .rsctrl.peers.RequestAddPeer.AddCmd cmd = 1; + if (has_cmd()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->cmd(), output); + } + + // required string pgp_id = 2; + if (has_pgp_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->pgp_id().data(), this->pgp_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->pgp_id(), output); + } + + // optional string ssl_id = 3; + 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( + 3, this->ssl_id(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestAddPeer::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 1; + if (has_cmd()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->cmd(), target); + } + + // required string pgp_id = 2; + if (has_pgp_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->pgp_id().data(), this->pgp_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->pgp_id(), target); + } + + // optional string ssl_id = 3; + 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( + 3, this->ssl_id(), 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 .rsctrl.peers.RequestAddPeer.AddCmd cmd = 1; + if (has_cmd()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->cmd()); + } + + // required string pgp_id = 2; + if (has_pgp_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->pgp_id()); + } + + // optional string ssl_id = 3; + if (has_ssl_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->ssl_id()); + } + + } + 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_cmd()) { + set_cmd(from.cmd()); + } + if (from.has_pgp_id()) { + set_pgp_id(from.pgp_id()); + } + if (from.has_ssl_id()) { + set_ssl_id(from.ssl_id()); + } + } + 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(cmd_, other->cmd_); + std::swap(pgp_id_, other->pgp_id_); + std::swap(ssl_id_, other->ssl_id_); + 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; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* RequestExaminePeer_ExamineCmd_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestExaminePeer_ExamineCmd_descriptor_; +} +bool RequestExaminePeer_ExamineCmd_IsValid(int value) { + switch(value) { + case 3: + case 4: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const RequestExaminePeer_ExamineCmd RequestExaminePeer::IMPORT; +const RequestExaminePeer_ExamineCmd RequestExaminePeer::EXAMINE; +const RequestExaminePeer_ExamineCmd RequestExaminePeer::ExamineCmd_MIN; +const RequestExaminePeer_ExamineCmd RequestExaminePeer::ExamineCmd_MAX; +const int RequestExaminePeer::ExamineCmd_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int RequestExaminePeer::kPgpIdFieldNumber; +const int RequestExaminePeer::kCmdFieldNumber; +const int RequestExaminePeer::kCertFieldNumber; +#endif // !_MSC_VER + +RequestExaminePeer::RequestExaminePeer() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestExaminePeer::InitAsDefaultInstance() { +} + +RequestExaminePeer::RequestExaminePeer(const RequestExaminePeer& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestExaminePeer::SharedCtor() { + _cached_size_ = 0; + pgp_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + cmd_ = 3; + cert_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestExaminePeer::~RequestExaminePeer() { + SharedDtor(); +} + +void RequestExaminePeer::SharedDtor() { + if (pgp_id_ != &::google::protobuf::internal::kEmptyString) { + delete pgp_id_; + } + if (cert_ != &::google::protobuf::internal::kEmptyString) { + delete cert_; + } + if (this != default_instance_) { + } +} + +void RequestExaminePeer::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestExaminePeer::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestExaminePeer_descriptor_; +} + +const RequestExaminePeer& RequestExaminePeer::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_peers_2eproto(); return *default_instance_; +} + +RequestExaminePeer* RequestExaminePeer::default_instance_ = NULL; + +RequestExaminePeer* RequestExaminePeer::New() const { + return new RequestExaminePeer; +} + +void RequestExaminePeer::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_pgp_id()) { + if (pgp_id_ != &::google::protobuf::internal::kEmptyString) { + pgp_id_->clear(); + } + } + cmd_ = 3; + if (has_cert()) { + if (cert_ != &::google::protobuf::internal::kEmptyString) { + cert_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestExaminePeer::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 pgp_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())); + input, this->mutable_pgp_id())); ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->gpg_id().data(), this->gpg_id().length(), + this->pgp_id().data(), this->pgp_id().length(), ::google::protobuf::internal::WireFormat::PARSE); } else { goto handle_uninterpreted; @@ -1045,7 +1363,7 @@ bool RequestAddPeer::MergePartialFromCodedStream( break; } - // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; + // required .rsctrl.peers.RequestExaminePeer.ExamineCmd cmd = 2; case 2: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { @@ -1054,8 +1372,8 @@ bool RequestAddPeer::MergePartialFromCodedStream( 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)); + if (::rsctrl::peers::RequestExaminePeer_ExamineCmd_IsValid(value)) { + set_cmd(static_cast< ::rsctrl::peers::RequestExaminePeer_ExamineCmd >(value)); } else { mutable_unknown_fields()->AddVarint(2, value); } @@ -1066,7 +1384,7 @@ bool RequestAddPeer::MergePartialFromCodedStream( break; } - // optional string cert = 3; + // required string cert = 3; case 3: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { @@ -1099,24 +1417,24 @@ bool RequestAddPeer::MergePartialFromCodedStream( #undef DO_ } -void RequestAddPeer::SerializeWithCachedSizes( +void RequestExaminePeer::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // required string gpg_id = 1; - if (has_gpg_id()) { + // required string pgp_id = 1; + if (has_pgp_id()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->gpg_id().data(), this->gpg_id().length(), + this->pgp_id().data(), this->pgp_id().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->gpg_id(), output); + 1, this->pgp_id(), output); } - // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; + // required .rsctrl.peers.RequestExaminePeer.ExamineCmd cmd = 2; if (has_cmd()) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 2, this->cmd(), output); } - // optional string cert = 3; + // required string cert = 3; if (has_cert()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->cert().data(), this->cert().length(), @@ -1131,25 +1449,25 @@ void RequestAddPeer::SerializeWithCachedSizes( } } -::google::protobuf::uint8* RequestAddPeer::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* RequestExaminePeer::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // required string gpg_id = 1; - if (has_gpg_id()) { + // required string pgp_id = 1; + if (has_pgp_id()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->gpg_id().data(), this->gpg_id().length(), + this->pgp_id().data(), this->pgp_id().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->gpg_id(), target); + 1, this->pgp_id(), target); } - // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; + // required .rsctrl.peers.RequestExaminePeer.ExamineCmd cmd = 2; if (has_cmd()) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 2, this->cmd(), target); } - // optional string cert = 3; + // required string cert = 3; if (has_cert()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->cert().data(), this->cert().length(), @@ -1166,24 +1484,24 @@ void RequestAddPeer::SerializeWithCachedSizes( return target; } -int RequestAddPeer::ByteSize() const { +int RequestExaminePeer::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required string gpg_id = 1; - if (has_gpg_id()) { + // required string pgp_id = 1; + if (has_pgp_id()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->gpg_id()); + this->pgp_id()); } - // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 2; + // required .rsctrl.peers.RequestExaminePeer.ExamineCmd cmd = 2; if (has_cmd()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->cmd()); } - // optional string cert = 3; + // required string cert = 3; if (has_cert()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( @@ -1202,10 +1520,10 @@ int RequestAddPeer::ByteSize() const { return total_size; } -void RequestAddPeer::MergeFrom(const ::google::protobuf::Message& from) { +void RequestExaminePeer::MergeFrom(const ::google::protobuf::Message& from) { GOOGLE_CHECK_NE(&from, this); - const RequestAddPeer* source = - ::google::protobuf::internal::dynamic_cast_if_available( + const RequestExaminePeer* source = + ::google::protobuf::internal::dynamic_cast_if_available( &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); @@ -1214,11 +1532,11 @@ void RequestAddPeer::MergeFrom(const ::google::protobuf::Message& from) { } } -void RequestAddPeer::MergeFrom(const RequestAddPeer& from) { +void RequestExaminePeer::MergeFrom(const RequestExaminePeer& 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_pgp_id()) { + set_pgp_id(from.pgp_id()); } if (from.has_cmd()) { set_cmd(from.cmd()); @@ -1230,27 +1548,27 @@ void RequestAddPeer::MergeFrom(const RequestAddPeer& from) { mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } -void RequestAddPeer::CopyFrom(const ::google::protobuf::Message& from) { +void RequestExaminePeer::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void RequestAddPeer::CopyFrom(const RequestAddPeer& from) { +void RequestExaminePeer::CopyFrom(const RequestExaminePeer& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool RequestAddPeer::IsInitialized() const { - if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; +bool RequestExaminePeer::IsInitialized() const { + if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; return true; } -void RequestAddPeer::Swap(RequestAddPeer* other) { +void RequestExaminePeer::Swap(RequestExaminePeer* other) { if (other != this) { - std::swap(gpg_id_, other->gpg_id_); + std::swap(pgp_id_, other->pgp_id_); std::swap(cmd_, other->cmd_); std::swap(cert_, other->cert_); std::swap(_has_bits_[0], other->_has_bits_[0]); @@ -1259,270 +1577,11 @@ void RequestAddPeer::Swap(RequestAddPeer* other) { } } -::google::protobuf::Metadata RequestAddPeer::GetMetadata() const { +::google::protobuf::Metadata RequestExaminePeer::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::core::Status*>(&::rsctrl::core::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::core::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.core.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.core.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.core.Status status = 1; - if (has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->status(), output); - } - - // repeated .rsctrl.core.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.core.Status status = 1; - if (has_status()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->status(), target); - } - - // repeated .rsctrl.core.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.core.Status status = 1; - if (has_status()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->status()); - } - - } - // repeated .rsctrl.core.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::core::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_; + metadata.descriptor = RequestExaminePeer_descriptor_; + metadata.reflection = RequestExaminePeer_reflection_; return metadata; } @@ -1807,265 +1866,6 @@ void RequestModifyPeer::Swap(RequestModifyPeer* other) { } -// =================================================================== - -#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::core::Status*>(&::rsctrl::core::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::core::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.core.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.core.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.core.Status status = 1; - if (has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->status(), output); - } - - // repeated .rsctrl.core.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.core.Status status = 1; - if (has_status()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->status(), target); - } - - // repeated .rsctrl.core.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.core.Status status = 1; - if (has_status()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->status()); - } - - } - // repeated .rsctrl.core.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::core::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 diff --git a/retroshare-nogui/src/rpc/proto/gencc/peers.pb.h b/retroshare-nogui/src/rpc/proto/gencc/peers.pb.h index 75a90eb12..421a00e1d 100644 --- a/retroshare-nogui/src/rpc/proto/gencc/peers.pb.h +++ b/retroshare-nogui/src/rpc/proto/gencc/peers.pb.h @@ -37,9 +37,8 @@ void protobuf_ShutdownFile_peers_2eproto(); class RequestPeers; class ResponsePeerList; class RequestAddPeer; -class ResponseAddPeer; +class RequestExaminePeer; class RequestModifyPeer; -class ResponseModifyPeer; enum RequestPeers_SetOption { RequestPeers_SetOption_OWNID = 1, @@ -87,15 +86,12 @@ inline bool RequestPeers_InfoOption_Parse( 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 + RequestAddPeer_AddCmd_REMOVE = 2 }; 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 RequestAddPeer_AddCmd RequestAddPeer_AddCmd_AddCmd_MIN = RequestAddPeer_AddCmd_ADD; +const RequestAddPeer_AddCmd RequestAddPeer_AddCmd_AddCmd_MAX = RequestAddPeer_AddCmd_REMOVE; const int RequestAddPeer_AddCmd_AddCmd_ARRAYSIZE = RequestAddPeer_AddCmd_AddCmd_MAX + 1; const ::google::protobuf::EnumDescriptor* RequestAddPeer_AddCmd_descriptor(); @@ -108,6 +104,25 @@ inline bool RequestAddPeer_AddCmd_Parse( return ::google::protobuf::internal::ParseNamedEnum( RequestAddPeer_AddCmd_descriptor(), name, value); } +enum RequestExaminePeer_ExamineCmd { + RequestExaminePeer_ExamineCmd_IMPORT = 3, + RequestExaminePeer_ExamineCmd_EXAMINE = 4 +}; +bool RequestExaminePeer_ExamineCmd_IsValid(int value); +const RequestExaminePeer_ExamineCmd RequestExaminePeer_ExamineCmd_ExamineCmd_MIN = RequestExaminePeer_ExamineCmd_IMPORT; +const RequestExaminePeer_ExamineCmd RequestExaminePeer_ExamineCmd_ExamineCmd_MAX = RequestExaminePeer_ExamineCmd_EXAMINE; +const int RequestExaminePeer_ExamineCmd_ExamineCmd_ARRAYSIZE = RequestExaminePeer_ExamineCmd_ExamineCmd_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestExaminePeer_ExamineCmd_descriptor(); +inline const ::std::string& RequestExaminePeer_ExamineCmd_Name(RequestExaminePeer_ExamineCmd value) { + return ::google::protobuf::internal::NameOfEnum( + RequestExaminePeer_ExamineCmd_descriptor(), value); +} +inline bool RequestExaminePeer_ExamineCmd_Parse( + const ::std::string& name, RequestExaminePeer_ExamineCmd* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestExaminePeer_ExamineCmd_descriptor(), name, value); +} enum RequestModifyPeer_ModCmd { RequestModifyPeer_ModCmd_NOOP = 0, RequestModifyPeer_ModCmd_ADDRESS = 1, @@ -131,7 +146,8 @@ inline bool RequestModifyPeer_ModCmd_Parse( enum RequestMsgIds { MsgId_RequestPeers = 1, MsgId_RequestAddPeer = 2, - MsgId_RequestModifyPeer = 3 + MsgId_RequestExaminePeer = 3, + MsgId_RequestModifyPeer = 4 }; bool RequestMsgIds_IsValid(int value); const RequestMsgIds RequestMsgIds_MIN = MsgId_RequestPeers; @@ -149,13 +165,11 @@ inline bool RequestMsgIds_Parse( RequestMsgIds_descriptor(), name, value); } enum ResponseMsgIds { - MsgId_ResponsePeerList = 1, - MsgId_ResponseAddPeer = 2, - MsgId_ResponseModifyPeer = 3 + MsgId_ResponsePeerList = 1 }; bool ResponseMsgIds_IsValid(int value); const ResponseMsgIds ResponseMsgIds_MIN = MsgId_ResponsePeerList; -const ResponseMsgIds ResponseMsgIds_MAX = MsgId_ResponseModifyPeer; +const ResponseMsgIds ResponseMsgIds_MAX = MsgId_ResponsePeerList; const int ResponseMsgIds_ARRAYSIZE = ResponseMsgIds_MAX + 1; const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor(); @@ -293,21 +307,21 @@ class RequestPeers : public ::google::protobuf::Message { 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(); + // repeated string pgp_ids = 3; + inline int pgp_ids_size() const; + inline void clear_pgp_ids(); + static const int kPgpIdsFieldNumber = 3; + inline const ::std::string& pgp_ids(int index) const; + inline ::std::string* mutable_pgp_ids(int index); + inline void set_pgp_ids(int index, const ::std::string& value); + inline void set_pgp_ids(int index, const char* value); + inline void set_pgp_ids(int index, const char* value, size_t size); + inline ::std::string* add_pgp_ids(); + inline void add_pgp_ids(const ::std::string& value); + inline void add_pgp_ids(const char* value); + inline void add_pgp_ids(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& pgp_ids() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_pgp_ids(); // @@protoc_insertion_point(class_scope:rsctrl.peers.RequestPeers) private: @@ -320,7 +334,7 @@ class RequestPeers : public ::google::protobuf::Message { int set_; int info_; - ::google::protobuf::RepeatedPtrField< ::std::string> gpg_ids_; + ::google::protobuf::RepeatedPtrField< ::std::string> pgp_ids_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; @@ -483,11 +497,8 @@ class RequestAddPeer : public ::google::protobuf::Message { // 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); } @@ -511,48 +522,48 @@ class RequestAddPeer : public ::google::protobuf::Message { // 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; + // required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 1; inline bool has_cmd() const; inline void clear_cmd(); - static const int kCmdFieldNumber = 2; + static const int kCmdFieldNumber = 1; 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(); + // required string pgp_id = 2; + inline bool has_pgp_id() const; + inline void clear_pgp_id(); + static const int kPgpIdFieldNumber = 2; + inline const ::std::string& pgp_id() const; + inline void set_pgp_id(const ::std::string& value); + inline void set_pgp_id(const char* value); + inline void set_pgp_id(const char* value, size_t size); + inline ::std::string* mutable_pgp_id(); + inline ::std::string* release_pgp_id(); + + // optional string ssl_id = 3; + inline bool has_ssl_id() const; + inline void clear_ssl_id(); + static const int kSslIdFieldNumber = 3; + 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(); // @@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(); + inline void set_has_pgp_id(); + inline void clear_has_pgp_id(); + inline void set_has_ssl_id(); + inline void clear_has_ssl_id(); ::google::protobuf::UnknownFieldSet _unknown_fields_; - ::std::string* gpg_id_; - ::std::string* cert_; + ::std::string* pgp_id_; + ::std::string* ssl_id_; int cmd_; mutable int _cached_size_; @@ -567,14 +578,14 @@ class RequestAddPeer : public ::google::protobuf::Message { }; // ------------------------------------------------------------------- -class ResponseAddPeer : public ::google::protobuf::Message { +class RequestExaminePeer : public ::google::protobuf::Message { public: - ResponseAddPeer(); - virtual ~ResponseAddPeer(); + RequestExaminePeer(); + virtual ~RequestExaminePeer(); - ResponseAddPeer(const ResponseAddPeer& from); + RequestExaminePeer(const RequestExaminePeer& from); - inline ResponseAddPeer& operator=(const ResponseAddPeer& from) { + inline RequestExaminePeer& operator=(const RequestExaminePeer& from) { CopyFrom(from); return *this; } @@ -588,17 +599,17 @@ class ResponseAddPeer : public ::google::protobuf::Message { } static const ::google::protobuf::Descriptor* descriptor(); - static const ResponseAddPeer& default_instance(); + static const RequestExaminePeer& default_instance(); - void Swap(ResponseAddPeer* other); + void Swap(RequestExaminePeer* other); // implements Message ---------------------------------------------- - ResponseAddPeer* New() const; + RequestExaminePeer* 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 CopyFrom(const RequestExaminePeer& from); + void MergeFrom(const RequestExaminePeer& from); void Clear(); bool IsInitialized() const; @@ -619,47 +630,85 @@ class ResponseAddPeer : public ::google::protobuf::Message { // nested types ---------------------------------------------------- + typedef RequestExaminePeer_ExamineCmd ExamineCmd; + static const ExamineCmd IMPORT = RequestExaminePeer_ExamineCmd_IMPORT; + static const ExamineCmd EXAMINE = RequestExaminePeer_ExamineCmd_EXAMINE; + static inline bool ExamineCmd_IsValid(int value) { + return RequestExaminePeer_ExamineCmd_IsValid(value); + } + static const ExamineCmd ExamineCmd_MIN = + RequestExaminePeer_ExamineCmd_ExamineCmd_MIN; + static const ExamineCmd ExamineCmd_MAX = + RequestExaminePeer_ExamineCmd_ExamineCmd_MAX; + static const int ExamineCmd_ARRAYSIZE = + RequestExaminePeer_ExamineCmd_ExamineCmd_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + ExamineCmd_descriptor() { + return RequestExaminePeer_ExamineCmd_descriptor(); + } + static inline const ::std::string& ExamineCmd_Name(ExamineCmd value) { + return RequestExaminePeer_ExamineCmd_Name(value); + } + static inline bool ExamineCmd_Parse(const ::std::string& name, + ExamineCmd* value) { + return RequestExaminePeer_ExamineCmd_Parse(name, value); + } + // accessors ------------------------------------------------------- - // required .rsctrl.core.Status status = 1; - inline bool has_status() const; - inline void clear_status(); - static const int kStatusFieldNumber = 1; - inline const ::rsctrl::core::Status& status() const; - inline ::rsctrl::core::Status* mutable_status(); - inline ::rsctrl::core::Status* release_status(); + // required string pgp_id = 1; + inline bool has_pgp_id() const; + inline void clear_pgp_id(); + static const int kPgpIdFieldNumber = 1; + inline const ::std::string& pgp_id() const; + inline void set_pgp_id(const ::std::string& value); + inline void set_pgp_id(const char* value); + inline void set_pgp_id(const char* value, size_t size); + inline ::std::string* mutable_pgp_id(); + inline ::std::string* release_pgp_id(); - // repeated .rsctrl.core.Person peers = 2; - inline int peers_size() const; - inline void clear_peers(); - static const int kPeersFieldNumber = 2; - inline const ::rsctrl::core::Person& peers(int index) const; - inline ::rsctrl::core::Person* mutable_peers(int index); - inline ::rsctrl::core::Person* add_peers(); - inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::core::Person >& - peers() const; - inline ::google::protobuf::RepeatedPtrField< ::rsctrl::core::Person >* - mutable_peers(); + // required .rsctrl.peers.RequestExaminePeer.ExamineCmd cmd = 2; + inline bool has_cmd() const; + inline void clear_cmd(); + static const int kCmdFieldNumber = 2; + inline ::rsctrl::peers::RequestExaminePeer_ExamineCmd cmd() const; + inline void set_cmd(::rsctrl::peers::RequestExaminePeer_ExamineCmd value); - // @@protoc_insertion_point(class_scope:rsctrl.peers.ResponseAddPeer) + // required 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.RequestExaminePeer) private: - inline void set_has_status(); - inline void clear_has_status(); + inline void set_has_pgp_id(); + inline void clear_has_pgp_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_; - ::rsctrl::core::Status* status_; - ::google::protobuf::RepeatedPtrField< ::rsctrl::core::Person > peers_; + ::std::string* pgp_id_; + ::std::string* cert_; + int cmd_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + ::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 ResponseAddPeer* default_instance_; + static RequestExaminePeer* default_instance_; }; // ------------------------------------------------------------------- @@ -781,102 +830,6 @@ class RequestModifyPeer : public ::google::protobuf::Message { 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.core.Status status = 1; - inline bool has_status() const; - inline void clear_status(); - static const int kStatusFieldNumber = 1; - inline const ::rsctrl::core::Status& status() const; - inline ::rsctrl::core::Status* mutable_status(); - inline ::rsctrl::core::Status* release_status(); - - // repeated .rsctrl.core.Person peers = 2; - inline int peers_size() const; - inline void clear_peers(); - static const int kPeersFieldNumber = 2; - inline const ::rsctrl::core::Person& peers(int index) const; - inline ::rsctrl::core::Person* mutable_peers(int index); - inline ::rsctrl::core::Person* add_peers(); - inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::core::Person >& - peers() const; - inline ::google::protobuf::RepeatedPtrField< ::rsctrl::core::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::core::Status* status_; - ::google::protobuf::RepeatedPtrField< ::rsctrl::core::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_; -}; // =================================================================== @@ -930,48 +883,48 @@ inline void RequestPeers::set_info(::rsctrl::peers::RequestPeers_InfoOption valu info_ = value; } -// repeated string gpg_ids = 3; -inline int RequestPeers::gpg_ids_size() const { - return gpg_ids_.size(); +// repeated string pgp_ids = 3; +inline int RequestPeers::pgp_ids_size() const { + return pgp_ids_.size(); } -inline void RequestPeers::clear_gpg_ids() { - gpg_ids_.Clear(); +inline void RequestPeers::clear_pgp_ids() { + pgp_ids_.Clear(); } -inline const ::std::string& RequestPeers::gpg_ids(int index) const { - return gpg_ids_.Get(index); +inline const ::std::string& RequestPeers::pgp_ids(int index) const { + return pgp_ids_.Get(index); } -inline ::std::string* RequestPeers::mutable_gpg_ids(int index) { - return gpg_ids_.Mutable(index); +inline ::std::string* RequestPeers::mutable_pgp_ids(int index) { + return pgp_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_pgp_ids(int index, const ::std::string& value) { + pgp_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_pgp_ids(int index, const char* value) { + pgp_ids_.Mutable(index)->assign(value); } -inline void RequestPeers::set_gpg_ids(int index, const char* value, size_t size) { - gpg_ids_.Mutable(index)->assign( +inline void RequestPeers::set_pgp_ids(int index, const char* value, size_t size) { + pgp_ids_.Mutable(index)->assign( reinterpret_cast(value), size); } -inline ::std::string* RequestPeers::add_gpg_ids() { - return gpg_ids_.Add(); +inline ::std::string* RequestPeers::add_pgp_ids() { + return pgp_ids_.Add(); } -inline void RequestPeers::add_gpg_ids(const ::std::string& value) { - gpg_ids_.Add()->assign(value); +inline void RequestPeers::add_pgp_ids(const ::std::string& value) { + pgp_ids_.Add()->assign(value); } -inline void RequestPeers::add_gpg_ids(const char* value) { - gpg_ids_.Add()->assign(value); +inline void RequestPeers::add_pgp_ids(const char* value) { + pgp_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 void RequestPeers::add_pgp_ids(const char* value, size_t size) { + pgp_ids_.Add()->assign(reinterpret_cast(value), size); } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& -RequestPeers::gpg_ids() const { - return gpg_ids_; +RequestPeers::pgp_ids() const { + return pgp_ids_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* -RequestPeers::mutable_gpg_ids() { - return &gpg_ids_; +RequestPeers::mutable_pgp_ids() { + return &pgp_ids_; } // ------------------------------------------------------------------- @@ -1036,76 +989,18 @@ ResponsePeerList::mutable_peers() { // RequestAddPeer -// required string gpg_id = 1; -inline bool RequestAddPeer::has_gpg_id() const { +// required .rsctrl.peers.RequestAddPeer.AddCmd cmd = 1; +inline bool RequestAddPeer::has_cmd() const { return (_has_bits_[0] & 0x00000001u) != 0; } -inline void RequestAddPeer::set_has_gpg_id() { +inline void RequestAddPeer::set_has_cmd() { _has_bits_[0] |= 0x00000001u; } -inline void RequestAddPeer::clear_has_gpg_id() { +inline void RequestAddPeer::clear_has_cmd() { _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; + cmd_ = 1; clear_has_cmd(); } inline ::rsctrl::peers::RequestAddPeer_AddCmd RequestAddPeer::cmd() const { @@ -1117,54 +1012,255 @@ inline void RequestAddPeer::set_cmd(::rsctrl::peers::RequestAddPeer_AddCmd value cmd_ = value; } -// optional string cert = 3; -inline bool RequestAddPeer::has_cert() const { +// required string pgp_id = 2; +inline bool RequestAddPeer::has_pgp_id() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void RequestAddPeer::set_has_pgp_id() { + _has_bits_[0] |= 0x00000002u; +} +inline void RequestAddPeer::clear_has_pgp_id() { + _has_bits_[0] &= ~0x00000002u; +} +inline void RequestAddPeer::clear_pgp_id() { + if (pgp_id_ != &::google::protobuf::internal::kEmptyString) { + pgp_id_->clear(); + } + clear_has_pgp_id(); +} +inline const ::std::string& RequestAddPeer::pgp_id() const { + return *pgp_id_; +} +inline void RequestAddPeer::set_pgp_id(const ::std::string& value) { + set_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + pgp_id_ = new ::std::string; + } + pgp_id_->assign(value); +} +inline void RequestAddPeer::set_pgp_id(const char* value) { + set_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + pgp_id_ = new ::std::string; + } + pgp_id_->assign(value); +} +inline void RequestAddPeer::set_pgp_id(const char* value, size_t size) { + set_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + pgp_id_ = new ::std::string; + } + pgp_id_->assign(reinterpret_cast(value), size); +} +inline ::std::string* RequestAddPeer::mutable_pgp_id() { + set_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + pgp_id_ = new ::std::string; + } + return pgp_id_; +} +inline ::std::string* RequestAddPeer::release_pgp_id() { + clear_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = pgp_id_; + pgp_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// optional string ssl_id = 3; +inline bool RequestAddPeer::has_ssl_id() const { return (_has_bits_[0] & 0x00000004u) != 0; } -inline void RequestAddPeer::set_has_cert() { +inline void RequestAddPeer::set_has_ssl_id() { _has_bits_[0] |= 0x00000004u; } -inline void RequestAddPeer::clear_has_cert() { +inline void RequestAddPeer::clear_has_ssl_id() { _has_bits_[0] &= ~0x00000004u; } -inline void RequestAddPeer::clear_cert() { +inline void RequestAddPeer::clear_ssl_id() { + if (ssl_id_ != &::google::protobuf::internal::kEmptyString) { + ssl_id_->clear(); + } + clear_has_ssl_id(); +} +inline const ::std::string& RequestAddPeer::ssl_id() const { + return *ssl_id_; +} +inline void RequestAddPeer::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 RequestAddPeer::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 RequestAddPeer::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* RequestAddPeer::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* RequestAddPeer::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; + } +} + +// ------------------------------------------------------------------- + +// RequestExaminePeer + +// required string pgp_id = 1; +inline bool RequestExaminePeer::has_pgp_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestExaminePeer::set_has_pgp_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestExaminePeer::clear_has_pgp_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestExaminePeer::clear_pgp_id() { + if (pgp_id_ != &::google::protobuf::internal::kEmptyString) { + pgp_id_->clear(); + } + clear_has_pgp_id(); +} +inline const ::std::string& RequestExaminePeer::pgp_id() const { + return *pgp_id_; +} +inline void RequestExaminePeer::set_pgp_id(const ::std::string& value) { + set_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + pgp_id_ = new ::std::string; + } + pgp_id_->assign(value); +} +inline void RequestExaminePeer::set_pgp_id(const char* value) { + set_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + pgp_id_ = new ::std::string; + } + pgp_id_->assign(value); +} +inline void RequestExaminePeer::set_pgp_id(const char* value, size_t size) { + set_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + pgp_id_ = new ::std::string; + } + pgp_id_->assign(reinterpret_cast(value), size); +} +inline ::std::string* RequestExaminePeer::mutable_pgp_id() { + set_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + pgp_id_ = new ::std::string; + } + return pgp_id_; +} +inline ::std::string* RequestExaminePeer::release_pgp_id() { + clear_has_pgp_id(); + if (pgp_id_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = pgp_id_; + pgp_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required .rsctrl.peers.RequestExaminePeer.ExamineCmd cmd = 2; +inline bool RequestExaminePeer::has_cmd() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void RequestExaminePeer::set_has_cmd() { + _has_bits_[0] |= 0x00000002u; +} +inline void RequestExaminePeer::clear_has_cmd() { + _has_bits_[0] &= ~0x00000002u; +} +inline void RequestExaminePeer::clear_cmd() { + cmd_ = 3; + clear_has_cmd(); +} +inline ::rsctrl::peers::RequestExaminePeer_ExamineCmd RequestExaminePeer::cmd() const { + return static_cast< ::rsctrl::peers::RequestExaminePeer_ExamineCmd >(cmd_); +} +inline void RequestExaminePeer::set_cmd(::rsctrl::peers::RequestExaminePeer_ExamineCmd value) { + GOOGLE_DCHECK(::rsctrl::peers::RequestExaminePeer_ExamineCmd_IsValid(value)); + set_has_cmd(); + cmd_ = value; +} + +// required string cert = 3; +inline bool RequestExaminePeer::has_cert() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void RequestExaminePeer::set_has_cert() { + _has_bits_[0] |= 0x00000004u; +} +inline void RequestExaminePeer::clear_has_cert() { + _has_bits_[0] &= ~0x00000004u; +} +inline void RequestExaminePeer::clear_cert() { if (cert_ != &::google::protobuf::internal::kEmptyString) { cert_->clear(); } clear_has_cert(); } -inline const ::std::string& RequestAddPeer::cert() const { +inline const ::std::string& RequestExaminePeer::cert() const { return *cert_; } -inline void RequestAddPeer::set_cert(const ::std::string& value) { +inline void RequestExaminePeer::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) { +inline void RequestExaminePeer::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) { +inline void RequestExaminePeer::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() { +inline ::std::string* RequestExaminePeer::mutable_cert() { set_has_cert(); if (cert_ == &::google::protobuf::internal::kEmptyString) { cert_ = new ::std::string; } return cert_; } -inline ::std::string* RequestAddPeer::release_cert() { +inline ::std::string* RequestExaminePeer::release_cert() { clear_has_cert(); if (cert_ == &::google::protobuf::internal::kEmptyString) { return NULL; @@ -1177,64 +1273,6 @@ inline ::std::string* RequestAddPeer::release_cert() { // ------------------------------------------------------------------- -// ResponseAddPeer - -// required .rsctrl.core.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::core::Status::Clear(); - clear_has_status(); -} -inline const ::rsctrl::core::Status& ResponseAddPeer::status() const { - return status_ != NULL ? *status_ : *default_instance_->status_; -} -inline ::rsctrl::core::Status* ResponseAddPeer::mutable_status() { - set_has_status(); - if (status_ == NULL) status_ = new ::rsctrl::core::Status; - return status_; -} -inline ::rsctrl::core::Status* ResponseAddPeer::release_status() { - clear_has_status(); - ::rsctrl::core::Status* temp = status_; - status_ = NULL; - return temp; -} - -// repeated .rsctrl.core.Person peers = 2; -inline int ResponseAddPeer::peers_size() const { - return peers_.size(); -} -inline void ResponseAddPeer::clear_peers() { - peers_.Clear(); -} -inline const ::rsctrl::core::Person& ResponseAddPeer::peers(int index) const { - return peers_.Get(index); -} -inline ::rsctrl::core::Person* ResponseAddPeer::mutable_peers(int index) { - return peers_.Mutable(index); -} -inline ::rsctrl::core::Person* ResponseAddPeer::add_peers() { - return peers_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::core::Person >& -ResponseAddPeer::peers() const { - return peers_; -} -inline ::google::protobuf::RepeatedPtrField< ::rsctrl::core::Person >* -ResponseAddPeer::mutable_peers() { - return &peers_; -} - -// ------------------------------------------------------------------- - // RequestModifyPeer // required .rsctrl.peers.RequestModifyPeer.ModCmd cmd = 1; @@ -1285,64 +1323,6 @@ RequestModifyPeer::mutable_peers() { return &peers_; } -// ------------------------------------------------------------------- - -// ResponseModifyPeer - -// required .rsctrl.core.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::core::Status::Clear(); - clear_has_status(); -} -inline const ::rsctrl::core::Status& ResponseModifyPeer::status() const { - return status_ != NULL ? *status_ : *default_instance_->status_; -} -inline ::rsctrl::core::Status* ResponseModifyPeer::mutable_status() { - set_has_status(); - if (status_ == NULL) status_ = new ::rsctrl::core::Status; - return status_; -} -inline ::rsctrl::core::Status* ResponseModifyPeer::release_status() { - clear_has_status(); - ::rsctrl::core::Status* temp = status_; - status_ = NULL; - return temp; -} - -// repeated .rsctrl.core.Person peers = 2; -inline int ResponseModifyPeer::peers_size() const { - return peers_.size(); -} -inline void ResponseModifyPeer::clear_peers() { - peers_.Clear(); -} -inline const ::rsctrl::core::Person& ResponseModifyPeer::peers(int index) const { - return peers_.Get(index); -} -inline ::rsctrl::core::Person* ResponseModifyPeer::mutable_peers(int index) { - return peers_.Mutable(index); -} -inline ::rsctrl::core::Person* ResponseModifyPeer::add_peers() { - return peers_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::core::Person >& -ResponseModifyPeer::peers() const { - return peers_; -} -inline ::google::protobuf::RepeatedPtrField< ::rsctrl::core::Person >* -ResponseModifyPeer::mutable_peers() { - return &peers_; -} - // @@protoc_insertion_point(namespace_scope) @@ -1366,6 +1346,10 @@ inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::peers::RequestAddPeer_ return ::rsctrl::peers::RequestAddPeer_AddCmd_descriptor(); } template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::peers::RequestExaminePeer_ExamineCmd>() { + return ::rsctrl::peers::RequestExaminePeer_ExamineCmd_descriptor(); +} +template <> inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::peers::RequestModifyPeer_ModCmd>() { return ::rsctrl::peers::RequestModifyPeer_ModCmd_descriptor(); } diff --git a/retroshare-nogui/src/rpc/proto/gencc/stream.pb.cc b/retroshare-nogui/src/rpc/proto/gencc/stream.pb.cc new file mode 100644 index 000000000..a67ee8998 --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/gencc/stream.pb.cc @@ -0,0 +1,3281 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "stream.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace rsctrl { +namespace stream { + +namespace { + +const ::google::protobuf::Descriptor* StreamFileDetail_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + StreamFileDetail_reflection_ = NULL; +const ::google::protobuf::Descriptor* StreamVoipDetail_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + StreamVoipDetail_reflection_ = NULL; +const ::google::protobuf::Descriptor* StreamDesc_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + StreamDesc_reflection_ = NULL; +const ::google::protobuf::Descriptor* StreamData_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + StreamData_reflection_ = NULL; +const ::google::protobuf::Descriptor* RequestStartFileStream_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestStartFileStream_reflection_ = NULL; +const ::google::protobuf::Descriptor* ResponseStreamDetail_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ResponseStreamDetail_reflection_ = NULL; +const ::google::protobuf::Descriptor* RequestControlStream_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestControlStream_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestControlStream_StreamAction_descriptor_ = NULL; +const ::google::protobuf::Descriptor* RequestListStreams_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestListStreams_reflection_ = NULL; +const ::google::protobuf::Descriptor* ResponseStreamData_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ResponseStreamData_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestMsgIds_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* StreamType_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* StreamState_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_stream_2eproto() { + protobuf_AddDesc_stream_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "stream.proto"); + GOOGLE_CHECK(file != NULL); + StreamFileDetail_descriptor_ = file->message_type(0); + static const int StreamFileDetail_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamFileDetail, file_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamFileDetail, offset_), + }; + StreamFileDetail_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + StreamFileDetail_descriptor_, + StreamFileDetail::default_instance_, + StreamFileDetail_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamFileDetail, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamFileDetail, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(StreamFileDetail)); + StreamVoipDetail_descriptor_ = file->message_type(1); + static const int StreamVoipDetail_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamVoipDetail, peerid_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamVoipDetail, duration_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamVoipDetail, offset_), + }; + StreamVoipDetail_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + StreamVoipDetail_descriptor_, + StreamVoipDetail::default_instance_, + StreamVoipDetail_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamVoipDetail, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamVoipDetail, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(StreamVoipDetail)); + StreamDesc_descriptor_ = file->message_type(2); + static const int StreamDesc_offsets_[6] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamDesc, stream_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamDesc, stream_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamDesc, stream_state_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamDesc, rate_kbs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamDesc, file_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamDesc, voip_), + }; + StreamDesc_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + StreamDesc_descriptor_, + StreamDesc::default_instance_, + StreamDesc_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamDesc, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamDesc, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(StreamDesc)); + StreamData_descriptor_ = file->message_type(3); + static const int StreamData_offsets_[6] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamData, stream_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamData, stream_state_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamData, send_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamData, offset_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamData, size_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamData, stream_data_), + }; + StreamData_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + StreamData_descriptor_, + StreamData::default_instance_, + StreamData_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamData, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StreamData, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(StreamData)); + RequestStartFileStream_descriptor_ = file->message_type(4); + static const int RequestStartFileStream_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestStartFileStream, file_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestStartFileStream, rate_kbs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestStartFileStream, startbyte_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestStartFileStream, endbyte_), + }; + RequestStartFileStream_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestStartFileStream_descriptor_, + RequestStartFileStream::default_instance_, + RequestStartFileStream_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestStartFileStream, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestStartFileStream, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestStartFileStream)); + ResponseStreamDetail_descriptor_ = file->message_type(5); + static const int ResponseStreamDetail_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseStreamDetail, status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseStreamDetail, streams_), + }; + ResponseStreamDetail_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ResponseStreamDetail_descriptor_, + ResponseStreamDetail::default_instance_, + ResponseStreamDetail_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseStreamDetail, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseStreamDetail, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ResponseStreamDetail)); + RequestControlStream_descriptor_ = file->message_type(6); + static const int RequestControlStream_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestControlStream, stream_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestControlStream, action_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestControlStream, rate_kbs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestControlStream, seek_byte_), + }; + RequestControlStream_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestControlStream_descriptor_, + RequestControlStream::default_instance_, + RequestControlStream_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestControlStream, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestControlStream, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestControlStream)); + RequestControlStream_StreamAction_descriptor_ = RequestControlStream_descriptor_->enum_type(0); + RequestListStreams_descriptor_ = file->message_type(7); + static const int RequestListStreams_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestListStreams, request_type_), + }; + RequestListStreams_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestListStreams_descriptor_, + RequestListStreams::default_instance_, + RequestListStreams_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestListStreams, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestListStreams, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestListStreams)); + ResponseStreamData_descriptor_ = file->message_type(8); + static const int ResponseStreamData_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseStreamData, status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseStreamData, data_), + }; + ResponseStreamData_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ResponseStreamData_descriptor_, + ResponseStreamData::default_instance_, + ResponseStreamData_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseStreamData, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseStreamData, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ResponseStreamData)); + RequestMsgIds_descriptor_ = file->enum_type(0); + ResponseMsgIds_descriptor_ = file->enum_type(1); + StreamType_descriptor_ = file->enum_type(2); + StreamState_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_stream_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + StreamFileDetail_descriptor_, &StreamFileDetail::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + StreamVoipDetail_descriptor_, &StreamVoipDetail::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + StreamDesc_descriptor_, &StreamDesc::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + StreamData_descriptor_, &StreamData::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestStartFileStream_descriptor_, &RequestStartFileStream::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ResponseStreamDetail_descriptor_, &ResponseStreamDetail::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestControlStream_descriptor_, &RequestControlStream::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestListStreams_descriptor_, &RequestListStreams::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ResponseStreamData_descriptor_, &ResponseStreamData::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_stream_2eproto() { + delete StreamFileDetail::default_instance_; + delete StreamFileDetail_reflection_; + delete StreamVoipDetail::default_instance_; + delete StreamVoipDetail_reflection_; + delete StreamDesc::default_instance_; + delete StreamDesc_reflection_; + delete StreamData::default_instance_; + delete StreamData_reflection_; + delete RequestStartFileStream::default_instance_; + delete RequestStartFileStream_reflection_; + delete ResponseStreamDetail::default_instance_; + delete ResponseStreamDetail_reflection_; + delete RequestControlStream::default_instance_; + delete RequestControlStream_reflection_; + delete RequestListStreams::default_instance_; + delete RequestListStreams_reflection_; + delete ResponseStreamData::default_instance_; + delete ResponseStreamData_reflection_; +} + +void protobuf_AddDesc_stream_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::rsctrl::core::protobuf_AddDesc_core_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\014stream.proto\022\rrsctrl.stream\032\ncore.prot" + "o\"C\n\020StreamFileDetail\022\037\n\004file\030\001 \002(\0132\021.rs" + "ctrl.core.File\022\016\n\006offset\030\005 \002(\004\"D\n\020Stream" + "VoipDetail\022\016\n\006peerId\030\001 \002(\t\022\020\n\010duration\030\002" + " \002(\004\022\016\n\006offset\030\003 \002(\004\"\361\001\n\nStreamDesc\022\021\n\ts" + "tream_id\030\001 \002(\r\022.\n\013stream_type\030\002 \002(\0162\031.rs" + "ctrl.stream.StreamType\0220\n\014stream_state\030\003" + " \002(\0162\032.rsctrl.stream.StreamState\022\020\n\010rate" + "_kBs\030\004 \002(\002\022-\n\004file\030\005 \001(\0132\037.rsctrl.stream" + ".StreamFileDetail\022-\n\004voip\030\006 \001(\0132\037.rsctrl" + ".stream.StreamVoipDetail\"\257\001\n\nStreamData\022" + "\021\n\tstream_id\030\001 \002(\r\0220\n\014stream_state\030\002 \002(\016" + "2\032.rsctrl.stream.StreamState\022)\n\tsend_tim" + "e\030\003 \002(\0132\026.rsctrl.core.Timestamp\022\016\n\006offse" + "t\030\004 \002(\004\022\014\n\004size\030\005 \002(\r\022\023\n\013stream_data\030\006 \002" + "(\014\"o\n\026RequestStartFileStream\022\037\n\004file\030\001 \002" + "(\0132\021.rsctrl.core.File\022\020\n\010rate_kBs\030\002 \002(\002\022" + "\021\n\tstartByte\030\003 \001(\004\022\017\n\007endByte\030\004 \001(\004\"g\n\024R" + "esponseStreamDetail\022#\n\006status\030\001 \002(\0132\023.rs" + "ctrl.core.Status\022*\n\007streams\030\002 \003(\0132\031.rsct" + "rl.stream.StreamDesc\"\376\001\n\024RequestControlS" + "tream\022\021\n\tstream_id\030\001 \002(\r\022@\n\006action\030\002 \002(\016" + "20.rsctrl.stream.RequestControlStream.St" + "reamAction\022\020\n\010rate_kBs\030\003 \001(\002\022\021\n\tseek_byt" + "e\030\004 \001(\003\"l\n\014StreamAction\022\020\n\014STREAM_START\020" + "\001\022\017\n\013STREAM_STOP\020\002\022\020\n\014STREAM_PAUSE\020\003\022\026\n\022" + "STREAM_CHANGE_RATE\020\004\022\017\n\013STREAM_SEEK\020\005\"E\n" + "\022RequestListStreams\022/\n\014request_type\030\001 \002(" + "\0162\031.rsctrl.stream.StreamType\"b\n\022Response" + "StreamData\022#\n\006status\030\001 \002(\0132\023.rsctrl.core" + ".Status\022\'\n\004data\030\002 \002(\0132\031.rsctrl.stream.St" + "reamData*o\n\rRequestMsgIds\022 \n\034MsgId_Reque" + "stStartFileStream\020\001\022\036\n\032MsgId_RequestCont" + "rolStream\020\002\022\034\n\030MsgId_RequestListStreams\020" + "\003*F\n\016ResponseMsgIds\022\036\n\032MsgId_ResponseStr" + "eamDetail\020\001\022\024\n\020MsgId_StreamData\020\002*e\n\nStr" + "eamType\022\023\n\017STREAM_TYPE_ALL\020\001\022\025\n\021STREAM_T" + "YPE_FILES\020\002\022\024\n\020STREAM_TYPE_VOIP\020\003\022\025\n\021STR" + "EAM_TYPE_OTHER\020\004*n\n\013StreamState\022\026\n\022STREA" + "M_STATE_ERROR\020\000\022\024\n\020STREAM_STATE_RUN\020\001\022\027\n" + "\023STREAM_STATE_PAUSED\020\002\022\030\n\024STREAM_TYPE_FI" + "NISHED\020\003", 1648); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "stream.proto", &protobuf_RegisterTypes); + StreamFileDetail::default_instance_ = new StreamFileDetail(); + StreamVoipDetail::default_instance_ = new StreamVoipDetail(); + StreamDesc::default_instance_ = new StreamDesc(); + StreamData::default_instance_ = new StreamData(); + RequestStartFileStream::default_instance_ = new RequestStartFileStream(); + ResponseStreamDetail::default_instance_ = new ResponseStreamDetail(); + RequestControlStream::default_instance_ = new RequestControlStream(); + RequestListStreams::default_instance_ = new RequestListStreams(); + ResponseStreamData::default_instance_ = new ResponseStreamData(); + StreamFileDetail::default_instance_->InitAsDefaultInstance(); + StreamVoipDetail::default_instance_->InitAsDefaultInstance(); + StreamDesc::default_instance_->InitAsDefaultInstance(); + StreamData::default_instance_->InitAsDefaultInstance(); + RequestStartFileStream::default_instance_->InitAsDefaultInstance(); + ResponseStreamDetail::default_instance_->InitAsDefaultInstance(); + RequestControlStream::default_instance_->InitAsDefaultInstance(); + RequestListStreams::default_instance_->InitAsDefaultInstance(); + ResponseStreamData::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_stream_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_stream_2eproto { + StaticDescriptorInitializer_stream_2eproto() { + protobuf_AddDesc_stream_2eproto(); + } +} static_descriptor_initializer_stream_2eproto_; + +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: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* StreamType_descriptor() { + protobuf_AssignDescriptorsOnce(); + return StreamType_descriptor_; +} +bool StreamType_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* StreamState_descriptor() { + protobuf_AssignDescriptorsOnce(); + return StreamState_descriptor_; +} +bool StreamState_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + + +// =================================================================== + +#ifndef _MSC_VER +const int StreamFileDetail::kFileFieldNumber; +const int StreamFileDetail::kOffsetFieldNumber; +#endif // !_MSC_VER + +StreamFileDetail::StreamFileDetail() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void StreamFileDetail::InitAsDefaultInstance() { + file_ = const_cast< ::rsctrl::core::File*>(&::rsctrl::core::File::default_instance()); +} + +StreamFileDetail::StreamFileDetail(const StreamFileDetail& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void StreamFileDetail::SharedCtor() { + _cached_size_ = 0; + file_ = NULL; + offset_ = GOOGLE_ULONGLONG(0); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +StreamFileDetail::~StreamFileDetail() { + SharedDtor(); +} + +void StreamFileDetail::SharedDtor() { + if (this != default_instance_) { + delete file_; + } +} + +void StreamFileDetail::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* StreamFileDetail::descriptor() { + protobuf_AssignDescriptorsOnce(); + return StreamFileDetail_descriptor_; +} + +const StreamFileDetail& StreamFileDetail::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_; +} + +StreamFileDetail* StreamFileDetail::default_instance_ = NULL; + +StreamFileDetail* StreamFileDetail::New() const { + return new StreamFileDetail; +} + +void StreamFileDetail::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_file()) { + if (file_ != NULL) file_->::rsctrl::core::File::Clear(); + } + offset_ = GOOGLE_ULONGLONG(0); + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool StreamFileDetail::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.core.File file = 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_file())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(40)) goto parse_offset; + break; + } + + // required uint64 offset = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_offset: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &offset_))); + set_has_offset(); + } 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 StreamFileDetail::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.core.File file = 1; + if (has_file()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->file(), output); + } + + // required uint64 offset = 5; + if (has_offset()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(5, this->offset(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* StreamFileDetail::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.core.File file = 1; + if (has_file()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->file(), target); + } + + // required uint64 offset = 5; + if (has_offset()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(5, this->offset(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int StreamFileDetail::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.core.File file = 1; + if (has_file()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->file()); + } + + // required uint64 offset = 5; + if (has_offset()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->offset()); + } + + } + 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 StreamFileDetail::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const StreamFileDetail* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void StreamFileDetail::MergeFrom(const StreamFileDetail& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_file()) { + mutable_file()->::rsctrl::core::File::MergeFrom(from.file()); + } + if (from.has_offset()) { + set_offset(from.offset()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void StreamFileDetail::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void StreamFileDetail::CopyFrom(const StreamFileDetail& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StreamFileDetail::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + if (has_file()) { + if (!this->file().IsInitialized()) return false; + } + return true; +} + +void StreamFileDetail::Swap(StreamFileDetail* other) { + if (other != this) { + std::swap(file_, other->file_); + std::swap(offset_, other->offset_); + 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 StreamFileDetail::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = StreamFileDetail_descriptor_; + metadata.reflection = StreamFileDetail_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int StreamVoipDetail::kPeerIdFieldNumber; +const int StreamVoipDetail::kDurationFieldNumber; +const int StreamVoipDetail::kOffsetFieldNumber; +#endif // !_MSC_VER + +StreamVoipDetail::StreamVoipDetail() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void StreamVoipDetail::InitAsDefaultInstance() { +} + +StreamVoipDetail::StreamVoipDetail(const StreamVoipDetail& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void StreamVoipDetail::SharedCtor() { + _cached_size_ = 0; + peerid_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + duration_ = GOOGLE_ULONGLONG(0); + offset_ = GOOGLE_ULONGLONG(0); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +StreamVoipDetail::~StreamVoipDetail() { + SharedDtor(); +} + +void StreamVoipDetail::SharedDtor() { + if (peerid_ != &::google::protobuf::internal::kEmptyString) { + delete peerid_; + } + if (this != default_instance_) { + } +} + +void StreamVoipDetail::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* StreamVoipDetail::descriptor() { + protobuf_AssignDescriptorsOnce(); + return StreamVoipDetail_descriptor_; +} + +const StreamVoipDetail& StreamVoipDetail::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_; +} + +StreamVoipDetail* StreamVoipDetail::default_instance_ = NULL; + +StreamVoipDetail* StreamVoipDetail::New() const { + return new StreamVoipDetail; +} + +void StreamVoipDetail::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_peerid()) { + if (peerid_ != &::google::protobuf::internal::kEmptyString) { + peerid_->clear(); + } + } + duration_ = GOOGLE_ULONGLONG(0); + offset_ = GOOGLE_ULONGLONG(0); + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool StreamVoipDetail::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 peerId = 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_peerid())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->peerid().data(), this->peerid().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_duration; + break; + } + + // required uint64 duration = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_duration: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &duration_))); + set_has_duration(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(24)) goto parse_offset; + break; + } + + // required uint64 offset = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_offset: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &offset_))); + set_has_offset(); + } 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 StreamVoipDetail::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string peerId = 1; + if (has_peerid()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->peerid().data(), this->peerid().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->peerid(), output); + } + + // required uint64 duration = 2; + if (has_duration()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->duration(), output); + } + + // required uint64 offset = 3; + if (has_offset()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->offset(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* StreamVoipDetail::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string peerId = 1; + if (has_peerid()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->peerid().data(), this->peerid().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->peerid(), target); + } + + // required uint64 duration = 2; + if (has_duration()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->duration(), target); + } + + // required uint64 offset = 3; + if (has_offset()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->offset(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int StreamVoipDetail::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string peerId = 1; + if (has_peerid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->peerid()); + } + + // required uint64 duration = 2; + if (has_duration()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->duration()); + } + + // required uint64 offset = 3; + if (has_offset()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->offset()); + } + + } + 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 StreamVoipDetail::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const StreamVoipDetail* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void StreamVoipDetail::MergeFrom(const StreamVoipDetail& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_peerid()) { + set_peerid(from.peerid()); + } + if (from.has_duration()) { + set_duration(from.duration()); + } + if (from.has_offset()) { + set_offset(from.offset()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void StreamVoipDetail::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void StreamVoipDetail::CopyFrom(const StreamVoipDetail& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StreamVoipDetail::IsInitialized() const { + if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + + return true; +} + +void StreamVoipDetail::Swap(StreamVoipDetail* other) { + if (other != this) { + std::swap(peerid_, other->peerid_); + std::swap(duration_, other->duration_); + std::swap(offset_, other->offset_); + 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 StreamVoipDetail::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = StreamVoipDetail_descriptor_; + metadata.reflection = StreamVoipDetail_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int StreamDesc::kStreamIdFieldNumber; +const int StreamDesc::kStreamTypeFieldNumber; +const int StreamDesc::kStreamStateFieldNumber; +const int StreamDesc::kRateKBsFieldNumber; +const int StreamDesc::kFileFieldNumber; +const int StreamDesc::kVoipFieldNumber; +#endif // !_MSC_VER + +StreamDesc::StreamDesc() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void StreamDesc::InitAsDefaultInstance() { + file_ = const_cast< ::rsctrl::stream::StreamFileDetail*>(&::rsctrl::stream::StreamFileDetail::default_instance()); + voip_ = const_cast< ::rsctrl::stream::StreamVoipDetail*>(&::rsctrl::stream::StreamVoipDetail::default_instance()); +} + +StreamDesc::StreamDesc(const StreamDesc& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void StreamDesc::SharedCtor() { + _cached_size_ = 0; + stream_id_ = 0u; + stream_type_ = 1; + stream_state_ = 0; + rate_kbs_ = 0; + file_ = NULL; + voip_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +StreamDesc::~StreamDesc() { + SharedDtor(); +} + +void StreamDesc::SharedDtor() { + if (this != default_instance_) { + delete file_; + delete voip_; + } +} + +void StreamDesc::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* StreamDesc::descriptor() { + protobuf_AssignDescriptorsOnce(); + return StreamDesc_descriptor_; +} + +const StreamDesc& StreamDesc::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_; +} + +StreamDesc* StreamDesc::default_instance_ = NULL; + +StreamDesc* StreamDesc::New() const { + return new StreamDesc; +} + +void StreamDesc::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + stream_id_ = 0u; + stream_type_ = 1; + stream_state_ = 0; + rate_kbs_ = 0; + if (has_file()) { + if (file_ != NULL) file_->::rsctrl::stream::StreamFileDetail::Clear(); + } + if (has_voip()) { + if (voip_ != NULL) voip_->::rsctrl::stream::StreamVoipDetail::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool StreamDesc::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required uint32 stream_id = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &stream_id_))); + set_has_stream_id(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_stream_type; + break; + } + + // required .rsctrl.stream.StreamType stream_type = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_stream_type: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (rsctrl::stream::StreamType_IsValid(value)) { + set_stream_type(static_cast< rsctrl::stream::StreamType >(value)); + } else { + mutable_unknown_fields()->AddVarint(2, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(24)) goto parse_stream_state; + break; + } + + // required .rsctrl.stream.StreamState stream_state = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_stream_state: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (rsctrl::stream::StreamState_IsValid(value)) { + set_stream_state(static_cast< rsctrl::stream::StreamState >(value)); + } else { + mutable_unknown_fields()->AddVarint(3, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(37)) goto parse_rate_kBs; + break; + } + + // required float rate_kBs = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { + parse_rate_kBs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &rate_kbs_))); + set_has_rate_kbs(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(42)) goto parse_file; + break; + } + + // optional .rsctrl.stream.StreamFileDetail file = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_file: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_file())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(50)) goto parse_voip; + break; + } + + // optional .rsctrl.stream.StreamVoipDetail voip = 6; + case 6: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_voip: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_voip())); + } 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 StreamDesc::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 stream_id = 1; + if (has_stream_id()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->stream_id(), output); + } + + // required .rsctrl.stream.StreamType stream_type = 2; + if (has_stream_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->stream_type(), output); + } + + // required .rsctrl.stream.StreamState stream_state = 3; + if (has_stream_state()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 3, this->stream_state(), output); + } + + // required float rate_kBs = 4; + if (has_rate_kbs()) { + ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->rate_kbs(), output); + } + + // optional .rsctrl.stream.StreamFileDetail file = 5; + if (has_file()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, this->file(), output); + } + + // optional .rsctrl.stream.StreamVoipDetail voip = 6; + if (has_voip()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, this->voip(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* StreamDesc::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required uint32 stream_id = 1; + if (has_stream_id()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->stream_id(), target); + } + + // required .rsctrl.stream.StreamType stream_type = 2; + if (has_stream_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->stream_type(), target); + } + + // required .rsctrl.stream.StreamState stream_state = 3; + if (has_stream_state()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 3, this->stream_state(), target); + } + + // required float rate_kBs = 4; + if (has_rate_kbs()) { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->rate_kbs(), target); + } + + // optional .rsctrl.stream.StreamFileDetail file = 5; + if (has_file()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, this->file(), target); + } + + // optional .rsctrl.stream.StreamVoipDetail voip = 6; + if (has_voip()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 6, this->voip(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int StreamDesc::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 stream_id = 1; + if (has_stream_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->stream_id()); + } + + // required .rsctrl.stream.StreamType stream_type = 2; + if (has_stream_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->stream_type()); + } + + // required .rsctrl.stream.StreamState stream_state = 3; + if (has_stream_state()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->stream_state()); + } + + // required float rate_kBs = 4; + if (has_rate_kbs()) { + total_size += 1 + 4; + } + + // optional .rsctrl.stream.StreamFileDetail file = 5; + if (has_file()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->file()); + } + + // optional .rsctrl.stream.StreamVoipDetail voip = 6; + if (has_voip()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->voip()); + } + + } + 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 StreamDesc::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const StreamDesc* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void StreamDesc::MergeFrom(const StreamDesc& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_stream_id()) { + set_stream_id(from.stream_id()); + } + if (from.has_stream_type()) { + set_stream_type(from.stream_type()); + } + if (from.has_stream_state()) { + set_stream_state(from.stream_state()); + } + if (from.has_rate_kbs()) { + set_rate_kbs(from.rate_kbs()); + } + if (from.has_file()) { + mutable_file()->::rsctrl::stream::StreamFileDetail::MergeFrom(from.file()); + } + if (from.has_voip()) { + mutable_voip()->::rsctrl::stream::StreamVoipDetail::MergeFrom(from.voip()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void StreamDesc::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void StreamDesc::CopyFrom(const StreamDesc& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StreamDesc::IsInitialized() const { + if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false; + + if (has_file()) { + if (!this->file().IsInitialized()) return false; + } + if (has_voip()) { + if (!this->voip().IsInitialized()) return false; + } + return true; +} + +void StreamDesc::Swap(StreamDesc* other) { + if (other != this) { + std::swap(stream_id_, other->stream_id_); + std::swap(stream_type_, other->stream_type_); + std::swap(stream_state_, other->stream_state_); + std::swap(rate_kbs_, other->rate_kbs_); + std::swap(file_, other->file_); + std::swap(voip_, other->voip_); + 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 StreamDesc::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = StreamDesc_descriptor_; + metadata.reflection = StreamDesc_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int StreamData::kStreamIdFieldNumber; +const int StreamData::kStreamStateFieldNumber; +const int StreamData::kSendTimeFieldNumber; +const int StreamData::kOffsetFieldNumber; +const int StreamData::kSizeFieldNumber; +const int StreamData::kStreamDataFieldNumber; +#endif // !_MSC_VER + +StreamData::StreamData() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void StreamData::InitAsDefaultInstance() { + send_time_ = const_cast< ::rsctrl::core::Timestamp*>(&::rsctrl::core::Timestamp::default_instance()); +} + +StreamData::StreamData(const StreamData& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void StreamData::SharedCtor() { + _cached_size_ = 0; + stream_id_ = 0u; + stream_state_ = 0; + send_time_ = NULL; + offset_ = GOOGLE_ULONGLONG(0); + size_ = 0u; + stream_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +StreamData::~StreamData() { + SharedDtor(); +} + +void StreamData::SharedDtor() { + if (stream_data_ != &::google::protobuf::internal::kEmptyString) { + delete stream_data_; + } + if (this != default_instance_) { + delete send_time_; + } +} + +void StreamData::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* StreamData::descriptor() { + protobuf_AssignDescriptorsOnce(); + return StreamData_descriptor_; +} + +const StreamData& StreamData::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_; +} + +StreamData* StreamData::default_instance_ = NULL; + +StreamData* StreamData::New() const { + return new StreamData; +} + +void StreamData::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + stream_id_ = 0u; + stream_state_ = 0; + if (has_send_time()) { + if (send_time_ != NULL) send_time_->::rsctrl::core::Timestamp::Clear(); + } + offset_ = GOOGLE_ULONGLONG(0); + size_ = 0u; + if (has_stream_data()) { + if (stream_data_ != &::google::protobuf::internal::kEmptyString) { + stream_data_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool StreamData::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required uint32 stream_id = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &stream_id_))); + set_has_stream_id(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_stream_state; + break; + } + + // required .rsctrl.stream.StreamState stream_state = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_stream_state: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (rsctrl::stream::StreamState_IsValid(value)) { + set_stream_state(static_cast< rsctrl::stream::StreamState >(value)); + } else { + mutable_unknown_fields()->AddVarint(2, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_send_time; + break; + } + + // required .rsctrl.core.Timestamp send_time = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_send_time: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_send_time())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(32)) goto parse_offset; + break; + } + + // required uint64 offset = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_offset: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &offset_))); + set_has_offset(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(40)) goto parse_size; + break; + } + + // required uint32 size = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_size: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &size_))); + set_has_size(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(50)) goto parse_stream_data; + break; + } + + // required bytes stream_data = 6; + case 6: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_stream_data: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_stream_data())); + } 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 StreamData::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 stream_id = 1; + if (has_stream_id()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->stream_id(), output); + } + + // required .rsctrl.stream.StreamState stream_state = 2; + if (has_stream_state()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->stream_state(), output); + } + + // required .rsctrl.core.Timestamp send_time = 3; + if (has_send_time()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->send_time(), output); + } + + // required uint64 offset = 4; + if (has_offset()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->offset(), output); + } + + // required uint32 size = 5; + if (has_size()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->size(), output); + } + + // required bytes stream_data = 6; + if (has_stream_data()) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 6, this->stream_data(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* StreamData::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required uint32 stream_id = 1; + if (has_stream_id()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->stream_id(), target); + } + + // required .rsctrl.stream.StreamState stream_state = 2; + if (has_stream_state()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->stream_state(), target); + } + + // required .rsctrl.core.Timestamp send_time = 3; + if (has_send_time()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->send_time(), target); + } + + // required uint64 offset = 4; + if (has_offset()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->offset(), target); + } + + // required uint32 size = 5; + if (has_size()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->size(), target); + } + + // required bytes stream_data = 6; + if (has_stream_data()) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 6, this->stream_data(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int StreamData::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 stream_id = 1; + if (has_stream_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->stream_id()); + } + + // required .rsctrl.stream.StreamState stream_state = 2; + if (has_stream_state()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->stream_state()); + } + + // required .rsctrl.core.Timestamp send_time = 3; + if (has_send_time()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->send_time()); + } + + // required uint64 offset = 4; + if (has_offset()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->offset()); + } + + // required uint32 size = 5; + if (has_size()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->size()); + } + + // required bytes stream_data = 6; + if (has_stream_data()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->stream_data()); + } + + } + 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 StreamData::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const StreamData* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void StreamData::MergeFrom(const StreamData& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_stream_id()) { + set_stream_id(from.stream_id()); + } + if (from.has_stream_state()) { + set_stream_state(from.stream_state()); + } + if (from.has_send_time()) { + mutable_send_time()->::rsctrl::core::Timestamp::MergeFrom(from.send_time()); + } + if (from.has_offset()) { + set_offset(from.offset()); + } + if (from.has_size()) { + set_size(from.size()); + } + if (from.has_stream_data()) { + set_stream_data(from.stream_data()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void StreamData::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void StreamData::CopyFrom(const StreamData& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StreamData::IsInitialized() const { + if ((_has_bits_[0] & 0x0000003f) != 0x0000003f) return false; + + if (has_send_time()) { + if (!this->send_time().IsInitialized()) return false; + } + return true; +} + +void StreamData::Swap(StreamData* other) { + if (other != this) { + std::swap(stream_id_, other->stream_id_); + std::swap(stream_state_, other->stream_state_); + std::swap(send_time_, other->send_time_); + std::swap(offset_, other->offset_); + std::swap(size_, other->size_); + std::swap(stream_data_, other->stream_data_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata StreamData::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = StreamData_descriptor_; + metadata.reflection = StreamData_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int RequestStartFileStream::kFileFieldNumber; +const int RequestStartFileStream::kRateKBsFieldNumber; +const int RequestStartFileStream::kStartByteFieldNumber; +const int RequestStartFileStream::kEndByteFieldNumber; +#endif // !_MSC_VER + +RequestStartFileStream::RequestStartFileStream() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestStartFileStream::InitAsDefaultInstance() { + file_ = const_cast< ::rsctrl::core::File*>(&::rsctrl::core::File::default_instance()); +} + +RequestStartFileStream::RequestStartFileStream(const RequestStartFileStream& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestStartFileStream::SharedCtor() { + _cached_size_ = 0; + file_ = NULL; + rate_kbs_ = 0; + startbyte_ = GOOGLE_ULONGLONG(0); + endbyte_ = GOOGLE_ULONGLONG(0); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestStartFileStream::~RequestStartFileStream() { + SharedDtor(); +} + +void RequestStartFileStream::SharedDtor() { + if (this != default_instance_) { + delete file_; + } +} + +void RequestStartFileStream::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestStartFileStream::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestStartFileStream_descriptor_; +} + +const RequestStartFileStream& RequestStartFileStream::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_; +} + +RequestStartFileStream* RequestStartFileStream::default_instance_ = NULL; + +RequestStartFileStream* RequestStartFileStream::New() const { + return new RequestStartFileStream; +} + +void RequestStartFileStream::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_file()) { + if (file_ != NULL) file_->::rsctrl::core::File::Clear(); + } + rate_kbs_ = 0; + startbyte_ = GOOGLE_ULONGLONG(0); + endbyte_ = GOOGLE_ULONGLONG(0); + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestStartFileStream::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.core.File file = 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_file())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(21)) goto parse_rate_kBs; + break; + } + + // required float rate_kBs = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { + parse_rate_kBs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &rate_kbs_))); + set_has_rate_kbs(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(24)) goto parse_startByte; + break; + } + + // optional uint64 startByte = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_startByte: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &startbyte_))); + set_has_startbyte(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(32)) goto parse_endByte; + break; + } + + // optional uint64 endByte = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_endByte: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &endbyte_))); + set_has_endbyte(); + } 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 RequestStartFileStream::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.core.File file = 1; + if (has_file()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->file(), output); + } + + // required float rate_kBs = 2; + if (has_rate_kbs()) { + ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->rate_kbs(), output); + } + + // optional uint64 startByte = 3; + if (has_startbyte()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->startbyte(), output); + } + + // optional uint64 endByte = 4; + if (has_endbyte()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->endbyte(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestStartFileStream::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.core.File file = 1; + if (has_file()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->file(), target); + } + + // required float rate_kBs = 2; + if (has_rate_kbs()) { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->rate_kbs(), target); + } + + // optional uint64 startByte = 3; + if (has_startbyte()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->startbyte(), target); + } + + // optional uint64 endByte = 4; + if (has_endbyte()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->endbyte(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestStartFileStream::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.core.File file = 1; + if (has_file()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->file()); + } + + // required float rate_kBs = 2; + if (has_rate_kbs()) { + total_size += 1 + 4; + } + + // optional uint64 startByte = 3; + if (has_startbyte()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->startbyte()); + } + + // optional uint64 endByte = 4; + if (has_endbyte()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->endbyte()); + } + + } + 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 RequestStartFileStream::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestStartFileStream* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestStartFileStream::MergeFrom(const RequestStartFileStream& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_file()) { + mutable_file()->::rsctrl::core::File::MergeFrom(from.file()); + } + if (from.has_rate_kbs()) { + set_rate_kbs(from.rate_kbs()); + } + if (from.has_startbyte()) { + set_startbyte(from.startbyte()); + } + if (from.has_endbyte()) { + set_endbyte(from.endbyte()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestStartFileStream::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestStartFileStream::CopyFrom(const RequestStartFileStream& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestStartFileStream::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + if (has_file()) { + if (!this->file().IsInitialized()) return false; + } + return true; +} + +void RequestStartFileStream::Swap(RequestStartFileStream* other) { + if (other != this) { + std::swap(file_, other->file_); + std::swap(rate_kbs_, other->rate_kbs_); + std::swap(startbyte_, other->startbyte_); + std::swap(endbyte_, other->endbyte_); + 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 RequestStartFileStream::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestStartFileStream_descriptor_; + metadata.reflection = RequestStartFileStream_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ResponseStreamDetail::kStatusFieldNumber; +const int ResponseStreamDetail::kStreamsFieldNumber; +#endif // !_MSC_VER + +ResponseStreamDetail::ResponseStreamDetail() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ResponseStreamDetail::InitAsDefaultInstance() { + status_ = const_cast< ::rsctrl::core::Status*>(&::rsctrl::core::Status::default_instance()); +} + +ResponseStreamDetail::ResponseStreamDetail(const ResponseStreamDetail& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ResponseStreamDetail::SharedCtor() { + _cached_size_ = 0; + status_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ResponseStreamDetail::~ResponseStreamDetail() { + SharedDtor(); +} + +void ResponseStreamDetail::SharedDtor() { + if (this != default_instance_) { + delete status_; + } +} + +void ResponseStreamDetail::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ResponseStreamDetail::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseStreamDetail_descriptor_; +} + +const ResponseStreamDetail& ResponseStreamDetail::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_; +} + +ResponseStreamDetail* ResponseStreamDetail::default_instance_ = NULL; + +ResponseStreamDetail* ResponseStreamDetail::New() const { + return new ResponseStreamDetail; +} + +void ResponseStreamDetail::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_status()) { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + } + } + streams_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ResponseStreamDetail::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.core.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_streams; + break; + } + + // repeated .rsctrl.stream.StreamDesc streams = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_streams: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_streams())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_streams; + 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 ResponseStreamDetail::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->status(), output); + } + + // repeated .rsctrl.stream.StreamDesc streams = 2; + for (int i = 0; i < this->streams_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->streams(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ResponseStreamDetail::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->status(), target); + } + + // repeated .rsctrl.stream.StreamDesc streams = 2; + for (int i = 0; i < this->streams_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->streams(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ResponseStreamDetail::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->status()); + } + + } + // repeated .rsctrl.stream.StreamDesc streams = 2; + total_size += 1 * this->streams_size(); + for (int i = 0; i < this->streams_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->streams(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 ResponseStreamDetail::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ResponseStreamDetail* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ResponseStreamDetail::MergeFrom(const ResponseStreamDetail& from) { + GOOGLE_CHECK_NE(&from, this); + streams_.MergeFrom(from.streams_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_status()) { + mutable_status()->::rsctrl::core::Status::MergeFrom(from.status()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ResponseStreamDetail::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResponseStreamDetail::CopyFrom(const ResponseStreamDetail& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponseStreamDetail::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_status()) { + if (!this->status().IsInitialized()) return false; + } + for (int i = 0; i < streams_size(); i++) { + if (!this->streams(i).IsInitialized()) return false; + } + return true; +} + +void ResponseStreamDetail::Swap(ResponseStreamDetail* other) { + if (other != this) { + std::swap(status_, other->status_); + streams_.Swap(&other->streams_); + 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 ResponseStreamDetail::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ResponseStreamDetail_descriptor_; + metadata.reflection = ResponseStreamDetail_reflection_; + return metadata; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* RequestControlStream_StreamAction_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestControlStream_StreamAction_descriptor_; +} +bool RequestControlStream_StreamAction_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const RequestControlStream_StreamAction RequestControlStream::STREAM_START; +const RequestControlStream_StreamAction RequestControlStream::STREAM_STOP; +const RequestControlStream_StreamAction RequestControlStream::STREAM_PAUSE; +const RequestControlStream_StreamAction RequestControlStream::STREAM_CHANGE_RATE; +const RequestControlStream_StreamAction RequestControlStream::STREAM_SEEK; +const RequestControlStream_StreamAction RequestControlStream::StreamAction_MIN; +const RequestControlStream_StreamAction RequestControlStream::StreamAction_MAX; +const int RequestControlStream::StreamAction_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int RequestControlStream::kStreamIdFieldNumber; +const int RequestControlStream::kActionFieldNumber; +const int RequestControlStream::kRateKBsFieldNumber; +const int RequestControlStream::kSeekByteFieldNumber; +#endif // !_MSC_VER + +RequestControlStream::RequestControlStream() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestControlStream::InitAsDefaultInstance() { +} + +RequestControlStream::RequestControlStream(const RequestControlStream& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestControlStream::SharedCtor() { + _cached_size_ = 0; + stream_id_ = 0u; + action_ = 1; + rate_kbs_ = 0; + seek_byte_ = GOOGLE_LONGLONG(0); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestControlStream::~RequestControlStream() { + SharedDtor(); +} + +void RequestControlStream::SharedDtor() { + if (this != default_instance_) { + } +} + +void RequestControlStream::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestControlStream::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestControlStream_descriptor_; +} + +const RequestControlStream& RequestControlStream::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_; +} + +RequestControlStream* RequestControlStream::default_instance_ = NULL; + +RequestControlStream* RequestControlStream::New() const { + return new RequestControlStream; +} + +void RequestControlStream::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + stream_id_ = 0u; + action_ = 1; + rate_kbs_ = 0; + seek_byte_ = GOOGLE_LONGLONG(0); + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestControlStream::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required uint32 stream_id = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &stream_id_))); + set_has_stream_id(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_action; + break; + } + + // required .rsctrl.stream.RequestControlStream.StreamAction action = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_action: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::stream::RequestControlStream_StreamAction_IsValid(value)) { + set_action(static_cast< ::rsctrl::stream::RequestControlStream_StreamAction >(value)); + } else { + mutable_unknown_fields()->AddVarint(2, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(29)) goto parse_rate_kBs; + break; + } + + // optional float rate_kBs = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { + parse_rate_kBs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &rate_kbs_))); + set_has_rate_kbs(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(32)) goto parse_seek_byte; + break; + } + + // optional int64 seek_byte = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_seek_byte: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &seek_byte_))); + set_has_seek_byte(); + } 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 RequestControlStream::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 stream_id = 1; + if (has_stream_id()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->stream_id(), output); + } + + // required .rsctrl.stream.RequestControlStream.StreamAction action = 2; + if (has_action()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->action(), output); + } + + // optional float rate_kBs = 3; + if (has_rate_kbs()) { + ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->rate_kbs(), output); + } + + // optional int64 seek_byte = 4; + if (has_seek_byte()) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->seek_byte(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestControlStream::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required uint32 stream_id = 1; + if (has_stream_id()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->stream_id(), target); + } + + // required .rsctrl.stream.RequestControlStream.StreamAction action = 2; + if (has_action()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->action(), target); + } + + // optional float rate_kBs = 3; + if (has_rate_kbs()) { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->rate_kbs(), target); + } + + // optional int64 seek_byte = 4; + if (has_seek_byte()) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->seek_byte(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestControlStream::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 stream_id = 1; + if (has_stream_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->stream_id()); + } + + // required .rsctrl.stream.RequestControlStream.StreamAction action = 2; + if (has_action()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->action()); + } + + // optional float rate_kBs = 3; + if (has_rate_kbs()) { + total_size += 1 + 4; + } + + // optional int64 seek_byte = 4; + if (has_seek_byte()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->seek_byte()); + } + + } + 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 RequestControlStream::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestControlStream* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestControlStream::MergeFrom(const RequestControlStream& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_stream_id()) { + set_stream_id(from.stream_id()); + } + if (from.has_action()) { + set_action(from.action()); + } + if (from.has_rate_kbs()) { + set_rate_kbs(from.rate_kbs()); + } + if (from.has_seek_byte()) { + set_seek_byte(from.seek_byte()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestControlStream::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestControlStream::CopyFrom(const RequestControlStream& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestControlStream::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void RequestControlStream::Swap(RequestControlStream* other) { + if (other != this) { + std::swap(stream_id_, other->stream_id_); + std::swap(action_, other->action_); + std::swap(rate_kbs_, other->rate_kbs_); + std::swap(seek_byte_, other->seek_byte_); + 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 RequestControlStream::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestControlStream_descriptor_; + metadata.reflection = RequestControlStream_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int RequestListStreams::kRequestTypeFieldNumber; +#endif // !_MSC_VER + +RequestListStreams::RequestListStreams() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestListStreams::InitAsDefaultInstance() { +} + +RequestListStreams::RequestListStreams(const RequestListStreams& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestListStreams::SharedCtor() { + _cached_size_ = 0; + request_type_ = 1; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestListStreams::~RequestListStreams() { + SharedDtor(); +} + +void RequestListStreams::SharedDtor() { + if (this != default_instance_) { + } +} + +void RequestListStreams::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestListStreams::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestListStreams_descriptor_; +} + +const RequestListStreams& RequestListStreams::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_; +} + +RequestListStreams* RequestListStreams::default_instance_ = NULL; + +RequestListStreams* RequestListStreams::New() const { + return new RequestListStreams; +} + +void RequestListStreams::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + request_type_ = 1; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestListStreams::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.stream.StreamType request_type = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (rsctrl::stream::StreamType_IsValid(value)) { + set_request_type(static_cast< rsctrl::stream::StreamType >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } 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 RequestListStreams::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.stream.StreamType request_type = 1; + if (has_request_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->request_type(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestListStreams::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.stream.StreamType request_type = 1; + if (has_request_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->request_type(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestListStreams::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.stream.StreamType request_type = 1; + if (has_request_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->request_type()); + } + + } + 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 RequestListStreams::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestListStreams* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestListStreams::MergeFrom(const RequestListStreams& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_request_type()) { + set_request_type(from.request_type()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestListStreams::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestListStreams::CopyFrom(const RequestListStreams& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestListStreams::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void RequestListStreams::Swap(RequestListStreams* other) { + if (other != this) { + std::swap(request_type_, other->request_type_); + 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 RequestListStreams::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestListStreams_descriptor_; + metadata.reflection = RequestListStreams_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ResponseStreamData::kStatusFieldNumber; +const int ResponseStreamData::kDataFieldNumber; +#endif // !_MSC_VER + +ResponseStreamData::ResponseStreamData() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ResponseStreamData::InitAsDefaultInstance() { + status_ = const_cast< ::rsctrl::core::Status*>(&::rsctrl::core::Status::default_instance()); + data_ = const_cast< ::rsctrl::stream::StreamData*>(&::rsctrl::stream::StreamData::default_instance()); +} + +ResponseStreamData::ResponseStreamData(const ResponseStreamData& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ResponseStreamData::SharedCtor() { + _cached_size_ = 0; + status_ = NULL; + data_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ResponseStreamData::~ResponseStreamData() { + SharedDtor(); +} + +void ResponseStreamData::SharedDtor() { + if (this != default_instance_) { + delete status_; + delete data_; + } +} + +void ResponseStreamData::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ResponseStreamData::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseStreamData_descriptor_; +} + +const ResponseStreamData& ResponseStreamData::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_; +} + +ResponseStreamData* ResponseStreamData::default_instance_ = NULL; + +ResponseStreamData* ResponseStreamData::New() const { + return new ResponseStreamData; +} + +void ResponseStreamData::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_status()) { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + } + if (has_data()) { + if (data_ != NULL) data_->::rsctrl::stream::StreamData::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ResponseStreamData::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.core.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_data; + break; + } + + // required .rsctrl.stream.StreamData data = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_data: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_data())); + } 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 ResponseStreamData::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->status(), output); + } + + // required .rsctrl.stream.StreamData data = 2; + if (has_data()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->data(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ResponseStreamData::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->status(), target); + } + + // required .rsctrl.stream.StreamData data = 2; + if (has_data()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->data(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ResponseStreamData::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->status()); + } + + // required .rsctrl.stream.StreamData data = 2; + if (has_data()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->data()); + } + + } + 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 ResponseStreamData::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ResponseStreamData* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ResponseStreamData::MergeFrom(const ResponseStreamData& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_status()) { + mutable_status()->::rsctrl::core::Status::MergeFrom(from.status()); + } + if (from.has_data()) { + mutable_data()->::rsctrl::stream::StreamData::MergeFrom(from.data()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ResponseStreamData::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResponseStreamData::CopyFrom(const ResponseStreamData& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponseStreamData::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + if (has_status()) { + if (!this->status().IsInitialized()) return false; + } + if (has_data()) { + if (!this->data().IsInitialized()) return false; + } + return true; +} + +void ResponseStreamData::Swap(ResponseStreamData* other) { + if (other != this) { + std::swap(status_, other->status_); + std::swap(data_, other->data_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ResponseStreamData::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ResponseStreamData_descriptor_; + metadata.reflection = ResponseStreamData_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace stream +} // namespace rsctrl + +// @@protoc_insertion_point(global_scope) diff --git a/retroshare-nogui/src/rpc/proto/gencc/stream.pb.h b/retroshare-nogui/src/rpc/proto/gencc/stream.pb.h new file mode 100644 index 000000000..c9491770d --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/gencc/stream.pb.h @@ -0,0 +1,2016 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: stream.proto + +#ifndef PROTOBUF_stream_2eproto__INCLUDED +#define PROTOBUF_stream_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 "core.pb.h" +// @@protoc_insertion_point(includes) + +namespace rsctrl { +namespace stream { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_stream_2eproto(); +void protobuf_AssignDesc_stream_2eproto(); +void protobuf_ShutdownFile_stream_2eproto(); + +class StreamFileDetail; +class StreamVoipDetail; +class StreamDesc; +class StreamData; +class RequestStartFileStream; +class ResponseStreamDetail; +class RequestControlStream; +class RequestListStreams; +class ResponseStreamData; + +enum RequestControlStream_StreamAction { + RequestControlStream_StreamAction_STREAM_START = 1, + RequestControlStream_StreamAction_STREAM_STOP = 2, + RequestControlStream_StreamAction_STREAM_PAUSE = 3, + RequestControlStream_StreamAction_STREAM_CHANGE_RATE = 4, + RequestControlStream_StreamAction_STREAM_SEEK = 5 +}; +bool RequestControlStream_StreamAction_IsValid(int value); +const RequestControlStream_StreamAction RequestControlStream_StreamAction_StreamAction_MIN = RequestControlStream_StreamAction_STREAM_START; +const RequestControlStream_StreamAction RequestControlStream_StreamAction_StreamAction_MAX = RequestControlStream_StreamAction_STREAM_SEEK; +const int RequestControlStream_StreamAction_StreamAction_ARRAYSIZE = RequestControlStream_StreamAction_StreamAction_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestControlStream_StreamAction_descriptor(); +inline const ::std::string& RequestControlStream_StreamAction_Name(RequestControlStream_StreamAction value) { + return ::google::protobuf::internal::NameOfEnum( + RequestControlStream_StreamAction_descriptor(), value); +} +inline bool RequestControlStream_StreamAction_Parse( + const ::std::string& name, RequestControlStream_StreamAction* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestControlStream_StreamAction_descriptor(), name, value); +} +enum RequestMsgIds { + MsgId_RequestStartFileStream = 1, + MsgId_RequestControlStream = 2, + MsgId_RequestListStreams = 3 +}; +bool RequestMsgIds_IsValid(int value); +const RequestMsgIds RequestMsgIds_MIN = MsgId_RequestStartFileStream; +const RequestMsgIds RequestMsgIds_MAX = MsgId_RequestListStreams; +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_ResponseStreamDetail = 1, + MsgId_StreamData = 2 +}; +bool ResponseMsgIds_IsValid(int value); +const ResponseMsgIds ResponseMsgIds_MIN = MsgId_ResponseStreamDetail; +const ResponseMsgIds ResponseMsgIds_MAX = MsgId_StreamData; +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); +} +enum StreamType { + STREAM_TYPE_ALL = 1, + STREAM_TYPE_FILES = 2, + STREAM_TYPE_VOIP = 3, + STREAM_TYPE_OTHER = 4 +}; +bool StreamType_IsValid(int value); +const StreamType StreamType_MIN = STREAM_TYPE_ALL; +const StreamType StreamType_MAX = STREAM_TYPE_OTHER; +const int StreamType_ARRAYSIZE = StreamType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* StreamType_descriptor(); +inline const ::std::string& StreamType_Name(StreamType value) { + return ::google::protobuf::internal::NameOfEnum( + StreamType_descriptor(), value); +} +inline bool StreamType_Parse( + const ::std::string& name, StreamType* value) { + return ::google::protobuf::internal::ParseNamedEnum( + StreamType_descriptor(), name, value); +} +enum StreamState { + STREAM_STATE_ERROR = 0, + STREAM_STATE_RUN = 1, + STREAM_STATE_PAUSED = 2, + STREAM_TYPE_FINISHED = 3 +}; +bool StreamState_IsValid(int value); +const StreamState StreamState_MIN = STREAM_STATE_ERROR; +const StreamState StreamState_MAX = STREAM_TYPE_FINISHED; +const int StreamState_ARRAYSIZE = StreamState_MAX + 1; + +const ::google::protobuf::EnumDescriptor* StreamState_descriptor(); +inline const ::std::string& StreamState_Name(StreamState value) { + return ::google::protobuf::internal::NameOfEnum( + StreamState_descriptor(), value); +} +inline bool StreamState_Parse( + const ::std::string& name, StreamState* value) { + return ::google::protobuf::internal::ParseNamedEnum( + StreamState_descriptor(), name, value); +} +// =================================================================== + +class StreamFileDetail : public ::google::protobuf::Message { + public: + StreamFileDetail(); + virtual ~StreamFileDetail(); + + StreamFileDetail(const StreamFileDetail& from); + + inline StreamFileDetail& operator=(const StreamFileDetail& 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 StreamFileDetail& default_instance(); + + void Swap(StreamFileDetail* other); + + // implements Message ---------------------------------------------- + + StreamFileDetail* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const StreamFileDetail& from); + void MergeFrom(const StreamFileDetail& 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.core.File file = 1; + inline bool has_file() const; + inline void clear_file(); + static const int kFileFieldNumber = 1; + inline const ::rsctrl::core::File& file() const; + inline ::rsctrl::core::File* mutable_file(); + inline ::rsctrl::core::File* release_file(); + + // required uint64 offset = 5; + inline bool has_offset() const; + inline void clear_offset(); + static const int kOffsetFieldNumber = 5; + inline ::google::protobuf::uint64 offset() const; + inline void set_offset(::google::protobuf::uint64 value); + + // @@protoc_insertion_point(class_scope:rsctrl.stream.StreamFileDetail) + private: + inline void set_has_file(); + inline void clear_has_file(); + inline void set_has_offset(); + inline void clear_has_offset(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::core::File* file_; + ::google::protobuf::uint64 offset_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_stream_2eproto(); + friend void protobuf_AssignDesc_stream_2eproto(); + friend void protobuf_ShutdownFile_stream_2eproto(); + + void InitAsDefaultInstance(); + static StreamFileDetail* default_instance_; +}; +// ------------------------------------------------------------------- + +class StreamVoipDetail : public ::google::protobuf::Message { + public: + StreamVoipDetail(); + virtual ~StreamVoipDetail(); + + StreamVoipDetail(const StreamVoipDetail& from); + + inline StreamVoipDetail& operator=(const StreamVoipDetail& 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 StreamVoipDetail& default_instance(); + + void Swap(StreamVoipDetail* other); + + // implements Message ---------------------------------------------- + + StreamVoipDetail* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const StreamVoipDetail& from); + void MergeFrom(const StreamVoipDetail& 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 peerId = 1; + inline bool has_peerid() const; + inline void clear_peerid(); + static const int kPeerIdFieldNumber = 1; + inline const ::std::string& peerid() const; + inline void set_peerid(const ::std::string& value); + inline void set_peerid(const char* value); + inline void set_peerid(const char* value, size_t size); + inline ::std::string* mutable_peerid(); + inline ::std::string* release_peerid(); + + // required uint64 duration = 2; + inline bool has_duration() const; + inline void clear_duration(); + static const int kDurationFieldNumber = 2; + inline ::google::protobuf::uint64 duration() const; + inline void set_duration(::google::protobuf::uint64 value); + + // required uint64 offset = 3; + inline bool has_offset() const; + inline void clear_offset(); + static const int kOffsetFieldNumber = 3; + inline ::google::protobuf::uint64 offset() const; + inline void set_offset(::google::protobuf::uint64 value); + + // @@protoc_insertion_point(class_scope:rsctrl.stream.StreamVoipDetail) + private: + inline void set_has_peerid(); + inline void clear_has_peerid(); + inline void set_has_duration(); + inline void clear_has_duration(); + inline void set_has_offset(); + inline void clear_has_offset(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* peerid_; + ::google::protobuf::uint64 duration_; + ::google::protobuf::uint64 offset_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + + friend void protobuf_AddDesc_stream_2eproto(); + friend void protobuf_AssignDesc_stream_2eproto(); + friend void protobuf_ShutdownFile_stream_2eproto(); + + void InitAsDefaultInstance(); + static StreamVoipDetail* default_instance_; +}; +// ------------------------------------------------------------------- + +class StreamDesc : public ::google::protobuf::Message { + public: + StreamDesc(); + virtual ~StreamDesc(); + + StreamDesc(const StreamDesc& from); + + inline StreamDesc& operator=(const StreamDesc& 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 StreamDesc& default_instance(); + + void Swap(StreamDesc* other); + + // implements Message ---------------------------------------------- + + StreamDesc* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const StreamDesc& from); + void MergeFrom(const StreamDesc& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 stream_id = 1; + inline bool has_stream_id() const; + inline void clear_stream_id(); + static const int kStreamIdFieldNumber = 1; + inline ::google::protobuf::uint32 stream_id() const; + inline void set_stream_id(::google::protobuf::uint32 value); + + // required .rsctrl.stream.StreamType stream_type = 2; + inline bool has_stream_type() const; + inline void clear_stream_type(); + static const int kStreamTypeFieldNumber = 2; + inline rsctrl::stream::StreamType stream_type() const; + inline void set_stream_type(rsctrl::stream::StreamType value); + + // required .rsctrl.stream.StreamState stream_state = 3; + inline bool has_stream_state() const; + inline void clear_stream_state(); + static const int kStreamStateFieldNumber = 3; + inline rsctrl::stream::StreamState stream_state() const; + inline void set_stream_state(rsctrl::stream::StreamState value); + + // required float rate_kBs = 4; + inline bool has_rate_kbs() const; + inline void clear_rate_kbs(); + static const int kRateKBsFieldNumber = 4; + inline float rate_kbs() const; + inline void set_rate_kbs(float value); + + // optional .rsctrl.stream.StreamFileDetail file = 5; + inline bool has_file() const; + inline void clear_file(); + static const int kFileFieldNumber = 5; + inline const ::rsctrl::stream::StreamFileDetail& file() const; + inline ::rsctrl::stream::StreamFileDetail* mutable_file(); + inline ::rsctrl::stream::StreamFileDetail* release_file(); + + // optional .rsctrl.stream.StreamVoipDetail voip = 6; + inline bool has_voip() const; + inline void clear_voip(); + static const int kVoipFieldNumber = 6; + inline const ::rsctrl::stream::StreamVoipDetail& voip() const; + inline ::rsctrl::stream::StreamVoipDetail* mutable_voip(); + inline ::rsctrl::stream::StreamVoipDetail* release_voip(); + + // @@protoc_insertion_point(class_scope:rsctrl.stream.StreamDesc) + private: + inline void set_has_stream_id(); + inline void clear_has_stream_id(); + inline void set_has_stream_type(); + inline void clear_has_stream_type(); + inline void set_has_stream_state(); + inline void clear_has_stream_state(); + inline void set_has_rate_kbs(); + inline void clear_has_rate_kbs(); + inline void set_has_file(); + inline void clear_has_file(); + inline void set_has_voip(); + inline void clear_has_voip(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 stream_id_; + int stream_type_; + int stream_state_; + float rate_kbs_; + ::rsctrl::stream::StreamFileDetail* file_; + ::rsctrl::stream::StreamVoipDetail* voip_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32]; + + friend void protobuf_AddDesc_stream_2eproto(); + friend void protobuf_AssignDesc_stream_2eproto(); + friend void protobuf_ShutdownFile_stream_2eproto(); + + void InitAsDefaultInstance(); + static StreamDesc* default_instance_; +}; +// ------------------------------------------------------------------- + +class StreamData : public ::google::protobuf::Message { + public: + StreamData(); + virtual ~StreamData(); + + StreamData(const StreamData& from); + + inline StreamData& operator=(const StreamData& 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 StreamData& default_instance(); + + void Swap(StreamData* other); + + // implements Message ---------------------------------------------- + + StreamData* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const StreamData& from); + void MergeFrom(const StreamData& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 stream_id = 1; + inline bool has_stream_id() const; + inline void clear_stream_id(); + static const int kStreamIdFieldNumber = 1; + inline ::google::protobuf::uint32 stream_id() const; + inline void set_stream_id(::google::protobuf::uint32 value); + + // required .rsctrl.stream.StreamState stream_state = 2; + inline bool has_stream_state() const; + inline void clear_stream_state(); + static const int kStreamStateFieldNumber = 2; + inline rsctrl::stream::StreamState stream_state() const; + inline void set_stream_state(rsctrl::stream::StreamState value); + + // required .rsctrl.core.Timestamp send_time = 3; + inline bool has_send_time() const; + inline void clear_send_time(); + static const int kSendTimeFieldNumber = 3; + inline const ::rsctrl::core::Timestamp& send_time() const; + inline ::rsctrl::core::Timestamp* mutable_send_time(); + inline ::rsctrl::core::Timestamp* release_send_time(); + + // required uint64 offset = 4; + inline bool has_offset() const; + inline void clear_offset(); + static const int kOffsetFieldNumber = 4; + inline ::google::protobuf::uint64 offset() const; + inline void set_offset(::google::protobuf::uint64 value); + + // required uint32 size = 5; + inline bool has_size() const; + inline void clear_size(); + static const int kSizeFieldNumber = 5; + inline ::google::protobuf::uint32 size() const; + inline void set_size(::google::protobuf::uint32 value); + + // required bytes stream_data = 6; + inline bool has_stream_data() const; + inline void clear_stream_data(); + static const int kStreamDataFieldNumber = 6; + inline const ::std::string& stream_data() const; + inline void set_stream_data(const ::std::string& value); + inline void set_stream_data(const char* value); + inline void set_stream_data(const void* value, size_t size); + inline ::std::string* mutable_stream_data(); + inline ::std::string* release_stream_data(); + + // @@protoc_insertion_point(class_scope:rsctrl.stream.StreamData) + private: + inline void set_has_stream_id(); + inline void clear_has_stream_id(); + inline void set_has_stream_state(); + inline void clear_has_stream_state(); + inline void set_has_send_time(); + inline void clear_has_send_time(); + inline void set_has_offset(); + inline void clear_has_offset(); + inline void set_has_size(); + inline void clear_has_size(); + inline void set_has_stream_data(); + inline void clear_has_stream_data(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 stream_id_; + int stream_state_; + ::rsctrl::core::Timestamp* send_time_; + ::google::protobuf::uint64 offset_; + ::std::string* stream_data_; + ::google::protobuf::uint32 size_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32]; + + friend void protobuf_AddDesc_stream_2eproto(); + friend void protobuf_AssignDesc_stream_2eproto(); + friend void protobuf_ShutdownFile_stream_2eproto(); + + void InitAsDefaultInstance(); + static StreamData* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestStartFileStream : public ::google::protobuf::Message { + public: + RequestStartFileStream(); + virtual ~RequestStartFileStream(); + + RequestStartFileStream(const RequestStartFileStream& from); + + inline RequestStartFileStream& operator=(const RequestStartFileStream& 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 RequestStartFileStream& default_instance(); + + void Swap(RequestStartFileStream* other); + + // implements Message ---------------------------------------------- + + RequestStartFileStream* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestStartFileStream& from); + void MergeFrom(const RequestStartFileStream& 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.core.File file = 1; + inline bool has_file() const; + inline void clear_file(); + static const int kFileFieldNumber = 1; + inline const ::rsctrl::core::File& file() const; + inline ::rsctrl::core::File* mutable_file(); + inline ::rsctrl::core::File* release_file(); + + // required float rate_kBs = 2; + inline bool has_rate_kbs() const; + inline void clear_rate_kbs(); + static const int kRateKBsFieldNumber = 2; + inline float rate_kbs() const; + inline void set_rate_kbs(float value); + + // optional uint64 startByte = 3; + inline bool has_startbyte() const; + inline void clear_startbyte(); + static const int kStartByteFieldNumber = 3; + inline ::google::protobuf::uint64 startbyte() const; + inline void set_startbyte(::google::protobuf::uint64 value); + + // optional uint64 endByte = 4; + inline bool has_endbyte() const; + inline void clear_endbyte(); + static const int kEndByteFieldNumber = 4; + inline ::google::protobuf::uint64 endbyte() const; + inline void set_endbyte(::google::protobuf::uint64 value); + + // @@protoc_insertion_point(class_scope:rsctrl.stream.RequestStartFileStream) + private: + inline void set_has_file(); + inline void clear_has_file(); + inline void set_has_rate_kbs(); + inline void clear_has_rate_kbs(); + inline void set_has_startbyte(); + inline void clear_has_startbyte(); + inline void set_has_endbyte(); + inline void clear_has_endbyte(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::core::File* file_; + ::google::protobuf::uint64 startbyte_; + ::google::protobuf::uint64 endbyte_; + float rate_kbs_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_stream_2eproto(); + friend void protobuf_AssignDesc_stream_2eproto(); + friend void protobuf_ShutdownFile_stream_2eproto(); + + void InitAsDefaultInstance(); + static RequestStartFileStream* default_instance_; +}; +// ------------------------------------------------------------------- + +class ResponseStreamDetail : public ::google::protobuf::Message { + public: + ResponseStreamDetail(); + virtual ~ResponseStreamDetail(); + + ResponseStreamDetail(const ResponseStreamDetail& from); + + inline ResponseStreamDetail& operator=(const ResponseStreamDetail& 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 ResponseStreamDetail& default_instance(); + + void Swap(ResponseStreamDetail* other); + + // implements Message ---------------------------------------------- + + ResponseStreamDetail* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ResponseStreamDetail& from); + void MergeFrom(const ResponseStreamDetail& 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.core.Status status = 1; + inline bool has_status() const; + inline void clear_status(); + static const int kStatusFieldNumber = 1; + inline const ::rsctrl::core::Status& status() const; + inline ::rsctrl::core::Status* mutable_status(); + inline ::rsctrl::core::Status* release_status(); + + // repeated .rsctrl.stream.StreamDesc streams = 2; + inline int streams_size() const; + inline void clear_streams(); + static const int kStreamsFieldNumber = 2; + inline const ::rsctrl::stream::StreamDesc& streams(int index) const; + inline ::rsctrl::stream::StreamDesc* mutable_streams(int index); + inline ::rsctrl::stream::StreamDesc* add_streams(); + inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::stream::StreamDesc >& + streams() const; + inline ::google::protobuf::RepeatedPtrField< ::rsctrl::stream::StreamDesc >* + mutable_streams(); + + // @@protoc_insertion_point(class_scope:rsctrl.stream.ResponseStreamDetail) + private: + inline void set_has_status(); + inline void clear_has_status(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::core::Status* status_; + ::google::protobuf::RepeatedPtrField< ::rsctrl::stream::StreamDesc > streams_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_stream_2eproto(); + friend void protobuf_AssignDesc_stream_2eproto(); + friend void protobuf_ShutdownFile_stream_2eproto(); + + void InitAsDefaultInstance(); + static ResponseStreamDetail* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestControlStream : public ::google::protobuf::Message { + public: + RequestControlStream(); + virtual ~RequestControlStream(); + + RequestControlStream(const RequestControlStream& from); + + inline RequestControlStream& operator=(const RequestControlStream& 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 RequestControlStream& default_instance(); + + void Swap(RequestControlStream* other); + + // implements Message ---------------------------------------------- + + RequestControlStream* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestControlStream& from); + void MergeFrom(const RequestControlStream& 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 RequestControlStream_StreamAction StreamAction; + static const StreamAction STREAM_START = RequestControlStream_StreamAction_STREAM_START; + static const StreamAction STREAM_STOP = RequestControlStream_StreamAction_STREAM_STOP; + static const StreamAction STREAM_PAUSE = RequestControlStream_StreamAction_STREAM_PAUSE; + static const StreamAction STREAM_CHANGE_RATE = RequestControlStream_StreamAction_STREAM_CHANGE_RATE; + static const StreamAction STREAM_SEEK = RequestControlStream_StreamAction_STREAM_SEEK; + static inline bool StreamAction_IsValid(int value) { + return RequestControlStream_StreamAction_IsValid(value); + } + static const StreamAction StreamAction_MIN = + RequestControlStream_StreamAction_StreamAction_MIN; + static const StreamAction StreamAction_MAX = + RequestControlStream_StreamAction_StreamAction_MAX; + static const int StreamAction_ARRAYSIZE = + RequestControlStream_StreamAction_StreamAction_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + StreamAction_descriptor() { + return RequestControlStream_StreamAction_descriptor(); + } + static inline const ::std::string& StreamAction_Name(StreamAction value) { + return RequestControlStream_StreamAction_Name(value); + } + static inline bool StreamAction_Parse(const ::std::string& name, + StreamAction* value) { + return RequestControlStream_StreamAction_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required uint32 stream_id = 1; + inline bool has_stream_id() const; + inline void clear_stream_id(); + static const int kStreamIdFieldNumber = 1; + inline ::google::protobuf::uint32 stream_id() const; + inline void set_stream_id(::google::protobuf::uint32 value); + + // required .rsctrl.stream.RequestControlStream.StreamAction action = 2; + inline bool has_action() const; + inline void clear_action(); + static const int kActionFieldNumber = 2; + inline ::rsctrl::stream::RequestControlStream_StreamAction action() const; + inline void set_action(::rsctrl::stream::RequestControlStream_StreamAction value); + + // optional float rate_kBs = 3; + inline bool has_rate_kbs() const; + inline void clear_rate_kbs(); + static const int kRateKBsFieldNumber = 3; + inline float rate_kbs() const; + inline void set_rate_kbs(float value); + + // optional int64 seek_byte = 4; + inline bool has_seek_byte() const; + inline void clear_seek_byte(); + static const int kSeekByteFieldNumber = 4; + inline ::google::protobuf::int64 seek_byte() const; + inline void set_seek_byte(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:rsctrl.stream.RequestControlStream) + private: + inline void set_has_stream_id(); + inline void clear_has_stream_id(); + inline void set_has_action(); + inline void clear_has_action(); + inline void set_has_rate_kbs(); + inline void clear_has_rate_kbs(); + inline void set_has_seek_byte(); + inline void clear_has_seek_byte(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 stream_id_; + int action_; + ::google::protobuf::int64 seek_byte_; + float rate_kbs_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_stream_2eproto(); + friend void protobuf_AssignDesc_stream_2eproto(); + friend void protobuf_ShutdownFile_stream_2eproto(); + + void InitAsDefaultInstance(); + static RequestControlStream* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestListStreams : public ::google::protobuf::Message { + public: + RequestListStreams(); + virtual ~RequestListStreams(); + + RequestListStreams(const RequestListStreams& from); + + inline RequestListStreams& operator=(const RequestListStreams& 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 RequestListStreams& default_instance(); + + void Swap(RequestListStreams* other); + + // implements Message ---------------------------------------------- + + RequestListStreams* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestListStreams& from); + void MergeFrom(const RequestListStreams& 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.stream.StreamType request_type = 1; + inline bool has_request_type() const; + inline void clear_request_type(); + static const int kRequestTypeFieldNumber = 1; + inline rsctrl::stream::StreamType request_type() const; + inline void set_request_type(rsctrl::stream::StreamType value); + + // @@protoc_insertion_point(class_scope:rsctrl.stream.RequestListStreams) + private: + inline void set_has_request_type(); + inline void clear_has_request_type(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + int request_type_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_stream_2eproto(); + friend void protobuf_AssignDesc_stream_2eproto(); + friend void protobuf_ShutdownFile_stream_2eproto(); + + void InitAsDefaultInstance(); + static RequestListStreams* default_instance_; +}; +// ------------------------------------------------------------------- + +class ResponseStreamData : public ::google::protobuf::Message { + public: + ResponseStreamData(); + virtual ~ResponseStreamData(); + + ResponseStreamData(const ResponseStreamData& from); + + inline ResponseStreamData& operator=(const ResponseStreamData& 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 ResponseStreamData& default_instance(); + + void Swap(ResponseStreamData* other); + + // implements Message ---------------------------------------------- + + ResponseStreamData* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ResponseStreamData& from); + void MergeFrom(const ResponseStreamData& 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.core.Status status = 1; + inline bool has_status() const; + inline void clear_status(); + static const int kStatusFieldNumber = 1; + inline const ::rsctrl::core::Status& status() const; + inline ::rsctrl::core::Status* mutable_status(); + inline ::rsctrl::core::Status* release_status(); + + // required .rsctrl.stream.StreamData data = 2; + inline bool has_data() const; + inline void clear_data(); + static const int kDataFieldNumber = 2; + inline const ::rsctrl::stream::StreamData& data() const; + inline ::rsctrl::stream::StreamData* mutable_data(); + inline ::rsctrl::stream::StreamData* release_data(); + + // @@protoc_insertion_point(class_scope:rsctrl.stream.ResponseStreamData) + private: + inline void set_has_status(); + inline void clear_has_status(); + inline void set_has_data(); + inline void clear_has_data(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::core::Status* status_; + ::rsctrl::stream::StreamData* data_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_stream_2eproto(); + friend void protobuf_AssignDesc_stream_2eproto(); + friend void protobuf_ShutdownFile_stream_2eproto(); + + void InitAsDefaultInstance(); + static ResponseStreamData* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// StreamFileDetail + +// required .rsctrl.core.File file = 1; +inline bool StreamFileDetail::has_file() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void StreamFileDetail::set_has_file() { + _has_bits_[0] |= 0x00000001u; +} +inline void StreamFileDetail::clear_has_file() { + _has_bits_[0] &= ~0x00000001u; +} +inline void StreamFileDetail::clear_file() { + if (file_ != NULL) file_->::rsctrl::core::File::Clear(); + clear_has_file(); +} +inline const ::rsctrl::core::File& StreamFileDetail::file() const { + return file_ != NULL ? *file_ : *default_instance_->file_; +} +inline ::rsctrl::core::File* StreamFileDetail::mutable_file() { + set_has_file(); + if (file_ == NULL) file_ = new ::rsctrl::core::File; + return file_; +} +inline ::rsctrl::core::File* StreamFileDetail::release_file() { + clear_has_file(); + ::rsctrl::core::File* temp = file_; + file_ = NULL; + return temp; +} + +// required uint64 offset = 5; +inline bool StreamFileDetail::has_offset() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void StreamFileDetail::set_has_offset() { + _has_bits_[0] |= 0x00000002u; +} +inline void StreamFileDetail::clear_has_offset() { + _has_bits_[0] &= ~0x00000002u; +} +inline void StreamFileDetail::clear_offset() { + offset_ = GOOGLE_ULONGLONG(0); + clear_has_offset(); +} +inline ::google::protobuf::uint64 StreamFileDetail::offset() const { + return offset_; +} +inline void StreamFileDetail::set_offset(::google::protobuf::uint64 value) { + set_has_offset(); + offset_ = value; +} + +// ------------------------------------------------------------------- + +// StreamVoipDetail + +// required string peerId = 1; +inline bool StreamVoipDetail::has_peerid() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void StreamVoipDetail::set_has_peerid() { + _has_bits_[0] |= 0x00000001u; +} +inline void StreamVoipDetail::clear_has_peerid() { + _has_bits_[0] &= ~0x00000001u; +} +inline void StreamVoipDetail::clear_peerid() { + if (peerid_ != &::google::protobuf::internal::kEmptyString) { + peerid_->clear(); + } + clear_has_peerid(); +} +inline const ::std::string& StreamVoipDetail::peerid() const { + return *peerid_; +} +inline void StreamVoipDetail::set_peerid(const ::std::string& value) { + set_has_peerid(); + if (peerid_ == &::google::protobuf::internal::kEmptyString) { + peerid_ = new ::std::string; + } + peerid_->assign(value); +} +inline void StreamVoipDetail::set_peerid(const char* value) { + set_has_peerid(); + if (peerid_ == &::google::protobuf::internal::kEmptyString) { + peerid_ = new ::std::string; + } + peerid_->assign(value); +} +inline void StreamVoipDetail::set_peerid(const char* value, size_t size) { + set_has_peerid(); + if (peerid_ == &::google::protobuf::internal::kEmptyString) { + peerid_ = new ::std::string; + } + peerid_->assign(reinterpret_cast(value), size); +} +inline ::std::string* StreamVoipDetail::mutable_peerid() { + set_has_peerid(); + if (peerid_ == &::google::protobuf::internal::kEmptyString) { + peerid_ = new ::std::string; + } + return peerid_; +} +inline ::std::string* StreamVoipDetail::release_peerid() { + clear_has_peerid(); + if (peerid_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = peerid_; + peerid_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required uint64 duration = 2; +inline bool StreamVoipDetail::has_duration() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void StreamVoipDetail::set_has_duration() { + _has_bits_[0] |= 0x00000002u; +} +inline void StreamVoipDetail::clear_has_duration() { + _has_bits_[0] &= ~0x00000002u; +} +inline void StreamVoipDetail::clear_duration() { + duration_ = GOOGLE_ULONGLONG(0); + clear_has_duration(); +} +inline ::google::protobuf::uint64 StreamVoipDetail::duration() const { + return duration_; +} +inline void StreamVoipDetail::set_duration(::google::protobuf::uint64 value) { + set_has_duration(); + duration_ = value; +} + +// required uint64 offset = 3; +inline bool StreamVoipDetail::has_offset() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void StreamVoipDetail::set_has_offset() { + _has_bits_[0] |= 0x00000004u; +} +inline void StreamVoipDetail::clear_has_offset() { + _has_bits_[0] &= ~0x00000004u; +} +inline void StreamVoipDetail::clear_offset() { + offset_ = GOOGLE_ULONGLONG(0); + clear_has_offset(); +} +inline ::google::protobuf::uint64 StreamVoipDetail::offset() const { + return offset_; +} +inline void StreamVoipDetail::set_offset(::google::protobuf::uint64 value) { + set_has_offset(); + offset_ = value; +} + +// ------------------------------------------------------------------- + +// StreamDesc + +// required uint32 stream_id = 1; +inline bool StreamDesc::has_stream_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void StreamDesc::set_has_stream_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void StreamDesc::clear_has_stream_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void StreamDesc::clear_stream_id() { + stream_id_ = 0u; + clear_has_stream_id(); +} +inline ::google::protobuf::uint32 StreamDesc::stream_id() const { + return stream_id_; +} +inline void StreamDesc::set_stream_id(::google::protobuf::uint32 value) { + set_has_stream_id(); + stream_id_ = value; +} + +// required .rsctrl.stream.StreamType stream_type = 2; +inline bool StreamDesc::has_stream_type() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void StreamDesc::set_has_stream_type() { + _has_bits_[0] |= 0x00000002u; +} +inline void StreamDesc::clear_has_stream_type() { + _has_bits_[0] &= ~0x00000002u; +} +inline void StreamDesc::clear_stream_type() { + stream_type_ = 1; + clear_has_stream_type(); +} +inline rsctrl::stream::StreamType StreamDesc::stream_type() const { + return static_cast< rsctrl::stream::StreamType >(stream_type_); +} +inline void StreamDesc::set_stream_type(rsctrl::stream::StreamType value) { + GOOGLE_DCHECK(rsctrl::stream::StreamType_IsValid(value)); + set_has_stream_type(); + stream_type_ = value; +} + +// required .rsctrl.stream.StreamState stream_state = 3; +inline bool StreamDesc::has_stream_state() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void StreamDesc::set_has_stream_state() { + _has_bits_[0] |= 0x00000004u; +} +inline void StreamDesc::clear_has_stream_state() { + _has_bits_[0] &= ~0x00000004u; +} +inline void StreamDesc::clear_stream_state() { + stream_state_ = 0; + clear_has_stream_state(); +} +inline rsctrl::stream::StreamState StreamDesc::stream_state() const { + return static_cast< rsctrl::stream::StreamState >(stream_state_); +} +inline void StreamDesc::set_stream_state(rsctrl::stream::StreamState value) { + GOOGLE_DCHECK(rsctrl::stream::StreamState_IsValid(value)); + set_has_stream_state(); + stream_state_ = value; +} + +// required float rate_kBs = 4; +inline bool StreamDesc::has_rate_kbs() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void StreamDesc::set_has_rate_kbs() { + _has_bits_[0] |= 0x00000008u; +} +inline void StreamDesc::clear_has_rate_kbs() { + _has_bits_[0] &= ~0x00000008u; +} +inline void StreamDesc::clear_rate_kbs() { + rate_kbs_ = 0; + clear_has_rate_kbs(); +} +inline float StreamDesc::rate_kbs() const { + return rate_kbs_; +} +inline void StreamDesc::set_rate_kbs(float value) { + set_has_rate_kbs(); + rate_kbs_ = value; +} + +// optional .rsctrl.stream.StreamFileDetail file = 5; +inline bool StreamDesc::has_file() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void StreamDesc::set_has_file() { + _has_bits_[0] |= 0x00000010u; +} +inline void StreamDesc::clear_has_file() { + _has_bits_[0] &= ~0x00000010u; +} +inline void StreamDesc::clear_file() { + if (file_ != NULL) file_->::rsctrl::stream::StreamFileDetail::Clear(); + clear_has_file(); +} +inline const ::rsctrl::stream::StreamFileDetail& StreamDesc::file() const { + return file_ != NULL ? *file_ : *default_instance_->file_; +} +inline ::rsctrl::stream::StreamFileDetail* StreamDesc::mutable_file() { + set_has_file(); + if (file_ == NULL) file_ = new ::rsctrl::stream::StreamFileDetail; + return file_; +} +inline ::rsctrl::stream::StreamFileDetail* StreamDesc::release_file() { + clear_has_file(); + ::rsctrl::stream::StreamFileDetail* temp = file_; + file_ = NULL; + return temp; +} + +// optional .rsctrl.stream.StreamVoipDetail voip = 6; +inline bool StreamDesc::has_voip() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void StreamDesc::set_has_voip() { + _has_bits_[0] |= 0x00000020u; +} +inline void StreamDesc::clear_has_voip() { + _has_bits_[0] &= ~0x00000020u; +} +inline void StreamDesc::clear_voip() { + if (voip_ != NULL) voip_->::rsctrl::stream::StreamVoipDetail::Clear(); + clear_has_voip(); +} +inline const ::rsctrl::stream::StreamVoipDetail& StreamDesc::voip() const { + return voip_ != NULL ? *voip_ : *default_instance_->voip_; +} +inline ::rsctrl::stream::StreamVoipDetail* StreamDesc::mutable_voip() { + set_has_voip(); + if (voip_ == NULL) voip_ = new ::rsctrl::stream::StreamVoipDetail; + return voip_; +} +inline ::rsctrl::stream::StreamVoipDetail* StreamDesc::release_voip() { + clear_has_voip(); + ::rsctrl::stream::StreamVoipDetail* temp = voip_; + voip_ = NULL; + return temp; +} + +// ------------------------------------------------------------------- + +// StreamData + +// required uint32 stream_id = 1; +inline bool StreamData::has_stream_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void StreamData::set_has_stream_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void StreamData::clear_has_stream_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void StreamData::clear_stream_id() { + stream_id_ = 0u; + clear_has_stream_id(); +} +inline ::google::protobuf::uint32 StreamData::stream_id() const { + return stream_id_; +} +inline void StreamData::set_stream_id(::google::protobuf::uint32 value) { + set_has_stream_id(); + stream_id_ = value; +} + +// required .rsctrl.stream.StreamState stream_state = 2; +inline bool StreamData::has_stream_state() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void StreamData::set_has_stream_state() { + _has_bits_[0] |= 0x00000002u; +} +inline void StreamData::clear_has_stream_state() { + _has_bits_[0] &= ~0x00000002u; +} +inline void StreamData::clear_stream_state() { + stream_state_ = 0; + clear_has_stream_state(); +} +inline rsctrl::stream::StreamState StreamData::stream_state() const { + return static_cast< rsctrl::stream::StreamState >(stream_state_); +} +inline void StreamData::set_stream_state(rsctrl::stream::StreamState value) { + GOOGLE_DCHECK(rsctrl::stream::StreamState_IsValid(value)); + set_has_stream_state(); + stream_state_ = value; +} + +// required .rsctrl.core.Timestamp send_time = 3; +inline bool StreamData::has_send_time() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void StreamData::set_has_send_time() { + _has_bits_[0] |= 0x00000004u; +} +inline void StreamData::clear_has_send_time() { + _has_bits_[0] &= ~0x00000004u; +} +inline void StreamData::clear_send_time() { + if (send_time_ != NULL) send_time_->::rsctrl::core::Timestamp::Clear(); + clear_has_send_time(); +} +inline const ::rsctrl::core::Timestamp& StreamData::send_time() const { + return send_time_ != NULL ? *send_time_ : *default_instance_->send_time_; +} +inline ::rsctrl::core::Timestamp* StreamData::mutable_send_time() { + set_has_send_time(); + if (send_time_ == NULL) send_time_ = new ::rsctrl::core::Timestamp; + return send_time_; +} +inline ::rsctrl::core::Timestamp* StreamData::release_send_time() { + clear_has_send_time(); + ::rsctrl::core::Timestamp* temp = send_time_; + send_time_ = NULL; + return temp; +} + +// required uint64 offset = 4; +inline bool StreamData::has_offset() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void StreamData::set_has_offset() { + _has_bits_[0] |= 0x00000008u; +} +inline void StreamData::clear_has_offset() { + _has_bits_[0] &= ~0x00000008u; +} +inline void StreamData::clear_offset() { + offset_ = GOOGLE_ULONGLONG(0); + clear_has_offset(); +} +inline ::google::protobuf::uint64 StreamData::offset() const { + return offset_; +} +inline void StreamData::set_offset(::google::protobuf::uint64 value) { + set_has_offset(); + offset_ = value; +} + +// required uint32 size = 5; +inline bool StreamData::has_size() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void StreamData::set_has_size() { + _has_bits_[0] |= 0x00000010u; +} +inline void StreamData::clear_has_size() { + _has_bits_[0] &= ~0x00000010u; +} +inline void StreamData::clear_size() { + size_ = 0u; + clear_has_size(); +} +inline ::google::protobuf::uint32 StreamData::size() const { + return size_; +} +inline void StreamData::set_size(::google::protobuf::uint32 value) { + set_has_size(); + size_ = value; +} + +// required bytes stream_data = 6; +inline bool StreamData::has_stream_data() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void StreamData::set_has_stream_data() { + _has_bits_[0] |= 0x00000020u; +} +inline void StreamData::clear_has_stream_data() { + _has_bits_[0] &= ~0x00000020u; +} +inline void StreamData::clear_stream_data() { + if (stream_data_ != &::google::protobuf::internal::kEmptyString) { + stream_data_->clear(); + } + clear_has_stream_data(); +} +inline const ::std::string& StreamData::stream_data() const { + return *stream_data_; +} +inline void StreamData::set_stream_data(const ::std::string& value) { + set_has_stream_data(); + if (stream_data_ == &::google::protobuf::internal::kEmptyString) { + stream_data_ = new ::std::string; + } + stream_data_->assign(value); +} +inline void StreamData::set_stream_data(const char* value) { + set_has_stream_data(); + if (stream_data_ == &::google::protobuf::internal::kEmptyString) { + stream_data_ = new ::std::string; + } + stream_data_->assign(value); +} +inline void StreamData::set_stream_data(const void* value, size_t size) { + set_has_stream_data(); + if (stream_data_ == &::google::protobuf::internal::kEmptyString) { + stream_data_ = new ::std::string; + } + stream_data_->assign(reinterpret_cast(value), size); +} +inline ::std::string* StreamData::mutable_stream_data() { + set_has_stream_data(); + if (stream_data_ == &::google::protobuf::internal::kEmptyString) { + stream_data_ = new ::std::string; + } + return stream_data_; +} +inline ::std::string* StreamData::release_stream_data() { + clear_has_stream_data(); + if (stream_data_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = stream_data_; + stream_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// ------------------------------------------------------------------- + +// RequestStartFileStream + +// required .rsctrl.core.File file = 1; +inline bool RequestStartFileStream::has_file() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestStartFileStream::set_has_file() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestStartFileStream::clear_has_file() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestStartFileStream::clear_file() { + if (file_ != NULL) file_->::rsctrl::core::File::Clear(); + clear_has_file(); +} +inline const ::rsctrl::core::File& RequestStartFileStream::file() const { + return file_ != NULL ? *file_ : *default_instance_->file_; +} +inline ::rsctrl::core::File* RequestStartFileStream::mutable_file() { + set_has_file(); + if (file_ == NULL) file_ = new ::rsctrl::core::File; + return file_; +} +inline ::rsctrl::core::File* RequestStartFileStream::release_file() { + clear_has_file(); + ::rsctrl::core::File* temp = file_; + file_ = NULL; + return temp; +} + +// required float rate_kBs = 2; +inline bool RequestStartFileStream::has_rate_kbs() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void RequestStartFileStream::set_has_rate_kbs() { + _has_bits_[0] |= 0x00000002u; +} +inline void RequestStartFileStream::clear_has_rate_kbs() { + _has_bits_[0] &= ~0x00000002u; +} +inline void RequestStartFileStream::clear_rate_kbs() { + rate_kbs_ = 0; + clear_has_rate_kbs(); +} +inline float RequestStartFileStream::rate_kbs() const { + return rate_kbs_; +} +inline void RequestStartFileStream::set_rate_kbs(float value) { + set_has_rate_kbs(); + rate_kbs_ = value; +} + +// optional uint64 startByte = 3; +inline bool RequestStartFileStream::has_startbyte() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void RequestStartFileStream::set_has_startbyte() { + _has_bits_[0] |= 0x00000004u; +} +inline void RequestStartFileStream::clear_has_startbyte() { + _has_bits_[0] &= ~0x00000004u; +} +inline void RequestStartFileStream::clear_startbyte() { + startbyte_ = GOOGLE_ULONGLONG(0); + clear_has_startbyte(); +} +inline ::google::protobuf::uint64 RequestStartFileStream::startbyte() const { + return startbyte_; +} +inline void RequestStartFileStream::set_startbyte(::google::protobuf::uint64 value) { + set_has_startbyte(); + startbyte_ = value; +} + +// optional uint64 endByte = 4; +inline bool RequestStartFileStream::has_endbyte() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void RequestStartFileStream::set_has_endbyte() { + _has_bits_[0] |= 0x00000008u; +} +inline void RequestStartFileStream::clear_has_endbyte() { + _has_bits_[0] &= ~0x00000008u; +} +inline void RequestStartFileStream::clear_endbyte() { + endbyte_ = GOOGLE_ULONGLONG(0); + clear_has_endbyte(); +} +inline ::google::protobuf::uint64 RequestStartFileStream::endbyte() const { + return endbyte_; +} +inline void RequestStartFileStream::set_endbyte(::google::protobuf::uint64 value) { + set_has_endbyte(); + endbyte_ = value; +} + +// ------------------------------------------------------------------- + +// ResponseStreamDetail + +// required .rsctrl.core.Status status = 1; +inline bool ResponseStreamDetail::has_status() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ResponseStreamDetail::set_has_status() { + _has_bits_[0] |= 0x00000001u; +} +inline void ResponseStreamDetail::clear_has_status() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ResponseStreamDetail::clear_status() { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + clear_has_status(); +} +inline const ::rsctrl::core::Status& ResponseStreamDetail::status() const { + return status_ != NULL ? *status_ : *default_instance_->status_; +} +inline ::rsctrl::core::Status* ResponseStreamDetail::mutable_status() { + set_has_status(); + if (status_ == NULL) status_ = new ::rsctrl::core::Status; + return status_; +} +inline ::rsctrl::core::Status* ResponseStreamDetail::release_status() { + clear_has_status(); + ::rsctrl::core::Status* temp = status_; + status_ = NULL; + return temp; +} + +// repeated .rsctrl.stream.StreamDesc streams = 2; +inline int ResponseStreamDetail::streams_size() const { + return streams_.size(); +} +inline void ResponseStreamDetail::clear_streams() { + streams_.Clear(); +} +inline const ::rsctrl::stream::StreamDesc& ResponseStreamDetail::streams(int index) const { + return streams_.Get(index); +} +inline ::rsctrl::stream::StreamDesc* ResponseStreamDetail::mutable_streams(int index) { + return streams_.Mutable(index); +} +inline ::rsctrl::stream::StreamDesc* ResponseStreamDetail::add_streams() { + return streams_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::stream::StreamDesc >& +ResponseStreamDetail::streams() const { + return streams_; +} +inline ::google::protobuf::RepeatedPtrField< ::rsctrl::stream::StreamDesc >* +ResponseStreamDetail::mutable_streams() { + return &streams_; +} + +// ------------------------------------------------------------------- + +// RequestControlStream + +// required uint32 stream_id = 1; +inline bool RequestControlStream::has_stream_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestControlStream::set_has_stream_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestControlStream::clear_has_stream_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestControlStream::clear_stream_id() { + stream_id_ = 0u; + clear_has_stream_id(); +} +inline ::google::protobuf::uint32 RequestControlStream::stream_id() const { + return stream_id_; +} +inline void RequestControlStream::set_stream_id(::google::protobuf::uint32 value) { + set_has_stream_id(); + stream_id_ = value; +} + +// required .rsctrl.stream.RequestControlStream.StreamAction action = 2; +inline bool RequestControlStream::has_action() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void RequestControlStream::set_has_action() { + _has_bits_[0] |= 0x00000002u; +} +inline void RequestControlStream::clear_has_action() { + _has_bits_[0] &= ~0x00000002u; +} +inline void RequestControlStream::clear_action() { + action_ = 1; + clear_has_action(); +} +inline ::rsctrl::stream::RequestControlStream_StreamAction RequestControlStream::action() const { + return static_cast< ::rsctrl::stream::RequestControlStream_StreamAction >(action_); +} +inline void RequestControlStream::set_action(::rsctrl::stream::RequestControlStream_StreamAction value) { + GOOGLE_DCHECK(::rsctrl::stream::RequestControlStream_StreamAction_IsValid(value)); + set_has_action(); + action_ = value; +} + +// optional float rate_kBs = 3; +inline bool RequestControlStream::has_rate_kbs() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void RequestControlStream::set_has_rate_kbs() { + _has_bits_[0] |= 0x00000004u; +} +inline void RequestControlStream::clear_has_rate_kbs() { + _has_bits_[0] &= ~0x00000004u; +} +inline void RequestControlStream::clear_rate_kbs() { + rate_kbs_ = 0; + clear_has_rate_kbs(); +} +inline float RequestControlStream::rate_kbs() const { + return rate_kbs_; +} +inline void RequestControlStream::set_rate_kbs(float value) { + set_has_rate_kbs(); + rate_kbs_ = value; +} + +// optional int64 seek_byte = 4; +inline bool RequestControlStream::has_seek_byte() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void RequestControlStream::set_has_seek_byte() { + _has_bits_[0] |= 0x00000008u; +} +inline void RequestControlStream::clear_has_seek_byte() { + _has_bits_[0] &= ~0x00000008u; +} +inline void RequestControlStream::clear_seek_byte() { + seek_byte_ = GOOGLE_LONGLONG(0); + clear_has_seek_byte(); +} +inline ::google::protobuf::int64 RequestControlStream::seek_byte() const { + return seek_byte_; +} +inline void RequestControlStream::set_seek_byte(::google::protobuf::int64 value) { + set_has_seek_byte(); + seek_byte_ = value; +} + +// ------------------------------------------------------------------- + +// RequestListStreams + +// required .rsctrl.stream.StreamType request_type = 1; +inline bool RequestListStreams::has_request_type() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestListStreams::set_has_request_type() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestListStreams::clear_has_request_type() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestListStreams::clear_request_type() { + request_type_ = 1; + clear_has_request_type(); +} +inline rsctrl::stream::StreamType RequestListStreams::request_type() const { + return static_cast< rsctrl::stream::StreamType >(request_type_); +} +inline void RequestListStreams::set_request_type(rsctrl::stream::StreamType value) { + GOOGLE_DCHECK(rsctrl::stream::StreamType_IsValid(value)); + set_has_request_type(); + request_type_ = value; +} + +// ------------------------------------------------------------------- + +// ResponseStreamData + +// required .rsctrl.core.Status status = 1; +inline bool ResponseStreamData::has_status() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ResponseStreamData::set_has_status() { + _has_bits_[0] |= 0x00000001u; +} +inline void ResponseStreamData::clear_has_status() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ResponseStreamData::clear_status() { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + clear_has_status(); +} +inline const ::rsctrl::core::Status& ResponseStreamData::status() const { + return status_ != NULL ? *status_ : *default_instance_->status_; +} +inline ::rsctrl::core::Status* ResponseStreamData::mutable_status() { + set_has_status(); + if (status_ == NULL) status_ = new ::rsctrl::core::Status; + return status_; +} +inline ::rsctrl::core::Status* ResponseStreamData::release_status() { + clear_has_status(); + ::rsctrl::core::Status* temp = status_; + status_ = NULL; + return temp; +} + +// required .rsctrl.stream.StreamData data = 2; +inline bool ResponseStreamData::has_data() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ResponseStreamData::set_has_data() { + _has_bits_[0] |= 0x00000002u; +} +inline void ResponseStreamData::clear_has_data() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ResponseStreamData::clear_data() { + if (data_ != NULL) data_->::rsctrl::stream::StreamData::Clear(); + clear_has_data(); +} +inline const ::rsctrl::stream::StreamData& ResponseStreamData::data() const { + return data_ != NULL ? *data_ : *default_instance_->data_; +} +inline ::rsctrl::stream::StreamData* ResponseStreamData::mutable_data() { + set_has_data(); + if (data_ == NULL) data_ = new ::rsctrl::stream::StreamData; + return data_; +} +inline ::rsctrl::stream::StreamData* ResponseStreamData::release_data() { + clear_has_data(); + ::rsctrl::stream::StreamData* temp = data_; + data_ = NULL; + return temp; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace stream +} // namespace rsctrl + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::stream::RequestControlStream_StreamAction>() { + return ::rsctrl::stream::RequestControlStream_StreamAction_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::stream::RequestMsgIds>() { + return rsctrl::stream::RequestMsgIds_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::stream::ResponseMsgIds>() { + return rsctrl::stream::ResponseMsgIds_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::stream::StreamType>() { + return rsctrl::stream::StreamType_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::stream::StreamState>() { + return rsctrl::stream::StreamState_descriptor(); +} + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_stream_2eproto__INCLUDED diff --git a/retroshare-nogui/src/rpc/proto/rpcprotofiles.cc b/retroshare-nogui/src/rpc/proto/rpcprotofiles.cc index 6a523f899..7bd5e33d3 100644 --- a/retroshare-nogui/src/rpc/proto/rpcprotofiles.cc +++ b/retroshare-nogui/src/rpc/proto/rpcprotofiles.cc @@ -105,7 +105,7 @@ int RpcProtoFiles::processMsg(uint32_t chan_id, uint32_t msg_id, uint32_t req_id -int RpcProtoFiles::processReqTransferList(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +int RpcProtoFiles::processReqTransferList(uint32_t chan_id, uint32_t /* msg_id */, uint32_t req_id, const std::string &msg) { std::cerr << "RpcProtoFiles::processReqTransferList()"; std::cerr << std::endl; @@ -204,7 +204,7 @@ int RpcProtoFiles::processReqTransferList(uint32_t chan_id, uint32_t msg_id, uin return 1; } -int RpcProtoFiles::processReqControlDownload(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +int RpcProtoFiles::processReqControlDownload(uint32_t chan_id, uint32_t /* msg_id */, uint32_t req_id, const std::string &msg) { std::cerr << "RpcProtoFiles::processReqControlDownload()"; std::cerr << std::endl; diff --git a/retroshare-nogui/src/rpc/proto/rpcprotopeers.cc b/retroshare-nogui/src/rpc/proto/rpcprotopeers.cc index 1c97149e2..712ea482b 100644 --- a/retroshare-nogui/src/rpc/proto/rpcprotopeers.cc +++ b/retroshare-nogui/src/rpc/proto/rpcprotopeers.cc @@ -30,6 +30,9 @@ #include #include +bool load_person_details(std::string pgp_id, rsctrl::core::Person *person, + bool getLocations, bool onlyConnected); + RpcProtoPeers::RpcProtoPeers(uint32_t serviceId) :RpcQueueService(serviceId) { @@ -88,6 +91,9 @@ int RpcProtoPeers::processMsg(uint32_t chan_id, uint32_t msg_id, uint32_t req_id case rsctrl::peers::MsgId_RequestAddPeer: processAddPeer(chan_id, msg_id, req_id, msg); break; + case rsctrl::peers::MsgId_RequestExaminePeer: + processExaminePeer(chan_id, msg_id, req_id, msg); + break; case rsctrl::peers::MsgId_RequestModifyPeer: processModifyPeer(chan_id, msg_id, req_id, msg); break; @@ -102,15 +108,135 @@ int RpcProtoPeers::processMsg(uint32_t chan_id, uint32_t msg_id, uint32_t req_id } -int RpcProtoPeers::processAddPeer(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +int RpcProtoPeers::processAddPeer(uint32_t chan_id, uint32_t /* msg_id */, uint32_t req_id, const std::string &msg) { - std::cerr << "RpcProtoPeers::processAddPeer() NOT FINISHED"; + std::cerr << "RpcProtoPeers::processAddPeer()"; std::cerr << std::endl; + + // parse msg. + rsctrl::peers::RequestAddPeer req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoPeers::processAddPeer() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + // response. - rsctrl::peers::ResponseAddPeer resp; + rsctrl::peers::ResponsePeerList resp; + bool success = true; + std::string errorMsg; + + /* check if the gpg_id is valid */ + std::string pgp_id = req.pgp_id(); + std::string ssl_id; + if (req.has_ssl_id()) + { + ssl_id = req.ssl_id(); + } + + RsPeerDetails details; + if (!rsPeers->getGPGDetails(pgp_id, details)) + { + success = false; + errorMsg = "Invalid PGP ID"; + } + else + { + switch(req.cmd()) + { + default: + success = false; + errorMsg = "Invalid AddCmd"; + break; + case rsctrl::peers::RequestAddPeer::ADD: + + // TODO. NEED TO HANDLE SERVICE PERMISSION FLAGS. + success = rsPeers->addFriend(ssl_id,pgp_id, RS_SERVICE_PERM_ALL); + + break; + case rsctrl::peers::RequestAddPeer::REMOVE: + + success = rsPeers->removeFriend(pgp_id); + break; + } + + if (success) + { + rsctrl::core::Person *person = resp.add_peers(); + load_person_details(pgp_id, person, true, false); + } + } + + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::NO_IMPL_YET); + } + + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoPeers::processAddPeer() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::PEERS, + rsctrl::peers::MsgId_ResponsePeerList, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + + return 1; +} + + +int RpcProtoPeers::processExaminePeer(uint32_t chan_id, uint32_t /* msg_id */, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoPeers::processExaminePeer() NOT FINISHED"; + std::cerr << std::endl; + + + // parse msg. + rsctrl::peers::RequestExaminePeer req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoPeers::processExaminePeer() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::peers::ResponsePeerList resp; bool success = false; + if (success) + { + switch(req.cmd()) + { + default: + success = false; + break; + case rsctrl::peers::RequestExaminePeer::IMPORT: + break; + case rsctrl::peers::RequestExaminePeer::EXAMINE: + + // Gets the GPG details, but does not add the key to the keyring. + //virtual bool loadDetailsFromStringCert(const std::string& certGPG, RsPeerDetails &pd,uint32_t& error_code) = 0; + + break; + } + } + if (success) { rsctrl::core::Status *status = resp.mutable_status(); @@ -133,7 +259,7 @@ int RpcProtoPeers::processAddPeer(uint32_t chan_id, uint32_t msg_id, uint32_t re // Correctly Name Message. uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::PEERS, - rsctrl::peers::MsgId_ResponseAddPeer, true); + rsctrl::peers::MsgId_ResponsePeerList, true); // queue it. queueResponse(chan_id, out_msg_id, req_id, outmsg); @@ -142,14 +268,24 @@ int RpcProtoPeers::processAddPeer(uint32_t chan_id, uint32_t msg_id, uint32_t re } -int RpcProtoPeers::processModifyPeer(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +int RpcProtoPeers::processModifyPeer(uint32_t chan_id, uint32_t /* msg_id */, uint32_t req_id, const std::string &msg) { std::cerr << "RpcProtoPeers::processModifyPeer() NOT FINISHED"; std::cerr << std::endl; + // parse msg. + rsctrl::peers::RequestModifyPeer req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoPeers::processModifyPeer() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. - rsctrl::peers::ResponseModifyPeer resp; + rsctrl::peers::ResponsePeerList resp; bool success = false; if (success) @@ -174,7 +310,7 @@ int RpcProtoPeers::processModifyPeer(uint32_t chan_id, uint32_t msg_id, uint32_t // Correctly Name Message. uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::PEERS, - rsctrl::peers::MsgId_ResponseModifyPeer, true); + rsctrl::peers::MsgId_ResponsePeerList, true); // queue it. queueResponse(chan_id, out_msg_id, req_id, outmsg); @@ -184,7 +320,7 @@ int RpcProtoPeers::processModifyPeer(uint32_t chan_id, uint32_t msg_id, uint32_t -int RpcProtoPeers::processRequestPeers(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +int RpcProtoPeers::processRequestPeers(uint32_t chan_id, uint32_t /* msg_id */, uint32_t req_id, const std::string &msg) { std::cerr << "RpcProtoPeers::processRequestPeers()"; std::cerr << std::endl; @@ -198,10 +334,14 @@ int RpcProtoPeers::processRequestPeers(uint32_t chan_id, uint32_t msg_id, uint32 return 0; } + // response. + rsctrl::peers::ResponsePeerList respp; + bool success = true; + std::string errorMsg; + // Get the list of gpg_id to generate data for. std::list ids; bool onlyConnected = false; - bool success = true; switch(reqp.set()) { case rsctrl::peers::RequestPeers::OWNID: @@ -216,10 +356,10 @@ int RpcProtoPeers::processRequestPeers(uint32_t chan_id, uint32_t msg_id, uint32 { std::cerr << "RpcProtoPeers::processRequestPeers() LISTED"; std::cerr << std::endl; - int no_gpg_ids = reqp.gpg_ids_size(); - for (int i = 0; i < no_gpg_ids; i++) + int no_pgp_ids = reqp.pgp_ids_size(); + for (int i = 0; i < no_pgp_ids; i++) { - std::string listed_id = reqp.gpg_ids(i); + std::string listed_id = reqp.pgp_ids(i); std::cerr << "RpcProtoPeers::processRequestPeers() Adding Id: " << listed_id; std::cerr << std::endl; ids.push_back(listed_id); @@ -286,137 +426,21 @@ int RpcProtoPeers::processRequestPeers(uint32_t chan_id, uint32_t msg_id, uint32 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)) + rsctrl::core::Person *person = respp.add_peers(); + if (!load_person_details(*git, person, getLocations, onlyConnected)) { std::cerr << "RpcProtoPeers::processRequestPeers() ERROR Finding GPGID: "; std::cerr << *git; std::cerr << std::endl; - continue; /* uhm.. */ - } - rsctrl::core::Person *person = respp.add_peers(); - - /* fill in key gpg details */ - person->set_gpg_id(*git); - person->set_name(details.name); - - std::cerr << "RpcProtoPeers::processRequestPeers() Adding GPGID: "; - std::cerr << *git << " name: " << details.name; - std::cerr << std::endl; - - //if (details.state & RS_PEER_STATE_FRIEND) - if (*git == rsPeers->getGPGOwnId()) - { - std::cerr << "RpcProtoPeers::processRequestPeers() Relation YOURSELF"; - std::cerr << std::endl; - person->set_relation(rsctrl::core::Person::YOURSELF); - } - else if (rsPeers->isGPGAccepted(*git)) - { - std::cerr << "RpcProtoPeers::processRequestPeers() Relation FRIEND"; - std::cerr << std::endl; - person->set_relation(rsctrl::core::Person::FRIEND); - } - else - { - std::list common_friends; - rsDisc->getDiscGPGFriends(*git, common_friends); - int size = common_friends.size(); - if (size) - { - if (size > 2) - { - std::cerr << "RpcProtoPeers::processRequestPeers() Relation FRIEND_OF_MANY_FRIENDS"; - std::cerr << std::endl; - person->set_relation(rsctrl::core::Person::FRIEND_OF_MANY_FRIENDS); - } - else - { - std::cerr << "RpcProtoPeers::processRequestPeers() Relation FRIEND_OF_FRIENDS"; - std::cerr << std::endl; - person->set_relation(rsctrl::core::Person::FRIEND_OF_FRIENDS); - } - } - else - { - std::cerr << "RpcProtoPeers::processRequestPeers() Relation UNKNOWN"; - std::cerr << std::endl; - person->set_relation(rsctrl::core::Person::UNKNOWN); - } - } - - if (getLocations) - { - std::list ssl_ids; - std::list::const_iterator sit; - - if (!rsPeers->getAssociatedSSLIds(*git, ssl_ids)) - { - std::cerr << "RpcProtoPeers::processRequestPeers() No Locations"; - std::cerr << std::endl; - continue; /* end of this peer */ - } - - for(sit = ssl_ids.begin(); sit != ssl_ids.end(); sit++) - { - RsPeerDetails ssldetails; - if (!rsPeers->getPeerDetails(*sit, ssldetails)) - { - continue; /* uhm.. */ - } - if ((onlyConnected) && - (!(ssldetails.state & RS_PEER_STATE_CONNECTED))) - { - continue; - } - - rsctrl::core::Location *loc = person->add_locations(); - - std::cerr << "RpcProtoPeers::processRequestPeers() \t Adding Location: "; - std::cerr << *sit << " loc: " << ssldetails.location; - std::cerr << std::endl; - - /* fill in ssl details */ - loc->set_ssl_id(*sit); - loc->set_location(ssldetails.location); - - /* set addresses */ - rsctrl::core::IpAddr *laddr = loc->mutable_localaddr(); - laddr->set_addr(ssldetails.localAddr); - laddr->set_port(ssldetails.localPort); - - rsctrl::core::IpAddr *eaddr = loc->mutable_extaddr(); - eaddr->set_addr(ssldetails.extAddr); - eaddr->set_port(ssldetails.extPort); - - /* translate status */ - uint32_t loc_state = 0; - //dont think this state should be here. - //if (ssldetails.state & RS_PEER_STATE_FRIEND) - if (ssldetails.state & RS_PEER_STATE_ONLINE) - { - loc_state |= (uint32_t) rsctrl::core::Location::ONLINE; - } - if (ssldetails.state & RS_PEER_STATE_CONNECTED) - { - loc_state |= (uint32_t) rsctrl::core::Location::CONNECTED; - } - if (ssldetails.state & RS_PEER_STATE_UNREACHABLE) - { - loc_state |= (uint32_t) rsctrl::core::Location::UNREACHABLE; - } - - loc->set_state(loc_state); - } + /* cleanup peers */ + success = false; + errorMsg = "Error Loading PeerID"; } } @@ -429,7 +453,7 @@ int RpcProtoPeers::processRequestPeers(uint32_t chan_id, uint32_t msg_id, uint32 { rsctrl::core::Status *status = respp.mutable_status(); status->set_code(rsctrl::core::Status::FAILED); - status->set_msg("Unknown ERROR"); + status->set_msg(errorMsg); } @@ -452,3 +476,135 @@ int RpcProtoPeers::processRequestPeers(uint32_t chan_id, uint32_t msg_id, uint32 } + + + +bool load_person_details(std::string pgp_id, rsctrl::core::Person *person, + bool getLocations, bool onlyConnected) +{ + RsPeerDetails details; + if (!rsPeers->getGPGDetails(pgp_id, details)) + { + std::cerr << "RpcProtoPeers::processRequestPeers() ERROR Finding GPGID: "; + std::cerr << pgp_id; + std::cerr << std::endl; + return false; + } + + /* fill in key gpg details */ + person->set_gpg_id(pgp_id); + person->set_name(details.name); + + std::cerr << "RpcProtoPeers::processRequestPeers() Adding GPGID: "; + std::cerr << pgp_id << " name: " << details.name; + std::cerr << std::endl; + + //if (details.state & RS_PEER_STATE_FRIEND) + if (pgp_id == rsPeers->getGPGOwnId()) + { + std::cerr << "RpcProtoPeers::processRequestPeers() Relation YOURSELF"; + std::cerr << std::endl; + person->set_relation(rsctrl::core::Person::YOURSELF); + } + else if (rsPeers->isGPGAccepted(pgp_id)) + { + std::cerr << "RpcProtoPeers::processRequestPeers() Relation FRIEND"; + std::cerr << std::endl; + person->set_relation(rsctrl::core::Person::FRIEND); + } + else + { + std::list common_friends; + rsDisc->getDiscGPGFriends(pgp_id, common_friends); + int size = common_friends.size(); + if (size) + { + if (size > 2) + { + std::cerr << "RpcProtoPeers::processRequestPeers() Relation FRIEND_OF_MANY_FRIENDS"; + std::cerr << std::endl; + person->set_relation(rsctrl::core::Person::FRIEND_OF_MANY_FRIENDS); + } + else + { + std::cerr << "RpcProtoPeers::processRequestPeers() Relation FRIEND_OF_FRIENDS"; + std::cerr << std::endl; + person->set_relation(rsctrl::core::Person::FRIEND_OF_FRIENDS); + } + } + else + { + std::cerr << "RpcProtoPeers::processRequestPeers() Relation UNKNOWN"; + std::cerr << std::endl; + person->set_relation(rsctrl::core::Person::UNKNOWN); + } + } + + if (getLocations) + { + std::list ssl_ids; + std::list::const_iterator sit; + + if (!rsPeers->getAssociatedSSLIds(pgp_id, ssl_ids)) + { + std::cerr << "RpcProtoPeers::processRequestPeers() No Locations"; + std::cerr << std::endl; + return true; /* end of this peer */ + } + + for(sit = ssl_ids.begin(); sit != ssl_ids.end(); sit++) + { + RsPeerDetails ssldetails; + if (!rsPeers->getPeerDetails(*sit, ssldetails)) + { + continue; /* uhm.. */ + } + if ((onlyConnected) && + (!(ssldetails.state & RS_PEER_STATE_CONNECTED))) + { + continue; + } + + rsctrl::core::Location *loc = person->add_locations(); + + std::cerr << "RpcProtoPeers::processRequestPeers() \t Adding Location: "; + std::cerr << *sit << " loc: " << ssldetails.location; + std::cerr << std::endl; + + /* fill in ssl details */ + loc->set_ssl_id(*sit); + loc->set_location(ssldetails.location); + + /* set addresses */ + rsctrl::core::IpAddr *laddr = loc->mutable_localaddr(); + laddr->set_addr(ssldetails.localAddr); + laddr->set_port(ssldetails.localPort); + + rsctrl::core::IpAddr *eaddr = loc->mutable_extaddr(); + eaddr->set_addr(ssldetails.extAddr); + eaddr->set_port(ssldetails.extPort); + + /* translate status */ + uint32_t loc_state = 0; + //dont think this state should be here. + //if (ssldetails.state & RS_PEER_STATE_FRIEND) + if (ssldetails.state & RS_PEER_STATE_ONLINE) + { + loc_state |= (uint32_t) rsctrl::core::Location::ONLINE; + } + if (ssldetails.state & RS_PEER_STATE_CONNECTED) + { + loc_state |= (uint32_t) rsctrl::core::Location::CONNECTED; + } + if (ssldetails.state & RS_PEER_STATE_UNREACHABLE) + { + loc_state |= (uint32_t) rsctrl::core::Location::UNREACHABLE; + } + + loc->set_state(loc_state); + } + } + return true; /* end of this peer */ +} + + diff --git a/retroshare-nogui/src/rpc/proto/rpcprotopeers.h b/retroshare-nogui/src/rpc/proto/rpcprotopeers.h index 92e91d88a..7e15e0b07 100644 --- a/retroshare-nogui/src/rpc/proto/rpcprotopeers.h +++ b/retroshare-nogui/src/rpc/proto/rpcprotopeers.h @@ -36,6 +36,9 @@ public: virtual int processRequestPeers(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); virtual int processAddPeer(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + + // these aren't implemented yet. + virtual int processExaminePeer(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); virtual int processModifyPeer(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); }; diff --git a/retroshare-nogui/src/rpc/proto/rpcprotostream.cc b/retroshare-nogui/src/rpc/proto/rpcprotostream.cc new file mode 100644 index 000000000..1701792cd --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/rpcprotostream.cc @@ -0,0 +1,693 @@ +/* + * 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/rpcprotochat.h" +#include "rpc/proto/gencc/chat.pb.h" + +#include +#include +#include + +#include "util/rsstring.h" + +#include + +#include +#include + +#include + + +bool fill_stream_details(rsctrl::stream::ResponseStreamDetail &resp, + const std::list &streams); +bool fill_stream_detail(rsctrl::stream::StreamDetail &detail, + const RpcStream &stream); + +// Helper Functions -> maybe move to libretroshare/utils ?? +bool convertUTF8toWString(const std::string &msg_utf8, std::wstring &msg_wstr); +bool convertWStringToUTF8(const std::wstring &msg_wstr, std::string &msg_utf8); + +bool convertStringToLobbyId(const std::string &chat_id, ChatLobbyId &lobby_id); +bool convertLobbyIdToString(const ChatLobbyId &lobby_id, std::string &chat_id); + +bool fillLobbyInfoFromChatLobbyInfo(const ChatLobbyInfo &cfi, rsctrl::stream::ChatLobbyInfo *lobby); +bool fillLobbyInfoFromVisibleChatLobbyRecord(const VisibleChatLobbyRecord &pclr, rsctrl::stream::ChatLobbyInfo *lobby); +bool fillLobbyInfoFromChatLobbyInvite(const ChatLobbyInvite &cli, rsctrl::stream::ChatLobbyInfo *lobby); + +bool fillChatMessageFromHistoryMsg(const HistoryMsg &histmsg, rsctrl::stream::ChatMessage *rpcmsg); + +bool createQueuedEventSendMsg(const ChatInfo &chatinfo, rsctrl::stream::ChatType ctype, + std::string chat_id, const RpcEventRegister &ereg, RpcQueuedMsg &qmsg); + + +RpcProtoStream::RpcProtoStream(uint32_t serviceId) + :RpcQueueService(serviceId) +{ + return; +} + +//RpcProtoStream::msgsAccepted(std::list &msgIds); /* not used at the moment */ + +int RpcProtoStream::processMsg(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +{ + /* check the msgId */ + uint8_t topbyte = getRpcMsgIdExtension(msg_id); + uint16_t service = getRpcMsgIdService(msg_id); + uint8_t submsg = getRpcMsgIdSubMsg(msg_id); + bool isResponse = isRpcMsgIdResponse(msg_id); + + + std::cerr << "RpcProtoStream::processMsg() topbyte: " << (int32_t) topbyte; + std::cerr << " service: " << (int32_t) service << " submsg: " << (int32_t) submsg; + std::cerr << std::endl; + + if (isResponse) + { + std::cerr << "RpcProtoStream::processMsg() isResponse() - not processing"; + std::cerr << std::endl; + return 0; + } + + if (topbyte != (uint8_t) rsctrl::core::CORE) + { + std::cerr << "RpcProtoStream::processMsg() Extension Mismatch - not processing"; + std::cerr << std::endl; + return 0; + } + + if (service != (uint16_t) rsctrl::core::STREAM) + { + std::cerr << "RpcProtoStream::processMsg() Service Mismatch - not processing"; + std::cerr << std::endl; + return 0; + } + + if (!rsctrl::stream::RequestMsgIds_IsValid(submsg)) + { + std::cerr << "RpcProtoStream::processMsg() SubMsg Mismatch - not processing"; + std::cerr << std::endl; + return 0; + } + + switch(submsg) + { + + case rsctrl::stream::MsgId_RequestStartFileStream: + processReqStartFileStream(chan_id, msg_id, req_id, msg); + break; + + case rsctrl::stream::MsgId_RequestCreateLobby: + processReqControlStream(chan_id, msg_id, req_id, msg); + break; + + case rsctrl::stream::MsgId_RequestJoinOrLeaveLobby: + processReqListStreams(chan_id, msg_id, req_id, msg); + break; + + case rsctrl::stream::MsgId_RequestRegisterStreams: + processReqRegisterStreams(chan_id, msg_id, req_id, msg); + break; + + default: + std::cerr << "RpcProtoStream::processMsg() ERROR should never get here"; + std::cerr << std::endl; + return 0; + } + + /* must have matched id to get here */ + return 1; +} + + + +int RpcProtoStream::processReqStartFileStream(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoStream::processReqStartFileStream()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::stream::RequestStartFileStream req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoStream::processReqStartFileStream() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::stream::ResponseStreamDetail resp; + bool success = true; + std::string errorMsg; + + + // SETUP STREAM. + + // FIND the FILE. + Expression * exp; + std::list results; + FileSearchFlags flags; + int ans = rsFiles->SearchBoolExp(exp, results, flags); + + // CREATE A STREAM OBJECT. + if (results.size() < 1) + { + success = false; + errorMsg = "No Matching File"; + } + else + { + RpcStream stream; + + stream.chan_id = chan_id; + stream.stream_id = getNextStreamId(); + stream.state = RUNNING; + + stream.path = ... // from results. + stream.offset = 0; + stream.length = file.size; + stream.start_byte = 0; + stream.end_byte = stream.length; + + stream.desired_rate = req.rate_kBs; + + // make response + rsctrl::stream::StreamDetail &detail = resp.streams_add(); + if (!fill_stream_detail(detail, stream)) + { + success = false; + errorMsg = "Failed to Invalid Action"; + } + else + { + // insert. + mStreams[stream.stream_id] = stream; + } + + } + + /* DONE - Generate Reply */ + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoStream::processReqStartFileStream() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::STREAM, + rsctrl::stream::MsgId_ResponseStreamDetail, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + return 1; +} + + + +int RpcProtoStream::processReqControlStream(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoStream::processReqControlStream()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::stream::RequestControlStream req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoStream::processReqControlStream() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::stream::ResponseStreamDetail resp; + bool success = true; + std::string errorMsg; + + // FIND MATCHING STREAM. + std::map::iterator it; + it = mStreams.find(resp.stream_id); + if (it != mStreams.end()) + { + // TWEAK + // FILL IN REPLY. + // DONE. + + switch(resp.action) + { + case STREAM_START: + if (it->state == PAUSED) + { + it->state = RUNNING; + } + break; + case STREAM_STOP: + it->state = FINISHED; + break; + case STREAM_PAUSE: + if (it->state == RUNNING) + { + it->state = PAUSED; + } + break; + case STREAM_CHANGE_RATE: + it->desired_rate = req.rate_kBs; + break; + case STREAM_SEEK: + if (req.seek_byte < it-> endByte) + { + it->offset = req.seek_byte; + } + break; + default: + success = false; + errorMsg = "Invalid Action"; + } + + if (success) + { + rsctrl::stream::StreamDetail &detail = resp.streams_add(); + if (!fill_stream_detail(detail, it->second)) + { + success = false; + errorMsg = "Invalid Action"; + } + } + } + else + { + success = false; + errorMsg = "No Matching Stream"; + } + + /* DONE - Generate Reply */ + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoStream::processReqControlStream() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::STREAM, + rsctrl::stream::MsgId_ResponseStreamDetail, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + + return 1; +} + + + +int RpcProtoStream::processReqListStreams(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoStream::processReqListStreams()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::stream::RequestListStreams req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoStream::processReqListStreams() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::stream::ResponseStreamDetail resp; + bool success = false; + std::string errorMsg; + + + + for(it = mStreams.begin(); it != mStreams.end(); it++) + { + /* check that it matches */ + if (! match) + { + continue; + } + + rsctrl::stream::StreamDetail &detail = resp.streams_add(); + if (!fill_stream_detail(detail, it->second)) + { + success = false; + errorMsg = "Some Details Failed to Fill"; + } + } + + /* DONE - Generate Reply */ + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoStream::processReqListStreams() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::STREAM, + rsctrl::stream::MsgId_ResponseStreamDetail, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + return 1; +} + + + + + +int RpcProtoStream::processReqRegisterStreams(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoStream::processReqRegisterStreams()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::stream::RequestRegisterStreams req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoStream::processReqRegisterStreams() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::stream::ResponseRegisterStreams resp; + bool success = true; + bool doregister = false; + std::string errorMsg; + + switch(req.action()) + { + case rsctrl::stream::RequestRegisterStreams::REGISTER: + doregister = true; + break; + case rsctrl::stream::RequestRegisterStreams::DEREGISTER: + doregister = false; + break; + default: + std::cerr << "ERROR action is invalid"; + std::cerr << std::endl; + + success = false; + errorMsg = "RegisterStreams.Action is invalid"; + break; + } + + if (success) + { + if (doregister) + { + std::cerr << "Registering for Streams"; + std::cerr << std::endl; + + registerForEvents(chan_id, req_id, REGISTRATION_STREAMS); + } + else + { + std::cerr << "Deregistering for Streams"; + std::cerr << std::endl; + + deregisterForEvents(chan_id, req_id, REGISTRATION_STREAMS); + } + printEventRegister(std::cerr); + } + + + /* DONE - Generate Reply */ + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoStream::processReqCreateLobbies() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::STREAM, + rsctrl::stream::MsgId_ResponseRegisterStreams, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + return 1; +} + + + + + // EVENTS. (STREAMS) +int RpcProtoStream::locked_checkForEvents(uint32_t event, const std::list ®istered, std::list &stream_msgs) +{ + /* Wow - here already! */ + std::cerr << "locked_checkForEvents()"; + std::cerr << std::endl; + + /* only one event type for now */ + if (event != REGISTRATION_STREAMS) + { + std::cerr << "ERROR Invalid Stream Event Type"; + std::cerr << std::endl; + + /* error */ + return 0; + } + + /* iterate through streams, and get next chunk of data. + * package up and send it. + * NOTE we'll have to something more complex for VoIP! + */ + + float ts = getTimeStamp(); + float dt = ts - mStreamRates.last_ts; + uint32_t data_sent = 0; + +#define FILTER_K (0.75) + + if (mStreamRates.last_ts != 0) + { + mStreamRates.avg_dt = FILTER_K * mStreamRates.avg_dt + + (1.0 - FILTER_K) * dt; + } + else + { + mStreamRates.avg_dt = dt; + } + mStreamRates.last_ts = ts; + + + std::list to_remove; + std::map::iterator it; + for(it = mStreams.begin(); it != mStreams.end(); it++) + { + RpcStream &stream = it->second; + + if (stream.state == PAUSED) + { + continue; + } + + /* we ignore the Events Register... just use stream info, */ + int channel_id = stream.chan_id; + uint32_t size = stream.desired_rate * mStreamRates.avg_dt; + + /* get data */ + uint64_t remaining = stream.end_byte - stream.offset; + if (remaining < size) + { + size = remaining; + stream.state = FINISHED; + to_remove.push_back(it->first); + } + + + /* fill in the answer */ + + StreamData data; + data.stream_id = stream.stream_id; + data.stream_state = stream.state; + data.send_time = getTimeStamp(); + data.offset = stream.offset; + data.size = size; + + fill_stream_data(stream, data); + + + + + RpcQueuedMsg qmsg; + rsctrl::stream::ChatType ctype = rsctrl::stream::TYPE_GROUP; + std::string chat_id = ""; // No ID for group. + + if (createQueuedEventSendMsg(*it, ctype, chat_id, *rit, qmsg)) + { + std::cerr << "Created MsgEvent"; + std::cerr << std::endl; + + events.push_back(qmsg); + } + else + { + std::cerr << "ERROR Creating MsgEvent"; + std::cerr << std::endl; + } + } + + std::list::iterator rit; + for(rit = to_remove.begin(); rit != to_remove.end(); rit++) + { + /* kill the stream! */ + it = mStreams.find(*rit); + if (it != mStreams.end()) + { + mStreams.erase(it); + } + } + + return 1; +} + + +/***** HELPER FUNCTIONS *****/ + + +bool createQueuedEventSendMsg(const ChatInfo &chatinfo, rsctrl::stream::ChatType ctype, + std::string chat_id, const RpcEventRegister &ereg, RpcQueuedMsg &qmsg) +{ + + rsctrl::stream::EventChatMessage event; + rsctrl::stream::ChatMessage *msg = event.mutable_msg(); + rsctrl::stream::ChatId *id = msg->mutable_id(); + + id->set_chat_type(ctype); + id->set_chat_id(chat_id); + + msg->set_peer_nickname(chatinfo.peer_nickname); + msg->set_chat_flags(chatinfo.chatflags); + msg->set_send_time(chatinfo.sendTime); + msg->set_recv_time(chatinfo.recvTime); + + std::string msg_utf8; + if (!convertWStringToUTF8(chatinfo.msg, msg_utf8)) + { + std::cerr << "RpcProtoStream::createQueuedEventSendMsg() ERROR Converting Msg"; + std::cerr << std::endl; + return false; + } + + msg->set_msg(msg_utf8); + + /* DONE - Generate Reply */ + std::string outmsg; + if (!event.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoStream::createQueuedEventSendMsg() ERROR SerialiseToString()"; + std::cerr << std::endl; + return false; + } + + // Correctly Name Message. + qmsg.mMsgId = constructMsgId(rsctrl::core::CORE, rsctrl::core::CHAT, + rsctrl::stream::MsgId_EventChatMessage, true); + + qmsg.mChanId = ereg.mChanId; + qmsg.mReqId = ereg.mReqId; + qmsg.mMsg = outmsg; + + return true; +} + + +/****************** NEW HELPER FNS ******************/ + +bool fill_stream_details(rsctrl::stream::ResponseStreamDetail &resp, + const std::list &streams) +{ + std::list::const_iterator it; + for (it = streams.begin(); it != streams.end(); it++) + { + rsctrl::stream::StreamDetail &detail = resp.streams_add(); + fill_stream_detail(detail, *it); + } + + return val; +} + +bool fill_stream_detail(rsctrl::stream::StreamDetail &detail, + const RpcStream &stream) +{ + + + +} + diff --git a/retroshare-nogui/src/rpc/proto/rpcprotostream.h b/retroshare-nogui/src/rpc/proto/rpcprotostream.h new file mode 100644 index 000000000..15c4f84a2 --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/rpcprotostream.h @@ -0,0 +1,88 @@ +/* + * 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_STREAM_H +#define RS_RPC_PROTO_STREAM_H + +#include "rpc/rpcserver.h" + +// Registrations. +#define REGISTRATION_STREAMS 1 + +class RpcStream +{ + public: + uint32_t chan_id; + uint32_t stream_id; + uint32_t state; + std::string path; + uint64_t offset; // where we currently are. + uint64_t length; // filesize. + + uint64_t start_byte; + uint64_t end_byte; + + float desired_rate; // Kb/s +}; + + +class RpcStreamRates +{ + public: + + float avg_data_rate; + float avg_dt; + + float last_data_rate; + float last_ts; +}; + + + + +class RpcProtoStream: public RpcQueueService +{ +public: + RpcProtoStream(uint32_t serviceId); + virtual int processMsg(uint32_t chan_id, uint32_t msgId, uint32_t req_id, const std::string &msg); + +protected: + + int processReqStartFileStream(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + int processReqControlStream(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + int processReqListStreams(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + int processReqRegisterStreams(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + + + + RpcStreamRates mStreamRates; + std::map mStreams; + + // EVENTS. + virtual int locked_checkForEvents(uint32_t event, const std::list ®istered, std::list &events); + +}; + + +#endif /* RS_PROTO_STREAM_H */ diff --git a/retroshare-nogui/src/rpc/proto/rpcprotosystem.cc b/retroshare-nogui/src/rpc/proto/rpcprotosystem.cc index 265840725..084ca9502 100644 --- a/retroshare-nogui/src/rpc/proto/rpcprotosystem.cc +++ b/retroshare-nogui/src/rpc/proto/rpcprotosystem.cc @@ -109,7 +109,7 @@ int RpcProtoSystem::processMsg(uint32_t chan_id, uint32_t msg_id, uint32_t req_i } -int RpcProtoSystem::processSystemStatus(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +int RpcProtoSystem::processSystemStatus(uint32_t chan_id, uint32_t /* msg_id */, uint32_t req_id, const std::string &msg) { std::cerr << "RpcProtoSystem::processSystemStatus()"; std::cerr << std::endl; @@ -224,7 +224,7 @@ int RpcProtoSystem::processSystemStatus(uint32_t chan_id, uint32_t msg_id, uint3 -int RpcProtoSystem::processSystemQuit(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +int RpcProtoSystem::processSystemQuit(uint32_t chan_id, uint32_t /* msg_id */, uint32_t req_id, const std::string &msg) { std::cerr << "RpcProtoSystem::processSystemQuit()"; std::cerr << std::endl; @@ -291,7 +291,7 @@ int RpcProtoSystem::processSystemQuit(uint32_t chan_id, uint32_t msg_id, uint32_ } -int RpcProtoSystem::processSystemExternalAccess(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +int RpcProtoSystem::processSystemExternalAccess(uint32_t chan_id, uint32_t /* msg_id */, uint32_t req_id, const std::string &msg) { std::cerr << "RpcProtoSystem::processSystemExternalAccess()"; std::cerr << std::endl;