more nullability

pull/16190/head
Muxi Yan 6 years ago
parent 29e1591904
commit d806ce71d7
  1. 2
      src/objective-c/GRPCClient/GRPCCallOptions.h
  2. 6
      src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.h
  3. 3
      src/objective-c/tests/APIv2Tests/APIv2Tests.m

@ -64,7 +64,7 @@ typedef NS_ENUM(NSUInteger, GRPCTransportType) {
* This method is called when gRPC is about to start the call. When OAuth token is acquired, * This method is called when gRPC is about to start the call. When OAuth token is acquired,
* \a handler is expected to be called with \a token being the new token to be used for this call. * \a handler is expected to be called with \a token being the new token to be used for this call.
*/ */
- (void)getTokenWithHandler:(void (^)(NSString *token))handler; - (void)getTokenWithHandler:(void (^)(NSString * _Nullable token))handler;
@end @end
@interface GRPCCallOptions : NSObject<NSCopying, NSMutableCopying> @interface GRPCCallOptions : NSObject<NSCopying, NSMutableCopying>

@ -24,9 +24,9 @@ NS_ASSUME_NONNULL_BEGIN
@interface GRPCSecureChannelFactory : NSObject<GRPCChannelFactory> @interface GRPCSecureChannelFactory : NSObject<GRPCChannelFactory>
+ (nullable instancetype)factoryWithPEMRootCertificates:(nullable NSString *)rootCerts + (nullable instancetype)factoryWithPEMRootCertificates:(nullable NSString *)rootCerts
privateKey:(nullable NSString *)privateKey privateKey:(nullable NSString *)privateKey
certChain:(nullable NSString *)certChain certChain:(nullable NSString *)certChain
error:(NSError **)errorPtr; error:(NSError **)errorPtr;
- (nullable grpc_channel *)createChannelWithHost:(NSString *)host - (nullable grpc_channel *)createChannelWithHost:(NSString *)host
channelArgs:(nullable NSDictionary *)args; channelArgs:(nullable NSDictionary *)args;

@ -93,8 +93,7 @@ static const NSTimeInterval kTestTimeout = 16;
} }
} }
- (void)closedWithTrailingMetadata:(NSDictionary *)trailingMetadata - (void)closedWithTrailingMetadata:(NSDictionary *)trailingMetadata error:(NSError *)error {
error:(NSError *)error {
if (self->_closeCallback) { if (self->_closeCallback) {
self->_closeCallback(trailingMetadata, error); self->_closeCallback(trailingMetadata, error);
} }

Loading…
Cancel
Save