blob: fee66d463cd79316f57e34e742a62118eb307074 [file] [log] [blame]
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: dmi/hw_events_mgmt_service.proto
#ifndef GRPC_dmi_2fhw_5fevents_5fmgmt_5fservice_2eproto__INCLUDED
#define GRPC_dmi_2fhw_5fevents_5fmgmt_5fservice_2eproto__INCLUDED
#include "dmi/hw_events_mgmt_service.pb.h"
#include <grpc++/impl/codegen/async_stream.h>
#include <grpc++/impl/codegen/async_unary_call.h>
#include <grpc++/impl/codegen/method_handler_impl.h>
#include <grpc++/impl/codegen/proto_utils.h>
#include <grpc++/impl/codegen/rpc_method.h>
#include <grpc++/impl/codegen/service_type.h>
#include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/stub_options.h>
#include <grpc++/impl/codegen/sync_stream.h>
namespace grpc {
class CompletionQueue;
class Channel;
class RpcService;
class ServerCompletionQueue;
class ServerContext;
} // namespace grpc
namespace dmi {
class NativeEventsManagementService final {
public:
class StubInterface {
public:
virtual ~StubInterface() {}
// List the supported events for the passed device
virtual ::grpc::Status ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::ListEventsResponse* response) = 0;
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::ListEventsResponse>> AsyncListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::ListEventsResponse>>(AsyncListEventsRaw(context, request, cq));
}
// Updates the configuration of the list of events in the request
// The default behavior of the device is to report all the supported events
// This configuration is persisted across reboots of the device or the device manager
virtual ::grpc::Status UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::dmi::EventsConfigurationResponse* response) = 0;
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::EventsConfigurationResponse>> AsyncUpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::EventsConfigurationResponse>>(AsyncUpdateEventsConfigurationRaw(context, request, cq));
}
// Initiate the server streaming of the events
std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::Event>> StreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) {
return std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::Event>>(StreamEventsRaw(context, request));
}
std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::Event>> AsyncStreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::Event>>(AsyncStreamEventsRaw(context, request, cq, tag));
}
private:
virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::ListEventsResponse>* AsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::EventsConfigurationResponse>* AsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientReaderInterface< ::dmi::Event>* StreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) = 0;
virtual ::grpc::ClientAsyncReaderInterface< ::dmi::Event>* AsyncStreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
};
class Stub final : public StubInterface {
public:
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
::grpc::Status ListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::ListEventsResponse* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>> AsyncListEvents(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>>(AsyncListEventsRaw(context, request, cq));
}
::grpc::Status UpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::dmi::EventsConfigurationResponse* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>> AsyncUpdateEventsConfiguration(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>>(AsyncUpdateEventsConfigurationRaw(context, request, cq));
}
std::unique_ptr< ::grpc::ClientReader< ::dmi::Event>> StreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) {
return std::unique_ptr< ::grpc::ClientReader< ::dmi::Event>>(StreamEventsRaw(context, request));
}
std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::Event>> AsyncStreamEvents(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::Event>>(AsyncStreamEventsRaw(context, request, cq, tag));
}
private:
std::shared_ptr< ::grpc::ChannelInterface> channel_;
::grpc::ClientAsyncResponseReader< ::dmi::ListEventsResponse>* AsyncListEventsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::dmi::EventsConfigurationResponse>* AsyncUpdateEventsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::EventsConfigurationRequest& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientReader< ::dmi::Event>* StreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) override;
::grpc::ClientAsyncReader< ::dmi::Event>* AsyncStreamEventsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) override;
const ::grpc::RpcMethod rpcmethod_ListEvents_;
const ::grpc::RpcMethod rpcmethod_UpdateEventsConfiguration_;
const ::grpc::RpcMethod rpcmethod_StreamEvents_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
class Service : public ::grpc::Service {
public:
Service();
virtual ~Service();
// List the supported events for the passed device
virtual ::grpc::Status ListEvents(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response);
// Updates the configuration of the list of events in the request
// The default behavior of the device is to report all the supported events
// This configuration is persisted across reboots of the device or the device manager
virtual ::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response);
// Initiate the server streaming of the events
virtual ::grpc::Status StreamEvents(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::grpc::ServerWriter< ::dmi::Event>* writer);
};
template <class BaseClass>
class WithAsyncMethod_ListEvents : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithAsyncMethod_ListEvents() {
::grpc::Service::MarkMethodAsync(0);
}
~WithAsyncMethod_ListEvents() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status ListEvents(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestListEvents(::grpc::ServerContext* context, ::dmi::HardwareID* request, ::grpc::ServerAsyncResponseWriter< ::dmi::ListEventsResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithAsyncMethod_UpdateEventsConfiguration : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithAsyncMethod_UpdateEventsConfiguration() {
::grpc::Service::MarkMethodAsync(1);
}
~WithAsyncMethod_UpdateEventsConfiguration() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestUpdateEventsConfiguration(::grpc::ServerContext* context, ::dmi::EventsConfigurationRequest* request, ::grpc::ServerAsyncResponseWriter< ::dmi::EventsConfigurationResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithAsyncMethod_StreamEvents : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithAsyncMethod_StreamEvents() {
::grpc::Service::MarkMethodAsync(2);
}
~WithAsyncMethod_StreamEvents() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status StreamEvents(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::grpc::ServerWriter< ::dmi::Event>* writer) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
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) {
::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag);
}
};
typedef WithAsyncMethod_ListEvents<WithAsyncMethod_UpdateEventsConfiguration<WithAsyncMethod_StreamEvents<Service > > > AsyncService;
template <class BaseClass>
class WithGenericMethod_ListEvents : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithGenericMethod_ListEvents() {
::grpc::Service::MarkMethodGeneric(0);
}
~WithGenericMethod_ListEvents() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status ListEvents(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
template <class BaseClass>
class WithGenericMethod_UpdateEventsConfiguration : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithGenericMethod_UpdateEventsConfiguration() {
::grpc::Service::MarkMethodGeneric(1);
}
~WithGenericMethod_UpdateEventsConfiguration() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
template <class BaseClass>
class WithGenericMethod_StreamEvents : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithGenericMethod_StreamEvents() {
::grpc::Service::MarkMethodGeneric(2);
}
~WithGenericMethod_StreamEvents() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status StreamEvents(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::grpc::ServerWriter< ::dmi::Event>* writer) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
template <class BaseClass>
class WithStreamedUnaryMethod_ListEvents : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithStreamedUnaryMethod_ListEvents() {
::grpc::Service::MarkMethodStreamed(0,
new ::grpc::StreamedUnaryHandler< ::dmi::HardwareID, ::dmi::ListEventsResponse>(std::bind(&WithStreamedUnaryMethod_ListEvents<BaseClass>::StreamedListEvents, this, std::placeholders::_1, std::placeholders::_2)));
}
~WithStreamedUnaryMethod_ListEvents() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status ListEvents(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::ListEventsResponse* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with streamed unary
virtual ::grpc::Status StreamedListEvents(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dmi::HardwareID,::dmi::ListEventsResponse>* server_unary_streamer) = 0;
};
template <class BaseClass>
class WithStreamedUnaryMethod_UpdateEventsConfiguration : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithStreamedUnaryMethod_UpdateEventsConfiguration() {
::grpc::Service::MarkMethodStreamed(1,
new ::grpc::StreamedUnaryHandler< ::dmi::EventsConfigurationRequest, ::dmi::EventsConfigurationResponse>(std::bind(&WithStreamedUnaryMethod_UpdateEventsConfiguration<BaseClass>::StreamedUpdateEventsConfiguration, this, std::placeholders::_1, std::placeholders::_2)));
}
~WithStreamedUnaryMethod_UpdateEventsConfiguration() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status UpdateEventsConfiguration(::grpc::ServerContext* context, const ::dmi::EventsConfigurationRequest* request, ::dmi::EventsConfigurationResponse* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with streamed unary
virtual ::grpc::Status StreamedUpdateEventsConfiguration(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dmi::EventsConfigurationRequest,::dmi::EventsConfigurationResponse>* server_unary_streamer) = 0;
};
typedef WithStreamedUnaryMethod_ListEvents<WithStreamedUnaryMethod_UpdateEventsConfiguration<Service > > StreamedUnaryService;
template <class BaseClass>
class WithSplitStreamingMethod_StreamEvents : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithSplitStreamingMethod_StreamEvents() {
::grpc::Service::MarkMethodStreamed(2,
new ::grpc::SplitServerStreamingHandler< ::google::protobuf::Empty, ::dmi::Event>(std::bind(&WithSplitStreamingMethod_StreamEvents<BaseClass>::StreamedStreamEvents, this, std::placeholders::_1, std::placeholders::_2)));
}
~WithSplitStreamingMethod_StreamEvents() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status StreamEvents(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::grpc::ServerWriter< ::dmi::Event>* writer) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with split streamed
virtual ::grpc::Status StreamedStreamEvents(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::google::protobuf::Empty,::dmi::Event>* server_split_streamer) = 0;
};
typedef WithSplitStreamingMethod_StreamEvents<Service > SplitStreamedService;
typedef WithStreamedUnaryMethod_ListEvents<WithStreamedUnaryMethod_UpdateEventsConfiguration<WithSplitStreamingMethod_StreamEvents<Service > > > StreamedService;
};
} // namespace dmi
#endif // GRPC_dmi_2fhw_5fevents_5fmgmt_5fservice_2eproto__INCLUDED