-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfile.grpc.pb.cc
64 lines (50 loc) · 2.64 KB
/
file.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
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: file.proto
#include "file.pb.h"
#include "file.grpc.pb.h"
#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/method_handler_impl.h>
#include <grpcpp/impl/codegen/rpc_service_method.h>
#include <grpcpp/impl/codegen/service_type.h>
#include <grpcpp/impl/codegen/sync_stream.h>
namespace file {
static const char* File_method_names[] = {
"/file.File/UploadFile",
};
std::unique_ptr< File::Stub> File::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
(void)options;
std::unique_ptr< File::Stub> stub(new File::Stub(channel));
return stub;
}
File::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
: channel_(channel), rpcmethod_UploadFile_(File_method_names[0], ::grpc::internal::RpcMethod::CLIENT_STREAMING, channel)
{}
::grpc::ClientWriter< ::file::FileRequest>* File::Stub::UploadFileRaw(::grpc::ClientContext* context, ::file::FileReply* response) {
return ::grpc::internal::ClientWriterFactory< ::file::FileRequest>::Create(channel_.get(), rpcmethod_UploadFile_, context, response);
}
::grpc::ClientAsyncWriter< ::file::FileRequest>* File::Stub::AsyncUploadFileRaw(::grpc::ClientContext* context, ::file::FileReply* response, ::grpc::CompletionQueue* cq, void* tag) {
return ::grpc::internal::ClientAsyncWriterFactory< ::file::FileRequest>::Create(channel_.get(), cq, rpcmethod_UploadFile_, context, response, true, tag);
}
::grpc::ClientAsyncWriter< ::file::FileRequest>* File::Stub::PrepareAsyncUploadFileRaw(::grpc::ClientContext* context, ::file::FileReply* response, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncWriterFactory< ::file::FileRequest>::Create(channel_.get(), cq, rpcmethod_UploadFile_, context, response, false, nullptr);
}
File::Service::Service() {
AddMethod(new ::grpc::internal::RpcServiceMethod(
File_method_names[0],
::grpc::internal::RpcMethod::CLIENT_STREAMING,
new ::grpc::internal::ClientStreamingHandler< File::Service, ::file::FileRequest, ::file::FileReply>(
std::mem_fn(&File::Service::UploadFile), this)));
}
File::Service::~Service() {
}
::grpc::Status File::Service::UploadFile(::grpc::ServerContext* context, ::grpc::ServerReader< ::file::FileRequest>* reader, ::file::FileReply* response) {
(void) context;
(void) reader;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
} // namespace file