diff options
author | Jorge Canizales <jcanizales@google.com> | 2015-05-15 09:44:04 -0700 |
---|---|---|
committer | Jorge Canizales <jcanizales@google.com> | 2015-05-15 12:03:58 -0700 |
commit | 1900dfc70b04545fe7a0f6a7ad9441ab3ba1fdda (patch) | |
tree | 4e961ab1d1d4b7be254cbc9f37a3bf888fe9eeab /src/compiler/objective_c_generator.cc | |
parent | 1a7918bc6e83db04822cafe06e69ee99a6d666c1 (diff) |
Generate imports for .proto dependencies, and read prefix from file.
The prefix has still to be applied per-message, and we could
do forward-declarations in the generated header.
Diffstat (limited to 'src/compiler/objective_c_generator.cc')
-rw-r--r-- | src/compiler/objective_c_generator.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index 6898b4dda3..8f35302bee 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -118,9 +118,9 @@ void PrintSimpleImplementation(Printer *printer, const MethodDescriptor *method, map<string, string> vars) { printer->Print("{\n"); - printer->Print(vars, "[[self RPCTo$method_name$With"); + printer->Print(vars, " [[self RPCTo$method_name$With"); if (method->client_streaming()) { - printer->Print("RequestsWriter:requestsWriter"); //TODO(jcanizales):request? + printer->Print("RequestsWriter:request"); } else { printer->Print("Request:request"); } @@ -136,12 +136,13 @@ void PrintAdvancedImplementation(Printer *printer, printer->Print(" requestsWriter:"); if (method->client_streaming()) { - printer->Print("requestsWriter\n"); + printer->Print("request\n"); } else { printer->Print("[GRXWriter writerWithValue:request]\n"); } - printer->Print(vars, " responseClass:[$response_type$ class]\n"); + printer->Print(vars, + " responseClass:[$prefix$$response_type$ class]\n"); printer->Print(" responsesWriteable:[GRXWriteable "); if (method->server_streaming()) { |