X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=pb_decode.h;h=3da3f763f9cd36a64abc382a46860891caf57bb1;hb=4aef194a99705805153471c371e16a3633a4cc4e;hp=85efa212e0999eb2c346293b8ebbbbec7b59c78e;hpb=314460c2a518bdfc4e5dfb87992d907461a7c0e6;p=apps%2Fagl-service-can-low-level.git diff --git a/pb_decode.h b/pb_decode.h index 85efa212..3da3f763 100644 --- a/pb_decode.h +++ b/pb_decode.h @@ -43,6 +43,12 @@ bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struc */ bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); +/* Same as pb_decode, except expects the stream to start with the message size + * encoded as varint. Corresponds to parseDelimitedFrom() in Google's + * protobuf API. + */ +bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + /************************************** * Functions for manipulating streams *