MOS Source Code
Loading...
Searching...
No Matches
pb_decode.h File Reference
#include "pb.h"
+ Include dependency graph for pb_decode.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pb_istream_t
 

Macros

#define PB_ISTREAM_EMPTY   {0,0,0,0}
 
#define PB_DECODE_NOINIT   0x01U
 
#define PB_DECODE_DELIMITED   0x02U
 
#define PB_DECODE_NULLTERMINATED   0x04U
 
#define pb_decode_noinit(s, f, d)
 
#define pb_decode_delimited(s, f, d)
 
#define pb_decode_delimited_noinit(s, f, d)
 
#define pb_decode_nullterminated(s, f, d)
 

Functions

bool pb_decode (pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct)
 
bool pb_decode_ex (pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned int flags)
 
void pb_release (const pb_msgdesc_t *fields, void *dest_struct)
 
pb_istream_t pb_istream_from_buffer (const pb_byte_t *buf, size_t msglen)
 
bool pb_read (pb_istream_t *stream, pb_byte_t *buf, size_t count)
 
bool pb_decode_tag (pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof)
 
bool pb_skip_field (pb_istream_t *stream, pb_wire_type_t wire_type)
 
bool pb_decode_varint (pb_istream_t *stream, uint64_t *dest)
 
bool pb_decode_varint32 (pb_istream_t *stream, uint32_t *dest)
 
bool pb_decode_bool (pb_istream_t *stream, bool *dest)
 
bool pb_decode_svarint (pb_istream_t *stream, int64_t *dest)
 
bool pb_decode_fixed32 (pb_istream_t *stream, void *dest)
 
bool pb_decode_fixed64 (pb_istream_t *stream, void *dest)
 
bool pb_make_string_substream (pb_istream_t *stream, pb_istream_t *substream)
 
bool pb_close_string_substream (pb_istream_t *stream, pb_istream_t *substream)
 

Macro Definition Documentation

◆ PB_ISTREAM_EMPTY

#define PB_ISTREAM_EMPTY   {0,0,0,0}

Definition at line 49 of file pb_decode.h.

◆ PB_DECODE_NOINIT

#define PB_DECODE_NOINIT   0x01U

Definition at line 99 of file pb_decode.h.

◆ PB_DECODE_DELIMITED

#define PB_DECODE_DELIMITED   0x02U

Definition at line 100 of file pb_decode.h.

◆ PB_DECODE_NULLTERMINATED

#define PB_DECODE_NULLTERMINATED   0x04U

Definition at line 101 of file pb_decode.h.

◆ pb_decode_noinit

#define pb_decode_noinit ( s,
f,
d )
Value:
bool pb_decode_ex(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned int flags)
Definition pb_decode.c:1154
#define PB_DECODE_NOINIT
Definition pb_decode.h:99

Definition at line 105 of file pb_decode.h.

◆ pb_decode_delimited

#define pb_decode_delimited ( s,
f,
d )
Value:
#define PB_DECODE_DELIMITED
Definition pb_decode.h:100

Definition at line 106 of file pb_decode.h.

◆ pb_decode_delimited_noinit

#define pb_decode_delimited_noinit ( s,
f,
d )
Value:

Definition at line 107 of file pb_decode.h.

◆ pb_decode_nullterminated

#define pb_decode_nullterminated ( s,
f,
d )
Value:
#define PB_DECODE_NULLTERMINATED
Definition pb_decode.h:101

Definition at line 108 of file pb_decode.h.

Function Documentation

◆ pb_decode()

◆ pb_decode_ex()

bool pb_decode_ex ( pb_istream_t * stream,
const pb_msgdesc_t * fields,
void * dest_struct,
unsigned int flags )

Definition at line 1154 of file pb_decode.c.

Referenced by do_decode(), and main().

+ Here is the call graph for this function:

◆ pb_release()

◆ pb_istream_from_buffer()

pb_istream_t pb_istream_from_buffer ( const pb_byte_t * buf,
size_t msglen )

◆ pb_read()

◆ pb_decode_tag()

bool pb_decode_tag ( pb_istream_t * stream,
pb_wire_type_t * wire_type,
uint32_t * tag,
bool * eof )

Definition at line 291 of file pb_decode.c.

Referenced by decode_unionmessage_type(), pb_decode_inner(), pb_message_set_to_defaults(), and raw_decode().

+ Here is the call graph for this function:

◆ pb_skip_field()

bool pb_skip_field ( pb_istream_t * stream,
pb_wire_type_t wire_type )

Definition at line 308 of file pb_decode.c.

Referenced by decode_callback_field(), decode_unionmessage_type(), and pb_decode_inner().

+ Here is the call graph for this function:

◆ pb_decode_varint()

bool pb_decode_varint ( pb_istream_t * stream,
uint64_t * dest )

Definition at line 243 of file pb_decode.c.

Referenced by main(), pb_dec_varint(), pb_decode_svarint(), print_int32(), raw_decode(), read_repeated_varint(), and read_varint().

+ Here is the call graph for this function:

◆ pb_decode_varint32()

bool pb_decode_varint32 ( pb_istream_t * stream,
uint32_t * dest )

Definition at line 237 of file pb_decode.c.

Referenced by main(), pb_dec_bytes(), pb_dec_fixed_length_bytes(), pb_dec_string(), pb_decode_bool(), pb_make_string_substream(), pb_skip_string(), and read_array().

+ Here is the call graph for this function:

◆ pb_decode_bool()

bool pb_decode_bool ( pb_istream_t * stream,
bool * dest )

Definition at line 1346 of file pb_decode.c.

Referenced by pb_dec_bool().

+ Here is the call graph for this function:

◆ pb_decode_svarint()

bool pb_decode_svarint ( pb_istream_t * stream,
int64_t * dest )

Definition at line 1356 of file pb_decode.c.

Referenced by pb_dec_varint(), read_repeated_svarint(), and read_svarint().

+ Here is the call graph for this function:

◆ pb_decode_fixed32()

bool pb_decode_fixed32 ( pb_istream_t * stream,
void * dest )

Definition at line 1370 of file pb_decode.c.

Referenced by decode_basic_field(), main(), print_fixed32(), raw_decode(), read_fixed32(), and read_repeated_fixed32().

+ Here is the call graph for this function:

◆ pb_decode_fixed64()

bool pb_decode_fixed64 ( pb_istream_t * stream,
void * dest )

Definition at line 1393 of file pb_decode.c.

Referenced by decode_basic_field(), main(), print_fixed64(), raw_decode(), read_double(), read_fixed64(), read_repeated_double(), and read_repeated_fixed64().

+ Here is the call graph for this function:

◆ pb_make_string_substream()

bool pb_make_string_substream ( pb_istream_t * stream,
pb_istream_t * substream )

Definition at line 362 of file pb_decode.c.

Referenced by decode_callback_field(), decode_pointer_field(), decode_static_field(), decode_unionmessage_contents(), pb_dec_submessage(), pb_decode_ex(), and raw_decode().

+ Here is the call graph for this function:

◆ pb_close_string_substream()

bool pb_close_string_substream ( pb_istream_t * stream,
pb_istream_t * substream )

Definition at line 377 of file pb_decode.c.

Referenced by decode_callback_field(), decode_pointer_field(), decode_static_field(), decode_unionmessage_contents(), pb_dec_submessage(), pb_decode_ex(), and raw_decode().

+ Here is the call graph for this function: