Line data Source code
1 : // Generated by the gRPC protobuf plugin.
2 : // If you make any local change, they will be lost.
3 : // source: test/cpp/util/echo.proto
4 : #ifndef GRPC_test_2fcpp_2futil_2fecho_2eproto__INCLUDED
5 : #define GRPC_test_2fcpp_2futil_2fecho_2eproto__INCLUDED
6 :
7 : #include "test/cpp/util/echo.pb.h"
8 :
9 : #include <grpc++/support/async_stream.h>
10 : #include <grpc++/impl/rpc_method.h>
11 : #include <grpc++/impl/proto_utils.h>
12 : #include <grpc++/impl/service_type.h>
13 : #include <grpc++/support/async_unary_call.h>
14 : #include <grpc++/support/status.h>
15 : #include <grpc++/support/stub_options.h>
16 : #include <grpc++/support/sync_stream.h>
17 :
18 : namespace grpc {
19 : class CompletionQueue;
20 : class Channel;
21 : class RpcService;
22 : class ServerCompletionQueue;
23 : class ServerContext;
24 : } // namespace grpc
25 :
26 : namespace grpc {
27 : namespace cpp {
28 : namespace test {
29 : namespace util {
30 :
31 : class TestService GRPC_FINAL {
32 : public:
33 140 : class StubInterface {
34 : public:
35 140 : virtual ~StubInterface() {}
36 : virtual ::grpc::Status Echo(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::cpp::test::util::EchoResponse* response) = 0;
37 : std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::cpp::test::util::EchoResponse>> AsyncEcho(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) {
38 : return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::cpp::test::util::EchoResponse>>(AsyncEchoRaw(context, request, cq));
39 : }
40 : std::unique_ptr< ::grpc::ClientWriterInterface< ::grpc::cpp::test::util::EchoRequest>> RequestStream(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response) {
41 : return std::unique_ptr< ::grpc::ClientWriterInterface< ::grpc::cpp::test::util::EchoRequest>>(RequestStreamRaw(context, response));
42 : }
43 : std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::cpp::test::util::EchoRequest>> AsyncRequestStream(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response, ::grpc::CompletionQueue* cq, void* tag) {
44 : return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::cpp::test::util::EchoRequest>>(AsyncRequestStreamRaw(context, response, cq, tag));
45 : }
46 : std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::cpp::test::util::EchoResponse>> ResponseStream(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request) {
47 : return std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::cpp::test::util::EchoResponse>>(ResponseStreamRaw(context, request));
48 : }
49 : std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::cpp::test::util::EchoResponse>> AsyncResponseStream(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
50 : return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::cpp::test::util::EchoResponse>>(AsyncResponseStreamRaw(context, request, cq, tag));
51 : }
52 2 : std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>> BidiStream(::grpc::ClientContext* context) {
53 2 : return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>>(BidiStreamRaw(context));
54 : }
55 : std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>> AsyncBidiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
56 : return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>>(AsyncBidiStreamRaw(context, cq, tag));
57 : }
58 : virtual ::grpc::Status Unimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::cpp::test::util::EchoResponse* response) = 0;
59 : std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::cpp::test::util::EchoResponse>> AsyncUnimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) {
60 : return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::cpp::test::util::EchoResponse>>(AsyncUnimplementedRaw(context, request, cq));
61 : }
62 : private:
63 : virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::cpp::test::util::EchoResponse>* AsyncEchoRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) = 0;
64 : virtual ::grpc::ClientWriterInterface< ::grpc::cpp::test::util::EchoRequest>* RequestStreamRaw(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response) = 0;
65 : virtual ::grpc::ClientAsyncWriterInterface< ::grpc::cpp::test::util::EchoRequest>* AsyncRequestStreamRaw(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response, ::grpc::CompletionQueue* cq, void* tag) = 0;
66 : virtual ::grpc::ClientReaderInterface< ::grpc::cpp::test::util::EchoResponse>* ResponseStreamRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request) = 0;
67 : virtual ::grpc::ClientAsyncReaderInterface< ::grpc::cpp::test::util::EchoResponse>* AsyncResponseStreamRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
68 : virtual ::grpc::ClientReaderWriterInterface< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>* BidiStreamRaw(::grpc::ClientContext* context) = 0;
69 : virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>* AsyncBidiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
70 : virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::cpp::test::util::EchoResponse>* AsyncUnimplementedRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) = 0;
71 : };
72 276 : class Stub GRPC_FINAL : public StubInterface {
73 : public:
74 : Stub(const std::shared_ptr< ::grpc::Channel>& channel);
75 : ::grpc::Status Echo(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::cpp::test::util::EchoResponse* response) GRPC_OVERRIDE;
76 36 : std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>> AsyncEcho(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) {
77 36 : return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>>(AsyncEchoRaw(context, request, cq));
78 : }
79 8 : std::unique_ptr< ::grpc::ClientWriter< ::grpc::cpp::test::util::EchoRequest>> RequestStream(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response) {
80 8 : return std::unique_ptr< ::grpc::ClientWriter< ::grpc::cpp::test::util::EchoRequest>>(RequestStreamRaw(context, response));
81 : }
82 2 : std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::cpp::test::util::EchoRequest>> AsyncRequestStream(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response, ::grpc::CompletionQueue* cq, void* tag) {
83 2 : return std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::cpp::test::util::EchoRequest>>(AsyncRequestStreamRaw(context, response, cq, tag));
84 : }
85 4 : std::unique_ptr< ::grpc::ClientReader< ::grpc::cpp::test::util::EchoResponse>> ResponseStream(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request) {
86 4 : return std::unique_ptr< ::grpc::ClientReader< ::grpc::cpp::test::util::EchoResponse>>(ResponseStreamRaw(context, request));
87 : }
88 2 : std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::cpp::test::util::EchoResponse>> AsyncResponseStream(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
89 2 : return std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::cpp::test::util::EchoResponse>>(AsyncResponseStreamRaw(context, request, cq, tag));
90 : }
91 14 : std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>> BidiStream(::grpc::ClientContext* context) {
92 14 : return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>>(BidiStreamRaw(context));
93 : }
94 2 : std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>> AsyncBidiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
95 2 : return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>>(AsyncBidiStreamRaw(context, cq, tag));
96 : }
97 : ::grpc::Status Unimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::cpp::test::util::EchoResponse* response) GRPC_OVERRIDE;
98 : std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>> AsyncUnimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) {
99 : return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>>(AsyncUnimplementedRaw(context, request, cq));
100 : }
101 :
102 : private:
103 : std::shared_ptr< ::grpc::Channel> channel_;
104 : ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>* AsyncEchoRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) GRPC_OVERRIDE;
105 : ::grpc::ClientWriter< ::grpc::cpp::test::util::EchoRequest>* RequestStreamRaw(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response) GRPC_OVERRIDE;
106 : ::grpc::ClientAsyncWriter< ::grpc::cpp::test::util::EchoRequest>* AsyncRequestStreamRaw(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;
107 : ::grpc::ClientReader< ::grpc::cpp::test::util::EchoResponse>* ResponseStreamRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request) GRPC_OVERRIDE;
108 : ::grpc::ClientAsyncReader< ::grpc::cpp::test::util::EchoResponse>* AsyncResponseStreamRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;
109 : ::grpc::ClientReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>* BidiStreamRaw(::grpc::ClientContext* context) GRPC_OVERRIDE;
110 : ::grpc::ClientAsyncReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>* AsyncBidiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;
111 : ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>* AsyncUnimplementedRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) GRPC_OVERRIDE;
112 : const ::grpc::RpcMethod rpcmethod_Echo_;
113 : const ::grpc::RpcMethod rpcmethod_RequestStream_;
114 : const ::grpc::RpcMethod rpcmethod_ResponseStream_;
115 : const ::grpc::RpcMethod rpcmethod_BidiStream_;
116 : const ::grpc::RpcMethod rpcmethod_Unimplemented_;
117 : };
118 : static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::Channel>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
119 :
120 : class Service : public ::grpc::SynchronousService {
121 : public:
122 198 : Service() : service_(nullptr) {}
123 : virtual ~Service();
124 : virtual ::grpc::Status Echo(::grpc::ServerContext* context, const ::grpc::cpp::test::util::EchoRequest* request, ::grpc::cpp::test::util::EchoResponse* response);
125 : virtual ::grpc::Status RequestStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::cpp::test::util::EchoRequest>* reader, ::grpc::cpp::test::util::EchoResponse* response);
126 : virtual ::grpc::Status ResponseStream(::grpc::ServerContext* context, const ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerWriter< ::grpc::cpp::test::util::EchoResponse>* writer);
127 : virtual ::grpc::Status BidiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::cpp::test::util::EchoResponse, ::grpc::cpp::test::util::EchoRequest>* stream);
128 : virtual ::grpc::Status Unimplemented(::grpc::ServerContext* context, const ::grpc::cpp::test::util::EchoRequest* request, ::grpc::cpp::test::util::EchoResponse* response);
129 : ::grpc::RpcService* service() GRPC_OVERRIDE GRPC_FINAL;
130 : private:
131 : ::grpc::RpcService* service_;
132 : };
133 : class AsyncService GRPC_FINAL : public ::grpc::AsynchronousService {
134 : public:
135 : explicit AsyncService();
136 26 : ~AsyncService() {};
137 : void RequestEcho(::grpc::ServerContext* context, ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerAsyncResponseWriter< ::grpc::cpp::test::util::EchoResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag);
138 : void RequestRequestStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::cpp::test::util::EchoResponse, ::grpc::cpp::test::util::EchoRequest>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag);
139 : void RequestResponseStream(::grpc::ServerContext* context, ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerAsyncWriter< ::grpc::cpp::test::util::EchoResponse>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag);
140 : void RequestBidiStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::cpp::test::util::EchoResponse, ::grpc::cpp::test::util::EchoRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag);
141 : void RequestUnimplemented(::grpc::ServerContext* context, ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerAsyncResponseWriter< ::grpc::cpp::test::util::EchoResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag);
142 : };
143 : };
144 :
145 : class UnimplementedService GRPC_FINAL {
146 : public:
147 4 : class StubInterface {
148 : public:
149 4 : virtual ~StubInterface() {}
150 : virtual ::grpc::Status Unimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::cpp::test::util::EchoResponse* response) = 0;
151 : std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::cpp::test::util::EchoResponse>> AsyncUnimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) {
152 : return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::cpp::test::util::EchoResponse>>(AsyncUnimplementedRaw(context, request, cq));
153 : }
154 : private:
155 : virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::cpp::test::util::EchoResponse>* AsyncUnimplementedRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) = 0;
156 : };
157 8 : class Stub GRPC_FINAL : public StubInterface {
158 : public:
159 : Stub(const std::shared_ptr< ::grpc::Channel>& channel);
160 : ::grpc::Status Unimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::cpp::test::util::EchoResponse* response) GRPC_OVERRIDE;
161 2 : std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>> AsyncUnimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) {
162 2 : return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>>(AsyncUnimplementedRaw(context, request, cq));
163 : }
164 :
165 : private:
166 : std::shared_ptr< ::grpc::Channel> channel_;
167 : ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>* AsyncUnimplementedRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) GRPC_OVERRIDE;
168 : const ::grpc::RpcMethod rpcmethod_Unimplemented_;
169 : };
170 : static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::Channel>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
171 :
172 : class Service : public ::grpc::SynchronousService {
173 : public:
174 : Service() : service_(nullptr) {}
175 : virtual ~Service();
176 : virtual ::grpc::Status Unimplemented(::grpc::ServerContext* context, const ::grpc::cpp::test::util::EchoRequest* request, ::grpc::cpp::test::util::EchoResponse* response);
177 : ::grpc::RpcService* service() GRPC_OVERRIDE GRPC_FINAL;
178 : private:
179 : ::grpc::RpcService* service_;
180 : };
181 : class AsyncService GRPC_FINAL : public ::grpc::AsynchronousService {
182 : public:
183 : explicit AsyncService();
184 : ~AsyncService() {};
185 : void RequestUnimplemented(::grpc::ServerContext* context, ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerAsyncResponseWriter< ::grpc::cpp::test::util::EchoResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag);
186 : };
187 : };
188 :
189 : } // namespace util
190 : } // namespace test
191 : } // namespace cpp
192 : } // namespace grpc
193 :
194 :
195 : #endif // GRPC_test_2fcpp_2futil_2fecho_2eproto__INCLUDED
|