|
|
|
@ -604,10 +604,6 @@ void PrintHeaderClientMethodCallbackInterfaces( |
|
|
|
|
"virtual void $Method$(::grpc::ClientContext* context, " |
|
|
|
|
"const $Request$* request, $Response$* response, " |
|
|
|
|
"std::function<void(::grpc::Status)>) = 0;\n"); |
|
|
|
|
printer->Print(*vars, |
|
|
|
|
"virtual void $Method$(::grpc::ClientContext* context, " |
|
|
|
|
"const ::grpc::ByteBuffer* request, $Response$* response, " |
|
|
|
|
"std::function<void(::grpc::Status)>) = 0;\n"); |
|
|
|
|
// TODO(vjpai): Remove experimental versions and macros when callback API is
|
|
|
|
|
// fully de-experimentalized.
|
|
|
|
|
printer->Print(*vars, |
|
|
|
@ -620,16 +616,6 @@ void PrintHeaderClientMethodCallbackInterfaces( |
|
|
|
|
"const $Request$* request, $Response$* response, " |
|
|
|
|
"::grpc::experimental::ClientUnaryReactor* reactor) = 0;\n" |
|
|
|
|
"#endif\n"); |
|
|
|
|
printer->Print(*vars, |
|
|
|
|
"#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" |
|
|
|
|
"virtual void $Method$(::grpc::ClientContext* context, " |
|
|
|
|
"const ::grpc::ByteBuffer* request, $Response$* response, " |
|
|
|
|
"::grpc::ClientUnaryReactor* reactor) = 0;\n" |
|
|
|
|
"#else\n" |
|
|
|
|
"virtual void $Method$(::grpc::ClientContext* context, " |
|
|
|
|
"const ::grpc::ByteBuffer* request, $Response$* response, " |
|
|
|
|
"::grpc::experimental::ClientUnaryReactor* reactor) = 0;\n" |
|
|
|
|
"#endif\n"); |
|
|
|
|
} else if (ClientOnlyStreaming(method)) { |
|
|
|
|
printer->Print(*vars, |
|
|
|
|
"#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" |
|
|
|
@ -716,10 +702,6 @@ void PrintHeaderClientMethodCallback(grpc_generator::Printer* printer, |
|
|
|
|
"void $Method$(::grpc::ClientContext* context, " |
|
|
|
|
"const $Request$* request, $Response$* response, " |
|
|
|
|
"std::function<void(::grpc::Status)>) override;\n"); |
|
|
|
|
printer->Print(*vars, |
|
|
|
|
"void $Method$(::grpc::ClientContext* context, " |
|
|
|
|
"const ::grpc::ByteBuffer* request, $Response$* response, " |
|
|
|
|
"std::function<void(::grpc::Status)>) override;\n"); |
|
|
|
|
printer->Print( |
|
|
|
|
*vars, |
|
|
|
|
"#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" |
|
|
|
@ -731,17 +713,6 @@ void PrintHeaderClientMethodCallback(grpc_generator::Printer* printer, |
|
|
|
|
"const $Request$* request, $Response$* response, " |
|
|
|
|
"::grpc::experimental::ClientUnaryReactor* reactor) override;\n" |
|
|
|
|
"#endif\n"); |
|
|
|
|
printer->Print( |
|
|
|
|
*vars, |
|
|
|
|
"#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" |
|
|
|
|
"void $Method$(::grpc::ClientContext* context, " |
|
|
|
|
"const ::grpc::ByteBuffer* request, $Response$* response, " |
|
|
|
|
"::grpc::ClientUnaryReactor* reactor) override;\n" |
|
|
|
|
"#else\n" |
|
|
|
|
"void $Method$(::grpc::ClientContext* context, " |
|
|
|
|
"const ::grpc::ByteBuffer* request, $Response$* response, " |
|
|
|
|
"::grpc::experimental::ClientUnaryReactor* reactor) override;\n" |
|
|
|
|
"#endif\n"); |
|
|
|
|
} else if (ClientOnlyStreaming(method)) { |
|
|
|
|
printer->Print(*vars, |
|
|
|
|
"#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" |
|
|
|
@ -1929,16 +1900,6 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer, |
|
|
|
|
"(stub_->channel_.get(), stub_->rpcmethod_$Method$_, " |
|
|
|
|
"context, request, response, std::move(f));\n}\n\n"); |
|
|
|
|
|
|
|
|
|
printer->Print(*vars, |
|
|
|
|
"void $ns$$Service$::Stub::experimental_async::$Method$(" |
|
|
|
|
"::grpc::ClientContext* context, " |
|
|
|
|
"const ::grpc::ByteBuffer* request, $Response$* response, " |
|
|
|
|
"std::function<void(::grpc::Status)> f) {\n"); |
|
|
|
|
printer->Print(*vars, |
|
|
|
|
" ::grpc::internal::CallbackUnaryCall" |
|
|
|
|
"(stub_->channel_.get(), stub_->rpcmethod_$Method$_, " |
|
|
|
|
"context, request, response, std::move(f));\n}\n\n"); |
|
|
|
|
|
|
|
|
|
printer->Print(*vars, |
|
|
|
|
"void $ns$$Service$::Stub::experimental_async::$Method$(" |
|
|
|
|
"::grpc::ClientContext* context, " |
|
|
|
@ -1949,16 +1910,6 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer, |
|
|
|
|
"(stub_->channel_.get(), stub_->rpcmethod_$Method$_, " |
|
|
|
|
"context, request, response, reactor);\n}\n\n"); |
|
|
|
|
|
|
|
|
|
printer->Print(*vars, |
|
|
|
|
"void $ns$$Service$::Stub::experimental_async::$Method$(" |
|
|
|
|
"::grpc::ClientContext* context, " |
|
|
|
|
"const ::grpc::ByteBuffer* request, $Response$* response, " |
|
|
|
|
"::grpc::experimental::ClientUnaryReactor* reactor) {\n"); |
|
|
|
|
printer->Print(*vars, |
|
|
|
|
" ::grpc::internal::ClientCallbackUnaryFactory::Create" |
|
|
|
|
"(stub_->channel_.get(), stub_->rpcmethod_$Method$_, " |
|
|
|
|
"context, request, response, reactor);\n}\n\n"); |
|
|
|
|
|
|
|
|
|
printer->Print(*vars, |
|
|
|
|
"::grpc::ClientAsyncResponseReader< $Response$>* " |
|
|
|
|
"$ns$$Service$::Stub::PrepareAsync$Method$Raw(::grpc::" |
|
|
|
|