forked from protocolbuffers/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GPBUnknownField_PackagePrivate.h
47 lines (37 loc) · 1.77 KB
/
GPBUnknownField_PackagePrivate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import <Foundation/Foundation.h>
#import "GPBUnknownField.h"
@class GPBCodedOutputStream;
@interface GPBUnknownField () {
@package
int32_t number_;
GPBUnknownFieldType type_;
union {
uint64_t intValue; // type == Varint, Fixed32, Fixed64
NSData *_Nonnull lengthDelimited; // type == LengthDelimited
GPBUnknownFields *_Nonnull group; // type == Group
struct { // type == Legacy
GPBUInt64Array *_Null_unspecified mutableVarintList;
GPBUInt32Array *_Null_unspecified mutableFixed32List;
GPBUInt64Array *_Null_unspecified mutableFixed64List;
NSMutableArray<NSData *> *_Null_unspecified mutableLengthDelimitedList;
NSMutableArray<GPBUnknownFieldSet *> *_Null_unspecified mutableGroupList;
} legacy;
} storage_;
}
- (nonnull instancetype)initWithNumber:(int32_t)number varint:(uint64_t)varint;
- (nonnull instancetype)initWithNumber:(int32_t)number fixed32:(uint32_t)fixed32;
- (nonnull instancetype)initWithNumber:(int32_t)number fixed64:(uint64_t)fixed64;
- (nonnull instancetype)initWithNumber:(int32_t)number lengthDelimited:(nonnull NSData *)data;
- (nonnull instancetype)initWithNumber:(int32_t)number group:(nonnull GPBUnknownFields *)group;
- (void)writeToOutput:(nonnull GPBCodedOutputStream *)output;
- (size_t)serializedSize;
- (void)writeAsMessageSetExtensionToOutput:(nonnull GPBCodedOutputStream *)output;
- (size_t)serializedSizeAsMessageSetExtension;
- (void)mergeFromField:(nonnull GPBUnknownField *)other;
@end