aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-04-24 21:41:46 +0200
committerDavid Robillard <d@drobilla.net>2017-04-24 21:41:46 +0200
commit52d36530ef5bfd1b2be810a1ade6e034b76aa097 (patch)
treecf1a34d1f1c51508b1fd0a253609eebc428efbd3 /serd
parent1c9b402f041067a321a5f59ff0bcd7238e0ab9fe (diff)
downloadserd-52d36530ef5bfd1b2be810a1ade6e034b76aa097.tar.gz
serd-52d36530ef5bfd1b2be810a1ade6e034b76aa097.tar.bz2
serd-52d36530ef5bfd1b2be810a1ade6e034b76aa097.zip
Allow arbitrary page size to be passed for custom sources
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/serd/serd.h b/serd/serd.h
index 0ba3dffd..1c31fb14 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -827,8 +827,8 @@ serd_reader_start_stream(SerdReader* me,
/**
Start an incremental read from a user-specified source.
- Iff `bulk` is true, `source` will be read a page at a time. Otherwise,
- `source` is guaranteed to only be called for single bytes.
+ The `read_func` is guaranteed to only be called for `page_size` elements
+ with size 1 (i.e. `page_size` bytes).
*/
SERD_API
SerdStatus
@@ -837,7 +837,7 @@ serd_reader_start_source_stream(SerdReader* me,
SerdStreamErrorFunc error_func,
void* stream,
const uint8_t* name,
- bool bulk);
+ size_t page_size);
/**
Read a single "chunk" of data during an incremental read.
@@ -876,7 +876,8 @@ serd_reader_read_source(SerdReader* reader,
SerdSource source,
SerdStreamErrorFunc error,
void* stream,
- const uint8_t* name);
+ const uint8_t* name,
+ size_t page_size);
/**
Read `utf8`.