message.grpc.pb.cc 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. // Generated by the gRPC C++ plugin.
  2. // If you make any local change, they will be lost.
  3. // source: message.proto
  4. #include "message.pb.h"
  5. #include "message.grpc.pb.h"
  6. #include <functional>
  7. #include <grpcpp/support/async_stream.h>
  8. #include <grpcpp/support/async_unary_call.h>
  9. #include <grpcpp/impl/channel_interface.h>
  10. #include <grpcpp/impl/client_unary_call.h>
  11. #include <grpcpp/support/client_callback.h>
  12. #include <grpcpp/support/message_allocator.h>
  13. #include <grpcpp/support/method_handler.h>
  14. #include <grpcpp/impl/rpc_service_method.h>
  15. #include <grpcpp/support/server_callback.h>
  16. #include <grpcpp/impl/server_callback_handlers.h>
  17. #include <grpcpp/server_context.h>
  18. #include <grpcpp/impl/service_type.h>
  19. #include <grpcpp/support/sync_stream.h>
  20. namespace NavMessage {
  21. static const char* NavExcutor_method_names[] = {
  22. "/NavMessage.NavExcutor/Start",
  23. "/NavMessage.NavExcutor/Cancel",
  24. };
  25. std::unique_ptr< NavExcutor::Stub> NavExcutor::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
  26. (void)options;
  27. std::unique_ptr< NavExcutor::Stub> stub(new NavExcutor::Stub(channel, options));
  28. return stub;
  29. }
  30. NavExcutor::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
  31. : channel_(channel), rpcmethod_Start_(NavExcutor_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  32. , rpcmethod_Cancel_(NavExcutor_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  33. {}
  34. ::grpc::Status NavExcutor::Stub::Start(::grpc::ClientContext* context, const ::NavMessage::NavCmd& request, ::NavMessage::NavResponse* response) {
  35. return ::grpc::internal::BlockingUnaryCall< ::NavMessage::NavCmd, ::NavMessage::NavResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Start_, context, request, response);
  36. }
  37. void NavExcutor::Stub::async::Start(::grpc::ClientContext* context, const ::NavMessage::NavCmd* request, ::NavMessage::NavResponse* response, std::function<void(::grpc::Status)> f) {
  38. ::grpc::internal::CallbackUnaryCall< ::NavMessage::NavCmd, ::NavMessage::NavResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Start_, context, request, response, std::move(f));
  39. }
  40. void NavExcutor::Stub::async::Start(::grpc::ClientContext* context, const ::NavMessage::NavCmd* request, ::NavMessage::NavResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  41. ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Start_, context, request, response, reactor);
  42. }
  43. ::grpc::ClientAsyncResponseReader< ::NavMessage::NavResponse>* NavExcutor::Stub::PrepareAsyncStartRaw(::grpc::ClientContext* context, const ::NavMessage::NavCmd& request, ::grpc::CompletionQueue* cq) {
  44. return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::NavMessage::NavResponse, ::NavMessage::NavCmd, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Start_, context, request);
  45. }
  46. ::grpc::ClientAsyncResponseReader< ::NavMessage::NavResponse>* NavExcutor::Stub::AsyncStartRaw(::grpc::ClientContext* context, const ::NavMessage::NavCmd& request, ::grpc::CompletionQueue* cq) {
  47. auto* result =
  48. this->PrepareAsyncStartRaw(context, request, cq);
  49. result->StartCall();
  50. return result;
  51. }
  52. ::grpc::Status NavExcutor::Stub::Cancel(::grpc::ClientContext* context, const ::NavMessage::NavCmd& request, ::NavMessage::NavResponse* response) {
  53. return ::grpc::internal::BlockingUnaryCall< ::NavMessage::NavCmd, ::NavMessage::NavResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Cancel_, context, request, response);
  54. }
  55. void NavExcutor::Stub::async::Cancel(::grpc::ClientContext* context, const ::NavMessage::NavCmd* request, ::NavMessage::NavResponse* response, std::function<void(::grpc::Status)> f) {
  56. ::grpc::internal::CallbackUnaryCall< ::NavMessage::NavCmd, ::NavMessage::NavResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Cancel_, context, request, response, std::move(f));
  57. }
  58. void NavExcutor::Stub::async::Cancel(::grpc::ClientContext* context, const ::NavMessage::NavCmd* request, ::NavMessage::NavResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  59. ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Cancel_, context, request, response, reactor);
  60. }
  61. ::grpc::ClientAsyncResponseReader< ::NavMessage::NavResponse>* NavExcutor::Stub::PrepareAsyncCancelRaw(::grpc::ClientContext* context, const ::NavMessage::NavCmd& request, ::grpc::CompletionQueue* cq) {
  62. return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::NavMessage::NavResponse, ::NavMessage::NavCmd, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Cancel_, context, request);
  63. }
  64. ::grpc::ClientAsyncResponseReader< ::NavMessage::NavResponse>* NavExcutor::Stub::AsyncCancelRaw(::grpc::ClientContext* context, const ::NavMessage::NavCmd& request, ::grpc::CompletionQueue* cq) {
  65. auto* result =
  66. this->PrepareAsyncCancelRaw(context, request, cq);
  67. result->StartCall();
  68. return result;
  69. }
  70. NavExcutor::Service::Service() {
  71. AddMethod(new ::grpc::internal::RpcServiceMethod(
  72. NavExcutor_method_names[0],
  73. ::grpc::internal::RpcMethod::NORMAL_RPC,
  74. new ::grpc::internal::RpcMethodHandler< NavExcutor::Service, ::NavMessage::NavCmd, ::NavMessage::NavResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
  75. [](NavExcutor::Service* service,
  76. ::grpc::ServerContext* ctx,
  77. const ::NavMessage::NavCmd* req,
  78. ::NavMessage::NavResponse* resp) {
  79. return service->Start(ctx, req, resp);
  80. }, this)));
  81. AddMethod(new ::grpc::internal::RpcServiceMethod(
  82. NavExcutor_method_names[1],
  83. ::grpc::internal::RpcMethod::NORMAL_RPC,
  84. new ::grpc::internal::RpcMethodHandler< NavExcutor::Service, ::NavMessage::NavCmd, ::NavMessage::NavResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
  85. [](NavExcutor::Service* service,
  86. ::grpc::ServerContext* ctx,
  87. const ::NavMessage::NavCmd* req,
  88. ::NavMessage::NavResponse* resp) {
  89. return service->Cancel(ctx, req, resp);
  90. }, this)));
  91. }
  92. NavExcutor::Service::~Service() {
  93. }
  94. ::grpc::Status NavExcutor::Service::Start(::grpc::ServerContext* context, const ::NavMessage::NavCmd* request, ::NavMessage::NavResponse* response) {
  95. (void) context;
  96. (void) request;
  97. (void) response;
  98. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  99. }
  100. ::grpc::Status NavExcutor::Service::Cancel(::grpc::ServerContext* context, const ::NavMessage::NavCmd* request, ::NavMessage::NavResponse* response) {
  101. (void) context;
  102. (void) request;
  103. (void) response;
  104. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  105. }
  106. } // namespace NavMessage