testservice.grpc.pb.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. // Generated by the gRPC C++ plugin.
  2. // If you make any local change, they will be lost.
  3. // source: testservice.proto
  4. #ifndef GRPC_testservice_2eproto__INCLUDED
  5. #define GRPC_testservice_2eproto__INCLUDED
  6. #include "testservice.pb.h"
  7. #include <grpcpp/impl/codegen/async_generic_service.h>
  8. #include <grpcpp/impl/codegen/async_stream.h>
  9. #include <grpcpp/impl/codegen/async_unary_call.h>
  10. #include <grpcpp/impl/codegen/method_handler_impl.h>
  11. #include <grpcpp/impl/codegen/proto_utils.h>
  12. #include <grpcpp/impl/codegen/rpc_method.h>
  13. #include <grpcpp/impl/codegen/service_type.h>
  14. #include <grpcpp/impl/codegen/status.h>
  15. #include <grpcpp/impl/codegen/stub_options.h>
  16. #include <grpcpp/impl/codegen/sync_stream.h>
  17. namespace grpc {
  18. class CompletionQueue;
  19. class Channel;
  20. class ServerCompletionQueue;
  21. class ServerContext;
  22. } // namespace grpc
  23. namespace qtprotobufnamespace {
  24. namespace tests {
  25. class TestService final {
  26. public:
  27. static constexpr char const* service_full_name() {
  28. return "qtprotobufnamespace.tests.TestService";
  29. }
  30. class StubInterface {
  31. public:
  32. virtual ~StubInterface() {}
  33. virtual ::grpc::Status testMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) = 0;
  34. std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  35. return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodRaw(context, request, cq));
  36. }
  37. std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  38. return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodRaw(context, request, cq));
  39. }
  40. std::unique_ptr< ::grpc::ClientReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request) {
  41. return std::unique_ptr< ::grpc::ClientReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodServerStreamRaw(context, request));
  42. }
  43. std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq, void* tag) {
  44. return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodServerStreamRaw(context, request, cq, tag));
  45. }
  46. std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  47. return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodServerStreamRaw(context, request, cq));
  48. }
  49. std::unique_ptr< ::grpc::ClientWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
  50. return std::unique_ptr< ::grpc::ClientWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodClientStreamRaw(context, response));
  51. }
  52. std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq, void* tag) {
  53. return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodClientStreamRaw(context, response, cq, tag));
  54. }
  55. std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq) {
  56. return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodClientStreamRaw(context, response, cq));
  57. }
  58. std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodBiStream(::grpc::ClientContext* context) {
  59. return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodBiStreamRaw(context));
  60. }
  61. std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodBiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
  62. return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodBiStreamRaw(context, cq, tag));
  63. }
  64. std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodBiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
  65. return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodBiStreamRaw(context, cq));
  66. }
  67. private:
  68. virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) = 0;
  69. virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) = 0;
  70. virtual ::grpc::ClientReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request) = 0;
  71. virtual ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
  72. virtual ::grpc::ClientAsyncReaderInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) = 0;
  73. virtual ::grpc::ClientWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response) = 0;
  74. virtual ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq, void* tag) = 0;
  75. virtual ::grpc::ClientAsyncWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq) = 0;
  76. virtual ::grpc::ClientReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodBiStreamRaw(::grpc::ClientContext* context) = 0;
  77. virtual ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
  78. virtual ::grpc::ClientAsyncReaderWriterInterface< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0;
  79. };
  80. class Stub final : public StubInterface {
  81. public:
  82. Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
  83. ::grpc::Status testMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override;
  84. std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  85. return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodRaw(context, request, cq));
  86. }
  87. std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethod(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  88. return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodRaw(context, request, cq));
  89. }
  90. std::unique_ptr< ::grpc::ClientReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request) {
  91. return std::unique_ptr< ::grpc::ClientReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodServerStreamRaw(context, request));
  92. }
  93. std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq, void* tag) {
  94. return std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodServerStreamRaw(context, request, cq, tag));
  95. }
  96. std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodServerStream(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) {
  97. return std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodServerStreamRaw(context, request, cq));
  98. }
  99. std::unique_ptr< ::grpc::ClientWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response) {
  100. return std::unique_ptr< ::grpc::ClientWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodClientStreamRaw(context, response));
  101. }
  102. std::unique_ptr< ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq, void* tag) {
  103. return std::unique_ptr< ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodClientStreamRaw(context, response, cq, tag));
  104. }
  105. std::unique_ptr< ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodClientStream(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq) {
  106. return std::unique_ptr< ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodClientStreamRaw(context, response, cq));
  107. }
  108. std::unique_ptr< ::grpc::ClientReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> testMethodBiStream(::grpc::ClientContext* context) {
  109. return std::unique_ptr< ::grpc::ClientReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(testMethodBiStreamRaw(context));
  110. }
  111. std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> AsynctestMethodBiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
  112. return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(AsynctestMethodBiStreamRaw(context, cq, tag));
  113. }
  114. std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>> PrepareAsynctestMethodBiStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
  115. return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>>(PrepareAsynctestMethodBiStreamRaw(context, cq));
  116. }
  117. private:
  118. std::shared_ptr< ::grpc::ChannelInterface> channel_;
  119. ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) override;
  120. ::grpc::ClientAsyncResponseReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) override;
  121. ::grpc::ClientReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request) override;
  122. ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq, void* tag) override;
  123. ::grpc::ClientAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodServerStreamRaw(::grpc::ClientContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage& request, ::grpc::CompletionQueue* cq) override;
  124. ::grpc::ClientWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override;
  125. ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq, void* tag) override;
  126. ::grpc::ClientAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodClientStreamRaw(::grpc::ClientContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* response, ::grpc::CompletionQueue* cq) override;
  127. ::grpc::ClientReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* testMethodBiStreamRaw(::grpc::ClientContext* context) override;
  128. ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* AsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override;
  129. ::grpc::ClientAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* PrepareAsynctestMethodBiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override;
  130. const ::grpc::internal::RpcMethod rpcmethod_testMethod_;
  131. const ::grpc::internal::RpcMethod rpcmethod_testMethodServerStream_;
  132. const ::grpc::internal::RpcMethod rpcmethod_testMethodClientStream_;
  133. const ::grpc::internal::RpcMethod rpcmethod_testMethodBiStream_;
  134. };
  135. static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
  136. class Service : public ::grpc::Service {
  137. public:
  138. Service();
  139. virtual ~Service();
  140. virtual ::grpc::Status testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response);
  141. virtual ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer);
  142. virtual ::grpc::Status testMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::qtprotobufnamespace::tests::SimpleStringMessage* response);
  143. virtual ::grpc::Status testMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream);
  144. };
  145. template <class BaseClass>
  146. class WithAsyncMethod_testMethod : public BaseClass {
  147. private:
  148. void BaseClassMustBeDerivedFromService(const Service *service) {}
  149. public:
  150. WithAsyncMethod_testMethod() {
  151. ::grpc::Service::MarkMethodAsync(0);
  152. }
  153. ~WithAsyncMethod_testMethod() override {
  154. BaseClassMustBeDerivedFromService(this);
  155. }
  156. // disable synchronous version of this method
  157. ::grpc::Status testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
  158. abort();
  159. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  160. }
  161. void RequesttestMethod(::grpc::ServerContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerAsyncResponseWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
  162. ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
  163. }
  164. };
  165. template <class BaseClass>
  166. class WithAsyncMethod_testMethodServerStream : public BaseClass {
  167. private:
  168. void BaseClassMustBeDerivedFromService(const Service *service) {}
  169. public:
  170. WithAsyncMethod_testMethodServerStream() {
  171. ::grpc::Service::MarkMethodAsync(1);
  172. }
  173. ~WithAsyncMethod_testMethodServerStream() override {
  174. BaseClassMustBeDerivedFromService(this);
  175. }
  176. // disable synchronous version of this method
  177. ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer) override {
  178. abort();
  179. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  180. }
  181. void RequesttestMethodServerStream(::grpc::ServerContext* context, ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerAsyncWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
  182. ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag);
  183. }
  184. };
  185. template <class BaseClass>
  186. class WithAsyncMethod_testMethodClientStream : public BaseClass {
  187. private:
  188. void BaseClassMustBeDerivedFromService(const Service *service) {}
  189. public:
  190. WithAsyncMethod_testMethodClientStream() {
  191. ::grpc::Service::MarkMethodAsync(2);
  192. }
  193. ~WithAsyncMethod_testMethodClientStream() override {
  194. BaseClassMustBeDerivedFromService(this);
  195. }
  196. // disable synchronous version of this method
  197. ::grpc::Status testMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
  198. abort();
  199. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  200. }
  201. void RequesttestMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
  202. ::grpc::Service::RequestAsyncClientStreaming(2, context, reader, new_call_cq, notification_cq, tag);
  203. }
  204. };
  205. template <class BaseClass>
  206. class WithAsyncMethod_testMethodBiStream : public BaseClass {
  207. private:
  208. void BaseClassMustBeDerivedFromService(const Service *service) {}
  209. public:
  210. WithAsyncMethod_testMethodBiStream() {
  211. ::grpc::Service::MarkMethodAsync(3);
  212. }
  213. ~WithAsyncMethod_testMethodBiStream() override {
  214. BaseClassMustBeDerivedFromService(this);
  215. }
  216. // disable synchronous version of this method
  217. ::grpc::Status testMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream) override {
  218. abort();
  219. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  220. }
  221. void RequesttestMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
  222. ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
  223. }
  224. };
  225. typedef WithAsyncMethod_testMethod<WithAsyncMethod_testMethodServerStream<WithAsyncMethod_testMethodClientStream<WithAsyncMethod_testMethodBiStream<Service > > > > AsyncService;
  226. template <class BaseClass>
  227. class WithGenericMethod_testMethod : public BaseClass {
  228. private:
  229. void BaseClassMustBeDerivedFromService(const Service *service) {}
  230. public:
  231. WithGenericMethod_testMethod() {
  232. ::grpc::Service::MarkMethodGeneric(0);
  233. }
  234. ~WithGenericMethod_testMethod() override {
  235. BaseClassMustBeDerivedFromService(this);
  236. }
  237. // disable synchronous version of this method
  238. ::grpc::Status testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
  239. abort();
  240. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  241. }
  242. };
  243. template <class BaseClass>
  244. class WithGenericMethod_testMethodServerStream : public BaseClass {
  245. private:
  246. void BaseClassMustBeDerivedFromService(const Service *service) {}
  247. public:
  248. WithGenericMethod_testMethodServerStream() {
  249. ::grpc::Service::MarkMethodGeneric(1);
  250. }
  251. ~WithGenericMethod_testMethodServerStream() override {
  252. BaseClassMustBeDerivedFromService(this);
  253. }
  254. // disable synchronous version of this method
  255. ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer) override {
  256. abort();
  257. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  258. }
  259. };
  260. template <class BaseClass>
  261. class WithGenericMethod_testMethodClientStream : public BaseClass {
  262. private:
  263. void BaseClassMustBeDerivedFromService(const Service *service) {}
  264. public:
  265. WithGenericMethod_testMethodClientStream() {
  266. ::grpc::Service::MarkMethodGeneric(2);
  267. }
  268. ~WithGenericMethod_testMethodClientStream() override {
  269. BaseClassMustBeDerivedFromService(this);
  270. }
  271. // disable synchronous version of this method
  272. ::grpc::Status testMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
  273. abort();
  274. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  275. }
  276. };
  277. template <class BaseClass>
  278. class WithGenericMethod_testMethodBiStream : public BaseClass {
  279. private:
  280. void BaseClassMustBeDerivedFromService(const Service *service) {}
  281. public:
  282. WithGenericMethod_testMethodBiStream() {
  283. ::grpc::Service::MarkMethodGeneric(3);
  284. }
  285. ~WithGenericMethod_testMethodBiStream() override {
  286. BaseClassMustBeDerivedFromService(this);
  287. }
  288. // disable synchronous version of this method
  289. ::grpc::Status testMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream) override {
  290. abort();
  291. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  292. }
  293. };
  294. template <class BaseClass>
  295. class WithRawMethod_testMethod : public BaseClass {
  296. private:
  297. void BaseClassMustBeDerivedFromService(const Service *service) {}
  298. public:
  299. WithRawMethod_testMethod() {
  300. ::grpc::Service::MarkMethodRaw(0);
  301. }
  302. ~WithRawMethod_testMethod() override {
  303. BaseClassMustBeDerivedFromService(this);
  304. }
  305. // disable synchronous version of this method
  306. ::grpc::Status testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
  307. abort();
  308. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  309. }
  310. void RequesttestMethod(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
  311. ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
  312. }
  313. };
  314. template <class BaseClass>
  315. class WithRawMethod_testMethodServerStream : public BaseClass {
  316. private:
  317. void BaseClassMustBeDerivedFromService(const Service *service) {}
  318. public:
  319. WithRawMethod_testMethodServerStream() {
  320. ::grpc::Service::MarkMethodRaw(1);
  321. }
  322. ~WithRawMethod_testMethodServerStream() override {
  323. BaseClassMustBeDerivedFromService(this);
  324. }
  325. // disable synchronous version of this method
  326. ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer) override {
  327. abort();
  328. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  329. }
  330. void RequesttestMethodServerStream(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
  331. ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag);
  332. }
  333. };
  334. template <class BaseClass>
  335. class WithRawMethod_testMethodClientStream : public BaseClass {
  336. private:
  337. void BaseClassMustBeDerivedFromService(const Service *service) {}
  338. public:
  339. WithRawMethod_testMethodClientStream() {
  340. ::grpc::Service::MarkMethodRaw(2);
  341. }
  342. ~WithRawMethod_testMethodClientStream() override {
  343. BaseClassMustBeDerivedFromService(this);
  344. }
  345. // disable synchronous version of this method
  346. ::grpc::Status testMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::qtprotobufnamespace::tests::SimpleStringMessage>* reader, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
  347. abort();
  348. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  349. }
  350. void RequesttestMethodClientStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
  351. ::grpc::Service::RequestAsyncClientStreaming(2, context, reader, new_call_cq, notification_cq, tag);
  352. }
  353. };
  354. template <class BaseClass>
  355. class WithRawMethod_testMethodBiStream : public BaseClass {
  356. private:
  357. void BaseClassMustBeDerivedFromService(const Service *service) {}
  358. public:
  359. WithRawMethod_testMethodBiStream() {
  360. ::grpc::Service::MarkMethodRaw(3);
  361. }
  362. ~WithRawMethod_testMethodBiStream() override {
  363. BaseClassMustBeDerivedFromService(this);
  364. }
  365. // disable synchronous version of this method
  366. ::grpc::Status testMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>* stream) override {
  367. abort();
  368. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  369. }
  370. void RequesttestMethodBiStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
  371. ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
  372. }
  373. };
  374. template <class BaseClass>
  375. class WithStreamedUnaryMethod_testMethod : public BaseClass {
  376. private:
  377. void BaseClassMustBeDerivedFromService(const Service *service) {}
  378. public:
  379. WithStreamedUnaryMethod_testMethod() {
  380. ::grpc::Service::MarkMethodStreamed(0,
  381. new ::grpc::internal::StreamedUnaryHandler< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>(std::bind(&WithStreamedUnaryMethod_testMethod<BaseClass>::StreamedtestMethod, this, std::placeholders::_1, std::placeholders::_2)));
  382. }
  383. ~WithStreamedUnaryMethod_testMethod() override {
  384. BaseClassMustBeDerivedFromService(this);
  385. }
  386. // disable regular version of this method
  387. ::grpc::Status testMethod(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::qtprotobufnamespace::tests::SimpleStringMessage* response) override {
  388. abort();
  389. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  390. }
  391. // replace default version of method with streamed unary
  392. virtual ::grpc::Status StreamedtestMethod(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::qtprotobufnamespace::tests::SimpleStringMessage,::qtprotobufnamespace::tests::SimpleStringMessage>* server_unary_streamer) = 0;
  393. };
  394. typedef WithStreamedUnaryMethod_testMethod<Service > StreamedUnaryService;
  395. template <class BaseClass>
  396. class WithSplitStreamingMethod_testMethodServerStream : public BaseClass {
  397. private:
  398. void BaseClassMustBeDerivedFromService(const Service *service) {}
  399. public:
  400. WithSplitStreamingMethod_testMethodServerStream() {
  401. ::grpc::Service::MarkMethodStreamed(1,
  402. new ::grpc::internal::SplitServerStreamingHandler< ::qtprotobufnamespace::tests::SimpleStringMessage, ::qtprotobufnamespace::tests::SimpleStringMessage>(std::bind(&WithSplitStreamingMethod_testMethodServerStream<BaseClass>::StreamedtestMethodServerStream, this, std::placeholders::_1, std::placeholders::_2)));
  403. }
  404. ~WithSplitStreamingMethod_testMethodServerStream() override {
  405. BaseClassMustBeDerivedFromService(this);
  406. }
  407. // disable regular version of this method
  408. ::grpc::Status testMethodServerStream(::grpc::ServerContext* context, const ::qtprotobufnamespace::tests::SimpleStringMessage* request, ::grpc::ServerWriter< ::qtprotobufnamespace::tests::SimpleStringMessage>* writer) override {
  409. abort();
  410. return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
  411. }
  412. // replace default version of method with split streamed
  413. virtual ::grpc::Status StreamedtestMethodServerStream(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::qtprotobufnamespace::tests::SimpleStringMessage,::qtprotobufnamespace::tests::SimpleStringMessage>* server_split_streamer) = 0;
  414. };
  415. typedef WithSplitStreamingMethod_testMethodServerStream<Service > SplitStreamedService;
  416. typedef WithStreamedUnaryMethod_testMethod<WithSplitStreamingMethod_testMethodServerStream<Service > > StreamedService;
  417. };
  418. } // namespace tests
  419. } // namespace qtprotobufnamespace
  420. #endif // GRPC_testservice_2eproto__INCLUDED