From ca3cb3e19a618157ea70a5054be5b11e5dc1203c Mon Sep 17 00:00:00 2001 From: Yang Gao Date: Thu, 12 Feb 2015 00:05:11 -0800 Subject: [PATCH] Prefix Request to async server method names --- src/compiler/cpp_generator.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index d04c2efcc49..e29cfadcefb 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -251,26 +251,26 @@ void PrintHeaderServerMethodAsync( grpc_cpp_generator::ClassName(method->output_type(), true); if (NoStreaming(method)) { printer->Print(*vars, - "void $Method$(" + "void Request$Method$(" "::grpc::ServerContext* context, $Request$* request, " "::grpc::ServerAsyncResponseWriter< $Response$>* response, " "::grpc::CompletionQueue* cq, void *tag);\n"); } else if (ClientOnlyStreaming(method)) { printer->Print(*vars, - "void $Method$(" + "void Request$Method$(" "::grpc::ServerContext* context, " "::grpc::ServerAsyncReader< $Request$>* reader, " "::grpc::CompletionQueue* cq, void *tag);\n"); } else if (ServerOnlyStreaming(method)) { printer->Print(*vars, - "void $Method$(" + "void Request$Method$(" "::grpc::ServerContext* context, $Request$* request, " "::grpc::ServerAsyncWriter< $Response$>* writer, " "::grpc::CompletionQueue* cq, void *tag);\n"); } else if (BidiStreaming(method)) { printer->Print( *vars, - "void $Method$(" + "void Request$Method$(" "::grpc::ServerContext* context, " "::grpc::ServerAsyncReaderWriter< $Response$, $Request$>* stream, " "::grpc::CompletionQueue* cq, void *tag);\n"); @@ -472,7 +472,7 @@ void PrintSourceServerAsyncMethod(google::protobuf::io::Printer *printer, grpc_cpp_generator::ClassName(method->output_type(), true); if (NoStreaming(method)) { printer->Print(*vars, - "void $Service$::AsyncService::$Method$(" + "void $Service$::AsyncService::Request$Method$(" "::grpc::ServerContext* context, " "$Request$* request, " "::grpc::ServerAsyncResponseWriter< $Response$>* response, " @@ -480,14 +480,14 @@ void PrintSourceServerAsyncMethod(google::protobuf::io::Printer *printer, printer->Print("}\n\n"); } else if (ClientOnlyStreaming(method)) { printer->Print(*vars, - "void $Service$::AsyncService::$Method$(" + "void $Service$::AsyncService::Request$Method$(" "::grpc::ServerContext* context, " "::grpc::ServerAsyncReader< $Request$>* reader, " "::grpc::CompletionQueue* cq, void* tag) {\n"); printer->Print("}\n\n"); } else if (ServerOnlyStreaming(method)) { printer->Print(*vars, - "void $Service$::AsyncService::$Method$(" + "void $Service$::AsyncService::Request$Method$(" "::grpc::ServerContext* context, " "$Request$* request, " "::grpc::ServerAsyncWriter< $Response$>* writer, " @@ -495,7 +495,7 @@ void PrintSourceServerAsyncMethod(google::protobuf::io::Printer *printer, printer->Print("}\n\n"); } else if (BidiStreaming(method)) { printer->Print(*vars, - "void $Service$::AsyncService::$Method$(" + "void $Service$::AsyncService::Request$Method$(" "::grpc::ServerContext* context, " "::grpc::ServerAsyncReaderWriter< $Response$, $Request$>* stream, " "::grpc::CompletionQueue* cq, void *tag) {\n");