GRPC Objective-C  1.71.0
GRPCCallLegacy.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2019 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 <RxLibrary/GRXWriter.h>
20 #import "GRPCTypes.h"
21 
22 #pragma clang diagnostic push
23 #pragma clang diagnostic ignored "-Wnullability-completeness"
24 
30 @interface GRPCCall : GRXWriter
31 
32 - (instancetype)init NS_UNAVAILABLE;
33 
58 @property(atomic, readonly) NSMutableDictionary *requestHeaders;
59 
69 @property(atomic, copy, readonly) NSDictionary *responseHeaders;
70 
78 @property(atomic, copy, readonly) NSDictionary *responseTrailers;
79 
91 - (instancetype)initWithHost:(NSString *)host
92  path:(NSString *)path
93  requestsWriter:(GRXWriter *)requestWriter;
94 
99 - (void)cancel;
100 
104 + (void)setCallSafety:(GRPCCallSafety)callSafety host:(NSString *)host path:(NSString *)path;
105 @property(atomic, copy, readwrite) NSString *serverName;
106 @property NSTimeInterval timeout;
107 - (void)setResponseDispatchQueue:(dispatch_queue_t)queue;
108 
109 @end
110 
111 #pragma mark Backwards compatibiity
112 
114 DEPRECATED_MSG_ATTRIBUTE("Use NSDictionary or NSMutableDictionary instead.")
115 @protocol GRPCRequestHeaders <NSObject>
116 @property(nonatomic, readonly) NSUInteger count;
117 
118 - (id)objectForKeyedSubscript:(id)key;
119 - (void)setObject:(id)obj forKeyedSubscript:(id)key;
120 
121 - (void)removeAllObjects;
122 - (void)removeObjectForKey:(id)key;
123 @end
124 
125 #pragma clang diagnostic push
126 #pragma clang diagnostic ignored "-Wdeprecated"
127 
129 @end
130 #pragma clang diagnostic pop
131 #pragma clang diagnostic pop
GRPCCall::timeout
NSTimeInterval timeout
Definition: GRPCCallLegacy.h:106
GRXWriter.h
GRPCRequestHeaders-p::count
NSUInteger count
Definition: GRPCCallLegacy.h:116
GRPCCall::serverName
NSString * serverName
Definition: GRPCCallLegacy.h:105
NSMutableDictionary(GRPCRequestHeaders)
This is only needed for backwards-compatibility.
Definition: GRPCCallLegacy.h:128
GRPCCall::responseTrailers
NSDictionary * responseTrailers
Same as responseHeaders, but populated with the HTTP trailers received from the server before the cal...
Definition: GRPCCallLegacy.h:78
GRPCCall::requestHeaders
NSMutableDictionary * requestHeaders
The container of the request headers of an RPC conforms to this protocol, which is a subset of NSMuta...
Definition: GRPCCallLegacy.h:58
GRPCCall::responseHeaders
NSDictionary * responseHeaders
This dictionary is populated with the HTTP headers received from the server.
Definition: GRPCCallLegacy.h:69
GRPCCall
This is the legacy interface of this gRPC library.
Definition: GRPCCallLegacy.h:30
-[GRPCRequestHeaders-p removeAllObjects]
void removeAllObjects()
-[GRPCCall cancel]
void cancel()
Finishes the request side of this call, notifies the server that the RPC should be cancelled,...
GRPCTypes.h
GRPCRequestHeaders-p
This protocol is kept for backwards compatibility with existing code.
Definition: GRPCCallLegacy.h:115
-[GRPCCall NS_UNAVAILABLE]
instancetype NS_UNAVAILABLE()
GRXWriter
An GRXWriter object can produce, on demand, a sequence of values.
Definition: GRXWriter.h:77
+[GRPCCall(ChannelArg) DEPRECATED_MSG_ATTRIBUTE]
"The API for this feature is experimental, " "and might be removed or modified at any " "time." DEPRECATED_MSG_ATTRIBUTE()