testservice.grpc.pb.cc 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. // Generated by the gRPC C++ plugin.
  2. // If you make any local change, they will be lost.
  3. // source: testservice.proto
  4. #include "testservice.pb.h"
  5. #include "testservice.grpc.pb.h"
  6. #include <grpcpp/impl/codegen/async_stream.h>
  7. #include <grpcpp/impl/codegen/async_unary_call.h>
  8. #include <grpcpp/impl/codegen/channel_interface.h>
  9. #include <grpcpp/impl/codegen/client_unary_call.h>
  10. #include <grpcpp/impl/codegen/method_handler_impl.h>
  11. #include <grpcpp/impl/codegen/rpc_service_method.h>
  12. #include <grpcpp/impl/codegen/service_type.h>
  13. #include <grpcpp/impl/codegen/sync_stream.h>
  14. namespace qtprotobufnamespace {
  15. namespace tests {
  16. static const char* TestService_method_names[] = {
  17. "/qtprotobufnamespace.tests.TestService/testMethod",
  18. "/qtprotobufnamespace.tests.TestService/testMethodServerStream",
  19. "/qtprotobufnamespace.tests.TestService/testMethodClientStream",
  20. "/qtprotobufnamespace.tests.TestService/testMethodBiStream",
  21. };
  22. std::unique_ptr< TestService::Stub> TestService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
  23. (void)options;
  24. std::unique_ptr< TestService::Stub> stub(new TestService::Stub(channel));
  25. return stub;
  26. }
  27. TestService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
  28. : channel_(channel), rpcmethod_testMethod_(TestService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  29. , rpcmethod_testMethodServerStream_(TestService_method_names[1], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
  30. , rpcmethod_testMethodClientStream_(TestService_method_names[2], ::grpc::internal::RpcMethod::CLIENT_STREAMING, channel)
  31. , rpcmethod_testMethodBiStream_(TestService_method_names[3], ::grpc::internal::RpcMethod::BIDI_STREAMING, channel)
  32. {}
  33. ::grpc::Status TestService::Stub::testMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
  34. return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_testMethod_, context, request, response);
  35. }
  36. ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::AsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  37. return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethod_, context, request, true);
  38. }
  39. ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::PrepareAsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  40. return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethod_, context, request, false);
  41. }
  42. ::grpc::ClientReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::testMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request) {
  43. return ::grpc::internal::ClientReaderFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), rpcmethod_testMethodServerStream_, context, request);
  44. }
  45. ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::AsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq, void* tag) {
  46. return ::grpc::internal::ClientAsyncReaderFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethodServerStream_, context, request, true, tag);
  47. }
  48. ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::PrepareAsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  49. return ::grpc::internal::ClientAsyncReaderFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethodServerStream_, context, request, false, nullptr);
  50. }
  51. ::grpc::ClientWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::testMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
  52. return ::grpc::internal::ClientWriterFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), rpcmethod_testMethodClientStream_, context, response);
  53. }
  54. ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::AsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq, void* tag) {
  55. return ::grpc::internal::ClientAsyncWriterFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethodClientStream_, context, response, true, tag);
  56. }
  57. ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::PrepareAsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq) {
  58. return ::grpc::internal::ClientAsyncWriterFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethodClientStream_, context, response, false, nullptr);
  59. }
  60. ::grpc::ClientReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::testMethodBiStreamRaw(::grpc::ClientContext* context) {
  61. return ::grpc::internal::ClientReaderWriterFactory< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), rpcmethod_testMethodBiStream_, context);
  62. }
  63. ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::AsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
  64. return ::grpc::internal::ClientAsyncReaderWriterFactory< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethodBiStream_, context, true, tag);
  65. }
  66. ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::PrepareAsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
  67. return ::grpc::internal::ClientAsyncReaderWriterFactory< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethodBiStream_, context, false, nullptr);
  68. }
  69. TestService::Service::Service() {
  70. AddMethod(new ::grpc::internal::RpcServiceMethod(
  71. TestService_method_names[0],
  72. ::grpc::internal::RpcMethod::NORMAL_RPC,
  73. new ::grpc::internal::RpcMethodHandler< TestService::Service, ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>(
  74. std::mem_fn(&TestService::Service::testMethod), this)));
  75. AddMethod(new ::grpc::internal::RpcServiceMethod(
  76. TestService_method_names[1],
  77. ::grpc::internal::RpcMethod::SERVER_STREAMING,
  78. new ::grpc::internal::ServerStreamingHandler< TestService::Service, ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>(
  79. std::mem_fn(&TestService::Service::testMethodServerStream), this)));
  80. AddMethod(new ::grpc::internal::RpcServiceMethod(
  81. TestService_method_names[2],
  82. ::grpc::internal::RpcMethod::CLIENT_STREAMING,
  83. new ::grpc::internal::ClientStreamingHandler< TestService::Service, ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>(
  84. std::mem_fn(&TestService::Service::testMethodClientStream), this)));
  85. AddMethod(new ::grpc::internal::RpcServiceMethod(
  86. TestService_method_names[3],
  87. ::grpc::internal::RpcMethod::BIDI_STREAMING,
  88. new ::grpc::internal::BidiStreamingHandler< TestService::Service, ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>(
  89. std::mem_fn(&TestService::Service::testMethodBiStream), this)));
  90. }
  91. TestService::Service::~Service() {
  92. }
  93. ::grpc::Status TestService::Service::testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
  94. (void) context;
  95. (void) request;
  96. (void) response;
  97. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  98. }
  99. ::grpc::Status TestService::Service::testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer) {
  100. (void) context;
  101. (void) request;
  102. (void) writer;
  103. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  104. }
  105. ::grpc::Status TestService::Service::testMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
  106. (void) context;
  107. (void) reader;
  108. (void) response;
  109. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  110. }
  111. ::grpc::Status TestService::Service::testMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream) {
  112. (void) context;
  113. (void) stream;
  114. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  115. }
  116. } // namespace qtprotobufnamespace
  117. } // namespace tests