Page MenuHomePhabricator

D5173.id16938.diff
No OneTemporary

D5173.id16938.diff

diff --git a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp
--- a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp
+++ b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp
@@ -16,7 +16,7 @@
}
std::lock_guard<std::mutex> guard{this->onReadDoneCallbackMutex};
if (this->onReadDoneCallback) {
- this->onReadDoneCallback(this->response.payload());
+ this->onReadDoneCallback(this->response.responsemessage().payload());
}
StartRead(&(this->response));
}
diff --git a/services/tunnelbroker/src/Service/TunnelbrokerServiceImpl.cpp b/services/tunnelbroker/src/Service/TunnelbrokerServiceImpl.cpp
--- a/services/tunnelbroker/src/Service/TunnelbrokerServiceImpl.cpp
+++ b/services/tunnelbroker/src/Service/TunnelbrokerServiceImpl.cpp
@@ -197,8 +197,8 @@
tunnelbroker::GetResponse response;
auto respondToWriter =
[&writer, &response](std::string fromDeviceID, std::string payload) {
- response.set_fromdeviceid(fromDeviceID);
- response.set_payload(payload);
+ response.mutable_responsemessage()->set_fromdeviceid(fromDeviceID);
+ response.mutable_responsemessage()->set_payload(payload);
if (!writer->Write(response)) {
throw std::runtime_error(
"gRPC: 'Get' writer error on sending data to the client");
diff --git a/shared/protos/_generated/tunnelbroker.pb.h b/shared/protos/_generated/tunnelbroker.pb.h
--- a/shared/protos/_generated/tunnelbroker.pb.h
+++ b/shared/protos/_generated/tunnelbroker.pb.h
@@ -48,7 +48,7 @@
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[19]
+ static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[20]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
@@ -69,6 +69,9 @@
class GetResponse;
struct GetResponseDefaultTypeInternal;
extern GetResponseDefaultTypeInternal _GetResponse_default_instance_;
+class GetResponseMessage;
+struct GetResponseMessageDefaultTypeInternal;
+extern GetResponseMessageDefaultTypeInternal _GetResponseMessage_default_instance_;
class MessageToClient;
struct MessageToClientDefaultTypeInternal;
extern MessageToClientDefaultTypeInternal _MessageToClient_default_instance_;
@@ -120,6 +123,7 @@
template<> ::tunnelbroker::CheckResponse* Arena::CreateMaybeMessage<::tunnelbroker::CheckResponse>(Arena*);
template<> ::tunnelbroker::GetRequest* Arena::CreateMaybeMessage<::tunnelbroker::GetRequest>(Arena*);
template<> ::tunnelbroker::GetResponse* Arena::CreateMaybeMessage<::tunnelbroker::GetResponse>(Arena*);
+template<> ::tunnelbroker::GetResponseMessage* Arena::CreateMaybeMessage<::tunnelbroker::GetResponseMessage>(Arena*);
template<> ::tunnelbroker::MessageToClient* Arena::CreateMaybeMessage<::tunnelbroker::MessageToClient>(Arena*);
template<> ::tunnelbroker::MessageToClientStruct* Arena::CreateMaybeMessage<::tunnelbroker::MessageToClientStruct>(Arena*);
template<> ::tunnelbroker::MessageToTunnelbroker* Arena::CreateMaybeMessage<::tunnelbroker::MessageToTunnelbroker>(Arena*);
@@ -1257,24 +1261,24 @@
};
// -------------------------------------------------------------------
-class GetResponse PROTOBUF_FINAL :
- public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.GetResponse) */ {
+class GetResponseMessage PROTOBUF_FINAL :
+ public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.GetResponseMessage) */ {
public:
- inline GetResponse() : GetResponse(nullptr) {}
- virtual ~GetResponse();
- explicit constexpr GetResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
+ inline GetResponseMessage() : GetResponseMessage(nullptr) {}
+ virtual ~GetResponseMessage();
+ explicit constexpr GetResponseMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
- GetResponse(const GetResponse& from);
- GetResponse(GetResponse&& from) noexcept
- : GetResponse() {
+ GetResponseMessage(const GetResponseMessage& from);
+ GetResponseMessage(GetResponseMessage&& from) noexcept
+ : GetResponseMessage() {
*this = ::std::move(from);
}
- inline GetResponse& operator=(const GetResponse& from) {
+ inline GetResponseMessage& operator=(const GetResponseMessage& from) {
CopyFrom(from);
return *this;
}
- inline GetResponse& operator=(GetResponse&& from) noexcept {
+ inline GetResponseMessage& operator=(GetResponseMessage&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
@@ -1292,20 +1296,20 @@
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
- static const GetResponse& default_instance() {
+ static const GetResponseMessage& default_instance() {
return *internal_default_instance();
}
- static inline const GetResponse* internal_default_instance() {
- return reinterpret_cast<const GetResponse*>(
- &_GetResponse_default_instance_);
+ static inline const GetResponseMessage* internal_default_instance() {
+ return reinterpret_cast<const GetResponseMessage*>(
+ &_GetResponseMessage_default_instance_);
}
static constexpr int kIndexInFileMessages =
6;
- friend void swap(GetResponse& a, GetResponse& b) {
+ friend void swap(GetResponseMessage& a, GetResponseMessage& b) {
a.Swap(&b);
}
- inline void Swap(GetResponse* other) {
+ inline void Swap(GetResponseMessage* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
@@ -1313,7 +1317,7 @@
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
- void UnsafeArenaSwap(GetResponse* other) {
+ void UnsafeArenaSwap(GetResponseMessage* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
@@ -1321,17 +1325,17 @@
// implements Message ----------------------------------------------
- inline GetResponse* New() const final {
- return CreateMaybeMessage<GetResponse>(nullptr);
+ inline GetResponseMessage* New() const final {
+ return CreateMaybeMessage<GetResponseMessage>(nullptr);
}
- GetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
- return CreateMaybeMessage<GetResponse>(arena);
+ GetResponseMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
+ return CreateMaybeMessage<GetResponseMessage>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
- void CopyFrom(const GetResponse& from);
- void MergeFrom(const GetResponse& from);
+ void CopyFrom(const GetResponseMessage& from);
+ void MergeFrom(const GetResponseMessage& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -1345,13 +1349,13 @@
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
- void InternalSwap(GetResponse* other);
+ void InternalSwap(GetResponseMessage* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
- return "tunnelbroker.GetResponse";
+ return "tunnelbroker.GetResponseMessage";
}
protected:
- explicit GetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
+ explicit GetResponseMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
@@ -1430,7 +1434,7 @@
std::string* _internal_mutable_payload();
public:
- // @@protoc_insertion_point(class_scope:tunnelbroker.GetResponse)
+ // @@protoc_insertion_point(class_scope:tunnelbroker.GetResponseMessage)
private:
class _Internal;
@@ -1445,6 +1449,191 @@
};
// -------------------------------------------------------------------
+class GetResponse PROTOBUF_FINAL :
+ public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.GetResponse) */ {
+ public:
+ inline GetResponse() : GetResponse(nullptr) {}
+ virtual ~GetResponse();
+ explicit constexpr GetResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
+
+ GetResponse(const GetResponse& from);
+ GetResponse(GetResponse&& from) noexcept
+ : GetResponse() {
+ *this = ::std::move(from);
+ }
+
+ inline GetResponse& operator=(const GetResponse& from) {
+ CopyFrom(from);
+ return *this;
+ }
+ inline GetResponse& operator=(GetResponse&& from) noexcept {
+ if (GetArena() == from.GetArena()) {
+ if (this != &from) InternalSwap(&from);
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
+
+ static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
+ return GetDescriptor();
+ }
+ static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
+ return GetMetadataStatic().descriptor;
+ }
+ static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
+ return GetMetadataStatic().reflection;
+ }
+ static const GetResponse& default_instance() {
+ return *internal_default_instance();
+ }
+ enum DataCase {
+ kResponseMessage = 1,
+ kPing = 2,
+ DATA_NOT_SET = 0,
+ };
+
+ static inline const GetResponse* internal_default_instance() {
+ return reinterpret_cast<const GetResponse*>(
+ &_GetResponse_default_instance_);
+ }
+ static constexpr int kIndexInFileMessages =
+ 7;
+
+ friend void swap(GetResponse& a, GetResponse& b) {
+ a.Swap(&b);
+ }
+ inline void Swap(GetResponse* other) {
+ if (other == this) return;
+ if (GetArena() == other->GetArena()) {
+ InternalSwap(other);
+ } else {
+ ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
+ }
+ }
+ void UnsafeArenaSwap(GetResponse* other) {
+ if (other == this) return;
+ GOOGLE_DCHECK(GetArena() == other->GetArena());
+ InternalSwap(other);
+ }
+
+ // implements Message ----------------------------------------------
+
+ inline GetResponse* New() const final {
+ return CreateMaybeMessage<GetResponse>(nullptr);
+ }
+
+ GetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
+ return CreateMaybeMessage<GetResponse>(arena);
+ }
+ void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
+ void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
+ void CopyFrom(const GetResponse& from);
+ void MergeFrom(const GetResponse& from);
+ PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
+ bool IsInitialized() const final;
+
+ size_t ByteSizeLong() const final;
+ const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
+ ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+ ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ int GetCachedSize() const final { return _cached_size_.Get(); }
+
+ private:
+ inline void SharedCtor();
+ inline void SharedDtor();
+ void SetCachedSize(int size) const final;
+ void InternalSwap(GetResponse* other);
+ friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
+ static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
+ return "tunnelbroker.GetResponse";
+ }
+ protected:
+ explicit GetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
+ public:
+
+ ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
+ private:
+ static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
+ return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages);
+ }
+
+ public:
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ enum : int {
+ kResponseMessageFieldNumber = 1,
+ kPingFieldNumber = 2,
+ };
+ // .tunnelbroker.GetResponseMessage responseMessage = 1;
+ bool has_responsemessage() const;
+ private:
+ bool _internal_has_responsemessage() const;
+ public:
+ void clear_responsemessage();
+ const ::tunnelbroker::GetResponseMessage& responsemessage() const;
+ ::tunnelbroker::GetResponseMessage* release_responsemessage();
+ ::tunnelbroker::GetResponseMessage* mutable_responsemessage();
+ void set_allocated_responsemessage(::tunnelbroker::GetResponseMessage* responsemessage);
+ private:
+ const ::tunnelbroker::GetResponseMessage& _internal_responsemessage() const;
+ ::tunnelbroker::GetResponseMessage* _internal_mutable_responsemessage();
+ public:
+ void unsafe_arena_set_allocated_responsemessage(
+ ::tunnelbroker::GetResponseMessage* responsemessage);
+ ::tunnelbroker::GetResponseMessage* unsafe_arena_release_responsemessage();
+
+ // .google.protobuf.Empty ping = 2;
+ bool has_ping() const;
+ private:
+ bool _internal_has_ping() const;
+ public:
+ void clear_ping();
+ const PROTOBUF_NAMESPACE_ID::Empty& ping() const;
+ PROTOBUF_NAMESPACE_ID::Empty* release_ping();
+ PROTOBUF_NAMESPACE_ID::Empty* mutable_ping();
+ void set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping);
+ private:
+ const PROTOBUF_NAMESPACE_ID::Empty& _internal_ping() const;
+ PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_ping();
+ public:
+ void unsafe_arena_set_allocated_ping(
+ PROTOBUF_NAMESPACE_ID::Empty* ping);
+ PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_ping();
+
+ void clear_data();
+ DataCase data_case() const;
+ // @@protoc_insertion_point(class_scope:tunnelbroker.GetResponse)
+ private:
+ class _Internal;
+ void set_has_responsemessage();
+ void set_has_ping();
+
+ inline bool has_data() const;
+ inline void clear_has_data();
+
+ template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ union DataUnion {
+ constexpr DataUnion() : _constinit_{} {}
+ ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
+ ::tunnelbroker::GetResponseMessage* responsemessage_;
+ PROTOBUF_NAMESPACE_ID::Empty* ping_;
+ } data_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1];
+
+ friend struct ::TableStruct_tunnelbroker_2eproto;
+};
+// -------------------------------------------------------------------
+
class ProcessedMessages PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.ProcessedMessages) */ {
public:
@@ -1488,7 +1677,7 @@
&_ProcessedMessages_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 7;
+ 8;
friend void swap(ProcessedMessages& a, ProcessedMessages& b) {
a.Swap(&b);
@@ -1640,7 +1829,7 @@
&_MessageToTunnelbrokerStruct_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 8;
+ 9;
friend void swap(MessageToTunnelbrokerStruct& a, MessageToTunnelbrokerStruct& b) {
a.Swap(&b);
@@ -1846,7 +2035,7 @@
&_MessagesToSend_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 9;
+ 10;
friend void swap(MessagesToSend& a, MessagesToSend& b) {
a.Swap(&b);
@@ -1998,7 +2187,7 @@
&_MessageToTunnelbroker_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 10;
+ 11;
friend void swap(MessageToTunnelbroker& a, MessageToTunnelbroker& b) {
a.Swap(&b);
@@ -2195,7 +2384,7 @@
&_MessageToClientStruct_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 11;
+ 12;
friend void swap(MessageToClientStruct& a, MessageToClientStruct& b) {
a.Swap(&b);
@@ -2401,7 +2590,7 @@
&_MessagesToDeliver_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 12;
+ 13;
friend void swap(MessagesToDeliver& a, MessagesToDeliver& b) {
a.Swap(&b);
@@ -2553,7 +2742,7 @@
&_MessageToClient_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 13;
+ 14;
friend void swap(MessageToClient& a, MessageToClient& b) {
a.Swap(&b);
@@ -2732,7 +2921,7 @@
&_CheckRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 14;
+ 15;
friend void swap(CheckRequest& a, CheckRequest& b) {
a.Swap(&b);
@@ -2894,7 +3083,7 @@
&_CheckResponse_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 15;
+ 16;
friend void swap(CheckResponse& a, CheckResponse& b) {
a.Swap(&b);
@@ -3031,7 +3220,7 @@
&_NewPrimaryRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 16;
+ 17;
friend void swap(NewPrimaryRequest& a, NewPrimaryRequest& b) {
a.Swap(&b);
@@ -3193,7 +3382,7 @@
&_NewPrimaryResponse_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 17;
+ 18;
friend void swap(NewPrimaryResponse& a, NewPrimaryResponse& b) {
a.Swap(&b);
@@ -3330,7 +3519,7 @@
&_PongRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
- 18;
+ 19;
friend void swap(PongRequest& a, PongRequest& b) {
a.Swap(&b);
@@ -4379,59 +4568,59 @@
// -------------------------------------------------------------------
-// GetResponse
+// GetResponseMessage
// string fromDeviceID = 1;
-inline void GetResponse::clear_fromdeviceid() {
+inline void GetResponseMessage::clear_fromdeviceid() {
fromdeviceid_.ClearToEmpty();
}
-inline const std::string& GetResponse::fromdeviceid() const {
- // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.fromDeviceID)
+inline const std::string& GetResponseMessage::fromdeviceid() const {
+ // @@protoc_insertion_point(field_get:tunnelbroker.GetResponseMessage.fromDeviceID)
return _internal_fromdeviceid();
}
-inline void GetResponse::set_fromdeviceid(const std::string& value) {
+inline void GetResponseMessage::set_fromdeviceid(const std::string& value) {
_internal_set_fromdeviceid(value);
- // @@protoc_insertion_point(field_set:tunnelbroker.GetResponse.fromDeviceID)
+ // @@protoc_insertion_point(field_set:tunnelbroker.GetResponseMessage.fromDeviceID)
}
-inline std::string* GetResponse::mutable_fromdeviceid() {
- // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.fromDeviceID)
+inline std::string* GetResponseMessage::mutable_fromdeviceid() {
+ // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponseMessage.fromDeviceID)
return _internal_mutable_fromdeviceid();
}
-inline const std::string& GetResponse::_internal_fromdeviceid() const {
+inline const std::string& GetResponseMessage::_internal_fromdeviceid() const {
return fromdeviceid_.Get();
}
-inline void GetResponse::_internal_set_fromdeviceid(const std::string& value) {
+inline void GetResponseMessage::_internal_set_fromdeviceid(const std::string& value) {
fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
-inline void GetResponse::set_fromdeviceid(std::string&& value) {
+inline void GetResponseMessage::set_fromdeviceid(std::string&& value) {
fromdeviceid_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
- // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetResponse.fromDeviceID)
+ // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetResponseMessage.fromDeviceID)
}
-inline void GetResponse::set_fromdeviceid(const char* value) {
+inline void GetResponseMessage::set_fromdeviceid(const char* value) {
GOOGLE_DCHECK(value != nullptr);
fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
- // @@protoc_insertion_point(field_set_char:tunnelbroker.GetResponse.fromDeviceID)
+ // @@protoc_insertion_point(field_set_char:tunnelbroker.GetResponseMessage.fromDeviceID)
}
-inline void GetResponse::set_fromdeviceid(const char* value,
+inline void GetResponseMessage::set_fromdeviceid(const char* value,
size_t size) {
fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
- // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponse.fromDeviceID)
+ // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponseMessage.fromDeviceID)
}
-inline std::string* GetResponse::_internal_mutable_fromdeviceid() {
+inline std::string* GetResponseMessage::_internal_mutable_fromdeviceid() {
return fromdeviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
-inline std::string* GetResponse::release_fromdeviceid() {
- // @@protoc_insertion_point(field_release:tunnelbroker.GetResponse.fromDeviceID)
+inline std::string* GetResponseMessage::release_fromdeviceid() {
+ // @@protoc_insertion_point(field_release:tunnelbroker.GetResponseMessage.fromDeviceID)
return fromdeviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
-inline void GetResponse::set_allocated_fromdeviceid(std::string* fromdeviceid) {
+inline void GetResponseMessage::set_allocated_fromdeviceid(std::string* fromdeviceid) {
if (fromdeviceid != nullptr) {
} else {
@@ -4439,60 +4628,60 @@
}
fromdeviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), fromdeviceid,
GetArena());
- // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponse.fromDeviceID)
+ // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponseMessage.fromDeviceID)
}
// bytes payload = 2;
-inline void GetResponse::clear_payload() {
+inline void GetResponseMessage::clear_payload() {
payload_.ClearToEmpty();
}
-inline const std::string& GetResponse::payload() const {
- // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.payload)
+inline const std::string& GetResponseMessage::payload() const {
+ // @@protoc_insertion_point(field_get:tunnelbroker.GetResponseMessage.payload)
return _internal_payload();
}
-inline void GetResponse::set_payload(const std::string& value) {
+inline void GetResponseMessage::set_payload(const std::string& value) {
_internal_set_payload(value);
- // @@protoc_insertion_point(field_set:tunnelbroker.GetResponse.payload)
+ // @@protoc_insertion_point(field_set:tunnelbroker.GetResponseMessage.payload)
}
-inline std::string* GetResponse::mutable_payload() {
- // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.payload)
+inline std::string* GetResponseMessage::mutable_payload() {
+ // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponseMessage.payload)
return _internal_mutable_payload();
}
-inline const std::string& GetResponse::_internal_payload() const {
+inline const std::string& GetResponseMessage::_internal_payload() const {
return payload_.Get();
}
-inline void GetResponse::_internal_set_payload(const std::string& value) {
+inline void GetResponseMessage::_internal_set_payload(const std::string& value) {
payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
-inline void GetResponse::set_payload(std::string&& value) {
+inline void GetResponseMessage::set_payload(std::string&& value) {
payload_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
- // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetResponse.payload)
+ // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetResponseMessage.payload)
}
-inline void GetResponse::set_payload(const char* value) {
+inline void GetResponseMessage::set_payload(const char* value) {
GOOGLE_DCHECK(value != nullptr);
payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
- // @@protoc_insertion_point(field_set_char:tunnelbroker.GetResponse.payload)
+ // @@protoc_insertion_point(field_set_char:tunnelbroker.GetResponseMessage.payload)
}
-inline void GetResponse::set_payload(const void* value,
+inline void GetResponseMessage::set_payload(const void* value,
size_t size) {
payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
- // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponse.payload)
+ // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponseMessage.payload)
}
-inline std::string* GetResponse::_internal_mutable_payload() {
+inline std::string* GetResponseMessage::_internal_mutable_payload() {
return payload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
-inline std::string* GetResponse::release_payload() {
- // @@protoc_insertion_point(field_release:tunnelbroker.GetResponse.payload)
+inline std::string* GetResponseMessage::release_payload() {
+ // @@protoc_insertion_point(field_release:tunnelbroker.GetResponseMessage.payload)
return payload_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
-inline void GetResponse::set_allocated_payload(std::string* payload) {
+inline void GetResponseMessage::set_allocated_payload(std::string* payload) {
if (payload != nullptr) {
} else {
@@ -4500,85 +4689,236 @@
}
payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload,
GetArena());
- // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponse.payload)
+ // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponseMessage.payload)
}
// repeated string blobHashes = 3;
-inline int GetResponse::_internal_blobhashes_size() const {
+inline int GetResponseMessage::_internal_blobhashes_size() const {
return blobhashes_.size();
}
-inline int GetResponse::blobhashes_size() const {
+inline int GetResponseMessage::blobhashes_size() const {
return _internal_blobhashes_size();
}
-inline void GetResponse::clear_blobhashes() {
+inline void GetResponseMessage::clear_blobhashes() {
blobhashes_.Clear();
}
-inline std::string* GetResponse::add_blobhashes() {
- // @@protoc_insertion_point(field_add_mutable:tunnelbroker.GetResponse.blobHashes)
+inline std::string* GetResponseMessage::add_blobhashes() {
+ // @@protoc_insertion_point(field_add_mutable:tunnelbroker.GetResponseMessage.blobHashes)
return _internal_add_blobhashes();
}
-inline const std::string& GetResponse::_internal_blobhashes(int index) const {
+inline const std::string& GetResponseMessage::_internal_blobhashes(int index) const {
return blobhashes_.Get(index);
}
-inline const std::string& GetResponse::blobhashes(int index) const {
- // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.blobHashes)
+inline const std::string& GetResponseMessage::blobhashes(int index) const {
+ // @@protoc_insertion_point(field_get:tunnelbroker.GetResponseMessage.blobHashes)
return _internal_blobhashes(index);
}
-inline std::string* GetResponse::mutable_blobhashes(int index) {
- // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.blobHashes)
+inline std::string* GetResponseMessage::mutable_blobhashes(int index) {
+ // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponseMessage.blobHashes)
return blobhashes_.Mutable(index);
}
-inline void GetResponse::set_blobhashes(int index, const std::string& value) {
- // @@protoc_insertion_point(field_set:tunnelbroker.GetResponse.blobHashes)
+inline void GetResponseMessage::set_blobhashes(int index, const std::string& value) {
+ // @@protoc_insertion_point(field_set:tunnelbroker.GetResponseMessage.blobHashes)
blobhashes_.Mutable(index)->assign(value);
}
-inline void GetResponse::set_blobhashes(int index, std::string&& value) {
- // @@protoc_insertion_point(field_set:tunnelbroker.GetResponse.blobHashes)
+inline void GetResponseMessage::set_blobhashes(int index, std::string&& value) {
+ // @@protoc_insertion_point(field_set:tunnelbroker.GetResponseMessage.blobHashes)
blobhashes_.Mutable(index)->assign(std::move(value));
}
-inline void GetResponse::set_blobhashes(int index, const char* value) {
+inline void GetResponseMessage::set_blobhashes(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
blobhashes_.Mutable(index)->assign(value);
- // @@protoc_insertion_point(field_set_char:tunnelbroker.GetResponse.blobHashes)
+ // @@protoc_insertion_point(field_set_char:tunnelbroker.GetResponseMessage.blobHashes)
}
-inline void GetResponse::set_blobhashes(int index, const char* value, size_t size) {
+inline void GetResponseMessage::set_blobhashes(int index, const char* value, size_t size) {
blobhashes_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponse.blobHashes)
+ // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponseMessage.blobHashes)
}
-inline std::string* GetResponse::_internal_add_blobhashes() {
+inline std::string* GetResponseMessage::_internal_add_blobhashes() {
return blobhashes_.Add();
}
-inline void GetResponse::add_blobhashes(const std::string& value) {
+inline void GetResponseMessage::add_blobhashes(const std::string& value) {
blobhashes_.Add()->assign(value);
- // @@protoc_insertion_point(field_add:tunnelbroker.GetResponse.blobHashes)
+ // @@protoc_insertion_point(field_add:tunnelbroker.GetResponseMessage.blobHashes)
}
-inline void GetResponse::add_blobhashes(std::string&& value) {
+inline void GetResponseMessage::add_blobhashes(std::string&& value) {
blobhashes_.Add(std::move(value));
- // @@protoc_insertion_point(field_add:tunnelbroker.GetResponse.blobHashes)
+ // @@protoc_insertion_point(field_add:tunnelbroker.GetResponseMessage.blobHashes)
}
-inline void GetResponse::add_blobhashes(const char* value) {
+inline void GetResponseMessage::add_blobhashes(const char* value) {
GOOGLE_DCHECK(value != nullptr);
blobhashes_.Add()->assign(value);
- // @@protoc_insertion_point(field_add_char:tunnelbroker.GetResponse.blobHashes)
+ // @@protoc_insertion_point(field_add_char:tunnelbroker.GetResponseMessage.blobHashes)
}
-inline void GetResponse::add_blobhashes(const char* value, size_t size) {
+inline void GetResponseMessage::add_blobhashes(const char* value, size_t size) {
blobhashes_.Add()->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_add_pointer:tunnelbroker.GetResponse.blobHashes)
+ // @@protoc_insertion_point(field_add_pointer:tunnelbroker.GetResponseMessage.blobHashes)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
-GetResponse::blobhashes() const {
- // @@protoc_insertion_point(field_list:tunnelbroker.GetResponse.blobHashes)
+GetResponseMessage::blobhashes() const {
+ // @@protoc_insertion_point(field_list:tunnelbroker.GetResponseMessage.blobHashes)
return blobhashes_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
-GetResponse::mutable_blobhashes() {
- // @@protoc_insertion_point(field_mutable_list:tunnelbroker.GetResponse.blobHashes)
+GetResponseMessage::mutable_blobhashes() {
+ // @@protoc_insertion_point(field_mutable_list:tunnelbroker.GetResponseMessage.blobHashes)
return &blobhashes_;
}
// -------------------------------------------------------------------
+// GetResponse
+
+// .tunnelbroker.GetResponseMessage responseMessage = 1;
+inline bool GetResponse::_internal_has_responsemessage() const {
+ return data_case() == kResponseMessage;
+}
+inline bool GetResponse::has_responsemessage() const {
+ return _internal_has_responsemessage();
+}
+inline void GetResponse::set_has_responsemessage() {
+ _oneof_case_[0] = kResponseMessage;
+}
+inline void GetResponse::clear_responsemessage() {
+ if (_internal_has_responsemessage()) {
+ if (GetArena() == nullptr) {
+ delete data_.responsemessage_;
+ }
+ clear_has_data();
+ }
+}
+inline ::tunnelbroker::GetResponseMessage* GetResponse::release_responsemessage() {
+ // @@protoc_insertion_point(field_release:tunnelbroker.GetResponse.responseMessage)
+ if (_internal_has_responsemessage()) {
+ clear_has_data();
+ ::tunnelbroker::GetResponseMessage* temp = data_.responsemessage_;
+ if (GetArena() != nullptr) {
+ temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
+ }
+ data_.responsemessage_ = nullptr;
+ return temp;
+ } else {
+ return nullptr;
+ }
+}
+inline const ::tunnelbroker::GetResponseMessage& GetResponse::_internal_responsemessage() const {
+ return _internal_has_responsemessage()
+ ? *data_.responsemessage_
+ : reinterpret_cast< ::tunnelbroker::GetResponseMessage&>(::tunnelbroker::_GetResponseMessage_default_instance_);
+}
+inline const ::tunnelbroker::GetResponseMessage& GetResponse::responsemessage() const {
+ // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.responseMessage)
+ return _internal_responsemessage();
+}
+inline ::tunnelbroker::GetResponseMessage* GetResponse::unsafe_arena_release_responsemessage() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.GetResponse.responseMessage)
+ if (_internal_has_responsemessage()) {
+ clear_has_data();
+ ::tunnelbroker::GetResponseMessage* temp = data_.responsemessage_;
+ data_.responsemessage_ = nullptr;
+ return temp;
+ } else {
+ return nullptr;
+ }
+}
+inline void GetResponse::unsafe_arena_set_allocated_responsemessage(::tunnelbroker::GetResponseMessage* responsemessage) {
+ clear_data();
+ if (responsemessage) {
+ set_has_responsemessage();
+ data_.responsemessage_ = responsemessage;
+ }
+ // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.GetResponse.responseMessage)
+}
+inline ::tunnelbroker::GetResponseMessage* GetResponse::_internal_mutable_responsemessage() {
+ if (!_internal_has_responsemessage()) {
+ clear_data();
+ set_has_responsemessage();
+ data_.responsemessage_ = CreateMaybeMessage< ::tunnelbroker::GetResponseMessage >(GetArena());
+ }
+ return data_.responsemessage_;
+}
+inline ::tunnelbroker::GetResponseMessage* GetResponse::mutable_responsemessage() {
+ // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.responseMessage)
+ return _internal_mutable_responsemessage();
+}
+
+// .google.protobuf.Empty ping = 2;
+inline bool GetResponse::_internal_has_ping() const {
+ return data_case() == kPing;
+}
+inline bool GetResponse::has_ping() const {
+ return _internal_has_ping();
+}
+inline void GetResponse::set_has_ping() {
+ _oneof_case_[0] = kPing;
+}
+inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::release_ping() {
+ // @@protoc_insertion_point(field_release:tunnelbroker.GetResponse.ping)
+ if (_internal_has_ping()) {
+ clear_has_data();
+ PROTOBUF_NAMESPACE_ID::Empty* temp = data_.ping_;
+ if (GetArena() != nullptr) {
+ temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
+ }
+ data_.ping_ = nullptr;
+ return temp;
+ } else {
+ return nullptr;
+ }
+}
+inline const PROTOBUF_NAMESPACE_ID::Empty& GetResponse::_internal_ping() const {
+ return _internal_has_ping()
+ ? *data_.ping_
+ : reinterpret_cast< PROTOBUF_NAMESPACE_ID::Empty&>(PROTOBUF_NAMESPACE_ID::_Empty_default_instance_);
+}
+inline const PROTOBUF_NAMESPACE_ID::Empty& GetResponse::ping() const {
+ // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.ping)
+ return _internal_ping();
+}
+inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::unsafe_arena_release_ping() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.GetResponse.ping)
+ if (_internal_has_ping()) {
+ clear_has_data();
+ PROTOBUF_NAMESPACE_ID::Empty* temp = data_.ping_;
+ data_.ping_ = nullptr;
+ return temp;
+ } else {
+ return nullptr;
+ }
+}
+inline void GetResponse::unsafe_arena_set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping) {
+ clear_data();
+ if (ping) {
+ set_has_ping();
+ data_.ping_ = ping;
+ }
+ // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.GetResponse.ping)
+}
+inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::_internal_mutable_ping() {
+ if (!_internal_has_ping()) {
+ clear_data();
+ set_has_ping();
+ data_.ping_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(GetArena());
+ }
+ return data_.ping_;
+}
+inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::mutable_ping() {
+ // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.ping)
+ return _internal_mutable_ping();
+}
+
+inline bool GetResponse::has_data() const {
+ return data_case() != DATA_NOT_SET;
+}
+inline void GetResponse::clear_has_data() {
+ _oneof_case_[0] = DATA_NOT_SET;
+}
+inline GetResponse::DataCase GetResponse::data_case() const {
+ return GetResponse::DataCase(_oneof_case_[0]);
+}
+// -------------------------------------------------------------------
+
// ProcessedMessages
// repeated string messageID = 1;
@@ -6107,6 +6447,8 @@
// -------------------------------------------------------------------
+// -------------------------------------------------------------------
+
// @@protoc_insertion_point(namespace_scope)
diff --git a/shared/protos/_generated/tunnelbroker.pb.cc b/shared/protos/_generated/tunnelbroker.pb.cc
--- a/shared/protos/_generated/tunnelbroker.pb.cc
+++ b/shared/protos/_generated/tunnelbroker.pb.cc
@@ -99,11 +99,23 @@
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetRequestDefaultTypeInternal _GetRequest_default_instance_;
-constexpr GetResponse::GetResponse(
+constexpr GetResponseMessage::GetResponseMessage(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: blobhashes_()
, fromdeviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, payload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
+struct GetResponseMessageDefaultTypeInternal {
+ constexpr GetResponseMessageDefaultTypeInternal()
+ : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
+ ~GetResponseMessageDefaultTypeInternal() {}
+ union {
+ GetResponseMessage _instance;
+ };
+};
+PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetResponseMessageDefaultTypeInternal _GetResponseMessage_default_instance_;
+constexpr GetResponse::GetResponse(
+ ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
+ : _oneof_case_{}{}
struct GetResponseDefaultTypeInternal {
constexpr GetResponseDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
@@ -269,7 +281,7 @@
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PongRequestDefaultTypeInternal _PongRequest_default_instance_;
} // namespace tunnelbroker
-static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tunnelbroker_2eproto[19];
+static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tunnelbroker_2eproto[20];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tunnelbroker_2eproto[2];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tunnelbroker_2eproto = nullptr;
@@ -327,13 +339,21 @@
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetRequest, sessionid_),
~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, _internal_metadata_),
+ PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponseMessage, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, fromdeviceid_),
- PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, payload_),
- PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, blobhashes_),
+ PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponseMessage, fromdeviceid_),
+ PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponseMessage, payload_),
+ PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponseMessage, blobhashes_),
+ ~0u, // no _has_bits_
+ PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, _internal_metadata_),
+ ~0u, // no _extensions_
+ PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, _oneof_case_[0]),
+ ~0u, // no _weak_field_map_
+ ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
+ ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
+ PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, data_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::tunnelbroker::ProcessedMessages, _internal_metadata_),
~0u, // no _extensions_
@@ -428,19 +448,20 @@
{ 31, -1, sizeof(::tunnelbroker::NewSessionResponse)},
{ 37, -1, sizeof(::tunnelbroker::SendRequest)},
{ 46, -1, sizeof(::tunnelbroker::GetRequest)},
- { 52, -1, sizeof(::tunnelbroker::GetResponse)},
- { 60, -1, sizeof(::tunnelbroker::ProcessedMessages)},
- { 66, -1, sizeof(::tunnelbroker::MessageToTunnelbrokerStruct)},
- { 75, -1, sizeof(::tunnelbroker::MessagesToSend)},
- { 81, -1, sizeof(::tunnelbroker::MessageToTunnelbroker)},
- { 90, -1, sizeof(::tunnelbroker::MessageToClientStruct)},
- { 99, -1, sizeof(::tunnelbroker::MessagesToDeliver)},
- { 105, -1, sizeof(::tunnelbroker::MessageToClient)},
- { 113, -1, sizeof(::tunnelbroker::CheckRequest)},
- { 120, -1, sizeof(::tunnelbroker::CheckResponse)},
- { 126, -1, sizeof(::tunnelbroker::NewPrimaryRequest)},
- { 133, -1, sizeof(::tunnelbroker::NewPrimaryResponse)},
- { 139, -1, sizeof(::tunnelbroker::PongRequest)},
+ { 52, -1, sizeof(::tunnelbroker::GetResponseMessage)},
+ { 60, -1, sizeof(::tunnelbroker::GetResponse)},
+ { 68, -1, sizeof(::tunnelbroker::ProcessedMessages)},
+ { 74, -1, sizeof(::tunnelbroker::MessageToTunnelbrokerStruct)},
+ { 83, -1, sizeof(::tunnelbroker::MessagesToSend)},
+ { 89, -1, sizeof(::tunnelbroker::MessageToTunnelbroker)},
+ { 98, -1, sizeof(::tunnelbroker::MessageToClientStruct)},
+ { 107, -1, sizeof(::tunnelbroker::MessagesToDeliver)},
+ { 113, -1, sizeof(::tunnelbroker::MessageToClient)},
+ { 121, -1, sizeof(::tunnelbroker::CheckRequest)},
+ { 128, -1, sizeof(::tunnelbroker::CheckResponse)},
+ { 134, -1, sizeof(::tunnelbroker::NewPrimaryRequest)},
+ { 141, -1, sizeof(::tunnelbroker::NewPrimaryResponse)},
+ { 147, -1, sizeof(::tunnelbroker::PongRequest)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
@@ -450,6 +471,7 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tunnelbroker::_NewSessionResponse_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tunnelbroker::_SendRequest_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tunnelbroker::_GetRequest_default_instance_),
+ reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tunnelbroker::_GetResponseMessage_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tunnelbroker::_GetResponse_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tunnelbroker::_ProcessedMessages_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tunnelbroker::_MessageToTunnelbrokerStruct_default_instance_),
@@ -480,62 +502,66 @@
"essionResponse\022\021\n\tsessionID\030\001 \001(\t\"Y\n\013Sen"
"dRequest\022\021\n\tsessionID\030\001 \001(\t\022\022\n\ntoDeviceI"
"D\030\002 \001(\t\022\017\n\007payload\030\003 \001(\014\022\022\n\nblobHashes\030\004"
- " \003(\t\"\037\n\nGetRequest\022\021\n\tsessionID\030\001 \001(\t\"H\n"
- "\013GetResponse\022\024\n\014fromDeviceID\030\001 \001(\t\022\017\n\007pa"
- "yload\030\002 \001(\014\022\022\n\nblobHashes\030\003 \003(\t\"&\n\021Proce"
- "ssedMessages\022\021\n\tmessageID\030\001 \003(\t\"i\n\033Messa"
- "geToTunnelbrokerStruct\022\021\n\tmessageID\030\001 \001("
- "\t\022\022\n\ntoDeviceID\030\002 \001(\t\022\017\n\007payload\030\003 \001(\t\022\022"
- "\n\nblobHashes\030\004 \003(\t\"M\n\016MessagesToSend\022;\n\010"
- "messages\030\001 \003(\0132).tunnelbroker.MessageToT"
- "unnelbrokerStruct\"\250\001\n\025MessageToTunnelbro"
- "ker\022\021\n\tsessionID\030\001 \001(\t\0226\n\016messagesToSend"
- "\030\002 \001(\0132\034.tunnelbroker.MessagesToSendH\000\022<"
- "\n\021processedMessages\030\003 \001(\0132\037.tunnelbroker"
- ".ProcessedMessagesH\000B\006\n\004data\"e\n\025MessageT"
- "oClientStruct\022\021\n\tmessageID\030\001 \001(\t\022\024\n\014from"
- "DeviceID\030\002 \001(\t\022\017\n\007payload\030\003 \001(\t\022\022\n\nblobH"
- "ashes\030\004 \003(\t\"J\n\021MessagesToDeliver\0225\n\010mess"
- "ages\030\001 \003(\0132#.tunnelbroker.MessageToClien"
- "tStruct\"\225\001\n\017MessageToClient\022<\n\021messagesT"
- "oDeliver\030\001 \001(\0132\037.tunnelbroker.MessagesTo"
- "DeliverH\000\022<\n\021processedMessages\030\002 \001(\0132\037.t"
+ " \003(\t\"\037\n\nGetRequest\022\021\n\tsessionID\030\001 \001(\t\"O\n"
+ "\022GetResponseMessage\022\024\n\014fromDeviceID\030\001 \001("
+ "\t\022\017\n\007payload\030\002 \001(\014\022\022\n\nblobHashes\030\003 \003(\t\"z"
+ "\n\013GetResponse\022;\n\017responseMessage\030\001 \001(\0132 "
+ ".tunnelbroker.GetResponseMessageH\000\022&\n\004pi"
+ "ng\030\002 \001(\0132\026.google.protobuf.EmptyH\000B\006\n\004da"
+ "ta\"&\n\021ProcessedMessages\022\021\n\tmessageID\030\001 \003"
+ "(\t\"i\n\033MessageToTunnelbrokerStruct\022\021\n\tmes"
+ "sageID\030\001 \001(\t\022\022\n\ntoDeviceID\030\002 \001(\t\022\017\n\007payl"
+ "oad\030\003 \001(\t\022\022\n\nblobHashes\030\004 \003(\t\"M\n\016Message"
+ "sToSend\022;\n\010messages\030\001 \003(\0132).tunnelbroker"
+ ".MessageToTunnelbrokerStruct\"\250\001\n\025Message"
+ "ToTunnelbroker\022\021\n\tsessionID\030\001 \001(\t\0226\n\016mes"
+ "sagesToSend\030\002 \001(\0132\034.tunnelbroker.Message"
+ "sToSendH\000\022<\n\021processedMessages\030\003 \001(\0132\037.t"
"unnelbroker.ProcessedMessagesH\000B\006\n\004data\""
- "3\n\014CheckRequest\022\016\n\006userId\030\001 \001(\t\022\023\n\013devic"
- "eToken\030\002 \001(\t\"K\n\rCheckResponse\022:\n\021checkRe"
- "sponseType\030\001 \001(\0162\037.tunnelbroker.CheckRes"
- "ponseType\"8\n\021NewPrimaryRequest\022\016\n\006userId"
- "\030\001 \001(\t\022\023\n\013deviceToken\030\002 \001(\t\"%\n\022NewPrimar"
- "yResponse\022\017\n\007success\030\001 \001(\010\"2\n\013PongReques"
- "t\022\016\n\006userId\030\001 \001(\t\022\023\n\013deviceToken\030\002 \001(\t*n"
- "\n\021CheckResponseType\022\030\n\024PRIMARY_DOESNT_EX"
- "IST\020\000\022\022\n\016PRIMARY_ONLINE\020\001\022\023\n\017PRIMARY_OFF"
- "LINE\020\002\022\026\n\022CURRENT_IS_PRIMARY\020\0032\237\005\n\023Tunne"
- "lbrokerService\022W\n\032CheckIfPrimaryDeviceOn"
- "line\022\032.tunnelbroker.CheckRequest\032\033.tunne"
- "lbroker.CheckResponse\"\000\022]\n\026BecomeNewPrim"
- "aryDevice\022\037.tunnelbroker.NewPrimaryReque"
- "st\032 .tunnelbroker.NewPrimaryResponse\"\000\022\?"
- "\n\010SendPong\022\031.tunnelbroker.PongRequest\032\026."
- "google.protobuf.Empty\"\000\022c\n\020SessionSignat"
- "ure\022%.tunnelbroker.SessionSignatureReque"
- "st\032&.tunnelbroker.SessionSignatureRespon"
- "se\"\000\022Q\n\nNewSession\022\037.tunnelbroker.NewSes"
- "sionRequest\032 .tunnelbroker.NewSessionRes"
- "ponse\"\000\022;\n\004Send\022\031.tunnelbroker.SendReque"
- "st\032\026.google.protobuf.Empty\"\000\022>\n\003Get\022\030.tu"
- "nnelbroker.GetRequest\032\031.tunnelbroker.Get"
- "Response\"\0000\001\022Z\n\016MessagesStream\022#.tunnelb"
- "roker.MessageToTunnelbroker\032\035.tunnelbrok"
- "er.MessageToClient\"\000(\0010\001b\006proto3"
+ "e\n\025MessageToClientStruct\022\021\n\tmessageID\030\001 "
+ "\001(\t\022\024\n\014fromDeviceID\030\002 \001(\t\022\017\n\007payload\030\003 \001"
+ "(\t\022\022\n\nblobHashes\030\004 \003(\t\"J\n\021MessagesToDeli"
+ "ver\0225\n\010messages\030\001 \003(\0132#.tunnelbroker.Mes"
+ "sageToClientStruct\"\225\001\n\017MessageToClient\022<"
+ "\n\021messagesToDeliver\030\001 \001(\0132\037.tunnelbroker"
+ ".MessagesToDeliverH\000\022<\n\021processedMessage"
+ "s\030\002 \001(\0132\037.tunnelbroker.ProcessedMessages"
+ "H\000B\006\n\004data\"3\n\014CheckRequest\022\016\n\006userId\030\001 \001"
+ "(\t\022\023\n\013deviceToken\030\002 \001(\t\"K\n\rCheckResponse"
+ "\022:\n\021checkResponseType\030\001 \001(\0162\037.tunnelbrok"
+ "er.CheckResponseType\"8\n\021NewPrimaryReques"
+ "t\022\016\n\006userId\030\001 \001(\t\022\023\n\013deviceToken\030\002 \001(\t\"%"
+ "\n\022NewPrimaryResponse\022\017\n\007success\030\001 \001(\010\"2\n"
+ "\013PongRequest\022\016\n\006userId\030\001 \001(\t\022\023\n\013deviceTo"
+ "ken\030\002 \001(\t*n\n\021CheckResponseType\022\030\n\024PRIMAR"
+ "Y_DOESNT_EXIST\020\000\022\022\n\016PRIMARY_ONLINE\020\001\022\023\n\017"
+ "PRIMARY_OFFLINE\020\002\022\026\n\022CURRENT_IS_PRIMARY\020"
+ "\0032\237\005\n\023TunnelbrokerService\022W\n\032CheckIfPrim"
+ "aryDeviceOnline\022\032.tunnelbroker.CheckRequ"
+ "est\032\033.tunnelbroker.CheckResponse\"\000\022]\n\026Be"
+ "comeNewPrimaryDevice\022\037.tunnelbroker.NewP"
+ "rimaryRequest\032 .tunnelbroker.NewPrimaryR"
+ "esponse\"\000\022\?\n\010SendPong\022\031.tunnelbroker.Pon"
+ "gRequest\032\026.google.protobuf.Empty\"\000\022c\n\020Se"
+ "ssionSignature\022%.tunnelbroker.SessionSig"
+ "natureRequest\032&.tunnelbroker.SessionSign"
+ "atureResponse\"\000\022Q\n\nNewSession\022\037.tunnelbr"
+ "oker.NewSessionRequest\032 .tunnelbroker.Ne"
+ "wSessionResponse\"\000\022;\n\004Send\022\031.tunnelbroke"
+ "r.SendRequest\032\026.google.protobuf.Empty\"\000\022"
+ ">\n\003Get\022\030.tunnelbroker.GetRequest\032\031.tunne"
+ "lbroker.GetResponse\"\0000\001\022Z\n\016MessagesStrea"
+ "m\022#.tunnelbroker.MessageToTunnelbroker\032\035"
+ ".tunnelbroker.MessageToClient\"\000(\0010\001b\006pro"
+ "to3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tunnelbroker_2eproto_deps[1] = {
&::descriptor_table_google_2fprotobuf_2fempty_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tunnelbroker_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tunnelbroker_2eproto = {
- false, false, 2472, descriptor_table_protodef_tunnelbroker_2eproto, "tunnelbroker.proto",
- &descriptor_table_tunnelbroker_2eproto_once, descriptor_table_tunnelbroker_2eproto_deps, 1, 19,
+ false, false, 2603, descriptor_table_protodef_tunnelbroker_2eproto, "tunnelbroker.proto",
+ &descriptor_table_tunnelbroker_2eproto_once, descriptor_table_tunnelbroker_2eproto_deps, 1, 20,
schemas, file_default_instances, TableStruct_tunnelbroker_2eproto::offsets,
file_level_metadata_tunnelbroker_2eproto, file_level_enum_descriptors_tunnelbroker_2eproto, file_level_service_descriptors_tunnelbroker_2eproto,
};
@@ -2129,18 +2155,18 @@
// ===================================================================
-class GetResponse::_Internal {
+class GetResponseMessage::_Internal {
public:
};
-GetResponse::GetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
+GetResponseMessage::GetResponseMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena)
: ::PROTOBUF_NAMESPACE_ID::Message(arena),
blobhashes_(arena) {
SharedCtor();
RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:tunnelbroker.GetResponse)
+ // @@protoc_insertion_point(arena_constructor:tunnelbroker.GetResponseMessage)
}
-GetResponse::GetResponse(const GetResponse& from)
+GetResponseMessage::GetResponseMessage(const GetResponseMessage& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
blobhashes_(from.blobhashes_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -2154,38 +2180,38 @@
payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(),
GetArena());
}
- // @@protoc_insertion_point(copy_constructor:tunnelbroker.GetResponse)
+ // @@protoc_insertion_point(copy_constructor:tunnelbroker.GetResponseMessage)
}
-void GetResponse::SharedCtor() {
+void GetResponseMessage::SharedCtor() {
fromdeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
-GetResponse::~GetResponse() {
- // @@protoc_insertion_point(destructor:tunnelbroker.GetResponse)
+GetResponseMessage::~GetResponseMessage() {
+ // @@protoc_insertion_point(destructor:tunnelbroker.GetResponseMessage)
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
-void GetResponse::SharedDtor() {
+void GetResponseMessage::SharedDtor() {
GOOGLE_DCHECK(GetArena() == nullptr);
fromdeviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
payload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
-void GetResponse::ArenaDtor(void* object) {
- GetResponse* _this = reinterpret_cast< GetResponse* >(object);
+void GetResponseMessage::ArenaDtor(void* object) {
+ GetResponseMessage* _this = reinterpret_cast< GetResponseMessage* >(object);
(void)_this;
}
-void GetResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
+void GetResponseMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
-void GetResponse::SetCachedSize(int size) const {
+void GetResponseMessage::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
-void GetResponse::Clear() {
-// @@protoc_insertion_point(message_clear_start:tunnelbroker.GetResponse)
+void GetResponseMessage::Clear() {
+// @@protoc_insertion_point(message_clear_start:tunnelbroker.GetResponseMessage)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -2196,7 +2222,7 @@
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
-const char* GetResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
+const char* GetResponseMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
@@ -2208,7 +2234,7 @@
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_fromdeviceid();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.GetResponse.fromDeviceID"));
+ CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.GetResponseMessage.fromDeviceID"));
CHK_(ptr);
} else goto handle_unusual;
continue;
@@ -2228,7 +2254,7 @@
ptr += 1;
auto str = _internal_add_blobhashes();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.GetResponse.blobHashes"));
+ CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.GetResponseMessage.blobHashes"));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
@@ -2256,9 +2282,9 @@
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* GetResponse::_InternalSerialize(
+::PROTOBUF_NAMESPACE_ID::uint8* GetResponseMessage::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.GetResponse)
+ // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.GetResponseMessage)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
@@ -2267,7 +2293,7 @@
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_fromdeviceid().data(), static_cast<int>(this->_internal_fromdeviceid().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "tunnelbroker.GetResponse.fromDeviceID");
+ "tunnelbroker.GetResponseMessage.fromDeviceID");
target = stream->WriteStringMaybeAliased(
1, this->_internal_fromdeviceid(), target);
}
@@ -2284,7 +2310,7 @@
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "tunnelbroker.GetResponse.blobHashes");
+ "tunnelbroker.GetResponseMessage.blobHashes");
target = stream->WriteString(3, s, target);
}
@@ -2292,12 +2318,12 @@
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
- // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.GetResponse)
+ // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.GetResponseMessage)
return target;
}
-size_t GetResponse::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.GetResponse)
+size_t GetResponseMessage::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.GetResponseMessage)
size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
@@ -2335,6 +2361,317 @@
return total_size;
}
+void GetResponseMessage::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.GetResponseMessage)
+ GOOGLE_DCHECK_NE(&from, this);
+ const GetResponseMessage* source =
+ ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<GetResponseMessage>(
+ &from);
+ if (source == nullptr) {
+ // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.GetResponseMessage)
+ ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
+ } else {
+ // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.GetResponseMessage)
+ MergeFrom(*source);
+ }
+}
+
+void GetResponseMessage::MergeFrom(const GetResponseMessage& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.GetResponseMessage)
+ GOOGLE_DCHECK_NE(&from, this);
+ _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ blobhashes_.MergeFrom(from.blobhashes_);
+ if (from.fromdeviceid().size() > 0) {
+ _internal_set_fromdeviceid(from._internal_fromdeviceid());
+ }
+ if (from.payload().size() > 0) {
+ _internal_set_payload(from._internal_payload());
+ }
+}
+
+void GetResponseMessage::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.GetResponseMessage)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void GetResponseMessage::CopyFrom(const GetResponseMessage& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.GetResponseMessage)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool GetResponseMessage::IsInitialized() const {
+ return true;
+}
+
+void GetResponseMessage::InternalSwap(GetResponseMessage* other) {
+ using std::swap;
+ _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
+ blobhashes_.InternalSwap(&other->blobhashes_);
+ fromdeviceid_.Swap(&other->fromdeviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
+ payload_.Swap(&other->payload_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
+}
+
+::PROTOBUF_NAMESPACE_ID::Metadata GetResponseMessage::GetMetadata() const {
+ return GetMetadataStatic();
+}
+
+
+// ===================================================================
+
+class GetResponse::_Internal {
+ public:
+ static const ::tunnelbroker::GetResponseMessage& responsemessage(const GetResponse* msg);
+ static const PROTOBUF_NAMESPACE_ID::Empty& ping(const GetResponse* msg);
+};
+
+const ::tunnelbroker::GetResponseMessage&
+GetResponse::_Internal::responsemessage(const GetResponse* msg) {
+ return *msg->data_.responsemessage_;
+}
+const PROTOBUF_NAMESPACE_ID::Empty&
+GetResponse::_Internal::ping(const GetResponse* msg) {
+ return *msg->data_.ping_;
+}
+void GetResponse::set_allocated_responsemessage(::tunnelbroker::GetResponseMessage* responsemessage) {
+ ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena();
+ clear_data();
+ if (responsemessage) {
+ ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
+ ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(responsemessage);
+ if (message_arena != submessage_arena) {
+ responsemessage = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
+ message_arena, responsemessage, submessage_arena);
+ }
+ set_has_responsemessage();
+ data_.responsemessage_ = responsemessage;
+ }
+ // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponse.responseMessage)
+}
+void GetResponse::set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping) {
+ ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena();
+ clear_data();
+ if (ping) {
+ ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
+ reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ping)->GetArena();
+ if (message_arena != submessage_arena) {
+ ping = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
+ message_arena, ping, submessage_arena);
+ }
+ set_has_ping();
+ data_.ping_ = ping;
+ }
+ // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponse.ping)
+}
+void GetResponse::clear_ping() {
+ if (_internal_has_ping()) {
+ if (GetArena() == nullptr) {
+ delete data_.ping_;
+ }
+ clear_has_data();
+ }
+}
+GetResponse::GetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
+ SharedCtor();
+ RegisterArenaDtor(arena);
+ // @@protoc_insertion_point(arena_constructor:tunnelbroker.GetResponse)
+}
+GetResponse::GetResponse(const GetResponse& from)
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ clear_has_data();
+ switch (from.data_case()) {
+ case kResponseMessage: {
+ _internal_mutable_responsemessage()->::tunnelbroker::GetResponseMessage::MergeFrom(from._internal_responsemessage());
+ break;
+ }
+ case kPing: {
+ _internal_mutable_ping()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_ping());
+ break;
+ }
+ case DATA_NOT_SET: {
+ break;
+ }
+ }
+ // @@protoc_insertion_point(copy_constructor:tunnelbroker.GetResponse)
+}
+
+void GetResponse::SharedCtor() {
+clear_has_data();
+}
+
+GetResponse::~GetResponse() {
+ // @@protoc_insertion_point(destructor:tunnelbroker.GetResponse)
+ SharedDtor();
+ _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
+}
+
+void GetResponse::SharedDtor() {
+ GOOGLE_DCHECK(GetArena() == nullptr);
+ if (has_data()) {
+ clear_data();
+ }
+}
+
+void GetResponse::ArenaDtor(void* object) {
+ GetResponse* _this = reinterpret_cast< GetResponse* >(object);
+ (void)_this;
+}
+void GetResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
+}
+void GetResponse::SetCachedSize(int size) const {
+ _cached_size_.Set(size);
+}
+
+void GetResponse::clear_data() {
+// @@protoc_insertion_point(one_of_clear_start:tunnelbroker.GetResponse)
+ switch (data_case()) {
+ case kResponseMessage: {
+ if (GetArena() == nullptr) {
+ delete data_.responsemessage_;
+ }
+ break;
+ }
+ case kPing: {
+ if (GetArena() == nullptr) {
+ delete data_.ping_;
+ }
+ break;
+ }
+ case DATA_NOT_SET: {
+ break;
+ }
+ }
+ _oneof_case_[0] = DATA_NOT_SET;
+}
+
+
+void GetResponse::Clear() {
+// @@protoc_insertion_point(message_clear_start:tunnelbroker.GetResponse)
+ ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ clear_data();
+ _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
+}
+
+const char* GetResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
+#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
+ while (!ctx->Done(&ptr)) {
+ ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
+ CHK_(ptr);
+ switch (tag >> 3) {
+ // .tunnelbroker.GetResponseMessage responseMessage = 1;
+ case 1:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ ptr = ctx->ParseMessage(_internal_mutable_responsemessage(), ptr);
+ CHK_(ptr);
+ } else goto handle_unusual;
+ continue;
+ // .google.protobuf.Empty ping = 2;
+ case 2:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ ptr = ctx->ParseMessage(_internal_mutable_ping(), ptr);
+ CHK_(ptr);
+ } else goto handle_unusual;
+ continue;
+ default: {
+ handle_unusual:
+ if ((tag & 7) == 4 || tag == 0) {
+ ctx->SetLastTag(tag);
+ goto success;
+ }
+ ptr = UnknownFieldParse(tag,
+ _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
+ ptr, ctx);
+ CHK_(ptr != nullptr);
+ continue;
+ }
+ } // switch
+ } // while
+success:
+ return ptr;
+failure:
+ ptr = nullptr;
+ goto success;
+#undef CHK_
+}
+
+::PROTOBUF_NAMESPACE_ID::uint8* GetResponse::_InternalSerialize(
+ ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+ // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.GetResponse)
+ ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // .tunnelbroker.GetResponseMessage responseMessage = 1;
+ if (_internal_has_responsemessage()) {
+ target = stream->EnsureSpace(target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
+ InternalWriteMessage(
+ 1, _Internal::responsemessage(this), target, stream);
+ }
+
+ // .google.protobuf.Empty ping = 2;
+ if (_internal_has_ping()) {
+ target = stream->EnsureSpace(target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
+ InternalWriteMessage(
+ 2, _Internal::ping(this), target, stream);
+ }
+
+ if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+ _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.GetResponse)
+ return target;
+}
+
+size_t GetResponse::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.GetResponse)
+ size_t total_size = 0;
+
+ ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ switch (data_case()) {
+ // .tunnelbroker.GetResponseMessage responseMessage = 1;
+ case kResponseMessage: {
+ total_size += 1 +
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
+ *data_.responsemessage_);
+ break;
+ }
+ // .google.protobuf.Empty ping = 2;
+ case kPing: {
+ total_size += 1 +
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
+ *data_.ping_);
+ break;
+ }
+ case DATA_NOT_SET: {
+ break;
+ }
+ }
+ if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+ return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+ _internal_metadata_, total_size, &_cached_size_);
+ }
+ int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
+ SetCachedSize(cached_size);
+ return total_size;
+}
+
void GetResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.GetResponse)
GOOGLE_DCHECK_NE(&from, this);
@@ -2357,12 +2694,18 @@
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
- blobhashes_.MergeFrom(from.blobhashes_);
- if (from.fromdeviceid().size() > 0) {
- _internal_set_fromdeviceid(from._internal_fromdeviceid());
- }
- if (from.payload().size() > 0) {
- _internal_set_payload(from._internal_payload());
+ switch (from.data_case()) {
+ case kResponseMessage: {
+ _internal_mutable_responsemessage()->::tunnelbroker::GetResponseMessage::MergeFrom(from._internal_responsemessage());
+ break;
+ }
+ case kPing: {
+ _internal_mutable_ping()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_ping());
+ break;
+ }
+ case DATA_NOT_SET: {
+ break;
+ }
}
}
@@ -2387,9 +2730,8 @@
void GetResponse::InternalSwap(GetResponse* other) {
using std::swap;
_internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
- blobhashes_.InternalSwap(&other->blobhashes_);
- fromdeviceid_.Swap(&other->fromdeviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
- payload_.Swap(&other->payload_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
+ swap(data_, other->data_);
+ swap(_oneof_case_[0], other->_oneof_case_[0]);
}
::PROTOBUF_NAMESPACE_ID::Metadata GetResponse::GetMetadata() const {
@@ -5376,6 +5718,9 @@
template<> PROTOBUF_NOINLINE ::tunnelbroker::GetRequest* Arena::CreateMaybeMessage< ::tunnelbroker::GetRequest >(Arena* arena) {
return Arena::CreateMessageInternal< ::tunnelbroker::GetRequest >(arena);
}
+template<> PROTOBUF_NOINLINE ::tunnelbroker::GetResponseMessage* Arena::CreateMaybeMessage< ::tunnelbroker::GetResponseMessage >(Arena* arena) {
+ return Arena::CreateMessageInternal< ::tunnelbroker::GetResponseMessage >(arena);
+}
template<> PROTOBUF_NOINLINE ::tunnelbroker::GetResponse* Arena::CreateMaybeMessage< ::tunnelbroker::GetResponse >(Arena* arena) {
return Arena::CreateMessageInternal< ::tunnelbroker::GetResponse >(arena);
}
diff --git a/shared/protos/tunnelbroker.proto b/shared/protos/tunnelbroker.proto
--- a/shared/protos/tunnelbroker.proto
+++ b/shared/protos/tunnelbroker.proto
@@ -70,12 +70,19 @@
string sessionID = 1;
}
-message GetResponse {
+message GetResponseMessage {
string fromDeviceID = 1;
bytes payload = 2;
repeated string blobHashes = 3;
}
+message GetResponse {
+ oneof data {
+ GetResponseMessage responseMessage = 1;
+ google.protobuf.Empty ping = 2;
+ }
+}
+
// Common messages structures for the MessagesStream
message ProcessedMessages {

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 3:19 PM (10 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2700310
Default Alt Text
D5173.id16938.diff (70 KB)

Event Timeline