diff options
Diffstat (limited to 'pbstream_lowlevel.h')
-rw-r--r-- | pbstream_lowlevel.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pbstream_lowlevel.h b/pbstream_lowlevel.h index 2fa31a3..c25b16d 100644 --- a/pbstream_lowlevel.h +++ b/pbstream_lowlevel.h @@ -23,18 +23,20 @@ struct pbstream_tag { }; /* Parses a single tag from the character data starting at buf, and updates - * buf to point one past the bytes that were consumed. */ + * buf to point one past the bytes that were consumed. buf will be incremented + * by at most ten bytes. */ pbstream_status_t parse_tag(uint8_t **buf, struct pbstream_tag *tag); /* Parses a wire value with the given type (which must have been obtained from - * a tag that was just parsed) and updates buf to point to one past the bytes - * that were consumed. */ -pbstream_status_t parse_wire_value(uint8_t **buf, size_t offset, + * a tag that was just parsed) and adds the number of bytes that were consumed + * to *offset. */ +pbstream_status_t parse_wire_value(uint8_t *buf, size_t *offset, pbstream_wire_type_t wt, union pbstream_wire_value *wv); /* Like the above, but discards the wire value instead of saving it. */ -pbstream_status_t skip_wire_value(uint8_t **buf, pbstream_wire_type_t wt); +pbstream_status_t skip_wire_value(uint8_t *buf, size_t *offset, + pbstream_wire_type_t wt); /* Looks the given field number up in the fieldset, and returns the * corresponding pbstream_field definition (or NULL if this field number |