Revert "Revert "Revert "Provide protocol for initializer of generated messages"""

pull/15303/head
Juanli Shen 7 years ago committed by GitHub
parent 19145e71dc
commit 10a8c16f24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/compiler/objective_c_generator.cc
  2. 6
      src/objective-c/ProtoRPC/ProtoService.h

@ -222,8 +222,7 @@ void PrintMethodImplementations(Printer* printer,
map< ::grpc::string, ::grpc::string> vars = { map< ::grpc::string, ::grpc::string> vars = {
{"service_class", ServiceClassName(service)}}; {"service_class", ServiceClassName(service)}};
printer.Print( printer.Print(vars, "@protocol $service_class$ <NSObject>\n\n");
vars, "@protocol $service_class$ <NSObject, GRPCProtoServiceInit>\n\n");
for (int i = 0; i < service->method_count(); i++) { for (int i = 0; i < service->method_count(); i++) {
PrintMethodDeclarations(&printer, service->method(i)); PrintMethodDeclarations(&printer, service->method(i));
} }

@ -22,12 +22,6 @@
@protocol GRXWriteable; @protocol GRXWriteable;
@class GRXWriter; @class GRXWriter;
@protocol GRPCProtoServiceInit
- (instancetype)initWithHost:(NSString *)host;
@end
__attribute__((deprecated("Please use GRPCProtoService."))) @interface ProtoService __attribute__((deprecated("Please use GRPCProtoService."))) @interface ProtoService
: NSObject - : NSObject -
(instancetype)initWithHost : (NSString *)host packageName (instancetype)initWithHost : (NSString *)host packageName

Loading…
Cancel
Save