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 | #ifndef GRPC_dmi_2fhw_5fevents_5fmgmt_5fservice_2eproto__INCLUDED |
| 5 | #define GRPC_dmi_2fhw_5fevents_5fmgmt_5fservice_2eproto__INCLUDED |
| 6 | |
| 7 | #include "dmi/hw_events_mgmt_service.pb.h" |
| 8 | |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 9 | #include <functional> |
| 10 | #include <grpc/impl/codegen/port_platform.h> |
| 11 | #include <grpcpp/impl/codegen/async_generic_service.h> |
| 12 | #include <grpcpp/impl/codegen/async_stream.h> |
| 13 | #include <grpcpp/impl/codegen/async_unary_call.h> |
| 14 | #include <grpcpp/impl/codegen/client_callback.h> |
| 15 | #include <grpcpp/impl/codegen/client_context.h> |
| 16 | #include <grpcpp/impl/codegen/completion_queue.h> |
| 17 | #include <grpcpp/impl/codegen/message_allocator.h> |
| 18 | #include <grpcpp/impl/codegen/method_handler.h> |
| 19 | #include <grpcpp/impl/codegen/proto_utils.h> |
| 20 | #include <grpcpp/impl/codegen/rpc_method.h> |
| 21 | #include <grpcpp/impl/codegen/server_callback.h> |
| 22 | #include <grpcpp/impl/codegen/server_callback_handlers.h> |
| 23 | #include <grpcpp/impl/codegen/server_context.h> |
| 24 | #include <grpcpp/impl/codegen/service_type.h> |
| 25 | #include <grpcpp/impl/codegen/status.h> |
| 26 | #include <grpcpp/impl/codegen/stub_options.h> |
| 27 | #include <grpcpp/impl/codegen/sync_stream.h> |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 28 | |
| 29 | namespace dmi { |
| 30 | |
| 31 | class NativeEventsManagementService final { |
| 32 | public: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 33 | static constexpr char const* service_full_name() { |
| 34 | return "dmi.NativeEventsManagementService"; |
| 35 | } |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 36 | class StubInterface { |
| 37 | public: |
| 38 | virtual ~StubInterface() {} |
| 39 | // List the supported events for the passed device
|
| 40 | virtual ::grpc::Status ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::ListEventsResponse* response) = 0; |
| 41 | std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::ListEventsResponse>> AsyncListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) { |
| 42 | return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::ListEventsResponse>>(AsyncListEventsRaw(context, request, cq)); |
| 43 | } |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 44 | std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::ListEventsResponse>> PrepareAsyncListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) { |
| 45 | return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::ListEventsResponse>>(PrepareAsyncListEventsRaw(context, request, cq)); |
| 46 | } |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 47 | // Updates the configuration of the list of events in the request
|
| 48 | // The default behavior of the device is to report all the supported events
|
| 49 | // This configuration is persisted across reboots of the device or the device manager
|
| 50 | virtual ::grpc::Status UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::dmi::EventsConfigurationResponse* response) = 0; |
| 51 | std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::EventsConfigurationResponse>> AsyncUpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) { |
| 52 | return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::EventsConfigurationResponse>>(AsyncUpdateEventsConfigurationRaw(context, request, cq)); |
| 53 | } |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 54 | std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::EventsConfigurationResponse>> PrepareAsyncUpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) { |
| 55 | return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::EventsConfigurationResponse>>(PrepareAsyncUpdateEventsConfigurationRaw(context, request, cq)); |
| 56 | } |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 57 | // Initiate the server streaming of the events
|
| 58 | std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::Event>> StreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) { |
| 59 | return std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::Event>>(StreamEventsRaw(context, request)); |
| 60 | } |
| 61 | std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::Event>> AsyncStreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) { |
| 62 | return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::Event>>(AsyncStreamEventsRaw(context, request, cq, tag)); |
| 63 | } |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 64 | std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::Event>> PrepareAsyncStreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) { |
| 65 | return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::Event>>(PrepareAsyncStreamEventsRaw(context, request, cq)); |
| 66 | } |
| 67 | class experimental_async_interface { |
| 68 | public: |
| 69 | virtual ~experimental_async_interface() {} |
| 70 | // List the supported events for the passed device
|
| 71 | virtual void ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, std::function<void(::grpc::Status)>) = 0; |
| 72 | virtual void ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, std::function<void(::grpc::Status)>) = 0; |
| 73 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 74 | virtual void ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; |
| 75 | #else |
| 76 | virtual void ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; |
| 77 | #endif |
| 78 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 79 | virtual void ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; |
| 80 | #else |
| 81 | virtual void ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; |
| 82 | #endif |
| 83 | // Updates the configuration of the list of events in the request
|
| 84 | // The default behavior of the device is to report all the supported events
|
| 85 | // This configuration is persisted across reboots of the device or the device manager
|
| 86 | virtual void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, std::function<void(::grpc::Status)>) = 0; |
| 87 | virtual void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, std::function<void(::grpc::Status)>) = 0; |
| 88 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 89 | virtual void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; |
| 90 | #else |
| 91 | virtual void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; |
| 92 | #endif |
| 93 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 94 | virtual void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; |
| 95 | #else |
| 96 | virtual void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; |
| 97 | #endif |
| 98 | // Initiate the server streaming of the events
|
| 99 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 100 | virtual void StreamEvents(::grpc::ClientContext* context, ::google::protobuf::Empty* request, ::grpc::ClientReadReactor< ::dmi::Event>* reactor) = 0; |
| 101 | #else |
| 102 | virtual void StreamEvents(::grpc::ClientContext* context, ::google::protobuf::Empty* request, ::grpc::experimental::ClientReadReactor< ::dmi::Event>* reactor) = 0; |
| 103 | #endif |
| 104 | }; |
| 105 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 106 | typedef class experimental_async_interface async_interface; |
| 107 | #endif |
| 108 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 109 | async_interface* async() { return experimental_async(); } |
| 110 | #endif |
| 111 | virtual class experimental_async_interface* experimental_async() { return nullptr; } |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 112 | private: |
| 113 | virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::ListEventsResponse>* AsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) = 0; |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 114 | virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::ListEventsResponse>* PrepareAsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) = 0; |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 115 | virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::EventsConfigurationResponse>* AsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) = 0; |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 116 | virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::EventsConfigurationResponse>* PrepareAsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) = 0; |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 117 | virtual ::grpc::ClientReaderInterface< ::dmi::Event>* StreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) = 0; |
| 118 | virtual ::grpc::ClientAsyncReaderInterface< ::dmi::Event>* AsyncStreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) = 0; |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 119 | virtual ::grpc::ClientAsyncReaderInterface< ::dmi::Event>* PrepareAsyncStreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0; |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 120 | }; |
| 121 | class Stub final : public StubInterface { |
| 122 | public: |
| 123 | Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); |
| 124 | ::grpc::Status ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::ListEventsResponse* response) override; |
| 125 | std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>> AsyncListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) { |
| 126 | return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>>(AsyncListEventsRaw(context, request, cq)); |
| 127 | } |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 128 | std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>> PrepareAsyncListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) { |
| 129 | return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>>(PrepareAsyncListEventsRaw(context, request, cq)); |
| 130 | } |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 131 | ::grpc::Status UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::dmi::EventsConfigurationResponse* response) override; |
| 132 | std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>> AsyncUpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) { |
| 133 | return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>>(AsyncUpdateEventsConfigurationRaw(context, request, cq)); |
| 134 | } |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 135 | std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>> PrepareAsyncUpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) { |
| 136 | return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>>(PrepareAsyncUpdateEventsConfigurationRaw(context, request, cq)); |
| 137 | } |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 138 | std::unique_ptr< ::grpc::ClientReader< ::dmi::Event>> StreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) { |
| 139 | return std::unique_ptr< ::grpc::ClientReader< ::dmi::Event>>(StreamEventsRaw(context, request)); |
| 140 | } |
| 141 | std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::Event>> AsyncStreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) { |
| 142 | return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::Event>>(AsyncStreamEventsRaw(context, request, cq, tag)); |
| 143 | } |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 144 | std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::Event>> PrepareAsyncStreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) { |
| 145 | return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::Event>>(PrepareAsyncStreamEventsRaw(context, request, cq)); |
| 146 | } |
| 147 | class experimental_async final : |
| 148 | public StubInterface::experimental_async_interface { |
| 149 | public: |
| 150 | void ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, std::function<void(::grpc::Status)>) override; |
| 151 | void ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, std::function<void(::grpc::Status)>) override; |
| 152 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 153 | void ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, ::grpc::ClientUnaryReactor* reactor) override; |
| 154 | #else |
| 155 | void ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; |
| 156 | #endif |
| 157 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 158 | void ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, ::grpc::ClientUnaryReactor* reactor) override; |
| 159 | #else |
| 160 | void ListEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListEventsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; |
| 161 | #endif |
| 162 | void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, std::function<void(::grpc::Status)>) override; |
| 163 | void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, std::function<void(::grpc::Status)>) override; |
| 164 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 165 | void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, ::grpc::ClientUnaryReactor* reactor) override; |
| 166 | #else |
| 167 | void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; |
| 168 | #endif |
| 169 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 170 | void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, ::grpc::ClientUnaryReactor* reactor) override; |
| 171 | #else |
| 172 | void UpdateEventsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::EventsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; |
| 173 | #endif |
| 174 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 175 | void StreamEvents(::grpc::ClientContext* context, ::google::protobuf::Empty* request, ::grpc::ClientReadReactor< ::dmi::Event>* reactor) override; |
| 176 | #else |
| 177 | void StreamEvents(::grpc::ClientContext* context, ::google::protobuf::Empty* request, ::grpc::experimental::ClientReadReactor< ::dmi::Event>* reactor) override; |
| 178 | #endif |
| 179 | private: |
| 180 | friend class Stub; |
| 181 | explicit experimental_async(Stub* stub): stub_(stub) { } |
| 182 | Stub* stub() { return stub_; } |
| 183 | Stub* stub_; |
| 184 | }; |
| 185 | class experimental_async_interface* experimental_async() override { return &async_stub_; } |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 186 | |
| 187 | private: |
| 188 | std::shared_ptr< ::grpc::ChannelInterface> channel_; |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 189 | class experimental_async async_stub_{this}; |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 190 | ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>* AsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) override; |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 191 | ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>* PrepareAsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) override; |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 192 | ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>* AsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) override; |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 193 | ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>* PrepareAsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) override; |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 194 | ::grpc::ClientReader< ::dmi::Event>* StreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) override; |
| 195 | ::grpc::ClientAsyncReader< ::dmi::Event>* AsyncStreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) override; |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 196 | ::grpc::ClientAsyncReader< ::dmi::Event>* PrepareAsyncStreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override; |
| 197 | const ::grpc::internal::RpcMethod rpcmethod_ListEvents_; |
| 198 | const ::grpc::internal::RpcMethod rpcmethod_UpdateEventsConfiguration_; |
| 199 | const ::grpc::internal::RpcMethod rpcmethod_StreamEvents_; |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 200 | }; |
| 201 | static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); |
| 202 | |
| 203 | class Service : public ::grpc::Service { |
| 204 | public: |
| 205 | Service(); |
| 206 | virtual ~Service(); |
| 207 | // List the supported events for the passed device
|
| 208 | virtual ::grpc::Status ListEvents(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response); |
| 209 | // Updates the configuration of the list of events in the request
|
| 210 | // The default behavior of the device is to report all the supported events
|
| 211 | // This configuration is persisted across reboots of the device or the device manager
|
| 212 | virtual ::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response); |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 213 | // Initiate the server streaming of the events
|
| 214 | virtual ::grpc::Status StreamEvents(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::grpc::ServerWriter< ::dmi::Event>* writer); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 215 | }; |
| 216 | template <class BaseClass> |
| 217 | class WithAsyncMethod_ListEvents : public BaseClass { |
| 218 | private: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 219 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 220 | public: |
| 221 | WithAsyncMethod_ListEvents() { |
| 222 | ::grpc::Service::MarkMethodAsync(0); |
| 223 | } |
| 224 | ~WithAsyncMethod_ListEvents() override { |
| 225 | BaseClassMustBeDerivedFromService(this); |
| 226 | } |
| 227 | // disable synchronous version of this method |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 228 | ::grpc::Status ListEvents(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::ListEventsResponse* /*response*/) override { |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 229 | abort(); |
| 230 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 231 | } |
| 232 | void RequestListEvents(::grpc::ServerContext* context, ::dmi::HardwareID* request, ::grpc::ServerAsyncResponseWriter< ::dmi::ListEventsResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
| 233 | ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); |
| 234 | } |
| 235 | }; |
| 236 | template <class BaseClass> |
| 237 | class WithAsyncMethod_UpdateEventsConfiguration : public BaseClass { |
| 238 | private: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 239 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 240 | public: |
| 241 | WithAsyncMethod_UpdateEventsConfiguration() { |
| 242 | ::grpc::Service::MarkMethodAsync(1); |
| 243 | } |
| 244 | ~WithAsyncMethod_UpdateEventsConfiguration() override { |
| 245 | BaseClassMustBeDerivedFromService(this); |
| 246 | } |
| 247 | // disable synchronous version of this method |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 248 | ::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::EventsConfigurationRequest* /*request*/, ::dmi::EventsConfigurationResponse* /*response*/) override { |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 249 | abort(); |
| 250 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 251 | } |
| 252 | void RequestUpdateEventsConfiguration(::grpc::ServerContext* context, ::dmi::EventsConfigurationRequest* request, ::grpc::ServerAsyncResponseWriter< ::dmi::EventsConfigurationResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
| 253 | ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); |
| 254 | } |
| 255 | }; |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 256 | template <class BaseClass> |
| 257 | class WithAsyncMethod_StreamEvents : public BaseClass { |
| 258 | private: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 259 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 260 | public: |
| 261 | WithAsyncMethod_StreamEvents() { |
| 262 | ::grpc::Service::MarkMethodAsync(2); |
| 263 | } |
| 264 | ~WithAsyncMethod_StreamEvents() override { |
| 265 | BaseClassMustBeDerivedFromService(this); |
| 266 | } |
| 267 | // disable synchronous version of this method |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 268 | ::grpc::Status StreamEvents(::grpc::ServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::grpc::ServerWriter< ::dmi::Event>* /*writer*/) override { |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 269 | abort(); |
| 270 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 271 | } |
| 272 | void RequestStreamEvents(::grpc::ServerContext* context, ::google::protobuf::Empty* request, ::grpc::ServerAsyncWriter< ::dmi::Event>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
| 273 | ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag); |
| 274 | } |
| 275 | }; |
| 276 | typedef WithAsyncMethod_ListEvents<WithAsyncMethod_UpdateEventsConfiguration<WithAsyncMethod_StreamEvents<Service > > > AsyncService; |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 277 | template <class BaseClass> |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 278 | class ExperimentalWithCallbackMethod_ListEvents : public BaseClass { |
| 279 | private: |
| 280 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
| 281 | public: |
| 282 | ExperimentalWithCallbackMethod_ListEvents() { |
| 283 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 284 | ::grpc::Service:: |
| 285 | #else |
| 286 | ::grpc::Service::experimental(). |
| 287 | #endif |
| 288 | MarkMethodCallback(0, |
| 289 | new ::grpc_impl::internal::CallbackUnaryHandler< ::dmi::HardwareID, ::dmi::ListEventsResponse>( |
| 290 | [this]( |
| 291 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 292 | ::grpc::CallbackServerContext* |
| 293 | #else |
| 294 | ::grpc::experimental::CallbackServerContext* |
| 295 | #endif |
| 296 | context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response) { return this->ListEvents(context, request, response); }));} |
| 297 | void SetMessageAllocatorFor_ListEvents( |
| 298 | ::grpc::experimental::MessageAllocator< ::dmi::HardwareID, ::dmi::ListEventsResponse>* allocator) { |
| 299 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 300 | ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); |
| 301 | #else |
| 302 | ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(0); |
| 303 | #endif |
| 304 | static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::dmi::HardwareID, ::dmi::ListEventsResponse>*>(handler) |
| 305 | ->SetMessageAllocator(allocator); |
| 306 | } |
| 307 | ~ExperimentalWithCallbackMethod_ListEvents() override { |
| 308 | BaseClassMustBeDerivedFromService(this); |
| 309 | } |
| 310 | // disable synchronous version of this method |
| 311 | ::grpc::Status ListEvents(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::ListEventsResponse* /*response*/) override { |
| 312 | abort(); |
| 313 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 314 | } |
| 315 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 316 | virtual ::grpc::ServerUnaryReactor* ListEvents( |
| 317 | ::grpc::CallbackServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::ListEventsResponse* /*response*/) |
| 318 | #else |
| 319 | virtual ::grpc::experimental::ServerUnaryReactor* ListEvents( |
| 320 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::ListEventsResponse* /*response*/) |
| 321 | #endif |
| 322 | { return nullptr; } |
| 323 | }; |
| 324 | template <class BaseClass> |
| 325 | class ExperimentalWithCallbackMethod_UpdateEventsConfiguration : public BaseClass { |
| 326 | private: |
| 327 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
| 328 | public: |
| 329 | ExperimentalWithCallbackMethod_UpdateEventsConfiguration() { |
| 330 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 331 | ::grpc::Service:: |
| 332 | #else |
| 333 | ::grpc::Service::experimental(). |
| 334 | #endif |
| 335 | MarkMethodCallback(1, |
| 336 | new ::grpc_impl::internal::CallbackUnaryHandler< ::dmi::EventsConfigurationRequest, ::dmi::EventsConfigurationResponse>( |
| 337 | [this]( |
| 338 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 339 | ::grpc::CallbackServerContext* |
| 340 | #else |
| 341 | ::grpc::experimental::CallbackServerContext* |
| 342 | #endif |
| 343 | context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response) { return this->UpdateEventsConfiguration(context, request, response); }));} |
| 344 | void SetMessageAllocatorFor_UpdateEventsConfiguration( |
| 345 | ::grpc::experimental::MessageAllocator< ::dmi::EventsConfigurationRequest, ::dmi::EventsConfigurationResponse>* allocator) { |
| 346 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 347 | ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); |
| 348 | #else |
| 349 | ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(1); |
| 350 | #endif |
| 351 | static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::dmi::EventsConfigurationRequest, ::dmi::EventsConfigurationResponse>*>(handler) |
| 352 | ->SetMessageAllocator(allocator); |
| 353 | } |
| 354 | ~ExperimentalWithCallbackMethod_UpdateEventsConfiguration() override { |
| 355 | BaseClassMustBeDerivedFromService(this); |
| 356 | } |
| 357 | // disable synchronous version of this method |
| 358 | ::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::EventsConfigurationRequest* /*request*/, ::dmi::EventsConfigurationResponse* /*response*/) override { |
| 359 | abort(); |
| 360 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 361 | } |
| 362 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 363 | virtual ::grpc::ServerUnaryReactor* UpdateEventsConfiguration( |
| 364 | ::grpc::CallbackServerContext* /*context*/, const ::dmi::EventsConfigurationRequest* /*request*/, ::dmi::EventsConfigurationResponse* /*response*/) |
| 365 | #else |
| 366 | virtual ::grpc::experimental::ServerUnaryReactor* UpdateEventsConfiguration( |
| 367 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::dmi::EventsConfigurationRequest* /*request*/, ::dmi::EventsConfigurationResponse* /*response*/) |
| 368 | #endif |
| 369 | { return nullptr; } |
| 370 | }; |
| 371 | template <class BaseClass> |
| 372 | class ExperimentalWithCallbackMethod_StreamEvents : public BaseClass { |
| 373 | private: |
| 374 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
| 375 | public: |
| 376 | ExperimentalWithCallbackMethod_StreamEvents() { |
| 377 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 378 | ::grpc::Service:: |
| 379 | #else |
| 380 | ::grpc::Service::experimental(). |
| 381 | #endif |
| 382 | MarkMethodCallback(2, |
| 383 | new ::grpc_impl::internal::CallbackServerStreamingHandler< ::google::protobuf::Empty, ::dmi::Event>( |
| 384 | [this]( |
| 385 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 386 | ::grpc::CallbackServerContext* |
| 387 | #else |
| 388 | ::grpc::experimental::CallbackServerContext* |
| 389 | #endif |
| 390 | context, const ::google::protobuf::Empty* request) { return this->StreamEvents(context, request); })); |
| 391 | } |
| 392 | ~ExperimentalWithCallbackMethod_StreamEvents() override { |
| 393 | BaseClassMustBeDerivedFromService(this); |
| 394 | } |
| 395 | // disable synchronous version of this method |
| 396 | ::grpc::Status StreamEvents(::grpc::ServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::grpc::ServerWriter< ::dmi::Event>* /*writer*/) override { |
| 397 | abort(); |
| 398 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 399 | } |
| 400 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 401 | virtual ::grpc::ServerWriteReactor< ::dmi::Event>* StreamEvents( |
| 402 | ::grpc::CallbackServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/) |
| 403 | #else |
| 404 | virtual ::grpc::experimental::ServerWriteReactor< ::dmi::Event>* StreamEvents( |
| 405 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/) |
| 406 | #endif |
| 407 | { return nullptr; } |
| 408 | }; |
| 409 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 410 | typedef ExperimentalWithCallbackMethod_ListEvents<ExperimentalWithCallbackMethod_UpdateEventsConfiguration<ExperimentalWithCallbackMethod_StreamEvents<Service > > > CallbackService; |
| 411 | #endif |
| 412 | |
| 413 | typedef ExperimentalWithCallbackMethod_ListEvents<ExperimentalWithCallbackMethod_UpdateEventsConfiguration<ExperimentalWithCallbackMethod_StreamEvents<Service > > > ExperimentalCallbackService; |
| 414 | template <class BaseClass> |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 415 | class WithGenericMethod_ListEvents : public BaseClass { |
| 416 | private: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 417 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 418 | public: |
| 419 | WithGenericMethod_ListEvents() { |
| 420 | ::grpc::Service::MarkMethodGeneric(0); |
| 421 | } |
| 422 | ~WithGenericMethod_ListEvents() override { |
| 423 | BaseClassMustBeDerivedFromService(this); |
| 424 | } |
| 425 | // disable synchronous version of this method |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 426 | ::grpc::Status ListEvents(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::ListEventsResponse* /*response*/) override { |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 427 | abort(); |
| 428 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 429 | } |
| 430 | }; |
| 431 | template <class BaseClass> |
| 432 | class WithGenericMethod_UpdateEventsConfiguration : public BaseClass { |
| 433 | private: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 434 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 435 | public: |
| 436 | WithGenericMethod_UpdateEventsConfiguration() { |
| 437 | ::grpc::Service::MarkMethodGeneric(1); |
| 438 | } |
| 439 | ~WithGenericMethod_UpdateEventsConfiguration() override { |
| 440 | BaseClassMustBeDerivedFromService(this); |
| 441 | } |
| 442 | // disable synchronous version of this method |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 443 | ::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::EventsConfigurationRequest* /*request*/, ::dmi::EventsConfigurationResponse* /*response*/) override { |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 444 | abort(); |
| 445 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 446 | } |
| 447 | }; |
| 448 | template <class BaseClass> |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 449 | class WithGenericMethod_StreamEvents : public BaseClass { |
| 450 | private: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 451 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 452 | public: |
| 453 | WithGenericMethod_StreamEvents() { |
| 454 | ::grpc::Service::MarkMethodGeneric(2); |
| 455 | } |
| 456 | ~WithGenericMethod_StreamEvents() override { |
| 457 | BaseClassMustBeDerivedFromService(this); |
| 458 | } |
| 459 | // disable synchronous version of this method |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 460 | ::grpc::Status StreamEvents(::grpc::ServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::grpc::ServerWriter< ::dmi::Event>* /*writer*/) override { |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 461 | abort(); |
| 462 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 463 | } |
| 464 | }; |
| 465 | template <class BaseClass> |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 466 | class WithRawMethod_ListEvents : public BaseClass { |
| 467 | private: |
| 468 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
| 469 | public: |
| 470 | WithRawMethod_ListEvents() { |
| 471 | ::grpc::Service::MarkMethodRaw(0); |
| 472 | } |
| 473 | ~WithRawMethod_ListEvents() override { |
| 474 | BaseClassMustBeDerivedFromService(this); |
| 475 | } |
| 476 | // disable synchronous version of this method |
| 477 | ::grpc::Status ListEvents(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::ListEventsResponse* /*response*/) override { |
| 478 | abort(); |
| 479 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 480 | } |
| 481 | void RequestListEvents(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
| 482 | ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); |
| 483 | } |
| 484 | }; |
| 485 | template <class BaseClass> |
| 486 | class WithRawMethod_UpdateEventsConfiguration : public BaseClass { |
| 487 | private: |
| 488 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
| 489 | public: |
| 490 | WithRawMethod_UpdateEventsConfiguration() { |
| 491 | ::grpc::Service::MarkMethodRaw(1); |
| 492 | } |
| 493 | ~WithRawMethod_UpdateEventsConfiguration() override { |
| 494 | BaseClassMustBeDerivedFromService(this); |
| 495 | } |
| 496 | // disable synchronous version of this method |
| 497 | ::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::EventsConfigurationRequest* /*request*/, ::dmi::EventsConfigurationResponse* /*response*/) override { |
| 498 | abort(); |
| 499 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 500 | } |
| 501 | void RequestUpdateEventsConfiguration(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
| 502 | ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); |
| 503 | } |
| 504 | }; |
| 505 | template <class BaseClass> |
| 506 | class WithRawMethod_StreamEvents : public BaseClass { |
| 507 | private: |
| 508 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
| 509 | public: |
| 510 | WithRawMethod_StreamEvents() { |
| 511 | ::grpc::Service::MarkMethodRaw(2); |
| 512 | } |
| 513 | ~WithRawMethod_StreamEvents() override { |
| 514 | BaseClassMustBeDerivedFromService(this); |
| 515 | } |
| 516 | // disable synchronous version of this method |
| 517 | ::grpc::Status StreamEvents(::grpc::ServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::grpc::ServerWriter< ::dmi::Event>* /*writer*/) override { |
| 518 | abort(); |
| 519 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 520 | } |
| 521 | void RequestStreamEvents(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
| 522 | ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag); |
| 523 | } |
| 524 | }; |
| 525 | template <class BaseClass> |
| 526 | class ExperimentalWithRawCallbackMethod_ListEvents : public BaseClass { |
| 527 | private: |
| 528 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
| 529 | public: |
| 530 | ExperimentalWithRawCallbackMethod_ListEvents() { |
| 531 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 532 | ::grpc::Service:: |
| 533 | #else |
| 534 | ::grpc::Service::experimental(). |
| 535 | #endif |
| 536 | MarkMethodRawCallback(0, |
| 537 | new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( |
| 538 | [this]( |
| 539 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 540 | ::grpc::CallbackServerContext* |
| 541 | #else |
| 542 | ::grpc::experimental::CallbackServerContext* |
| 543 | #endif |
| 544 | context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ListEvents(context, request, response); })); |
| 545 | } |
| 546 | ~ExperimentalWithRawCallbackMethod_ListEvents() override { |
| 547 | BaseClassMustBeDerivedFromService(this); |
| 548 | } |
| 549 | // disable synchronous version of this method |
| 550 | ::grpc::Status ListEvents(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::ListEventsResponse* /*response*/) override { |
| 551 | abort(); |
| 552 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 553 | } |
| 554 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 555 | virtual ::grpc::ServerUnaryReactor* ListEvents( |
| 556 | ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) |
| 557 | #else |
| 558 | virtual ::grpc::experimental::ServerUnaryReactor* ListEvents( |
| 559 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) |
| 560 | #endif |
| 561 | { return nullptr; } |
| 562 | }; |
| 563 | template <class BaseClass> |
| 564 | class ExperimentalWithRawCallbackMethod_UpdateEventsConfiguration : public BaseClass { |
| 565 | private: |
| 566 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
| 567 | public: |
| 568 | ExperimentalWithRawCallbackMethod_UpdateEventsConfiguration() { |
| 569 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 570 | ::grpc::Service:: |
| 571 | #else |
| 572 | ::grpc::Service::experimental(). |
| 573 | #endif |
| 574 | MarkMethodRawCallback(1, |
| 575 | new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( |
| 576 | [this]( |
| 577 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 578 | ::grpc::CallbackServerContext* |
| 579 | #else |
| 580 | ::grpc::experimental::CallbackServerContext* |
| 581 | #endif |
| 582 | context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->UpdateEventsConfiguration(context, request, response); })); |
| 583 | } |
| 584 | ~ExperimentalWithRawCallbackMethod_UpdateEventsConfiguration() override { |
| 585 | BaseClassMustBeDerivedFromService(this); |
| 586 | } |
| 587 | // disable synchronous version of this method |
| 588 | ::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::EventsConfigurationRequest* /*request*/, ::dmi::EventsConfigurationResponse* /*response*/) override { |
| 589 | abort(); |
| 590 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 591 | } |
| 592 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 593 | virtual ::grpc::ServerUnaryReactor* UpdateEventsConfiguration( |
| 594 | ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) |
| 595 | #else |
| 596 | virtual ::grpc::experimental::ServerUnaryReactor* UpdateEventsConfiguration( |
| 597 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) |
| 598 | #endif |
| 599 | { return nullptr; } |
| 600 | }; |
| 601 | template <class BaseClass> |
| 602 | class ExperimentalWithRawCallbackMethod_StreamEvents : public BaseClass { |
| 603 | private: |
| 604 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
| 605 | public: |
| 606 | ExperimentalWithRawCallbackMethod_StreamEvents() { |
| 607 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 608 | ::grpc::Service:: |
| 609 | #else |
| 610 | ::grpc::Service::experimental(). |
| 611 | #endif |
| 612 | MarkMethodRawCallback(2, |
| 613 | new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( |
| 614 | [this]( |
| 615 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 616 | ::grpc::CallbackServerContext* |
| 617 | #else |
| 618 | ::grpc::experimental::CallbackServerContext* |
| 619 | #endif |
| 620 | context, const::grpc::ByteBuffer* request) { return this->StreamEvents(context, request); })); |
| 621 | } |
| 622 | ~ExperimentalWithRawCallbackMethod_StreamEvents() override { |
| 623 | BaseClassMustBeDerivedFromService(this); |
| 624 | } |
| 625 | // disable synchronous version of this method |
| 626 | ::grpc::Status StreamEvents(::grpc::ServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::grpc::ServerWriter< ::dmi::Event>* /*writer*/) override { |
| 627 | abort(); |
| 628 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 629 | } |
| 630 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
| 631 | virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* StreamEvents( |
| 632 | ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) |
| 633 | #else |
| 634 | virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* StreamEvents( |
| 635 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) |
| 636 | #endif |
| 637 | { return nullptr; } |
| 638 | }; |
| 639 | template <class BaseClass> |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 640 | class WithStreamedUnaryMethod_ListEvents : public BaseClass { |
| 641 | private: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 642 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 643 | public: |
| 644 | WithStreamedUnaryMethod_ListEvents() { |
| 645 | ::grpc::Service::MarkMethodStreamed(0, |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 646 | new ::grpc::internal::StreamedUnaryHandler< |
| 647 | ::dmi::HardwareID, ::dmi::ListEventsResponse>( |
| 648 | [this](::grpc_impl::ServerContext* context, |
| 649 | ::grpc_impl::ServerUnaryStreamer< |
| 650 | ::dmi::HardwareID, ::dmi::ListEventsResponse>* streamer) { |
| 651 | return this->StreamedListEvents(context, |
| 652 | streamer); |
| 653 | })); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 654 | } |
| 655 | ~WithStreamedUnaryMethod_ListEvents() override { |
| 656 | BaseClassMustBeDerivedFromService(this); |
| 657 | } |
| 658 | // disable regular version of this method |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 659 | ::grpc::Status ListEvents(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::ListEventsResponse* /*response*/) override { |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 660 | abort(); |
| 661 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 662 | } |
| 663 | // replace default version of method with streamed unary |
| 664 | virtual ::grpc::Status StreamedListEvents(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dmi::HardwareID,::dmi::ListEventsResponse>* server_unary_streamer) = 0; |
| 665 | }; |
| 666 | template <class BaseClass> |
| 667 | class WithStreamedUnaryMethod_UpdateEventsConfiguration : public BaseClass { |
| 668 | private: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 669 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 670 | public: |
| 671 | WithStreamedUnaryMethod_UpdateEventsConfiguration() { |
| 672 | ::grpc::Service::MarkMethodStreamed(1, |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 673 | new ::grpc::internal::StreamedUnaryHandler< |
| 674 | ::dmi::EventsConfigurationRequest, ::dmi::EventsConfigurationResponse>( |
| 675 | [this](::grpc_impl::ServerContext* context, |
| 676 | ::grpc_impl::ServerUnaryStreamer< |
| 677 | ::dmi::EventsConfigurationRequest, ::dmi::EventsConfigurationResponse>* streamer) { |
| 678 | return this->StreamedUpdateEventsConfiguration(context, |
| 679 | streamer); |
| 680 | })); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 681 | } |
| 682 | ~WithStreamedUnaryMethod_UpdateEventsConfiguration() override { |
| 683 | BaseClassMustBeDerivedFromService(this); |
| 684 | } |
| 685 | // disable regular version of this method |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 686 | ::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::EventsConfigurationRequest* /*request*/, ::dmi::EventsConfigurationResponse* /*response*/) override { |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 687 | abort(); |
| 688 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 689 | } |
| 690 | // replace default version of method with streamed unary |
| 691 | virtual ::grpc::Status StreamedUpdateEventsConfiguration(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dmi::EventsConfigurationRequest,::dmi::EventsConfigurationResponse>* server_unary_streamer) = 0; |
| 692 | }; |
| 693 | typedef WithStreamedUnaryMethod_ListEvents<WithStreamedUnaryMethod_UpdateEventsConfiguration<Service > > StreamedUnaryService; |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 694 | template <class BaseClass> |
| 695 | class WithSplitStreamingMethod_StreamEvents : public BaseClass { |
| 696 | private: |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 697 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 698 | public: |
| 699 | WithSplitStreamingMethod_StreamEvents() { |
| 700 | ::grpc::Service::MarkMethodStreamed(2, |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 701 | new ::grpc::internal::SplitServerStreamingHandler< |
| 702 | ::google::protobuf::Empty, ::dmi::Event>( |
| 703 | [this](::grpc_impl::ServerContext* context, |
| 704 | ::grpc_impl::ServerSplitStreamer< |
| 705 | ::google::protobuf::Empty, ::dmi::Event>* streamer) { |
| 706 | return this->StreamedStreamEvents(context, |
| 707 | streamer); |
| 708 | })); |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 709 | } |
| 710 | ~WithSplitStreamingMethod_StreamEvents() override { |
| 711 | BaseClassMustBeDerivedFromService(this); |
| 712 | } |
| 713 | // disable regular version of this method |
Andrea Campanella | 03d4e7a | 2021-04-28 15:34:46 +0200 | [diff] [blame] | 714 | ::grpc::Status StreamEvents(::grpc::ServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::grpc::ServerWriter< ::dmi::Event>* /*writer*/) override { |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 715 | abort(); |
| 716 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 717 | } |
| 718 | // replace default version of method with split streamed |
| 719 | virtual ::grpc::Status StreamedStreamEvents(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::google::protobuf::Empty,::dmi::Event>* server_split_streamer) = 0; |
| 720 | }; |
| 721 | typedef WithSplitStreamingMethod_StreamEvents<Service > SplitStreamedService; |
| 722 | typedef WithStreamedUnaryMethod_ListEvents<WithStreamedUnaryMethod_UpdateEventsConfiguration<WithSplitStreamingMethod_StreamEvents<Service > > > StreamedService; |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 723 | }; |
| 724 | |
| 725 | } // namespace dmi |
| 726 | |
| 727 | |
| 728 | #endif // GRPC_dmi_2fhw_5fevents_5fmgmt_5fservice_2eproto__INCLUDED |