aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-11-30 02:42:13 -0800
committerGravatar Vijay Pai <vpai@google.com>2018-11-30 04:13:41 -0800
commit2b5d45ab381c5f455e16f49276ef22998c9d659b (patch)
tree0fa62eae835f650eda8c266858344fe4f6a6b3b5
parent28dd7981d61645b17d91f754ecd85c3cede1bea7 (diff)
Fix clang-tidy and golden file issues
-rw-r--r--include/grpcpp/impl/codegen/client_callback.h12
-rw-r--r--test/cpp/codegen/compiler_test_golden1105
-rw-r--r--test/cpp/end2end/client_callback_end2end_test.cc8
3 files changed, 335 insertions, 790 deletions
diff --git a/include/grpcpp/impl/codegen/client_callback.h b/include/grpcpp/impl/codegen/client_callback.h
index 93266b8aa3..4d9579fd6a 100644
--- a/include/grpcpp/impl/codegen/client_callback.h
+++ b/include/grpcpp/impl/codegen/client_callback.h
@@ -157,7 +157,7 @@ template <class Request, class Response>
class ClientBidiReactor {
public:
virtual ~ClientBidiReactor() {}
- virtual void OnDone(Status s) {}
+ virtual void OnDone(const Status& s) {}
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnReadDone(bool ok) {}
virtual void OnWriteDone(bool ok) {}
@@ -186,7 +186,7 @@ template <class Response>
class ClientReadReactor {
public:
virtual ~ClientReadReactor() {}
- virtual void OnDone(Status s) {}
+ virtual void OnDone(const Status& s) {}
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnReadDone(bool ok) {}
@@ -203,7 +203,7 @@ template <class Request>
class ClientWriteReactor {
public:
virtual ~ClientWriteReactor() {}
- virtual void OnDone(Status s) {}
+ virtual void OnDone(const Status& s) {}
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnWriteDone(bool ok) {}
virtual void OnWritesDoneDone(bool ok) {}
@@ -255,7 +255,7 @@ class ClientCallbackReaderWriterImpl
void MaybeFinish() {
if (--callbacks_outstanding_ == 0) {
- reactor_->OnDone(std::move(finish_status_));
+ reactor_->OnDone(finish_status_);
auto* call = call_.call();
this->~ClientCallbackReaderWriterImpl();
g_core_codegen_interface->grpc_call_unref(call);
@@ -450,7 +450,7 @@ class ClientCallbackReaderImpl
void MaybeFinish() {
if (--callbacks_outstanding_ == 0) {
- reactor_->OnDone(std::move(finish_status_));
+ reactor_->OnDone(finish_status_);
auto* call = call_.call();
this->~ClientCallbackReaderImpl();
g_core_codegen_interface->grpc_call_unref(call);
@@ -576,7 +576,7 @@ class ClientCallbackWriterImpl
void MaybeFinish() {
if (--callbacks_outstanding_ == 0) {
- reactor_->OnDone(std::move(finish_status_));
+ reactor_->OnDone(finish_status_);
auto* call = call_.call();
this->~ClientCallbackWriterImpl();
g_core_codegen_interface->grpc_call_unref(call);
diff --git a/test/cpp/codegen/compiler_test_golden b/test/cpp/codegen/compiler_test_golden
index 1a5fe27932..5f0eb6c35c 100644
--- a/test/cpp/codegen/compiler_test_golden
+++ b/test/cpp/codegen/compiler_test_golden
@@ -26,6 +26,7 @@
#include "src/proto/grpc/testing/compiler_test.pb.h"
+#include <functional>
#include <grpcpp/impl/codegen/async_generic_service.h>
#include <grpcpp/impl/codegen/async_stream.h>
#include <grpcpp/impl/codegen/async_unary_call.h>
@@ -38,7 +39,6 @@
#include <grpcpp/impl/codegen/status.h>
#include <grpcpp/impl/codegen/stub_options.h>
#include <grpcpp/impl/codegen/sync_stream.h>
-#include <functional>
namespace grpc {
class CompletionQueue;
@@ -64,556 +64,294 @@ class ServiceA final {
public:
virtual ~StubInterface() {}
// MethodA1 leading comment 1
- virtual ::grpc::Status MethodA1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::testing::Response* response) = 0;
- std::unique_ptr<
- ::grpc::ClientAsyncResponseReaderInterface<::grpc::testing::Response>>
- AsyncMethodA1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<
- ::grpc::testing::Response>>(AsyncMethodA1Raw(context, request, cq));
- }
- std::unique_ptr<
- ::grpc::ClientAsyncResponseReaderInterface<::grpc::testing::Response>>
- PrepareAsyncMethodA1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<
- ::grpc::testing::Response>>(
- PrepareAsyncMethodA1Raw(context, request, cq));
+ virtual ::grpc::Status MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) = 0;
+ std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>> AsyncMethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>>(AsyncMethodA1Raw(context, request, cq));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>> PrepareAsyncMethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>>(PrepareAsyncMethodA1Raw(context, request, cq));
}
// MethodA1 trailing comment 1
// MethodA2 detached leading comment 1
//
// Method A2 leading comment 1
// Method A2 leading comment 2
- std::unique_ptr<::grpc::ClientWriterInterface<::grpc::testing::Request>>
- MethodA2(::grpc::ClientContext* context,
- ::grpc::testing::Response* response) {
- return std::unique_ptr<
- ::grpc::ClientWriterInterface<::grpc::testing::Request>>(
- MethodA2Raw(context, response));
- }
- std::unique_ptr<
- ::grpc::ClientAsyncWriterInterface<::grpc::testing::Request>>
- AsyncMethodA2(::grpc::ClientContext* context,
- ::grpc::testing::Response* response,
- ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr<
- ::grpc::ClientAsyncWriterInterface<::grpc::testing::Request>>(
- AsyncMethodA2Raw(context, response, cq, tag));
- }
- std::unique_ptr<
- ::grpc::ClientAsyncWriterInterface<::grpc::testing::Request>>
- PrepareAsyncMethodA2(::grpc::ClientContext* context,
- ::grpc::testing::Response* response,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<
- ::grpc::ClientAsyncWriterInterface<::grpc::testing::Request>>(
- PrepareAsyncMethodA2Raw(context, response, cq));
+ std::unique_ptr< ::grpc::ClientWriterInterface< ::grpc::testing::Request>> MethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response) {
+ return std::unique_ptr< ::grpc::ClientWriterInterface< ::grpc::testing::Request>>(MethodA2Raw(context, response));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>> AsyncMethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) {
+ return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>>(AsyncMethodA2Raw(context, response, cq, tag));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>> PrepareAsyncMethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>>(PrepareAsyncMethodA2Raw(context, response, cq));
}
// MethodA2 trailing comment 1
// Method A3 leading comment 1
- std::unique_ptr<::grpc::ClientReaderInterface<::grpc::testing::Response>>
- MethodA3(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request) {
- return std::unique_ptr<
- ::grpc::ClientReaderInterface<::grpc::testing::Response>>(
- MethodA3Raw(context, request));
- }
- std::unique_ptr<
- ::grpc::ClientAsyncReaderInterface<::grpc::testing::Response>>
- AsyncMethodA3(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr<
- ::grpc::ClientAsyncReaderInterface<::grpc::testing::Response>>(
- AsyncMethodA3Raw(context, request, cq, tag));
- }
- std::unique_ptr<
- ::grpc::ClientAsyncReaderInterface<::grpc::testing::Response>>
- PrepareAsyncMethodA3(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<
- ::grpc::ClientAsyncReaderInterface<::grpc::testing::Response>>(
- PrepareAsyncMethodA3Raw(context, request, cq));
+ std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::testing::Response>> MethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request) {
+ return std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::testing::Response>>(MethodA3Raw(context, request));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>> AsyncMethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq, void* tag) {
+ return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>>(AsyncMethodA3Raw(context, request, cq, tag));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>> PrepareAsyncMethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>>(PrepareAsyncMethodA3Raw(context, request, cq));
}
// Method A3 trailing comment 1
// Method A4 leading comment 1
- std::unique_ptr<::grpc::ClientReaderWriterInterface<
- ::grpc::testing::Request, ::grpc::testing::Response>>
- MethodA4(::grpc::ClientContext* context) {
- return std::unique_ptr<::grpc::ClientReaderWriterInterface<
- ::grpc::testing::Request, ::grpc::testing::Response>>(
- MethodA4Raw(context));
- }
- std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<
- ::grpc::testing::Request, ::grpc::testing::Response>>
- AsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq,
- void* tag) {
- return std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<
- ::grpc::testing::Request, ::grpc::testing::Response>>(
- AsyncMethodA4Raw(context, cq, tag));
- }
- std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<
- ::grpc::testing::Request, ::grpc::testing::Response>>
- PrepareAsyncMethodA4(::grpc::ClientContext* context,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<
- ::grpc::testing::Request, ::grpc::testing::Response>>(
- PrepareAsyncMethodA4Raw(context, cq));
+ std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>> MethodA4(::grpc::ClientContext* context) {
+ return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>>(MethodA4Raw(context));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>> AsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
+ return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>>(AsyncMethodA4Raw(context, cq, tag));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>> PrepareAsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>>(PrepareAsyncMethodA4Raw(context, cq));
}
// Method A4 trailing comment 1
class experimental_async_interface {
public:
virtual ~experimental_async_interface() {}
// MethodA1 leading comment 1
- virtual void MethodA1(::grpc::ClientContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response,
- std::function<void(::grpc::Status)>) = 0;
+ virtual void MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, std::function<void(::grpc::Status)>) = 0;
// MethodA1 trailing comment 1
// MethodA2 detached leading comment 1
//
// Method A2 leading comment 1
// Method A2 leading comment 2
- virtual void MethodA2(
- ::grpc::ClientContext* context, ::grpc::testing::Response* response,
- ::grpc::experimental::ClientWriteReactor<::grpc::testing::Request>*
- reactor) = 0;
+ virtual void MethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::experimental::ClientWriteReactor< ::grpc::testing::Request>* reactor) = 0;
// MethodA2 trailing comment 1
// Method A3 leading comment 1
- virtual void MethodA3(
- ::grpc::ClientContext* context, ::grpc::testing::Request* request,
- ::grpc::experimental::ClientReadReactor<::grpc::testing::Response>*
- reactor) = 0;
+ virtual void MethodA3(::grpc::ClientContext* context, ::grpc::testing::Request* request, ::grpc::experimental::ClientReadReactor< ::grpc::testing::Response>* reactor) = 0;
// Method A3 trailing comment 1
// Method A4 leading comment 1
- virtual void MethodA4(
- ::grpc::ClientContext* context,
- ::grpc::experimental::ClientBidiReactor<::grpc::testing::Request,
- ::grpc::testing::Response>*
- reactor) = 0;
+ virtual void MethodA4(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::grpc::testing::Request,::grpc::testing::Response>* reactor) = 0;
// Method A4 trailing comment 1
};
- virtual class experimental_async_interface* experimental_async() {
- return nullptr;
- }
-
- private:
- virtual ::grpc::ClientAsyncResponseReaderInterface<
- ::grpc::testing::Response>*
- AsyncMethodA1Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) = 0;
- virtual ::grpc::ClientAsyncResponseReaderInterface<
- ::grpc::testing::Response>*
- PrepareAsyncMethodA1Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) = 0;
- virtual ::grpc::ClientWriterInterface<::grpc::testing::Request>*
- MethodA2Raw(::grpc::ClientContext* context,
- ::grpc::testing::Response* response) = 0;
- virtual ::grpc::ClientAsyncWriterInterface<::grpc::testing::Request>*
- AsyncMethodA2Raw(::grpc::ClientContext* context,
- ::grpc::testing::Response* response,
- ::grpc::CompletionQueue* cq, void* tag) = 0;
- virtual ::grpc::ClientAsyncWriterInterface<::grpc::testing::Request>*
- PrepareAsyncMethodA2Raw(::grpc::ClientContext* context,
- ::grpc::testing::Response* response,
- ::grpc::CompletionQueue* cq) = 0;
- virtual ::grpc::ClientReaderInterface<::grpc::testing::Response>*
- MethodA3Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request) = 0;
- virtual ::grpc::ClientAsyncReaderInterface<::grpc::testing::Response>*
- AsyncMethodA3Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq, void* tag) = 0;
- virtual ::grpc::ClientAsyncReaderInterface<::grpc::testing::Response>*
- PrepareAsyncMethodA3Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) = 0;
- virtual ::grpc::ClientReaderWriterInterface<::grpc::testing::Request,
- ::grpc::testing::Response>*
- MethodA4Raw(::grpc::ClientContext* context) = 0;
- virtual ::grpc::ClientAsyncReaderWriterInterface<::grpc::testing::Request,
- ::grpc::testing::Response>*
- AsyncMethodA4Raw(::grpc::ClientContext* context,
- ::grpc::CompletionQueue* cq, void* tag) = 0;
- virtual ::grpc::ClientAsyncReaderWriterInterface<::grpc::testing::Request,
- ::grpc::testing::Response>*
- PrepareAsyncMethodA4Raw(::grpc::ClientContext* context,
- ::grpc::CompletionQueue* cq) = 0;
+ virtual class experimental_async_interface* experimental_async() { return nullptr; }
+ private:
+ virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>* AsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
+ virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>* PrepareAsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
+ virtual ::grpc::ClientWriterInterface< ::grpc::testing::Request>* MethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response) = 0;
+ virtual ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>* AsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) = 0;
+ virtual ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>* PrepareAsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq) = 0;
+ virtual ::grpc::ClientReaderInterface< ::grpc::testing::Response>* MethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request) = 0;
+ virtual ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>* AsyncMethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
+ virtual ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>* PrepareAsyncMethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
+ virtual ::grpc::ClientReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>* MethodA4Raw(::grpc::ClientContext* context) = 0;
+ virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>* AsyncMethodA4Raw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
+ virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>* PrepareAsyncMethodA4Raw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0;
};
class Stub final : public StubInterface {
public:
- Stub(const std::shared_ptr<::grpc::ChannelInterface>& channel);
- ::grpc::Status MethodA1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::testing::Response* response) override;
- std::unique_ptr<
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>>
- AsyncMethodA1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>>(
- AsyncMethodA1Raw(context, request, cq));
- }
- std::unique_ptr<
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>>
- PrepareAsyncMethodA1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>>(
- PrepareAsyncMethodA1Raw(context, request, cq));
- }
- std::unique_ptr<::grpc::ClientWriter<::grpc::testing::Request>> MethodA2(
- ::grpc::ClientContext* context, ::grpc::testing::Response* response) {
- return std::unique_ptr<::grpc::ClientWriter<::grpc::testing::Request>>(
- MethodA2Raw(context, response));
- }
- std::unique_ptr<::grpc::ClientAsyncWriter<::grpc::testing::Request>>
- AsyncMethodA2(::grpc::ClientContext* context,
- ::grpc::testing::Response* response,
- ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr<
- ::grpc::ClientAsyncWriter<::grpc::testing::Request>>(
- AsyncMethodA2Raw(context, response, cq, tag));
- }
- std::unique_ptr<::grpc::ClientAsyncWriter<::grpc::testing::Request>>
- PrepareAsyncMethodA2(::grpc::ClientContext* context,
- ::grpc::testing::Response* response,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<
- ::grpc::ClientAsyncWriter<::grpc::testing::Request>>(
- PrepareAsyncMethodA2Raw(context, response, cq));
- }
- std::unique_ptr<::grpc::ClientReader<::grpc::testing::Response>> MethodA3(
- ::grpc::ClientContext* context,
- const ::grpc::testing::Request& request) {
- return std::unique_ptr<::grpc::ClientReader<::grpc::testing::Response>>(
- MethodA3Raw(context, request));
- }
- std::unique_ptr<::grpc::ClientAsyncReader<::grpc::testing::Response>>
- AsyncMethodA3(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr<
- ::grpc::ClientAsyncReader<::grpc::testing::Response>>(
- AsyncMethodA3Raw(context, request, cq, tag));
- }
- std::unique_ptr<::grpc::ClientAsyncReader<::grpc::testing::Response>>
- PrepareAsyncMethodA3(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<
- ::grpc::ClientAsyncReader<::grpc::testing::Response>>(
- PrepareAsyncMethodA3Raw(context, request, cq));
- }
- std::unique_ptr<::grpc::ClientReaderWriter<::grpc::testing::Request,
- ::grpc::testing::Response>>
- MethodA4(::grpc::ClientContext* context) {
- return std::unique_ptr<::grpc::ClientReaderWriter<
- ::grpc::testing::Request, ::grpc::testing::Response>>(
- MethodA4Raw(context));
- }
- std::unique_ptr<::grpc::ClientAsyncReaderWriter<::grpc::testing::Request,
- ::grpc::testing::Response>>
- AsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq,
- void* tag) {
- return std::unique_ptr<::grpc::ClientAsyncReaderWriter<
- ::grpc::testing::Request, ::grpc::testing::Response>>(
- AsyncMethodA4Raw(context, cq, tag));
- }
- std::unique_ptr<::grpc::ClientAsyncReaderWriter<::grpc::testing::Request,
- ::grpc::testing::Response>>
- PrepareAsyncMethodA4(::grpc::ClientContext* context,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<::grpc::ClientAsyncReaderWriter<
- ::grpc::testing::Request, ::grpc::testing::Response>>(
- PrepareAsyncMethodA4Raw(context, cq));
- }
- class experimental_async final
- : public StubInterface::experimental_async_interface {
+ Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
+ ::grpc::Status MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) override;
+ std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> AsyncMethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(AsyncMethodA1Raw(context, request, cq));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> PrepareAsyncMethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(PrepareAsyncMethodA1Raw(context, request, cq));
+ }
+ std::unique_ptr< ::grpc::ClientWriter< ::grpc::testing::Request>> MethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response) {
+ return std::unique_ptr< ::grpc::ClientWriter< ::grpc::testing::Request>>(MethodA2Raw(context, response));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::testing::Request>> AsyncMethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) {
+ return std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::testing::Request>>(AsyncMethodA2Raw(context, response, cq, tag));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::testing::Request>> PrepareAsyncMethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::testing::Request>>(PrepareAsyncMethodA2Raw(context, response, cq));
+ }
+ std::unique_ptr< ::grpc::ClientReader< ::grpc::testing::Response>> MethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request) {
+ return std::unique_ptr< ::grpc::ClientReader< ::grpc::testing::Response>>(MethodA3Raw(context, request));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::testing::Response>> AsyncMethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq, void* tag) {
+ return std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::testing::Response>>(AsyncMethodA3Raw(context, request, cq, tag));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::testing::Response>> PrepareAsyncMethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::testing::Response>>(PrepareAsyncMethodA3Raw(context, request, cq));
+ }
+ std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>> MethodA4(::grpc::ClientContext* context) {
+ return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>>(MethodA4Raw(context));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>> AsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
+ return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>>(AsyncMethodA4Raw(context, cq, tag));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>> PrepareAsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>>(PrepareAsyncMethodA4Raw(context, cq));
+ }
+ class experimental_async final :
+ public StubInterface::experimental_async_interface {
public:
- void MethodA1(::grpc::ClientContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response,
- std::function<void(::grpc::Status)>) override;
- void MethodA2(
- ::grpc::ClientContext* context, ::grpc::testing::Response* response,
- ::grpc::experimental::ClientWriteReactor<::grpc::testing::Request>*
- reactor) override;
- void MethodA3(
- ::grpc::ClientContext* context, ::grpc::testing::Request* request,
- ::grpc::experimental::ClientReadReactor<::grpc::testing::Response>*
- reactor) override;
- void MethodA4(::grpc::ClientContext* context,
- ::grpc::experimental::ClientBidiReactor<
- ::grpc::testing::Request, ::grpc::testing::Response>*
- reactor) override;
-
+ void MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, std::function<void(::grpc::Status)>) override;
+ void MethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::experimental::ClientWriteReactor< ::grpc::testing::Request>* reactor) override;
+ void MethodA3(::grpc::ClientContext* context, ::grpc::testing::Request* request, ::grpc::experimental::ClientReadReactor< ::grpc::testing::Response>* reactor) override;
+ void MethodA4(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::grpc::testing::Request,::grpc::testing::Response>* reactor) override;
private:
friend class Stub;
- explicit experimental_async(Stub* stub) : stub_(stub) {}
+ explicit experimental_async(Stub* stub): stub_(stub) { }
Stub* stub() { return stub_; }
Stub* stub_;
};
- class experimental_async_interface* experimental_async() override {
- return &async_stub_;
- }
-
- private:
- std::shared_ptr<::grpc::ChannelInterface> channel_;
- class experimental_async async_stub_ {
- this
- };
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>*
- AsyncMethodA1Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) override;
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>*
- PrepareAsyncMethodA1Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) override;
- ::grpc::ClientWriter<::grpc::testing::Request>* MethodA2Raw(
- ::grpc::ClientContext* context,
- ::grpc::testing::Response* response) override;
- ::grpc::ClientAsyncWriter<::grpc::testing::Request>* AsyncMethodA2Raw(
- ::grpc::ClientContext* context, ::grpc::testing::Response* response,
- ::grpc::CompletionQueue* cq, void* tag) override;
- ::grpc::ClientAsyncWriter<::grpc::testing::Request>*
- PrepareAsyncMethodA2Raw(::grpc::ClientContext* context,
- ::grpc::testing::Response* response,
- ::grpc::CompletionQueue* cq) override;
- ::grpc::ClientReader<::grpc::testing::Response>* MethodA3Raw(
- ::grpc::ClientContext* context,
- const ::grpc::testing::Request& request) override;
- ::grpc::ClientAsyncReader<::grpc::testing::Response>* AsyncMethodA3Raw(
- ::grpc::ClientContext* context, const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq, void* tag) override;
- ::grpc::ClientAsyncReader<::grpc::testing::Response>*
- PrepareAsyncMethodA3Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) override;
- ::grpc::ClientReaderWriter<::grpc::testing::Request,
- ::grpc::testing::Response>*
- MethodA4Raw(::grpc::ClientContext* context) override;
- ::grpc::ClientAsyncReaderWriter<::grpc::testing::Request,
- ::grpc::testing::Response>*
- AsyncMethodA4Raw(::grpc::ClientContext* context,
- ::grpc::CompletionQueue* cq, void* tag) override;
- ::grpc::ClientAsyncReaderWriter<::grpc::testing::Request,
- ::grpc::testing::Response>*
- PrepareAsyncMethodA4Raw(::grpc::ClientContext* context,
- ::grpc::CompletionQueue* cq) override;
+ class experimental_async_interface* experimental_async() override { return &async_stub_; }
+
+ private:
+ std::shared_ptr< ::grpc::ChannelInterface> channel_;
+ class experimental_async async_stub_{this};
+ ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* AsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
+ ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* PrepareAsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
+ ::grpc::ClientWriter< ::grpc::testing::Request>* MethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response) override;
+ ::grpc::ClientAsyncWriter< ::grpc::testing::Request>* AsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) override;
+ ::grpc::ClientAsyncWriter< ::grpc::testing::Request>* PrepareAsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq) override;
+ ::grpc::ClientReader< ::grpc::testing::Response>* MethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request) override;
+ ::grpc::ClientAsyncReader< ::grpc::testing::Response>* AsyncMethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq, void* tag) override;
+ ::grpc::ClientAsyncReader< ::grpc::testing::Response>* PrepareAsyncMethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
+ ::grpc::ClientReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>* MethodA4Raw(::grpc::ClientContext* context) override;
+ ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>* AsyncMethodA4Raw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override;
+ ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>* PrepareAsyncMethodA4Raw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override;
const ::grpc::internal::RpcMethod rpcmethod_MethodA1_;
const ::grpc::internal::RpcMethod rpcmethod_MethodA2_;
const ::grpc::internal::RpcMethod rpcmethod_MethodA3_;
const ::grpc::internal::RpcMethod rpcmethod_MethodA4_;
};
- static std::unique_ptr<Stub> NewStub(
- const std::shared_ptr<::grpc::ChannelInterface>& channel,
- const ::grpc::StubOptions& options = ::grpc::StubOptions());
+ static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
class Service : public ::grpc::Service {
public:
Service();
virtual ~Service();
// MethodA1 leading comment 1
- virtual ::grpc::Status MethodA1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response);
+ virtual ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response);
// MethodA1 trailing comment 1
// MethodA2 detached leading comment 1
//
// Method A2 leading comment 1
// Method A2 leading comment 2
- virtual ::grpc::Status MethodA2(
- ::grpc::ServerContext* context,
- ::grpc::ServerReader<::grpc::testing::Request>* reader,
- ::grpc::testing::Response* response);
+ virtual ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response);
// MethodA2 trailing comment 1
// Method A3 leading comment 1
- virtual ::grpc::Status MethodA3(
- ::grpc::ServerContext* context, const ::grpc::testing::Request* request,
- ::grpc::ServerWriter<::grpc::testing::Response>* writer);
+ virtual ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer);
// Method A3 trailing comment 1
// Method A4 leading comment 1
- virtual ::grpc::Status MethodA4(
- ::grpc::ServerContext* context,
- ::grpc::ServerReaderWriter<::grpc::testing::Response,
- ::grpc::testing::Request>* stream);
+ virtual ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream);
// Method A4 trailing comment 1
};
template <class BaseClass>
class WithAsyncMethod_MethodA1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithAsyncMethod_MethodA1() { ::grpc::Service::MarkMethodAsync(0); }
+ WithAsyncMethod_MethodA1() {
+ ::grpc::Service::MarkMethodAsync(0);
+ }
~WithAsyncMethod_MethodA1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodA1(
- ::grpc::ServerContext* context, ::grpc::testing::Request* request,
- ::grpc::ServerAsyncResponseWriter<::grpc::testing::Response>* response,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
- ::grpc::Service::RequestAsyncUnary(0, context, request, response,
- new_call_cq, notification_cq, tag);
+ void RequestMethodA1(::grpc::ServerContext* context, ::grpc::testing::Request* request, ::grpc::ServerAsyncResponseWriter< ::grpc::testing::Response>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithAsyncMethod_MethodA2 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithAsyncMethod_MethodA2() { ::grpc::Service::MarkMethodAsync(1); }
+ WithAsyncMethod_MethodA2() {
+ ::grpc::Service::MarkMethodAsync(1);
+ }
~WithAsyncMethod_MethodA2() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA2(
- ::grpc::ServerContext* context,
- ::grpc::ServerReader<::grpc::testing::Request>* reader,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodA2(
- ::grpc::ServerContext* context,
- ::grpc::ServerAsyncReader<::grpc::testing::Response,
- ::grpc::testing::Request>* reader,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
- ::grpc::Service::RequestAsyncClientStreaming(
- 1, context, reader, new_call_cq, notification_cq, tag);
+ void RequestMethodA2(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::testing::Response, ::grpc::testing::Request>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncClientStreaming(1, context, reader, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithAsyncMethod_MethodA3 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithAsyncMethod_MethodA3() { ::grpc::Service::MarkMethodAsync(2); }
+ WithAsyncMethod_MethodA3() {
+ ::grpc::Service::MarkMethodAsync(2);
+ }
~WithAsyncMethod_MethodA3() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA3(
- ::grpc::ServerContext* context, const ::grpc::testing::Request* request,
- ::grpc::ServerWriter<::grpc::testing::Response>* writer) override {
+ ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodA3(
- ::grpc::ServerContext* context, ::grpc::testing::Request* request,
- ::grpc::ServerAsyncWriter<::grpc::testing::Response>* writer,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
- ::grpc::Service::RequestAsyncServerStreaming(
- 2, context, request, writer, new_call_cq, notification_cq, tag);
+ void RequestMethodA3(::grpc::ServerContext* context, ::grpc::testing::Request* request, ::grpc::ServerAsyncWriter< ::grpc::testing::Response>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithAsyncMethod_MethodA4 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithAsyncMethod_MethodA4() { ::grpc::Service::MarkMethodAsync(3); }
+ WithAsyncMethod_MethodA4() {
+ ::grpc::Service::MarkMethodAsync(3);
+ }
~WithAsyncMethod_MethodA4() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA4(
- ::grpc::ServerContext* context,
- ::grpc::ServerReaderWriter<::grpc::testing::Response,
- ::grpc::testing::Request>* stream) override {
+ ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodA4(
- ::grpc::ServerContext* context,
- ::grpc::ServerAsyncReaderWriter<::grpc::testing::Response,
- ::grpc::testing::Request>* stream,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
- ::grpc::Service::RequestAsyncBidiStreaming(
- 3, context, stream, new_call_cq, notification_cq, tag);
+ void RequestMethodA4(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
}
};
- typedef WithAsyncMethod_MethodA1<WithAsyncMethod_MethodA2<
- WithAsyncMethod_MethodA3<WithAsyncMethod_MethodA4<Service>>>>
- AsyncService;
+ typedef WithAsyncMethod_MethodA1<WithAsyncMethod_MethodA2<WithAsyncMethod_MethodA3<WithAsyncMethod_MethodA4<Service > > > > AsyncService;
template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodA1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
ExperimentalWithCallbackMethod_MethodA1() {
- ::grpc::Service::experimental().MarkMethodCallback(
- 0, new ::grpc::internal::CallbackUnaryHandler<
- ExperimentalWithCallbackMethod_MethodA1<BaseClass>,
- ::grpc::testing::Request, ::grpc::testing::Response>(
- [this](::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response,
- ::grpc::experimental::ServerCallbackRpcController*
- controller) {
+ ::grpc::Service::experimental().MarkMethodCallback(0,
+ new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithCallbackMethod_MethodA1<BaseClass>, ::grpc::testing::Request, ::grpc::testing::Response>(
+ [this](::grpc::ServerContext* context,
+ const ::grpc::testing::Request* request,
+ ::grpc::testing::Response* response,
+ ::grpc::experimental::ServerCallbackRpcController* controller) {
this->MethodA1(context, request, response, controller);
- },
- this));
+ }, this));
}
~ExperimentalWithCallbackMethod_MethodA1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- virtual void MethodA1(
- ::grpc::ServerContext* context, const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response,
- ::grpc::experimental::ServerCallbackRpcController* controller) {
- controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""));
- }
+ virtual void MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
};
template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodA2 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- ExperimentalWithCallbackMethod_MethodA2() {}
+ ExperimentalWithCallbackMethod_MethodA2() {
+ }
~ExperimentalWithCallbackMethod_MethodA2() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA2(
- ::grpc::ServerContext* context,
- ::grpc::ServerReader<::grpc::testing::Request>* reader,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -621,17 +359,15 @@ class ServiceA final {
template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodA3 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- ExperimentalWithCallbackMethod_MethodA3() {}
+ ExperimentalWithCallbackMethod_MethodA3() {
+ }
~ExperimentalWithCallbackMethod_MethodA3() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA3(
- ::grpc::ServerContext* context, const ::grpc::testing::Request* request,
- ::grpc::ServerWriter<::grpc::testing::Response>* writer) override {
+ ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -639,41 +375,33 @@ class ServiceA final {
template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodA4 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- ExperimentalWithCallbackMethod_MethodA4() {}
+ ExperimentalWithCallbackMethod_MethodA4() {
+ }
~ExperimentalWithCallbackMethod_MethodA4() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA4(
- ::grpc::ServerContext* context,
- ::grpc::ServerReaderWriter<::grpc::testing::Response,
- ::grpc::testing::Request>* stream) override {
+ ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
- typedef ExperimentalWithCallbackMethod_MethodA1<
- ExperimentalWithCallbackMethod_MethodA2<
- ExperimentalWithCallbackMethod_MethodA3<
- ExperimentalWithCallbackMethod_MethodA4<Service>>>>
- ExperimentalCallbackService;
+ typedef ExperimentalWithCallbackMethod_MethodA1<ExperimentalWithCallbackMethod_MethodA2<ExperimentalWithCallbackMethod_MethodA3<ExperimentalWithCallbackMethod_MethodA4<Service > > > > ExperimentalCallbackService;
template <class BaseClass>
class WithGenericMethod_MethodA1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithGenericMethod_MethodA1() { ::grpc::Service::MarkMethodGeneric(0); }
+ WithGenericMethod_MethodA1() {
+ ::grpc::Service::MarkMethodGeneric(0);
+ }
~WithGenericMethod_MethodA1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -681,18 +409,16 @@ class ServiceA final {
template <class BaseClass>
class WithGenericMethod_MethodA2 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithGenericMethod_MethodA2() { ::grpc::Service::MarkMethodGeneric(1); }
+ WithGenericMethod_MethodA2() {
+ ::grpc::Service::MarkMethodGeneric(1);
+ }
~WithGenericMethod_MethodA2() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA2(
- ::grpc::ServerContext* context,
- ::grpc::ServerReader<::grpc::testing::Request>* reader,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -700,17 +426,16 @@ class ServiceA final {
template <class BaseClass>
class WithGenericMethod_MethodA3 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithGenericMethod_MethodA3() { ::grpc::Service::MarkMethodGeneric(2); }
+ WithGenericMethod_MethodA3() {
+ ::grpc::Service::MarkMethodGeneric(2);
+ }
~WithGenericMethod_MethodA3() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA3(
- ::grpc::ServerContext* context, const ::grpc::testing::Request* request,
- ::grpc::ServerWriter<::grpc::testing::Response>* writer) override {
+ ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -718,18 +443,16 @@ class ServiceA final {
template <class BaseClass>
class WithGenericMethod_MethodA4 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithGenericMethod_MethodA4() { ::grpc::Service::MarkMethodGeneric(3); }
+ WithGenericMethod_MethodA4() {
+ ::grpc::Service::MarkMethodGeneric(3);
+ }
~WithGenericMethod_MethodA4() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA4(
- ::grpc::ServerContext* context,
- ::grpc::ServerReaderWriter<::grpc::testing::Response,
- ::grpc::testing::Request>* stream) override {
+ ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -737,164 +460,120 @@ class ServiceA final {
template <class BaseClass>
class WithRawMethod_MethodA1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithRawMethod_MethodA1() { ::grpc::Service::MarkMethodRaw(0); }
+ WithRawMethod_MethodA1() {
+ ::grpc::Service::MarkMethodRaw(0);
+ }
~WithRawMethod_MethodA1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodA1(
- ::grpc::ServerContext* context, ::grpc::ByteBuffer* request,
- ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
- ::grpc::Service::RequestAsyncUnary(0, context, request, response,
- new_call_cq, notification_cq, tag);
+ void RequestMethodA1(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithRawMethod_MethodA2 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithRawMethod_MethodA2() { ::grpc::Service::MarkMethodRaw(1); }
+ WithRawMethod_MethodA2() {
+ ::grpc::Service::MarkMethodRaw(1);
+ }
~WithRawMethod_MethodA2() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA2(
- ::grpc::ServerContext* context,
- ::grpc::ServerReader<::grpc::testing::Request>* reader,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodA2(::grpc::ServerContext* context,
- ::grpc::ServerAsyncReader<::grpc::ByteBuffer,
- ::grpc::ByteBuffer>* reader,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq,
- void* tag) {
- ::grpc::Service::RequestAsyncClientStreaming(
- 1, context, reader, new_call_cq, notification_cq, tag);
+ void RequestMethodA2(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncClientStreaming(1, context, reader, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithRawMethod_MethodA3 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithRawMethod_MethodA3() { ::grpc::Service::MarkMethodRaw(2); }
+ WithRawMethod_MethodA3() {
+ ::grpc::Service::MarkMethodRaw(2);
+ }
~WithRawMethod_MethodA3() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA3(
- ::grpc::ServerContext* context, const ::grpc::testing::Request* request,
- ::grpc::ServerWriter<::grpc::testing::Response>* writer) override {
+ ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodA3(::grpc::ServerContext* context,
- ::grpc::ByteBuffer* request,
- ::grpc::ServerAsyncWriter<::grpc::ByteBuffer>* writer,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq,
- void* tag) {
- ::grpc::Service::RequestAsyncServerStreaming(
- 2, context, request, writer, new_call_cq, notification_cq, tag);
+ void RequestMethodA3(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithRawMethod_MethodA4 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithRawMethod_MethodA4() { ::grpc::Service::MarkMethodRaw(3); }
+ WithRawMethod_MethodA4() {
+ ::grpc::Service::MarkMethodRaw(3);
+ }
~WithRawMethod_MethodA4() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA4(
- ::grpc::ServerContext* context,
- ::grpc::ServerReaderWriter<::grpc::testing::Response,
- ::grpc::testing::Request>* stream) override {
+ ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodA4(
- ::grpc::ServerContext* context,
- ::grpc::ServerAsyncReaderWriter<::grpc::ByteBuffer, ::grpc::ByteBuffer>*
- stream,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
- ::grpc::Service::RequestAsyncBidiStreaming(
- 3, context, stream, new_call_cq, notification_cq, tag);
+ void RequestMethodA4(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodA1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
ExperimentalWithRawCallbackMethod_MethodA1() {
- ::grpc::Service::experimental().MarkMethodRawCallback(
- 0, new ::grpc::internal::CallbackUnaryHandler<
- ExperimentalWithRawCallbackMethod_MethodA1<BaseClass>,
- ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
- [this](::grpc::ServerContext* context,
- const ::grpc::ByteBuffer* request,
- ::grpc::ByteBuffer* response,
- ::grpc::experimental::ServerCallbackRpcController*
- controller) {
+ ::grpc::Service::experimental().MarkMethodRawCallback(0,
+ new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithRawCallbackMethod_MethodA1<BaseClass>, ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
+ [this](::grpc::ServerContext* context,
+ const ::grpc::ByteBuffer* request,
+ ::grpc::ByteBuffer* response,
+ ::grpc::experimental::ServerCallbackRpcController* controller) {
this->MethodA1(context, request, response, controller);
- },
- this));
+ }, this));
}
~ExperimentalWithRawCallbackMethod_MethodA1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- virtual void MethodA1(
- ::grpc::ServerContext* context, const ::grpc::ByteBuffer* request,
- ::grpc::ByteBuffer* response,
- ::grpc::experimental::ServerCallbackRpcController* controller) {
- controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""));
- }
+ virtual void MethodA1(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
};
template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodA2 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- ExperimentalWithRawCallbackMethod_MethodA2() {}
+ ExperimentalWithRawCallbackMethod_MethodA2() {
+ }
~ExperimentalWithRawCallbackMethod_MethodA2() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA2(
- ::grpc::ServerContext* context,
- ::grpc::ServerReader<::grpc::testing::Request>* reader,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -902,17 +581,15 @@ class ServiceA final {
template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodA3 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- ExperimentalWithRawCallbackMethod_MethodA3() {}
+ ExperimentalWithRawCallbackMethod_MethodA3() {
+ }
~ExperimentalWithRawCallbackMethod_MethodA3() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA3(
- ::grpc::ServerContext* context, const ::grpc::testing::Request* request,
- ::grpc::ServerWriter<::grpc::testing::Response>* writer) override {
+ ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -920,18 +597,15 @@ class ServiceA final {
template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodA4 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- ExperimentalWithRawCallbackMethod_MethodA4() {}
+ ExperimentalWithRawCallbackMethod_MethodA4() {
+ }
~ExperimentalWithRawCallbackMethod_MethodA4() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA4(
- ::grpc::ServerContext* context,
- ::grpc::ServerReaderWriter<::grpc::testing::Response,
- ::grpc::testing::Request>* stream) override {
+ ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -939,69 +613,46 @@ class ServiceA final {
template <class BaseClass>
class WithStreamedUnaryMethod_MethodA1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithStreamedUnaryMethod_MethodA1() {
- ::grpc::Service::MarkMethodStreamed(
- 0, new ::grpc::internal::StreamedUnaryHandler<
- ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(
- &WithStreamedUnaryMethod_MethodA1<BaseClass>::StreamedMethodA1,
- this, std::placeholders::_1, std::placeholders::_2)));
+ ::grpc::Service::MarkMethodStreamed(0,
+ new ::grpc::internal::StreamedUnaryHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithStreamedUnaryMethod_MethodA1<BaseClass>::StreamedMethodA1, this, std::placeholders::_1, std::placeholders::_2)));
}
~WithStreamedUnaryMethod_MethodA1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
- ::grpc::Status MethodA1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with streamed unary
- virtual ::grpc::Status StreamedMethodA1(
- ::grpc::ServerContext* context,
- ::grpc::ServerUnaryStreamer<::grpc::testing::Request,
- ::grpc::testing::Response>*
- server_unary_streamer) = 0;
+ virtual ::grpc::Status StreamedMethodA1(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::grpc::testing::Request,::grpc::testing::Response>* server_unary_streamer) = 0;
};
- typedef WithStreamedUnaryMethod_MethodA1<Service> StreamedUnaryService;
+ typedef WithStreamedUnaryMethod_MethodA1<Service > StreamedUnaryService;
template <class BaseClass>
class WithSplitStreamingMethod_MethodA3 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithSplitStreamingMethod_MethodA3() {
- ::grpc::Service::MarkMethodStreamed(
- 2,
- new ::grpc::internal::SplitServerStreamingHandler<
- ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(
- &WithSplitStreamingMethod_MethodA3<BaseClass>::StreamedMethodA3,
- this, std::placeholders::_1, std::placeholders::_2)));
+ ::grpc::Service::MarkMethodStreamed(2,
+ new ::grpc::internal::SplitServerStreamingHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithSplitStreamingMethod_MethodA3<BaseClass>::StreamedMethodA3, this, std::placeholders::_1, std::placeholders::_2)));
}
~WithSplitStreamingMethod_MethodA3() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
- ::grpc::Status MethodA3(
- ::grpc::ServerContext* context, const ::grpc::testing::Request* request,
- ::grpc::ServerWriter<::grpc::testing::Response>* writer) override {
+ ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with split streamed
- virtual ::grpc::Status StreamedMethodA3(
- ::grpc::ServerContext* context,
- ::grpc::ServerSplitStreamer<::grpc::testing::Request,
- ::grpc::testing::Response>*
- server_split_streamer) = 0;
+ virtual ::grpc::Status StreamedMethodA3(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::grpc::testing::Request,::grpc::testing::Response>* server_split_streamer) = 0;
};
- typedef WithSplitStreamingMethod_MethodA3<Service> SplitStreamedService;
- typedef WithStreamedUnaryMethod_MethodA1<
- WithSplitStreamingMethod_MethodA3<Service>>
- StreamedService;
+ typedef WithSplitStreamingMethod_MethodA3<Service > SplitStreamedService;
+ typedef WithStreamedUnaryMethod_MethodA1<WithSplitStreamingMethod_MethodA3<Service > > StreamedService;
};
// ServiceB leading comment 1
@@ -1014,204 +665,125 @@ class ServiceB final {
public:
virtual ~StubInterface() {}
// MethodB1 leading comment 1
- virtual ::grpc::Status MethodB1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::testing::Response* response) = 0;
- std::unique_ptr<
- ::grpc::ClientAsyncResponseReaderInterface<::grpc::testing::Response>>
- AsyncMethodB1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<
- ::grpc::testing::Response>>(AsyncMethodB1Raw(context, request, cq));
- }
- std::unique_ptr<
- ::grpc::ClientAsyncResponseReaderInterface<::grpc::testing::Response>>
- PrepareAsyncMethodB1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<
- ::grpc::testing::Response>>(
- PrepareAsyncMethodB1Raw(context, request, cq));
+ virtual ::grpc::Status MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) = 0;
+ std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>> AsyncMethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>>(AsyncMethodB1Raw(context, request, cq));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>> PrepareAsyncMethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>>(PrepareAsyncMethodB1Raw(context, request, cq));
}
// MethodB1 trailing comment 1
class experimental_async_interface {
public:
virtual ~experimental_async_interface() {}
// MethodB1 leading comment 1
- virtual void MethodB1(::grpc::ClientContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response,
- std::function<void(::grpc::Status)>) = 0;
+ virtual void MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, std::function<void(::grpc::Status)>) = 0;
// MethodB1 trailing comment 1
};
- virtual class experimental_async_interface* experimental_async() {
- return nullptr;
- }
-
- private:
- virtual ::grpc::ClientAsyncResponseReaderInterface<
- ::grpc::testing::Response>*
- AsyncMethodB1Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) = 0;
- virtual ::grpc::ClientAsyncResponseReaderInterface<
- ::grpc::testing::Response>*
- PrepareAsyncMethodB1Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) = 0;
+ virtual class experimental_async_interface* experimental_async() { return nullptr; }
+ private:
+ virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>* AsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
+ virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>* PrepareAsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
};
class Stub final : public StubInterface {
public:
- Stub(const std::shared_ptr<::grpc::ChannelInterface>& channel);
- ::grpc::Status MethodB1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::testing::Response* response) override;
- std::unique_ptr<
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>>
- AsyncMethodB1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>>(
- AsyncMethodB1Raw(context, request, cq));
- }
- std::unique_ptr<
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>>
- PrepareAsyncMethodB1(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) {
- return std::unique_ptr<
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>>(
- PrepareAsyncMethodB1Raw(context, request, cq));
- }
- class experimental_async final
- : public StubInterface::experimental_async_interface {
+ Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
+ ::grpc::Status MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) override;
+ std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> AsyncMethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(AsyncMethodB1Raw(context, request, cq));
+ }
+ std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> PrepareAsyncMethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
+ return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(PrepareAsyncMethodB1Raw(context, request, cq));
+ }
+ class experimental_async final :
+ public StubInterface::experimental_async_interface {
public:
- void MethodB1(::grpc::ClientContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response,
- std::function<void(::grpc::Status)>) override;
-
+ void MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, std::function<void(::grpc::Status)>) override;
private:
friend class Stub;
- explicit experimental_async(Stub* stub) : stub_(stub) {}
+ explicit experimental_async(Stub* stub): stub_(stub) { }
Stub* stub() { return stub_; }
Stub* stub_;
};
- class experimental_async_interface* experimental_async() override {
- return &async_stub_;
- }
+ class experimental_async_interface* experimental_async() override { return &async_stub_; }
private:
- std::shared_ptr<::grpc::ChannelInterface> channel_;
- class experimental_async async_stub_ {
- this
- };
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>*
- AsyncMethodB1Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) override;
- ::grpc::ClientAsyncResponseReader<::grpc::testing::Response>*
- PrepareAsyncMethodB1Raw(::grpc::ClientContext* context,
- const ::grpc::testing::Request& request,
- ::grpc::CompletionQueue* cq) override;
+ std::shared_ptr< ::grpc::ChannelInterface> channel_;
+ class experimental_async async_stub_{this};
+ ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* AsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
+ ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* PrepareAsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
const ::grpc::internal::RpcMethod rpcmethod_MethodB1_;
};
- static std::unique_ptr<Stub> NewStub(
- const std::shared_ptr<::grpc::ChannelInterface>& channel,
- const ::grpc::StubOptions& options = ::grpc::StubOptions());
+ static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
class Service : public ::grpc::Service {
public:
Service();
virtual ~Service();
// MethodB1 leading comment 1
- virtual ::grpc::Status MethodB1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response);
+ virtual ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response);
// MethodB1 trailing comment 1
};
template <class BaseClass>
class WithAsyncMethod_MethodB1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithAsyncMethod_MethodB1() { ::grpc::Service::MarkMethodAsync(0); }
+ WithAsyncMethod_MethodB1() {
+ ::grpc::Service::MarkMethodAsync(0);
+ }
~WithAsyncMethod_MethodB1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodB1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodB1(
- ::grpc::ServerContext* context, ::grpc::testing::Request* request,
- ::grpc::ServerAsyncResponseWriter<::grpc::testing::Response>* response,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
- ::grpc::Service::RequestAsyncUnary(0, context, request, response,
- new_call_cq, notification_cq, tag);
+ void RequestMethodB1(::grpc::ServerContext* context, ::grpc::testing::Request* request, ::grpc::ServerAsyncResponseWriter< ::grpc::testing::Response>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
}
};
- typedef WithAsyncMethod_MethodB1<Service> AsyncService;
+ typedef WithAsyncMethod_MethodB1<Service > AsyncService;
template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodB1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
ExperimentalWithCallbackMethod_MethodB1() {
- ::grpc::Service::experimental().MarkMethodCallback(
- 0, new ::grpc::internal::CallbackUnaryHandler<
- ExperimentalWithCallbackMethod_MethodB1<BaseClass>,
- ::grpc::testing::Request, ::grpc::testing::Response>(
- [this](::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response,
- ::grpc::experimental::ServerCallbackRpcController*
- controller) {
+ ::grpc::Service::experimental().MarkMethodCallback(0,
+ new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithCallbackMethod_MethodB1<BaseClass>, ::grpc::testing::Request, ::grpc::testing::Response>(
+ [this](::grpc::ServerContext* context,
+ const ::grpc::testing::Request* request,
+ ::grpc::testing::Response* response,
+ ::grpc::experimental::ServerCallbackRpcController* controller) {
this->MethodB1(context, request, response, controller);
- },
- this));
+ }, this));
}
~ExperimentalWithCallbackMethod_MethodB1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodB1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- virtual void MethodB1(
- ::grpc::ServerContext* context, const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response,
- ::grpc::experimental::ServerCallbackRpcController* controller) {
- controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""));
- }
+ virtual void MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
};
- typedef ExperimentalWithCallbackMethod_MethodB1<Service>
- ExperimentalCallbackService;
+ typedef ExperimentalWithCallbackMethod_MethodB1<Service > ExperimentalCallbackService;
template <class BaseClass>
class WithGenericMethod_MethodB1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithGenericMethod_MethodB1() { ::grpc::Service::MarkMethodGeneric(0); }
+ WithGenericMethod_MethodB1() {
+ ::grpc::Service::MarkMethodGeneric(0);
+ }
~WithGenericMethod_MethodB1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodB1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -1219,103 +791,76 @@ class ServiceB final {
template <class BaseClass>
class WithRawMethod_MethodB1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
- WithRawMethod_MethodB1() { ::grpc::Service::MarkMethodRaw(0); }
+ WithRawMethod_MethodB1() {
+ ::grpc::Service::MarkMethodRaw(0);
+ }
~WithRawMethod_MethodB1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodB1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- void RequestMethodB1(
- ::grpc::ServerContext* context, ::grpc::ByteBuffer* request,
- ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response,
- ::grpc::CompletionQueue* new_call_cq,
- ::grpc::ServerCompletionQueue* notification_cq, void* tag) {
- ::grpc::Service::RequestAsyncUnary(0, context, request, response,
- new_call_cq, notification_cq, tag);
+ void RequestMethodB1(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+ ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodB1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
ExperimentalWithRawCallbackMethod_MethodB1() {
- ::grpc::Service::experimental().MarkMethodRawCallback(
- 0, new ::grpc::internal::CallbackUnaryHandler<
- ExperimentalWithRawCallbackMethod_MethodB1<BaseClass>,
- ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
- [this](::grpc::ServerContext* context,
- const ::grpc::ByteBuffer* request,
- ::grpc::ByteBuffer* response,
- ::grpc::experimental::ServerCallbackRpcController*
- controller) {
+ ::grpc::Service::experimental().MarkMethodRawCallback(0,
+ new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithRawCallbackMethod_MethodB1<BaseClass>, ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
+ [this](::grpc::ServerContext* context,
+ const ::grpc::ByteBuffer* request,
+ ::grpc::ByteBuffer* response,
+ ::grpc::experimental::ServerCallbackRpcController* controller) {
this->MethodB1(context, request, response, controller);
- },
- this));
+ }, this));
}
~ExperimentalWithRawCallbackMethod_MethodB1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodB1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
- virtual void MethodB1(
- ::grpc::ServerContext* context, const ::grpc::ByteBuffer* request,
- ::grpc::ByteBuffer* response,
- ::grpc::experimental::ServerCallbackRpcController* controller) {
- controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""));
- }
+ virtual void MethodB1(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
};
template <class BaseClass>
class WithStreamedUnaryMethod_MethodB1 : public BaseClass {
private:
- void BaseClassMustBeDerivedFromService(const Service* service) {}
-
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithStreamedUnaryMethod_MethodB1() {
- ::grpc::Service::MarkMethodStreamed(
- 0, new ::grpc::internal::StreamedUnaryHandler<
- ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(
- &WithStreamedUnaryMethod_MethodB1<BaseClass>::StreamedMethodB1,
- this, std::placeholders::_1, std::placeholders::_2)));
+ ::grpc::Service::MarkMethodStreamed(0,
+ new ::grpc::internal::StreamedUnaryHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithStreamedUnaryMethod_MethodB1<BaseClass>::StreamedMethodB1, this, std::placeholders::_1, std::placeholders::_2)));
}
~WithStreamedUnaryMethod_MethodB1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
- ::grpc::Status MethodB1(::grpc::ServerContext* context,
- const ::grpc::testing::Request* request,
- ::grpc::testing::Response* response) override {
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with streamed unary
- virtual ::grpc::Status StreamedMethodB1(
- ::grpc::ServerContext* context,
- ::grpc::ServerUnaryStreamer<::grpc::testing::Request,
- ::grpc::testing::Response>*
- server_unary_streamer) = 0;
+ virtual ::grpc::Status StreamedMethodB1(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::grpc::testing::Request,::grpc::testing::Response>* server_unary_streamer) = 0;
};
- typedef WithStreamedUnaryMethod_MethodB1<Service> StreamedUnaryService;
+ typedef WithStreamedUnaryMethod_MethodB1<Service > StreamedUnaryService;
typedef Service SplitStreamedService;
- typedef WithStreamedUnaryMethod_MethodB1<Service> StreamedService;
+ typedef WithStreamedUnaryMethod_MethodB1<Service > StreamedService;
};
// ServiceB trailing comment 1
} // namespace testing
} // namespace grpc
+
#endif // GRPC_src_2fproto_2fgrpc_2ftesting_2fcompiler_5ftest_2eproto__INCLUDED
diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc
index a1fe199b54..6c18703f06 100644
--- a/test/cpp/end2end/client_callback_end2end_test.cc
+++ b/test/cpp/end2end/client_callback_end2end_test.cc
@@ -206,7 +206,7 @@ class ClientCallbackEnd2endTest
EXPECT_TRUE(ParseFromByteBuffer(&recv_buf_, &response));
EXPECT_EQ(request_.message(), response.message());
};
- void OnDone(Status s) override {
+ void OnDone(const Status& s) override {
EXPECT_TRUE(s.ok());
std::unique_lock<std::mutex> l(mu_);
done_ = true;
@@ -345,7 +345,7 @@ TEST_P(ClientCallbackEnd2endTest, RequestStream) {
StartWriteLast(&request_, WriteOptions());
}
}
- void OnDone(Status s) override {
+ void OnDone(const Status& s) override {
EXPECT_TRUE(s.ok());
EXPECT_EQ(response_.message(), "Hello server.Hello server.Hello server.");
std::unique_lock<std::mutex> l(mu_);
@@ -398,7 +398,7 @@ TEST_P(ClientCallbackEnd2endTest, ResponseStream) {
StartRead(&response_);
}
}
- void OnDone(Status s) override {
+ void OnDone(const Status& s) override {
EXPECT_TRUE(s.ok());
std::unique_lock<std::mutex> l(mu_);
done_ = true;
@@ -458,7 +458,7 @@ TEST_P(ClientCallbackEnd2endTest, BidiStream) {
StartWrite(&request_);
}
}
- void OnDone(Status s) override {
+ void OnDone(const Status& s) override {
EXPECT_TRUE(s.ok());
std::unique_lock<std::mutex> l(mu_);
done_ = true;