testservice.grpc.pb.cc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. };
  19. std::unique_ptr< TestService::Stub> TestService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
  20. (void)options;
  21. std::unique_ptr< TestService::Stub> stub(new TestService::Stub(channel));
  22. return stub;
  23. }
  24. TestService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
  25. : channel_(channel), rpcmethod_testMethod_(TestService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  26. {}
  27. ::grpc::Status TestService::Stub::testMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
  28. return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_testMethod_, context, request, response);
  29. }
  30. ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::AsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  31. return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethod_, context, request, true);
  32. }
  33. ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* TestService::Stub::PrepareAsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  34. return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobufnamespace::tests::SimpleStringMessage>::Create(channel_.get(), cq, rpcmethod_testMethod_, context, request, false);
  35. }
  36. TestService::Service::Service() {
  37. AddMethod(new ::grpc::internal::RpcServiceMethod(
  38. TestService_method_names[0],
  39. ::grpc::internal::RpcMethod::NORMAL_RPC,
  40. new ::grpc::internal::RpcMethodHandler< TestService::Service, ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>(
  41. std::mem_fn(&TestService::Service::testMethod), this)));
  42. }
  43. TestService::Service::~Service() {
  44. }
  45. ::grpc::Status TestService::Service::testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
  46. (void) context;
  47. (void) request;
  48. (void) response;
  49. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  50. }
  51. } // namespace qtprotobufnamespace
  52. } // namespace tests