1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
8 #import "GPBRuntimeTypes.h"
12 NS_ASSUME_NONNULL_BEGIN
15 GPBWireFormatVarint
= 0,
16 GPBWireFormatFixed64
= 1,
17 GPBWireFormatLengthDelimited
= 2,
18 GPBWireFormatStartGroup
= 3,
19 GPBWireFormatEndGroup
= 4,
20 GPBWireFormatFixed32
= 5,
24 GPBWireFormatMessageSetItem
= 1,
25 GPBWireFormatMessageSetTypeId
= 2,
26 GPBWireFormatMessageSetMessage
= 3
29 uint32_t GPBWireFormatMakeTag(uint32_t fieldNumber
, GPBWireFormat wireType
) __attribute__((const));
30 GPBWireFormat
GPBWireFormatGetTagWireType(uint32_t tag
) __attribute__((const));
31 uint32_t GPBWireFormatGetTagFieldNumber(uint32_t tag
) __attribute__((const));
32 BOOL
GPBWireFormatIsValidTag(uint32_t tag
) __attribute__((const));
34 GPBWireFormat
GPBWireFormatForType(GPBDataType dataType
, BOOL isPacked
) __attribute__((const));
36 #define GPBWireFormatMessageSetItemTag \
37 (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatStartGroup))
38 #define GPBWireFormatMessageSetItemEndTag \
39 (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatEndGroup))
40 #define GPBWireFormatMessageSetTypeIdTag \
41 (GPBWireFormatMakeTag(GPBWireFormatMessageSetTypeId, GPBWireFormatVarint))
42 #define GPBWireFormatMessageSetMessageTag \
43 (GPBWireFormatMakeTag(GPBWireFormatMessageSetMessage, GPBWireFormatLengthDelimited))