mirror of https://github.com/qwqdanchun/FAQ.git
80 lines
3.6 KiB
C++
80 lines
3.6 KiB
C++
// Generated by the gRPC C++ plugin.
|
|
// If you make any local change, they will be lost.
|
|
// source: faq_hook.proto
|
|
|
|
#include "faq_hook.pb.h"
|
|
#include "faq_hook.grpc.pb.h"
|
|
|
|
#include <functional>
|
|
#include <grpcpp/impl/codegen/async_stream.h>
|
|
#include <grpcpp/impl/codegen/async_unary_call.h>
|
|
#include <grpcpp/impl/codegen/channel_interface.h>
|
|
#include <grpcpp/impl/codegen/client_unary_call.h>
|
|
#include <grpcpp/impl/codegen/client_callback.h>
|
|
#include <grpcpp/impl/codegen/message_allocator.h>
|
|
#include <grpcpp/impl/codegen/method_handler.h>
|
|
#include <grpcpp/impl/codegen/rpc_service_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/sync_stream.h>
|
|
namespace faq {
|
|
|
|
static const char* FaQSQLite_method_names[] = {
|
|
"/faq.FaQSQLite/Query",
|
|
};
|
|
|
|
std::unique_ptr< FaQSQLite::Stub> FaQSQLite::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
|
|
(void)options;
|
|
std::unique_ptr< FaQSQLite::Stub> stub(new FaQSQLite::Stub(channel));
|
|
return stub;
|
|
}
|
|
|
|
FaQSQLite::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
|
|
: channel_(channel), rpcmethod_Query_(FaQSQLite_method_names[0], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
|
{}
|
|
|
|
::grpc::ClientReader< ::faq::SQLiteQueryRow>* FaQSQLite::Stub::QueryRaw(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request) {
|
|
return ::grpc::internal::ClientReaderFactory< ::faq::SQLiteQueryRow>::Create(channel_.get(), rpcmethod_Query_, context, request);
|
|
}
|
|
|
|
void FaQSQLite::Stub::experimental_async::Query(::grpc::ClientContext* context, ::faq::SQLiteQueryString* request, ::grpc::experimental::ClientReadReactor< ::faq::SQLiteQueryRow>* reactor) {
|
|
::grpc::internal::ClientCallbackReaderFactory< ::faq::SQLiteQueryRow>::Create(stub_->channel_.get(), stub_->rpcmethod_Query_, context, request, reactor);
|
|
}
|
|
|
|
::grpc::ClientAsyncReader< ::faq::SQLiteQueryRow>* FaQSQLite::Stub::AsyncQueryRaw(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request, ::grpc::CompletionQueue* cq, void* tag) {
|
|
return ::grpc::internal::ClientAsyncReaderFactory< ::faq::SQLiteQueryRow>::Create(channel_.get(), cq, rpcmethod_Query_, context, request, true, tag);
|
|
}
|
|
|
|
::grpc::ClientAsyncReader< ::faq::SQLiteQueryRow>* FaQSQLite::Stub::PrepareAsyncQueryRaw(::grpc::ClientContext* context, const ::faq::SQLiteQueryString& request, ::grpc::CompletionQueue* cq) {
|
|
return ::grpc::internal::ClientAsyncReaderFactory< ::faq::SQLiteQueryRow>::Create(channel_.get(), cq, rpcmethod_Query_, context, request, false, nullptr);
|
|
}
|
|
|
|
FaQSQLite::Service::Service() {
|
|
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
|
FaQSQLite_method_names[0],
|
|
::grpc::internal::RpcMethod::SERVER_STREAMING,
|
|
new ::grpc::internal::ServerStreamingHandler< FaQSQLite::Service, ::faq::SQLiteQueryString, ::faq::SQLiteQueryRow>(
|
|
[](FaQSQLite::Service* service,
|
|
::grpc::ServerContext* ctx,
|
|
const ::faq::SQLiteQueryString* req,
|
|
::grpc::ServerWriter<::faq::SQLiteQueryRow>* writer) {
|
|
return service->Query(ctx, req, writer);
|
|
}, this)));
|
|
}
|
|
|
|
FaQSQLite::Service::~Service() {
|
|
}
|
|
|
|
::grpc::Status FaQSQLite::Service::Query(::grpc::ServerContext* context, const ::faq::SQLiteQueryString* request, ::grpc::ServerWriter< ::faq::SQLiteQueryRow>* writer) {
|
|
(void) context;
|
|
(void) request;
|
|
(void) writer;
|
|
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
|
}
|
|
|
|
|
|
} // namespace faq
|
|
|