GRPC Objective-C  1.26.0
GRPCWrappedCall.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #import <Foundation/Foundation.h>
20 #include <grpc/grpc.h>
21 
22 #import "GRPCRequestHeaders.h"
23 
24 @interface GRPCOperation : NSObject
25 @property(nonatomic, readonly) grpc_op op;
27 - (void)finish;
28 @end
29 
31 
32 - (instancetype)initWithMetadata:(NSDictionary *)metadata handler:(void (^)(void))handler;
33 
34 - (instancetype)initWithMetadata:(NSDictionary *)metadata
35  flags:(uint32_t)flags
36  handler:(void (^)(void))handler NS_DESIGNATED_INITIALIZER;
37 
38 @end
39 
41 
42 - (instancetype)initWithMessage:(NSData *)message
43  handler:(void (^)(void))handler NS_DESIGNATED_INITIALIZER;
44 
45 @end
46 
48 
49 - (instancetype)initWithHandler:(void (^)(void))handler NS_DESIGNATED_INITIALIZER;
50 
51 @end
52 
54 
55 - (instancetype)initWithHandler:(void (^)(NSDictionary *))handler NS_DESIGNATED_INITIALIZER;
56 
57 @end
58 
60 
61 - (instancetype)initWithHandler:(void (^)(grpc_byte_buffer *))handler NS_DESIGNATED_INITIALIZER;
62 
63 @end
64 
66 
67 - (instancetype)initWithHandler:(void (^)(NSError *, NSDictionary *))handler
68  NS_DESIGNATED_INITIALIZER;
69 
70 @end
71 
72 #pragma mark GRPCWrappedCall
73 
74 @class GRPCPooledChannel;
75 
76 @interface GRPCWrappedCall : NSObject
77 
78 - (instancetype)init NS_UNAVAILABLE;
79 
80 + (instancetype) new NS_UNAVAILABLE;
81 
82 - (instancetype)initWithUnmanagedCall:(grpc_call *)unmanagedCall
83  pooledChannel:(GRPCPooledChannel *)pooledChannel NS_DESIGNATED_INITIALIZER;
84 
85 - (void)startBatchWithOperations:(NSArray *)ops errorHandler:(void (^)(void))errorHandler;
86 
87 - (void)startBatchWithOperations:(NSArray *)ops;
88 
89 - (void)cancel;
90 
91 - (void)channelDisconnected;
92 
93 @end
void channelDisconnected()
Definition: GRPCWrappedCall.h:30
A proxied channel object that can be retained and used to create GRPCWrappedCall object regardless of...
Definition: GRPCChannelPool.h:36
Definition: GRPCWrappedCall.h:65
Definition: GRPCWrappedCall.h:76
Definition: GRPCWrappedCall.h:53
Definition: GRPCWrappedCall.h:24
void finish()
Guaranteed to be called when the operation has finished.
grpc_op op
Definition: GRPCWrappedCall.h:25
Definition: GRPCWrappedCall.h:59
Definition: GRPCWrappedCall.h:40
instancetype NS_UNAVAILABLE()
Definition: GRPCWrappedCall.h:47