123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- // 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 <grpcpp/impl/codegen/async_generic_service.h>
- #include <grpcpp/impl/codegen/async_stream.h>
- #include <grpcpp/impl/codegen/async_unary_call.h>
- #include <grpcpp/impl/codegen/method_handler_impl.h>
- #include <grpcpp/impl/codegen/proto_utils.h>
- #include <grpcpp/impl/codegen/rpc_method.h>
- #include <grpcpp/impl/codegen/service_type.h>
- #include <grpcpp/impl/codegen/status.h>
- #include <grpcpp/impl/codegen/stub_options.h>
- #include <grpcpp/impl/codegen/sync_stream.h>
- 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));
- }
- std::unique_ptr< ::grpc::ClientReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request) {
- return std::unique_ptr< ::grpc::ClientReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodServerStreamRaw(context, request));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodServerStreamRaw(context, request, cq, tag));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodServerStreamRaw(context, request, cq));
- }
- std::unique_ptr< ::grpc::ClientWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
- return std::unique_ptr< ::grpc::ClientWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodClientStreamRaw(context, response));
- }
- std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodClientStreamRaw(context, response, cq, tag));
- }
- std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq) {
- return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodClientStreamRaw(context, response, cq));
- }
- std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodBiStream(::grpc::ClientContext* context) {
- return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodBiStreamRaw(context));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodBiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodBiStreamRaw(context, cq, tag));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodBiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodBiStreamRaw(context, 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;
- virtual ::grpc::ClientReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request) = 0;
- virtual ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
- virtual ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) = 0;
- virtual ::grpc::ClientWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response) = 0;
- virtual ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq, void* tag) = 0;
- virtual ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq) = 0;
- virtual ::grpc::ClientReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodBiStreamRaw(::grpc::ClientContext* context) = 0;
- virtual ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
- virtual ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::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));
- }
- std::unique_ptr< ::grpc::ClientReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request) {
- return std::unique_ptr< ::grpc::ClientReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodServerStreamRaw(context, request));
- }
- std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodServerStreamRaw(context, request, cq, tag));
- }
- std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
- return std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodServerStreamRaw(context, request, cq));
- }
- std::unique_ptr< ::grpc::ClientWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
- return std::unique_ptr< ::grpc::ClientWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodClientStreamRaw(context, response));
- }
- std::unique_ptr< ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodClientStreamRaw(context, response, cq, tag));
- }
- std::unique_ptr< ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq) {
- return std::unique_ptr< ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodClientStreamRaw(context, response, cq));
- }
- std::unique_ptr< ::grpc::ClientReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodBiStream(::grpc::ClientContext* context) {
- return std::unique_ptr< ::grpc::ClientReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodBiStreamRaw(context));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodBiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodBiStreamRaw(context, cq, tag));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodBiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodBiStreamRaw(context, 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;
- ::grpc::ClientReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request) override;
- ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq, void* tag) override;
- ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) override;
- ::grpc::ClientWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override;
- ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq, void* tag) override;
- ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq) override;
- ::grpc::ClientReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodBiStreamRaw(::grpc::ClientContext* context) override;
- ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override;
- ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override;
- const ::grpc::internal::RpcMethod rpcmethod_testMethod_;
- const ::grpc::internal::RpcMethod rpcmethod_testMethodServerStream_;
- const ::grpc::internal::RpcMethod rpcmethod_testMethodClientStream_;
- const ::grpc::internal::RpcMethod rpcmethod_testMethodBiStream_;
- };
- static std::unique_ptr<Stub> 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);
- virtual ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer);
- virtual ::grpc::Status testMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::qtprotobufnamespace::tests::SimpleStringMessage* response);
- virtual ::grpc::Status testMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream);
- };
- template <class BaseClass>
- 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);
- }
- };
- template <class BaseClass>
- class WithAsyncMethod_testMethodServerStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithAsyncMethod_testMethodServerStream() {
- ::grpc::Service::MarkMethodAsync(1);
- }
- ~WithAsyncMethod_testMethodServerStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- void RequesttestMethodServerStream(::grpc::ServerContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* 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 BaseClass>
- class WithAsyncMethod_testMethodClientStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithAsyncMethod_testMethodClientStream() {
- ::grpc::Service::MarkMethodAsync(2);
- }
- ~WithAsyncMethod_testMethodClientStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status testMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- void RequesttestMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
- ::grpc::Service::RequestAsyncClientStreaming(2, context, reader, new_call_cq, notification_cq, tag);
- }
- };
- template <class BaseClass>
- class WithAsyncMethod_testMethodBiStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithAsyncMethod_testMethodBiStream() {
- ::grpc::Service::MarkMethodAsync(3);
- }
- ~WithAsyncMethod_testMethodBiStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status testMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- void RequesttestMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
- ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
- }
- };
- typedef WithAsyncMethod_testMethod<WithAsyncMethod_testMethodServerStream<WithAsyncMethod_testMethodClientStream<WithAsyncMethod_testMethodBiStream<Service > > > > AsyncService;
- template <class BaseClass>
- 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 BaseClass>
- class WithGenericMethod_testMethodServerStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithGenericMethod_testMethodServerStream() {
- ::grpc::Service::MarkMethodGeneric(1);
- }
- ~WithGenericMethod_testMethodServerStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- };
- template <class BaseClass>
- class WithGenericMethod_testMethodClientStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithGenericMethod_testMethodClientStream() {
- ::grpc::Service::MarkMethodGeneric(2);
- }
- ~WithGenericMethod_testMethodClientStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status testMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- };
- template <class BaseClass>
- class WithGenericMethod_testMethodBiStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithGenericMethod_testMethodBiStream() {
- ::grpc::Service::MarkMethodGeneric(3);
- }
- ~WithGenericMethod_testMethodBiStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status testMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- };
- template <class BaseClass>
- 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 BaseClass>
- class WithRawMethod_testMethodServerStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithRawMethod_testMethodServerStream() {
- ::grpc::Service::MarkMethodRaw(1);
- }
- ~WithRawMethod_testMethodServerStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- void RequesttestMethodServerStream(::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 BaseClass>
- class WithRawMethod_testMethodClientStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithRawMethod_testMethodClientStream() {
- ::grpc::Service::MarkMethodRaw(2);
- }
- ~WithRawMethod_testMethodClientStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status testMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- void RequesttestMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
- ::grpc::Service::RequestAsyncClientStreaming(2, context, reader, new_call_cq, notification_cq, tag);
- }
- };
- template <class BaseClass>
- class WithRawMethod_testMethodBiStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithRawMethod_testMethodBiStream() {
- ::grpc::Service::MarkMethodRaw(3);
- }
- ~WithRawMethod_testMethodBiStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status testMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- void RequesttestMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
- ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
- }
- };
- template <class BaseClass>
- 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<BaseClass>::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<Service > StreamedUnaryService;
- template <class BaseClass>
- class WithSplitStreamingMethod_testMethodServerStream : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithSplitStreamingMethod_testMethodServerStream() {
- ::grpc::Service::MarkMethodStreamed(1,
- new ::grpc::internal::SplitServerStreamingHandler< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>(std::bind(&WithSplitStreamingMethod_testMethodServerStream<BaseClass>::StreamedtestMethodServerStream, this, std::placeholders::_1, std::placeholders::_2)));
- }
- ~WithSplitStreamingMethod_testMethodServerStream() override {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable regular version of this method
- ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer) override {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- // replace default version of method with split streamed
- virtual ::grpc::Status StreamedtestMethodServerStream(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::qtprotobufnamespace::tests::SimpleStringMessage,::qtprotobufnamespace::tests::SimpleStringMessage>* server_split_streamer) = 0;
- };
- typedef WithSplitStreamingMethod_testMethodServerStream<Service > SplitStreamedService;
- typedef WithStreamedUnaryMethod_testMethod<WithSplitStreamingMethod_testMethodServerStream<Service > > StreamedService;
- };
- } // namespace tests
- } // namespace qtprotobufnamespace
- #endif // GRPC_testservice_2eproto__INCLUDED
|