clang-format

pull/16190/head
Muxi Yan 6 years ago
parent 5ae61f5a5a
commit fdf4b8f2f7
  1. 2
      src/objective-c/GRPCClient/GRPCCallOptions.h
  2. 3
      src/objective-c/GRPCClient/private/GRPCChannel.h
  3. 7
      src/objective-c/GRPCClient/private/GRPCChannelPool.h
  4. 6
      src/objective-c/GRPCClient/private/GRPCChannelPool.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,
* \a handler is expected to be called with \a token being the new token to be used for this call.
*/
- (void)getTokenWithHandler:(void (^ _Nullable)(NSString * _Nullable token))handler;
- (void)getTokenWithHandler:(void (^_Nullable)(NSString *_Nullable token))handler;
@end
@interface GRPCCallOptions : NSObject<NSCopying, NSMutableCopying>

@ -51,7 +51,8 @@ NS_ASSUME_NONNULL_BEGIN
/** Acquire the dictionary of channel args with current configurations. */
@property(copy, readonly) NSDictionary *channelArgs;
- (nullable instancetype)initWithHost:(NSString *)host callOptions:(GRPCCallOptions *)callOptions NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithHost:(NSString *)host
callOptions:(GRPCCallOptions *)callOptions NS_DESIGNATED_INITIALIZER;
@end

@ -41,14 +41,15 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable instancetype)init NS_UNAVAILABLE;
+ (nullable instancetype)new NS_UNAVAILABLE;
+ (nullable instancetype) new NS_UNAVAILABLE;
/**
* Initialize with an actual channel object \a channel and a reference to the channel pool.
*/
- (nullable instancetype)initWithChannelConfiguration:
(GRPCChannelConfiguration *)channelConfiguration
channelPool:(GRPCChannelPool *)channelPool NS_DESIGNATED_INITIALIZER;
channelPool:(GRPCChannelPool *)channelPool
NS_DESIGNATED_INITIALIZER;
/**
* Create a grpc core call object (grpc_call) from this channel. If channel is disconnected, get a
@ -91,7 +92,7 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable instancetype)init NS_UNAVAILABLE;
+ (nullable instancetype)new NS_UNAVAILABLE;
+ (nullable instancetype) new NS_UNAVAILABLE;
/**
* Get the global channel pool.

@ -74,7 +74,8 @@ static const NSTimeInterval kDefaultChannelDestroyDelay = 30;
}
- (void)dealloc {
NSAssert([_unmanagedCalls count] == 0 && _wrappedChannel == nil, @"Pooled channel should only be"
NSAssert([_unmanagedCalls count] == 0 && _wrappedChannel == nil,
@"Pooled channel should only be"
"destroyed after the wrapped channel is destroyed");
}
@ -183,7 +184,8 @@ static const NSTimeInterval kDefaultChannelDestroyDelay = 30;
+ (instancetype)sharedInstance {
dispatch_once(&gInitChannelPool, ^{
gChannelPool = [[GRPCChannelPool alloc] initInstanceWithDestroyDelay:kDefaultChannelDestroyDelay];
gChannelPool =
[[GRPCChannelPool alloc] initInstanceWithDestroyDelay:kDefaultChannelDestroyDelay];
NSAssert(gChannelPool != nil, @"Cannot initialize global channel pool.");
});
return gChannelPool;

Loading…
Cancel
Save