diff options
author | Muxi Yan <mxyan@google.com> | 2018-12-06 12:42:27 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-12-06 12:51:24 -0800 |
commit | 76f1ec16e1880605215beb60a204b0cab7c36b2d (patch) | |
tree | 108a7fefb41921a7a9fbb9cd94e3334496ebeab2 /src/objective-c/GRPCClient/GRPCCall.h | |
parent | 70f34521deaeaf0d783f30d121fd26787135ac04 (diff) |
sensible nullability annotation for old API
Diffstat (limited to 'src/objective-c/GRPCClient/GRPCCall.h')
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCall.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h index 214969af23..51a82263bf 100644 --- a/src/objective-c/GRPCClient/GRPCCall.h +++ b/src/objective-c/GRPCClient/GRPCCall.h @@ -282,6 +282,8 @@ NS_ASSUME_NONNULL_END */ @interface GRPCCall : GRXWriter +- (instancetype)init NS_UNAVAILABLE; + /** * The container of the request headers of an RPC conforms to this protocol, which is a subset of * NSMutableDictionary's interface. It will become a NSMutableDictionary later on. @@ -306,7 +308,7 @@ NS_ASSUME_NONNULL_END * * The property is initialized to an empty NSMutableDictionary. */ -@property(nullable, atomic, readonly) NSMutableDictionary *requestHeaders; +@property(nonnull, atomic, readonly) NSMutableDictionary *requestHeaders; /** * This dictionary is populated with the HTTP headers received from the server. This happens before @@ -339,9 +341,9 @@ NS_ASSUME_NONNULL_END * host parameter should not contain the scheme (http:// or https://), only the name or IP addr * and the port number, for example @"localhost:5050". */ -- (nullable instancetype)initWithHost:(nullable NSString *)host - path:(nullable NSString *)path - requestsWriter:(nullable GRXWriter *)requestWriter; +- (nullable instancetype)initWithHost:(nonnull NSString *)host + path:(nonnull NSString *)path + requestsWriter:(nonnull GRXWriter *)requestWriter; /** * Finishes the request side of this call, notifies the server that the RPC should be cancelled, and @@ -353,11 +355,11 @@ NS_ASSUME_NONNULL_END * The following methods are deprecated. */ + (void)setCallSafety:(GRPCCallSafety)callSafety - host:(nullable NSString *)host - path:(nullable NSString *)path; + host:(nonnull NSString *)host + path:(nonnull NSString *)path; @property(nullable, atomic, copy, readwrite) NSString *serverName; @property NSTimeInterval timeout; -- (void)setResponseDispatchQueue:(nullable dispatch_queue_t)queue; +- (void)setResponseDispatchQueue:(nonnull dispatch_queue_t)queue; @end @@ -368,11 +370,11 @@ DEPRECATED_MSG_ATTRIBUTE("Use NSDictionary or NSMutableDictionary instead.") @protocol GRPCRequestHeaders<NSObject> @property(nonatomic, readonly) NSUInteger count; -- (nullable id)objectForKeyedSubscript:(nullable id)key; -- (void)setObject:(nullable id)obj forKeyedSubscript:(nullable id)key; +- (nullable id)objectForKeyedSubscript:(nonnull id)key; +- (void)setObject:(nullable id)obj forKeyedSubscript:(nonnull id)key; - (void)removeAllObjects; -- (void)removeObjectForKey:(nullable id)key; +- (void)removeObjectForKey:(nonnull id)key; @end #pragma clang diagnostic push |