GRPCTypes.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 <Foundation/Foundation.h>
20 
26 typedef NS_ENUM(NSUInteger, GRPCErrorCode) {
28  GRPCErrorCodeCancelled = 1,
29 
34  GRPCErrorCodeUnknown = 2,
35 
42  GRPCErrorCodeInvalidArgument = 3,
43 
51  GRPCErrorCodeDeadlineExceeded = 4,
52 
54  GRPCErrorCodeNotFound = 5,
55 
58  GRPCErrorCodeAlreadyExists = 6,
59 
67  GRPCErrorCodePermissionDenied = 7,
68 
73  GRPCErrorCodeUnauthenticated = 16,
74 
76  GRPCErrorCodeResourceExhausted = 8,
77 
85  GRPCErrorCodeFailedPrecondition = 9,
86 
92  GRPCErrorCodeAborted = 10,
93 
102  GRPCErrorCodeOutOfRange = 11,
103 
106  GRPCErrorCodeUnimplemented = 12,
107 
112  GRPCErrorCodeInternal = 13,
113 
119  GRPCErrorCodeUnavailable = 14,
120 
122  GRPCErrorCodeDataLoss = 15,
123 };
124 
128 typedef NS_ENUM(NSUInteger, GRPCCallSafety) {
133  GRPCCallSafetyDefault = 0,
134 };
135 
142 typedef NS_ENUM(NSUInteger, GRPCCompressionAlgorithm) {
143  GRPCCompressNone = 0,
144  GRPCCompressDeflate,
145  GRPCCompressGzip,
146  GRPCStreamCompressGzip,
147 };
148 
150 typedef GRPCCompressionAlgorithm GRPCCompressAlgorithm;
151 
153 typedef NS_ENUM(NSUInteger, GRPCTransportType) {
154  GRPCTransportTypeDefault = 0,
156  GRPCTransportTypeChttp2BoringSSL = 0,
158  GRPCTransportTypeCronet,
160  GRPCTransportTypeInsecure,
161 };
162 
164 extern NSString* _Nonnull const kGRPCErrorDomain;
165 
170 extern NSString* _Nonnull const kGRPCHeadersKey;
171 extern NSString* _Nonnull const kGRPCTrailersKey;
172 
174 typedef char* _Nonnull GRPCTransportID;
175 
180 
185 - (void)getTokenWithHandler:(void (^_Nonnull)(NSString* _Nullable token))handler;
186 
187 @end
188 
190 typedef NSDictionary<NSString*, id> GRPCMetadataDictionary;
NS_ENUM
typedef NS_ENUM(NSUInteger, GRPCErrorCode)
Definition: GRPCTypes.h:26
GRPCAuthorizationProtocol-p
Definition: GRPCTypes.h:179
kGRPCTrailersKey
NSString *const _Nonnull kGRPCTrailersKey
GRPCCompressAlgorithm
GRPCCompressionAlgorithm GRPCCompressAlgorithm
Definition: GRPCTypes.h:147
kGRPCErrorDomain
NSString *const _Nonnull kGRPCErrorDomain
kGRPCHeadersKey
NSString *const _Nonnull kGRPCHeadersKey
GRPCTransportID
char *_Nonnull GRPCTransportID
Definition: GRPCTypes.h:174
GRPCMetadataDictionary
NSDictionary< NSString *, id > GRPCMetadataDictionary
Definition: GRPCTypes.h:190


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:48