diff options
author | David Robillard <d@drobilla.net> | 2018-06-03 19:42:30 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-11-25 22:12:47 +0100 |
commit | cd63c3d8d0627b5cb6c060db5f5132c0dbcc9a79 (patch) | |
tree | 4d9e339fb52330a1846814df0d75c126b8575c50 /serd | |
parent | b2e692cb13040e569b964b884867011cceb9d4c3 (diff) | |
download | serd-cd63c3d8d0627b5cb6c060db5f5132c0dbcc9a79.tar.gz serd-cd63c3d8d0627b5cb6c060db5f5132c0dbcc9a79.tar.bz2 serd-cd63c3d8d0627b5cb6c060db5f5132c0dbcc9a79.zip |
Add sink interface
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h index 5bfcec1e..1db1d1b1 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -938,6 +938,66 @@ serd_env_foreach(const SerdEnv* env, /** @} + @name Sink + @{ +*/ + +/** + Set the base URI. + + Simple wrapper for the `SerdBaseSink` of `sink`. +*/ +SERD_API +SerdStatus +serd_sink_set_base(const SerdSink* sink, const SerdNode* uri); + +/** + Set a namespace prefix. + + Simple wrapper for the `SerdPrefixSink` of `sink`. +*/ +SERD_API +SerdStatus +serd_sink_set_prefix(const SerdSink* sink, + const SerdNode* name, + const SerdNode* uri); + +/** + Write a statement. + + Simple wrapper for the `SerdStatementSink` of `sink`. +*/ +SERD_API +SerdStatus +serd_sink_write_statement(const SerdSink* sink, + SerdStatementFlags flags, + const SerdStatement* statement); + +/** + Write a statement from individual nodes. + + Simple wrapper for the `SerdStatementSink` of `sink`. +*/ +SERD_API +SerdStatus +serd_sink_write_nodes(const SerdSink* sink, + SerdStatementFlags flags, + const SerdNode* subject, + const SerdNode* predicate, + const SerdNode* object, + const SerdNode* graph); + +/** + Mark the end of an anonymous node. + + Simple wrapper for the `SerdEndSink` of `sink`. +*/ +SERD_API +SerdStatus +serd_sink_end(const SerdSink* sink, const SerdNode* node); + +/** + @} @name Reader @{ */ |