diff options
author | Makarand Dharmapurikar <makarandd@google.com> | 2016-06-07 16:52:19 -0700 |
---|---|---|
committer | Makarand Dharmapurikar <makarandd@google.com> | 2016-06-07 16:52:19 -0700 |
commit | 6f9501098ec0714f620b0913ffdc6f824f8aca14 (patch) | |
tree | 05fb702c50c77fa4081ab56db90f6af767e1459d /src/objective-c | |
parent | d30d4e279c4a63effaa6e912fc00bd4ad96054c7 (diff) |
fix for issue 5548. Deprecated old classes and created subclasses.
Diffstat (limited to 'src/objective-c')
-rw-r--r-- | src/objective-c/ProtoRPC/ProtoMethod.h | 9 | ||||
-rw-r--r-- | src/objective-c/ProtoRPC/ProtoMethod.m | 4 | ||||
-rw-r--r-- | src/objective-c/ProtoRPC/ProtoRPC.h | 11 | ||||
-rw-r--r-- | src/objective-c/ProtoRPC/ProtoRPC.m | 6 | ||||
-rw-r--r-- | src/objective-c/ProtoRPC/ProtoService.h | 15 | ||||
-rw-r--r-- | src/objective-c/ProtoRPC/ProtoService.m | 4 |
6 files changed, 45 insertions, 4 deletions
diff --git a/src/objective-c/ProtoRPC/ProtoMethod.h b/src/objective-c/ProtoRPC/ProtoMethod.h index a0ed2cf98a..bd1a848c19 100644 --- a/src/objective-c/ProtoRPC/ProtoMethod.h +++ b/src/objective-c/ProtoRPC/ProtoMethod.h @@ -37,6 +37,7 @@ * A fully-qualified proto service method name. Full qualification is needed because a gRPC endpoint * can implement multiple services. */ +__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod : NSObject @property(nonatomic, readonly) NSString *package; @property(nonatomic, readonly) NSString *service; @@ -48,3 +49,11 @@ service:(NSString *)service method:(NSString *)method; @end + +/** + * This subclass is empty now. Eventually we'll remove ProtoService class + * to avoid potential naming conflict + */ +@interface GRPCProtoMethod : ProtoMethod + +@end diff --git a/src/objective-c/ProtoRPC/ProtoMethod.m b/src/objective-c/ProtoRPC/ProtoMethod.m index 4b7ed63123..e9978f38af 100644 --- a/src/objective-c/ProtoRPC/ProtoMethod.m +++ b/src/objective-c/ProtoRPC/ProtoMethod.m @@ -53,3 +53,7 @@ } } @end + +@implementation GRPCProtoMethod + +@end diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h index bd926b7328..55fefb0aa8 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.h +++ b/src/objective-c/ProtoRPC/ProtoRPC.h @@ -36,13 +36,22 @@ #import "ProtoMethod.h" +__attribute__((deprecated("Please use GRPCProtoRPC."))) @interface ProtoRPC : GRPCCall - (instancetype)initWithHost:(NSString *)host - method:(ProtoMethod *)method + method:(GRPCProtoMethod *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id<GRXWriteable>)responsesWriteable NS_DESIGNATED_INITIALIZER; - (void)start; @end + +/** + * This subclass is empty now. Eventually we'll remove ProtoService class + * to avoid potential naming conflict + */ +@interface GRPCProtoRPC : ProtoRPC + +@end diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m index 9bf66f347a..27c8b0eff7 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.m +++ b/src/objective-c/ProtoRPC/ProtoRPC.m @@ -70,7 +70,7 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing // Designated initializer - (instancetype)initWithHost:(NSString *)host - method:(ProtoMethod *)method + method:(GRPCProtoMethod *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id<GRXWriteable>)responsesWriteable { @@ -117,3 +117,7 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing _responseWriteable = nil; } @end + +@implementation GRPCProtoRPC + +@end diff --git a/src/objective-c/ProtoRPC/ProtoService.h b/src/objective-c/ProtoRPC/ProtoService.h index 2e8cb33696..edec8a4770 100644 --- a/src/objective-c/ProtoRPC/ProtoService.h +++ b/src/objective-c/ProtoRPC/ProtoService.h @@ -33,17 +33,28 @@ #import <Foundation/Foundation.h> -@class ProtoRPC; +@class GRPCProtoRPC; @protocol GRXWriteable; @class GRXWriter; + +__attribute__((deprecated("Please use GRPCProtoService."))) @interface ProtoService : NSObject - (instancetype)initWithHost:(NSString *)host packageName:(NSString *)packageName serviceName:(NSString *)serviceName NS_DESIGNATED_INITIALIZER; -- (ProtoRPC *)RPCToMethod:(NSString *)method +- (GRPCProtoRPC *)RPCToMethod:(NSString *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id<GRXWriteable>)responsesWriteable; @end + + +/** + * This subclass is empty now. Eventually we'll remove ProtoService class + * to avoid potential naming conflict + */ +@interface GRPCProtoService : ProtoService + +@end diff --git a/src/objective-c/ProtoRPC/ProtoService.m b/src/objective-c/ProtoRPC/ProtoService.m index fccc6aadc9..597c3cf0fe 100644 --- a/src/objective-c/ProtoRPC/ProtoService.m +++ b/src/objective-c/ProtoRPC/ProtoService.m @@ -79,3 +79,7 @@ responsesWriteable:responsesWriteable]; } @end + +@implementation GRPCProtoService + +@end |