diff options
author | David Robillard <d@drobilla.net> | 2021-08-14 01:51:55 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:07 -0500 |
commit | b3892cb6e4963e1bbeb346a8124101b7c3cf379b (patch) | |
tree | 4800918b6f4db5ce0d0f4802988c1935996d6ba3 /tools/console.h | |
parent | 0e739f34801ff6810064a8fac570f6be2b61ae70 (diff) | |
download | serd-b3892cb6e4963e1bbeb346a8124101b7c3cf379b.tar.gz serd-b3892cb6e4963e1bbeb346a8124101b7c3cf379b.tar.bz2 serd-b3892cb6e4963e1bbeb346a8124101b7c3cf379b.zip |
Simplify input stream API
More or less the same rationale as the previous commit, but for reading. This
makes for nice symmetry with writing, at the cost of a slightly more annoying
reader interface since the source doesn't know its block size or name.
Diffstat (limited to 'tools/console.h')
-rw-r--r-- | tools/console.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/console.h b/tools/console.h index 97251f68..43bc7a12 100644 --- a/tools/console.h +++ b/tools/console.h @@ -119,11 +119,11 @@ serd_choose_syntax(SerdWorld* world, const char* filename, SerdSyntax fallback); -SerdByteSource* -serd_open_input(const char* filename, size_t block_size); +SerdInputStream +serd_open_tool_input(const char* filename); SerdOutputStream -serd_open_output(const char* filename); +serd_open_tool_output(const char* filename); SerdStatus serd_set_base_uri_from_path(SerdEnv* env, const char* path); @@ -133,7 +133,8 @@ serd_read_source(SerdWorld* world, SerdCommonOptions opts, SerdEnv* env, SerdSyntax syntax, - SerdByteSource* in, + SerdInputStream* in, + const char* name, const SerdSink* sink); SerdStatus |