blob: 450a295e945e059a2abc5f12fee699ddf885a59a [file] [log] [blame]
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001// 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
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>
22namespace dmi {
23
24static const char* NativeEventsManagementService_method_names[] = {
25 "/dmi.NativeEventsManagementService/ListEvents",
26 "/dmi.NativeEventsManagementService/UpdateEventsConfiguration",
27};
28
29std::unique_ptr< NativeEventsManagementService::Stub> NativeEventsManagementService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
30 (void)options;
31 std::unique_ptr< NativeEventsManagementService::Stub> stub(new NativeEventsManagementService::Stub(channel));
32 return stub;
33}
34
35NativeEventsManagementService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
36 : channel_(channel), rpcmethod_ListEvents_(NativeEventsManagementService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
37 , rpcmethod_UpdateEventsConfiguration_(NativeEventsManagementService_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
38 {}
39
40::grpc::Status NativeEventsManagementService::Stub::ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::ListEventsResponse* response) {
41 return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ListEvents_, context, request, response);
42}
43
44void NativeEventsManagementService::Stub::experimental_async::ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, std::function<void(::grpc::Status)> f) {
45 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ListEvents_, context, request, response, std::move(f));
46}
47
48void NativeEventsManagementService::Stub::experimental_async::ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, std::function<void(::grpc::Status)> f) {
49 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ListEvents_, context, request, response, std::move(f));
50}
51
52void NativeEventsManagementService::Stub::experimental_async::ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
53 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ListEvents_, context, request, response, reactor);
54}
55
56void NativeEventsManagementService::Stub::experimental_async::ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
57 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ListEvents_, context, request, response, reactor);
58}
59
60::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>* NativeEventsManagementService::Stub::AsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
61 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::ListEventsResponse>::Create(channel_.get(), cq, rpcmethod_ListEvents_, context, request, true);
62}
63
64::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>* NativeEventsManagementService::Stub::PrepareAsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
65 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::ListEventsResponse>::Create(channel_.get(), cq, rpcmethod_ListEvents_, context, request, false);
66}
67
68::grpc::Status NativeEventsManagementService::Stub::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::dmi::EventsConfigurationResponse* response) {
69 return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_UpdateEventsConfiguration_, context, request, response);
70}
71
72void NativeEventsManagementService::Stub::experimental_async::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, std::function<void(::grpc::Status)> f) {
73 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_UpdateEventsConfiguration_, context, request, response, std::move(f));
74}
75
76void NativeEventsManagementService::Stub::experimental_async::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, std::function<void(::grpc::Status)> f) {
77 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_UpdateEventsConfiguration_, context, request, response, std::move(f));
78}
79
80void NativeEventsManagementService::Stub::experimental_async::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
81 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_UpdateEventsConfiguration_, context, request, response, reactor);
82}
83
84void NativeEventsManagementService::Stub::experimental_async::UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
85 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_UpdateEventsConfiguration_, context, request, response, reactor);
86}
87
88::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>* NativeEventsManagementService::Stub::AsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) {
89 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::EventsConfigurationResponse>::Create(channel_.get(), cq, rpcmethod_UpdateEventsConfiguration_, context, request, true);
90}
91
92::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>* NativeEventsManagementService::Stub::PrepareAsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) {
93 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::EventsConfigurationResponse>::Create(channel_.get(), cq, rpcmethod_UpdateEventsConfiguration_, context, request, false);
94}
95
96NativeEventsManagementService::Service::Service() {
97 AddMethod(new ::grpc::internal::RpcServiceMethod(
98 NativeEventsManagementService_method_names[0],
99 ::grpc::internal::RpcMethod::NORMAL_RPC,
100 new ::grpc::internal::RpcMethodHandler< NativeEventsManagementService::Service, ::dmi::HardwareID, ::dmi::ListEventsResponse>(
101 [](NativeEventsManagementService::Service* service,
102 ::grpc_impl::ServerContext* ctx,
103 const ::dmi::HardwareID* req,
104 ::dmi::ListEventsResponse* resp) {
105 return service->ListEvents(ctx, req, resp);
106 }, this)));
107 AddMethod(new ::grpc::internal::RpcServiceMethod(
108 NativeEventsManagementService_method_names[1],
109 ::grpc::internal::RpcMethod::NORMAL_RPC,
110 new ::grpc::internal::RpcMethodHandler< NativeEventsManagementService::Service, ::dmi::EventsConfigurationRequest, ::dmi::EventsConfigurationResponse>(
111 [](NativeEventsManagementService::Service* service,
112 ::grpc_impl::ServerContext* ctx,
113 const ::dmi::EventsConfigurationRequest* req,
114 ::dmi::EventsConfigurationResponse* resp) {
115 return service->UpdateEventsConfiguration(ctx, req, resp);
116 }, this)));
117}
118
119NativeEventsManagementService::Service::~Service() {
120}
121
122::grpc::Status NativeEventsManagementService::Service::ListEvents(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response) {
123 (void) context;
124 (void) request;
125 (void) response;
126 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
127}
128
129::grpc::Status NativeEventsManagementService::Service::UpdateEventsConfiguration(::grpc::ServerContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response) {
130 (void) context;
131 (void) request;
132 (void) response;
133 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
134}
135
136
137} // namespace dmi
138