diff options
Diffstat (limited to 'src/objective-c')
19 files changed, 34 insertions, 34 deletions
diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 9065ab9f73..80e1069ddd 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler-gRPCPlugin' - v = '1.8.0-dev' + v = '1.9.0-dev' s.version = v s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.' s.description = <<-DESC diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index b5ab611848..ac4596da25 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -299,7 +299,7 @@ static NSString * const kBearerPrefix = @"Bearer "; // network queue if the write didn't succeed. // If the call is a unary call, parameter \a errorHandler will be ignored and // the error handler of GRPCOpSendClose will be executed in case of error. -- (void)writeMessage:(NSData *)message withErrorHandler:(void (^)())errorHandler { +- (void)writeMessage:(NSData *)message withErrorHandler:(void (^)(void))errorHandler { __weak GRPCCall *weakSelf = self; void(^resumingHandler)(void) = ^{ @@ -345,7 +345,7 @@ static NSString * const kBearerPrefix = @"Bearer "; // Only called from the call queue. The error handler will be called from the // network queue if the requests stream couldn't be closed successfully. -- (void)finishRequestWithErrorHandler:(void (^)())errorHandler { +- (void)finishRequestWithErrorHandler:(void (^)(void))errorHandler { if (!_unaryCall) { [_wrappedCall startBatchWithOperations:@[[[GRPCOpSendClose alloc] init]] errorHandler:errorHandler]; @@ -441,7 +441,7 @@ static NSString * const kBearerPrefix = @"Bearer "; } _connectivityMonitor = [GRPCConnectivityMonitor monitorWithHost:host]; __weak typeof(self) weakSelf = self; - void (^handler)() = ^{ + void (^handler)(void) = ^{ typeof(self) strongSelf = weakSelf; [strongSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain code:GRPCErrorCodeUnavailable diff --git a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.h b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.h index 8d3c45ee50..cb55e46d70 100644 --- a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.h +++ b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.h @@ -57,6 +57,6 @@ * Only one handler is active at a time, so if this method is called again before the previous * handler has been called, it might never be called at all (or yes, if it has already been queued). */ -- (void)handleLossWithHandler:(nullable void (^)())lossHandler - wifiStatusChangeHandler:(nullable void (^)())wifiStatusChangeHandler; +- (void)handleLossWithHandler:(nullable void (^)(void))lossHandler + wifiStatusChangeHandler:(nullable void (^)(void))wifiStatusChangeHandler; @end diff --git a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m index b322638500..c8e10dd75f 100644 --- a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m +++ b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m @@ -136,8 +136,8 @@ static void PassFlagsToContextInfoBlock(SCNetworkReachabilityRef target, return returnValue; } -- (void)handleLossWithHandler:(nullable void (^)())lossHandler - wifiStatusChangeHandler:(nullable void (^)())wifiStatusChangeHandler { +- (void)handleLossWithHandler:(nullable void (^)(void))lossHandler + wifiStatusChangeHandler:(nullable void (^)(void))wifiStatusChangeHandler { __weak typeof(self) weakSelf = self; [self startListeningWithHandler:^(GRPCReachabilityFlags *flags) { typeof(self) strongSelf = weakSelf; diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m index f73e9cbc50..a0f4118740 100644 --- a/src/objective-c/GRPCClient/private/GRPCHost.m +++ b/src/objective-c/GRPCClient/private/GRPCHost.m @@ -93,7 +93,7 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil; if (!connectivityMonitor) { connectivityMonitor = [GRPCConnectivityMonitor monitorWithHost:hostURL.host]; - void (^handler)() = ^{ + void (^handler)(void) = ^{ [GRPCHost flushChannelCache]; }; [connectivityMonitor handleLossWithHandler:handler diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.h b/src/objective-c/GRPCClient/private/GRPCWrappedCall.h index 1cd9da8f3e..f569895e7c 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.h +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.h @@ -30,24 +30,24 @@ @interface GRPCOpSendMetadata : GRPCOperation - (instancetype)initWithMetadata:(NSDictionary *)metadata - handler:(void(^)())handler; + handler:(void(^)(void))handler; - (instancetype)initWithMetadata:(NSDictionary *)metadata flags:(uint32_t)flags - handler:(void(^)())handler NS_DESIGNATED_INITIALIZER; + handler:(void(^)(void))handler NS_DESIGNATED_INITIALIZER; @end @interface GRPCOpSendMessage : GRPCOperation - (instancetype)initWithMessage:(NSData *)message - handler:(void(^)())handler NS_DESIGNATED_INITIALIZER; + handler:(void(^)(void))handler NS_DESIGNATED_INITIALIZER; @end @interface GRPCOpSendClose : GRPCOperation -- (instancetype)initWithHandler:(void(^)())handler NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithHandler:(void(^)(void))handler NS_DESIGNATED_INITIALIZER; @end @@ -79,7 +79,7 @@ path:(NSString *)path timeout:(NSTimeInterval)timeout NS_DESIGNATED_INITIALIZER; -- (void)startBatchWithOperations:(NSArray *)ops errorHandler:(void(^)())errorHandler; +- (void)startBatchWithOperations:(NSArray *)ops errorHandler:(void(^)(void))errorHandler; - (void)startBatchWithOperations:(NSArray *)ops; diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index b0b1223b64..d26d13475d 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -36,12 +36,12 @@ // Most operation subclasses don't set any flags in the grpc_op, and rely on the flag member being // initialized to zero. grpc_op _op; - void(^_handler)(); + void(^_handler)(void); } - (void)finish { if (_handler) { - void(^handler)() = _handler; + void(^handler)(void) = _handler; _handler = nil; handler(); } @@ -55,13 +55,13 @@ } - (instancetype)initWithMetadata:(NSDictionary *)metadata - handler:(void (^)())handler { + handler:(void (^)(void))handler { return [self initWithMetadata:metadata flags:0 handler:handler]; } - (instancetype)initWithMetadata:(NSDictionary *)metadata flags:(uint32_t)flags - handler:(void (^)())handler { + handler:(void (^)(void))handler { if (self = [super init]) { _op.op = GRPC_OP_SEND_INITIAL_METADATA; _op.data.send_initial_metadata.count = metadata.count; @@ -92,7 +92,7 @@ return [self initWithMessage:nil handler:nil]; } -- (instancetype)initWithMessage:(NSData *)message handler:(void (^)())handler { +- (instancetype)initWithMessage:(NSData *)message handler:(void (^)(void))handler { if (!message) { [NSException raise:NSInvalidArgumentException format:@"message cannot be nil"]; } @@ -116,7 +116,7 @@ return [self initWithHandler:nil]; } -- (instancetype)initWithHandler:(void (^)())handler { +- (instancetype)initWithHandler:(void (^)(void))handler { if (self = [super init]) { _op.op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; _handler = handler; @@ -271,7 +271,7 @@ [self startBatchWithOperations:operations errorHandler:nil]; } -- (void)startBatchWithOperations:(NSArray *)operations errorHandler:(void (^)())errorHandler { +- (void)startBatchWithOperations:(NSArray *)operations errorHandler:(void (^)(void))errorHandler { // Keep logs of op batches when we are running tests. Disabled when in production for improved // performance. #ifdef GRPC_TEST_OBJC diff --git a/src/objective-c/GRPCClient/private/version.h b/src/objective-c/GRPCClient/private/version.h index db589d12de..69dd6266fd 100644 --- a/src/objective-c/GRPCClient/private/version.h +++ b/src/objective-c/GRPCClient/private/version.h @@ -23,4 +23,4 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.8.0-dev" +#define GRPC_OBJC_VERSION_STRING @"1.9.0-dev" diff --git a/src/objective-c/RxLibrary/GRXConcurrentWriteable.h b/src/objective-c/RxLibrary/GRXConcurrentWriteable.h index cec45fae71..f16a3d052a 100644 --- a/src/objective-c/RxLibrary/GRXConcurrentWriteable.h +++ b/src/objective-c/RxLibrary/GRXConcurrentWriteable.h @@ -46,7 +46,7 @@ * Enqueues writeValue: to be sent to the writeable in the main thread. * The passed handler is invoked from the main thread after writeValue: returns. */ -- (void)enqueueValue:(id)value completionHandler:(void (^)())handler; +- (void)enqueueValue:(id)value completionHandler:(void (^)(void))handler; /** * Enqueues writesFinishedWithError:nil to be sent to the writeable in the main thread. After that diff --git a/src/objective-c/RxLibrary/GRXConcurrentWriteable.m b/src/objective-c/RxLibrary/GRXConcurrentWriteable.m index bbfe491783..37bc975f87 100644 --- a/src/objective-c/RxLibrary/GRXConcurrentWriteable.m +++ b/src/objective-c/RxLibrary/GRXConcurrentWriteable.m @@ -50,7 +50,7 @@ dispatchQueue:dispatch_get_main_queue()]; } -- (void)enqueueValue:(id)value completionHandler:(void (^)())handler { +- (void)enqueueValue:(id)value completionHandler:(void (^)(void))handler { dispatch_async(_writeableQueue, ^{ // We're racing a possible cancellation performed by another thread. To turn all already- // enqueued messages into noops, cancellation nillifies the writeable property. If we get it diff --git a/src/objective-c/RxLibrary/GRXImmediateWriter.h b/src/objective-c/RxLibrary/GRXImmediateWriter.h index bdcf5d5937..f88e46b169 100644 --- a/src/objective-c/RxLibrary/GRXImmediateWriter.h +++ b/src/objective-c/RxLibrary/GRXImmediateWriter.h @@ -46,7 +46,7 @@ * Returns a writer that pushes to its writeable the successive values returned by the passed * block. When the block first returns nil, it is released. */ -+ (GRXWriter *)writerWithValueSupplier:(id (^)())block; ++ (GRXWriter *)writerWithValueSupplier:(id (^)(void))block; /** * Returns a writer that iterates over the values of the passed container and pushes them to diff --git a/src/objective-c/RxLibrary/GRXImmediateWriter.m b/src/objective-c/RxLibrary/GRXImmediateWriter.m index d8c6975801..c5d6d1310a 100644 --- a/src/objective-c/RxLibrary/GRXImmediateWriter.m +++ b/src/objective-c/RxLibrary/GRXImmediateWriter.m @@ -52,7 +52,7 @@ return [self writerWithEnumerator:enumerator error:nil]; } -+ (GRXWriter *)writerWithValueSupplier:(id (^)())block { ++ (GRXWriter *)writerWithValueSupplier:(id (^)(void))block { return [self writerWithEnumerator:[NSEnumerator grx_enumeratorWithValueSupplier:block]]; } diff --git a/src/objective-c/RxLibrary/GRXWriter+Immediate.h b/src/objective-c/RxLibrary/GRXWriter+Immediate.h index 292a35f61f..d7935deaa2 100644 --- a/src/objective-c/RxLibrary/GRXWriter+Immediate.h +++ b/src/objective-c/RxLibrary/GRXWriter+Immediate.h @@ -30,7 +30,7 @@ * Returns a writer that pushes to its writeable the successive values returned by the passed * block. When the block first returns nil, it is released. */ -+ (instancetype)writerWithValueSupplier:(id (^)())block; ++ (instancetype)writerWithValueSupplier:(id (^)(void))block; /** * Returns a writer that iterates over the values of the passed container and pushes them to diff --git a/src/objective-c/RxLibrary/GRXWriter+Immediate.m b/src/objective-c/RxLibrary/GRXWriter+Immediate.m index 43aa9c5437..a36a56764d 100644 --- a/src/objective-c/RxLibrary/GRXWriter+Immediate.m +++ b/src/objective-c/RxLibrary/GRXWriter+Immediate.m @@ -27,7 +27,7 @@ return [GRXImmediateWriter writerWithEnumerator:enumerator]; } -+ (instancetype)writerWithValueSupplier:(id (^)())block { ++ (instancetype)writerWithValueSupplier:(id (^)(void))block { return [GRXImmediateWriter writerWithValueSupplier:block]; } diff --git a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h index 8c72f7858d..38dbaaf9a4 100644 --- a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h +++ b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h @@ -38,5 +38,5 @@ * Returns a NSEnumerator instance that delegates the invocations of nextObject to the passed block. * When the block first returns nil, it is released. */ -+ (NSEnumerator *)grx_enumeratorWithValueSupplier:(id (^)())block; ++ (NSEnumerator *)grx_enumeratorWithValueSupplier:(id (^)(void))block; @end diff --git a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m index 309e25ede5..7d8191d0f7 100644 --- a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m +++ b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m @@ -33,7 +33,7 @@ return [[GRXNSScalarEnumerator alloc] initWithValue:value]; } -+ (NSEnumerator *)grx_enumeratorWithValueSupplier:(id (^)())block { ++ (NSEnumerator *)grx_enumeratorWithValueSupplier:(id (^)(void))block { return [[GRXNSBlockEnumerator alloc] initWithValueSupplier:block]; } @end diff --git a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h index c45338acdd..c3317b2d04 100644 --- a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h +++ b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h @@ -27,5 +27,5 @@ * The first time the passed block returns nil, the enumeration will end and the block will be * released. */ -- (instancetype)initWithValueSupplier:(id (^)())block; +- (instancetype)initWithValueSupplier:(id (^)(void))block; @end diff --git a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m index 7e7cc572b8..eddfd26680 100644 --- a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m +++ b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m @@ -19,14 +19,14 @@ #import "GRXNSBlockEnumerator.h" @implementation GRXNSBlockEnumerator { - id (^_block)(); + id (^_block)(void); } - (instancetype)init { return [self initWithValueSupplier:nil]; } -- (instancetype)initWithValueSupplier:(id (^)())block { +- (instancetype)initWithValueSupplier:(id (^)(void))block { if ((self = [super init])) { _block = block; } diff --git a/src/objective-c/tests/version.h b/src/objective-c/tests/version.h index 02515063fa..6e3a073020 100644 --- a/src/objective-c/tests/version.h +++ b/src/objective-c/tests/version.h @@ -23,5 +23,5 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.8.0-dev" +#define GRPC_OBJC_VERSION_STRING @"1.9.0-dev" #define GRPC_C_VERSION_STRING @"5.0.0-dev" |