diff --git a/native/cpp/CommonCpp/grpc/CMakeLists.txt b/native/cpp/CommonCpp/grpc/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/native/cpp/CommonCpp/grpc/CMakeLists.txt @@ -0,0 +1,103 @@ +project(grpc-comm) +cmake_minimum_required(VERSION 3.4) + +include(GNUInstallDirs) + +# CMake find modules +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +find_package(GRPCComm REQUIRED) + +set(PROTO_DEST_DIR ${CMAKE_CURRENT_BINARY_DIR}) +set(PROTO_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +file(MAKE_DIRECTORY ${PROTO_DEST_DIR}) + +set(_components backup blob tunnelbroker) +# Iterate through each protobuf file, create headers, sources, and export as component library +foreach(_component ${_components}) + set(proto_file ${CMAKE_CURRENT_SOURCE_DIR}/protos/${_component}.proto) + + # generate the protobuf and grpc files + protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${proto_file}) + grpc_generate_cpp(GRPC_SRCS GRPC_HDRS ${proto_file}) + + add_library(${_component} + ${PROTO_HDRS} ${PROTO_SRCS} ${GRPC_HDRS} ${GRPC_SRCS} + ) + + target_link_libraries(${_component} + gRPC::grpc++ + protobuf::libprotobuf + ) + + # reference local directory when building, use installation path when installing + target_include_directories(${_component} + PUBLIC + $ + $ + ) + + install(TARGETS ${_component} EXPORT comm-export + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${_component} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_component} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_component} + ) + + # ensure headers are also installed + install(FILES ${PROTO_HDRS} ${GRPC_HDRS} DESTINATION include/comm/grpc) +endforeach() + +set(CLIENT_HDRS + "Client.h" + "ClientGetReadReactor.h" + "GRPCStreamHostObject.h" +) + +set(CLIENT_SRCS + "Client.cpp" + "ClientGetReadReactor.cpp" + "GRPCStreamHostObject.cpp" +) + +add_library(comm-client + ${CLIENT_HDRS} + ${CLIENT_SRCS} +) + +target_link_libraries(comm-client + gRPC::grpc++ + protobuf::libprotobuf + tunnelbroker +) + +# reference local directory when building, use installation path when installing +target_include_directories(comm-client + PUBLIC + $ + $ + # HACK: add complete cmake support to react-native? + PRIVATE + "../../../node_modules/react-native/ReactCommon/callinvoker" + "../../../node_modules/react-native/ReactCommon/jsi" +) + +install(TARGETS comm-client EXPORT comm-export + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT comm-client + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-client + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-client +) + +install(FILES ${CLIENT_HDRS} DESTINATION include/grpc) + +# For development purposes, can point cmake to this directory if doing development +export(TARGETS ${_components} comm-client + NAMESPACE comm-grpc:: + FILE ${CMAKE_CURRENT_BINARY_DIR}/cmake/comm-grpc/comm-grpc-targets.cmake +) + +# For installation +install(EXPORT comm-export + FILE comm-grpc-targets.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-grpc + NAMESPACE comm-grpc:: +) diff --git a/native/cpp/CommonCpp/grpc/Client.h b/native/cpp/CommonCpp/grpc/Client.h --- a/native/cpp/CommonCpp/grpc/Client.h +++ b/native/cpp/CommonCpp/grpc/Client.h @@ -6,8 +6,8 @@ #include #include "ClientGetReadReactor.h" -#include "_generated/tunnelbroker.grpc.pb.h" -#include "_generated/tunnelbroker.pb.h" +#include +#include namespace comm { namespace network { diff --git a/native/cpp/CommonCpp/grpc/Client.cpp b/native/cpp/CommonCpp/grpc/Client.cpp --- a/native/cpp/CommonCpp/grpc/Client.cpp +++ b/native/cpp/CommonCpp/grpc/Client.cpp @@ -1,5 +1,5 @@ -#include "Client.h" -#include "Logger.h" +#include +#include #include namespace comm { diff --git a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h --- a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h +++ b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h @@ -1,10 +1,10 @@ #pragma once -#include "../NativeModules/InternalModules/SocketStatus.h" +#include #include -#include "_generated/tunnelbroker.grpc.pb.h" -#include "_generated/tunnelbroker.pb.h" +#include +#include class ClientGetReadReactor : public grpc::ClientReadReactor { 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 @@ -1,4 +1,4 @@ -#include "ClientGetReadReactor.h" +#include ClientGetReadReactor::ClientGetReadReactor( tunnelbroker::TunnelbrokerService::Stub *stub, diff --git a/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.cpp b/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.cpp --- a/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.cpp +++ b/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.cpp @@ -1,6 +1,6 @@ -#include "GRPCStreamHostObject.h" -#include "../NativeModules/InternalModules/GlobalNetworkSingleton.h" -#include "../NativeModules/InternalModules/SocketStatus.h" +#include +#include +#include using namespace facebook; diff --git a/native/cpp/CommonCpp/grpc/_generated/.clang-format b/native/cpp/CommonCpp/grpc/_generated/.clang-format deleted file mode 100644 --- a/native/cpp/CommonCpp/grpc/_generated/.clang-format +++ /dev/null @@ -1,3 +0,0 @@ ---- -DisableFormat: true -SortIncludes: false \ No newline at end of file diff --git a/native/cpp/CommonCpp/grpc/_generated/blob.grpc.pb.h b/native/cpp/CommonCpp/grpc/_generated/blob.grpc.pb.h deleted file mode 100644 --- a/native/cpp/CommonCpp/grpc/_generated/blob.grpc.pb.h +++ /dev/null @@ -1,527 +0,0 @@ -// @generated by the gRPC C++ plugin. -// If you make any local change, they will be lost. -// source: blob.proto -#ifndef GRPC_blob_2eproto__INCLUDED -#define GRPC_blob_2eproto__INCLUDED - -#include "blob.pb.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace blob { - -class BlobService final { - public: - static constexpr char const* service_full_name() { - return "blob.BlobService"; - } - class StubInterface { - public: - virtual ~StubInterface() {} - std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::blob::PutRequest, ::blob::PutResponse>> Put(::grpc::ClientContext* context) { - return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::blob::PutRequest, ::blob::PutResponse>>(PutRaw(context)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::blob::PutRequest, ::blob::PutResponse>> AsyncPut(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::blob::PutRequest, ::blob::PutResponse>>(AsyncPutRaw(context, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::blob::PutRequest, ::blob::PutResponse>> PrepareAsyncPut(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::blob::PutRequest, ::blob::PutResponse>>(PrepareAsyncPutRaw(context, cq)); - } - std::unique_ptr< ::grpc::ClientReaderInterface< ::blob::GetResponse>> Get(::grpc::ClientContext* context, const ::blob::GetRequest& request) { - return std::unique_ptr< ::grpc::ClientReaderInterface< ::blob::GetResponse>>(GetRaw(context, request)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::blob::GetResponse>> AsyncGet(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::blob::GetResponse>>(AsyncGetRaw(context, request, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::blob::GetResponse>> PrepareAsyncGet(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::blob::GetResponse>>(PrepareAsyncGetRaw(context, request, cq)); - } - virtual ::grpc::Status Remove(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::google::protobuf::Empty* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> AsyncRemove(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(AsyncRemoveRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> PrepareAsyncRemove(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncRemoveRaw(context, request, cq)); - } - class async_interface { - public: - virtual ~async_interface() {} - virtual void Put(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::blob::PutRequest,::blob::PutResponse>* reactor) = 0; - virtual void Get(::grpc::ClientContext* context, const ::blob::GetRequest* request, ::grpc::ClientReadReactor< ::blob::GetResponse>* reactor) = 0; - virtual void Remove(::grpc::ClientContext* context, const ::blob::RemoveRequest* request, ::google::protobuf::Empty* response, std::function) = 0; - virtual void Remove(::grpc::ClientContext* context, const ::blob::RemoveRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; - }; - typedef class async_interface experimental_async_interface; - virtual class async_interface* async() { return nullptr; } - class async_interface* experimental_async() { return async(); } - private: - virtual ::grpc::ClientReaderWriterInterface< ::blob::PutRequest, ::blob::PutResponse>* PutRaw(::grpc::ClientContext* context) = 0; - virtual ::grpc::ClientAsyncReaderWriterInterface< ::blob::PutRequest, ::blob::PutResponse>* AsyncPutRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncReaderWriterInterface< ::blob::PutRequest, ::blob::PutResponse>* PrepareAsyncPutRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientReaderInterface< ::blob::GetResponse>* GetRaw(::grpc::ClientContext* context, const ::blob::GetRequest& request) = 0; - virtual ::grpc::ClientAsyncReaderInterface< ::blob::GetResponse>* AsyncGetRaw(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncReaderInterface< ::blob::GetResponse>* PrepareAsyncGetRaw(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncRemoveRaw(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncRemoveRaw(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) = 0; - }; - class Stub final : public StubInterface { - public: - Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); - std::unique_ptr< ::grpc::ClientReaderWriter< ::blob::PutRequest, ::blob::PutResponse>> Put(::grpc::ClientContext* context) { - return std::unique_ptr< ::grpc::ClientReaderWriter< ::blob::PutRequest, ::blob::PutResponse>>(PutRaw(context)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::blob::PutRequest, ::blob::PutResponse>> AsyncPut(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::blob::PutRequest, ::blob::PutResponse>>(AsyncPutRaw(context, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::blob::PutRequest, ::blob::PutResponse>> PrepareAsyncPut(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::blob::PutRequest, ::blob::PutResponse>>(PrepareAsyncPutRaw(context, cq)); - } - std::unique_ptr< ::grpc::ClientReader< ::blob::GetResponse>> Get(::grpc::ClientContext* context, const ::blob::GetRequest& request) { - return std::unique_ptr< ::grpc::ClientReader< ::blob::GetResponse>>(GetRaw(context, request)); - } - std::unique_ptr< ::grpc::ClientAsyncReader< ::blob::GetResponse>> AsyncGet(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReader< ::blob::GetResponse>>(AsyncGetRaw(context, request, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReader< ::blob::GetResponse>> PrepareAsyncGet(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReader< ::blob::GetResponse>>(PrepareAsyncGetRaw(context, request, cq)); - } - ::grpc::Status Remove(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::google::protobuf::Empty* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncRemove(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(AsyncRemoveRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncRemove(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncRemoveRaw(context, request, cq)); - } - class async final : - public StubInterface::async_interface { - public: - void Put(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::blob::PutRequest,::blob::PutResponse>* reactor) override; - void Get(::grpc::ClientContext* context, const ::blob::GetRequest* request, ::grpc::ClientReadReactor< ::blob::GetResponse>* reactor) override; - void Remove(::grpc::ClientContext* context, const ::blob::RemoveRequest* request, ::google::protobuf::Empty* response, std::function) override; - void Remove(::grpc::ClientContext* context, const ::blob::RemoveRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; - private: - friend class Stub; - explicit async(Stub* stub): stub_(stub) { } - Stub* stub() { return stub_; } - Stub* stub_; - }; - class async* async() override { return &async_stub_; } - - private: - std::shared_ptr< ::grpc::ChannelInterface> channel_; - class async async_stub_{this}; - ::grpc::ClientReaderWriter< ::blob::PutRequest, ::blob::PutResponse>* PutRaw(::grpc::ClientContext* context) override; - ::grpc::ClientAsyncReaderWriter< ::blob::PutRequest, ::blob::PutResponse>* AsyncPutRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncReaderWriter< ::blob::PutRequest, ::blob::PutResponse>* PrepareAsyncPutRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientReader< ::blob::GetResponse>* GetRaw(::grpc::ClientContext* context, const ::blob::GetRequest& request) override; - ::grpc::ClientAsyncReader< ::blob::GetResponse>* AsyncGetRaw(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncReader< ::blob::GetResponse>* PrepareAsyncGetRaw(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncRemoveRaw(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncRemoveRaw(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) override; - const ::grpc::internal::RpcMethod rpcmethod_Put_; - const ::grpc::internal::RpcMethod rpcmethod_Get_; - const ::grpc::internal::RpcMethod rpcmethod_Remove_; - }; - static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); - - class Service : public ::grpc::Service { - public: - Service(); - virtual ~Service(); - virtual ::grpc::Status Put(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::blob::PutResponse, ::blob::PutRequest>* stream); - virtual ::grpc::Status Get(::grpc::ServerContext* context, const ::blob::GetRequest* request, ::grpc::ServerWriter< ::blob::GetResponse>* writer); - virtual ::grpc::Status Remove(::grpc::ServerContext* context, const ::blob::RemoveRequest* request, ::google::protobuf::Empty* response); - }; - template - class WithAsyncMethod_Put : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_Put() { - ::grpc::Service::MarkMethodAsync(0); - } - ~WithAsyncMethod_Put() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Put(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::blob::PutResponse, ::blob::PutRequest>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestPut(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::blob::PutResponse, ::blob::PutRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_Get() { - ::grpc::Service::MarkMethodAsync(1); - } - ~WithAsyncMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::blob::GetRequest* /*request*/, ::grpc::ServerWriter< ::blob::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGet(::grpc::ServerContext* context, ::blob::GetRequest* request, ::grpc::ServerAsyncWriter< ::blob::GetResponse>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_Remove : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_Remove() { - ::grpc::Service::MarkMethodAsync(2); - } - ~WithAsyncMethod_Remove() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Remove(::grpc::ServerContext* /*context*/, const ::blob::RemoveRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestRemove(::grpc::ServerContext* context, ::blob::RemoveRequest* request, ::grpc::ServerAsyncResponseWriter< ::google::protobuf::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); - } - }; - typedef WithAsyncMethod_Put > > AsyncService; - template - class WithCallbackMethod_Put : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_Put() { - ::grpc::Service::MarkMethodCallback(0, - new ::grpc::internal::CallbackBidiHandler< ::blob::PutRequest, ::blob::PutResponse>( - [this]( - ::grpc::CallbackServerContext* context) { return this->Put(context); })); - } - ~WithCallbackMethod_Put() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Put(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::blob::PutResponse, ::blob::PutRequest>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerBidiReactor< ::blob::PutRequest, ::blob::PutResponse>* Put( - ::grpc::CallbackServerContext* /*context*/) - { return nullptr; } - }; - template - class WithCallbackMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_Get() { - ::grpc::Service::MarkMethodCallback(1, - new ::grpc::internal::CallbackServerStreamingHandler< ::blob::GetRequest, ::blob::GetResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::blob::GetRequest* request) { return this->Get(context, request); })); - } - ~WithCallbackMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::blob::GetRequest* /*request*/, ::grpc::ServerWriter< ::blob::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerWriteReactor< ::blob::GetResponse>* Get( - ::grpc::CallbackServerContext* /*context*/, const ::blob::GetRequest* /*request*/) { return nullptr; } - }; - template - class WithCallbackMethod_Remove : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_Remove() { - ::grpc::Service::MarkMethodCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ::blob::RemoveRequest, ::google::protobuf::Empty>( - [this]( - ::grpc::CallbackServerContext* context, const ::blob::RemoveRequest* request, ::google::protobuf::Empty* response) { return this->Remove(context, request, response); }));} - void SetMessageAllocatorFor_Remove( - ::grpc::MessageAllocator< ::blob::RemoveRequest, ::google::protobuf::Empty>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); - static_cast<::grpc::internal::CallbackUnaryHandler< ::blob::RemoveRequest, ::google::protobuf::Empty>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_Remove() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Remove(::grpc::ServerContext* /*context*/, const ::blob::RemoveRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* Remove( - ::grpc::CallbackServerContext* /*context*/, const ::blob::RemoveRequest* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } - }; - typedef WithCallbackMethod_Put > > CallbackService; - typedef CallbackService ExperimentalCallbackService; - template - class WithGenericMethod_Put : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_Put() { - ::grpc::Service::MarkMethodGeneric(0); - } - ~WithGenericMethod_Put() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Put(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::blob::PutResponse, ::blob::PutRequest>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_Get() { - ::grpc::Service::MarkMethodGeneric(1); - } - ~WithGenericMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::blob::GetRequest* /*request*/, ::grpc::ServerWriter< ::blob::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_Remove : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_Remove() { - ::grpc::Service::MarkMethodGeneric(2); - } - ~WithGenericMethod_Remove() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Remove(::grpc::ServerContext* /*context*/, const ::blob::RemoveRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithRawMethod_Put : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_Put() { - ::grpc::Service::MarkMethodRaw(0); - } - ~WithRawMethod_Put() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Put(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::blob::PutResponse, ::blob::PutRequest>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestPut(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_Get() { - ::grpc::Service::MarkMethodRaw(1); - } - ~WithRawMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::blob::GetRequest* /*request*/, ::grpc::ServerWriter< ::blob::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGet(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_Remove : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_Remove() { - ::grpc::Service::MarkMethodRaw(2); - } - ~WithRawMethod_Remove() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Remove(::grpc::ServerContext* /*context*/, const ::blob::RemoveRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestRemove(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawCallbackMethod_Put : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_Put() { - ::grpc::Service::MarkMethodRawCallback(0, - new ::grpc::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context) { return this->Put(context); })); - } - ~WithRawCallbackMethod_Put() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Put(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::blob::PutResponse, ::blob::PutRequest>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* Put( - ::grpc::CallbackServerContext* /*context*/) - { return nullptr; } - }; - template - class WithRawCallbackMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_Get() { - ::grpc::Service::MarkMethodRawCallback(1, - new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->Get(context, request); })); - } - ~WithRawCallbackMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::blob::GetRequest* /*request*/, ::grpc::ServerWriter< ::blob::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* Get( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_Remove : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_Remove() { - ::grpc::Service::MarkMethodRawCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Remove(context, request, response); })); - } - ~WithRawCallbackMethod_Remove() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Remove(::grpc::ServerContext* /*context*/, const ::blob::RemoveRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* Remove( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithStreamedUnaryMethod_Remove : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_Remove() { - ::grpc::Service::MarkMethodStreamed(2, - new ::grpc::internal::StreamedUnaryHandler< - ::blob::RemoveRequest, ::google::protobuf::Empty>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::blob::RemoveRequest, ::google::protobuf::Empty>* streamer) { - return this->StreamedRemove(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_Remove() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status Remove(::grpc::ServerContext* /*context*/, const ::blob::RemoveRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedRemove(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::blob::RemoveRequest,::google::protobuf::Empty>* server_unary_streamer) = 0; - }; - typedef WithStreamedUnaryMethod_Remove StreamedUnaryService; - template - class WithSplitStreamingMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithSplitStreamingMethod_Get() { - ::grpc::Service::MarkMethodStreamed(1, - new ::grpc::internal::SplitServerStreamingHandler< - ::blob::GetRequest, ::blob::GetResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerSplitStreamer< - ::blob::GetRequest, ::blob::GetResponse>* streamer) { - return this->StreamedGet(context, - streamer); - })); - } - ~WithSplitStreamingMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::blob::GetRequest* /*request*/, ::grpc::ServerWriter< ::blob::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with split streamed - virtual ::grpc::Status StreamedGet(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::blob::GetRequest,::blob::GetResponse>* server_split_streamer) = 0; - }; - typedef WithSplitStreamingMethod_Get SplitStreamedService; - typedef WithSplitStreamingMethod_Get > StreamedService; -}; - -} // namespace blob - - -#endif // GRPC_blob_2eproto__INCLUDED diff --git a/native/cpp/CommonCpp/grpc/_generated/blob.grpc.pb.cc b/native/cpp/CommonCpp/grpc/_generated/blob.grpc.pb.cc deleted file mode 100644 --- a/native/cpp/CommonCpp/grpc/_generated/blob.grpc.pb.cc +++ /dev/null @@ -1,155 +0,0 @@ -// @generated by the gRPC C++ plugin. -// If you make any local change, they will be lost. -// source: blob.proto - -#include "blob.pb.h" -#include "blob.grpc.pb.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -namespace blob { - -static const char* BlobService_method_names[] = { - "/blob.BlobService/Put", - "/blob.BlobService/Get", - "/blob.BlobService/Remove", -}; - -std::unique_ptr< BlobService::Stub> BlobService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { - (void)options; - std::unique_ptr< BlobService::Stub> stub(new BlobService::Stub(channel, options)); - return stub; -} - -BlobService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) - : channel_(channel), rpcmethod_Put_(BlobService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::BIDI_STREAMING, channel) - , rpcmethod_Get_(BlobService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) - , rpcmethod_Remove_(BlobService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - {} - -::grpc::ClientReaderWriter< ::blob::PutRequest, ::blob::PutResponse>* BlobService::Stub::PutRaw(::grpc::ClientContext* context) { - return ::grpc::internal::ClientReaderWriterFactory< ::blob::PutRequest, ::blob::PutResponse>::Create(channel_.get(), rpcmethod_Put_, context); -} - -void BlobService::Stub::async::Put(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::blob::PutRequest,::blob::PutResponse>* reactor) { - ::grpc::internal::ClientCallbackReaderWriterFactory< ::blob::PutRequest,::blob::PutResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_Put_, context, reactor); -} - -::grpc::ClientAsyncReaderWriter< ::blob::PutRequest, ::blob::PutResponse>* BlobService::Stub::AsyncPutRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { - return ::grpc::internal::ClientAsyncReaderWriterFactory< ::blob::PutRequest, ::blob::PutResponse>::Create(channel_.get(), cq, rpcmethod_Put_, context, true, tag); -} - -::grpc::ClientAsyncReaderWriter< ::blob::PutRequest, ::blob::PutResponse>* BlobService::Stub::PrepareAsyncPutRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncReaderWriterFactory< ::blob::PutRequest, ::blob::PutResponse>::Create(channel_.get(), cq, rpcmethod_Put_, context, false, nullptr); -} - -::grpc::ClientReader< ::blob::GetResponse>* BlobService::Stub::GetRaw(::grpc::ClientContext* context, const ::blob::GetRequest& request) { - return ::grpc::internal::ClientReaderFactory< ::blob::GetResponse>::Create(channel_.get(), rpcmethod_Get_, context, request); -} - -void BlobService::Stub::async::Get(::grpc::ClientContext* context, const ::blob::GetRequest* request, ::grpc::ClientReadReactor< ::blob::GetResponse>* reactor) { - ::grpc::internal::ClientCallbackReaderFactory< ::blob::GetResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_Get_, context, request, reactor); -} - -::grpc::ClientAsyncReader< ::blob::GetResponse>* BlobService::Stub::AsyncGetRaw(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return ::grpc::internal::ClientAsyncReaderFactory< ::blob::GetResponse>::Create(channel_.get(), cq, rpcmethod_Get_, context, request, true, tag); -} - -::grpc::ClientAsyncReader< ::blob::GetResponse>* BlobService::Stub::PrepareAsyncGetRaw(::grpc::ClientContext* context, const ::blob::GetRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncReaderFactory< ::blob::GetResponse>::Create(channel_.get(), cq, rpcmethod_Get_, context, request, false, nullptr); -} - -::grpc::Status BlobService::Stub::Remove(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::google::protobuf::Empty* response) { - return ::grpc::internal::BlockingUnaryCall< ::blob::RemoveRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Remove_, context, request, response); -} - -void BlobService::Stub::async::Remove(::grpc::ClientContext* context, const ::blob::RemoveRequest* request, ::google::protobuf::Empty* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::blob::RemoveRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Remove_, context, request, response, std::move(f)); -} - -void BlobService::Stub::async::Remove(::grpc::ClientContext* context, const ::blob::RemoveRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Remove_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* BlobService::Stub::PrepareAsyncRemoveRaw(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::blob::RemoveRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Remove_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* BlobService::Stub::AsyncRemoveRaw(::grpc::ClientContext* context, const ::blob::RemoveRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncRemoveRaw(context, request, cq); - result->StartCall(); - return result; -} - -BlobService::Service::Service() { - AddMethod(new ::grpc::internal::RpcServiceMethod( - BlobService_method_names[0], - ::grpc::internal::RpcMethod::BIDI_STREAMING, - new ::grpc::internal::BidiStreamingHandler< BlobService::Service, ::blob::PutRequest, ::blob::PutResponse>( - [](BlobService::Service* service, - ::grpc::ServerContext* ctx, - ::grpc::ServerReaderWriter<::blob::PutResponse, - ::blob::PutRequest>* stream) { - return service->Put(ctx, stream); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - BlobService_method_names[1], - ::grpc::internal::RpcMethod::SERVER_STREAMING, - new ::grpc::internal::ServerStreamingHandler< BlobService::Service, ::blob::GetRequest, ::blob::GetResponse>( - [](BlobService::Service* service, - ::grpc::ServerContext* ctx, - const ::blob::GetRequest* req, - ::grpc::ServerWriter<::blob::GetResponse>* writer) { - return service->Get(ctx, req, writer); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - BlobService_method_names[2], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< BlobService::Service, ::blob::RemoveRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](BlobService::Service* service, - ::grpc::ServerContext* ctx, - const ::blob::RemoveRequest* req, - ::google::protobuf::Empty* resp) { - return service->Remove(ctx, req, resp); - }, this))); -} - -BlobService::Service::~Service() { -} - -::grpc::Status BlobService::Service::Put(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::blob::PutResponse, ::blob::PutRequest>* stream) { - (void) context; - (void) stream; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status BlobService::Service::Get(::grpc::ServerContext* context, const ::blob::GetRequest* request, ::grpc::ServerWriter< ::blob::GetResponse>* writer) { - (void) context; - (void) request; - (void) writer; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status BlobService::Service::Remove(::grpc::ServerContext* context, const ::blob::RemoveRequest* request, ::google::protobuf::Empty* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - - -} // namespace blob - diff --git a/native/cpp/CommonCpp/grpc/_generated/blob.pb.h b/native/cpp/CommonCpp/grpc/_generated/blob.pb.h deleted file mode 100644 --- a/native/cpp/CommonCpp/grpc/_generated/blob.pb.h +++ /dev/null @@ -1,1454 +0,0 @@ -// @generated by the protocol buffer compiler. DO NOT EDIT! -// source: blob.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_blob_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_blob_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3015000 -#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 3015008 < 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 -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_blob_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_blob_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - 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[5] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_blob_2eproto; -::PROTOBUF_NAMESPACE_ID::Metadata descriptor_table_blob_2eproto_metadata_getter(int index); -namespace blob { -class GetRequest; -struct GetRequestDefaultTypeInternal; -extern GetRequestDefaultTypeInternal _GetRequest_default_instance_; -class GetResponse; -struct GetResponseDefaultTypeInternal; -extern GetResponseDefaultTypeInternal _GetResponse_default_instance_; -class PutRequest; -struct PutRequestDefaultTypeInternal; -extern PutRequestDefaultTypeInternal _PutRequest_default_instance_; -class PutResponse; -struct PutResponseDefaultTypeInternal; -extern PutResponseDefaultTypeInternal _PutResponse_default_instance_; -class RemoveRequest; -struct RemoveRequestDefaultTypeInternal; -extern RemoveRequestDefaultTypeInternal _RemoveRequest_default_instance_; -} // namespace blob -PROTOBUF_NAMESPACE_OPEN -template<> ::blob::GetRequest* Arena::CreateMaybeMessage<::blob::GetRequest>(Arena*); -template<> ::blob::GetResponse* Arena::CreateMaybeMessage<::blob::GetResponse>(Arena*); -template<> ::blob::PutRequest* Arena::CreateMaybeMessage<::blob::PutRequest>(Arena*); -template<> ::blob::PutResponse* Arena::CreateMaybeMessage<::blob::PutResponse>(Arena*); -template<> ::blob::RemoveRequest* Arena::CreateMaybeMessage<::blob::RemoveRequest>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace blob { - -// =================================================================== - -class PutRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:blob.PutRequest) */ { - public: - inline PutRequest() : PutRequest(nullptr) {} - virtual ~PutRequest(); - explicit constexpr PutRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - PutRequest(const PutRequest& from); - PutRequest(PutRequest&& from) noexcept - : PutRequest() { - *this = ::std::move(from); - } - - inline PutRequest& operator=(const PutRequest& from) { - CopyFrom(from); - return *this; - } - inline PutRequest& operator=(PutRequest&& 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 PutRequest& default_instance() { - return *internal_default_instance(); - } - enum DataCase { - kHolder = 1, - kBlobHash = 2, - kDataChunk = 3, - DATA_NOT_SET = 0, - }; - - static inline const PutRequest* internal_default_instance() { - return reinterpret_cast( - &_PutRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(PutRequest& a, PutRequest& b) { - a.Swap(&b); - } - inline void Swap(PutRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(PutRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline PutRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - PutRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const PutRequest& from); - void MergeFrom(const PutRequest& 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(PutRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "blob.PutRequest"; - } - protected: - explicit PutRequest(::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_blob_2eproto_metadata_getter(kIndexInFileMessages); - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kHolderFieldNumber = 1, - kBlobHashFieldNumber = 2, - kDataChunkFieldNumber = 3, - }; - // string holder = 1; - bool has_holder() const; - private: - bool _internal_has_holder() const; - public: - void clear_holder(); - const std::string& holder() const; - void set_holder(const std::string& value); - void set_holder(std::string&& value); - void set_holder(const char* value); - void set_holder(const char* value, size_t size); - std::string* mutable_holder(); - std::string* release_holder(); - void set_allocated_holder(std::string* holder); - private: - const std::string& _internal_holder() const; - void _internal_set_holder(const std::string& value); - std::string* _internal_mutable_holder(); - public: - - // string blobHash = 2; - bool has_blobhash() const; - private: - bool _internal_has_blobhash() const; - public: - void clear_blobhash(); - const std::string& blobhash() const; - void set_blobhash(const std::string& value); - void set_blobhash(std::string&& value); - void set_blobhash(const char* value); - void set_blobhash(const char* value, size_t size); - std::string* mutable_blobhash(); - std::string* release_blobhash(); - void set_allocated_blobhash(std::string* blobhash); - private: - const std::string& _internal_blobhash() const; - void _internal_set_blobhash(const std::string& value); - std::string* _internal_mutable_blobhash(); - public: - - // bytes dataChunk = 3; - bool has_datachunk() const; - private: - bool _internal_has_datachunk() const; - public: - void clear_datachunk(); - const std::string& datachunk() const; - void set_datachunk(const std::string& value); - void set_datachunk(std::string&& value); - void set_datachunk(const char* value); - void set_datachunk(const void* value, size_t size); - std::string* mutable_datachunk(); - std::string* release_datachunk(); - void set_allocated_datachunk(std::string* datachunk); - private: - const std::string& _internal_datachunk() const; - void _internal_set_datachunk(const std::string& value); - std::string* _internal_mutable_datachunk(); - public: - - void clear_data(); - DataCase data_case() const; - // @@protoc_insertion_point(class_scope:blob.PutRequest) - private: - class _Internal; - void set_has_holder(); - void set_has_blobhash(); - void set_has_datachunk(); - - inline bool has_data() const; - inline void clear_has_data(); - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - union DataUnion { - constexpr DataUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr holder_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr blobhash_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr datachunk_; - } data_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; - - friend struct ::TableStruct_blob_2eproto; -}; -// ------------------------------------------------------------------- - -class PutResponse PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:blob.PutResponse) */ { - public: - inline PutResponse() : PutResponse(nullptr) {} - virtual ~PutResponse(); - explicit constexpr PutResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - PutResponse(const PutResponse& from); - PutResponse(PutResponse&& from) noexcept - : PutResponse() { - *this = ::std::move(from); - } - - inline PutResponse& operator=(const PutResponse& from) { - CopyFrom(from); - return *this; - } - inline PutResponse& operator=(PutResponse&& 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 PutResponse& default_instance() { - return *internal_default_instance(); - } - static inline const PutResponse* internal_default_instance() { - return reinterpret_cast( - &_PutResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(PutResponse& a, PutResponse& b) { - a.Swap(&b); - } - inline void Swap(PutResponse* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(PutResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline PutResponse* New() const final { - return CreateMaybeMessage(nullptr); - } - - PutResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const PutResponse& from); - void MergeFrom(const PutResponse& 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(PutResponse* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "blob.PutResponse"; - } - protected: - explicit PutResponse(::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_blob_2eproto_metadata_getter(kIndexInFileMessages); - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kDataExistsFieldNumber = 1, - }; - // bool dataExists = 1; - void clear_dataexists(); - bool dataexists() const; - void set_dataexists(bool value); - private: - bool _internal_dataexists() const; - void _internal_set_dataexists(bool value); - public: - - // @@protoc_insertion_point(class_scope:blob.PutResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - bool dataexists_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_blob_2eproto; -}; -// ------------------------------------------------------------------- - -class GetRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:blob.GetRequest) */ { - public: - inline GetRequest() : GetRequest(nullptr) {} - virtual ~GetRequest(); - explicit constexpr GetRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - GetRequest(const GetRequest& from); - GetRequest(GetRequest&& from) noexcept - : GetRequest() { - *this = ::std::move(from); - } - - inline GetRequest& operator=(const GetRequest& from) { - CopyFrom(from); - return *this; - } - inline GetRequest& operator=(GetRequest&& 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 GetRequest& default_instance() { - return *internal_default_instance(); - } - static inline const GetRequest* internal_default_instance() { - return reinterpret_cast( - &_GetRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(GetRequest& a, GetRequest& b) { - a.Swap(&b); - } - inline void Swap(GetRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(GetRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline GetRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - GetRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const GetRequest& from); - void MergeFrom(const GetRequest& 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(GetRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "blob.GetRequest"; - } - protected: - explicit GetRequest(::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_blob_2eproto_metadata_getter(kIndexInFileMessages); - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kHolderFieldNumber = 1, - }; - // string holder = 1; - void clear_holder(); - const std::string& holder() const; - void set_holder(const std::string& value); - void set_holder(std::string&& value); - void set_holder(const char* value); - void set_holder(const char* value, size_t size); - std::string* mutable_holder(); - std::string* release_holder(); - void set_allocated_holder(std::string* holder); - private: - const std::string& _internal_holder() const; - void _internal_set_holder(const std::string& value); - std::string* _internal_mutable_holder(); - public: - - // @@protoc_insertion_point(class_scope:blob.GetRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr holder_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_blob_2eproto; -}; -// ------------------------------------------------------------------- - -class GetResponse PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:blob.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(); - } - static inline const GetResponse* internal_default_instance() { - return reinterpret_cast( - &_GetResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - 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(nullptr); - } - - GetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(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 "blob.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_blob_2eproto_metadata_getter(kIndexInFileMessages); - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kDataChunkFieldNumber = 1, - }; - // bytes dataChunk = 1; - void clear_datachunk(); - const std::string& datachunk() const; - void set_datachunk(const std::string& value); - void set_datachunk(std::string&& value); - void set_datachunk(const char* value); - void set_datachunk(const void* value, size_t size); - std::string* mutable_datachunk(); - std::string* release_datachunk(); - void set_allocated_datachunk(std::string* datachunk); - private: - const std::string& _internal_datachunk() const; - void _internal_set_datachunk(const std::string& value); - std::string* _internal_mutable_datachunk(); - public: - - // @@protoc_insertion_point(class_scope:blob.GetResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr datachunk_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_blob_2eproto; -}; -// ------------------------------------------------------------------- - -class RemoveRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:blob.RemoveRequest) */ { - public: - inline RemoveRequest() : RemoveRequest(nullptr) {} - virtual ~RemoveRequest(); - explicit constexpr RemoveRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - RemoveRequest(const RemoveRequest& from); - RemoveRequest(RemoveRequest&& from) noexcept - : RemoveRequest() { - *this = ::std::move(from); - } - - inline RemoveRequest& operator=(const RemoveRequest& from) { - CopyFrom(from); - return *this; - } - inline RemoveRequest& operator=(RemoveRequest&& 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 RemoveRequest& default_instance() { - return *internal_default_instance(); - } - static inline const RemoveRequest* internal_default_instance() { - return reinterpret_cast( - &_RemoveRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(RemoveRequest& a, RemoveRequest& b) { - a.Swap(&b); - } - inline void Swap(RemoveRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(RemoveRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline RemoveRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - RemoveRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const RemoveRequest& from); - void MergeFrom(const RemoveRequest& 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(RemoveRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "blob.RemoveRequest"; - } - protected: - explicit RemoveRequest(::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_blob_2eproto_metadata_getter(kIndexInFileMessages); - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kHolderFieldNumber = 1, - }; - // string holder = 1; - void clear_holder(); - const std::string& holder() const; - void set_holder(const std::string& value); - void set_holder(std::string&& value); - void set_holder(const char* value); - void set_holder(const char* value, size_t size); - std::string* mutable_holder(); - std::string* release_holder(); - void set_allocated_holder(std::string* holder); - private: - const std::string& _internal_holder() const; - void _internal_set_holder(const std::string& value); - std::string* _internal_mutable_holder(); - public: - - // @@protoc_insertion_point(class_scope:blob.RemoveRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr holder_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_blob_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// PutRequest - -// string holder = 1; -inline bool PutRequest::_internal_has_holder() const { - return data_case() == kHolder; -} -inline bool PutRequest::has_holder() const { - return _internal_has_holder(); -} -inline void PutRequest::set_has_holder() { - _oneof_case_[0] = kHolder; -} -inline void PutRequest::clear_holder() { - if (_internal_has_holder()) { - data_.holder_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); - clear_has_data(); - } -} -inline const std::string& PutRequest::holder() const { - // @@protoc_insertion_point(field_get:blob.PutRequest.holder) - return _internal_holder(); -} -inline void PutRequest::set_holder(const std::string& value) { - _internal_set_holder(value); - // @@protoc_insertion_point(field_set:blob.PutRequest.holder) -} -inline std::string* PutRequest::mutable_holder() { - // @@protoc_insertion_point(field_mutable:blob.PutRequest.holder) - return _internal_mutable_holder(); -} -inline const std::string& PutRequest::_internal_holder() const { - if (_internal_has_holder()) { - return data_.holder_.Get(); - } - return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); -} -inline void PutRequest::_internal_set_holder(const std::string& value) { - if (!_internal_has_holder()) { - clear_data(); - set_has_holder(); - data_.holder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void PutRequest::set_holder(std::string&& value) { - // @@protoc_insertion_point(field_set:blob.PutRequest.holder) - if (!_internal_has_holder()) { - clear_data(); - set_has_holder(); - data_.holder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.holder_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:blob.PutRequest.holder) -} -inline void PutRequest::set_holder(const char* value) { - GOOGLE_DCHECK(value != nullptr); - if (!_internal_has_holder()) { - clear_data(); - set_has_holder(); - data_.holder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, - ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:blob.PutRequest.holder) -} -inline void PutRequest::set_holder(const char* value, - size_t size) { - if (!_internal_has_holder()) { - clear_data(); - set_has_holder(); - data_.holder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.holder_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), - GetArena()); - // @@protoc_insertion_point(field_set_pointer:blob.PutRequest.holder) -} -inline std::string* PutRequest::_internal_mutable_holder() { - if (!_internal_has_holder()) { - clear_data(); - set_has_holder(); - data_.holder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - return data_.holder_.Mutable( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* PutRequest::release_holder() { - // @@protoc_insertion_point(field_release:blob.PutRequest.holder) - if (_internal_has_holder()) { - clear_has_data(); - return data_.holder_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - } else { - return nullptr; - } -} -inline void PutRequest::set_allocated_holder(std::string* holder) { - if (has_data()) { - clear_data(); - } - if (holder != nullptr) { - set_has_holder(); - data_.holder_.UnsafeSetDefault(holder); - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); - if (arena != nullptr) { - arena->Own(holder); - } - } - // @@protoc_insertion_point(field_set_allocated:blob.PutRequest.holder) -} - -// string blobHash = 2; -inline bool PutRequest::_internal_has_blobhash() const { - return data_case() == kBlobHash; -} -inline bool PutRequest::has_blobhash() const { - return _internal_has_blobhash(); -} -inline void PutRequest::set_has_blobhash() { - _oneof_case_[0] = kBlobHash; -} -inline void PutRequest::clear_blobhash() { - if (_internal_has_blobhash()) { - data_.blobhash_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); - clear_has_data(); - } -} -inline const std::string& PutRequest::blobhash() const { - // @@protoc_insertion_point(field_get:blob.PutRequest.blobHash) - return _internal_blobhash(); -} -inline void PutRequest::set_blobhash(const std::string& value) { - _internal_set_blobhash(value); - // @@protoc_insertion_point(field_set:blob.PutRequest.blobHash) -} -inline std::string* PutRequest::mutable_blobhash() { - // @@protoc_insertion_point(field_mutable:blob.PutRequest.blobHash) - return _internal_mutable_blobhash(); -} -inline const std::string& PutRequest::_internal_blobhash() const { - if (_internal_has_blobhash()) { - return data_.blobhash_.Get(); - } - return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); -} -inline void PutRequest::_internal_set_blobhash(const std::string& value) { - if (!_internal_has_blobhash()) { - clear_data(); - set_has_blobhash(); - data_.blobhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.blobhash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void PutRequest::set_blobhash(std::string&& value) { - // @@protoc_insertion_point(field_set:blob.PutRequest.blobHash) - if (!_internal_has_blobhash()) { - clear_data(); - set_has_blobhash(); - data_.blobhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.blobhash_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:blob.PutRequest.blobHash) -} -inline void PutRequest::set_blobhash(const char* value) { - GOOGLE_DCHECK(value != nullptr); - if (!_internal_has_blobhash()) { - clear_data(); - set_has_blobhash(); - data_.blobhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.blobhash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, - ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:blob.PutRequest.blobHash) -} -inline void PutRequest::set_blobhash(const char* value, - size_t size) { - if (!_internal_has_blobhash()) { - clear_data(); - set_has_blobhash(); - data_.blobhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.blobhash_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), - GetArena()); - // @@protoc_insertion_point(field_set_pointer:blob.PutRequest.blobHash) -} -inline std::string* PutRequest::_internal_mutable_blobhash() { - if (!_internal_has_blobhash()) { - clear_data(); - set_has_blobhash(); - data_.blobhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - return data_.blobhash_.Mutable( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* PutRequest::release_blobhash() { - // @@protoc_insertion_point(field_release:blob.PutRequest.blobHash) - if (_internal_has_blobhash()) { - clear_has_data(); - return data_.blobhash_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - } else { - return nullptr; - } -} -inline void PutRequest::set_allocated_blobhash(std::string* blobhash) { - if (has_data()) { - clear_data(); - } - if (blobhash != nullptr) { - set_has_blobhash(); - data_.blobhash_.UnsafeSetDefault(blobhash); - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); - if (arena != nullptr) { - arena->Own(blobhash); - } - } - // @@protoc_insertion_point(field_set_allocated:blob.PutRequest.blobHash) -} - -// bytes dataChunk = 3; -inline bool PutRequest::_internal_has_datachunk() const { - return data_case() == kDataChunk; -} -inline bool PutRequest::has_datachunk() const { - return _internal_has_datachunk(); -} -inline void PutRequest::set_has_datachunk() { - _oneof_case_[0] = kDataChunk; -} -inline void PutRequest::clear_datachunk() { - if (_internal_has_datachunk()) { - data_.datachunk_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); - clear_has_data(); - } -} -inline const std::string& PutRequest::datachunk() const { - // @@protoc_insertion_point(field_get:blob.PutRequest.dataChunk) - return _internal_datachunk(); -} -inline void PutRequest::set_datachunk(const std::string& value) { - _internal_set_datachunk(value); - // @@protoc_insertion_point(field_set:blob.PutRequest.dataChunk) -} -inline std::string* PutRequest::mutable_datachunk() { - // @@protoc_insertion_point(field_mutable:blob.PutRequest.dataChunk) - return _internal_mutable_datachunk(); -} -inline const std::string& PutRequest::_internal_datachunk() const { - if (_internal_has_datachunk()) { - return data_.datachunk_.Get(); - } - return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); -} -inline void PutRequest::_internal_set_datachunk(const std::string& value) { - if (!_internal_has_datachunk()) { - clear_data(); - set_has_datachunk(); - data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.datachunk_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void PutRequest::set_datachunk(std::string&& value) { - // @@protoc_insertion_point(field_set:blob.PutRequest.dataChunk) - if (!_internal_has_datachunk()) { - clear_data(); - set_has_datachunk(); - data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.datachunk_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:blob.PutRequest.dataChunk) -} -inline void PutRequest::set_datachunk(const char* value) { - GOOGLE_DCHECK(value != nullptr); - if (!_internal_has_datachunk()) { - clear_data(); - set_has_datachunk(); - data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.datachunk_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, - ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:blob.PutRequest.dataChunk) -} -inline void PutRequest::set_datachunk(const void* value, - size_t size) { - if (!_internal_has_datachunk()) { - clear_data(); - set_has_datachunk(); - data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - data_.datachunk_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), - GetArena()); - // @@protoc_insertion_point(field_set_pointer:blob.PutRequest.dataChunk) -} -inline std::string* PutRequest::_internal_mutable_datachunk() { - if (!_internal_has_datachunk()) { - clear_data(); - set_has_datachunk(); - data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - } - return data_.datachunk_.Mutable( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* PutRequest::release_datachunk() { - // @@protoc_insertion_point(field_release:blob.PutRequest.dataChunk) - if (_internal_has_datachunk()) { - clear_has_data(); - return data_.datachunk_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - } else { - return nullptr; - } -} -inline void PutRequest::set_allocated_datachunk(std::string* datachunk) { - if (has_data()) { - clear_data(); - } - if (datachunk != nullptr) { - set_has_datachunk(); - data_.datachunk_.UnsafeSetDefault(datachunk); - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); - if (arena != nullptr) { - arena->Own(datachunk); - } - } - // @@protoc_insertion_point(field_set_allocated:blob.PutRequest.dataChunk) -} - -inline bool PutRequest::has_data() const { - return data_case() != DATA_NOT_SET; -} -inline void PutRequest::clear_has_data() { - _oneof_case_[0] = DATA_NOT_SET; -} -inline PutRequest::DataCase PutRequest::data_case() const { - return PutRequest::DataCase(_oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// PutResponse - -// bool dataExists = 1; -inline void PutResponse::clear_dataexists() { - dataexists_ = false; -} -inline bool PutResponse::_internal_dataexists() const { - return dataexists_; -} -inline bool PutResponse::dataexists() const { - // @@protoc_insertion_point(field_get:blob.PutResponse.dataExists) - return _internal_dataexists(); -} -inline void PutResponse::_internal_set_dataexists(bool value) { - - dataexists_ = value; -} -inline void PutResponse::set_dataexists(bool value) { - _internal_set_dataexists(value); - // @@protoc_insertion_point(field_set:blob.PutResponse.dataExists) -} - -// ------------------------------------------------------------------- - -// GetRequest - -// string holder = 1; -inline void GetRequest::clear_holder() { - holder_.ClearToEmpty(); -} -inline const std::string& GetRequest::holder() const { - // @@protoc_insertion_point(field_get:blob.GetRequest.holder) - return _internal_holder(); -} -inline void GetRequest::set_holder(const std::string& value) { - _internal_set_holder(value); - // @@protoc_insertion_point(field_set:blob.GetRequest.holder) -} -inline std::string* GetRequest::mutable_holder() { - // @@protoc_insertion_point(field_mutable:blob.GetRequest.holder) - return _internal_mutable_holder(); -} -inline const std::string& GetRequest::_internal_holder() const { - return holder_.Get(); -} -inline void GetRequest::_internal_set_holder(const std::string& value) { - - holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void GetRequest::set_holder(std::string&& value) { - - holder_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:blob.GetRequest.holder) -} -inline void GetRequest::set_holder(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:blob.GetRequest.holder) -} -inline void GetRequest::set_holder(const char* value, - size_t size) { - - holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:blob.GetRequest.holder) -} -inline std::string* GetRequest::_internal_mutable_holder() { - - return holder_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* GetRequest::release_holder() { - // @@protoc_insertion_point(field_release:blob.GetRequest.holder) - return holder_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void GetRequest::set_allocated_holder(std::string* holder) { - if (holder != nullptr) { - - } else { - - } - holder_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), holder, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:blob.GetRequest.holder) -} - -// ------------------------------------------------------------------- - -// GetResponse - -// bytes dataChunk = 1; -inline void GetResponse::clear_datachunk() { - datachunk_.ClearToEmpty(); -} -inline const std::string& GetResponse::datachunk() const { - // @@protoc_insertion_point(field_get:blob.GetResponse.dataChunk) - return _internal_datachunk(); -} -inline void GetResponse::set_datachunk(const std::string& value) { - _internal_set_datachunk(value); - // @@protoc_insertion_point(field_set:blob.GetResponse.dataChunk) -} -inline std::string* GetResponse::mutable_datachunk() { - // @@protoc_insertion_point(field_mutable:blob.GetResponse.dataChunk) - return _internal_mutable_datachunk(); -} -inline const std::string& GetResponse::_internal_datachunk() const { - return datachunk_.Get(); -} -inline void GetResponse::_internal_set_datachunk(const std::string& value) { - - datachunk_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void GetResponse::set_datachunk(std::string&& value) { - - datachunk_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:blob.GetResponse.dataChunk) -} -inline void GetResponse::set_datachunk(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - datachunk_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:blob.GetResponse.dataChunk) -} -inline void GetResponse::set_datachunk(const void* value, - size_t size) { - - datachunk_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:blob.GetResponse.dataChunk) -} -inline std::string* GetResponse::_internal_mutable_datachunk() { - - return datachunk_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* GetResponse::release_datachunk() { - // @@protoc_insertion_point(field_release:blob.GetResponse.dataChunk) - return datachunk_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void GetResponse::set_allocated_datachunk(std::string* datachunk) { - if (datachunk != nullptr) { - - } else { - - } - datachunk_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), datachunk, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:blob.GetResponse.dataChunk) -} - -// ------------------------------------------------------------------- - -// RemoveRequest - -// string holder = 1; -inline void RemoveRequest::clear_holder() { - holder_.ClearToEmpty(); -} -inline const std::string& RemoveRequest::holder() const { - // @@protoc_insertion_point(field_get:blob.RemoveRequest.holder) - return _internal_holder(); -} -inline void RemoveRequest::set_holder(const std::string& value) { - _internal_set_holder(value); - // @@protoc_insertion_point(field_set:blob.RemoveRequest.holder) -} -inline std::string* RemoveRequest::mutable_holder() { - // @@protoc_insertion_point(field_mutable:blob.RemoveRequest.holder) - return _internal_mutable_holder(); -} -inline const std::string& RemoveRequest::_internal_holder() const { - return holder_.Get(); -} -inline void RemoveRequest::_internal_set_holder(const std::string& value) { - - holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void RemoveRequest::set_holder(std::string&& value) { - - holder_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:blob.RemoveRequest.holder) -} -inline void RemoveRequest::set_holder(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:blob.RemoveRequest.holder) -} -inline void RemoveRequest::set_holder(const char* value, - size_t size) { - - holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:blob.RemoveRequest.holder) -} -inline std::string* RemoveRequest::_internal_mutable_holder() { - - return holder_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* RemoveRequest::release_holder() { - // @@protoc_insertion_point(field_release:blob.RemoveRequest.holder) - return holder_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void RemoveRequest::set_allocated_holder(std::string* holder) { - if (holder != nullptr) { - - } else { - - } - holder_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), holder, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:blob.RemoveRequest.holder) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace blob - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_blob_2eproto diff --git a/native/cpp/CommonCpp/grpc/_generated/blob.pb.cc b/native/cpp/CommonCpp/grpc/_generated/blob.pb.cc deleted file mode 100644 --- a/native/cpp/CommonCpp/grpc/_generated/blob.pb.cc +++ /dev/null @@ -1,1277 +0,0 @@ -// @generated by the protocol buffer compiler. DO NOT EDIT! -// source: blob.proto - -#include "blob.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG -namespace blob { -constexpr PutRequest::PutRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : _oneof_case_{}{} -struct PutRequestDefaultTypeInternal { - constexpr PutRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~PutRequestDefaultTypeInternal() {} - union { - PutRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PutRequestDefaultTypeInternal _PutRequest_default_instance_; -constexpr PutResponse::PutResponse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : dataexists_(false){} -struct PutResponseDefaultTypeInternal { - constexpr PutResponseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~PutResponseDefaultTypeInternal() {} - union { - PutResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PutResponseDefaultTypeInternal _PutResponse_default_instance_; -constexpr GetRequest::GetRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : holder_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct GetRequestDefaultTypeInternal { - constexpr GetRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~GetRequestDefaultTypeInternal() {} - union { - GetRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetRequestDefaultTypeInternal _GetRequest_default_instance_; -constexpr GetResponse::GetResponse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : datachunk_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct GetResponseDefaultTypeInternal { - constexpr GetResponseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~GetResponseDefaultTypeInternal() {} - union { - GetResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetResponseDefaultTypeInternal _GetResponse_default_instance_; -constexpr RemoveRequest::RemoveRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : holder_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct RemoveRequestDefaultTypeInternal { - constexpr RemoveRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~RemoveRequestDefaultTypeInternal() {} - union { - RemoveRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RemoveRequestDefaultTypeInternal _RemoveRequest_default_instance_; -} // namespace blob -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_blob_2eproto[5]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_blob_2eproto = nullptr; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_blob_2eproto = nullptr; - -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_blob_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::blob::PutRequest, _internal_metadata_), - ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::blob::PutRequest, _oneof_case_[0]), - ~0u, // no _weak_field_map_ - ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, - ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, - ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, - PROTOBUF_FIELD_OFFSET(::blob::PutRequest, data_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::blob::PutResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::blob::PutResponse, dataexists_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::blob::GetRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::blob::GetRequest, holder_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::blob::GetResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::blob::GetResponse, datachunk_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::blob::RemoveRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::blob::RemoveRequest, holder_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::blob::PutRequest)}, - { 9, -1, sizeof(::blob::PutResponse)}, - { 15, -1, sizeof(::blob::GetRequest)}, - { 21, -1, sizeof(::blob::GetResponse)}, - { 27, -1, sizeof(::blob::RemoveRequest)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::blob::_PutRequest_default_instance_), - reinterpret_cast(&::blob::_PutResponse_default_instance_), - reinterpret_cast(&::blob::_GetRequest_default_instance_), - reinterpret_cast(&::blob::_GetResponse_default_instance_), - reinterpret_cast(&::blob::_RemoveRequest_default_instance_), -}; - -const char descriptor_table_protodef_blob_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\nblob.proto\022\004blob\032\033google/protobuf/empt" - "y.proto\"O\n\nPutRequest\022\020\n\006holder\030\001 \001(\tH\000\022" - "\022\n\010blobHash\030\002 \001(\tH\000\022\023\n\tdataChunk\030\003 \001(\014H\000" - "B\006\n\004data\"!\n\013PutResponse\022\022\n\ndataExists\030\001 " - "\001(\010\"\034\n\nGetRequest\022\016\n\006holder\030\001 \001(\t\" \n\013Get" - "Response\022\021\n\tdataChunk\030\001 \001(\014\"\037\n\rRemoveReq" - "uest\022\016\n\006holder\030\001 \001(\t2\250\001\n\013BlobService\0220\n\003" - "Put\022\020.blob.PutRequest\032\021.blob.PutResponse" - "\"\000(\0010\001\022.\n\003Get\022\020.blob.GetRequest\032\021.blob.G" - "etResponse\"\0000\001\0227\n\006Remove\022\023.blob.RemoveRe" - "quest\032\026.google.protobuf.Empty\"\000b\006proto3" - ; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_blob_2eproto_deps[1] = { - &::descriptor_table_google_2fprotobuf_2fempty_2eproto, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_blob_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_blob_2eproto = { - false, false, 439, descriptor_table_protodef_blob_2eproto, "blob.proto", - &descriptor_table_blob_2eproto_once, descriptor_table_blob_2eproto_deps, 1, 5, - schemas, file_default_instances, TableStruct_blob_2eproto::offsets, - file_level_metadata_blob_2eproto, file_level_enum_descriptors_blob_2eproto, file_level_service_descriptors_blob_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::Metadata -descriptor_table_blob_2eproto_metadata_getter(int index) { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_blob_2eproto); - return descriptor_table_blob_2eproto.file_level_metadata[index]; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_blob_2eproto(&descriptor_table_blob_2eproto); -namespace blob { - -// =================================================================== - -class PutRequest::_Internal { - public: -}; - -PutRequest::PutRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:blob.PutRequest) -} -PutRequest::PutRequest(const PutRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - clear_has_data(); - switch (from.data_case()) { - case kHolder: { - _internal_set_holder(from._internal_holder()); - break; - } - case kBlobHash: { - _internal_set_blobhash(from._internal_blobhash()); - break; - } - case kDataChunk: { - _internal_set_datachunk(from._internal_datachunk()); - break; - } - case DATA_NOT_SET: { - break; - } - } - // @@protoc_insertion_point(copy_constructor:blob.PutRequest) -} - -void PutRequest::SharedCtor() { -clear_has_data(); -} - -PutRequest::~PutRequest() { - // @@protoc_insertion_point(destructor:blob.PutRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void PutRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - if (has_data()) { - clear_data(); - } -} - -void PutRequest::ArenaDtor(void* object) { - PutRequest* _this = reinterpret_cast< PutRequest* >(object); - (void)_this; -} -void PutRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void PutRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void PutRequest::clear_data() { -// @@protoc_insertion_point(one_of_clear_start:blob.PutRequest) - switch (data_case()) { - case kHolder: { - data_.holder_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); - break; - } - case kBlobHash: { - data_.blobhash_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); - break; - } - case kDataChunk: { - data_.datachunk_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); - break; - } - case DATA_NOT_SET: { - break; - } - } - _oneof_case_[0] = DATA_NOT_SET; -} - - -void PutRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:blob.PutRequest) - ::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* PutRequest::_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) { - // string holder = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_holder(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "blob.PutRequest.holder")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string blobHash = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_blobhash(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "blob.PutRequest.blobHash")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bytes dataChunk = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - auto str = _internal_mutable_datachunk(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - 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* PutRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:blob.PutRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string holder = 1; - if (_internal_has_holder()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_holder().data(), static_cast(this->_internal_holder().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "blob.PutRequest.holder"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_holder(), target); - } - - // string blobHash = 2; - if (_internal_has_blobhash()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_blobhash().data(), static_cast(this->_internal_blobhash().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "blob.PutRequest.blobHash"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_blobhash(), target); - } - - // bytes dataChunk = 3; - if (_internal_has_datachunk()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_datachunk(), target); - } - - 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:blob.PutRequest) - return target; -} - -size_t PutRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:blob.PutRequest) - 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()) { - // string holder = 1; - case kHolder: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_holder()); - break; - } - // string blobHash = 2; - case kBlobHash: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_blobhash()); - break; - } - // bytes dataChunk = 3; - case kDataChunk: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_datachunk()); - 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 PutRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:blob.PutRequest) - GOOGLE_DCHECK_NE(&from, this); - const PutRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:blob.PutRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:blob.PutRequest) - MergeFrom(*source); - } -} - -void PutRequest::MergeFrom(const PutRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:blob.PutRequest) - 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; - - switch (from.data_case()) { - case kHolder: { - _internal_set_holder(from._internal_holder()); - break; - } - case kBlobHash: { - _internal_set_blobhash(from._internal_blobhash()); - break; - } - case kDataChunk: { - _internal_set_datachunk(from._internal_datachunk()); - break; - } - case DATA_NOT_SET: { - break; - } - } -} - -void PutRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:blob.PutRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void PutRequest::CopyFrom(const PutRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:blob.PutRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool PutRequest::IsInitialized() const { - return true; -} - -void PutRequest::InternalSwap(PutRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(data_, other->data_); - swap(_oneof_case_[0], other->_oneof_case_[0]); -} - -::PROTOBUF_NAMESPACE_ID::Metadata PutRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class PutResponse::_Internal { - public: -}; - -PutResponse::PutResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:blob.PutResponse) -} -PutResponse::PutResponse(const PutResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - dataexists_ = from.dataexists_; - // @@protoc_insertion_point(copy_constructor:blob.PutResponse) -} - -void PutResponse::SharedCtor() { -dataexists_ = false; -} - -PutResponse::~PutResponse() { - // @@protoc_insertion_point(destructor:blob.PutResponse) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void PutResponse::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void PutResponse::ArenaDtor(void* object) { - PutResponse* _this = reinterpret_cast< PutResponse* >(object); - (void)_this; -} -void PutResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void PutResponse::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void PutResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:blob.PutResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - dataexists_ = false; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* PutResponse::_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) { - // bool dataExists = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - dataexists_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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* PutResponse::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:blob.PutResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool dataExists = 1; - if (this->dataexists() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_dataexists(), target); - } - - 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:blob.PutResponse) - return target; -} - -size_t PutResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:blob.PutResponse) - 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; - - // bool dataExists = 1; - if (this->dataexists() != 0) { - total_size += 1 + 1; - } - - 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 PutResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:blob.PutResponse) - GOOGLE_DCHECK_NE(&from, this); - const PutResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:blob.PutResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:blob.PutResponse) - MergeFrom(*source); - } -} - -void PutResponse::MergeFrom(const PutResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:blob.PutResponse) - 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; - - if (from.dataexists() != 0) { - _internal_set_dataexists(from._internal_dataexists()); - } -} - -void PutResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:blob.PutResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void PutResponse::CopyFrom(const PutResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:blob.PutResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool PutResponse::IsInitialized() const { - return true; -} - -void PutResponse::InternalSwap(PutResponse* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(dataexists_, other->dataexists_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata PutResponse::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class GetRequest::_Internal { - public: -}; - -GetRequest::GetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:blob.GetRequest) -} -GetRequest::GetRequest(const GetRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - holder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_holder().empty()) { - holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_holder(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:blob.GetRequest) -} - -void GetRequest::SharedCtor() { -holder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -GetRequest::~GetRequest() { - // @@protoc_insertion_point(destructor:blob.GetRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void GetRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - holder_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void GetRequest::ArenaDtor(void* object) { - GetRequest* _this = reinterpret_cast< GetRequest* >(object); - (void)_this; -} -void GetRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void GetRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void GetRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:blob.GetRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - holder_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetRequest::_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) { - // string holder = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_holder(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "blob.GetRequest.holder")); - 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* GetRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:blob.GetRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string holder = 1; - if (this->holder().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_holder().data(), static_cast(this->_internal_holder().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "blob.GetRequest.holder"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_holder(), target); - } - - 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:blob.GetRequest) - return target; -} - -size_t GetRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:blob.GetRequest) - 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; - - // string holder = 1; - if (this->holder().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_holder()); - } - - 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 GetRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:blob.GetRequest) - GOOGLE_DCHECK_NE(&from, this); - const GetRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:blob.GetRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:blob.GetRequest) - MergeFrom(*source); - } -} - -void GetRequest::MergeFrom(const GetRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:blob.GetRequest) - 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; - - if (from.holder().size() > 0) { - _internal_set_holder(from._internal_holder()); - } -} - -void GetRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:blob.GetRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GetRequest::CopyFrom(const GetRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:blob.GetRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GetRequest::IsInitialized() const { - return true; -} - -void GetRequest::InternalSwap(GetRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - holder_.Swap(&other->holder_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GetRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class GetResponse::_Internal { - public: -}; - -GetResponse::GetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:blob.GetResponse) -} -GetResponse::GetResponse(const GetResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_datachunk().empty()) { - datachunk_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_datachunk(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:blob.GetResponse) -} - -void GetResponse::SharedCtor() { -datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -GetResponse::~GetResponse() { - // @@protoc_insertion_point(destructor:blob.GetResponse) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void GetResponse::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - datachunk_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -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() { -// @@protoc_insertion_point(message_clear_start:blob.GetResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - datachunk_.ClearToEmpty(); - _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) { - // bytes dataChunk = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_datachunk(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - 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:blob.GetResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bytes dataChunk = 1; - if (this->datachunk().size() > 0) { - target = stream->WriteBytesMaybeAliased( - 1, this->_internal_datachunk(), target); - } - - 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:blob.GetResponse) - return target; -} - -size_t GetResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:blob.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; - - // bytes dataChunk = 1; - if (this->datachunk().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_datachunk()); - } - - 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:blob.GetResponse) - GOOGLE_DCHECK_NE(&from, this); - const GetResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:blob.GetResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:blob.GetResponse) - MergeFrom(*source); - } -} - -void GetResponse::MergeFrom(const GetResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:blob.GetResponse) - 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; - - if (from.datachunk().size() > 0) { - _internal_set_datachunk(from._internal_datachunk()); - } -} - -void GetResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:blob.GetResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GetResponse::CopyFrom(const GetResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:blob.GetResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GetResponse::IsInitialized() const { - return true; -} - -void GetResponse::InternalSwap(GetResponse* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - datachunk_.Swap(&other->datachunk_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GetResponse::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class RemoveRequest::_Internal { - public: -}; - -RemoveRequest::RemoveRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:blob.RemoveRequest) -} -RemoveRequest::RemoveRequest(const RemoveRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - holder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_holder().empty()) { - holder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_holder(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:blob.RemoveRequest) -} - -void RemoveRequest::SharedCtor() { -holder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -RemoveRequest::~RemoveRequest() { - // @@protoc_insertion_point(destructor:blob.RemoveRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void RemoveRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - holder_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void RemoveRequest::ArenaDtor(void* object) { - RemoveRequest* _this = reinterpret_cast< RemoveRequest* >(object); - (void)_this; -} -void RemoveRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void RemoveRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void RemoveRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:blob.RemoveRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - holder_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RemoveRequest::_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) { - // string holder = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_holder(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "blob.RemoveRequest.holder")); - 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* RemoveRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:blob.RemoveRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string holder = 1; - if (this->holder().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_holder().data(), static_cast(this->_internal_holder().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "blob.RemoveRequest.holder"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_holder(), target); - } - - 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:blob.RemoveRequest) - return target; -} - -size_t RemoveRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:blob.RemoveRequest) - 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; - - // string holder = 1; - if (this->holder().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_holder()); - } - - 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 RemoveRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:blob.RemoveRequest) - GOOGLE_DCHECK_NE(&from, this); - const RemoveRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:blob.RemoveRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:blob.RemoveRequest) - MergeFrom(*source); - } -} - -void RemoveRequest::MergeFrom(const RemoveRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:blob.RemoveRequest) - 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; - - if (from.holder().size() > 0) { - _internal_set_holder(from._internal_holder()); - } -} - -void RemoveRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:blob.RemoveRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void RemoveRequest::CopyFrom(const RemoveRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:blob.RemoveRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool RemoveRequest::IsInitialized() const { - return true; -} - -void RemoveRequest::InternalSwap(RemoveRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - holder_.Swap(&other->holder_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata RemoveRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// @@protoc_insertion_point(namespace_scope) -} // namespace blob -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::blob::PutRequest* Arena::CreateMaybeMessage< ::blob::PutRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::blob::PutRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::blob::PutResponse* Arena::CreateMaybeMessage< ::blob::PutResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::blob::PutResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::blob::GetRequest* Arena::CreateMaybeMessage< ::blob::GetRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::blob::GetRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::blob::GetResponse* Arena::CreateMaybeMessage< ::blob::GetResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::blob::GetResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::blob::RemoveRequest* Arena::CreateMaybeMessage< ::blob::RemoveRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::blob::RemoveRequest >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.grpc.pb.h b/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.grpc.pb.h deleted file mode 100644 --- a/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.grpc.pb.h +++ /dev/null @@ -1,1333 +0,0 @@ -// @generated by the gRPC C++ plugin. -// If you make any local change, they will be lost. -// source: tunnelbroker.proto -#ifndef GRPC_tunnelbroker_2eproto__INCLUDED -#define GRPC_tunnelbroker_2eproto__INCLUDED - -#include "tunnelbroker.pb.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace tunnelbroker { - -class TunnelbrokerService final { - public: - static constexpr char const* service_full_name() { - return "tunnelbroker.TunnelbrokerService"; - } - class StubInterface { - public: - virtual ~StubInterface() {} - // The old API service methods - // to support the native client build - // until we switch to the new one - // - virtual ::grpc::Status CheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::tunnelbroker::CheckResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::CheckResponse>> AsyncCheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::CheckResponse>>(AsyncCheckIfPrimaryDeviceOnlineRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::CheckResponse>> PrepareAsyncCheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::CheckResponse>>(PrepareAsyncCheckIfPrimaryDeviceOnlineRaw(context, request, cq)); - } - virtual ::grpc::Status BecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::tunnelbroker::NewPrimaryResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewPrimaryResponse>> AsyncBecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewPrimaryResponse>>(AsyncBecomeNewPrimaryDeviceRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewPrimaryResponse>> PrepareAsyncBecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewPrimaryResponse>>(PrepareAsyncBecomeNewPrimaryDeviceRaw(context, request, cq)); - } - virtual ::grpc::Status SendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::google::protobuf::Empty* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> AsyncSendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(AsyncSendPongRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> PrepareAsyncSendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncSendPongRaw(context, request, cq)); - } - // New API service methods - // - virtual ::grpc::Status SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::tunnelbroker::SessionSignatureResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>> AsyncSessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>>(AsyncSessionSignatureRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>> PrepareAsyncSessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>>(PrepareAsyncSessionSignatureRaw(context, request, cq)); - } - virtual ::grpc::Status NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::tunnelbroker::NewSessionResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>> AsyncNewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>>(AsyncNewSessionRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>> PrepareAsyncNewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>>(PrepareAsyncNewSessionRaw(context, request, cq)); - } - virtual ::grpc::Status Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::google::protobuf::Empty* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> AsyncSend(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(AsyncSendRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> PrepareAsyncSend(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncSendRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientReaderInterface< ::tunnelbroker::GetResponse>> Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) { - return std::unique_ptr< ::grpc::ClientReaderInterface< ::tunnelbroker::GetResponse>>(GetRaw(context, request)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>> AsyncGet(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>>(AsyncGetRaw(context, request, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>> PrepareAsyncGet(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>>(PrepareAsyncGetRaw(context, request, cq)); - } - // Replacing Send and Get with a single bidirectional streaming RPC - std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>> OpenStream(::grpc::ClientContext* context) { - return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>>(OpenStreamRaw(context)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>> AsyncOpenStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>>(AsyncOpenStreamRaw(context, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>> PrepareAsyncOpenStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>>(PrepareAsyncOpenStreamRaw(context, cq)); - } - class async_interface { - public: - virtual ~async_interface() {} - // The old API service methods - // to support the native client build - // until we switch to the new one - // - virtual void CheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest* request, ::tunnelbroker::CheckResponse* response, std::function) = 0; - virtual void CheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest* request, ::tunnelbroker::CheckResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void BecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest* request, ::tunnelbroker::NewPrimaryResponse* response, std::function) = 0; - virtual void BecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest* request, ::tunnelbroker::NewPrimaryResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void SendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest* request, ::google::protobuf::Empty* response, std::function) = 0; - virtual void SendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; - // New API service methods - // - virtual void SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, std::function) = 0; - virtual void SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, std::function) = 0; - virtual void NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, std::function) = 0; - virtual void Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ClientReadReactor< ::tunnelbroker::GetResponse>* reactor) = 0; - // Replacing Send and Get with a single bidirectional streaming RPC - virtual void OpenStream(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tunnelbroker::OutboundMessage,::tunnelbroker::InboundMessage>* reactor) = 0; - }; - typedef class async_interface experimental_async_interface; - virtual class async_interface* async() { return nullptr; } - class async_interface* experimental_async() { return async(); } - private: - virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::CheckResponse>* AsyncCheckIfPrimaryDeviceOnlineRaw(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::CheckResponse>* PrepareAsyncCheckIfPrimaryDeviceOnlineRaw(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewPrimaryResponse>* AsyncBecomeNewPrimaryDeviceRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewPrimaryResponse>* PrepareAsyncBecomeNewPrimaryDeviceRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncSendPongRaw(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncSendPongRaw(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>* AsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>* PrepareAsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>* AsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>* PrepareAsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientReaderInterface< ::tunnelbroker::GetResponse>* GetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) = 0; - virtual ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>* AsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>* PrepareAsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientReaderWriterInterface< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* OpenStreamRaw(::grpc::ClientContext* context) = 0; - virtual ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* AsyncOpenStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* PrepareAsyncOpenStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; - }; - class Stub final : public StubInterface { - public: - Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); - ::grpc::Status CheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::tunnelbroker::CheckResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::CheckResponse>> AsyncCheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::CheckResponse>>(AsyncCheckIfPrimaryDeviceOnlineRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::CheckResponse>> PrepareAsyncCheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::CheckResponse>>(PrepareAsyncCheckIfPrimaryDeviceOnlineRaw(context, request, cq)); - } - ::grpc::Status BecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::tunnelbroker::NewPrimaryResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewPrimaryResponse>> AsyncBecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewPrimaryResponse>>(AsyncBecomeNewPrimaryDeviceRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewPrimaryResponse>> PrepareAsyncBecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewPrimaryResponse>>(PrepareAsyncBecomeNewPrimaryDeviceRaw(context, request, cq)); - } - ::grpc::Status SendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::google::protobuf::Empty* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncSendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(AsyncSendPongRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncSendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncSendPongRaw(context, request, cq)); - } - ::grpc::Status SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::tunnelbroker::SessionSignatureResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>> AsyncSessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>>(AsyncSessionSignatureRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>> PrepareAsyncSessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>>(PrepareAsyncSessionSignatureRaw(context, request, cq)); - } - ::grpc::Status NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::tunnelbroker::NewSessionResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>> AsyncNewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>>(AsyncNewSessionRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>> PrepareAsyncNewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>>(PrepareAsyncNewSessionRaw(context, request, cq)); - } - ::grpc::Status Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::google::protobuf::Empty* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncSend(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(AsyncSendRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncSend(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncSendRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientReader< ::tunnelbroker::GetResponse>> Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) { - return std::unique_ptr< ::grpc::ClientReader< ::tunnelbroker::GetResponse>>(GetRaw(context, request)); - } - std::unique_ptr< ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>> AsyncGet(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>>(AsyncGetRaw(context, request, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>> PrepareAsyncGet(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>>(PrepareAsyncGetRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>> OpenStream(::grpc::ClientContext* context) { - return std::unique_ptr< ::grpc::ClientReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>>(OpenStreamRaw(context)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>> AsyncOpenStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>>(AsyncOpenStreamRaw(context, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>> PrepareAsyncOpenStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>>(PrepareAsyncOpenStreamRaw(context, cq)); - } - class async final : - public StubInterface::async_interface { - public: - void CheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest* request, ::tunnelbroker::CheckResponse* response, std::function) override; - void CheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest* request, ::tunnelbroker::CheckResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - void BecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest* request, ::tunnelbroker::NewPrimaryResponse* response, std::function) override; - void BecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest* request, ::tunnelbroker::NewPrimaryResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - void SendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest* request, ::google::protobuf::Empty* response, std::function) override; - void SendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; - void SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, std::function) override; - void SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - void NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, std::function) override; - void NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - void Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, std::function) override; - void Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; - void Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ClientReadReactor< ::tunnelbroker::GetResponse>* reactor) override; - void OpenStream(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tunnelbroker::OutboundMessage,::tunnelbroker::InboundMessage>* reactor) override; - private: - friend class Stub; - explicit async(Stub* stub): stub_(stub) { } - Stub* stub() { return stub_; } - Stub* stub_; - }; - class async* async() override { return &async_stub_; } - - private: - std::shared_ptr< ::grpc::ChannelInterface> channel_; - class async async_stub_{this}; - ::grpc::ClientAsyncResponseReader< ::tunnelbroker::CheckResponse>* AsyncCheckIfPrimaryDeviceOnlineRaw(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::tunnelbroker::CheckResponse>* PrepareAsyncCheckIfPrimaryDeviceOnlineRaw(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewPrimaryResponse>* AsyncBecomeNewPrimaryDeviceRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewPrimaryResponse>* PrepareAsyncBecomeNewPrimaryDeviceRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncSendPongRaw(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncSendPongRaw(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>* AsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>* PrepareAsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>* AsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>* PrepareAsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientReader< ::tunnelbroker::GetResponse>* GetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) override; - ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>* AsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>* PrepareAsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* OpenStreamRaw(::grpc::ClientContext* context) override; - ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* AsyncOpenStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* PrepareAsyncOpenStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; - const ::grpc::internal::RpcMethod rpcmethod_CheckIfPrimaryDeviceOnline_; - const ::grpc::internal::RpcMethod rpcmethod_BecomeNewPrimaryDevice_; - const ::grpc::internal::RpcMethod rpcmethod_SendPong_; - const ::grpc::internal::RpcMethod rpcmethod_SessionSignature_; - const ::grpc::internal::RpcMethod rpcmethod_NewSession_; - const ::grpc::internal::RpcMethod rpcmethod_Send_; - const ::grpc::internal::RpcMethod rpcmethod_Get_; - const ::grpc::internal::RpcMethod rpcmethod_OpenStream_; - }; - static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); - - class Service : public ::grpc::Service { - public: - Service(); - virtual ~Service(); - // The old API service methods - // to support the native client build - // until we switch to the new one - // - virtual ::grpc::Status CheckIfPrimaryDeviceOnline(::grpc::ServerContext* context, const ::tunnelbroker::CheckRequest* request, ::tunnelbroker::CheckResponse* response); - virtual ::grpc::Status BecomeNewPrimaryDevice(::grpc::ServerContext* context, const ::tunnelbroker::NewPrimaryRequest* request, ::tunnelbroker::NewPrimaryResponse* response); - virtual ::grpc::Status SendPong(::grpc::ServerContext* context, const ::tunnelbroker::PongRequest* request, ::google::protobuf::Empty* response); - // New API service methods - // - virtual ::grpc::Status SessionSignature(::grpc::ServerContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response); - virtual ::grpc::Status NewSession(::grpc::ServerContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response); - virtual ::grpc::Status Send(::grpc::ServerContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response); - virtual ::grpc::Status Get(::grpc::ServerContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* writer); - // Replacing Send and Get with a single bidirectional streaming RPC - virtual ::grpc::Status OpenStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::tunnelbroker::InboundMessage, ::tunnelbroker::OutboundMessage>* stream); - }; - template - class WithAsyncMethod_CheckIfPrimaryDeviceOnline : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_CheckIfPrimaryDeviceOnline() { - ::grpc::Service::MarkMethodAsync(0); - } - ~WithAsyncMethod_CheckIfPrimaryDeviceOnline() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status CheckIfPrimaryDeviceOnline(::grpc::ServerContext* /*context*/, const ::tunnelbroker::CheckRequest* /*request*/, ::tunnelbroker::CheckResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestCheckIfPrimaryDeviceOnline(::grpc::ServerContext* context, ::tunnelbroker::CheckRequest* request, ::grpc::ServerAsyncResponseWriter< ::tunnelbroker::CheckResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_BecomeNewPrimaryDevice : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_BecomeNewPrimaryDevice() { - ::grpc::Service::MarkMethodAsync(1); - } - ~WithAsyncMethod_BecomeNewPrimaryDevice() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status BecomeNewPrimaryDevice(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewPrimaryRequest* /*request*/, ::tunnelbroker::NewPrimaryResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestBecomeNewPrimaryDevice(::grpc::ServerContext* context, ::tunnelbroker::NewPrimaryRequest* request, ::grpc::ServerAsyncResponseWriter< ::tunnelbroker::NewPrimaryResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_SendPong : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_SendPong() { - ::grpc::Service::MarkMethodAsync(2); - } - ~WithAsyncMethod_SendPong() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SendPong(::grpc::ServerContext* /*context*/, const ::tunnelbroker::PongRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestSendPong(::grpc::ServerContext* context, ::tunnelbroker::PongRequest* request, ::grpc::ServerAsyncResponseWriter< ::google::protobuf::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_SessionSignature : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_SessionSignature() { - ::grpc::Service::MarkMethodAsync(3); - } - ~WithAsyncMethod_SessionSignature() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestSessionSignature(::grpc::ServerContext* context, ::tunnelbroker::SessionSignatureRequest* request, ::grpc::ServerAsyncResponseWriter< ::tunnelbroker::SessionSignatureResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_NewSession : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_NewSession() { - ::grpc::Service::MarkMethodAsync(4); - } - ~WithAsyncMethod_NewSession() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestNewSession(::grpc::ServerContext* context, ::tunnelbroker::NewSessionRequest* request, ::grpc::ServerAsyncResponseWriter< ::tunnelbroker::NewSessionResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_Send() { - ::grpc::Service::MarkMethodAsync(5); - } - ~WithAsyncMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestSend(::grpc::ServerContext* context, ::tunnelbroker::SendRequest* request, ::grpc::ServerAsyncResponseWriter< ::google::protobuf::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_Get() { - ::grpc::Service::MarkMethodAsync(6); - } - ~WithAsyncMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGet(::grpc::ServerContext* context, ::tunnelbroker::GetRequest* request, ::grpc::ServerAsyncWriter< ::tunnelbroker::GetResponse>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(6, context, request, writer, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_OpenStream : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_OpenStream() { - ::grpc::Service::MarkMethodAsync(7); - } - ~WithAsyncMethod_OpenStream() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status OpenStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::InboundMessage, ::tunnelbroker::OutboundMessage>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestOpenStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::tunnelbroker::InboundMessage, ::tunnelbroker::OutboundMessage>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncBidiStreaming(7, context, stream, new_call_cq, notification_cq, tag); - } - }; - typedef WithAsyncMethod_CheckIfPrimaryDeviceOnline > > > > > > > AsyncService; - template - class WithCallbackMethod_CheckIfPrimaryDeviceOnline : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_CheckIfPrimaryDeviceOnline() { - ::grpc::Service::MarkMethodCallback(0, - new ::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::CheckRequest, ::tunnelbroker::CheckResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::tunnelbroker::CheckRequest* request, ::tunnelbroker::CheckResponse* response) { return this->CheckIfPrimaryDeviceOnline(context, request, response); }));} - void SetMessageAllocatorFor_CheckIfPrimaryDeviceOnline( - ::grpc::MessageAllocator< ::tunnelbroker::CheckRequest, ::tunnelbroker::CheckResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); - static_cast<::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::CheckRequest, ::tunnelbroker::CheckResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_CheckIfPrimaryDeviceOnline() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status CheckIfPrimaryDeviceOnline(::grpc::ServerContext* /*context*/, const ::tunnelbroker::CheckRequest* /*request*/, ::tunnelbroker::CheckResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* CheckIfPrimaryDeviceOnline( - ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::CheckRequest* /*request*/, ::tunnelbroker::CheckResponse* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_BecomeNewPrimaryDevice : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_BecomeNewPrimaryDevice() { - ::grpc::Service::MarkMethodCallback(1, - new ::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::NewPrimaryRequest, ::tunnelbroker::NewPrimaryResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::tunnelbroker::NewPrimaryRequest* request, ::tunnelbroker::NewPrimaryResponse* response) { return this->BecomeNewPrimaryDevice(context, request, response); }));} - void SetMessageAllocatorFor_BecomeNewPrimaryDevice( - ::grpc::MessageAllocator< ::tunnelbroker::NewPrimaryRequest, ::tunnelbroker::NewPrimaryResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); - static_cast<::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::NewPrimaryRequest, ::tunnelbroker::NewPrimaryResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_BecomeNewPrimaryDevice() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status BecomeNewPrimaryDevice(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewPrimaryRequest* /*request*/, ::tunnelbroker::NewPrimaryResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* BecomeNewPrimaryDevice( - ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::NewPrimaryRequest* /*request*/, ::tunnelbroker::NewPrimaryResponse* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_SendPong : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_SendPong() { - ::grpc::Service::MarkMethodCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::PongRequest, ::google::protobuf::Empty>( - [this]( - ::grpc::CallbackServerContext* context, const ::tunnelbroker::PongRequest* request, ::google::protobuf::Empty* response) { return this->SendPong(context, request, response); }));} - void SetMessageAllocatorFor_SendPong( - ::grpc::MessageAllocator< ::tunnelbroker::PongRequest, ::google::protobuf::Empty>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); - static_cast<::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::PongRequest, ::google::protobuf::Empty>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_SendPong() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SendPong(::grpc::ServerContext* /*context*/, const ::tunnelbroker::PongRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* SendPong( - ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::PongRequest* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_SessionSignature : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_SessionSignature() { - ::grpc::Service::MarkMethodCallback(3, - new ::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response) { return this->SessionSignature(context, request, response); }));} - void SetMessageAllocatorFor_SessionSignature( - ::grpc::MessageAllocator< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(3); - static_cast<::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_SessionSignature() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* SessionSignature( - ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_NewSession : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_NewSession() { - ::grpc::Service::MarkMethodCallback(4, - new ::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response) { return this->NewSession(context, request, response); }));} - void SetMessageAllocatorFor_NewSession( - ::grpc::MessageAllocator< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(4); - static_cast<::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_NewSession() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* NewSession( - ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_Send() { - ::grpc::Service::MarkMethodCallback(5, - new ::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::SendRequest, ::google::protobuf::Empty>( - [this]( - ::grpc::CallbackServerContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response) { return this->Send(context, request, response); }));} - void SetMessageAllocatorFor_Send( - ::grpc::MessageAllocator< ::tunnelbroker::SendRequest, ::google::protobuf::Empty>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5); - static_cast<::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::SendRequest, ::google::protobuf::Empty>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* Send( - ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_Get() { - ::grpc::Service::MarkMethodCallback(6, - new ::grpc::internal::CallbackServerStreamingHandler< ::tunnelbroker::GetRequest, ::tunnelbroker::GetResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::tunnelbroker::GetRequest* request) { return this->Get(context, request); })); - } - ~WithCallbackMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerWriteReactor< ::tunnelbroker::GetResponse>* Get( - ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/) { return nullptr; } - }; - template - class WithCallbackMethod_OpenStream : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_OpenStream() { - ::grpc::Service::MarkMethodCallback(7, - new ::grpc::internal::CallbackBidiHandler< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>( - [this]( - ::grpc::CallbackServerContext* context) { return this->OpenStream(context); })); - } - ~WithCallbackMethod_OpenStream() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status OpenStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::InboundMessage, ::tunnelbroker::OutboundMessage>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerBidiReactor< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* OpenStream( - ::grpc::CallbackServerContext* /*context*/) - { return nullptr; } - }; - typedef WithCallbackMethod_CheckIfPrimaryDeviceOnline > > > > > > > CallbackService; - typedef CallbackService ExperimentalCallbackService; - template - class WithGenericMethod_CheckIfPrimaryDeviceOnline : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_CheckIfPrimaryDeviceOnline() { - ::grpc::Service::MarkMethodGeneric(0); - } - ~WithGenericMethod_CheckIfPrimaryDeviceOnline() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status CheckIfPrimaryDeviceOnline(::grpc::ServerContext* /*context*/, const ::tunnelbroker::CheckRequest* /*request*/, ::tunnelbroker::CheckResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_BecomeNewPrimaryDevice : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_BecomeNewPrimaryDevice() { - ::grpc::Service::MarkMethodGeneric(1); - } - ~WithGenericMethod_BecomeNewPrimaryDevice() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status BecomeNewPrimaryDevice(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewPrimaryRequest* /*request*/, ::tunnelbroker::NewPrimaryResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_SendPong : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_SendPong() { - ::grpc::Service::MarkMethodGeneric(2); - } - ~WithGenericMethod_SendPong() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SendPong(::grpc::ServerContext* /*context*/, const ::tunnelbroker::PongRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_SessionSignature : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_SessionSignature() { - ::grpc::Service::MarkMethodGeneric(3); - } - ~WithGenericMethod_SessionSignature() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_NewSession : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_NewSession() { - ::grpc::Service::MarkMethodGeneric(4); - } - ~WithGenericMethod_NewSession() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_Send() { - ::grpc::Service::MarkMethodGeneric(5); - } - ~WithGenericMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_Get() { - ::grpc::Service::MarkMethodGeneric(6); - } - ~WithGenericMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_OpenStream : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_OpenStream() { - ::grpc::Service::MarkMethodGeneric(7); - } - ~WithGenericMethod_OpenStream() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status OpenStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::InboundMessage, ::tunnelbroker::OutboundMessage>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithRawMethod_CheckIfPrimaryDeviceOnline : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_CheckIfPrimaryDeviceOnline() { - ::grpc::Service::MarkMethodRaw(0); - } - ~WithRawMethod_CheckIfPrimaryDeviceOnline() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status CheckIfPrimaryDeviceOnline(::grpc::ServerContext* /*context*/, const ::tunnelbroker::CheckRequest* /*request*/, ::tunnelbroker::CheckResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestCheckIfPrimaryDeviceOnline(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_BecomeNewPrimaryDevice : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_BecomeNewPrimaryDevice() { - ::grpc::Service::MarkMethodRaw(1); - } - ~WithRawMethod_BecomeNewPrimaryDevice() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status BecomeNewPrimaryDevice(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewPrimaryRequest* /*request*/, ::tunnelbroker::NewPrimaryResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestBecomeNewPrimaryDevice(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_SendPong : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_SendPong() { - ::grpc::Service::MarkMethodRaw(2); - } - ~WithRawMethod_SendPong() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SendPong(::grpc::ServerContext* /*context*/, const ::tunnelbroker::PongRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestSendPong(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_SessionSignature : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_SessionSignature() { - ::grpc::Service::MarkMethodRaw(3); - } - ~WithRawMethod_SessionSignature() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestSessionSignature(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_NewSession : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_NewSession() { - ::grpc::Service::MarkMethodRaw(4); - } - ~WithRawMethod_NewSession() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestNewSession(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_Send() { - ::grpc::Service::MarkMethodRaw(5); - } - ~WithRawMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestSend(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_Get() { - ::grpc::Service::MarkMethodRaw(6); - } - ~WithRawMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGet(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(6, context, request, writer, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_OpenStream : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_OpenStream() { - ::grpc::Service::MarkMethodRaw(7); - } - ~WithRawMethod_OpenStream() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status OpenStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::InboundMessage, ::tunnelbroker::OutboundMessage>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestOpenStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncBidiStreaming(7, context, stream, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawCallbackMethod_CheckIfPrimaryDeviceOnline : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_CheckIfPrimaryDeviceOnline() { - ::grpc::Service::MarkMethodRawCallback(0, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->CheckIfPrimaryDeviceOnline(context, request, response); })); - } - ~WithRawCallbackMethod_CheckIfPrimaryDeviceOnline() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status CheckIfPrimaryDeviceOnline(::grpc::ServerContext* /*context*/, const ::tunnelbroker::CheckRequest* /*request*/, ::tunnelbroker::CheckResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* CheckIfPrimaryDeviceOnline( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_BecomeNewPrimaryDevice : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_BecomeNewPrimaryDevice() { - ::grpc::Service::MarkMethodRawCallback(1, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->BecomeNewPrimaryDevice(context, request, response); })); - } - ~WithRawCallbackMethod_BecomeNewPrimaryDevice() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status BecomeNewPrimaryDevice(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewPrimaryRequest* /*request*/, ::tunnelbroker::NewPrimaryResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* BecomeNewPrimaryDevice( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_SendPong : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_SendPong() { - ::grpc::Service::MarkMethodRawCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->SendPong(context, request, response); })); - } - ~WithRawCallbackMethod_SendPong() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SendPong(::grpc::ServerContext* /*context*/, const ::tunnelbroker::PongRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* SendPong( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_SessionSignature : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_SessionSignature() { - ::grpc::Service::MarkMethodRawCallback(3, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->SessionSignature(context, request, response); })); - } - ~WithRawCallbackMethod_SessionSignature() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* SessionSignature( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_NewSession : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_NewSession() { - ::grpc::Service::MarkMethodRawCallback(4, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->NewSession(context, request, response); })); - } - ~WithRawCallbackMethod_NewSession() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* NewSession( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_Send() { - ::grpc::Service::MarkMethodRawCallback(5, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Send(context, request, response); })); - } - ~WithRawCallbackMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* Send( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_Get() { - ::grpc::Service::MarkMethodRawCallback(6, - new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->Get(context, request); })); - } - ~WithRawCallbackMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* Get( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_OpenStream : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_OpenStream() { - ::grpc::Service::MarkMethodRawCallback(7, - new ::grpc::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context) { return this->OpenStream(context); })); - } - ~WithRawCallbackMethod_OpenStream() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status OpenStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::InboundMessage, ::tunnelbroker::OutboundMessage>* /*stream*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* OpenStream( - ::grpc::CallbackServerContext* /*context*/) - { return nullptr; } - }; - template - class WithStreamedUnaryMethod_CheckIfPrimaryDeviceOnline : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_CheckIfPrimaryDeviceOnline() { - ::grpc::Service::MarkMethodStreamed(0, - new ::grpc::internal::StreamedUnaryHandler< - ::tunnelbroker::CheckRequest, ::tunnelbroker::CheckResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::tunnelbroker::CheckRequest, ::tunnelbroker::CheckResponse>* streamer) { - return this->StreamedCheckIfPrimaryDeviceOnline(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_CheckIfPrimaryDeviceOnline() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status CheckIfPrimaryDeviceOnline(::grpc::ServerContext* /*context*/, const ::tunnelbroker::CheckRequest* /*request*/, ::tunnelbroker::CheckResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedCheckIfPrimaryDeviceOnline(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::CheckRequest,::tunnelbroker::CheckResponse>* server_unary_streamer) = 0; - }; - template - class WithStreamedUnaryMethod_BecomeNewPrimaryDevice : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_BecomeNewPrimaryDevice() { - ::grpc::Service::MarkMethodStreamed(1, - new ::grpc::internal::StreamedUnaryHandler< - ::tunnelbroker::NewPrimaryRequest, ::tunnelbroker::NewPrimaryResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::tunnelbroker::NewPrimaryRequest, ::tunnelbroker::NewPrimaryResponse>* streamer) { - return this->StreamedBecomeNewPrimaryDevice(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_BecomeNewPrimaryDevice() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status BecomeNewPrimaryDevice(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewPrimaryRequest* /*request*/, ::tunnelbroker::NewPrimaryResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedBecomeNewPrimaryDevice(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::NewPrimaryRequest,::tunnelbroker::NewPrimaryResponse>* server_unary_streamer) = 0; - }; - template - class WithStreamedUnaryMethod_SendPong : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_SendPong() { - ::grpc::Service::MarkMethodStreamed(2, - new ::grpc::internal::StreamedUnaryHandler< - ::tunnelbroker::PongRequest, ::google::protobuf::Empty>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::tunnelbroker::PongRequest, ::google::protobuf::Empty>* streamer) { - return this->StreamedSendPong(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_SendPong() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status SendPong(::grpc::ServerContext* /*context*/, const ::tunnelbroker::PongRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedSendPong(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::PongRequest,::google::protobuf::Empty>* server_unary_streamer) = 0; - }; - template - class WithStreamedUnaryMethod_SessionSignature : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_SessionSignature() { - ::grpc::Service::MarkMethodStreamed(3, - new ::grpc::internal::StreamedUnaryHandler< - ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>* streamer) { - return this->StreamedSessionSignature(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_SessionSignature() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedSessionSignature(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::SessionSignatureRequest,::tunnelbroker::SessionSignatureResponse>* server_unary_streamer) = 0; - }; - template - class WithStreamedUnaryMethod_NewSession : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_NewSession() { - ::grpc::Service::MarkMethodStreamed(4, - new ::grpc::internal::StreamedUnaryHandler< - ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>* streamer) { - return this->StreamedNewSession(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_NewSession() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedNewSession(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::NewSessionRequest,::tunnelbroker::NewSessionResponse>* server_unary_streamer) = 0; - }; - template - class WithStreamedUnaryMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_Send() { - ::grpc::Service::MarkMethodStreamed(5, - new ::grpc::internal::StreamedUnaryHandler< - ::tunnelbroker::SendRequest, ::google::protobuf::Empty>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::tunnelbroker::SendRequest, ::google::protobuf::Empty>* streamer) { - return this->StreamedSend(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedSend(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::SendRequest,::google::protobuf::Empty>* server_unary_streamer) = 0; - }; - typedef WithStreamedUnaryMethod_CheckIfPrimaryDeviceOnline > > > > > StreamedUnaryService; - template - class WithSplitStreamingMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithSplitStreamingMethod_Get() { - ::grpc::Service::MarkMethodStreamed(6, - new ::grpc::internal::SplitServerStreamingHandler< - ::tunnelbroker::GetRequest, ::tunnelbroker::GetResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerSplitStreamer< - ::tunnelbroker::GetRequest, ::tunnelbroker::GetResponse>* streamer) { - return this->StreamedGet(context, - streamer); - })); - } - ~WithSplitStreamingMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with split streamed - virtual ::grpc::Status StreamedGet(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::tunnelbroker::GetRequest,::tunnelbroker::GetResponse>* server_split_streamer) = 0; - }; - typedef WithSplitStreamingMethod_Get SplitStreamedService; - typedef WithStreamedUnaryMethod_CheckIfPrimaryDeviceOnline > > > > > > StreamedService; -}; - -} // namespace tunnelbroker - - -#endif // GRPC_tunnelbroker_2eproto__INCLUDED diff --git a/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.grpc.pb.cc b/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.grpc.pb.cc deleted file mode 100644 --- a/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.grpc.pb.cc +++ /dev/null @@ -1,365 +0,0 @@ -// @generated by the gRPC C++ plugin. -// If you make any local change, they will be lost. -// source: tunnelbroker.proto - -#include "tunnelbroker.pb.h" -#include "tunnelbroker.grpc.pb.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -namespace tunnelbroker { - -static const char* TunnelbrokerService_method_names[] = { - "/tunnelbroker.TunnelbrokerService/CheckIfPrimaryDeviceOnline", - "/tunnelbroker.TunnelbrokerService/BecomeNewPrimaryDevice", - "/tunnelbroker.TunnelbrokerService/SendPong", - "/tunnelbroker.TunnelbrokerService/SessionSignature", - "/tunnelbroker.TunnelbrokerService/NewSession", - "/tunnelbroker.TunnelbrokerService/Send", - "/tunnelbroker.TunnelbrokerService/Get", - "/tunnelbroker.TunnelbrokerService/OpenStream", -}; - -std::unique_ptr< TunnelbrokerService::Stub> TunnelbrokerService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { - (void)options; - std::unique_ptr< TunnelbrokerService::Stub> stub(new TunnelbrokerService::Stub(channel, options)); - return stub; -} - -TunnelbrokerService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) - : channel_(channel), rpcmethod_CheckIfPrimaryDeviceOnline_(TunnelbrokerService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_BecomeNewPrimaryDevice_(TunnelbrokerService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_SendPong_(TunnelbrokerService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_SessionSignature_(TunnelbrokerService_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_NewSession_(TunnelbrokerService_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_Send_(TunnelbrokerService_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_Get_(TunnelbrokerService_method_names[6], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) - , rpcmethod_OpenStream_(TunnelbrokerService_method_names[7], options.suffix_for_stats(),::grpc::internal::RpcMethod::BIDI_STREAMING, channel) - {} - -::grpc::Status TunnelbrokerService::Stub::CheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::tunnelbroker::CheckResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::tunnelbroker::CheckRequest, ::tunnelbroker::CheckResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_CheckIfPrimaryDeviceOnline_, context, request, response); -} - -void TunnelbrokerService::Stub::async::CheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest* request, ::tunnelbroker::CheckResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::tunnelbroker::CheckRequest, ::tunnelbroker::CheckResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CheckIfPrimaryDeviceOnline_, context, request, response, std::move(f)); -} - -void TunnelbrokerService::Stub::async::CheckIfPrimaryDeviceOnline(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest* request, ::tunnelbroker::CheckResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CheckIfPrimaryDeviceOnline_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::tunnelbroker::CheckResponse>* TunnelbrokerService::Stub::PrepareAsyncCheckIfPrimaryDeviceOnlineRaw(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tunnelbroker::CheckResponse, ::tunnelbroker::CheckRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_CheckIfPrimaryDeviceOnline_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::tunnelbroker::CheckResponse>* TunnelbrokerService::Stub::AsyncCheckIfPrimaryDeviceOnlineRaw(::grpc::ClientContext* context, const ::tunnelbroker::CheckRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncCheckIfPrimaryDeviceOnlineRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::Status TunnelbrokerService::Stub::BecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::tunnelbroker::NewPrimaryResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::tunnelbroker::NewPrimaryRequest, ::tunnelbroker::NewPrimaryResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_BecomeNewPrimaryDevice_, context, request, response); -} - -void TunnelbrokerService::Stub::async::BecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest* request, ::tunnelbroker::NewPrimaryResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::tunnelbroker::NewPrimaryRequest, ::tunnelbroker::NewPrimaryResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_BecomeNewPrimaryDevice_, context, request, response, std::move(f)); -} - -void TunnelbrokerService::Stub::async::BecomeNewPrimaryDevice(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest* request, ::tunnelbroker::NewPrimaryResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_BecomeNewPrimaryDevice_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewPrimaryResponse>* TunnelbrokerService::Stub::PrepareAsyncBecomeNewPrimaryDeviceRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tunnelbroker::NewPrimaryResponse, ::tunnelbroker::NewPrimaryRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_BecomeNewPrimaryDevice_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewPrimaryResponse>* TunnelbrokerService::Stub::AsyncBecomeNewPrimaryDeviceRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewPrimaryRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncBecomeNewPrimaryDeviceRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::Status TunnelbrokerService::Stub::SendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::google::protobuf::Empty* response) { - return ::grpc::internal::BlockingUnaryCall< ::tunnelbroker::PongRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SendPong_, context, request, response); -} - -void TunnelbrokerService::Stub::async::SendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest* request, ::google::protobuf::Empty* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::tunnelbroker::PongRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SendPong_, context, request, response, std::move(f)); -} - -void TunnelbrokerService::Stub::async::SendPong(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SendPong_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* TunnelbrokerService::Stub::PrepareAsyncSendPongRaw(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::tunnelbroker::PongRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SendPong_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* TunnelbrokerService::Stub::AsyncSendPongRaw(::grpc::ClientContext* context, const ::tunnelbroker::PongRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncSendPongRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::Status TunnelbrokerService::Stub::SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::tunnelbroker::SessionSignatureResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SessionSignature_, context, request, response); -} - -void TunnelbrokerService::Stub::async::SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SessionSignature_, context, request, response, std::move(f)); -} - -void TunnelbrokerService::Stub::async::SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SessionSignature_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>* TunnelbrokerService::Stub::PrepareAsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tunnelbroker::SessionSignatureResponse, ::tunnelbroker::SessionSignatureRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SessionSignature_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>* TunnelbrokerService::Stub::AsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncSessionSignatureRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::Status TunnelbrokerService::Stub::NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::tunnelbroker::NewSessionResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_NewSession_, context, request, response); -} - -void TunnelbrokerService::Stub::async::NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_NewSession_, context, request, response, std::move(f)); -} - -void TunnelbrokerService::Stub::async::NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_NewSession_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>* TunnelbrokerService::Stub::PrepareAsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tunnelbroker::NewSessionResponse, ::tunnelbroker::NewSessionRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_NewSession_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>* TunnelbrokerService::Stub::AsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncNewSessionRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::Status TunnelbrokerService::Stub::Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::google::protobuf::Empty* response) { - return ::grpc::internal::BlockingUnaryCall< ::tunnelbroker::SendRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Send_, context, request, response); -} - -void TunnelbrokerService::Stub::async::Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::tunnelbroker::SendRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Send_, context, request, response, std::move(f)); -} - -void TunnelbrokerService::Stub::async::Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Send_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* TunnelbrokerService::Stub::PrepareAsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::tunnelbroker::SendRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Send_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* TunnelbrokerService::Stub::AsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncSendRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::ClientReader< ::tunnelbroker::GetResponse>* TunnelbrokerService::Stub::GetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) { - return ::grpc::internal::ClientReaderFactory< ::tunnelbroker::GetResponse>::Create(channel_.get(), rpcmethod_Get_, context, request); -} - -void TunnelbrokerService::Stub::async::Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ClientReadReactor< ::tunnelbroker::GetResponse>* reactor) { - ::grpc::internal::ClientCallbackReaderFactory< ::tunnelbroker::GetResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_Get_, context, request, reactor); -} - -::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>* TunnelbrokerService::Stub::AsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return ::grpc::internal::ClientAsyncReaderFactory< ::tunnelbroker::GetResponse>::Create(channel_.get(), cq, rpcmethod_Get_, context, request, true, tag); -} - -::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>* TunnelbrokerService::Stub::PrepareAsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncReaderFactory< ::tunnelbroker::GetResponse>::Create(channel_.get(), cq, rpcmethod_Get_, context, request, false, nullptr); -} - -::grpc::ClientReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* TunnelbrokerService::Stub::OpenStreamRaw(::grpc::ClientContext* context) { - return ::grpc::internal::ClientReaderWriterFactory< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>::Create(channel_.get(), rpcmethod_OpenStream_, context); -} - -void TunnelbrokerService::Stub::async::OpenStream(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tunnelbroker::OutboundMessage,::tunnelbroker::InboundMessage>* reactor) { - ::grpc::internal::ClientCallbackReaderWriterFactory< ::tunnelbroker::OutboundMessage,::tunnelbroker::InboundMessage>::Create(stub_->channel_.get(), stub_->rpcmethod_OpenStream_, context, reactor); -} - -::grpc::ClientAsyncReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* TunnelbrokerService::Stub::AsyncOpenStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { - return ::grpc::internal::ClientAsyncReaderWriterFactory< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>::Create(channel_.get(), cq, rpcmethod_OpenStream_, context, true, tag); -} - -::grpc::ClientAsyncReaderWriter< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>* TunnelbrokerService::Stub::PrepareAsyncOpenStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncReaderWriterFactory< ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>::Create(channel_.get(), cq, rpcmethod_OpenStream_, context, false, nullptr); -} - -TunnelbrokerService::Service::Service() { - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[0], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< TunnelbrokerService::Service, ::tunnelbroker::CheckRequest, ::tunnelbroker::CheckResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - const ::tunnelbroker::CheckRequest* req, - ::tunnelbroker::CheckResponse* resp) { - return service->CheckIfPrimaryDeviceOnline(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[1], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< TunnelbrokerService::Service, ::tunnelbroker::NewPrimaryRequest, ::tunnelbroker::NewPrimaryResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - const ::tunnelbroker::NewPrimaryRequest* req, - ::tunnelbroker::NewPrimaryResponse* resp) { - return service->BecomeNewPrimaryDevice(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[2], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< TunnelbrokerService::Service, ::tunnelbroker::PongRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - const ::tunnelbroker::PongRequest* req, - ::google::protobuf::Empty* resp) { - return service->SendPong(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[3], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< TunnelbrokerService::Service, ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - const ::tunnelbroker::SessionSignatureRequest* req, - ::tunnelbroker::SessionSignatureResponse* resp) { - return service->SessionSignature(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[4], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< TunnelbrokerService::Service, ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - const ::tunnelbroker::NewSessionRequest* req, - ::tunnelbroker::NewSessionResponse* resp) { - return service->NewSession(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[5], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< TunnelbrokerService::Service, ::tunnelbroker::SendRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - const ::tunnelbroker::SendRequest* req, - ::google::protobuf::Empty* resp) { - return service->Send(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[6], - ::grpc::internal::RpcMethod::SERVER_STREAMING, - new ::grpc::internal::ServerStreamingHandler< TunnelbrokerService::Service, ::tunnelbroker::GetRequest, ::tunnelbroker::GetResponse>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - const ::tunnelbroker::GetRequest* req, - ::grpc::ServerWriter<::tunnelbroker::GetResponse>* writer) { - return service->Get(ctx, req, writer); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[7], - ::grpc::internal::RpcMethod::BIDI_STREAMING, - new ::grpc::internal::BidiStreamingHandler< TunnelbrokerService::Service, ::tunnelbroker::OutboundMessage, ::tunnelbroker::InboundMessage>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - ::grpc::ServerReaderWriter<::tunnelbroker::InboundMessage, - ::tunnelbroker::OutboundMessage>* stream) { - return service->OpenStream(ctx, stream); - }, this))); -} - -TunnelbrokerService::Service::~Service() { -} - -::grpc::Status TunnelbrokerService::Service::CheckIfPrimaryDeviceOnline(::grpc::ServerContext* context, const ::tunnelbroker::CheckRequest* request, ::tunnelbroker::CheckResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status TunnelbrokerService::Service::BecomeNewPrimaryDevice(::grpc::ServerContext* context, const ::tunnelbroker::NewPrimaryRequest* request, ::tunnelbroker::NewPrimaryResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status TunnelbrokerService::Service::SendPong(::grpc::ServerContext* context, const ::tunnelbroker::PongRequest* request, ::google::protobuf::Empty* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status TunnelbrokerService::Service::SessionSignature(::grpc::ServerContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status TunnelbrokerService::Service::NewSession(::grpc::ServerContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status TunnelbrokerService::Service::Send(::grpc::ServerContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status TunnelbrokerService::Service::Get(::grpc::ServerContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* writer) { - (void) context; - (void) request; - (void) writer; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status TunnelbrokerService::Service::OpenStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::tunnelbroker::InboundMessage, ::tunnelbroker::OutboundMessage>* stream) { - (void) context; - (void) stream; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - - -} // namespace tunnelbroker - diff --git a/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.pb.h b/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.pb.h deleted file mode 100644 --- a/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.pb.h +++ /dev/null @@ -1,4649 +0,0 @@ -// @generated by the protocol buffer compiler. DO NOT EDIT! -// source: tunnelbroker.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_tunnelbroker_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_tunnelbroker_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3015000 -#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 3015008 < 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 -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_tunnelbroker_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_tunnelbroker_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - 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[14] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tunnelbroker_2eproto; -::PROTOBUF_NAMESPACE_ID::Metadata descriptor_table_tunnelbroker_2eproto_metadata_getter(int index); -namespace tunnelbroker { -class CheckRequest; -struct CheckRequestDefaultTypeInternal; -extern CheckRequestDefaultTypeInternal _CheckRequest_default_instance_; -class CheckResponse; -struct CheckResponseDefaultTypeInternal; -extern CheckResponseDefaultTypeInternal _CheckResponse_default_instance_; -class GetRequest; -struct GetRequestDefaultTypeInternal; -extern GetRequestDefaultTypeInternal _GetRequest_default_instance_; -class GetResponse; -struct GetResponseDefaultTypeInternal; -extern GetResponseDefaultTypeInternal _GetResponse_default_instance_; -class InboundMessage; -struct InboundMessageDefaultTypeInternal; -extern InboundMessageDefaultTypeInternal _InboundMessage_default_instance_; -class NewPrimaryRequest; -struct NewPrimaryRequestDefaultTypeInternal; -extern NewPrimaryRequestDefaultTypeInternal _NewPrimaryRequest_default_instance_; -class NewPrimaryResponse; -struct NewPrimaryResponseDefaultTypeInternal; -extern NewPrimaryResponseDefaultTypeInternal _NewPrimaryResponse_default_instance_; -class NewSessionRequest; -struct NewSessionRequestDefaultTypeInternal; -extern NewSessionRequestDefaultTypeInternal _NewSessionRequest_default_instance_; -class NewSessionResponse; -struct NewSessionResponseDefaultTypeInternal; -extern NewSessionResponseDefaultTypeInternal _NewSessionResponse_default_instance_; -class OutboundMessage; -struct OutboundMessageDefaultTypeInternal; -extern OutboundMessageDefaultTypeInternal _OutboundMessage_default_instance_; -class PongRequest; -struct PongRequestDefaultTypeInternal; -extern PongRequestDefaultTypeInternal _PongRequest_default_instance_; -class SendRequest; -struct SendRequestDefaultTypeInternal; -extern SendRequestDefaultTypeInternal _SendRequest_default_instance_; -class SessionSignatureRequest; -struct SessionSignatureRequestDefaultTypeInternal; -extern SessionSignatureRequestDefaultTypeInternal _SessionSignatureRequest_default_instance_; -class SessionSignatureResponse; -struct SessionSignatureResponseDefaultTypeInternal; -extern SessionSignatureResponseDefaultTypeInternal _SessionSignatureResponse_default_instance_; -} // namespace tunnelbroker -PROTOBUF_NAMESPACE_OPEN -template<> ::tunnelbroker::CheckRequest* Arena::CreateMaybeMessage<::tunnelbroker::CheckRequest>(Arena*); -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::InboundMessage* Arena::CreateMaybeMessage<::tunnelbroker::InboundMessage>(Arena*); -template<> ::tunnelbroker::NewPrimaryRequest* Arena::CreateMaybeMessage<::tunnelbroker::NewPrimaryRequest>(Arena*); -template<> ::tunnelbroker::NewPrimaryResponse* Arena::CreateMaybeMessage<::tunnelbroker::NewPrimaryResponse>(Arena*); -template<> ::tunnelbroker::NewSessionRequest* Arena::CreateMaybeMessage<::tunnelbroker::NewSessionRequest>(Arena*); -template<> ::tunnelbroker::NewSessionResponse* Arena::CreateMaybeMessage<::tunnelbroker::NewSessionResponse>(Arena*); -template<> ::tunnelbroker::OutboundMessage* Arena::CreateMaybeMessage<::tunnelbroker::OutboundMessage>(Arena*); -template<> ::tunnelbroker::PongRequest* Arena::CreateMaybeMessage<::tunnelbroker::PongRequest>(Arena*); -template<> ::tunnelbroker::SendRequest* Arena::CreateMaybeMessage<::tunnelbroker::SendRequest>(Arena*); -template<> ::tunnelbroker::SessionSignatureRequest* Arena::CreateMaybeMessage<::tunnelbroker::SessionSignatureRequest>(Arena*); -template<> ::tunnelbroker::SessionSignatureResponse* Arena::CreateMaybeMessage<::tunnelbroker::SessionSignatureResponse>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace tunnelbroker { - -enum NewSessionRequest_DeviceTypes : int { - NewSessionRequest_DeviceTypes_MOBILE = 0, - NewSessionRequest_DeviceTypes_WEB = 1, - NewSessionRequest_DeviceTypes_KEYSERVER = 2, - NewSessionRequest_DeviceTypes_NewSessionRequest_DeviceTypes_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), - NewSessionRequest_DeviceTypes_NewSessionRequest_DeviceTypes_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() -}; -bool NewSessionRequest_DeviceTypes_IsValid(int value); -constexpr NewSessionRequest_DeviceTypes NewSessionRequest_DeviceTypes_DeviceTypes_MIN = NewSessionRequest_DeviceTypes_MOBILE; -constexpr NewSessionRequest_DeviceTypes NewSessionRequest_DeviceTypes_DeviceTypes_MAX = NewSessionRequest_DeviceTypes_KEYSERVER; -constexpr int NewSessionRequest_DeviceTypes_DeviceTypes_ARRAYSIZE = NewSessionRequest_DeviceTypes_DeviceTypes_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NewSessionRequest_DeviceTypes_descriptor(); -template -inline const std::string& NewSessionRequest_DeviceTypes_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function NewSessionRequest_DeviceTypes_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - NewSessionRequest_DeviceTypes_descriptor(), enum_t_value); -} -inline bool NewSessionRequest_DeviceTypes_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, NewSessionRequest_DeviceTypes* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - NewSessionRequest_DeviceTypes_descriptor(), name, value); -} -enum CheckResponseType : int { - PRIMARY_DOESNT_EXIST = 0, - PRIMARY_ONLINE = 1, - PRIMARY_OFFLINE = 2, - CURRENT_IS_PRIMARY = 3, - CheckResponseType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), - CheckResponseType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() -}; -bool CheckResponseType_IsValid(int value); -constexpr CheckResponseType CheckResponseType_MIN = PRIMARY_DOESNT_EXIST; -constexpr CheckResponseType CheckResponseType_MAX = CURRENT_IS_PRIMARY; -constexpr int CheckResponseType_ARRAYSIZE = CheckResponseType_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CheckResponseType_descriptor(); -template -inline const std::string& CheckResponseType_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function CheckResponseType_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - CheckResponseType_descriptor(), enum_t_value); -} -inline bool CheckResponseType_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, CheckResponseType* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - CheckResponseType_descriptor(), name, value); -} -// =================================================================== - -class SessionSignatureRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.SessionSignatureRequest) */ { - public: - inline SessionSignatureRequest() : SessionSignatureRequest(nullptr) {} - virtual ~SessionSignatureRequest(); - explicit constexpr SessionSignatureRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SessionSignatureRequest(const SessionSignatureRequest& from); - SessionSignatureRequest(SessionSignatureRequest&& from) noexcept - : SessionSignatureRequest() { - *this = ::std::move(from); - } - - inline SessionSignatureRequest& operator=(const SessionSignatureRequest& from) { - CopyFrom(from); - return *this; - } - inline SessionSignatureRequest& operator=(SessionSignatureRequest&& 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 SessionSignatureRequest& default_instance() { - return *internal_default_instance(); - } - static inline const SessionSignatureRequest* internal_default_instance() { - return reinterpret_cast( - &_SessionSignatureRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(SessionSignatureRequest& a, SessionSignatureRequest& b) { - a.Swap(&b); - } - inline void Swap(SessionSignatureRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SessionSignatureRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline SessionSignatureRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - SessionSignatureRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const SessionSignatureRequest& from); - void MergeFrom(const SessionSignatureRequest& 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(SessionSignatureRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.SessionSignatureRequest"; - } - protected: - explicit SessionSignatureRequest(::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 { - kDeviceIDFieldNumber = 1, - }; - // string deviceID = 1; - void clear_deviceid(); - const std::string& deviceid() const; - void set_deviceid(const std::string& value); - void set_deviceid(std::string&& value); - void set_deviceid(const char* value); - void set_deviceid(const char* value, size_t size); - std::string* mutable_deviceid(); - std::string* release_deviceid(); - void set_allocated_deviceid(std::string* deviceid); - private: - const std::string& _internal_deviceid() const; - void _internal_set_deviceid(const std::string& value); - std::string* _internal_mutable_deviceid(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.SessionSignatureRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deviceid_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class SessionSignatureResponse PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.SessionSignatureResponse) */ { - public: - inline SessionSignatureResponse() : SessionSignatureResponse(nullptr) {} - virtual ~SessionSignatureResponse(); - explicit constexpr SessionSignatureResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SessionSignatureResponse(const SessionSignatureResponse& from); - SessionSignatureResponse(SessionSignatureResponse&& from) noexcept - : SessionSignatureResponse() { - *this = ::std::move(from); - } - - inline SessionSignatureResponse& operator=(const SessionSignatureResponse& from) { - CopyFrom(from); - return *this; - } - inline SessionSignatureResponse& operator=(SessionSignatureResponse&& 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 SessionSignatureResponse& default_instance() { - return *internal_default_instance(); - } - static inline const SessionSignatureResponse* internal_default_instance() { - return reinterpret_cast( - &_SessionSignatureResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(SessionSignatureResponse& a, SessionSignatureResponse& b) { - a.Swap(&b); - } - inline void Swap(SessionSignatureResponse* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SessionSignatureResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline SessionSignatureResponse* New() const final { - return CreateMaybeMessage(nullptr); - } - - SessionSignatureResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const SessionSignatureResponse& from); - void MergeFrom(const SessionSignatureResponse& 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(SessionSignatureResponse* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.SessionSignatureResponse"; - } - protected: - explicit SessionSignatureResponse(::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 { - kToSignFieldNumber = 1, - }; - // string toSign = 1; - void clear_tosign(); - const std::string& tosign() const; - void set_tosign(const std::string& value); - void set_tosign(std::string&& value); - void set_tosign(const char* value); - void set_tosign(const char* value, size_t size); - std::string* mutable_tosign(); - std::string* release_tosign(); - void set_allocated_tosign(std::string* tosign); - private: - const std::string& _internal_tosign() const; - void _internal_set_tosign(const std::string& value); - std::string* _internal_mutable_tosign(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.SessionSignatureResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tosign_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class NewSessionRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.NewSessionRequest) */ { - public: - inline NewSessionRequest() : NewSessionRequest(nullptr) {} - virtual ~NewSessionRequest(); - explicit constexpr NewSessionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - NewSessionRequest(const NewSessionRequest& from); - NewSessionRequest(NewSessionRequest&& from) noexcept - : NewSessionRequest() { - *this = ::std::move(from); - } - - inline NewSessionRequest& operator=(const NewSessionRequest& from) { - CopyFrom(from); - return *this; - } - inline NewSessionRequest& operator=(NewSessionRequest&& 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 NewSessionRequest& default_instance() { - return *internal_default_instance(); - } - static inline const NewSessionRequest* internal_default_instance() { - return reinterpret_cast( - &_NewSessionRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(NewSessionRequest& a, NewSessionRequest& b) { - a.Swap(&b); - } - inline void Swap(NewSessionRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(NewSessionRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline NewSessionRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - NewSessionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const NewSessionRequest& from); - void MergeFrom(const NewSessionRequest& 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(NewSessionRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.NewSessionRequest"; - } - protected: - explicit NewSessionRequest(::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 ---------------------------------------------------- - - typedef NewSessionRequest_DeviceTypes DeviceTypes; - static constexpr DeviceTypes MOBILE = - NewSessionRequest_DeviceTypes_MOBILE; - static constexpr DeviceTypes WEB = - NewSessionRequest_DeviceTypes_WEB; - static constexpr DeviceTypes KEYSERVER = - NewSessionRequest_DeviceTypes_KEYSERVER; - static inline bool DeviceTypes_IsValid(int value) { - return NewSessionRequest_DeviceTypes_IsValid(value); - } - static constexpr DeviceTypes DeviceTypes_MIN = - NewSessionRequest_DeviceTypes_DeviceTypes_MIN; - static constexpr DeviceTypes DeviceTypes_MAX = - NewSessionRequest_DeviceTypes_DeviceTypes_MAX; - static constexpr int DeviceTypes_ARRAYSIZE = - NewSessionRequest_DeviceTypes_DeviceTypes_ARRAYSIZE; - static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* - DeviceTypes_descriptor() { - return NewSessionRequest_DeviceTypes_descriptor(); - } - template - static inline const std::string& DeviceTypes_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function DeviceTypes_Name."); - return NewSessionRequest_DeviceTypes_Name(enum_t_value); - } - static inline bool DeviceTypes_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, - DeviceTypes* value) { - return NewSessionRequest_DeviceTypes_Parse(name, value); - } - - // accessors ------------------------------------------------------- - - enum : int { - kDeviceIDFieldNumber = 1, - kPublicKeyFieldNumber = 2, - kSignatureFieldNumber = 3, - kNotifyTokenFieldNumber = 4, - kDeviceAppVersionFieldNumber = 6, - kDeviceOSFieldNumber = 7, - kDeviceTypeFieldNumber = 5, - }; - // string deviceID = 1; - void clear_deviceid(); - const std::string& deviceid() const; - void set_deviceid(const std::string& value); - void set_deviceid(std::string&& value); - void set_deviceid(const char* value); - void set_deviceid(const char* value, size_t size); - std::string* mutable_deviceid(); - std::string* release_deviceid(); - void set_allocated_deviceid(std::string* deviceid); - private: - const std::string& _internal_deviceid() const; - void _internal_set_deviceid(const std::string& value); - std::string* _internal_mutable_deviceid(); - public: - - // string publicKey = 2; - void clear_publickey(); - const std::string& publickey() const; - void set_publickey(const std::string& value); - void set_publickey(std::string&& value); - void set_publickey(const char* value); - void set_publickey(const char* value, size_t size); - std::string* mutable_publickey(); - std::string* release_publickey(); - void set_allocated_publickey(std::string* publickey); - private: - const std::string& _internal_publickey() const; - void _internal_set_publickey(const std::string& value); - std::string* _internal_mutable_publickey(); - public: - - // string signature = 3; - void clear_signature(); - const std::string& signature() const; - void set_signature(const std::string& value); - void set_signature(std::string&& value); - void set_signature(const char* value); - void set_signature(const char* value, size_t size); - std::string* mutable_signature(); - std::string* release_signature(); - void set_allocated_signature(std::string* signature); - private: - const std::string& _internal_signature() const; - void _internal_set_signature(const std::string& value); - std::string* _internal_mutable_signature(); - public: - - // string notifyToken = 4; - bool has_notifytoken() const; - private: - bool _internal_has_notifytoken() const; - public: - void clear_notifytoken(); - const std::string& notifytoken() const; - void set_notifytoken(const std::string& value); - void set_notifytoken(std::string&& value); - void set_notifytoken(const char* value); - void set_notifytoken(const char* value, size_t size); - std::string* mutable_notifytoken(); - std::string* release_notifytoken(); - void set_allocated_notifytoken(std::string* notifytoken); - private: - const std::string& _internal_notifytoken() const; - void _internal_set_notifytoken(const std::string& value); - std::string* _internal_mutable_notifytoken(); - public: - - // string deviceAppVersion = 6; - void clear_deviceappversion(); - const std::string& deviceappversion() const; - void set_deviceappversion(const std::string& value); - void set_deviceappversion(std::string&& value); - void set_deviceappversion(const char* value); - void set_deviceappversion(const char* value, size_t size); - std::string* mutable_deviceappversion(); - std::string* release_deviceappversion(); - void set_allocated_deviceappversion(std::string* deviceappversion); - private: - const std::string& _internal_deviceappversion() const; - void _internal_set_deviceappversion(const std::string& value); - std::string* _internal_mutable_deviceappversion(); - public: - - // string deviceOS = 7; - void clear_deviceos(); - const std::string& deviceos() const; - void set_deviceos(const std::string& value); - void set_deviceos(std::string&& value); - void set_deviceos(const char* value); - void set_deviceos(const char* value, size_t size); - std::string* mutable_deviceos(); - std::string* release_deviceos(); - void set_allocated_deviceos(std::string* deviceos); - private: - const std::string& _internal_deviceos() const; - void _internal_set_deviceos(const std::string& value); - std::string* _internal_mutable_deviceos(); - public: - - // .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; - void clear_devicetype(); - ::tunnelbroker::NewSessionRequest_DeviceTypes devicetype() const; - void set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value); - private: - ::tunnelbroker::NewSessionRequest_DeviceTypes _internal_devicetype() const; - void _internal_set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.NewSessionRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deviceid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr publickey_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr notifytoken_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deviceappversion_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deviceos_; - int devicetype_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class NewSessionResponse PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.NewSessionResponse) */ { - public: - inline NewSessionResponse() : NewSessionResponse(nullptr) {} - virtual ~NewSessionResponse(); - explicit constexpr NewSessionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - NewSessionResponse(const NewSessionResponse& from); - NewSessionResponse(NewSessionResponse&& from) noexcept - : NewSessionResponse() { - *this = ::std::move(from); - } - - inline NewSessionResponse& operator=(const NewSessionResponse& from) { - CopyFrom(from); - return *this; - } - inline NewSessionResponse& operator=(NewSessionResponse&& 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 NewSessionResponse& default_instance() { - return *internal_default_instance(); - } - static inline const NewSessionResponse* internal_default_instance() { - return reinterpret_cast( - &_NewSessionResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(NewSessionResponse& a, NewSessionResponse& b) { - a.Swap(&b); - } - inline void Swap(NewSessionResponse* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(NewSessionResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline NewSessionResponse* New() const final { - return CreateMaybeMessage(nullptr); - } - - NewSessionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const NewSessionResponse& from); - void MergeFrom(const NewSessionResponse& 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(NewSessionResponse* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.NewSessionResponse"; - } - protected: - explicit NewSessionResponse(::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 { - kSessionIDFieldNumber = 1, - }; - // string sessionID = 1; - void clear_sessionid(); - const std::string& sessionid() const; - void set_sessionid(const std::string& value); - void set_sessionid(std::string&& value); - void set_sessionid(const char* value); - void set_sessionid(const char* value, size_t size); - std::string* mutable_sessionid(); - std::string* release_sessionid(); - void set_allocated_sessionid(std::string* sessionid); - private: - const std::string& _internal_sessionid() const; - void _internal_set_sessionid(const std::string& value); - std::string* _internal_mutable_sessionid(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.NewSessionResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sessionid_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class SendRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.SendRequest) */ { - public: - inline SendRequest() : SendRequest(nullptr) {} - virtual ~SendRequest(); - explicit constexpr SendRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SendRequest(const SendRequest& from); - SendRequest(SendRequest&& from) noexcept - : SendRequest() { - *this = ::std::move(from); - } - - inline SendRequest& operator=(const SendRequest& from) { - CopyFrom(from); - return *this; - } - inline SendRequest& operator=(SendRequest&& 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 SendRequest& default_instance() { - return *internal_default_instance(); - } - static inline const SendRequest* internal_default_instance() { - return reinterpret_cast( - &_SendRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(SendRequest& a, SendRequest& b) { - a.Swap(&b); - } - inline void Swap(SendRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SendRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline SendRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - SendRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const SendRequest& from); - void MergeFrom(const SendRequest& 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(SendRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.SendRequest"; - } - protected: - explicit SendRequest(::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 { - kBlobHashesFieldNumber = 4, - kSessionIDFieldNumber = 1, - kToDeviceIDFieldNumber = 2, - kPayloadFieldNumber = 3, - }; - // repeated string blobHashes = 4; - int blobhashes_size() const; - private: - int _internal_blobhashes_size() const; - public: - void clear_blobhashes(); - const std::string& blobhashes(int index) const; - std::string* mutable_blobhashes(int index); - void set_blobhashes(int index, const std::string& value); - void set_blobhashes(int index, std::string&& value); - void set_blobhashes(int index, const char* value); - void set_blobhashes(int index, const char* value, size_t size); - std::string* add_blobhashes(); - void add_blobhashes(const std::string& value); - void add_blobhashes(std::string&& value); - void add_blobhashes(const char* value); - void add_blobhashes(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& blobhashes() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_blobhashes(); - private: - const std::string& _internal_blobhashes(int index) const; - std::string* _internal_add_blobhashes(); - public: - - // string sessionID = 1; - void clear_sessionid(); - const std::string& sessionid() const; - void set_sessionid(const std::string& value); - void set_sessionid(std::string&& value); - void set_sessionid(const char* value); - void set_sessionid(const char* value, size_t size); - std::string* mutable_sessionid(); - std::string* release_sessionid(); - void set_allocated_sessionid(std::string* sessionid); - private: - const std::string& _internal_sessionid() const; - void _internal_set_sessionid(const std::string& value); - std::string* _internal_mutable_sessionid(); - public: - - // string toDeviceID = 2; - void clear_todeviceid(); - const std::string& todeviceid() const; - void set_todeviceid(const std::string& value); - void set_todeviceid(std::string&& value); - void set_todeviceid(const char* value); - void set_todeviceid(const char* value, size_t size); - std::string* mutable_todeviceid(); - std::string* release_todeviceid(); - void set_allocated_todeviceid(std::string* todeviceid); - private: - const std::string& _internal_todeviceid() const; - void _internal_set_todeviceid(const std::string& value); - std::string* _internal_mutable_todeviceid(); - public: - - // bytes payload = 3; - void clear_payload(); - const std::string& payload() const; - void set_payload(const std::string& value); - void set_payload(std::string&& value); - void set_payload(const char* value); - void set_payload(const void* value, size_t size); - std::string* mutable_payload(); - std::string* release_payload(); - void set_allocated_payload(std::string* payload); - private: - const std::string& _internal_payload() const; - void _internal_set_payload(const std::string& value); - std::string* _internal_mutable_payload(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.SendRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField blobhashes_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sessionid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr todeviceid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class GetRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.GetRequest) */ { - public: - inline GetRequest() : GetRequest(nullptr) {} - virtual ~GetRequest(); - explicit constexpr GetRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - GetRequest(const GetRequest& from); - GetRequest(GetRequest&& from) noexcept - : GetRequest() { - *this = ::std::move(from); - } - - inline GetRequest& operator=(const GetRequest& from) { - CopyFrom(from); - return *this; - } - inline GetRequest& operator=(GetRequest&& 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 GetRequest& default_instance() { - return *internal_default_instance(); - } - static inline const GetRequest* internal_default_instance() { - return reinterpret_cast( - &_GetRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 5; - - friend void swap(GetRequest& a, GetRequest& b) { - a.Swap(&b); - } - inline void Swap(GetRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(GetRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline GetRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - GetRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const GetRequest& from); - void MergeFrom(const GetRequest& 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(GetRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.GetRequest"; - } - protected: - explicit GetRequest(::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 { - kSessionIDFieldNumber = 1, - }; - // string sessionID = 1; - void clear_sessionid(); - const std::string& sessionid() const; - void set_sessionid(const std::string& value); - void set_sessionid(std::string&& value); - void set_sessionid(const char* value); - void set_sessionid(const char* value, size_t size); - std::string* mutable_sessionid(); - std::string* release_sessionid(); - void set_allocated_sessionid(std::string* sessionid); - private: - const std::string& _internal_sessionid() const; - void _internal_set_sessionid(const std::string& value); - std::string* _internal_mutable_sessionid(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.GetRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sessionid_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -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(); - } - static inline const GetResponse* internal_default_instance() { - return reinterpret_cast( - &_GetResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 6; - - 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(nullptr); - } - - GetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(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 { - kBlobHashesFieldNumber = 3, - kFromDeviceIDFieldNumber = 1, - kPayloadFieldNumber = 2, - }; - // repeated string blobHashes = 3; - int blobhashes_size() const; - private: - int _internal_blobhashes_size() const; - public: - void clear_blobhashes(); - const std::string& blobhashes(int index) const; - std::string* mutable_blobhashes(int index); - void set_blobhashes(int index, const std::string& value); - void set_blobhashes(int index, std::string&& value); - void set_blobhashes(int index, const char* value); - void set_blobhashes(int index, const char* value, size_t size); - std::string* add_blobhashes(); - void add_blobhashes(const std::string& value); - void add_blobhashes(std::string&& value); - void add_blobhashes(const char* value); - void add_blobhashes(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& blobhashes() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_blobhashes(); - private: - const std::string& _internal_blobhashes(int index) const; - std::string* _internal_add_blobhashes(); - public: - - // string fromDeviceID = 1; - void clear_fromdeviceid(); - const std::string& fromdeviceid() const; - void set_fromdeviceid(const std::string& value); - void set_fromdeviceid(std::string&& value); - void set_fromdeviceid(const char* value); - void set_fromdeviceid(const char* value, size_t size); - std::string* mutable_fromdeviceid(); - std::string* release_fromdeviceid(); - void set_allocated_fromdeviceid(std::string* fromdeviceid); - private: - const std::string& _internal_fromdeviceid() const; - void _internal_set_fromdeviceid(const std::string& value); - std::string* _internal_mutable_fromdeviceid(); - public: - - // bytes payload = 2; - void clear_payload(); - const std::string& payload() const; - void set_payload(const std::string& value); - void set_payload(std::string&& value); - void set_payload(const char* value); - void set_payload(const void* value, size_t size); - std::string* mutable_payload(); - std::string* release_payload(); - void set_allocated_payload(std::string* payload); - private: - const std::string& _internal_payload() const; - void _internal_set_payload(const std::string& value); - std::string* _internal_mutable_payload(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.GetResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField blobhashes_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr fromdeviceid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class OutboundMessage PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.OutboundMessage) */ { - public: - inline OutboundMessage() : OutboundMessage(nullptr) {} - virtual ~OutboundMessage(); - explicit constexpr OutboundMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - OutboundMessage(const OutboundMessage& from); - OutboundMessage(OutboundMessage&& from) noexcept - : OutboundMessage() { - *this = ::std::move(from); - } - - inline OutboundMessage& operator=(const OutboundMessage& from) { - CopyFrom(from); - return *this; - } - inline OutboundMessage& operator=(OutboundMessage&& 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 OutboundMessage& default_instance() { - return *internal_default_instance(); - } - static inline const OutboundMessage* internal_default_instance() { - return reinterpret_cast( - &_OutboundMessage_default_instance_); - } - static constexpr int kIndexInFileMessages = - 7; - - friend void swap(OutboundMessage& a, OutboundMessage& b) { - a.Swap(&b); - } - inline void Swap(OutboundMessage* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(OutboundMessage* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline OutboundMessage* New() const final { - return CreateMaybeMessage(nullptr); - } - - OutboundMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const OutboundMessage& from); - void MergeFrom(const OutboundMessage& 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(OutboundMessage* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.OutboundMessage"; - } - protected: - explicit OutboundMessage(::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 { - kBlobHashesFieldNumber = 3, - kToDeviceIDFieldNumber = 1, - kPayloadFieldNumber = 2, - }; - // repeated string blobHashes = 3; - int blobhashes_size() const; - private: - int _internal_blobhashes_size() const; - public: - void clear_blobhashes(); - const std::string& blobhashes(int index) const; - std::string* mutable_blobhashes(int index); - void set_blobhashes(int index, const std::string& value); - void set_blobhashes(int index, std::string&& value); - void set_blobhashes(int index, const char* value); - void set_blobhashes(int index, const char* value, size_t size); - std::string* add_blobhashes(); - void add_blobhashes(const std::string& value); - void add_blobhashes(std::string&& value); - void add_blobhashes(const char* value); - void add_blobhashes(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& blobhashes() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_blobhashes(); - private: - const std::string& _internal_blobhashes(int index) const; - std::string* _internal_add_blobhashes(); - public: - - // string toDeviceID = 1; - void clear_todeviceid(); - const std::string& todeviceid() const; - void set_todeviceid(const std::string& value); - void set_todeviceid(std::string&& value); - void set_todeviceid(const char* value); - void set_todeviceid(const char* value, size_t size); - std::string* mutable_todeviceid(); - std::string* release_todeviceid(); - void set_allocated_todeviceid(std::string* todeviceid); - private: - const std::string& _internal_todeviceid() const; - void _internal_set_todeviceid(const std::string& value); - std::string* _internal_mutable_todeviceid(); - public: - - // string payload = 2; - void clear_payload(); - const std::string& payload() const; - void set_payload(const std::string& value); - void set_payload(std::string&& value); - void set_payload(const char* value); - void set_payload(const char* value, size_t size); - std::string* mutable_payload(); - std::string* release_payload(); - void set_allocated_payload(std::string* payload); - private: - const std::string& _internal_payload() const; - void _internal_set_payload(const std::string& value); - std::string* _internal_mutable_payload(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.OutboundMessage) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField blobhashes_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr todeviceid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class InboundMessage PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.InboundMessage) */ { - public: - inline InboundMessage() : InboundMessage(nullptr) {} - virtual ~InboundMessage(); - explicit constexpr InboundMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - InboundMessage(const InboundMessage& from); - InboundMessage(InboundMessage&& from) noexcept - : InboundMessage() { - *this = ::std::move(from); - } - - inline InboundMessage& operator=(const InboundMessage& from) { - CopyFrom(from); - return *this; - } - inline InboundMessage& operator=(InboundMessage&& 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 InboundMessage& default_instance() { - return *internal_default_instance(); - } - static inline const InboundMessage* internal_default_instance() { - return reinterpret_cast( - &_InboundMessage_default_instance_); - } - static constexpr int kIndexInFileMessages = - 8; - - friend void swap(InboundMessage& a, InboundMessage& b) { - a.Swap(&b); - } - inline void Swap(InboundMessage* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InboundMessage* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline InboundMessage* New() const final { - return CreateMaybeMessage(nullptr); - } - - InboundMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const InboundMessage& from); - void MergeFrom(const InboundMessage& 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(InboundMessage* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.InboundMessage"; - } - protected: - explicit InboundMessage(::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 { - kBlobHashesFieldNumber = 4, - kFromDeviceIDFieldNumber = 1, - kFromConnectionIDFieldNumber = 2, - kPayloadFieldNumber = 3, - }; - // repeated string blobHashes = 4; - int blobhashes_size() const; - private: - int _internal_blobhashes_size() const; - public: - void clear_blobhashes(); - const std::string& blobhashes(int index) const; - std::string* mutable_blobhashes(int index); - void set_blobhashes(int index, const std::string& value); - void set_blobhashes(int index, std::string&& value); - void set_blobhashes(int index, const char* value); - void set_blobhashes(int index, const char* value, size_t size); - std::string* add_blobhashes(); - void add_blobhashes(const std::string& value); - void add_blobhashes(std::string&& value); - void add_blobhashes(const char* value); - void add_blobhashes(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& blobhashes() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_blobhashes(); - private: - const std::string& _internal_blobhashes(int index) const; - std::string* _internal_add_blobhashes(); - public: - - // string fromDeviceID = 1; - void clear_fromdeviceid(); - const std::string& fromdeviceid() const; - void set_fromdeviceid(const std::string& value); - void set_fromdeviceid(std::string&& value); - void set_fromdeviceid(const char* value); - void set_fromdeviceid(const char* value, size_t size); - std::string* mutable_fromdeviceid(); - std::string* release_fromdeviceid(); - void set_allocated_fromdeviceid(std::string* fromdeviceid); - private: - const std::string& _internal_fromdeviceid() const; - void _internal_set_fromdeviceid(const std::string& value); - std::string* _internal_mutable_fromdeviceid(); - public: - - // string fromConnectionID = 2; - void clear_fromconnectionid(); - const std::string& fromconnectionid() const; - void set_fromconnectionid(const std::string& value); - void set_fromconnectionid(std::string&& value); - void set_fromconnectionid(const char* value); - void set_fromconnectionid(const char* value, size_t size); - std::string* mutable_fromconnectionid(); - std::string* release_fromconnectionid(); - void set_allocated_fromconnectionid(std::string* fromconnectionid); - private: - const std::string& _internal_fromconnectionid() const; - void _internal_set_fromconnectionid(const std::string& value); - std::string* _internal_mutable_fromconnectionid(); - public: - - // string payload = 3; - void clear_payload(); - const std::string& payload() const; - void set_payload(const std::string& value); - void set_payload(std::string&& value); - void set_payload(const char* value); - void set_payload(const char* value, size_t size); - std::string* mutable_payload(); - std::string* release_payload(); - void set_allocated_payload(std::string* payload); - private: - const std::string& _internal_payload() const; - void _internal_set_payload(const std::string& value); - std::string* _internal_mutable_payload(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.InboundMessage) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField blobhashes_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr fromdeviceid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr fromconnectionid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class CheckRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.CheckRequest) */ { - public: - inline CheckRequest() : CheckRequest(nullptr) {} - virtual ~CheckRequest(); - explicit constexpr CheckRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - CheckRequest(const CheckRequest& from); - CheckRequest(CheckRequest&& from) noexcept - : CheckRequest() { - *this = ::std::move(from); - } - - inline CheckRequest& operator=(const CheckRequest& from) { - CopyFrom(from); - return *this; - } - inline CheckRequest& operator=(CheckRequest&& 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 CheckRequest& default_instance() { - return *internal_default_instance(); - } - static inline const CheckRequest* internal_default_instance() { - return reinterpret_cast( - &_CheckRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 9; - - friend void swap(CheckRequest& a, CheckRequest& b) { - a.Swap(&b); - } - inline void Swap(CheckRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(CheckRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline CheckRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - CheckRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const CheckRequest& from); - void MergeFrom(const CheckRequest& 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(CheckRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.CheckRequest"; - } - protected: - explicit CheckRequest(::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 { - kUserIdFieldNumber = 1, - kDeviceTokenFieldNumber = 2, - }; - // string userId = 1; - void clear_userid(); - const std::string& userid() const; - void set_userid(const std::string& value); - void set_userid(std::string&& value); - void set_userid(const char* value); - void set_userid(const char* value, size_t size); - std::string* mutable_userid(); - std::string* release_userid(); - void set_allocated_userid(std::string* userid); - private: - const std::string& _internal_userid() const; - void _internal_set_userid(const std::string& value); - std::string* _internal_mutable_userid(); - public: - - // string deviceToken = 2; - void clear_devicetoken(); - const std::string& devicetoken() const; - void set_devicetoken(const std::string& value); - void set_devicetoken(std::string&& value); - void set_devicetoken(const char* value); - void set_devicetoken(const char* value, size_t size); - std::string* mutable_devicetoken(); - std::string* release_devicetoken(); - void set_allocated_devicetoken(std::string* devicetoken); - private: - const std::string& _internal_devicetoken() const; - void _internal_set_devicetoken(const std::string& value); - std::string* _internal_mutable_devicetoken(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.CheckRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr userid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr devicetoken_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class CheckResponse PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.CheckResponse) */ { - public: - inline CheckResponse() : CheckResponse(nullptr) {} - virtual ~CheckResponse(); - explicit constexpr CheckResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - CheckResponse(const CheckResponse& from); - CheckResponse(CheckResponse&& from) noexcept - : CheckResponse() { - *this = ::std::move(from); - } - - inline CheckResponse& operator=(const CheckResponse& from) { - CopyFrom(from); - return *this; - } - inline CheckResponse& operator=(CheckResponse&& 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 CheckResponse& default_instance() { - return *internal_default_instance(); - } - static inline const CheckResponse* internal_default_instance() { - return reinterpret_cast( - &_CheckResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 10; - - friend void swap(CheckResponse& a, CheckResponse& b) { - a.Swap(&b); - } - inline void Swap(CheckResponse* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(CheckResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline CheckResponse* New() const final { - return CreateMaybeMessage(nullptr); - } - - CheckResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const CheckResponse& from); - void MergeFrom(const CheckResponse& 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(CheckResponse* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.CheckResponse"; - } - protected: - explicit CheckResponse(::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 { - kCheckResponseTypeFieldNumber = 1, - }; - // .tunnelbroker.CheckResponseType checkResponseType = 1; - void clear_checkresponsetype(); - ::tunnelbroker::CheckResponseType checkresponsetype() const; - void set_checkresponsetype(::tunnelbroker::CheckResponseType value); - private: - ::tunnelbroker::CheckResponseType _internal_checkresponsetype() const; - void _internal_set_checkresponsetype(::tunnelbroker::CheckResponseType value); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.CheckResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - int checkresponsetype_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class NewPrimaryRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.NewPrimaryRequest) */ { - public: - inline NewPrimaryRequest() : NewPrimaryRequest(nullptr) {} - virtual ~NewPrimaryRequest(); - explicit constexpr NewPrimaryRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - NewPrimaryRequest(const NewPrimaryRequest& from); - NewPrimaryRequest(NewPrimaryRequest&& from) noexcept - : NewPrimaryRequest() { - *this = ::std::move(from); - } - - inline NewPrimaryRequest& operator=(const NewPrimaryRequest& from) { - CopyFrom(from); - return *this; - } - inline NewPrimaryRequest& operator=(NewPrimaryRequest&& 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 NewPrimaryRequest& default_instance() { - return *internal_default_instance(); - } - static inline const NewPrimaryRequest* internal_default_instance() { - return reinterpret_cast( - &_NewPrimaryRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 11; - - friend void swap(NewPrimaryRequest& a, NewPrimaryRequest& b) { - a.Swap(&b); - } - inline void Swap(NewPrimaryRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(NewPrimaryRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline NewPrimaryRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - NewPrimaryRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const NewPrimaryRequest& from); - void MergeFrom(const NewPrimaryRequest& 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(NewPrimaryRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.NewPrimaryRequest"; - } - protected: - explicit NewPrimaryRequest(::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 { - kUserIdFieldNumber = 1, - kDeviceTokenFieldNumber = 2, - }; - // string userId = 1; - void clear_userid(); - const std::string& userid() const; - void set_userid(const std::string& value); - void set_userid(std::string&& value); - void set_userid(const char* value); - void set_userid(const char* value, size_t size); - std::string* mutable_userid(); - std::string* release_userid(); - void set_allocated_userid(std::string* userid); - private: - const std::string& _internal_userid() const; - void _internal_set_userid(const std::string& value); - std::string* _internal_mutable_userid(); - public: - - // string deviceToken = 2; - void clear_devicetoken(); - const std::string& devicetoken() const; - void set_devicetoken(const std::string& value); - void set_devicetoken(std::string&& value); - void set_devicetoken(const char* value); - void set_devicetoken(const char* value, size_t size); - std::string* mutable_devicetoken(); - std::string* release_devicetoken(); - void set_allocated_devicetoken(std::string* devicetoken); - private: - const std::string& _internal_devicetoken() const; - void _internal_set_devicetoken(const std::string& value); - std::string* _internal_mutable_devicetoken(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.NewPrimaryRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr userid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr devicetoken_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class NewPrimaryResponse PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.NewPrimaryResponse) */ { - public: - inline NewPrimaryResponse() : NewPrimaryResponse(nullptr) {} - virtual ~NewPrimaryResponse(); - explicit constexpr NewPrimaryResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - NewPrimaryResponse(const NewPrimaryResponse& from); - NewPrimaryResponse(NewPrimaryResponse&& from) noexcept - : NewPrimaryResponse() { - *this = ::std::move(from); - } - - inline NewPrimaryResponse& operator=(const NewPrimaryResponse& from) { - CopyFrom(from); - return *this; - } - inline NewPrimaryResponse& operator=(NewPrimaryResponse&& 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 NewPrimaryResponse& default_instance() { - return *internal_default_instance(); - } - static inline const NewPrimaryResponse* internal_default_instance() { - return reinterpret_cast( - &_NewPrimaryResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 12; - - friend void swap(NewPrimaryResponse& a, NewPrimaryResponse& b) { - a.Swap(&b); - } - inline void Swap(NewPrimaryResponse* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(NewPrimaryResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline NewPrimaryResponse* New() const final { - return CreateMaybeMessage(nullptr); - } - - NewPrimaryResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const NewPrimaryResponse& from); - void MergeFrom(const NewPrimaryResponse& 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(NewPrimaryResponse* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.NewPrimaryResponse"; - } - protected: - explicit NewPrimaryResponse(::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 { - kSuccessFieldNumber = 1, - }; - // bool success = 1; - void clear_success(); - bool success() const; - void set_success(bool value); - private: - bool _internal_success() const; - void _internal_set_success(bool value); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.NewPrimaryResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - bool success_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class PongRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.PongRequest) */ { - public: - inline PongRequest() : PongRequest(nullptr) {} - virtual ~PongRequest(); - explicit constexpr PongRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - PongRequest(const PongRequest& from); - PongRequest(PongRequest&& from) noexcept - : PongRequest() { - *this = ::std::move(from); - } - - inline PongRequest& operator=(const PongRequest& from) { - CopyFrom(from); - return *this; - } - inline PongRequest& operator=(PongRequest&& 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 PongRequest& default_instance() { - return *internal_default_instance(); - } - static inline const PongRequest* internal_default_instance() { - return reinterpret_cast( - &_PongRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 13; - - friend void swap(PongRequest& a, PongRequest& b) { - a.Swap(&b); - } - inline void Swap(PongRequest* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(PongRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline PongRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - PongRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const PongRequest& from); - void MergeFrom(const PongRequest& 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(PongRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.PongRequest"; - } - protected: - explicit PongRequest(::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 { - kUserIdFieldNumber = 1, - kDeviceTokenFieldNumber = 2, - }; - // string userId = 1; - void clear_userid(); - const std::string& userid() const; - void set_userid(const std::string& value); - void set_userid(std::string&& value); - void set_userid(const char* value); - void set_userid(const char* value, size_t size); - std::string* mutable_userid(); - std::string* release_userid(); - void set_allocated_userid(std::string* userid); - private: - const std::string& _internal_userid() const; - void _internal_set_userid(const std::string& value); - std::string* _internal_mutable_userid(); - public: - - // string deviceToken = 2; - void clear_devicetoken(); - const std::string& devicetoken() const; - void set_devicetoken(const std::string& value); - void set_devicetoken(std::string&& value); - void set_devicetoken(const char* value); - void set_devicetoken(const char* value, size_t size); - std::string* mutable_devicetoken(); - std::string* release_devicetoken(); - void set_allocated_devicetoken(std::string* devicetoken); - private: - const std::string& _internal_devicetoken() const; - void _internal_set_devicetoken(const std::string& value); - std::string* _internal_mutable_devicetoken(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.PongRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr userid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr devicetoken_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// SessionSignatureRequest - -// string deviceID = 1; -inline void SessionSignatureRequest::clear_deviceid() { - deviceid_.ClearToEmpty(); -} -inline const std::string& SessionSignatureRequest::deviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SessionSignatureRequest.deviceID) - return _internal_deviceid(); -} -inline void SessionSignatureRequest::set_deviceid(const std::string& value) { - _internal_set_deviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SessionSignatureRequest.deviceID) -} -inline std::string* SessionSignatureRequest::mutable_deviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SessionSignatureRequest.deviceID) - return _internal_mutable_deviceid(); -} -inline const std::string& SessionSignatureRequest::_internal_deviceid() const { - return deviceid_.Get(); -} -inline void SessionSignatureRequest::_internal_set_deviceid(const std::string& value) { - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void SessionSignatureRequest::set_deviceid(std::string&& value) { - - deviceid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SessionSignatureRequest.deviceID) -} -inline void SessionSignatureRequest::set_deviceid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SessionSignatureRequest.deviceID) -} -inline void SessionSignatureRequest::set_deviceid(const char* value, - size_t size) { - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SessionSignatureRequest.deviceID) -} -inline std::string* SessionSignatureRequest::_internal_mutable_deviceid() { - - return deviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* SessionSignatureRequest::release_deviceid() { - // @@protoc_insertion_point(field_release:tunnelbroker.SessionSignatureRequest.deviceID) - return deviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void SessionSignatureRequest::set_allocated_deviceid(std::string* deviceid) { - if (deviceid != nullptr) { - - } else { - - } - deviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SessionSignatureRequest.deviceID) -} - -// ------------------------------------------------------------------- - -// SessionSignatureResponse - -// string toSign = 1; -inline void SessionSignatureResponse::clear_tosign() { - tosign_.ClearToEmpty(); -} -inline const std::string& SessionSignatureResponse::tosign() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SessionSignatureResponse.toSign) - return _internal_tosign(); -} -inline void SessionSignatureResponse::set_tosign(const std::string& value) { - _internal_set_tosign(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SessionSignatureResponse.toSign) -} -inline std::string* SessionSignatureResponse::mutable_tosign() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SessionSignatureResponse.toSign) - return _internal_mutable_tosign(); -} -inline const std::string& SessionSignatureResponse::_internal_tosign() const { - return tosign_.Get(); -} -inline void SessionSignatureResponse::_internal_set_tosign(const std::string& value) { - - tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void SessionSignatureResponse::set_tosign(std::string&& value) { - - tosign_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SessionSignatureResponse.toSign) -} -inline void SessionSignatureResponse::set_tosign(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SessionSignatureResponse.toSign) -} -inline void SessionSignatureResponse::set_tosign(const char* value, - size_t size) { - - tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SessionSignatureResponse.toSign) -} -inline std::string* SessionSignatureResponse::_internal_mutable_tosign() { - - return tosign_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* SessionSignatureResponse::release_tosign() { - // @@protoc_insertion_point(field_release:tunnelbroker.SessionSignatureResponse.toSign) - return tosign_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void SessionSignatureResponse::set_allocated_tosign(std::string* tosign) { - if (tosign != nullptr) { - - } else { - - } - tosign_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tosign, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SessionSignatureResponse.toSign) -} - -// ------------------------------------------------------------------- - -// NewSessionRequest - -// string deviceID = 1; -inline void NewSessionRequest::clear_deviceid() { - deviceid_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::deviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceID) - return _internal_deviceid(); -} -inline void NewSessionRequest::set_deviceid(const std::string& value) { - _internal_set_deviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceID) -} -inline std::string* NewSessionRequest::mutable_deviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.deviceID) - return _internal_mutable_deviceid(); -} -inline const std::string& NewSessionRequest::_internal_deviceid() const { - return deviceid_.Get(); -} -inline void NewSessionRequest::_internal_set_deviceid(const std::string& value) { - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_deviceid(std::string&& value) { - - deviceid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.deviceID) -} -inline void NewSessionRequest::set_deviceid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.deviceID) -} -inline void NewSessionRequest::set_deviceid(const char* value, - size_t size) { - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.deviceID) -} -inline std::string* NewSessionRequest::_internal_mutable_deviceid() { - - return deviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_deviceid() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.deviceID) - return deviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_deviceid(std::string* deviceid) { - if (deviceid != nullptr) { - - } else { - - } - deviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.deviceID) -} - -// string publicKey = 2; -inline void NewSessionRequest::clear_publickey() { - publickey_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::publickey() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.publicKey) - return _internal_publickey(); -} -inline void NewSessionRequest::set_publickey(const std::string& value) { - _internal_set_publickey(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.publicKey) -} -inline std::string* NewSessionRequest::mutable_publickey() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.publicKey) - return _internal_mutable_publickey(); -} -inline const std::string& NewSessionRequest::_internal_publickey() const { - return publickey_.Get(); -} -inline void NewSessionRequest::_internal_set_publickey(const std::string& value) { - - publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_publickey(std::string&& value) { - - publickey_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.publicKey) -} -inline void NewSessionRequest::set_publickey(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.publicKey) -} -inline void NewSessionRequest::set_publickey(const char* value, - size_t size) { - - publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.publicKey) -} -inline std::string* NewSessionRequest::_internal_mutable_publickey() { - - return publickey_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_publickey() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.publicKey) - return publickey_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_publickey(std::string* publickey) { - if (publickey != nullptr) { - - } else { - - } - publickey_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), publickey, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.publicKey) -} - -// string signature = 3; -inline void NewSessionRequest::clear_signature() { - signature_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::signature() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.signature) - return _internal_signature(); -} -inline void NewSessionRequest::set_signature(const std::string& value) { - _internal_set_signature(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.signature) -} -inline std::string* NewSessionRequest::mutable_signature() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.signature) - return _internal_mutable_signature(); -} -inline const std::string& NewSessionRequest::_internal_signature() const { - return signature_.Get(); -} -inline void NewSessionRequest::_internal_set_signature(const std::string& value) { - - signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_signature(std::string&& value) { - - signature_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.signature) -} -inline void NewSessionRequest::set_signature(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.signature) -} -inline void NewSessionRequest::set_signature(const char* value, - size_t size) { - - signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.signature) -} -inline std::string* NewSessionRequest::_internal_mutable_signature() { - - return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_signature() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.signature) - return signature_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_signature(std::string* signature) { - if (signature != nullptr) { - - } else { - - } - signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.signature) -} - -// string notifyToken = 4; -inline bool NewSessionRequest::_internal_has_notifytoken() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool NewSessionRequest::has_notifytoken() const { - return _internal_has_notifytoken(); -} -inline void NewSessionRequest::clear_notifytoken() { - notifytoken_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000001u; -} -inline const std::string& NewSessionRequest::notifytoken() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.notifyToken) - return _internal_notifytoken(); -} -inline void NewSessionRequest::set_notifytoken(const std::string& value) { - _internal_set_notifytoken(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.notifyToken) -} -inline std::string* NewSessionRequest::mutable_notifytoken() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.notifyToken) - return _internal_mutable_notifytoken(); -} -inline const std::string& NewSessionRequest::_internal_notifytoken() const { - return notifytoken_.Get(); -} -inline void NewSessionRequest::_internal_set_notifytoken(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_notifytoken(std::string&& value) { - _has_bits_[0] |= 0x00000001u; - notifytoken_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.notifyToken) -} -inline void NewSessionRequest::set_notifytoken(const char* value) { - GOOGLE_DCHECK(value != nullptr); - _has_bits_[0] |= 0x00000001u; - notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.notifyToken) -} -inline void NewSessionRequest::set_notifytoken(const char* value, - size_t size) { - _has_bits_[0] |= 0x00000001u; - notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.notifyToken) -} -inline std::string* NewSessionRequest::_internal_mutable_notifytoken() { - _has_bits_[0] |= 0x00000001u; - return notifytoken_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_notifytoken() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.notifyToken) - if (!_internal_has_notifytoken()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000001u; - return notifytoken_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_notifytoken(std::string* notifytoken) { - if (notifytoken != nullptr) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - notifytoken_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), notifytoken, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.notifyToken) -} - -// .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; -inline void NewSessionRequest::clear_devicetype() { - devicetype_ = 0; -} -inline ::tunnelbroker::NewSessionRequest_DeviceTypes NewSessionRequest::_internal_devicetype() const { - return static_cast< ::tunnelbroker::NewSessionRequest_DeviceTypes >(devicetype_); -} -inline ::tunnelbroker::NewSessionRequest_DeviceTypes NewSessionRequest::devicetype() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceType) - return _internal_devicetype(); -} -inline void NewSessionRequest::_internal_set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value) { - - devicetype_ = value; -} -inline void NewSessionRequest::set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value) { - _internal_set_devicetype(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceType) -} - -// string deviceAppVersion = 6; -inline void NewSessionRequest::clear_deviceappversion() { - deviceappversion_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::deviceappversion() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceAppVersion) - return _internal_deviceappversion(); -} -inline void NewSessionRequest::set_deviceappversion(const std::string& value) { - _internal_set_deviceappversion(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceAppVersion) -} -inline std::string* NewSessionRequest::mutable_deviceappversion() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.deviceAppVersion) - return _internal_mutable_deviceappversion(); -} -inline const std::string& NewSessionRequest::_internal_deviceappversion() const { - return deviceappversion_.Get(); -} -inline void NewSessionRequest::_internal_set_deviceappversion(const std::string& value) { - - deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_deviceappversion(std::string&& value) { - - deviceappversion_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.deviceAppVersion) -} -inline void NewSessionRequest::set_deviceappversion(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.deviceAppVersion) -} -inline void NewSessionRequest::set_deviceappversion(const char* value, - size_t size) { - - deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.deviceAppVersion) -} -inline std::string* NewSessionRequest::_internal_mutable_deviceappversion() { - - return deviceappversion_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_deviceappversion() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.deviceAppVersion) - return deviceappversion_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_deviceappversion(std::string* deviceappversion) { - if (deviceappversion != nullptr) { - - } else { - - } - deviceappversion_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceappversion, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.deviceAppVersion) -} - -// string deviceOS = 7; -inline void NewSessionRequest::clear_deviceos() { - deviceos_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::deviceos() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceOS) - return _internal_deviceos(); -} -inline void NewSessionRequest::set_deviceos(const std::string& value) { - _internal_set_deviceos(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceOS) -} -inline std::string* NewSessionRequest::mutable_deviceos() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.deviceOS) - return _internal_mutable_deviceos(); -} -inline const std::string& NewSessionRequest::_internal_deviceos() const { - return deviceos_.Get(); -} -inline void NewSessionRequest::_internal_set_deviceos(const std::string& value) { - - deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_deviceos(std::string&& value) { - - deviceos_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.deviceOS) -} -inline void NewSessionRequest::set_deviceos(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.deviceOS) -} -inline void NewSessionRequest::set_deviceos(const char* value, - size_t size) { - - deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.deviceOS) -} -inline std::string* NewSessionRequest::_internal_mutable_deviceos() { - - return deviceos_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_deviceos() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.deviceOS) - return deviceos_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_deviceos(std::string* deviceos) { - if (deviceos != nullptr) { - - } else { - - } - deviceos_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceos, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.deviceOS) -} - -// ------------------------------------------------------------------- - -// NewSessionResponse - -// string sessionID = 1; -inline void NewSessionResponse::clear_sessionid() { - sessionid_.ClearToEmpty(); -} -inline const std::string& NewSessionResponse::sessionid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionResponse.sessionID) - return _internal_sessionid(); -} -inline void NewSessionResponse::set_sessionid(const std::string& value) { - _internal_set_sessionid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionResponse.sessionID) -} -inline std::string* NewSessionResponse::mutable_sessionid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionResponse.sessionID) - return _internal_mutable_sessionid(); -} -inline const std::string& NewSessionResponse::_internal_sessionid() const { - return sessionid_.Get(); -} -inline void NewSessionResponse::_internal_set_sessionid(const std::string& value) { - - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionResponse::set_sessionid(std::string&& value) { - - sessionid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionResponse.sessionID) -} -inline void NewSessionResponse::set_sessionid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionResponse.sessionID) -} -inline void NewSessionResponse::set_sessionid(const char* value, - size_t size) { - - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionResponse.sessionID) -} -inline std::string* NewSessionResponse::_internal_mutable_sessionid() { - - return sessionid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionResponse::release_sessionid() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionResponse.sessionID) - return sessionid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionResponse::set_allocated_sessionid(std::string* sessionid) { - if (sessionid != nullptr) { - - } else { - - } - sessionid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sessionid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionResponse.sessionID) -} - -// ------------------------------------------------------------------- - -// SendRequest - -// string sessionID = 1; -inline void SendRequest::clear_sessionid() { - sessionid_.ClearToEmpty(); -} -inline const std::string& SendRequest::sessionid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SendRequest.sessionID) - return _internal_sessionid(); -} -inline void SendRequest::set_sessionid(const std::string& value) { - _internal_set_sessionid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.sessionID) -} -inline std::string* SendRequest::mutable_sessionid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SendRequest.sessionID) - return _internal_mutable_sessionid(); -} -inline const std::string& SendRequest::_internal_sessionid() const { - return sessionid_.Get(); -} -inline void SendRequest::_internal_set_sessionid(const std::string& value) { - - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void SendRequest::set_sessionid(std::string&& value) { - - sessionid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SendRequest.sessionID) -} -inline void SendRequest::set_sessionid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SendRequest.sessionID) -} -inline void SendRequest::set_sessionid(const char* value, - size_t size) { - - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SendRequest.sessionID) -} -inline std::string* SendRequest::_internal_mutable_sessionid() { - - return sessionid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* SendRequest::release_sessionid() { - // @@protoc_insertion_point(field_release:tunnelbroker.SendRequest.sessionID) - return sessionid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void SendRequest::set_allocated_sessionid(std::string* sessionid) { - if (sessionid != nullptr) { - - } else { - - } - sessionid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sessionid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SendRequest.sessionID) -} - -// string toDeviceID = 2; -inline void SendRequest::clear_todeviceid() { - todeviceid_.ClearToEmpty(); -} -inline const std::string& SendRequest::todeviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SendRequest.toDeviceID) - return _internal_todeviceid(); -} -inline void SendRequest::set_todeviceid(const std::string& value) { - _internal_set_todeviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.toDeviceID) -} -inline std::string* SendRequest::mutable_todeviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SendRequest.toDeviceID) - return _internal_mutable_todeviceid(); -} -inline const std::string& SendRequest::_internal_todeviceid() const { - return todeviceid_.Get(); -} -inline void SendRequest::_internal_set_todeviceid(const std::string& value) { - - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void SendRequest::set_todeviceid(std::string&& value) { - - todeviceid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SendRequest.toDeviceID) -} -inline void SendRequest::set_todeviceid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SendRequest.toDeviceID) -} -inline void SendRequest::set_todeviceid(const char* value, - size_t size) { - - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SendRequest.toDeviceID) -} -inline std::string* SendRequest::_internal_mutable_todeviceid() { - - return todeviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* SendRequest::release_todeviceid() { - // @@protoc_insertion_point(field_release:tunnelbroker.SendRequest.toDeviceID) - return todeviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void SendRequest::set_allocated_todeviceid(std::string* todeviceid) { - if (todeviceid != nullptr) { - - } else { - - } - todeviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), todeviceid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SendRequest.toDeviceID) -} - -// bytes payload = 3; -inline void SendRequest::clear_payload() { - payload_.ClearToEmpty(); -} -inline const std::string& SendRequest::payload() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SendRequest.payload) - return _internal_payload(); -} -inline void SendRequest::set_payload(const std::string& value) { - _internal_set_payload(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.payload) -} -inline std::string* SendRequest::mutable_payload() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SendRequest.payload) - return _internal_mutable_payload(); -} -inline const std::string& SendRequest::_internal_payload() const { - return payload_.Get(); -} -inline void SendRequest::_internal_set_payload(const std::string& value) { - - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void SendRequest::set_payload(std::string&& value) { - - payload_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SendRequest.payload) -} -inline void SendRequest::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.SendRequest.payload) -} -inline void SendRequest::set_payload(const void* value, - size_t size) { - - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SendRequest.payload) -} -inline std::string* SendRequest::_internal_mutable_payload() { - - return payload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* SendRequest::release_payload() { - // @@protoc_insertion_point(field_release:tunnelbroker.SendRequest.payload) - return payload_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void SendRequest::set_allocated_payload(std::string* payload) { - if (payload != nullptr) { - - } else { - - } - payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SendRequest.payload) -} - -// repeated string blobHashes = 4; -inline int SendRequest::_internal_blobhashes_size() const { - return blobhashes_.size(); -} -inline int SendRequest::blobhashes_size() const { - return _internal_blobhashes_size(); -} -inline void SendRequest::clear_blobhashes() { - blobhashes_.Clear(); -} -inline std::string* SendRequest::add_blobhashes() { - // @@protoc_insertion_point(field_add_mutable:tunnelbroker.SendRequest.blobHashes) - return _internal_add_blobhashes(); -} -inline const std::string& SendRequest::_internal_blobhashes(int index) const { - return blobhashes_.Get(index); -} -inline const std::string& SendRequest::blobhashes(int index) const { - // @@protoc_insertion_point(field_get:tunnelbroker.SendRequest.blobHashes) - return _internal_blobhashes(index); -} -inline std::string* SendRequest::mutable_blobhashes(int index) { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SendRequest.blobHashes) - return blobhashes_.Mutable(index); -} -inline void SendRequest::set_blobhashes(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.blobHashes) - blobhashes_.Mutable(index)->assign(value); -} -inline void SendRequest::set_blobhashes(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.blobHashes) - blobhashes_.Mutable(index)->assign(std::move(value)); -} -inline void SendRequest::set_blobhashes(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SendRequest.blobHashes) -} -inline void SendRequest::set_blobhashes(int index, const char* value, size_t size) { - blobhashes_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SendRequest.blobHashes) -} -inline std::string* SendRequest::_internal_add_blobhashes() { - return blobhashes_.Add(); -} -inline void SendRequest::add_blobhashes(const std::string& value) { - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tunnelbroker.SendRequest.blobHashes) -} -inline void SendRequest::add_blobhashes(std::string&& value) { - blobhashes_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tunnelbroker.SendRequest.blobHashes) -} -inline void SendRequest::add_blobhashes(const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tunnelbroker.SendRequest.blobHashes) -} -inline void SendRequest::add_blobhashes(const char* value, size_t size) { - blobhashes_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tunnelbroker.SendRequest.blobHashes) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -SendRequest::blobhashes() const { - // @@protoc_insertion_point(field_list:tunnelbroker.SendRequest.blobHashes) - return blobhashes_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -SendRequest::mutable_blobhashes() { - // @@protoc_insertion_point(field_mutable_list:tunnelbroker.SendRequest.blobHashes) - return &blobhashes_; -} - -// ------------------------------------------------------------------- - -// GetRequest - -// string sessionID = 1; -inline void GetRequest::clear_sessionid() { - sessionid_.ClearToEmpty(); -} -inline const std::string& GetRequest::sessionid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetRequest.sessionID) - return _internal_sessionid(); -} -inline void GetRequest::set_sessionid(const std::string& value) { - _internal_set_sessionid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.GetRequest.sessionID) -} -inline std::string* GetRequest::mutable_sessionid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetRequest.sessionID) - return _internal_mutable_sessionid(); -} -inline const std::string& GetRequest::_internal_sessionid() const { - return sessionid_.Get(); -} -inline void GetRequest::_internal_set_sessionid(const std::string& value) { - - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void GetRequest::set_sessionid(std::string&& value) { - - sessionid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetRequest.sessionID) -} -inline void GetRequest::set_sessionid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.GetRequest.sessionID) -} -inline void GetRequest::set_sessionid(const char* value, - size_t size) { - - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetRequest.sessionID) -} -inline std::string* GetRequest::_internal_mutable_sessionid() { - - return sessionid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* GetRequest::release_sessionid() { - // @@protoc_insertion_point(field_release:tunnelbroker.GetRequest.sessionID) - return sessionid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void GetRequest::set_allocated_sessionid(std::string* sessionid) { - if (sessionid != nullptr) { - - } else { - - } - sessionid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sessionid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetRequest.sessionID) -} - -// ------------------------------------------------------------------- - -// GetResponse - -// string fromDeviceID = 1; -inline void GetResponse::clear_fromdeviceid() { - fromdeviceid_.ClearToEmpty(); -} -inline const std::string& GetResponse::fromdeviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.fromDeviceID) - return _internal_fromdeviceid(); -} -inline void GetResponse::set_fromdeviceid(const std::string& value) { - _internal_set_fromdeviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.GetResponse.fromDeviceID) -} -inline std::string* GetResponse::mutable_fromdeviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.fromDeviceID) - return _internal_mutable_fromdeviceid(); -} -inline const std::string& GetResponse::_internal_fromdeviceid() const { - return fromdeviceid_.Get(); -} -inline void GetResponse::_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) { - - fromdeviceid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetResponse.fromDeviceID) -} -inline void GetResponse::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) -} -inline void GetResponse::set_fromdeviceid(const char* value, - size_t size) { - - fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponse.fromDeviceID) -} -inline std::string* GetResponse::_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) - return fromdeviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void GetResponse::set_allocated_fromdeviceid(std::string* fromdeviceid) { - if (fromdeviceid != nullptr) { - - } else { - - } - fromdeviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), fromdeviceid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponse.fromDeviceID) -} - -// bytes payload = 2; -inline void GetResponse::clear_payload() { - payload_.ClearToEmpty(); -} -inline const std::string& GetResponse::payload() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.payload) - return _internal_payload(); -} -inline void GetResponse::set_payload(const std::string& value) { - _internal_set_payload(value); - // @@protoc_insertion_point(field_set:tunnelbroker.GetResponse.payload) -} -inline std::string* GetResponse::mutable_payload() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.payload) - return _internal_mutable_payload(); -} -inline const std::string& GetResponse::_internal_payload() const { - return payload_.Get(); -} -inline void GetResponse::_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) { - - payload_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetResponse.payload) -} -inline void GetResponse::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) -} -inline void GetResponse::set_payload(const void* value, - size_t size) { - - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponse.payload) -} -inline std::string* GetResponse::_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) - return payload_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void GetResponse::set_allocated_payload(std::string* payload) { - if (payload != nullptr) { - - } else { - - } - payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponse.payload) -} - -// repeated string blobHashes = 3; -inline int GetResponse::_internal_blobhashes_size() const { - return blobhashes_.size(); -} -inline int GetResponse::blobhashes_size() const { - return _internal_blobhashes_size(); -} -inline void GetResponse::clear_blobhashes() { - blobhashes_.Clear(); -} -inline std::string* GetResponse::add_blobhashes() { - // @@protoc_insertion_point(field_add_mutable:tunnelbroker.GetResponse.blobHashes) - return _internal_add_blobhashes(); -} -inline const std::string& GetResponse::_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) - return _internal_blobhashes(index); -} -inline std::string* GetResponse::mutable_blobhashes(int index) { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.blobHashes) - return blobhashes_.Mutable(index); -} -inline void GetResponse::set_blobhashes(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.GetResponse.blobHashes) - blobhashes_.Mutable(index)->assign(value); -} -inline void GetResponse::set_blobhashes(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.GetResponse.blobHashes) - blobhashes_.Mutable(index)->assign(std::move(value)); -} -inline void GetResponse::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) -} -inline void GetResponse::set_blobhashes(int index, const char* value, size_t size) { - blobhashes_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponse.blobHashes) -} -inline std::string* GetResponse::_internal_add_blobhashes() { - return blobhashes_.Add(); -} -inline void GetResponse::add_blobhashes(const std::string& value) { - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tunnelbroker.GetResponse.blobHashes) -} -inline void GetResponse::add_blobhashes(std::string&& value) { - blobhashes_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tunnelbroker.GetResponse.blobHashes) -} -inline void GetResponse::add_blobhashes(const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tunnelbroker.GetResponse.blobHashes) -} -inline void GetResponse::add_blobhashes(const char* value, size_t size) { - blobhashes_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tunnelbroker.GetResponse.blobHashes) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -GetResponse::blobhashes() const { - // @@protoc_insertion_point(field_list:tunnelbroker.GetResponse.blobHashes) - return blobhashes_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -GetResponse::mutable_blobhashes() { - // @@protoc_insertion_point(field_mutable_list:tunnelbroker.GetResponse.blobHashes) - return &blobhashes_; -} - -// ------------------------------------------------------------------- - -// OutboundMessage - -// string toDeviceID = 1; -inline void OutboundMessage::clear_todeviceid() { - todeviceid_.ClearToEmpty(); -} -inline const std::string& OutboundMessage::todeviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.OutboundMessage.toDeviceID) - return _internal_todeviceid(); -} -inline void OutboundMessage::set_todeviceid(const std::string& value) { - _internal_set_todeviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.OutboundMessage.toDeviceID) -} -inline std::string* OutboundMessage::mutable_todeviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.OutboundMessage.toDeviceID) - return _internal_mutable_todeviceid(); -} -inline const std::string& OutboundMessage::_internal_todeviceid() const { - return todeviceid_.Get(); -} -inline void OutboundMessage::_internal_set_todeviceid(const std::string& value) { - - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void OutboundMessage::set_todeviceid(std::string&& value) { - - todeviceid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.OutboundMessage.toDeviceID) -} -inline void OutboundMessage::set_todeviceid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.OutboundMessage.toDeviceID) -} -inline void OutboundMessage::set_todeviceid(const char* value, - size_t size) { - - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.OutboundMessage.toDeviceID) -} -inline std::string* OutboundMessage::_internal_mutable_todeviceid() { - - return todeviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* OutboundMessage::release_todeviceid() { - // @@protoc_insertion_point(field_release:tunnelbroker.OutboundMessage.toDeviceID) - return todeviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void OutboundMessage::set_allocated_todeviceid(std::string* todeviceid) { - if (todeviceid != nullptr) { - - } else { - - } - todeviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), todeviceid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.OutboundMessage.toDeviceID) -} - -// string payload = 2; -inline void OutboundMessage::clear_payload() { - payload_.ClearToEmpty(); -} -inline const std::string& OutboundMessage::payload() const { - // @@protoc_insertion_point(field_get:tunnelbroker.OutboundMessage.payload) - return _internal_payload(); -} -inline void OutboundMessage::set_payload(const std::string& value) { - _internal_set_payload(value); - // @@protoc_insertion_point(field_set:tunnelbroker.OutboundMessage.payload) -} -inline std::string* OutboundMessage::mutable_payload() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.OutboundMessage.payload) - return _internal_mutable_payload(); -} -inline const std::string& OutboundMessage::_internal_payload() const { - return payload_.Get(); -} -inline void OutboundMessage::_internal_set_payload(const std::string& value) { - - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void OutboundMessage::set_payload(std::string&& value) { - - payload_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.OutboundMessage.payload) -} -inline void OutboundMessage::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.OutboundMessage.payload) -} -inline void OutboundMessage::set_payload(const char* value, - size_t size) { - - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.OutboundMessage.payload) -} -inline std::string* OutboundMessage::_internal_mutable_payload() { - - return payload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* OutboundMessage::release_payload() { - // @@protoc_insertion_point(field_release:tunnelbroker.OutboundMessage.payload) - return payload_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void OutboundMessage::set_allocated_payload(std::string* payload) { - if (payload != nullptr) { - - } else { - - } - payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.OutboundMessage.payload) -} - -// repeated string blobHashes = 3; -inline int OutboundMessage::_internal_blobhashes_size() const { - return blobhashes_.size(); -} -inline int OutboundMessage::blobhashes_size() const { - return _internal_blobhashes_size(); -} -inline void OutboundMessage::clear_blobhashes() { - blobhashes_.Clear(); -} -inline std::string* OutboundMessage::add_blobhashes() { - // @@protoc_insertion_point(field_add_mutable:tunnelbroker.OutboundMessage.blobHashes) - return _internal_add_blobhashes(); -} -inline const std::string& OutboundMessage::_internal_blobhashes(int index) const { - return blobhashes_.Get(index); -} -inline const std::string& OutboundMessage::blobhashes(int index) const { - // @@protoc_insertion_point(field_get:tunnelbroker.OutboundMessage.blobHashes) - return _internal_blobhashes(index); -} -inline std::string* OutboundMessage::mutable_blobhashes(int index) { - // @@protoc_insertion_point(field_mutable:tunnelbroker.OutboundMessage.blobHashes) - return blobhashes_.Mutable(index); -} -inline void OutboundMessage::set_blobhashes(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.OutboundMessage.blobHashes) - blobhashes_.Mutable(index)->assign(value); -} -inline void OutboundMessage::set_blobhashes(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.OutboundMessage.blobHashes) - blobhashes_.Mutable(index)->assign(std::move(value)); -} -inline void OutboundMessage::set_blobhashes(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tunnelbroker.OutboundMessage.blobHashes) -} -inline void OutboundMessage::set_blobhashes(int index, const char* value, size_t size) { - blobhashes_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.OutboundMessage.blobHashes) -} -inline std::string* OutboundMessage::_internal_add_blobhashes() { - return blobhashes_.Add(); -} -inline void OutboundMessage::add_blobhashes(const std::string& value) { - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tunnelbroker.OutboundMessage.blobHashes) -} -inline void OutboundMessage::add_blobhashes(std::string&& value) { - blobhashes_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tunnelbroker.OutboundMessage.blobHashes) -} -inline void OutboundMessage::add_blobhashes(const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tunnelbroker.OutboundMessage.blobHashes) -} -inline void OutboundMessage::add_blobhashes(const char* value, size_t size) { - blobhashes_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tunnelbroker.OutboundMessage.blobHashes) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -OutboundMessage::blobhashes() const { - // @@protoc_insertion_point(field_list:tunnelbroker.OutboundMessage.blobHashes) - return blobhashes_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -OutboundMessage::mutable_blobhashes() { - // @@protoc_insertion_point(field_mutable_list:tunnelbroker.OutboundMessage.blobHashes) - return &blobhashes_; -} - -// ------------------------------------------------------------------- - -// InboundMessage - -// string fromDeviceID = 1; -inline void InboundMessage::clear_fromdeviceid() { - fromdeviceid_.ClearToEmpty(); -} -inline const std::string& InboundMessage::fromdeviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.InboundMessage.fromDeviceID) - return _internal_fromdeviceid(); -} -inline void InboundMessage::set_fromdeviceid(const std::string& value) { - _internal_set_fromdeviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.InboundMessage.fromDeviceID) -} -inline std::string* InboundMessage::mutable_fromdeviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.InboundMessage.fromDeviceID) - return _internal_mutable_fromdeviceid(); -} -inline const std::string& InboundMessage::_internal_fromdeviceid() const { - return fromdeviceid_.Get(); -} -inline void InboundMessage::_internal_set_fromdeviceid(const std::string& value) { - - fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void InboundMessage::set_fromdeviceid(std::string&& value) { - - fromdeviceid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.InboundMessage.fromDeviceID) -} -inline void InboundMessage::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.InboundMessage.fromDeviceID) -} -inline void InboundMessage::set_fromdeviceid(const char* value, - size_t size) { - - fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.InboundMessage.fromDeviceID) -} -inline std::string* InboundMessage::_internal_mutable_fromdeviceid() { - - return fromdeviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* InboundMessage::release_fromdeviceid() { - // @@protoc_insertion_point(field_release:tunnelbroker.InboundMessage.fromDeviceID) - return fromdeviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void InboundMessage::set_allocated_fromdeviceid(std::string* fromdeviceid) { - if (fromdeviceid != nullptr) { - - } else { - - } - fromdeviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), fromdeviceid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.InboundMessage.fromDeviceID) -} - -// string fromConnectionID = 2; -inline void InboundMessage::clear_fromconnectionid() { - fromconnectionid_.ClearToEmpty(); -} -inline const std::string& InboundMessage::fromconnectionid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.InboundMessage.fromConnectionID) - return _internal_fromconnectionid(); -} -inline void InboundMessage::set_fromconnectionid(const std::string& value) { - _internal_set_fromconnectionid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.InboundMessage.fromConnectionID) -} -inline std::string* InboundMessage::mutable_fromconnectionid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.InboundMessage.fromConnectionID) - return _internal_mutable_fromconnectionid(); -} -inline const std::string& InboundMessage::_internal_fromconnectionid() const { - return fromconnectionid_.Get(); -} -inline void InboundMessage::_internal_set_fromconnectionid(const std::string& value) { - - fromconnectionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void InboundMessage::set_fromconnectionid(std::string&& value) { - - fromconnectionid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.InboundMessage.fromConnectionID) -} -inline void InboundMessage::set_fromconnectionid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - fromconnectionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.InboundMessage.fromConnectionID) -} -inline void InboundMessage::set_fromconnectionid(const char* value, - size_t size) { - - fromconnectionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.InboundMessage.fromConnectionID) -} -inline std::string* InboundMessage::_internal_mutable_fromconnectionid() { - - return fromconnectionid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* InboundMessage::release_fromconnectionid() { - // @@protoc_insertion_point(field_release:tunnelbroker.InboundMessage.fromConnectionID) - return fromconnectionid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void InboundMessage::set_allocated_fromconnectionid(std::string* fromconnectionid) { - if (fromconnectionid != nullptr) { - - } else { - - } - fromconnectionid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), fromconnectionid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.InboundMessage.fromConnectionID) -} - -// string payload = 3; -inline void InboundMessage::clear_payload() { - payload_.ClearToEmpty(); -} -inline const std::string& InboundMessage::payload() const { - // @@protoc_insertion_point(field_get:tunnelbroker.InboundMessage.payload) - return _internal_payload(); -} -inline void InboundMessage::set_payload(const std::string& value) { - _internal_set_payload(value); - // @@protoc_insertion_point(field_set:tunnelbroker.InboundMessage.payload) -} -inline std::string* InboundMessage::mutable_payload() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.InboundMessage.payload) - return _internal_mutable_payload(); -} -inline const std::string& InboundMessage::_internal_payload() const { - return payload_.Get(); -} -inline void InboundMessage::_internal_set_payload(const std::string& value) { - - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void InboundMessage::set_payload(std::string&& value) { - - payload_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.InboundMessage.payload) -} -inline void InboundMessage::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.InboundMessage.payload) -} -inline void InboundMessage::set_payload(const char* value, - size_t size) { - - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.InboundMessage.payload) -} -inline std::string* InboundMessage::_internal_mutable_payload() { - - return payload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* InboundMessage::release_payload() { - // @@protoc_insertion_point(field_release:tunnelbroker.InboundMessage.payload) - return payload_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void InboundMessage::set_allocated_payload(std::string* payload) { - if (payload != nullptr) { - - } else { - - } - payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.InboundMessage.payload) -} - -// repeated string blobHashes = 4; -inline int InboundMessage::_internal_blobhashes_size() const { - return blobhashes_.size(); -} -inline int InboundMessage::blobhashes_size() const { - return _internal_blobhashes_size(); -} -inline void InboundMessage::clear_blobhashes() { - blobhashes_.Clear(); -} -inline std::string* InboundMessage::add_blobhashes() { - // @@protoc_insertion_point(field_add_mutable:tunnelbroker.InboundMessage.blobHashes) - return _internal_add_blobhashes(); -} -inline const std::string& InboundMessage::_internal_blobhashes(int index) const { - return blobhashes_.Get(index); -} -inline const std::string& InboundMessage::blobhashes(int index) const { - // @@protoc_insertion_point(field_get:tunnelbroker.InboundMessage.blobHashes) - return _internal_blobhashes(index); -} -inline std::string* InboundMessage::mutable_blobhashes(int index) { - // @@protoc_insertion_point(field_mutable:tunnelbroker.InboundMessage.blobHashes) - return blobhashes_.Mutable(index); -} -inline void InboundMessage::set_blobhashes(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.InboundMessage.blobHashes) - blobhashes_.Mutable(index)->assign(value); -} -inline void InboundMessage::set_blobhashes(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.InboundMessage.blobHashes) - blobhashes_.Mutable(index)->assign(std::move(value)); -} -inline void InboundMessage::set_blobhashes(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tunnelbroker.InboundMessage.blobHashes) -} -inline void InboundMessage::set_blobhashes(int index, const char* value, size_t size) { - blobhashes_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.InboundMessage.blobHashes) -} -inline std::string* InboundMessage::_internal_add_blobhashes() { - return blobhashes_.Add(); -} -inline void InboundMessage::add_blobhashes(const std::string& value) { - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tunnelbroker.InboundMessage.blobHashes) -} -inline void InboundMessage::add_blobhashes(std::string&& value) { - blobhashes_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tunnelbroker.InboundMessage.blobHashes) -} -inline void InboundMessage::add_blobhashes(const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tunnelbroker.InboundMessage.blobHashes) -} -inline void InboundMessage::add_blobhashes(const char* value, size_t size) { - blobhashes_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tunnelbroker.InboundMessage.blobHashes) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -InboundMessage::blobhashes() const { - // @@protoc_insertion_point(field_list:tunnelbroker.InboundMessage.blobHashes) - return blobhashes_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -InboundMessage::mutable_blobhashes() { - // @@protoc_insertion_point(field_mutable_list:tunnelbroker.InboundMessage.blobHashes) - return &blobhashes_; -} - -// ------------------------------------------------------------------- - -// CheckRequest - -// string userId = 1; -inline void CheckRequest::clear_userid() { - userid_.ClearToEmpty(); -} -inline const std::string& CheckRequest::userid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.CheckRequest.userId) - return _internal_userid(); -} -inline void CheckRequest::set_userid(const std::string& value) { - _internal_set_userid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.CheckRequest.userId) -} -inline std::string* CheckRequest::mutable_userid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.CheckRequest.userId) - return _internal_mutable_userid(); -} -inline const std::string& CheckRequest::_internal_userid() const { - return userid_.Get(); -} -inline void CheckRequest::_internal_set_userid(const std::string& value) { - - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void CheckRequest::set_userid(std::string&& value) { - - userid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.CheckRequest.userId) -} -inline void CheckRequest::set_userid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.CheckRequest.userId) -} -inline void CheckRequest::set_userid(const char* value, - size_t size) { - - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.CheckRequest.userId) -} -inline std::string* CheckRequest::_internal_mutable_userid() { - - return userid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* CheckRequest::release_userid() { - // @@protoc_insertion_point(field_release:tunnelbroker.CheckRequest.userId) - return userid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void CheckRequest::set_allocated_userid(std::string* userid) { - if (userid != nullptr) { - - } else { - - } - userid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), userid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.CheckRequest.userId) -} - -// string deviceToken = 2; -inline void CheckRequest::clear_devicetoken() { - devicetoken_.ClearToEmpty(); -} -inline const std::string& CheckRequest::devicetoken() const { - // @@protoc_insertion_point(field_get:tunnelbroker.CheckRequest.deviceToken) - return _internal_devicetoken(); -} -inline void CheckRequest::set_devicetoken(const std::string& value) { - _internal_set_devicetoken(value); - // @@protoc_insertion_point(field_set:tunnelbroker.CheckRequest.deviceToken) -} -inline std::string* CheckRequest::mutable_devicetoken() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.CheckRequest.deviceToken) - return _internal_mutable_devicetoken(); -} -inline const std::string& CheckRequest::_internal_devicetoken() const { - return devicetoken_.Get(); -} -inline void CheckRequest::_internal_set_devicetoken(const std::string& value) { - - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void CheckRequest::set_devicetoken(std::string&& value) { - - devicetoken_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.CheckRequest.deviceToken) -} -inline void CheckRequest::set_devicetoken(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.CheckRequest.deviceToken) -} -inline void CheckRequest::set_devicetoken(const char* value, - size_t size) { - - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.CheckRequest.deviceToken) -} -inline std::string* CheckRequest::_internal_mutable_devicetoken() { - - return devicetoken_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* CheckRequest::release_devicetoken() { - // @@protoc_insertion_point(field_release:tunnelbroker.CheckRequest.deviceToken) - return devicetoken_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void CheckRequest::set_allocated_devicetoken(std::string* devicetoken) { - if (devicetoken != nullptr) { - - } else { - - } - devicetoken_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), devicetoken, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.CheckRequest.deviceToken) -} - -// ------------------------------------------------------------------- - -// CheckResponse - -// .tunnelbroker.CheckResponseType checkResponseType = 1; -inline void CheckResponse::clear_checkresponsetype() { - checkresponsetype_ = 0; -} -inline ::tunnelbroker::CheckResponseType CheckResponse::_internal_checkresponsetype() const { - return static_cast< ::tunnelbroker::CheckResponseType >(checkresponsetype_); -} -inline ::tunnelbroker::CheckResponseType CheckResponse::checkresponsetype() const { - // @@protoc_insertion_point(field_get:tunnelbroker.CheckResponse.checkResponseType) - return _internal_checkresponsetype(); -} -inline void CheckResponse::_internal_set_checkresponsetype(::tunnelbroker::CheckResponseType value) { - - checkresponsetype_ = value; -} -inline void CheckResponse::set_checkresponsetype(::tunnelbroker::CheckResponseType value) { - _internal_set_checkresponsetype(value); - // @@protoc_insertion_point(field_set:tunnelbroker.CheckResponse.checkResponseType) -} - -// ------------------------------------------------------------------- - -// NewPrimaryRequest - -// string userId = 1; -inline void NewPrimaryRequest::clear_userid() { - userid_.ClearToEmpty(); -} -inline const std::string& NewPrimaryRequest::userid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewPrimaryRequest.userId) - return _internal_userid(); -} -inline void NewPrimaryRequest::set_userid(const std::string& value) { - _internal_set_userid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewPrimaryRequest.userId) -} -inline std::string* NewPrimaryRequest::mutable_userid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewPrimaryRequest.userId) - return _internal_mutable_userid(); -} -inline const std::string& NewPrimaryRequest::_internal_userid() const { - return userid_.Get(); -} -inline void NewPrimaryRequest::_internal_set_userid(const std::string& value) { - - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewPrimaryRequest::set_userid(std::string&& value) { - - userid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewPrimaryRequest.userId) -} -inline void NewPrimaryRequest::set_userid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewPrimaryRequest.userId) -} -inline void NewPrimaryRequest::set_userid(const char* value, - size_t size) { - - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewPrimaryRequest.userId) -} -inline std::string* NewPrimaryRequest::_internal_mutable_userid() { - - return userid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewPrimaryRequest::release_userid() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewPrimaryRequest.userId) - return userid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewPrimaryRequest::set_allocated_userid(std::string* userid) { - if (userid != nullptr) { - - } else { - - } - userid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), userid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewPrimaryRequest.userId) -} - -// string deviceToken = 2; -inline void NewPrimaryRequest::clear_devicetoken() { - devicetoken_.ClearToEmpty(); -} -inline const std::string& NewPrimaryRequest::devicetoken() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewPrimaryRequest.deviceToken) - return _internal_devicetoken(); -} -inline void NewPrimaryRequest::set_devicetoken(const std::string& value) { - _internal_set_devicetoken(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewPrimaryRequest.deviceToken) -} -inline std::string* NewPrimaryRequest::mutable_devicetoken() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewPrimaryRequest.deviceToken) - return _internal_mutable_devicetoken(); -} -inline const std::string& NewPrimaryRequest::_internal_devicetoken() const { - return devicetoken_.Get(); -} -inline void NewPrimaryRequest::_internal_set_devicetoken(const std::string& value) { - - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewPrimaryRequest::set_devicetoken(std::string&& value) { - - devicetoken_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewPrimaryRequest.deviceToken) -} -inline void NewPrimaryRequest::set_devicetoken(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewPrimaryRequest.deviceToken) -} -inline void NewPrimaryRequest::set_devicetoken(const char* value, - size_t size) { - - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewPrimaryRequest.deviceToken) -} -inline std::string* NewPrimaryRequest::_internal_mutable_devicetoken() { - - return devicetoken_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewPrimaryRequest::release_devicetoken() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewPrimaryRequest.deviceToken) - return devicetoken_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewPrimaryRequest::set_allocated_devicetoken(std::string* devicetoken) { - if (devicetoken != nullptr) { - - } else { - - } - devicetoken_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), devicetoken, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewPrimaryRequest.deviceToken) -} - -// ------------------------------------------------------------------- - -// NewPrimaryResponse - -// bool success = 1; -inline void NewPrimaryResponse::clear_success() { - success_ = false; -} -inline bool NewPrimaryResponse::_internal_success() const { - return success_; -} -inline bool NewPrimaryResponse::success() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewPrimaryResponse.success) - return _internal_success(); -} -inline void NewPrimaryResponse::_internal_set_success(bool value) { - - success_ = value; -} -inline void NewPrimaryResponse::set_success(bool value) { - _internal_set_success(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewPrimaryResponse.success) -} - -// ------------------------------------------------------------------- - -// PongRequest - -// string userId = 1; -inline void PongRequest::clear_userid() { - userid_.ClearToEmpty(); -} -inline const std::string& PongRequest::userid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.PongRequest.userId) - return _internal_userid(); -} -inline void PongRequest::set_userid(const std::string& value) { - _internal_set_userid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.PongRequest.userId) -} -inline std::string* PongRequest::mutable_userid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.PongRequest.userId) - return _internal_mutable_userid(); -} -inline const std::string& PongRequest::_internal_userid() const { - return userid_.Get(); -} -inline void PongRequest::_internal_set_userid(const std::string& value) { - - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void PongRequest::set_userid(std::string&& value) { - - userid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.PongRequest.userId) -} -inline void PongRequest::set_userid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.PongRequest.userId) -} -inline void PongRequest::set_userid(const char* value, - size_t size) { - - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.PongRequest.userId) -} -inline std::string* PongRequest::_internal_mutable_userid() { - - return userid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* PongRequest::release_userid() { - // @@protoc_insertion_point(field_release:tunnelbroker.PongRequest.userId) - return userid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void PongRequest::set_allocated_userid(std::string* userid) { - if (userid != nullptr) { - - } else { - - } - userid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), userid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.PongRequest.userId) -} - -// string deviceToken = 2; -inline void PongRequest::clear_devicetoken() { - devicetoken_.ClearToEmpty(); -} -inline const std::string& PongRequest::devicetoken() const { - // @@protoc_insertion_point(field_get:tunnelbroker.PongRequest.deviceToken) - return _internal_devicetoken(); -} -inline void PongRequest::set_devicetoken(const std::string& value) { - _internal_set_devicetoken(value); - // @@protoc_insertion_point(field_set:tunnelbroker.PongRequest.deviceToken) -} -inline std::string* PongRequest::mutable_devicetoken() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.PongRequest.deviceToken) - return _internal_mutable_devicetoken(); -} -inline const std::string& PongRequest::_internal_devicetoken() const { - return devicetoken_.Get(); -} -inline void PongRequest::_internal_set_devicetoken(const std::string& value) { - - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void PongRequest::set_devicetoken(std::string&& value) { - - devicetoken_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.PongRequest.deviceToken) -} -inline void PongRequest::set_devicetoken(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.PongRequest.deviceToken) -} -inline void PongRequest::set_devicetoken(const char* value, - size_t size) { - - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.PongRequest.deviceToken) -} -inline std::string* PongRequest::_internal_mutable_devicetoken() { - - return devicetoken_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* PongRequest::release_devicetoken() { - // @@protoc_insertion_point(field_release:tunnelbroker.PongRequest.deviceToken) - return devicetoken_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void PongRequest::set_allocated_devicetoken(std::string* devicetoken) { - if (devicetoken != nullptr) { - - } else { - - } - devicetoken_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), devicetoken, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.PongRequest.deviceToken) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace tunnelbroker - -PROTOBUF_NAMESPACE_OPEN - -template <> struct is_proto_enum< ::tunnelbroker::NewSessionRequest_DeviceTypes> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::tunnelbroker::NewSessionRequest_DeviceTypes>() { - return ::tunnelbroker::NewSessionRequest_DeviceTypes_descriptor(); -} -template <> struct is_proto_enum< ::tunnelbroker::CheckResponseType> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::tunnelbroker::CheckResponseType>() { - return ::tunnelbroker::CheckResponseType_descriptor(); -} - -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tunnelbroker_2eproto diff --git a/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.pb.cc b/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.pb.cc deleted file mode 100644 --- a/native/cpp/CommonCpp/grpc/_generated/tunnelbroker.pb.cc +++ /dev/null @@ -1,4005 +0,0 @@ -// @generated by the protocol buffer compiler. DO NOT EDIT! -// source: tunnelbroker.proto - -#include "tunnelbroker.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG -namespace tunnelbroker { -constexpr SessionSignatureRequest::SessionSignatureRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : deviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct SessionSignatureRequestDefaultTypeInternal { - constexpr SessionSignatureRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~SessionSignatureRequestDefaultTypeInternal() {} - union { - SessionSignatureRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SessionSignatureRequestDefaultTypeInternal _SessionSignatureRequest_default_instance_; -constexpr SessionSignatureResponse::SessionSignatureResponse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : tosign_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct SessionSignatureResponseDefaultTypeInternal { - constexpr SessionSignatureResponseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~SessionSignatureResponseDefaultTypeInternal() {} - union { - SessionSignatureResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SessionSignatureResponseDefaultTypeInternal _SessionSignatureResponse_default_instance_; -constexpr NewSessionRequest::NewSessionRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : deviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , publickey_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , notifytoken_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , deviceappversion_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , deviceos_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , devicetype_(0) -{} -struct NewSessionRequestDefaultTypeInternal { - constexpr NewSessionRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~NewSessionRequestDefaultTypeInternal() {} - union { - NewSessionRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NewSessionRequestDefaultTypeInternal _NewSessionRequest_default_instance_; -constexpr NewSessionResponse::NewSessionResponse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : sessionid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct NewSessionResponseDefaultTypeInternal { - constexpr NewSessionResponseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~NewSessionResponseDefaultTypeInternal() {} - union { - NewSessionResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NewSessionResponseDefaultTypeInternal _NewSessionResponse_default_instance_; -constexpr SendRequest::SendRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : blobhashes_() - , sessionid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , todeviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , payload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct SendRequestDefaultTypeInternal { - constexpr SendRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~SendRequestDefaultTypeInternal() {} - union { - SendRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SendRequestDefaultTypeInternal _SendRequest_default_instance_; -constexpr GetRequest::GetRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : sessionid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct GetRequestDefaultTypeInternal { - constexpr GetRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~GetRequestDefaultTypeInternal() {} - union { - GetRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetRequestDefaultTypeInternal _GetRequest_default_instance_; -constexpr GetResponse::GetResponse( - ::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 GetResponseDefaultTypeInternal { - constexpr GetResponseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~GetResponseDefaultTypeInternal() {} - union { - GetResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetResponseDefaultTypeInternal _GetResponse_default_instance_; -constexpr OutboundMessage::OutboundMessage( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : blobhashes_() - , todeviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , payload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct OutboundMessageDefaultTypeInternal { - constexpr OutboundMessageDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~OutboundMessageDefaultTypeInternal() {} - union { - OutboundMessage _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OutboundMessageDefaultTypeInternal _OutboundMessage_default_instance_; -constexpr InboundMessage::InboundMessage( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : blobhashes_() - , fromdeviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , fromconnectionid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , payload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct InboundMessageDefaultTypeInternal { - constexpr InboundMessageDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~InboundMessageDefaultTypeInternal() {} - union { - InboundMessage _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InboundMessageDefaultTypeInternal _InboundMessage_default_instance_; -constexpr CheckRequest::CheckRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : userid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , devicetoken_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct CheckRequestDefaultTypeInternal { - constexpr CheckRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~CheckRequestDefaultTypeInternal() {} - union { - CheckRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT CheckRequestDefaultTypeInternal _CheckRequest_default_instance_; -constexpr CheckResponse::CheckResponse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : checkresponsetype_(0) -{} -struct CheckResponseDefaultTypeInternal { - constexpr CheckResponseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~CheckResponseDefaultTypeInternal() {} - union { - CheckResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT CheckResponseDefaultTypeInternal _CheckResponse_default_instance_; -constexpr NewPrimaryRequest::NewPrimaryRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : userid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , devicetoken_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct NewPrimaryRequestDefaultTypeInternal { - constexpr NewPrimaryRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~NewPrimaryRequestDefaultTypeInternal() {} - union { - NewPrimaryRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NewPrimaryRequestDefaultTypeInternal _NewPrimaryRequest_default_instance_; -constexpr NewPrimaryResponse::NewPrimaryResponse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : success_(false){} -struct NewPrimaryResponseDefaultTypeInternal { - constexpr NewPrimaryResponseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~NewPrimaryResponseDefaultTypeInternal() {} - union { - NewPrimaryResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NewPrimaryResponseDefaultTypeInternal _NewPrimaryResponse_default_instance_; -constexpr PongRequest::PongRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : userid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , devicetoken_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct PongRequestDefaultTypeInternal { - constexpr PongRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~PongRequestDefaultTypeInternal() {} - union { - PongRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PongRequestDefaultTypeInternal _PongRequest_default_instance_; -} // namespace tunnelbroker -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tunnelbroker_2eproto[14]; -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; - -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tunnelbroker_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SessionSignatureRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SessionSignatureRequest, deviceid_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SessionSignatureResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SessionSignatureResponse, tosign_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, _has_bits_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, deviceid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, publickey_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, signature_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, notifytoken_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, devicetype_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, deviceappversion_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, deviceos_), - ~0u, - ~0u, - ~0u, - 0, - ~0u, - ~0u, - ~0u, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionResponse, sessionid_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, sessionid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, todeviceid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, payload_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, blobhashes_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetRequest, sessionid_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, _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_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::OutboundMessage, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::OutboundMessage, todeviceid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::OutboundMessage, payload_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::OutboundMessage, blobhashes_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::InboundMessage, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::InboundMessage, fromdeviceid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::InboundMessage, fromconnectionid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::InboundMessage, payload_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::InboundMessage, blobhashes_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::CheckRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::CheckRequest, userid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::CheckRequest, devicetoken_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::CheckResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::CheckResponse, checkresponsetype_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewPrimaryRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewPrimaryRequest, userid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewPrimaryRequest, devicetoken_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewPrimaryResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewPrimaryResponse, success_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::PongRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::PongRequest, userid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::PongRequest, devicetoken_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::tunnelbroker::SessionSignatureRequest)}, - { 6, -1, sizeof(::tunnelbroker::SessionSignatureResponse)}, - { 12, 24, sizeof(::tunnelbroker::NewSessionRequest)}, - { 31, -1, sizeof(::tunnelbroker::NewSessionResponse)}, - { 37, -1, sizeof(::tunnelbroker::SendRequest)}, - { 46, -1, sizeof(::tunnelbroker::GetRequest)}, - { 52, -1, sizeof(::tunnelbroker::GetResponse)}, - { 60, -1, sizeof(::tunnelbroker::OutboundMessage)}, - { 68, -1, sizeof(::tunnelbroker::InboundMessage)}, - { 77, -1, sizeof(::tunnelbroker::CheckRequest)}, - { 84, -1, sizeof(::tunnelbroker::CheckResponse)}, - { 90, -1, sizeof(::tunnelbroker::NewPrimaryRequest)}, - { 97, -1, sizeof(::tunnelbroker::NewPrimaryResponse)}, - { 103, -1, sizeof(::tunnelbroker::PongRequest)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::tunnelbroker::_SessionSignatureRequest_default_instance_), - reinterpret_cast(&::tunnelbroker::_SessionSignatureResponse_default_instance_), - reinterpret_cast(&::tunnelbroker::_NewSessionRequest_default_instance_), - reinterpret_cast(&::tunnelbroker::_NewSessionResponse_default_instance_), - reinterpret_cast(&::tunnelbroker::_SendRequest_default_instance_), - reinterpret_cast(&::tunnelbroker::_GetRequest_default_instance_), - reinterpret_cast(&::tunnelbroker::_GetResponse_default_instance_), - reinterpret_cast(&::tunnelbroker::_OutboundMessage_default_instance_), - reinterpret_cast(&::tunnelbroker::_InboundMessage_default_instance_), - reinterpret_cast(&::tunnelbroker::_CheckRequest_default_instance_), - reinterpret_cast(&::tunnelbroker::_CheckResponse_default_instance_), - reinterpret_cast(&::tunnelbroker::_NewPrimaryRequest_default_instance_), - reinterpret_cast(&::tunnelbroker::_NewPrimaryResponse_default_instance_), - reinterpret_cast(&::tunnelbroker::_PongRequest_default_instance_), -}; - -const char descriptor_table_protodef_tunnelbroker_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\022tunnelbroker.proto\022\014tunnelbroker\032\033goog" - "le/protobuf/empty.proto\"+\n\027SessionSignat" - "ureRequest\022\020\n\010deviceID\030\001 \001(\t\"*\n\030SessionS" - "ignatureResponse\022\016\n\006toSign\030\001 \001(\t\"\225\002\n\021New" - "SessionRequest\022\020\n\010deviceID\030\001 \001(\t\022\021\n\tpubl" - "icKey\030\002 \001(\t\022\021\n\tsignature\030\003 \001(\t\022\030\n\013notify" - "Token\030\004 \001(\tH\000\210\001\001\022\?\n\ndeviceType\030\005 \001(\0162+.t" - "unnelbroker.NewSessionRequest.DeviceType" - "s\022\030\n\020deviceAppVersion\030\006 \001(\t\022\020\n\010deviceOS\030" - "\007 \001(\t\"1\n\013DeviceTypes\022\n\n\006MOBILE\020\000\022\007\n\003WEB\020" - "\001\022\r\n\tKEYSERVER\020\002B\016\n\014_notifyToken\"\'\n\022NewS" - "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\"J\n\017Outbo" - "undMessage\022\022\n\ntoDeviceID\030\001 \001(\t\022\017\n\007payloa" - "d\030\002 \001(\t\022\022\n\nblobHashes\030\003 \003(\t\"e\n\016InboundMe" - "ssage\022\024\n\014fromDeviceID\030\001 \001(\t\022\030\n\020fromConne" - "ctionID\030\002 \001(\t\022\017\n\007payload\030\003 \001(\t\022\022\n\nblobHa" - "shes\030\004 \003(\t\"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\224\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\022O\n\nOpenStream\022\035." - "tunnelbroker.OutboundMessage\032\034.tunnelbro" - "ker.InboundMessage\"\000(\0010\001b\006proto3" - ; -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, 1912, descriptor_table_protodef_tunnelbroker_2eproto, "tunnelbroker.proto", - &descriptor_table_tunnelbroker_2eproto_once, descriptor_table_tunnelbroker_2eproto_deps, 1, 14, - 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, -}; -PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::Metadata -descriptor_table_tunnelbroker_2eproto_metadata_getter(int index) { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tunnelbroker_2eproto); - return descriptor_table_tunnelbroker_2eproto.file_level_metadata[index]; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_tunnelbroker_2eproto(&descriptor_table_tunnelbroker_2eproto); -namespace tunnelbroker { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NewSessionRequest_DeviceTypes_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tunnelbroker_2eproto); - return file_level_enum_descriptors_tunnelbroker_2eproto[0]; -} -bool NewSessionRequest_DeviceTypes_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } -} - -#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -constexpr NewSessionRequest_DeviceTypes NewSessionRequest::MOBILE; -constexpr NewSessionRequest_DeviceTypes NewSessionRequest::WEB; -constexpr NewSessionRequest_DeviceTypes NewSessionRequest::KEYSERVER; -constexpr NewSessionRequest_DeviceTypes NewSessionRequest::DeviceTypes_MIN; -constexpr NewSessionRequest_DeviceTypes NewSessionRequest::DeviceTypes_MAX; -constexpr int NewSessionRequest::DeviceTypes_ARRAYSIZE; -#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CheckResponseType_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tunnelbroker_2eproto); - return file_level_enum_descriptors_tunnelbroker_2eproto[1]; -} -bool CheckResponseType_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - case 3: - return true; - default: - return false; - } -} - - -// =================================================================== - -class SessionSignatureRequest::_Internal { - public: -}; - -SessionSignatureRequest::SessionSignatureRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.SessionSignatureRequest) -} -SessionSignatureRequest::SessionSignatureRequest(const SessionSignatureRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - deviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_deviceid().empty()) { - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_deviceid(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.SessionSignatureRequest) -} - -void SessionSignatureRequest::SharedCtor() { -deviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -SessionSignatureRequest::~SessionSignatureRequest() { - // @@protoc_insertion_point(destructor:tunnelbroker.SessionSignatureRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void SessionSignatureRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - deviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void SessionSignatureRequest::ArenaDtor(void* object) { - SessionSignatureRequest* _this = reinterpret_cast< SessionSignatureRequest* >(object); - (void)_this; -} -void SessionSignatureRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void SessionSignatureRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void SessionSignatureRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.SessionSignatureRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - deviceid_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SessionSignatureRequest::_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) { - // string deviceID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_deviceid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SessionSignatureRequest.deviceID")); - 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* SessionSignatureRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.SessionSignatureRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string deviceID = 1; - if (this->deviceid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_deviceid().data(), static_cast(this->_internal_deviceid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.SessionSignatureRequest.deviceID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_deviceid(), target); - } - - 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.SessionSignatureRequest) - return target; -} - -size_t SessionSignatureRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.SessionSignatureRequest) - 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; - - // string deviceID = 1; - if (this->deviceid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_deviceid()); - } - - 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 SessionSignatureRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.SessionSignatureRequest) - GOOGLE_DCHECK_NE(&from, this); - const SessionSignatureRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.SessionSignatureRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.SessionSignatureRequest) - MergeFrom(*source); - } -} - -void SessionSignatureRequest::MergeFrom(const SessionSignatureRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.SessionSignatureRequest) - 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; - - if (from.deviceid().size() > 0) { - _internal_set_deviceid(from._internal_deviceid()); - } -} - -void SessionSignatureRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.SessionSignatureRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void SessionSignatureRequest::CopyFrom(const SessionSignatureRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.SessionSignatureRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SessionSignatureRequest::IsInitialized() const { - return true; -} - -void SessionSignatureRequest::InternalSwap(SessionSignatureRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - deviceid_.Swap(&other->deviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SessionSignatureRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class SessionSignatureResponse::_Internal { - public: -}; - -SessionSignatureResponse::SessionSignatureResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.SessionSignatureResponse) -} -SessionSignatureResponse::SessionSignatureResponse(const SessionSignatureResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - tosign_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_tosign().empty()) { - tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_tosign(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.SessionSignatureResponse) -} - -void SessionSignatureResponse::SharedCtor() { -tosign_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -SessionSignatureResponse::~SessionSignatureResponse() { - // @@protoc_insertion_point(destructor:tunnelbroker.SessionSignatureResponse) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void SessionSignatureResponse::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - tosign_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void SessionSignatureResponse::ArenaDtor(void* object) { - SessionSignatureResponse* _this = reinterpret_cast< SessionSignatureResponse* >(object); - (void)_this; -} -void SessionSignatureResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void SessionSignatureResponse::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void SessionSignatureResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.SessionSignatureResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - tosign_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SessionSignatureResponse::_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) { - // string toSign = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_tosign(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SessionSignatureResponse.toSign")); - 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* SessionSignatureResponse::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.SessionSignatureResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string toSign = 1; - if (this->tosign().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_tosign().data(), static_cast(this->_internal_tosign().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.SessionSignatureResponse.toSign"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_tosign(), target); - } - - 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.SessionSignatureResponse) - return target; -} - -size_t SessionSignatureResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.SessionSignatureResponse) - 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; - - // string toSign = 1; - if (this->tosign().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_tosign()); - } - - 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 SessionSignatureResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.SessionSignatureResponse) - GOOGLE_DCHECK_NE(&from, this); - const SessionSignatureResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.SessionSignatureResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.SessionSignatureResponse) - MergeFrom(*source); - } -} - -void SessionSignatureResponse::MergeFrom(const SessionSignatureResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.SessionSignatureResponse) - 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; - - if (from.tosign().size() > 0) { - _internal_set_tosign(from._internal_tosign()); - } -} - -void SessionSignatureResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.SessionSignatureResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void SessionSignatureResponse::CopyFrom(const SessionSignatureResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.SessionSignatureResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SessionSignatureResponse::IsInitialized() const { - return true; -} - -void SessionSignatureResponse::InternalSwap(SessionSignatureResponse* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - tosign_.Swap(&other->tosign_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SessionSignatureResponse::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class NewSessionRequest::_Internal { - public: - using HasBits = decltype(std::declval()._has_bits_); - static void set_has_notifytoken(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -NewSessionRequest::NewSessionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.NewSessionRequest) -} -NewSessionRequest::NewSessionRequest(const NewSessionRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - deviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_deviceid().empty()) { - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_deviceid(), - GetArena()); - } - publickey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_publickey().empty()) { - publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_publickey(), - GetArena()); - } - signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_signature().empty()) { - signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), - GetArena()); - } - notifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from._internal_has_notifytoken()) { - notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_notifytoken(), - GetArena()); - } - deviceappversion_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_deviceappversion().empty()) { - deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_deviceappversion(), - GetArena()); - } - deviceos_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_deviceos().empty()) { - deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_deviceos(), - GetArena()); - } - devicetype_ = from.devicetype_; - // @@protoc_insertion_point(copy_constructor:tunnelbroker.NewSessionRequest) -} - -void NewSessionRequest::SharedCtor() { -deviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -publickey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -notifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -deviceappversion_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -deviceos_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -devicetype_ = 0; -} - -NewSessionRequest::~NewSessionRequest() { - // @@protoc_insertion_point(destructor:tunnelbroker.NewSessionRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void NewSessionRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - deviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - publickey_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - notifytoken_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - deviceappversion_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - deviceos_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void NewSessionRequest::ArenaDtor(void* object) { - NewSessionRequest* _this = reinterpret_cast< NewSessionRequest* >(object); - (void)_this; -} -void NewSessionRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void NewSessionRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void NewSessionRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.NewSessionRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - deviceid_.ClearToEmpty(); - publickey_.ClearToEmpty(); - signature_.ClearToEmpty(); - cached_has_bits = _has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - notifytoken_.ClearNonDefaultToEmpty(); - } - deviceappversion_.ClearToEmpty(); - deviceos_.ClearToEmpty(); - devicetype_ = 0; - _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* NewSessionRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string deviceID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_deviceid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.deviceID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string publicKey = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_publickey(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.publicKey")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string signature = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - auto str = _internal_mutable_signature(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.signature")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string notifyToken = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - auto str = _internal_mutable_notifytoken(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.notifyToken")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_devicetype(static_cast<::tunnelbroker::NewSessionRequest_DeviceTypes>(val)); - } else goto handle_unusual; - continue; - // string deviceAppVersion = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - auto str = _internal_mutable_deviceappversion(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.deviceAppVersion")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string deviceOS = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { - auto str = _internal_mutable_deviceos(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.deviceOS")); - 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: - _has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* NewSessionRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.NewSessionRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string deviceID = 1; - if (this->deviceid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_deviceid().data(), static_cast(this->_internal_deviceid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewSessionRequest.deviceID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_deviceid(), target); - } - - // string publicKey = 2; - if (this->publickey().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_publickey().data(), static_cast(this->_internal_publickey().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewSessionRequest.publicKey"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_publickey(), target); - } - - // string signature = 3; - if (this->signature().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_signature().data(), static_cast(this->_internal_signature().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewSessionRequest.signature"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_signature(), target); - } - - // string notifyToken = 4; - if (_internal_has_notifytoken()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_notifytoken().data(), static_cast(this->_internal_notifytoken().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewSessionRequest.notifyToken"); - target = stream->WriteStringMaybeAliased( - 4, this->_internal_notifytoken(), target); - } - - // .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; - if (this->devicetype() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 5, this->_internal_devicetype(), target); - } - - // string deviceAppVersion = 6; - if (this->deviceappversion().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_deviceappversion().data(), static_cast(this->_internal_deviceappversion().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewSessionRequest.deviceAppVersion"); - target = stream->WriteStringMaybeAliased( - 6, this->_internal_deviceappversion(), target); - } - - // string deviceOS = 7; - if (this->deviceos().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_deviceos().data(), static_cast(this->_internal_deviceos().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewSessionRequest.deviceOS"); - target = stream->WriteStringMaybeAliased( - 7, this->_internal_deviceos(), target); - } - - 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.NewSessionRequest) - return target; -} - -size_t NewSessionRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.NewSessionRequest) - 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; - - // string deviceID = 1; - if (this->deviceid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_deviceid()); - } - - // string publicKey = 2; - if (this->publickey().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_publickey()); - } - - // string signature = 3; - if (this->signature().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_signature()); - } - - // string notifyToken = 4; - cached_has_bits = _has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_notifytoken()); - } - - // string deviceAppVersion = 6; - if (this->deviceappversion().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_deviceappversion()); - } - - // string deviceOS = 7; - if (this->deviceos().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_deviceos()); - } - - // .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; - if (this->devicetype() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_devicetype()); - } - - 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 NewSessionRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.NewSessionRequest) - GOOGLE_DCHECK_NE(&from, this); - const NewSessionRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.NewSessionRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.NewSessionRequest) - MergeFrom(*source); - } -} - -void NewSessionRequest::MergeFrom(const NewSessionRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.NewSessionRequest) - 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; - - if (from.deviceid().size() > 0) { - _internal_set_deviceid(from._internal_deviceid()); - } - if (from.publickey().size() > 0) { - _internal_set_publickey(from._internal_publickey()); - } - if (from.signature().size() > 0) { - _internal_set_signature(from._internal_signature()); - } - if (from._internal_has_notifytoken()) { - _internal_set_notifytoken(from._internal_notifytoken()); - } - if (from.deviceappversion().size() > 0) { - _internal_set_deviceappversion(from._internal_deviceappversion()); - } - if (from.deviceos().size() > 0) { - _internal_set_deviceos(from._internal_deviceos()); - } - if (from.devicetype() != 0) { - _internal_set_devicetype(from._internal_devicetype()); - } -} - -void NewSessionRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.NewSessionRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void NewSessionRequest::CopyFrom(const NewSessionRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.NewSessionRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool NewSessionRequest::IsInitialized() const { - return true; -} - -void NewSessionRequest::InternalSwap(NewSessionRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(_has_bits_[0], other->_has_bits_[0]); - deviceid_.Swap(&other->deviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - publickey_.Swap(&other->publickey_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - signature_.Swap(&other->signature_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - notifytoken_.Swap(&other->notifytoken_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - deviceappversion_.Swap(&other->deviceappversion_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - deviceos_.Swap(&other->deviceos_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - swap(devicetype_, other->devicetype_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata NewSessionRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class NewSessionResponse::_Internal { - public: -}; - -NewSessionResponse::NewSessionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.NewSessionResponse) -} -NewSessionResponse::NewSessionResponse(const NewSessionResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_sessionid().empty()) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sessionid(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.NewSessionResponse) -} - -void NewSessionResponse::SharedCtor() { -sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -NewSessionResponse::~NewSessionResponse() { - // @@protoc_insertion_point(destructor:tunnelbroker.NewSessionResponse) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void NewSessionResponse::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - sessionid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void NewSessionResponse::ArenaDtor(void* object) { - NewSessionResponse* _this = reinterpret_cast< NewSessionResponse* >(object); - (void)_this; -} -void NewSessionResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void NewSessionResponse::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void NewSessionResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.NewSessionResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - sessionid_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* NewSessionResponse::_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) { - // string sessionID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_sessionid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionResponse.sessionID")); - 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* NewSessionResponse::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.NewSessionResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_sessionid().data(), static_cast(this->_internal_sessionid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewSessionResponse.sessionID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_sessionid(), target); - } - - 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.NewSessionResponse) - return target; -} - -size_t NewSessionResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.NewSessionResponse) - 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; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_sessionid()); - } - - 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 NewSessionResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.NewSessionResponse) - GOOGLE_DCHECK_NE(&from, this); - const NewSessionResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.NewSessionResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.NewSessionResponse) - MergeFrom(*source); - } -} - -void NewSessionResponse::MergeFrom(const NewSessionResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.NewSessionResponse) - 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; - - if (from.sessionid().size() > 0) { - _internal_set_sessionid(from._internal_sessionid()); - } -} - -void NewSessionResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.NewSessionResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void NewSessionResponse::CopyFrom(const NewSessionResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.NewSessionResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool NewSessionResponse::IsInitialized() const { - return true; -} - -void NewSessionResponse::InternalSwap(NewSessionResponse* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - sessionid_.Swap(&other->sessionid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata NewSessionResponse::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class SendRequest::_Internal { - public: -}; - -SendRequest::SendRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - blobhashes_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.SendRequest) -} -SendRequest::SendRequest(const SendRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - blobhashes_(from.blobhashes_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_sessionid().empty()) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sessionid(), - GetArena()); - } - todeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_todeviceid().empty()) { - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_todeviceid(), - GetArena()); - } - payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_payload().empty()) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.SendRequest) -} - -void SendRequest::SharedCtor() { -sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -todeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -SendRequest::~SendRequest() { - // @@protoc_insertion_point(destructor:tunnelbroker.SendRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void SendRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - sessionid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - todeviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - payload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void SendRequest::ArenaDtor(void* object) { - SendRequest* _this = reinterpret_cast< SendRequest* >(object); - (void)_this; -} -void SendRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void SendRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void SendRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.SendRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - blobhashes_.Clear(); - sessionid_.ClearToEmpty(); - todeviceid_.ClearToEmpty(); - payload_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SendRequest::_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) { - // string sessionID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_sessionid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SendRequest.sessionID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string toDeviceID = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_todeviceid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SendRequest.toDeviceID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bytes payload = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - auto str = _internal_mutable_payload(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated string blobHashes = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_blobhashes(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SendRequest.blobHashes")); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(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* SendRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.SendRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_sessionid().data(), static_cast(this->_internal_sessionid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.SendRequest.sessionID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_sessionid(), target); - } - - // string toDeviceID = 2; - if (this->todeviceid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_todeviceid().data(), static_cast(this->_internal_todeviceid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.SendRequest.toDeviceID"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_todeviceid(), target); - } - - // bytes payload = 3; - if (this->payload().size() > 0) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_payload(), target); - } - - // repeated string blobHashes = 4; - for (int i = 0, n = this->_internal_blobhashes_size(); i < n; i++) { - const auto& s = this->_internal_blobhashes(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.SendRequest.blobHashes"); - target = stream->WriteString(4, s, target); - } - - 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.SendRequest) - return target; -} - -size_t SendRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.SendRequest) - 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; - - // repeated string blobHashes = 4; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(blobhashes_.size()); - for (int i = 0, n = blobhashes_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - blobhashes_.Get(i)); - } - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_sessionid()); - } - - // string toDeviceID = 2; - if (this->todeviceid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_todeviceid()); - } - - // bytes payload = 3; - if (this->payload().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_payload()); - } - - 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 SendRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.SendRequest) - GOOGLE_DCHECK_NE(&from, this); - const SendRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.SendRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.SendRequest) - MergeFrom(*source); - } -} - -void SendRequest::MergeFrom(const SendRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.SendRequest) - 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.sessionid().size() > 0) { - _internal_set_sessionid(from._internal_sessionid()); - } - if (from.todeviceid().size() > 0) { - _internal_set_todeviceid(from._internal_todeviceid()); - } - if (from.payload().size() > 0) { - _internal_set_payload(from._internal_payload()); - } -} - -void SendRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.SendRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void SendRequest::CopyFrom(const SendRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.SendRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SendRequest::IsInitialized() const { - return true; -} - -void SendRequest::InternalSwap(SendRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - blobhashes_.InternalSwap(&other->blobhashes_); - sessionid_.Swap(&other->sessionid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - todeviceid_.Swap(&other->todeviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - payload_.Swap(&other->payload_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SendRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class GetRequest::_Internal { - public: -}; - -GetRequest::GetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.GetRequest) -} -GetRequest::GetRequest(const GetRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_sessionid().empty()) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sessionid(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.GetRequest) -} - -void GetRequest::SharedCtor() { -sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -GetRequest::~GetRequest() { - // @@protoc_insertion_point(destructor:tunnelbroker.GetRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void GetRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - sessionid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void GetRequest::ArenaDtor(void* object) { - GetRequest* _this = reinterpret_cast< GetRequest* >(object); - (void)_this; -} -void GetRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void GetRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void GetRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.GetRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - sessionid_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetRequest::_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) { - // string sessionID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_sessionid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.GetRequest.sessionID")); - 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* GetRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.GetRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_sessionid().data(), static_cast(this->_internal_sessionid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.GetRequest.sessionID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_sessionid(), target); - } - - 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.GetRequest) - return target; -} - -size_t GetRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.GetRequest) - 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; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_sessionid()); - } - - 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 GetRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.GetRequest) - GOOGLE_DCHECK_NE(&from, this); - const GetRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.GetRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.GetRequest) - MergeFrom(*source); - } -} - -void GetRequest::MergeFrom(const GetRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.GetRequest) - 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; - - if (from.sessionid().size() > 0) { - _internal_set_sessionid(from._internal_sessionid()); - } -} - -void GetRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.GetRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GetRequest::CopyFrom(const GetRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.GetRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GetRequest::IsInitialized() const { - return true; -} - -void GetRequest::InternalSwap(GetRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - sessionid_.Swap(&other->sessionid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GetRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class GetResponse::_Internal { - public: -}; - -GetResponse::GetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - blobhashes_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.GetResponse) -} -GetResponse::GetResponse(const GetResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - blobhashes_(from.blobhashes_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - fromdeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_fromdeviceid().empty()) { - fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_fromdeviceid(), - GetArena()); - } - payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_payload().empty()) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.GetResponse) -} - -void GetResponse::SharedCtor() { -fromdeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -GetResponse::~GetResponse() { - // @@protoc_insertion_point(destructor:tunnelbroker.GetResponse) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void GetResponse::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)_this; -} -void GetResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void GetResponse::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -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; - - blobhashes_.Clear(); - fromdeviceid_.ClearToEmpty(); - payload_.ClearToEmpty(); - _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) { - // string fromDeviceID = 1; - case 1: - 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_(ptr); - } else goto handle_unusual; - continue; - // bytes payload = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_payload(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated string blobHashes = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr -= 1; - do { - 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_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(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; - - // string fromDeviceID = 1; - if (this->fromdeviceid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_fromdeviceid().data(), static_cast(this->_internal_fromdeviceid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.GetResponse.fromDeviceID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_fromdeviceid(), target); - } - - // bytes payload = 2; - if (this->payload().size() > 0) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_payload(), target); - } - - // repeated string blobHashes = 3; - for (int i = 0, n = this->_internal_blobhashes_size(); i < n; i++) { - const auto& s = this->_internal_blobhashes(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.GetResponse.blobHashes"); - target = stream->WriteString(3, s, target); - } - - 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; - - // repeated string blobHashes = 3; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(blobhashes_.size()); - for (int i = 0, n = blobhashes_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - blobhashes_.Get(i)); - } - - // string fromDeviceID = 1; - if (this->fromdeviceid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_fromdeviceid()); - } - - // bytes payload = 2; - if (this->payload().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_payload()); - } - - 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); - const GetResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.GetResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.GetResponse) - MergeFrom(*source); - } -} - -void GetResponse::MergeFrom(const GetResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.GetResponse) - 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 GetResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.GetResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GetResponse::CopyFrom(const GetResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.GetResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GetResponse::IsInitialized() const { - return true; -} - -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()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GetResponse::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class OutboundMessage::_Internal { - public: -}; - -OutboundMessage::OutboundMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - blobhashes_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.OutboundMessage) -} -OutboundMessage::OutboundMessage(const OutboundMessage& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - blobhashes_(from.blobhashes_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - todeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_todeviceid().empty()) { - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_todeviceid(), - GetArena()); - } - payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_payload().empty()) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.OutboundMessage) -} - -void OutboundMessage::SharedCtor() { -todeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -OutboundMessage::~OutboundMessage() { - // @@protoc_insertion_point(destructor:tunnelbroker.OutboundMessage) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void OutboundMessage::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - todeviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - payload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void OutboundMessage::ArenaDtor(void* object) { - OutboundMessage* _this = reinterpret_cast< OutboundMessage* >(object); - (void)_this; -} -void OutboundMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void OutboundMessage::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void OutboundMessage::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.OutboundMessage) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - blobhashes_.Clear(); - todeviceid_.ClearToEmpty(); - payload_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* OutboundMessage::_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) { - // string toDeviceID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_todeviceid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.OutboundMessage.toDeviceID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string payload = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_payload(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.OutboundMessage.payload")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated string blobHashes = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_blobhashes(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.OutboundMessage.blobHashes")); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(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* OutboundMessage::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.OutboundMessage) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string toDeviceID = 1; - if (this->todeviceid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_todeviceid().data(), static_cast(this->_internal_todeviceid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.OutboundMessage.toDeviceID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_todeviceid(), target); - } - - // string payload = 2; - if (this->payload().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_payload().data(), static_cast(this->_internal_payload().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.OutboundMessage.payload"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_payload(), target); - } - - // repeated string blobHashes = 3; - for (int i = 0, n = this->_internal_blobhashes_size(); i < n; i++) { - const auto& s = this->_internal_blobhashes(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.OutboundMessage.blobHashes"); - target = stream->WriteString(3, s, target); - } - - 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.OutboundMessage) - return target; -} - -size_t OutboundMessage::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.OutboundMessage) - 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; - - // repeated string blobHashes = 3; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(blobhashes_.size()); - for (int i = 0, n = blobhashes_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - blobhashes_.Get(i)); - } - - // string toDeviceID = 1; - if (this->todeviceid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_todeviceid()); - } - - // string payload = 2; - if (this->payload().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_payload()); - } - - 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 OutboundMessage::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.OutboundMessage) - GOOGLE_DCHECK_NE(&from, this); - const OutboundMessage* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.OutboundMessage) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.OutboundMessage) - MergeFrom(*source); - } -} - -void OutboundMessage::MergeFrom(const OutboundMessage& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.OutboundMessage) - 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.todeviceid().size() > 0) { - _internal_set_todeviceid(from._internal_todeviceid()); - } - if (from.payload().size() > 0) { - _internal_set_payload(from._internal_payload()); - } -} - -void OutboundMessage::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.OutboundMessage) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void OutboundMessage::CopyFrom(const OutboundMessage& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.OutboundMessage) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool OutboundMessage::IsInitialized() const { - return true; -} - -void OutboundMessage::InternalSwap(OutboundMessage* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - blobhashes_.InternalSwap(&other->blobhashes_); - todeviceid_.Swap(&other->todeviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - payload_.Swap(&other->payload_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata OutboundMessage::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class InboundMessage::_Internal { - public: -}; - -InboundMessage::InboundMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - blobhashes_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.InboundMessage) -} -InboundMessage::InboundMessage(const InboundMessage& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - blobhashes_(from.blobhashes_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - fromdeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_fromdeviceid().empty()) { - fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_fromdeviceid(), - GetArena()); - } - fromconnectionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_fromconnectionid().empty()) { - fromconnectionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_fromconnectionid(), - GetArena()); - } - payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_payload().empty()) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.InboundMessage) -} - -void InboundMessage::SharedCtor() { -fromdeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -fromconnectionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -InboundMessage::~InboundMessage() { - // @@protoc_insertion_point(destructor:tunnelbroker.InboundMessage) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void InboundMessage::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - fromdeviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - fromconnectionid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - payload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void InboundMessage::ArenaDtor(void* object) { - InboundMessage* _this = reinterpret_cast< InboundMessage* >(object); - (void)_this; -} -void InboundMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void InboundMessage::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void InboundMessage::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.InboundMessage) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - blobhashes_.Clear(); - fromdeviceid_.ClearToEmpty(); - fromconnectionid_.ClearToEmpty(); - payload_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* InboundMessage::_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) { - // string fromDeviceID = 1; - case 1: - 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.InboundMessage.fromDeviceID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string fromConnectionID = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_fromconnectionid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.InboundMessage.fromConnectionID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string payload = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - auto str = _internal_mutable_payload(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.InboundMessage.payload")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated string blobHashes = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_blobhashes(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.InboundMessage.blobHashes")); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(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* InboundMessage::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.InboundMessage) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string fromDeviceID = 1; - if (this->fromdeviceid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_fromdeviceid().data(), static_cast(this->_internal_fromdeviceid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.InboundMessage.fromDeviceID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_fromdeviceid(), target); - } - - // string fromConnectionID = 2; - if (this->fromconnectionid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_fromconnectionid().data(), static_cast(this->_internal_fromconnectionid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.InboundMessage.fromConnectionID"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_fromconnectionid(), target); - } - - // string payload = 3; - if (this->payload().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_payload().data(), static_cast(this->_internal_payload().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.InboundMessage.payload"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_payload(), target); - } - - // repeated string blobHashes = 4; - for (int i = 0, n = this->_internal_blobhashes_size(); i < n; i++) { - const auto& s = this->_internal_blobhashes(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.InboundMessage.blobHashes"); - target = stream->WriteString(4, s, target); - } - - 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.InboundMessage) - return target; -} - -size_t InboundMessage::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.InboundMessage) - 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; - - // repeated string blobHashes = 4; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(blobhashes_.size()); - for (int i = 0, n = blobhashes_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - blobhashes_.Get(i)); - } - - // string fromDeviceID = 1; - if (this->fromdeviceid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_fromdeviceid()); - } - - // string fromConnectionID = 2; - if (this->fromconnectionid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_fromconnectionid()); - } - - // string payload = 3; - if (this->payload().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_payload()); - } - - 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 InboundMessage::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.InboundMessage) - GOOGLE_DCHECK_NE(&from, this); - const InboundMessage* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.InboundMessage) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.InboundMessage) - MergeFrom(*source); - } -} - -void InboundMessage::MergeFrom(const InboundMessage& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.InboundMessage) - 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.fromconnectionid().size() > 0) { - _internal_set_fromconnectionid(from._internal_fromconnectionid()); - } - if (from.payload().size() > 0) { - _internal_set_payload(from._internal_payload()); - } -} - -void InboundMessage::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.InboundMessage) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void InboundMessage::CopyFrom(const InboundMessage& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.InboundMessage) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool InboundMessage::IsInitialized() const { - return true; -} - -void InboundMessage::InternalSwap(InboundMessage* 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()); - fromconnectionid_.Swap(&other->fromconnectionid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - payload_.Swap(&other->payload_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata InboundMessage::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class CheckRequest::_Internal { - public: -}; - -CheckRequest::CheckRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.CheckRequest) -} -CheckRequest::CheckRequest(const CheckRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_userid().empty()) { - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_userid(), - GetArena()); - } - devicetoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_devicetoken().empty()) { - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_devicetoken(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.CheckRequest) -} - -void CheckRequest::SharedCtor() { -userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -devicetoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -CheckRequest::~CheckRequest() { - // @@protoc_insertion_point(destructor:tunnelbroker.CheckRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void CheckRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - userid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - devicetoken_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void CheckRequest::ArenaDtor(void* object) { - CheckRequest* _this = reinterpret_cast< CheckRequest* >(object); - (void)_this; -} -void CheckRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void CheckRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void CheckRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.CheckRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - userid_.ClearToEmpty(); - devicetoken_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* CheckRequest::_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) { - // string userId = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_userid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.CheckRequest.userId")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string deviceToken = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_devicetoken(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.CheckRequest.deviceToken")); - 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* CheckRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.CheckRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string userId = 1; - if (this->userid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_userid().data(), static_cast(this->_internal_userid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.CheckRequest.userId"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_userid(), target); - } - - // string deviceToken = 2; - if (this->devicetoken().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_devicetoken().data(), static_cast(this->_internal_devicetoken().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.CheckRequest.deviceToken"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_devicetoken(), target); - } - - 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.CheckRequest) - return target; -} - -size_t CheckRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.CheckRequest) - 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; - - // string userId = 1; - if (this->userid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_userid()); - } - - // string deviceToken = 2; - if (this->devicetoken().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_devicetoken()); - } - - 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 CheckRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.CheckRequest) - GOOGLE_DCHECK_NE(&from, this); - const CheckRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.CheckRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.CheckRequest) - MergeFrom(*source); - } -} - -void CheckRequest::MergeFrom(const CheckRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.CheckRequest) - 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; - - if (from.userid().size() > 0) { - _internal_set_userid(from._internal_userid()); - } - if (from.devicetoken().size() > 0) { - _internal_set_devicetoken(from._internal_devicetoken()); - } -} - -void CheckRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.CheckRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void CheckRequest::CopyFrom(const CheckRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.CheckRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool CheckRequest::IsInitialized() const { - return true; -} - -void CheckRequest::InternalSwap(CheckRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - userid_.Swap(&other->userid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - devicetoken_.Swap(&other->devicetoken_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata CheckRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class CheckResponse::_Internal { - public: -}; - -CheckResponse::CheckResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.CheckResponse) -} -CheckResponse::CheckResponse(const CheckResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - checkresponsetype_ = from.checkresponsetype_; - // @@protoc_insertion_point(copy_constructor:tunnelbroker.CheckResponse) -} - -void CheckResponse::SharedCtor() { -checkresponsetype_ = 0; -} - -CheckResponse::~CheckResponse() { - // @@protoc_insertion_point(destructor:tunnelbroker.CheckResponse) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void CheckResponse::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void CheckResponse::ArenaDtor(void* object) { - CheckResponse* _this = reinterpret_cast< CheckResponse* >(object); - (void)_this; -} -void CheckResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void CheckResponse::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void CheckResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.CheckResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - checkresponsetype_ = 0; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* CheckResponse::_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.CheckResponseType checkResponseType = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_checkresponsetype(static_cast<::tunnelbroker::CheckResponseType>(val)); - } 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* CheckResponse::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.CheckResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .tunnelbroker.CheckResponseType checkResponseType = 1; - if (this->checkresponsetype() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 1, this->_internal_checkresponsetype(), target); - } - - 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.CheckResponse) - return target; -} - -size_t CheckResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.CheckResponse) - 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; - - // .tunnelbroker.CheckResponseType checkResponseType = 1; - if (this->checkresponsetype() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_checkresponsetype()); - } - - 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 CheckResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.CheckResponse) - GOOGLE_DCHECK_NE(&from, this); - const CheckResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.CheckResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.CheckResponse) - MergeFrom(*source); - } -} - -void CheckResponse::MergeFrom(const CheckResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.CheckResponse) - 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; - - if (from.checkresponsetype() != 0) { - _internal_set_checkresponsetype(from._internal_checkresponsetype()); - } -} - -void CheckResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.CheckResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void CheckResponse::CopyFrom(const CheckResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.CheckResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool CheckResponse::IsInitialized() const { - return true; -} - -void CheckResponse::InternalSwap(CheckResponse* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(checkresponsetype_, other->checkresponsetype_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata CheckResponse::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class NewPrimaryRequest::_Internal { - public: -}; - -NewPrimaryRequest::NewPrimaryRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.NewPrimaryRequest) -} -NewPrimaryRequest::NewPrimaryRequest(const NewPrimaryRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_userid().empty()) { - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_userid(), - GetArena()); - } - devicetoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_devicetoken().empty()) { - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_devicetoken(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.NewPrimaryRequest) -} - -void NewPrimaryRequest::SharedCtor() { -userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -devicetoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -NewPrimaryRequest::~NewPrimaryRequest() { - // @@protoc_insertion_point(destructor:tunnelbroker.NewPrimaryRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void NewPrimaryRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - userid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - devicetoken_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void NewPrimaryRequest::ArenaDtor(void* object) { - NewPrimaryRequest* _this = reinterpret_cast< NewPrimaryRequest* >(object); - (void)_this; -} -void NewPrimaryRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void NewPrimaryRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void NewPrimaryRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.NewPrimaryRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - userid_.ClearToEmpty(); - devicetoken_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* NewPrimaryRequest::_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) { - // string userId = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_userid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewPrimaryRequest.userId")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string deviceToken = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_devicetoken(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewPrimaryRequest.deviceToken")); - 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* NewPrimaryRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.NewPrimaryRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string userId = 1; - if (this->userid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_userid().data(), static_cast(this->_internal_userid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewPrimaryRequest.userId"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_userid(), target); - } - - // string deviceToken = 2; - if (this->devicetoken().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_devicetoken().data(), static_cast(this->_internal_devicetoken().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewPrimaryRequest.deviceToken"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_devicetoken(), target); - } - - 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.NewPrimaryRequest) - return target; -} - -size_t NewPrimaryRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.NewPrimaryRequest) - 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; - - // string userId = 1; - if (this->userid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_userid()); - } - - // string deviceToken = 2; - if (this->devicetoken().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_devicetoken()); - } - - 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 NewPrimaryRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.NewPrimaryRequest) - GOOGLE_DCHECK_NE(&from, this); - const NewPrimaryRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.NewPrimaryRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.NewPrimaryRequest) - MergeFrom(*source); - } -} - -void NewPrimaryRequest::MergeFrom(const NewPrimaryRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.NewPrimaryRequest) - 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; - - if (from.userid().size() > 0) { - _internal_set_userid(from._internal_userid()); - } - if (from.devicetoken().size() > 0) { - _internal_set_devicetoken(from._internal_devicetoken()); - } -} - -void NewPrimaryRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.NewPrimaryRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void NewPrimaryRequest::CopyFrom(const NewPrimaryRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.NewPrimaryRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool NewPrimaryRequest::IsInitialized() const { - return true; -} - -void NewPrimaryRequest::InternalSwap(NewPrimaryRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - userid_.Swap(&other->userid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - devicetoken_.Swap(&other->devicetoken_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata NewPrimaryRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class NewPrimaryResponse::_Internal { - public: -}; - -NewPrimaryResponse::NewPrimaryResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.NewPrimaryResponse) -} -NewPrimaryResponse::NewPrimaryResponse(const NewPrimaryResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - success_ = from.success_; - // @@protoc_insertion_point(copy_constructor:tunnelbroker.NewPrimaryResponse) -} - -void NewPrimaryResponse::SharedCtor() { -success_ = false; -} - -NewPrimaryResponse::~NewPrimaryResponse() { - // @@protoc_insertion_point(destructor:tunnelbroker.NewPrimaryResponse) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void NewPrimaryResponse::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void NewPrimaryResponse::ArenaDtor(void* object) { - NewPrimaryResponse* _this = reinterpret_cast< NewPrimaryResponse* >(object); - (void)_this; -} -void NewPrimaryResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void NewPrimaryResponse::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void NewPrimaryResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.NewPrimaryResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - success_ = false; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* NewPrimaryResponse::_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) { - // bool success = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - success_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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* NewPrimaryResponse::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.NewPrimaryResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool success = 1; - if (this->success() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_success(), target); - } - - 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.NewPrimaryResponse) - return target; -} - -size_t NewPrimaryResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.NewPrimaryResponse) - 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; - - // bool success = 1; - if (this->success() != 0) { - total_size += 1 + 1; - } - - 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 NewPrimaryResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.NewPrimaryResponse) - GOOGLE_DCHECK_NE(&from, this); - const NewPrimaryResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.NewPrimaryResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.NewPrimaryResponse) - MergeFrom(*source); - } -} - -void NewPrimaryResponse::MergeFrom(const NewPrimaryResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.NewPrimaryResponse) - 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; - - if (from.success() != 0) { - _internal_set_success(from._internal_success()); - } -} - -void NewPrimaryResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.NewPrimaryResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void NewPrimaryResponse::CopyFrom(const NewPrimaryResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.NewPrimaryResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool NewPrimaryResponse::IsInitialized() const { - return true; -} - -void NewPrimaryResponse::InternalSwap(NewPrimaryResponse* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(success_, other->success_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata NewPrimaryResponse::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class PongRequest::_Internal { - public: -}; - -PongRequest::PongRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.PongRequest) -} -PongRequest::PongRequest(const PongRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_userid().empty()) { - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_userid(), - GetArena()); - } - devicetoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_devicetoken().empty()) { - devicetoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_devicetoken(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.PongRequest) -} - -void PongRequest::SharedCtor() { -userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -devicetoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -PongRequest::~PongRequest() { - // @@protoc_insertion_point(destructor:tunnelbroker.PongRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void PongRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - userid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - devicetoken_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void PongRequest::ArenaDtor(void* object) { - PongRequest* _this = reinterpret_cast< PongRequest* >(object); - (void)_this; -} -void PongRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void PongRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void PongRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.PongRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - userid_.ClearToEmpty(); - devicetoken_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* PongRequest::_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) { - // string userId = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_userid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.PongRequest.userId")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string deviceToken = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_devicetoken(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.PongRequest.deviceToken")); - 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* PongRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.PongRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string userId = 1; - if (this->userid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_userid().data(), static_cast(this->_internal_userid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.PongRequest.userId"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_userid(), target); - } - - // string deviceToken = 2; - if (this->devicetoken().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_devicetoken().data(), static_cast(this->_internal_devicetoken().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.PongRequest.deviceToken"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_devicetoken(), target); - } - - 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.PongRequest) - return target; -} - -size_t PongRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.PongRequest) - 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; - - // string userId = 1; - if (this->userid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_userid()); - } - - // string deviceToken = 2; - if (this->devicetoken().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_devicetoken()); - } - - 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 PongRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.PongRequest) - GOOGLE_DCHECK_NE(&from, this); - const PongRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.PongRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.PongRequest) - MergeFrom(*source); - } -} - -void PongRequest::MergeFrom(const PongRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.PongRequest) - 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; - - if (from.userid().size() > 0) { - _internal_set_userid(from._internal_userid()); - } - if (from.devicetoken().size() > 0) { - _internal_set_devicetoken(from._internal_devicetoken()); - } -} - -void PongRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.PongRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void PongRequest::CopyFrom(const PongRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.PongRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool PongRequest::IsInitialized() const { - return true; -} - -void PongRequest::InternalSwap(PongRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - userid_.Swap(&other->userid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - devicetoken_.Swap(&other->devicetoken_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata PongRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// @@protoc_insertion_point(namespace_scope) -} // namespace tunnelbroker -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::tunnelbroker::SessionSignatureRequest* Arena::CreateMaybeMessage< ::tunnelbroker::SessionSignatureRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::SessionSignatureRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::SessionSignatureResponse* Arena::CreateMaybeMessage< ::tunnelbroker::SessionSignatureResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::SessionSignatureResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::NewSessionRequest* Arena::CreateMaybeMessage< ::tunnelbroker::NewSessionRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::NewSessionRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::NewSessionResponse* Arena::CreateMaybeMessage< ::tunnelbroker::NewSessionResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::NewSessionResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::SendRequest* Arena::CreateMaybeMessage< ::tunnelbroker::SendRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::SendRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::GetRequest* Arena::CreateMaybeMessage< ::tunnelbroker::GetRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::GetRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::GetResponse* Arena::CreateMaybeMessage< ::tunnelbroker::GetResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::GetResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::OutboundMessage* Arena::CreateMaybeMessage< ::tunnelbroker::OutboundMessage >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::OutboundMessage >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::InboundMessage* Arena::CreateMaybeMessage< ::tunnelbroker::InboundMessage >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::InboundMessage >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::CheckRequest* Arena::CreateMaybeMessage< ::tunnelbroker::CheckRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::CheckRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::CheckResponse* Arena::CreateMaybeMessage< ::tunnelbroker::CheckResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::CheckResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::NewPrimaryRequest* Arena::CreateMaybeMessage< ::tunnelbroker::NewPrimaryRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::NewPrimaryRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::NewPrimaryResponse* Arena::CreateMaybeMessage< ::tunnelbroker::NewPrimaryResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::NewPrimaryResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::PongRequest* Arena::CreateMaybeMessage< ::tunnelbroker::PongRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::PongRequest >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/native/cpp/CommonCpp/grpc/cmake/FindGRPCComm.cmake b/native/cpp/CommonCpp/grpc/cmake/FindGRPCComm.cmake new file mode 100644 --- /dev/null +++ b/native/cpp/CommonCpp/grpc/cmake/FindGRPCComm.cmake @@ -0,0 +1,50 @@ +# Largely based on https://github.com/IvanSafonov/grpc-cmake-example/blob/master/cmake/FindGRPC.cmake +# MIT Licensed + +# +# Generates C++ sources from the .proto files +# +# grpc_generate_cpp ( [...]) +# +# SRCS - variable to define with autogenerated source files +# HDRS - variable to define with autogenerated header files +# ARGN - .proto files +# +function(GRPC_GENERATE_CPP SRCS HDRS) + if(NOT ARGN) + message(SEND_ERROR "Error: GRPC_GENERATE_CPP() called without any proto files") + return() + endif() + + set(${SRCS}) + set(${HDRS}) + + foreach(FIL ${ARGN}) + get_filename_component(ABS_FIL ${FIL} ABSOLUTE) + get_filename_component(FIL_WE ${FIL} NAME_WE) + get_filename_component(FIL_DIR ${FIL} DIRECTORY) + + list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.cc") + list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.h") + + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.cc" + "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.h" + COMMAND ${_PROTOC} + ARGS --grpc_out=${CMAKE_CURRENT_BINARY_DIR} -I${FIL_DIR} --plugin=protoc-gen-grpc=${GRPC_CPP_PLUGIN} ${ABS_FIL} + DEPENDS ${ABS_FIL} + COMMENT "Running C++ gRPC compiler on ${FIL}" + VERBATIM + ) + endforeach() + + set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE) + set(${SRCS} ${${SRCS}} PARENT_SCOPE) + set(${HDRS} ${${HDRS}} PARENT_SCOPE) +endfunction() + +find_package(Protobuf REQUIRED) +find_package(gRPC REQUIRED) + +find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin REQUIRED) +find_program(_PROTOC protoc REQUIRED) diff --git a/nix/comm-grpc.nix b/nix/comm-grpc.nix new file mode 100644 --- /dev/null +++ b/nix/comm-grpc.nix @@ -0,0 +1,27 @@ +{ lib +, stdenv +, cmake +, openssl +, pkg-config +, grpc +, ninja +, protobuf_3_15_cmake +}: + +stdenv.mkDerivation rec { + name = "comm-grpc"; + + src = ../native/cpp/CommonCpp/grpc; + + nativeBuildInputs = [ + cmake + ninja + pkg-config + ]; + + buildInputs = [ + openssl + grpc + protobuf_3_15_cmake + ]; +} diff --git a/nix/overlay.nix b/nix/overlay.nix --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -15,6 +15,8 @@ protobuf_3_15_cmake = prev.callPackage ./protobuf_3_15.nix { }; + comm-grpc = final.callPackage ./comm-grpc.nix { }; + devShell = final.callPackage ./dev-shell.nix { }; mysql-down = prev.callPackage ./mysql-down-linux.nix { };