diff options
author | Muxi Yan <mxyan@google.com> | 2018-10-10 16:36:09 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-10-10 16:36:09 -0700 |
commit | 5715719afb061feb3c7de931cc8e7126bc9560e5 (patch) | |
tree | d14fd71e8c9a882e9da2275a07622014230ac24f /src/objective-c/ProtoRPC/ProtoRPC.h | |
parent | 553664f59bc947d48c73e6c1976e054fe35147f5 (diff) |
Make multiple -init and +new UNAVAILABLE; identify designated initializer
Diffstat (limited to 'src/objective-c/ProtoRPC/ProtoRPC.h')
-rw-r--r-- | src/objective-c/ProtoRPC/ProtoRPC.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h index 1a27cac2a3..a045ef10a6 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.h +++ b/src/objective-c/ProtoRPC/ProtoRPC.h @@ -26,6 +26,10 @@ /** A unary-request RPC call with Protobuf. */ @interface GRPCUnaryProtoCall : NSObject +- (instancetype)init NS_UNAVAILABLE; + ++ (instancetype)new NS_UNAVAILABLE; + /** * Users should not use this initializer directly. Call objects will be created, initialized, and * returned to users by methods of the generated service. @@ -34,7 +38,7 @@ message:(GPBMessage *)message responseHandler:(id<GRPCResponseHandler>)handler callOptions:(GRPCCallOptions *)callOptions - responseClass:(Class)responseClass; + responseClass:(Class)responseClass NS_DESIGNATED_INITIALIZER; /** Cancel the call at best effort. */ - (void)cancel; @@ -44,6 +48,10 @@ /** A client-streaming RPC call with Protobuf. */ @interface GRPCStreamingProtoCall : NSObject +- (instancetype)init NS_UNAVAILABLE; + ++ (instancetype)new NS_UNAVAILABLE; + /** * Users should not use this initializer directly. Call objects will be created, initialized, and * returned to users by methods of the generated service. @@ -51,7 +59,7 @@ - (instancetype)initWithRequestOptions:(GRPCRequestOptions *)requestOptions responseHandler:(id<GRPCResponseHandler>)handler callOptions:(GRPCCallOptions *)callOptions - responseClass:(Class)responseClass; + responseClass:(Class)responseClass NS_DESIGNATED_INITIALIZER; /** Cancel the call at best effort. */ - (void)cancel; |