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.
diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc
index 6898b4d..8f35302 100644
--- a/src/compiler/objective_c_generator.cc
+++ b/src/compiler/objective_c_generator.cc
@@ -118,9 +118,9 @@
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 @@
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()) {