MOS Source Code
|
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#include <limits.h>
Go to the source code of this file.
Classes | |
struct | pb_msgdesc_t |
struct | pb_field_iter_t |
struct | pb_bytes_array_t |
struct | pb_callback_t |
struct | pb_extension_type_t |
struct | pb_extension_t |
Macros | |
#define | NANOPB_VERSION "nanopb-0.4.9-dev" |
#define | PB_PACKED_STRUCT_START |
#define | PB_PACKED_STRUCT_END |
#define | pb_packed |
#define | PB_UNUSED(x) |
#define | PB_PROGMEM |
#define | PB_PROGMEM_READU32(x) |
#define | PB_STATIC_ASSERT(COND, MSG) |
#define | PB_MAX_REQUIRED_FIELDS 64 |
#define | PB_LTYPE_BOOL 0x00U /* bool */ |
#define | PB_LTYPE_VARINT 0x01U /* int32, int64, enum, bool */ |
#define | PB_LTYPE_UVARINT 0x02U /* uint32, uint64 */ |
#define | PB_LTYPE_SVARINT 0x03U /* sint32, sint64 */ |
#define | PB_LTYPE_FIXED32 0x04U /* fixed32, sfixed32, float */ |
#define | PB_LTYPE_FIXED64 0x05U /* fixed64, sfixed64, double */ |
#define | PB_LTYPE_LAST_PACKABLE 0x05U |
#define | PB_LTYPE_BYTES 0x06U |
#define | PB_LTYPE_STRING 0x07U |
#define | PB_LTYPE_SUBMESSAGE 0x08U |
#define | PB_LTYPE_SUBMSG_W_CB 0x09U |
#define | PB_LTYPE_EXTENSION 0x0AU |
#define | PB_LTYPE_FIXED_LENGTH_BYTES 0x0BU |
#define | PB_LTYPES_COUNT 0x0CU |
#define | PB_LTYPE_MASK 0x0FU |
#define | PB_HTYPE_REQUIRED 0x00U |
#define | PB_HTYPE_OPTIONAL 0x10U |
#define | PB_HTYPE_SINGULAR 0x10U |
#define | PB_HTYPE_REPEATED 0x20U |
#define | PB_HTYPE_FIXARRAY 0x20U |
#define | PB_HTYPE_ONEOF 0x30U |
#define | PB_HTYPE_MASK 0x30U |
#define | PB_ATYPE_STATIC 0x00U |
#define | PB_ATYPE_POINTER 0x80U |
#define | PB_ATYPE_CALLBACK 0x40U |
#define | PB_ATYPE_MASK 0xC0U |
#define | PB_ATYPE(x) |
#define | PB_HTYPE(x) |
#define | PB_LTYPE(x) |
#define | PB_LTYPE_IS_SUBMSG(x) |
#define | PB_SIZE_MAX ((pb_size_t)-1) |
#define | PB_BYTES_ARRAY_T(n) |
#define | PB_BYTES_ARRAY_T_ALLOCSIZE(n) |
#define | pb_extension_init_zero {NULL,NULL,NULL,false} |
#define | PB_PROTO_HEADER_VERSION 40 |
#define | pb_membersize(st, m) |
#define | pb_arraysize(st, m) |
#define | pb_delta(st, m1, m2) |
#define | PB_EXPAND(x) |
#define | PB_BIND(msgname, structname, width) |
#define | PB_GEN_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_REQ_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_LARGEST_TAG(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_FIELD_INFO_1(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_FIELD_INFO_2(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_FIELD_INFO_4(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_FIELD_INFO_8(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_FIELD_INFO_AUTO(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_FIELDINFO_AUTO2(width, tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FIELDINFO_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_GEN_FIELD_INFO_ASSERT_1(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_FIELD_INFO_ASSERT_2(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_FIELD_INFO_ASSERT_4(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_FIELD_INFO_ASSERT_8(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_GEN_FIELD_INFO_ASSERT_AUTO(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_FIELDINFO_ASSERT_AUTO2(width, tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FIELDINFO_ASSERT_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_DATA_OFFSET_STATIC(htype, structname, fieldname) |
#define | PB_DATA_OFFSET_POINTER(htype, structname, fieldname) |
#define | PB_DATA_OFFSET_CALLBACK(htype, structname, fieldname) |
#define | PB_DO_PB_HTYPE_REQUIRED(structname, fieldname) |
#define | PB_DO_PB_HTYPE_SINGULAR(structname, fieldname) |
#define | PB_DO_PB_HTYPE_ONEOF(structname, fieldname) |
#define | PB_DO_PB_HTYPE_OPTIONAL(structname, fieldname) |
#define | PB_DO_PB_HTYPE_REPEATED(structname, fieldname) |
#define | PB_DO_PB_HTYPE_FIXARRAY(structname, fieldname) |
#define | PB_SIZE_OFFSET_STATIC(htype, structname, fieldname) |
#define | PB_SIZE_OFFSET_POINTER(htype, structname, fieldname) |
#define | PB_SIZE_OFFSET_CALLBACK(htype, structname, fieldname) |
#define | PB_SO_PB_HTYPE_REQUIRED(structname, fieldname) |
#define | PB_SO_PB_HTYPE_SINGULAR(structname, fieldname) |
#define | PB_SO_PB_HTYPE_ONEOF(structname, fieldname) |
#define | PB_SO_PB_HTYPE_ONEOF2(structname, fullname, unionname) |
#define | PB_SO_PB_HTYPE_ONEOF3(structname, fullname, unionname) |
#define | PB_SO_PB_HTYPE_OPTIONAL(structname, fieldname) |
#define | PB_SO_PB_HTYPE_REPEATED(structname, fieldname) |
#define | PB_SO_PB_HTYPE_FIXARRAY(structname, fieldname) |
#define | PB_SO_PTR_PB_HTYPE_REQUIRED(structname, fieldname) |
#define | PB_SO_PTR_PB_HTYPE_SINGULAR(structname, fieldname) |
#define | PB_SO_PTR_PB_HTYPE_ONEOF(structname, fieldname) |
#define | PB_SO_PTR_PB_HTYPE_OPTIONAL(structname, fieldname) |
#define | PB_SO_PTR_PB_HTYPE_REPEATED(structname, fieldname) |
#define | PB_SO_PTR_PB_HTYPE_FIXARRAY(structname, fieldname) |
#define | PB_SO_CB_PB_HTYPE_REQUIRED(structname, fieldname) |
#define | PB_SO_CB_PB_HTYPE_SINGULAR(structname, fieldname) |
#define | PB_SO_CB_PB_HTYPE_ONEOF(structname, fieldname) |
#define | PB_SO_CB_PB_HTYPE_OPTIONAL(structname, fieldname) |
#define | PB_SO_CB_PB_HTYPE_REPEATED(structname, fieldname) |
#define | PB_SO_CB_PB_HTYPE_FIXARRAY(structname, fieldname) |
#define | PB_ARRAY_SIZE_STATIC(htype, structname, fieldname) |
#define | PB_ARRAY_SIZE_POINTER(htype, structname, fieldname) |
#define | PB_ARRAY_SIZE_CALLBACK(htype, structname, fieldname) |
#define | PB_AS_PB_HTYPE_REQUIRED(structname, fieldname) |
#define | PB_AS_PB_HTYPE_SINGULAR(structname, fieldname) |
#define | PB_AS_PB_HTYPE_OPTIONAL(structname, fieldname) |
#define | PB_AS_PB_HTYPE_ONEOF(structname, fieldname) |
#define | PB_AS_PB_HTYPE_REPEATED(structname, fieldname) |
#define | PB_AS_PB_HTYPE_FIXARRAY(structname, fieldname) |
#define | PB_AS_PTR_PB_HTYPE_REQUIRED(structname, fieldname) |
#define | PB_AS_PTR_PB_HTYPE_SINGULAR(structname, fieldname) |
#define | PB_AS_PTR_PB_HTYPE_OPTIONAL(structname, fieldname) |
#define | PB_AS_PTR_PB_HTYPE_ONEOF(structname, fieldname) |
#define | PB_AS_PTR_PB_HTYPE_REPEATED(structname, fieldname) |
#define | PB_AS_PTR_PB_HTYPE_FIXARRAY(structname, fieldname) |
#define | PB_DATA_SIZE_STATIC(htype, structname, fieldname) |
#define | PB_DATA_SIZE_POINTER(htype, structname, fieldname) |
#define | PB_DATA_SIZE_CALLBACK(htype, structname, fieldname) |
#define | PB_DS_PB_HTYPE_REQUIRED(structname, fieldname) |
#define | PB_DS_PB_HTYPE_SINGULAR(structname, fieldname) |
#define | PB_DS_PB_HTYPE_OPTIONAL(structname, fieldname) |
#define | PB_DS_PB_HTYPE_ONEOF(structname, fieldname) |
#define | PB_DS_PB_HTYPE_REPEATED(structname, fieldname) |
#define | PB_DS_PB_HTYPE_FIXARRAY(structname, fieldname) |
#define | PB_DS_PTR_PB_HTYPE_REQUIRED(structname, fieldname) |
#define | PB_DS_PTR_PB_HTYPE_SINGULAR(structname, fieldname) |
#define | PB_DS_PTR_PB_HTYPE_OPTIONAL(structname, fieldname) |
#define | PB_DS_PTR_PB_HTYPE_ONEOF(structname, fieldname) |
#define | PB_DS_PTR_PB_HTYPE_REPEATED(structname, fieldname) |
#define | PB_DS_PTR_PB_HTYPE_FIXARRAY(structname, fieldname) |
#define | PB_DS_CB_PB_HTYPE_REQUIRED(structname, fieldname) |
#define | PB_DS_CB_PB_HTYPE_SINGULAR(structname, fieldname) |
#define | PB_DS_CB_PB_HTYPE_OPTIONAL(structname, fieldname) |
#define | PB_DS_CB_PB_HTYPE_ONEOF(structname, fieldname) |
#define | PB_DS_CB_PB_HTYPE_REPEATED(structname, fieldname) |
#define | PB_DS_CB_PB_HTYPE_FIXARRAY(structname, fieldname) |
#define | PB_ONEOF_NAME(type, tuple) |
#define | PB_ONEOF_NAME_UNION(unionname, membername, fullname) |
#define | PB_ONEOF_NAME_MEMBER(unionname, membername, fullname) |
#define | PB_ONEOF_NAME_FULL(unionname, membername, fullname) |
#define | PB_GEN_SUBMSG_INFO(structname, atype, htype, ltype, fieldname, tag) |
#define | PB_SUBMSG_INFO_REQUIRED(ltype, structname, fieldname) |
#define | PB_SUBMSG_INFO_SINGULAR(ltype, structname, fieldname) |
#define | PB_SUBMSG_INFO_OPTIONAL(ltype, structname, fieldname) |
#define | PB_SUBMSG_INFO_ONEOF(ltype, structname, fieldname) |
#define | PB_SUBMSG_INFO_ONEOF2(ltype, structname, unionname, membername) |
#define | PB_SUBMSG_INFO_ONEOF3(ltype, structname, unionname, membername) |
#define | PB_SUBMSG_INFO_REPEATED(ltype, structname, fieldname) |
#define | PB_SUBMSG_INFO_FIXARRAY(ltype, structname, fieldname) |
#define | PB_SI_PB_LTYPE_BOOL(t) |
#define | PB_SI_PB_LTYPE_BYTES(t) |
#define | PB_SI_PB_LTYPE_DOUBLE(t) |
#define | PB_SI_PB_LTYPE_ENUM(t) |
#define | PB_SI_PB_LTYPE_UENUM(t) |
#define | PB_SI_PB_LTYPE_FIXED32(t) |
#define | PB_SI_PB_LTYPE_FIXED64(t) |
#define | PB_SI_PB_LTYPE_FLOAT(t) |
#define | PB_SI_PB_LTYPE_INT32(t) |
#define | PB_SI_PB_LTYPE_INT64(t) |
#define | PB_SI_PB_LTYPE_MESSAGE(t) |
#define | PB_SI_PB_LTYPE_MSG_W_CB(t) |
#define | PB_SI_PB_LTYPE_SFIXED32(t) |
#define | PB_SI_PB_LTYPE_SFIXED64(t) |
#define | PB_SI_PB_LTYPE_SINT32(t) |
#define | PB_SI_PB_LTYPE_SINT64(t) |
#define | PB_SI_PB_LTYPE_STRING(t) |
#define | PB_SI_PB_LTYPE_UINT32(t) |
#define | PB_SI_PB_LTYPE_UINT64(t) |
#define | PB_SI_PB_LTYPE_EXTENSION(t) |
#define | PB_SI_PB_LTYPE_FIXED_LENGTH_BYTES(t) |
#define | PB_SUBMSG_DESCRIPTOR(t) |
#define | PB_FIELDINFO_1(tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FIELDINFO_2(tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FIELDINFO_4(tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FIELDINFO_8(tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FITS(value, bits) |
#define | PB_FIELDINFO_ASSERT_1(tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FIELDINFO_ASSERT_2(tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FIELDINFO_ASSERT_4(tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FIELDINFO_ASSERT_8(tag, type, data_offset, data_size, size_offset, array_size) |
#define | PB_FIELDINFO_WIDTH_AUTO(atype, htype, ltype) |
#define | PB_FI_WIDTH_PB_ATYPE_STATIC(htype, ltype) |
#define | PB_FI_WIDTH_PB_ATYPE_POINTER(htype, ltype) |
#define | PB_FI_WIDTH_PB_ATYPE_CALLBACK(htype, ltype) |
#define | PB_FI_WIDTH_PB_HTYPE_REQUIRED(ltype) |
#define | PB_FI_WIDTH_PB_HTYPE_SINGULAR(ltype) |
#define | PB_FI_WIDTH_PB_HTYPE_OPTIONAL(ltype) |
#define | PB_FI_WIDTH_PB_HTYPE_ONEOF(ltype) |
#define | PB_FI_WIDTH_PB_HTYPE_REPEATED(ltype) |
#define | PB_FI_WIDTH_PB_HTYPE_FIXARRAY(ltype) |
#define | PB_FI_WIDTH_PB_LTYPE_BOOL 1 |
#define | PB_FI_WIDTH_PB_LTYPE_BYTES 2 |
#define | PB_FI_WIDTH_PB_LTYPE_DOUBLE 1 |
#define | PB_FI_WIDTH_PB_LTYPE_ENUM 1 |
#define | PB_FI_WIDTH_PB_LTYPE_UENUM 1 |
#define | PB_FI_WIDTH_PB_LTYPE_FIXED32 1 |
#define | PB_FI_WIDTH_PB_LTYPE_FIXED64 1 |
#define | PB_FI_WIDTH_PB_LTYPE_FLOAT 1 |
#define | PB_FI_WIDTH_PB_LTYPE_INT32 1 |
#define | PB_FI_WIDTH_PB_LTYPE_INT64 1 |
#define | PB_FI_WIDTH_PB_LTYPE_MESSAGE 2 |
#define | PB_FI_WIDTH_PB_LTYPE_MSG_W_CB 2 |
#define | PB_FI_WIDTH_PB_LTYPE_SFIXED32 1 |
#define | PB_FI_WIDTH_PB_LTYPE_SFIXED64 1 |
#define | PB_FI_WIDTH_PB_LTYPE_SINT32 1 |
#define | PB_FI_WIDTH_PB_LTYPE_SINT64 1 |
#define | PB_FI_WIDTH_PB_LTYPE_STRING 2 |
#define | PB_FI_WIDTH_PB_LTYPE_UINT32 1 |
#define | PB_FI_WIDTH_PB_LTYPE_UINT64 1 |
#define | PB_FI_WIDTH_PB_LTYPE_EXTENSION 1 |
#define | PB_FI_WIDTH_PB_LTYPE_FIXED_LENGTH_BYTES 2 |
#define | PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL |
#define | PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES |
#define | PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 |
#define | PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT |
#define | PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT |
#define | PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 |
#define | PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 |
#define | PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 |
#define | PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT |
#define | PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT |
#define | PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE |
#define | PB_LTYPE_MAP_MSG_W_CB PB_LTYPE_SUBMSG_W_CB |
#define | PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 |
#define | PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 |
#define | PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT |
#define | PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT |
#define | PB_LTYPE_MAP_STRING PB_LTYPE_STRING |
#define | PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT |
#define | PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT |
#define | PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION |
#define | PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES |
#define | PB_SET_ERROR(stream, msg) |
#define | PB_GET_ERROR(stream) |
#define | PB_RETURN_ERROR(stream, msg) |
Typedefs | |
typedef uint_least8_t | pb_byte_t |
typedef pb_byte_t | pb_type_t |
typedef uint_least16_t | pb_size_t |
typedef int_least16_t | pb_ssize_t |
typedef pb_field_iter_t | pb_field_t |
Enumerations | |
enum | pb_wire_type_t { PB_WT_VARINT = 0 , PB_WT_64BIT = 1 , PB_WT_STRING = 2 , PB_WT_32BIT = 5 , PB_WT_PACKED = 255 } |
Functions | |
bool | pb_default_field_callback (pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field) |
#define PB_UNUSED | ( | x | ) |
Definition at line 143 of file pb.h.
Referenced by decode_pointer_field(), do_roundtrips(), ListFilesResponse_callback(), pb_enc_bool(), and pb_release().
#define PB_PROGMEM_READU32 | ( | x | ) |
Definition at line 155 of file pb.h.
Referenced by advance_iterator(), load_descriptor_values(), pb_field_iter_begin_extension(), pb_field_iter_find(), and pb_field_iter_find_extension().
#define PB_STATIC_ASSERT | ( | COND, | |
MSG ) |
#define PB_MAX_REQUIRED_FIELDS 64 |
Definition at line 204 of file pb.h.
Referenced by pb_decode_inner().
#define PB_LTYPE_BOOL 0x00U /* bool */ |
Definition at line 239 of file pb.h.
Referenced by decode_basic_field(), encode_basic_field(), pb_encode_tag_for_field(), validate_pointer(), and validate_static().
#define PB_LTYPE_VARINT 0x01U /* int32, int64, enum, bool */ |
Definition at line 240 of file pb.h.
Referenced by decode_basic_field(), encode_basic_field(), main(), and pb_encode_tag_for_field().
#define PB_LTYPE_UVARINT 0x02U /* uint32, uint64 */ |
Definition at line 241 of file pb.h.
Referenced by decode_basic_field(), encode_basic_field(), main(), pb_dec_varint(), pb_enc_varint(), and pb_encode_tag_for_field().
#define PB_LTYPE_SVARINT 0x03U /* sint32, sint64 */ |
Definition at line 242 of file pb.h.
Referenced by decode_basic_field(), encode_basic_field(), main(), pb_dec_varint(), pb_enc_varint(), and pb_encode_tag_for_field().
#define PB_LTYPE_FIXED32 0x04U /* fixed32, sfixed32, float */ |
Definition at line 243 of file pb.h.
Referenced by decode_basic_field(), encode_array(), encode_basic_field(), main(), and pb_encode_tag_for_field().
#define PB_LTYPE_FIXED64 0x05U /* fixed64, sfixed64, double */ |
Definition at line 244 of file pb.h.
Referenced by decode_basic_field(), encode_array(), encode_basic_field(), main(), pb_enc_fixed(), and pb_encode_tag_for_field().
#define PB_LTYPE_LAST_PACKABLE 0x05U |
Definition at line 247 of file pb.h.
Referenced by decode_pointer_field(), decode_static_field(), encode_array(), and pb_check_proto3_default_value().
#define PB_LTYPE_BYTES 0x06U |
Definition at line 251 of file pb.h.
Referenced by decode_basic_field(), decode_pointer_field(), encode_array(), encode_basic_field(), limit_sizes(), main(), pb_check_proto3_default_value(), pb_encode_tag_for_field(), validate_pointer(), and validate_static().
#define PB_LTYPE_STRING 0x07U |
Definition at line 255 of file pb.h.
Referenced by decode_basic_field(), decode_pointer_field(), encode_array(), encode_basic_field(), main(), pb_check_proto3_default_value(), pb_encode_tag_for_field(), validate_pointer(), and validate_static().
#define PB_LTYPE_SUBMESSAGE 0x08U |
Definition at line 259 of file pb.h.
Referenced by decode_basic_field(), encode_basic_field(), and pb_encode_tag_for_field().
#define PB_LTYPE_SUBMSG_W_CB 0x09U |
Definition at line 264 of file pb.h.
Referenced by decode_basic_field(), encode_basic_field(), pb_dec_submessage(), pb_enc_submessage(), and pb_encode_tag_for_field().
#define PB_LTYPE_EXTENSION 0x0AU |
Definition at line 268 of file pb.h.
Referenced by pb_check_proto3_default_value(), pb_decode_inner(), pb_encode(), pb_field_iter_find(), pb_field_iter_find_extension(), and pb_field_set_to_default().
#define PB_LTYPE_FIXED_LENGTH_BYTES 0x0BU |
Definition at line 274 of file pb.h.
Referenced by decode_basic_field(), encode_basic_field(), pb_check_proto3_default_value(), and pb_encode_tag_for_field().
#define PB_HTYPE_REQUIRED 0x00U |
Definition at line 282 of file pb.h.
Referenced by advance_iterator(), decode_pointer_field(), decode_static_field(), encode_field(), pb_check_proto3_default_value(), and pb_decode_inner().
#define PB_HTYPE_OPTIONAL 0x10U |
Definition at line 283 of file pb.h.
Referenced by decode_pointer_field(), decode_static_field(), encode_field(), pb_check_proto3_default_value(), pb_field_set_to_default(), and validate_static().
#define PB_HTYPE_REPEATED 0x20U |
Definition at line 285 of file pb.h.
Referenced by decode_pointer_field(), decode_static_field(), encode_field(), limit_sizes(), load_descriptor_values(), pb_check_proto3_default_value(), pb_dec_submessage(), pb_decode_inner(), pb_field_set_to_default(), validate_pointer(), and validate_static().
#define PB_HTYPE_ONEOF 0x30U |
Definition at line 287 of file pb.h.
Referenced by decode_field(), decode_pointer_field(), decode_static_field(), encode_field(), limit_sizes(), pb_check_proto3_default_value(), pb_field_set_to_default(), validate_pointer(), and validate_static().
#define PB_ATYPE_STATIC 0x00U |
Definition at line 292 of file pb.h.
Referenced by decode_field(), encode_field(), load_descriptor_values(), pb_check_proto3_default_value(), pb_dec_submessage(), pb_enc_bytes(), pb_field_set_to_default(), and validate_message().
#define PB_ATYPE_POINTER 0x80U |
Definition at line 293 of file pb.h.
Referenced by decode_field(), encode_array(), load_descriptor_values(), pb_check_proto3_default_value(), pb_dec_bytes(), pb_dec_string(), pb_enc_string(), pb_field_iter_begin_extension(), pb_field_set_to_default(), and validate_message().
#define PB_ATYPE_CALLBACK 0x40U |
Definition at line 294 of file pb.h.
Referenced by decode_field(), encode_field(), pb_check_proto3_default_value(), and pb_field_set_to_default().
#define PB_ATYPE | ( | x | ) |
Definition at line 297 of file pb.h.
Referenced by decode_field(), encode_array(), encode_field(), load_descriptor_values(), pb_check_proto3_default_value(), pb_dec_bytes(), pb_dec_string(), pb_dec_submessage(), pb_enc_bytes(), pb_enc_string(), pb_field_iter_begin_extension(), pb_field_set_to_default(), and validate_message().
#define PB_HTYPE | ( | x | ) |
Definition at line 298 of file pb.h.
Referenced by advance_iterator(), decode_field(), decode_pointer_field(), decode_static_field(), encode_field(), limit_sizes(), load_descriptor_values(), pb_check_proto3_default_value(), pb_dec_submessage(), pb_decode_inner(), pb_field_set_to_default(), validate_pointer(), and validate_static().
#define PB_LTYPE | ( | x | ) |
Definition at line 299 of file pb.h.
Referenced by decode_basic_field(), decode_pointer_field(), decode_static_field(), encode_array(), encode_basic_field(), limit_sizes(), main(), pb_check_proto3_default_value(), pb_dec_submessage(), pb_dec_varint(), pb_decode_inner(), pb_enc_fixed(), pb_enc_submessage(), pb_enc_varint(), pb_encode(), pb_encode_tag_for_field(), pb_field_iter_find(), pb_field_iter_find_extension(), pb_field_set_to_default(), validate_pointer(), and validate_static().
#define PB_LTYPE_IS_SUBMSG | ( | x | ) |
Definition at line 300 of file pb.h.
Referenced by advance_iterator(), decode_pointer_field(), decode_static_field(), load_descriptor_values(), pb_check_proto3_default_value(), pb_field_set_to_default(), validate_pointer(), and validate_static().
#define PB_SIZE_MAX ((pb_size_t)-1) |
Definition at line 313 of file pb.h.
Referenced by decode_pointer_field(), pb_dec_bytes(), pb_dec_fixed_length_bytes(), and pb_decode_inner().
#define PB_BYTES_ARRAY_T | ( | n | ) |
#define PB_BYTES_ARRAY_T_ALLOCSIZE | ( | n | ) |
Definition at line 377 of file pb.h.
Referenced by limit_sizes(), pb_dec_bytes(), userfs_inode_cache_flush_page(), validate_pointer(), and validate_static().
Definition at line 477 of file pb.h.
Referenced by do_decode(), do_roundtrip(), generate_message(), main(), and main().
#define pb_arraysize | ( | st, | |
m ) |
Definition at line 497 of file pb.h.
Referenced by main().
#define pb_delta | ( | st, | |
m1, | |||
m2 ) |
#define PB_BIND | ( | msgname, | |
structname, | |||
width ) |
#define PB_GEN_FIELD_COUNT | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_REQ_FIELD_COUNT | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_LARGEST_TAG | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_FIELD_INFO_1 | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_FIELD_INFO_2 | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_FIELD_INFO_4 | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_FIELD_INFO_8 | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_FIELD_INFO_AUTO | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_FIELDINFO_AUTO2 | ( | width, | |
tag, | |||
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FIELDINFO_AUTO3 | ( | width, | |
tag, | |||
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_GEN_FIELD_INFO_ASSERT_1 | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_FIELD_INFO_ASSERT_2 | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_FIELD_INFO_ASSERT_4 | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_FIELD_INFO_ASSERT_8 | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_GEN_FIELD_INFO_ASSERT_AUTO | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_FIELDINFO_ASSERT_AUTO2 | ( | width, | |
tag, | |||
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FIELDINFO_ASSERT_AUTO3 | ( | width, | |
tag, | |||
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_DATA_OFFSET_STATIC | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_DATA_OFFSET_POINTER | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_DATA_OFFSET_CALLBACK | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_DO_PB_HTYPE_REQUIRED | ( | structname, | |
fieldname ) |
#define PB_DO_PB_HTYPE_SINGULAR | ( | structname, | |
fieldname ) |
#define PB_DO_PB_HTYPE_ONEOF | ( | structname, | |
fieldname ) |
#define PB_DO_PB_HTYPE_OPTIONAL | ( | structname, | |
fieldname ) |
#define PB_DO_PB_HTYPE_REPEATED | ( | structname, | |
fieldname ) |
#define PB_DO_PB_HTYPE_FIXARRAY | ( | structname, | |
fieldname ) |
#define PB_SIZE_OFFSET_STATIC | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_SIZE_OFFSET_POINTER | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_SIZE_OFFSET_CALLBACK | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_SO_PB_HTYPE_REQUIRED | ( | structname, | |
fieldname ) |
#define PB_SO_PB_HTYPE_SINGULAR | ( | structname, | |
fieldname ) |
#define PB_SO_PB_HTYPE_ONEOF | ( | structname, | |
fieldname ) |
#define PB_SO_PB_HTYPE_ONEOF2 | ( | structname, | |
fullname, | |||
unionname ) |
#define PB_SO_PB_HTYPE_ONEOF3 | ( | structname, | |
fullname, | |||
unionname ) |
#define PB_SO_PB_HTYPE_OPTIONAL | ( | structname, | |
fieldname ) |
#define PB_SO_PB_HTYPE_REPEATED | ( | structname, | |
fieldname ) |
#define PB_SO_PB_HTYPE_FIXARRAY | ( | structname, | |
fieldname ) |
#define PB_SO_PTR_PB_HTYPE_REQUIRED | ( | structname, | |
fieldname ) |
#define PB_SO_PTR_PB_HTYPE_SINGULAR | ( | structname, | |
fieldname ) |
#define PB_SO_PTR_PB_HTYPE_ONEOF | ( | structname, | |
fieldname ) |
#define PB_SO_PTR_PB_HTYPE_OPTIONAL | ( | structname, | |
fieldname ) |
#define PB_SO_PTR_PB_HTYPE_REPEATED | ( | structname, | |
fieldname ) |
#define PB_SO_PTR_PB_HTYPE_FIXARRAY | ( | structname, | |
fieldname ) |
#define PB_SO_CB_PB_HTYPE_REQUIRED | ( | structname, | |
fieldname ) |
#define PB_SO_CB_PB_HTYPE_SINGULAR | ( | structname, | |
fieldname ) |
#define PB_SO_CB_PB_HTYPE_ONEOF | ( | structname, | |
fieldname ) |
#define PB_SO_CB_PB_HTYPE_OPTIONAL | ( | structname, | |
fieldname ) |
#define PB_SO_CB_PB_HTYPE_REPEATED | ( | structname, | |
fieldname ) |
#define PB_SO_CB_PB_HTYPE_FIXARRAY | ( | structname, | |
fieldname ) |
#define PB_ARRAY_SIZE_STATIC | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_ARRAY_SIZE_POINTER | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_ARRAY_SIZE_CALLBACK | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_AS_PB_HTYPE_REQUIRED | ( | structname, | |
fieldname ) |
#define PB_AS_PB_HTYPE_SINGULAR | ( | structname, | |
fieldname ) |
#define PB_AS_PB_HTYPE_OPTIONAL | ( | structname, | |
fieldname ) |
#define PB_AS_PB_HTYPE_REPEATED | ( | structname, | |
fieldname ) |
#define PB_AS_PB_HTYPE_FIXARRAY | ( | structname, | |
fieldname ) |
#define PB_AS_PTR_PB_HTYPE_REQUIRED | ( | structname, | |
fieldname ) |
#define PB_AS_PTR_PB_HTYPE_SINGULAR | ( | structname, | |
fieldname ) |
#define PB_AS_PTR_PB_HTYPE_OPTIONAL | ( | structname, | |
fieldname ) |
#define PB_AS_PTR_PB_HTYPE_ONEOF | ( | structname, | |
fieldname ) |
#define PB_AS_PTR_PB_HTYPE_REPEATED | ( | structname, | |
fieldname ) |
#define PB_AS_PTR_PB_HTYPE_FIXARRAY | ( | structname, | |
fieldname ) |
#define PB_DATA_SIZE_STATIC | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_DATA_SIZE_POINTER | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_DATA_SIZE_CALLBACK | ( | htype, | |
structname, | |||
fieldname ) |
#define PB_DS_PB_HTYPE_REQUIRED | ( | structname, | |
fieldname ) |
#define PB_DS_PB_HTYPE_SINGULAR | ( | structname, | |
fieldname ) |
#define PB_DS_PB_HTYPE_OPTIONAL | ( | structname, | |
fieldname ) |
#define PB_DS_PB_HTYPE_ONEOF | ( | structname, | |
fieldname ) |
#define PB_DS_PB_HTYPE_REPEATED | ( | structname, | |
fieldname ) |
#define PB_DS_PB_HTYPE_FIXARRAY | ( | structname, | |
fieldname ) |
#define PB_DS_PTR_PB_HTYPE_REQUIRED | ( | structname, | |
fieldname ) |
#define PB_DS_PTR_PB_HTYPE_SINGULAR | ( | structname, | |
fieldname ) |
#define PB_DS_PTR_PB_HTYPE_OPTIONAL | ( | structname, | |
fieldname ) |
#define PB_DS_PTR_PB_HTYPE_ONEOF | ( | structname, | |
fieldname ) |
#define PB_DS_PTR_PB_HTYPE_REPEATED | ( | structname, | |
fieldname ) |
#define PB_DS_PTR_PB_HTYPE_FIXARRAY | ( | structname, | |
fieldname ) |
#define PB_DS_CB_PB_HTYPE_REQUIRED | ( | structname, | |
fieldname ) |
#define PB_DS_CB_PB_HTYPE_SINGULAR | ( | structname, | |
fieldname ) |
#define PB_DS_CB_PB_HTYPE_OPTIONAL | ( | structname, | |
fieldname ) |
#define PB_DS_CB_PB_HTYPE_ONEOF | ( | structname, | |
fieldname ) |
#define PB_DS_CB_PB_HTYPE_REPEATED | ( | structname, | |
fieldname ) |
#define PB_DS_CB_PB_HTYPE_FIXARRAY | ( | structname, | |
fieldname ) |
#define PB_ONEOF_NAME | ( | type, | |
tuple ) |
#define PB_ONEOF_NAME_UNION | ( | unionname, | |
membername, | |||
fullname ) |
#define PB_ONEOF_NAME_MEMBER | ( | unionname, | |
membername, | |||
fullname ) |
#define PB_ONEOF_NAME_FULL | ( | unionname, | |
membername, | |||
fullname ) |
#define PB_GEN_SUBMSG_INFO | ( | structname, | |
atype, | |||
htype, | |||
ltype, | |||
fieldname, | |||
tag ) |
#define PB_SUBMSG_INFO_REQUIRED | ( | ltype, | |
structname, | |||
fieldname ) |
#define PB_SUBMSG_INFO_SINGULAR | ( | ltype, | |
structname, | |||
fieldname ) |
#define PB_SUBMSG_INFO_OPTIONAL | ( | ltype, | |
structname, | |||
fieldname ) |
#define PB_SUBMSG_INFO_ONEOF | ( | ltype, | |
structname, | |||
fieldname ) |
#define PB_SUBMSG_INFO_ONEOF2 | ( | ltype, | |
structname, | |||
unionname, | |||
membername ) |
#define PB_SUBMSG_INFO_ONEOF3 | ( | ltype, | |
structname, | |||
unionname, | |||
membername ) |
#define PB_SUBMSG_INFO_REPEATED | ( | ltype, | |
structname, | |||
fieldname ) |
#define PB_SUBMSG_INFO_FIXARRAY | ( | ltype, | |
structname, | |||
fieldname ) |
#define PB_SI_PB_LTYPE_MESSAGE | ( | t | ) |
#define PB_SI_PB_LTYPE_MSG_W_CB | ( | t | ) |
#define PB_FIELDINFO_1 | ( | tag, | |
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FIELDINFO_2 | ( | tag, | |
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FIELDINFO_4 | ( | tag, | |
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FIELDINFO_8 | ( | tag, | |
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FITS | ( | value, | |
bits ) |
#define PB_FIELDINFO_ASSERT_1 | ( | tag, | |
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FIELDINFO_ASSERT_2 | ( | tag, | |
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FIELDINFO_ASSERT_4 | ( | tag, | |
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FIELDINFO_ASSERT_8 | ( | tag, | |
type, | |||
data_offset, | |||
data_size, | |||
size_offset, | |||
array_size ) |
#define PB_FIELDINFO_WIDTH_AUTO | ( | atype, | |
htype, | |||
ltype ) |
#define PB_FI_WIDTH_PB_ATYPE_STATIC | ( | htype, | |
ltype ) |
#define PB_FI_WIDTH_PB_ATYPE_POINTER | ( | htype, | |
ltype ) |
#define PB_FI_WIDTH_PB_HTYPE_REQUIRED | ( | ltype | ) |
#define PB_FI_WIDTH_PB_HTYPE_SINGULAR | ( | ltype | ) |
#define PB_FI_WIDTH_PB_HTYPE_OPTIONAL | ( | ltype | ) |
#define PB_FI_WIDTH_PB_HTYPE_ONEOF | ( | ltype | ) |
#define PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL |
#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES |
#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 |
#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT |
#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT |
#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 |
#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 |
#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 |
#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT |
#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT |
#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE |
#define PB_LTYPE_MAP_MSG_W_CB PB_LTYPE_SUBMSG_W_CB |
#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 |
#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 |
#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT |
#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT |
#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING |
#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT |
#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT |
#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION |
#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES |
#define PB_SET_ERROR | ( | stream, | |
msg ) |
Definition at line 890 of file pb.h.
Referenced by decode_callback_field().
#define PB_GET_ERROR | ( | stream | ) |
Definition at line 891 of file pb.h.
Referenced by do_callback_decode(), do_decode(), do_roundtrip(), do_stream_decode(), encode_array(), handle_connection(), listdir(), main(), main(), main(), raw_decode(), test_oneof_1(), test_oneof_2(), test_OneofMessage(), and test_TestMessage().
#define PB_RETURN_ERROR | ( | stream, | |
msg ) |
Definition at line 894 of file pb.h.
Referenced by decode_basic_field(), decode_field(), decode_pointer_field(), decode_static_field(), default_extension_decoder(), default_extension_encoder(), encode_array(), encode_basic_field(), encode_callback_field(), encode_dictionary(), encode_field(), flakystream_callback(), msg_callback(), pb_dec_bytes(), pb_dec_fixed_length_bytes(), pb_dec_string(), pb_dec_submessage(), pb_dec_varint(), pb_decode_inner(), pb_decode_varint(), pb_decode_varint32_eof(), pb_enc_bytes(), pb_enc_fixed(), pb_enc_string(), pb_enc_submessage(), pb_enc_varint(), pb_encode_submessage(), pb_encode_tag_for_field(), pb_make_string_substream(), pb_read(), pb_readbyte(), pb_skip_field(), pb_skip_string(), pb_write(), read_callback(), read_raw_value(), and write_callback().
typedef uint_least8_t pb_byte_t |
typedef uint_least16_t pb_size_t |
typedef int_least16_t pb_ssize_t |
typedef pb_field_iter_t pb_field_t |
enum pb_wire_type_t |
|
extern |
Definition at line 300 of file pb_common.c.
Referenced by pb_check_proto3_default_value().