Added new functions to public interface in pb_decode.h.

pb_decode_tag and pb_skip_field allow manually iterating the fields
in a message.
This commit is contained in:
Petteri Aimonen
2012-06-16 14:07:37 +03:00
parent 7e1059628c
commit e18352d506
3 changed files with 73 additions and 29 deletions

View File

@@ -48,6 +48,9 @@ bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struc
* You may want to use these from your caller or callbacks.
*/
bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, int *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_skip_varint(pb_istream_t *stream);