X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=pb_encode.h;h=04bdabeec0b463d9b0e6116d182cea3112839d75;hb=4aef194a99705805153471c371e16a3633a4cc4e;hp=d9e0336a2b8812f3abd2ea3fd9ad066b340c527f;hpb=314460c2a518bdfc4e5dfb87992d907461a7c0e6;p=apps%2Fagl-service-can-low-level.git diff --git a/pb_encode.h b/pb_encode.h index d9e0336a..04bdabee 100644 --- a/pb_encode.h +++ b/pb_encode.h @@ -32,6 +32,10 @@ extern "C" { */ bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); +/* Same as pb_encode, but prepends the length of the message as a varint. + * Corresponds to writeDelimitedTo() in Google's protobuf API. + */ +bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); /************************************** * Functions for manipulating streams *