FAQ/Protos/faq_hook.grpc.pb.h

301 lines
15 KiB
C++

// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: faq_hook.proto
#ifndef GRPC_faq_5fhook_2eproto__INCLUDED
#define GRPC_faq_5fhook_2eproto__INCLUDED
#include "faq_hook.pb.h"
#include <functional>
#include <grpc/impl/codegen/port_platform.h>
#include <grpcpp/impl/codegen/async_generic_service.h>
#include <grpcpp/impl/codegen/async_stream.h>
#include <grpcpp/impl/codegen/async_unary_call.h>
#include <grpcpp/impl/codegen/client_callback.h>
#include <grpcpp/impl/codegen/client_context.h>
#include <grpcpp/impl/codegen/completion_queue.h>
#include <grpcpp/impl/codegen/message_allocator.h>
#include <grpcpp/impl/codegen/method_handler.h>
#include <grpcpp/impl/codegen/proto_utils.h>
#include <grpcpp/impl/codegen/rpc_method.h>
#include <grpcpp/impl/codegen/server_callback.h>
#include <grpcpp/impl/codegen/server_callback_handlers.h>
#include <grpcpp/impl/codegen/server_context.h>
#include <grpcpp/impl/codegen/service_type.h>
#include <grpcpp/impl/codegen/status.h>
#include <grpcpp/impl/codegen/stub_options.h>
#include <grpcpp/impl/codegen/sync_stream.h>
namespace faq {
class FaQSQLite final {
public:
static constexpr char const* service_full_name() {
return "faq.FaQSQLite";
}
class StubInterface {
public:
virtual ~StubInterface() {}
std::unique_ptr< ::grpc::ClientReaderInterface< ::faq::SQLiteQueryRow>> Query(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request) {
return std::unique_ptr< ::grpc::ClientReaderInterface< ::faq::SQLiteQueryRow>>(QueryRaw(context, request));
}
std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::faq::SQLiteQueryRow>> AsyncQuery(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::faq::SQLiteQueryRow>>(AsyncQueryRaw(context, request, cq, tag));
}
std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::faq::SQLiteQueryRow>> PrepareAsyncQuery(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::faq::SQLiteQueryRow>>(PrepareAsyncQueryRaw(context, request, cq));
}
class experimental_async_interface {
public:
virtual ~experimental_async_interface() {}
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
virtual void Query(::grpc::ClientContext* context, ::faq::SQLiteQueryString* request, ::grpc::ClientReadReactor< ::faq::SQLiteQueryRow>* reactor) = 0;
#else
virtual void Query(::grpc::ClientContext* context, ::faq::SQLiteQueryString* request, ::grpc::experimental::ClientReadReactor< ::faq::SQLiteQueryRow>* reactor) = 0;
#endif
};
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
typedef class experimental_async_interface async_interface;
#endif
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
async_interface* async() { return experimental_async(); }
#endif
virtual class experimental_async_interface* experimental_async() { return nullptr; }
private:
virtual ::grpc::ClientReaderInterface< ::faq::SQLiteQueryRow>* QueryRaw(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request) = 0;
virtual ::grpc::ClientAsyncReaderInterface< ::faq::SQLiteQueryRow>* AsyncQueryRaw(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
virtual ::grpc::ClientAsyncReaderInterface< ::faq::SQLiteQueryRow>* PrepareAsyncQueryRaw(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request, ::grpc::CompletionQueue* cq) = 0;
};
class FAQ_PROTOS Stub final : public StubInterface
{
public:
Stub(const std::shared_ptr<::grpc::ChannelInterface>& channel);
std::unique_ptr<::grpc::ClientReader<::faq::SQLiteQueryRow>> Query(::grpc::ClientContext* context,
const ::faq::SQLiteQueryString& request)
{
return std::unique_ptr<::grpc::ClientReader<::faq::SQLiteQueryRow>>(QueryRaw(context, request));
}
std::unique_ptr<::grpc::ClientAsyncReader<::faq::SQLiteQueryRow>>
AsyncQuery(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request, ::grpc::CompletionQueue* cq,
void* tag)
{
return std::unique_ptr<::grpc::ClientAsyncReader<::faq::SQLiteQueryRow>>(
AsyncQueryRaw(context, request, cq, tag));
}
std::unique_ptr<::grpc::ClientAsyncReader<::faq::SQLiteQueryRow>>
PrepareAsyncQuery(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request,
::grpc::CompletionQueue* cq)
{
return std::unique_ptr<::grpc::ClientAsyncReader<::faq::SQLiteQueryRow>>(
PrepareAsyncQueryRaw(context, request, cq));
}
class experimental_async final : public StubInterface::experimental_async_interface
{
public:
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
void Query(::grpc::ClientContext* context, ::faq::SQLiteQueryString* request, ::grpc::ClientReadReactor< ::faq::SQLiteQueryRow>* reactor) override;
#else
void Query(::grpc::ClientContext* context, ::faq::SQLiteQueryString* request, ::grpc::experimental::ClientReadReactor< ::faq::SQLiteQueryRow>* reactor) override;
#endif
private:
friend class Stub;
explicit experimental_async(Stub* stub): stub_(stub) { }
Stub* stub() { return stub_; }
Stub* stub_;
};
class experimental_async_interface* experimental_async() override { return &async_stub_; }
private:
std::shared_ptr< ::grpc::ChannelInterface> channel_;
class experimental_async async_stub_{this};
::grpc::ClientReader< ::faq::SQLiteQueryRow>* QueryRaw(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request) override;
::grpc::ClientAsyncReader< ::faq::SQLiteQueryRow>* AsyncQueryRaw(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request, ::grpc::CompletionQueue* cq, void* tag) override;
::grpc::ClientAsyncReader< ::faq::SQLiteQueryRow>* PrepareAsyncQueryRaw(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request, ::grpc::CompletionQueue* cq) override;
const ::grpc::internal::RpcMethod rpcmethod_Query_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
class FAQ_PROTOS Service : public ::grpc::Service {
public:
Service();
virtual ~Service();
Service(const Service&) = delete;
Service& operator=(const Service&) = delete;
virtual ::grpc::Status Query(::grpc::ServerContext* context, const ::faq::SQLiteQueryString* request, ::grpc::ServerWriter< ::faq::SQLiteQueryRow>* writer);
};
template <class BaseClass>
class WithAsyncMethod_Query : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithAsyncMethod_Query() {
::grpc::Service::MarkMethodAsync(0);
}
~WithAsyncMethod_Query() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Query(::grpc::ServerContext* /*context*/, const ::faq::SQLiteQueryString* /*request*/, ::grpc::ServerWriter< ::faq::SQLiteQueryRow>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestQuery(::grpc::ServerContext* context, ::faq::SQLiteQueryString* request, ::grpc::ServerAsyncWriter< ::faq::SQLiteQueryRow>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncServerStreaming(0, context, request, writer, new_call_cq, notification_cq, tag);
}
};
typedef WithAsyncMethod_Query<Service > AsyncService;
template <class BaseClass>
class ExperimentalWithCallbackMethod_Query : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
ExperimentalWithCallbackMethod_Query() {
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
::grpc::Service::
#else
::grpc::Service::experimental().
#endif
MarkMethodCallback(0,
new ::grpc::internal::CallbackServerStreamingHandler< ::faq::SQLiteQueryString, ::faq::SQLiteQueryRow>(
[this](
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
::grpc::CallbackServerContext*
#else
::grpc::experimental::CallbackServerContext*
#endif
context, const ::faq::SQLiteQueryString* request) { return this->Query(context, request); }));
}
~ExperimentalWithCallbackMethod_Query() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Query(::grpc::ServerContext* /*context*/, const ::faq::SQLiteQueryString* /*request*/, ::grpc::ServerWriter< ::faq::SQLiteQueryRow>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
virtual ::grpc::ServerWriteReactor< ::faq::SQLiteQueryRow>* Query(
::grpc::CallbackServerContext* /*context*/, const ::faq::SQLiteQueryString* /*request*/)
#else
virtual ::grpc::experimental::ServerWriteReactor< ::faq::SQLiteQueryRow>* Query(
::grpc::experimental::CallbackServerContext* /*context*/, const ::faq::SQLiteQueryString* /*request*/)
#endif
{ return nullptr; }
};
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
typedef ExperimentalWithCallbackMethod_Query<Service > CallbackService;
#endif
typedef ExperimentalWithCallbackMethod_Query<Service > ExperimentalCallbackService;
template <class BaseClass>
class WithGenericMethod_Query : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithGenericMethod_Query() {
::grpc::Service::MarkMethodGeneric(0);
}
~WithGenericMethod_Query() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Query(::grpc::ServerContext* /*context*/, const ::faq::SQLiteQueryString* /*request*/, ::grpc::ServerWriter< ::faq::SQLiteQueryRow>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
template <class BaseClass>
class WithRawMethod_Query : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithRawMethod_Query() {
::grpc::Service::MarkMethodRaw(0);
}
~WithRawMethod_Query() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Query(::grpc::ServerContext* /*context*/, const ::faq::SQLiteQueryString* /*request*/, ::grpc::ServerWriter< ::faq::SQLiteQueryRow>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestQuery(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncServerStreaming(0, context, request, writer, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class ExperimentalWithRawCallbackMethod_Query : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
ExperimentalWithRawCallbackMethod_Query() {
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
::grpc::Service::
#else
::grpc::Service::experimental().
#endif
MarkMethodRawCallback(0,
new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
[this](
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
::grpc::CallbackServerContext*
#else
::grpc::experimental::CallbackServerContext*
#endif
context, const::grpc::ByteBuffer* request) { return this->Query(context, request); }));
}
~ExperimentalWithRawCallbackMethod_Query() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Query(::grpc::ServerContext* /*context*/, const ::faq::SQLiteQueryString* /*request*/, ::grpc::ServerWriter< ::faq::SQLiteQueryRow>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* Query(
::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
#else
virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* Query(
::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
#endif
{ return nullptr; }
};
typedef Service StreamedUnaryService;
template <class BaseClass>
class WithSplitStreamingMethod_Query : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithSplitStreamingMethod_Query() {
::grpc::Service::MarkMethodStreamed(0,
new ::grpc::internal::SplitServerStreamingHandler<
::faq::SQLiteQueryString, ::faq::SQLiteQueryRow>(
[this](::grpc::ServerContext* context,
::grpc::ServerSplitStreamer<
::faq::SQLiteQueryString, ::faq::SQLiteQueryRow>* streamer) {
return this->StreamedQuery(context,
streamer);
}));
}
~WithSplitStreamingMethod_Query() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status Query(::grpc::ServerContext* /*context*/, const ::faq::SQLiteQueryString* /*request*/, ::grpc::ServerWriter< ::faq::SQLiteQueryRow>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with split streamed
virtual ::grpc::Status StreamedQuery(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::faq::SQLiteQueryString,::faq::SQLiteQueryRow>* server_split_streamer) = 0;
};
typedef WithSplitStreamingMethod_Query<Service > SplitStreamedService;
typedef WithSplitStreamingMethod_Query<Service > StreamedService;
};
} // namespace faq
#endif // GRPC_faq_5fhook_2eproto__INCLUDED