protobuf/objectivec/GPBCodedInputStream_PackagePrivate.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 // This header is private to the ProtobolBuffers library and must NOT be
32 // included by any sources outside this library. The contents of this file are
33 // subject to change at any time without notice.
34 
35 #import "GPBCodedInputStream.h"
36 
37 @class GPBUnknownFieldSet;
38 @class GPBFieldDescriptor;
39 
40 typedef struct GPBCodedInputStreamState {
41  const uint8_t *bytes;
42  size_t bufferSize;
43  size_t bufferPos;
44 
45  // For parsing subsections of an input stream you can put a hard limit on
46  // how much should be read. Normally the limit is the end of the stream,
47  // but you can adjust it to anywhere, and if you hit it you will be at the
48  // end of the stream, until you adjust the limit.
49  size_t currentLimit;
51  NSUInteger recursionDepth;
53 
54 @interface GPBCodedInputStream () {
55  @package
56  struct GPBCodedInputStreamState state_;
57  NSData *buffer_;
58 }
59 
60 // Group support is deprecated, so we hide this interface from users, but
61 // support for older data.
62 - (void)readGroup:(int32_t)fieldNumber
63  message:(GPBMessage *)message
64  extensionRegistry:(GPBExtensionRegistry *)extensionRegistry;
65 
66 // Reads a group field value from the stream and merges it into the given
67 // UnknownFieldSet.
68 - (void)readUnknownGroup:(int32_t)fieldNumber
69  message:(GPBUnknownFieldSet *)message;
70 
71 // Reads a map entry.
72 - (void)readMapEntry:(id)mapDictionary
73  extensionRegistry:(GPBExtensionRegistry *)extensionRegistry
74  field:(GPBFieldDescriptor *)field
75  parentMessage:(GPBMessage *)parentMessage;
76 @end
77 
78 CF_EXTERN_C_BEGIN
79 
81 
97  __attribute((ns_returns_retained));
99  __attribute((ns_returns_retained));
101  GPBCodedInputStreamState *state) __attribute((ns_returns_retained));
102 
104  size_t byteLimit);
106  size_t oldLimit);
110  int32_t value);
111 
112 CF_EXTERN_C_END
GPBCodedInputStreamReadEnum
int32_t GPBCodedInputStreamReadEnum(GPBCodedInputStreamState *state)
GPBCodedInputStreamPushLimit
size_t GPBCodedInputStreamPushLimit(GPBCodedInputStreamState *state, size_t byteLimit)
GPBCodedInputStreamPopLimit
void GPBCodedInputStreamPopLimit(GPBCodedInputStreamState *state, size_t oldLimit)
GPBCodedInputStreamReadTag
CF_EXTERN_C_BEGIN int32_t GPBCodedInputStreamReadTag(GPBCodedInputStreamState *state)
GPBCodedInputStreamReadSFixed64
int64_t GPBCodedInputStreamReadSFixed64(GPBCodedInputStreamState *state)
GPBCodedInputStreamState::bufferSize
size_t bufferSize
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h:42
GPBExtensionRegistry
Definition: bloaty/third_party/protobuf/objectivec/GPBExtensionRegistry.h:57
GPBCodedInputStreamReadSFixed32
int32_t GPBCodedInputStreamReadSFixed32(GPBCodedInputStreamState *state)
GPBCodedInputStreamReadRetainedBytes
NSData * GPBCodedInputStreamReadRetainedBytes(GPBCodedInputStreamState *state) __attribute((ns_returns_retained))
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
GPBCodedInputStreamReadSInt32
int32_t GPBCodedInputStreamReadSInt32(GPBCodedInputStreamState *state)
BOOL
int BOOL
Definition: undname.c:46
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
GPBCodedInputStreamReadRetainedBytesNoCopy
NSData * GPBCodedInputStreamReadRetainedBytesNoCopy(GPBCodedInputStreamState *state) __attribute((ns_returns_retained))
GPBCodedInputStreamReadInt32
int32_t GPBCodedInputStreamReadInt32(GPBCodedInputStreamState *state)
GPBCodedInputStreamState
struct GPBCodedInputStreamState GPBCodedInputStreamState
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
GPBCodedInputStreamReadRetainedString
NSString * GPBCodedInputStreamReadRetainedString(GPBCodedInputStreamState *state) __attribute((ns_returns_retained))
uint64_t
unsigned __int64 uint64_t
Definition: stdint-msvc2008.h:90
GPBCodedInputStreamState
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h:40
GPBCodedInputStreamReadInt64
int64_t GPBCodedInputStreamReadInt64(GPBCodedInputStreamState *state)
GPBCodedInputStreamReadUInt64
uint64_t GPBCodedInputStreamReadUInt64(GPBCodedInputStreamState *state)
GPBCodedInputStreamReadDouble
double GPBCodedInputStreamReadDouble(GPBCodedInputStreamState *state)
GPBCodedInputStream::buffer_
NSData * buffer_
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h:57
GPBCodedInputStreamReadSInt64
int64_t GPBCodedInputStreamReadSInt64(GPBCodedInputStreamState *state)
GPBCodedInputStreamState::lastTag
int32_t lastTag
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h:50
GPBCodedInputStreamState::bufferPos
size_t bufferPos
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h:43
GPBCodedInputStreamBytesUntilLimit
size_t GPBCodedInputStreamBytesUntilLimit(GPBCodedInputStreamState *state)
value
const char * value
Definition: hpack_parser_table.cc:165
GPBFieldDescriptor
Definition: bloaty/third_party/protobuf/objectivec/GPBDescriptor.h:167
GPBCodedInputStreamState::bytes
const uint8_t * bytes
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h:41
GPBCodedInputStreamReadBool
BOOL GPBCodedInputStreamReadBool(GPBCodedInputStreamState *state)
GPBMessage
Definition: bloaty/third_party/protobuf/objectivec/GPBMessage.h:83
state
Definition: bloaty/third_party/zlib/contrib/blast/blast.c:41
GPBCodedInputStreamState::currentLimit
size_t currentLimit
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h:49
GPBCodedInputStream.h
GPBUnknownFieldSet
Definition: bloaty/third_party/protobuf/objectivec/GPBUnknownFieldSet.h:43
GPBCodedInputStreamReadFixed32
uint32_t GPBCodedInputStreamReadFixed32(GPBCodedInputStreamState *state)
GPBCodedInputStream
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream.h:85
GPBCodedInputStreamIsAtEnd
BOOL GPBCodedInputStreamIsAtEnd(GPBCodedInputStreamState *state)
GPBCodedInputStreamState::recursionDepth
NSUInteger recursionDepth
Definition: bloaty/third_party/protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h:51
GPBCodedInputStreamReadFloat
float GPBCodedInputStreamReadFloat(GPBCodedInputStreamState *state)
int32_t
signed int int32_t
Definition: stdint-msvc2008.h:77
GPBCodedInputStreamReadUInt32
uint32_t GPBCodedInputStreamReadUInt32(GPBCodedInputStreamState *state)
GPBCodedInputStreamCheckLastTagWas
void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state, int32_t value)
GPBCodedInputStreamReadFixed64
uint64_t GPBCodedInputStreamReadFixed64(GPBCodedInputStreamState *state)


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