null_unspecified -> nullable

pull/16190/head
Muxi Yan 7 years ago
parent 680b53f7ad
commit 00ff5805a3
  1. 26
      src/objective-c/GRPCClient/GRPCCall.h
  2. 10
      src/objective-c/ProtoRPC/ProtoRPC.h

@ -306,7 +306,7 @@ NS_ASSUME_NONNULL_END
* *
* The property is initialized to an empty NSMutableDictionary. * The property is initialized to an empty NSMutableDictionary.
*/ */
@property(null_unspecified, atomic, readonly) NSMutableDictionary *requestHeaders; @property(nullable, atomic, readonly) NSMutableDictionary *requestHeaders;
/** /**
* This dictionary is populated with the HTTP headers received from the server. This happens before * This dictionary is populated with the HTTP headers received from the server. This happens before
@ -317,7 +317,7 @@ NS_ASSUME_NONNULL_END
* The value of this property is nil until all response headers are received, and will change before * The value of this property is nil until all response headers are received, and will change before
* any of -writeValue: or -writesFinishedWithError: are sent to the writeable. * any of -writeValue: or -writesFinishedWithError: are sent to the writeable.
*/ */
@property(null_unspecified, atomic, readonly) NSDictionary *responseHeaders; @property(nullable, atomic, readonly) NSDictionary *responseHeaders;
/** /**
* Same as responseHeaders, but populated with the HTTP trailers received from the server before the * Same as responseHeaders, but populated with the HTTP trailers received from the server before the
@ -326,7 +326,7 @@ NS_ASSUME_NONNULL_END
* The value of this property is nil until all response trailers are received, and will change * The value of this property is nil until all response trailers are received, and will change
* before -writesFinishedWithError: is sent to the writeable. * before -writesFinishedWithError: is sent to the writeable.
*/ */
@property(null_unspecified, atomic, readonly) NSDictionary *responseTrailers; @property(nullable, atomic, readonly) NSDictionary *responseTrailers;
/** /**
* The request writer has to write NSData objects into the provided Writeable. The server will * The request writer has to write NSData objects into the provided Writeable. The server will
@ -339,9 +339,9 @@ NS_ASSUME_NONNULL_END
* host parameter should not contain the scheme (http:// or https://), only the name or IP addr * host parameter should not contain the scheme (http:// or https://), only the name or IP addr
* and the port number, for example @"localhost:5050". * and the port number, for example @"localhost:5050".
*/ */
- (null_unspecified instancetype)initWithHost:(null_unspecified NSString *)host - (nullable instancetype)initWithHost:(nullable NSString *)host
path:(null_unspecified NSString *)path path:(nullable NSString *)path
requestsWriter:(null_unspecified GRXWriter *)requestWriter; requestsWriter:(nullable GRXWriter *)requestWriter;
/** /**
* Finishes the request side of this call, notifies the server that the RPC should be cancelled, and * Finishes the request side of this call, notifies the server that the RPC should be cancelled, and
@ -353,11 +353,11 @@ NS_ASSUME_NONNULL_END
* The following methods are deprecated. * The following methods are deprecated.
*/ */
+ (void)setCallSafety:(GRPCCallSafety)callSafety + (void)setCallSafety:(GRPCCallSafety)callSafety
host:(null_unspecified NSString *)host host:(nullable NSString *)host
path:(null_unspecified NSString *)path; path:(nullable NSString *)path;
@property(null_unspecified, atomic, copy, readwrite) NSString *serverName; @property(nullable, atomic, copy, readwrite) NSString *serverName;
@property NSTimeInterval timeout; @property NSTimeInterval timeout;
- (void)setResponseDispatchQueue:(null_unspecified dispatch_queue_t)queue; - (void)setResponseDispatchQueue:(nullable dispatch_queue_t)queue;
@end @end
@ -368,11 +368,11 @@ DEPRECATED_MSG_ATTRIBUTE("Use NSDictionary or NSMutableDictionary instead.")
@protocol GRPCRequestHeaders<NSObject> @protocol GRPCRequestHeaders<NSObject>
@property(nonatomic, readonly) NSUInteger count; @property(nonatomic, readonly) NSUInteger count;
- (null_unspecified id)objectForKeyedSubscript:(null_unspecified id)key; - (nullable id)objectForKeyedSubscript:(nullable id)key;
- (void)setObject:(null_unspecified id)obj forKeyedSubscript:(null_unspecified id)key; - (void)setObject:(nullable id)obj forKeyedSubscript:(nullable id)key;
- (void)removeAllObjects; - (void)removeAllObjects;
- (void)removeObjectForKey:(null_unspecified id)key; - (void)removeObjectForKey:(nullable id)key;
@end @end
#pragma clang diagnostic push #pragma clang diagnostic push

@ -132,11 +132,11 @@ __attribute__((deprecated("Please use GRPCProtoCall."))) @interface ProtoRPC
* addr and the port number, for example @"localhost:5050". * addr and the port number, for example @"localhost:5050".
*/ */
- -
(instancetype _Null_unspecified)initWithHost : (NSString *_Null_unspecified)host method (nullable instancetype)initWithHost : (nullable NSString *)host method
: (GRPCProtoMethod *_Null_unspecified)method requestsWriter : (nullable GRPCProtoMethod *)method requestsWriter
: (GRXWriter *_Null_unspecified)requestsWriter responseClass : (nullable GRXWriter *)requestsWriter responseClass
: (Class _Null_unspecified)responseClass responsesWriteable : (nullable Class)responseClass responsesWriteable
: (id<GRXWriteable> _Null_unspecified)responsesWriteable NS_DESIGNATED_INITIALIZER; : (nullable id<GRXWriteable>)responsesWriteable NS_DESIGNATED_INITIALIZER;
- (void)start; - (void)start;
@end @end

Loading…
Cancel
Save