summaryrefslogtreecommitdiff
path: root/include/hubbub
diff options
context:
space:
mode:
authorVincent Sanders <vincent.sanders@collabora.co.uk>2012-07-03 19:39:36 +0100
committerVincent Sanders <vincent.sanders@collabora.co.uk>2012-07-03 19:39:36 +0100
commitc65586bb921f0b7dbad818a057507609d59d4821 (patch)
tree9234e641b35a8915ff75ff77156bcb0fce6c925b /include/hubbub
parenta256763c038714124858954cc3c4fc024191dfdd (diff)
downloadlibhubbub-c65586bb921f0b7dbad818a057507609d59d4821.tar.gz
libhubbub-c65586bb921f0b7dbad818a057507609d59d4821.tar.bz2
add hubbub_parser_insert_chunk
Diffstat (limited to 'include/hubbub')
-rw-r--r--include/hubbub/parser.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/hubbub/parser.h b/include/hubbub/parser.h
index 06b8d7f..7d2fb1f 100644
--- a/include/hubbub/parser.h
+++ b/include/hubbub/parser.h
@@ -75,6 +75,23 @@ hubbub_error hubbub_parser_setopt(hubbub_parser *parser,
/* This data is encoded in the input charset */
hubbub_error hubbub_parser_parse_chunk(hubbub_parser *parser,
const uint8_t *data, size_t len);
+
+/**
+ * Insert a chunk of data into a hubbub parser input stream
+ *
+ * This data is encoded in the input charset
+ *
+ * Inserts the given data into the input stream ready for parsing but
+ * does not cause any additional processing of the input. This is
+ * useful to allow hubbub callbacks to add computed data to the input.
+ *
+ * \param parser Parser instance to use
+ * \param data Data to parse (encoded in the input charset)
+ * \param len Length, in bytes, of data
+ * \return HUBBUB_OK on success, appropriate error otherwise
+ */
+hubbub_error hubbub_parser_insert_chunk(hubbub_parser *parser,
+ const uint8_t *data, size_t len);
/* Inform the parser that the last chunk of data has been parsed */
hubbub_error hubbub_parser_completed(hubbub_parser *parser);