-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.grpc.pb.cc
68 lines (54 loc) · 3.12 KB
/
example.grpc.pb.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: example.proto
#include "example.pb.h"
#include "example.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/method_handler_impl.h>
#include <grpcpp/impl/codegen/rpc_service_method.h>
#include <grpcpp/impl/codegen/server_callback.h>
#include <grpcpp/impl/codegen/service_type.h>
#include <grpcpp/impl/codegen/sync_stream.h>
static const char* SearchService_method_names[] = {
"/SearchService/Search",
};
std::unique_ptr< SearchService::Stub> SearchService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
(void)options;
std::unique_ptr< SearchService::Stub> stub(new SearchService::Stub(channel));
return stub;
}
SearchService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
: channel_(channel), rpcmethod_Search_(SearchService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
{}
::grpc::Status SearchService::Stub::Search(::grpc::ClientContext* context, const ::SearchRequest& request, ::SearchResponse* response) {
return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Search_, context, request, response);
}
void SearchService::Stub::experimental_async::Search(::grpc::ClientContext* context, const ::SearchRequest* request, ::SearchResponse* response, std::function<void(::grpc::Status)> f) {
return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Search_, context, request, response, std::move(f));
}
::grpc::ClientAsyncResponseReader< ::SearchResponse>* SearchService::Stub::AsyncSearchRaw(::grpc::ClientContext* context, const ::SearchRequest& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderFactory< ::SearchResponse>::Create(channel_.get(), cq, rpcmethod_Search_, context, request, true);
}
::grpc::ClientAsyncResponseReader< ::SearchResponse>* SearchService::Stub::PrepareAsyncSearchRaw(::grpc::ClientContext* context, const ::SearchRequest& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderFactory< ::SearchResponse>::Create(channel_.get(), cq, rpcmethod_Search_, context, request, false);
}
SearchService::Service::Service() {
AddMethod(new ::grpc::internal::RpcServiceMethod(
SearchService_method_names[0],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< SearchService::Service, ::SearchRequest, ::SearchResponse>(
std::mem_fn(&SearchService::Service::Search), this)));
}
SearchService::Service::~Service() {
}
::grpc::Status SearchService::Service::Search(::grpc::ServerContext* context, const ::SearchRequest* request, ::SearchResponse* response) {
(void) context;
(void) request;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}