// Generated by the gRPC C++ plugin. // If you make any local change, they will be lost. // source: testservice.proto #ifndef GRPC_testservice_2eproto__INCLUDED #define GRPC_testservice_2eproto__INCLUDED #include "testservice.pb.h" #include #include #include #include #include #include #include #include #include #include namespace grpc { class CompletionQueue; class Channel; class ServerCompletionQueue; class ServerContext; } // namespace grpc namespace qtprotobufnamespace { namespace tests { class TestService final { public: static constexpr char const* service_full_name() { return "qtprotobufnamespace.tests.TestService"; } class StubInterface { public: virtual ~StubInterface() {} virtual ::grpc::Status testMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodRaw(context, request, cq)); } private: virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) = 0; }; class Stub final : public StubInterface { public: Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); ::grpc::Status testMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodRaw(context, request, cq)); } private: std::shared_ptr< ::grpc::ChannelInterface> channel_; ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_testMethod_; }; 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 testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response); }; template class WithAsyncMethod_testMethod : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithAsyncMethod_testMethod() { ::grpc::Service::MarkMethodAsync(0); } ~WithAsyncMethod_testMethod() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequesttestMethod(::grpc::ServerContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerAsyncResponseWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* 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); } }; typedef WithAsyncMethod_testMethod AsyncService; template class WithGenericMethod_testMethod : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithGenericMethod_testMethod() { ::grpc::Service::MarkMethodGeneric(0); } ~WithGenericMethod_testMethod() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template class WithRawMethod_testMethod : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithRawMethod_testMethod() { ::grpc::Service::MarkMethodRaw(0); } ~WithRawMethod_testMethod() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequesttestMethod(::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 WithStreamedUnaryMethod_testMethod : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithStreamedUnaryMethod_testMethod() { ::grpc::Service::MarkMethodStreamed(0, new ::grpc::internal::StreamedUnaryHandler< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>(std::bind(&WithStreamedUnaryMethod_testMethod::StreamedtestMethod, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_testMethod() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method ::grpc::Status testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with streamed unary virtual ::grpc::Status StreamedtestMethod(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::qtprotobufnamespace::tests::SimpleStringMessage,::qtprotobufnamespace::tests::SimpleStringMessage>* server_unary_streamer) = 0; }; typedef WithStreamedUnaryMethod_testMethod StreamedUnaryService; typedef Service SplitStreamedService; typedef WithStreamedUnaryMethod_testMethod StreamedService; }; } // namespace tests } // namespace qtprotobufnamespace #endif // GRPC_testservice_2eproto__INCLUDED