Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 1 | // Generated by the gRPC C++ plugin. |
| 2 | // If you make any local change, they will be lost. |
| 3 | // source: dmi/hw_events_mgmt_service.proto |
| 4 | |
| 5 | #include "dmi/hw_events_mgmt_service.pb.h" |
| 6 | #include "dmi/hw_events_mgmt_service.grpc.pb.h" |
| 7 | |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 8 | #include <functional> |
| 9 | #include <grpcpp/impl/codegen/async_stream.h> |
| 10 | #include <grpcpp/impl/codegen/async_unary_call.h> |
| 11 | #include <grpcpp/impl/codegen/channel_interface.h> |
| 12 | #include <grpcpp/impl/codegen/client_unary_call.h> |
| 13 | #include <grpcpp/impl/codegen/client_callback.h> |
| 14 | #include <grpcpp/impl/codegen/message_allocator.h> |
| 15 | #include <grpcpp/impl/codegen/method_handler.h> |
| 16 | #include <grpcpp/impl/codegen/rpc_service_method.h> |
| 17 | #include <grpcpp/impl/codegen/server_callback.h> |
| 18 | #include <grpcpp/impl/codegen/server_callback_handlers.h> |
| 19 | #include <grpcpp/impl/codegen/server_context.h> |
| 20 | #include <grpcpp/impl/codegen/service_type.h> |
| 21 | #include <grpcpp/impl/codegen/sync_stream.h> |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 22 | namespace dmi { |
| 23 | |
| 24 | static const char* NativeEventsManagementService_method_names[] = { |
| 25 | "/dmi.NativeEventsManagementService/ListEvents", |
| 26 | "/dmi.NativeEventsManagementService/UpdateEventsConfiguration", |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 27 | "/dmi.NativeEventsManagementService/StreamEvents", |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | std::unique_ptr< NativeEventsManagementService::Stub> NativeEventsManagementService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 31 | (void)options; |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 32 | std::unique_ptr< NativeEventsManagementService::Stub> stub(new NativeEventsManagementService::Stub(channel)); |
| 33 | return stub; |
| 34 | } |
| 35 | |
| 36 | NativeEventsManagementService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 37 | : channel_(channel), rpcmethod_ListEvents_(NativeEventsManagementService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) |
| 38 | , rpcmethod_UpdateEventsConfiguration_(NativeEventsManagementService_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) |
| 39 | , rpcmethod_StreamEvents_(NativeEventsManagementService_method_names[2], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 40 | {} |
| 41 | |
| 42 | ::grpc::Status NativeEventsManagementService::Stub::ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::ListEventsResponse* response) { |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 43 | return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ListEvents_, context, request, response); |
| 44 | } |
| 45 | |
| 46 | void NativeEventsManagementService::Stub::experimental_async::ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, std::function<void(::grpc::Status)> f) { |
| 47 | ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ListEvents_, context, request, response, std::move(f)); |
| 48 | } |
| 49 | |
| 50 | void NativeEventsManagementService::Stub::experimental_async::ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, std::function<void(::grpc::Status)> f) { |
| 51 | ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ListEvents_, context, request, response, std::move(f)); |
| 52 | } |
| 53 | |
| 54 | void NativeEventsManagementService::Stub::experimental_async::ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { |
| 55 | ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ListEvents_, context, request, response, reactor); |
| 56 | } |
| 57 | |
| 58 | void NativeEventsManagementService::Stub::experimental_async::ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { |
| 59 | ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ListEvents_, context, request, response, reactor); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>* NativeEventsManagementService::Stub::AsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) { |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 63 | return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::ListEventsResponse>::Create(channel_.get(), cq, rpcmethod_ListEvents_, context, request, true); |
| 64 | } |
| 65 | |
| 66 | ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>* NativeEventsManagementService::Stub::PrepareAsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) { |
| 67 | return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::ListEventsResponse>::Create(channel_.get(), cq, rpcmethod_ListEvents_, context, request, false); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | ::grpc::Status NativeEventsManagementService::Stub::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::dmi::EventsConfigurationResponse* response) { |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 71 | return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_UpdateEventsConfiguration_, context, request, response); |
| 72 | } |
| 73 | |
| 74 | void NativeEventsManagementService::Stub::experimental_async::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, std::function<void(::grpc::Status)> f) { |
| 75 | ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_UpdateEventsConfiguration_, context, request, response, std::move(f)); |
| 76 | } |
| 77 | |
| 78 | void NativeEventsManagementService::Stub::experimental_async::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, std::function<void(::grpc::Status)> f) { |
| 79 | ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_UpdateEventsConfiguration_, context, request, response, std::move(f)); |
| 80 | } |
| 81 | |
| 82 | void NativeEventsManagementService::Stub::experimental_async::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { |
| 83 | ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_UpdateEventsConfiguration_, context, request, response, reactor); |
| 84 | } |
| 85 | |
| 86 | void NativeEventsManagementService::Stub::experimental_async::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { |
| 87 | ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_UpdateEventsConfiguration_, context, request, response, reactor); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>* NativeEventsManagementService::Stub::AsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) { |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 91 | return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::EventsConfigurationResponse>::Create(channel_.get(), cq, rpcmethod_UpdateEventsConfiguration_, context, request, true); |
| 92 | } |
| 93 | |
| 94 | ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>* NativeEventsManagementService::Stub::PrepareAsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) { |
| 95 | return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::EventsConfigurationResponse>::Create(channel_.get(), cq, rpcmethod_UpdateEventsConfiguration_, context, request, false); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 96 | } |
| 97 | |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 98 | ::grpc::ClientReader< ::dmi::Event>* NativeEventsManagementService::Stub::StreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) { |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 99 | return ::grpc_impl::internal::ClientReaderFactory< ::dmi::Event>::Create(channel_.get(), rpcmethod_StreamEvents_, context, request); |
| 100 | } |
| 101 | |
| 102 | void NativeEventsManagementService::Stub::experimental_async::StreamEvents(::grpc::ClientContext* context, ::google::protobuf::Empty* request, ::grpc::experimental::ClientReadReactor< ::dmi::Event>* reactor) { |
| 103 | ::grpc_impl::internal::ClientCallbackReaderFactory< ::dmi::Event>::Create(stub_->channel_.get(), stub_->rpcmethod_StreamEvents_, context, request, reactor); |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | ::grpc::ClientAsyncReader< ::dmi::Event>* NativeEventsManagementService::Stub::AsyncStreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) { |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 107 | return ::grpc_impl::internal::ClientAsyncReaderFactory< ::dmi::Event>::Create(channel_.get(), cq, rpcmethod_StreamEvents_, context, request, true, tag); |
| 108 | } |
| 109 | |
| 110 | ::grpc::ClientAsyncReader< ::dmi::Event>* NativeEventsManagementService::Stub::PrepareAsyncStreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) { |
| 111 | return ::grpc_impl::internal::ClientAsyncReaderFactory< ::dmi::Event>::Create(channel_.get(), cq, rpcmethod_StreamEvents_, context, request, false, nullptr); |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 112 | } |
| 113 | |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 114 | NativeEventsManagementService::Service::Service() { |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 115 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 116 | NativeEventsManagementService_method_names[0], |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 117 | ::grpc::internal::RpcMethod::NORMAL_RPC, |
| 118 | new ::grpc::internal::RpcMethodHandler< NativeEventsManagementService::Service, ::dmi::HardwareID, ::dmi::ListEventsResponse>( |
| 119 | [](NativeEventsManagementService::Service* service, |
| 120 | ::grpc_impl::ServerContext* ctx, |
| 121 | const ::dmi::HardwareID* req, |
| 122 | ::dmi::ListEventsResponse* resp) { |
| 123 | return service->ListEvents(ctx, req, resp); |
| 124 | }, this))); |
| 125 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 126 | NativeEventsManagementService_method_names[1], |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 127 | ::grpc::internal::RpcMethod::NORMAL_RPC, |
| 128 | new ::grpc::internal::RpcMethodHandler< NativeEventsManagementService::Service, ::dmi::EventsConfigurationRequest, ::dmi::EventsConfigurationResponse>( |
| 129 | [](NativeEventsManagementService::Service* service, |
| 130 | ::grpc_impl::ServerContext* ctx, |
| 131 | const ::dmi::EventsConfigurationRequest* req, |
| 132 | ::dmi::EventsConfigurationResponse* resp) { |
| 133 | return service->UpdateEventsConfiguration(ctx, req, resp); |
| 134 | }, this))); |
| 135 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 136 | NativeEventsManagementService_method_names[2], |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 137 | ::grpc::internal::RpcMethod::SERVER_STREAMING, |
| 138 | new ::grpc::internal::ServerStreamingHandler< NativeEventsManagementService::Service, ::google::protobuf::Empty, ::dmi::Event>( |
| 139 | [](NativeEventsManagementService::Service* service, |
| 140 | ::grpc_impl::ServerContext* ctx, |
| 141 | const ::google::protobuf::Empty* req, |
| 142 | ::grpc_impl::ServerWriter<::dmi::Event>* writer) { |
| 143 | return service->StreamEvents(ctx, req, writer); |
| 144 | }, this))); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | NativeEventsManagementService::Service::~Service() { |
| 148 | } |
| 149 | |
| 150 | ::grpc::Status NativeEventsManagementService::Service::ListEvents(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response) { |
| 151 | (void) context; |
| 152 | (void) request; |
| 153 | (void) response; |
| 154 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 155 | } |
| 156 | |
| 157 | ::grpc::Status NativeEventsManagementService::Service::UpdateEventsConfiguration(::grpc::ServerContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response) { |
| 158 | (void) context; |
| 159 | (void) request; |
| 160 | (void) response; |
| 161 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 162 | } |
| 163 | |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 164 | ::grpc::Status NativeEventsManagementService::Service::StreamEvents(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::grpc::ServerWriter< ::dmi::Event>* writer) { |
| 165 | (void) context; |
| 166 | (void) request; |
| 167 | (void) writer; |
| 168 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 169 | } |
| 170 | |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 171 | |
| 172 | } // namespace dmi |
| 173 | |