Rename interface->service

pull/2301/head
Jorge Canizales 10 years ago
parent 469d4b6fde
commit 1ac8f9a26a
  1. 3
      src/objective-c/GRPCClient/ProtoMethod.h
  2. 2
      src/objective-c/GRPCClient/ProtoMethod.m
  3. 4
      src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.m

@ -38,10 +38,9 @@
// A fully-qualified gRPC method name. Full qualification is needed because a gRPC endpoint can
// implement multiple interfaces.
// TODO(jcanizales): Move to ProtoRPC package.
// TODO(jcanizales): Rename interface -> service.
@interface ProtoMethod : NSObject
@property(nonatomic, readonly) NSString *package;
@property(nonatomic, readonly) NSString *interface;
@property(nonatomic, readonly) NSString *service;
@property(nonatomic, readonly) NSString *method;
- (instancetype)initWithPackage:(NSString *)package
interface:(NSString *)interface

@ -39,7 +39,7 @@
method:(NSString *)method {
if ((self = [super init])) {
_package = [package copy];
_interface = [interface copy];
_service = [interface copy];
_method = [method copy];
}
return self;

@ -36,9 +36,9 @@
@implementation ProtoMethod (HTTP2Encoding)
- (NSString *)HTTP2Path {
if (self.package) {
return [NSString stringWithFormat:@"/%@.%@/%@", self.package, self.interface, self.method];
return [NSString stringWithFormat:@"/%@.%@/%@", self.package, self.service, self.method];
} else {
return [NSString stringWithFormat:@"/%@/%@", self.interface, self.method];
return [NSString stringWithFormat:@"/%@/%@", self.service, self.method];
}
}
@end

Loading…
Cancel
Save