protobuf/objectivec/GPBCodedInputStream.h
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 #import <Foundation/Foundation.h>
32 
33 @class GPBMessage;
35 
36 NS_ASSUME_NONNULL_BEGIN
37 
38 CF_EXTERN_C_BEGIN
39 
45 extern NSString *const GPBCodedInputStreamException;
46 
48 extern NSString *const GPBCodedInputStreamUnderlyingErrorKey;
49 
51 extern NSString *const GPBCodedInputStreamErrorDomain;
52 
56 typedef NS_ENUM(NSInteger, GPBCodedInputStreamErrorCode) {
58  GPBCodedInputStreamErrorInvalidSize = -100,
60  GPBCodedInputStreamErrorSubsectionLimitReached = -101,
62  GPBCodedInputStreamErrorInvalidSubsectionLimit = -102,
64  GPBCodedInputStreamErrorInvalidTag = -103,
66  GPBCodedInputStreamErrorInvalidUTF8 = -104,
68  GPBCodedInputStreamErrorInvalidVarInt = -105,
70  GPBCodedInputStreamErrorRecursionDepthExceeded = -106,
71 };
72 
73 CF_EXTERN_C_END
74 
85 @interface GPBCodedInputStream : NSObject
86 
94 + (instancetype)streamWithData:(NSData *)data;
95 
103 - (instancetype)initWithData:(NSData *)data;
104 
112 - (int32_t)readTag;
113 
117 - (double)readDouble;
121 - (float)readFloat;
133 - (int64_t)readInt64;
137 - (int32_t)readInt32;
149 - (int32_t)readEnum;
169 - (BOOL)readBool;
173 - (NSString *)readString;
177 - (NSData *)readBytes;
178 
186 - (void)readMessage:(GPBMessage *)message
187  extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry;
188 
197 - (BOOL)skipField:(int32_t)tag;
198 
203 - (void)skipMessage;
204 
213 - (BOOL)isAtEnd;
214 
218 - (size_t)position;
219 
231 - (size_t)pushLimit:(size_t)byteLimit;
232 
239 - (void)popLimit:(size_t)oldLimit;
240 
249 - (void)checkLastTagWas:(int32_t)expected;
250 
251 @end
252 
253 NS_ASSUME_NONNULL_END
-[GPBCodedInputStream skipMessage]
void skipMessage()
-[GPBCodedInputStream readTag]
int32_t readTag()
position
intern position
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/array.c:487
-[GPBCodedInputStream readUInt64]
uint64_t readUInt64()
GPBExtensionRegistry
Definition: bloaty/third_party/protobuf/objectivec/GPBExtensionRegistry.h:57
-[GPBCodedInputStream readDouble]
double readDouble()
NS_ENUM
typedef NS_ENUM(NSInteger, GPBCodedInputStreamErrorCode)
Definition: protobuf/objectivec/GPBCodedInputStream.h:56
-[GPBCodedInputStream readInt64]
int64_t readInt64()
-[GPBCodedInputStream isAtEnd]
BOOL isAtEnd()
GPBCodedInputStreamException
NS_ASSUME_NONNULL_BEGIN CF_EXTERN_C_BEGIN NSString *const GPBCodedInputStreamException
-[GPBCodedInputStream readFloat]
float readFloat()
BOOL
int BOOL
Definition: undname.c:46
GPBCodedInputStreamErrorDomain
NSString *const GPBCodedInputStreamErrorDomain
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
-[GPBCodedInputStream readSInt32]
int32_t readSInt32()
-[GPBCodedInputStream readEnum]
int32_t readEnum()
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
-[GPBCodedInputStream readUInt32]
uint32_t readUInt32()
-[GPBCodedInputStream readSFixed32]
int32_t readSFixed32()
-[GPBCodedInputStream readFixed32]
uint32_t readFixed32()
-[GPBCodedInputStream readInt32]
int32_t readInt32()
uint64_t
unsigned __int64 uint64_t
Definition: stdint-msvc2008.h:90
-[GPBCodedInputStream readString]
NSString * readString()
-[GPBCodedInputStream readBytes]
NSData * readBytes()
-[GPBCodedInputStream readFixed64]
uint64_t readFixed64()
-[GPBCodedInputStream readSInt64]
int64_t readSInt64()
GPBMessage
Definition: bloaty/third_party/protobuf/objectivec/GPBMessage.h:83
-[GPBCodedInputStream readBool]
BOOL readBool()
GPBCodedInputStream
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream.h:85
int32_t
signed int int32_t
Definition: stdint-msvc2008.h:77
GPBCodedInputStreamUnderlyingErrorKey
NSString *const GPBCodedInputStreamUnderlyingErrorKey
-[GPBCodedInputStream readSFixed64]
int64_t readSFixed64()


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