diff options
author | David Robillard <d@drobilla.net> | 2021-08-13 19:31:26 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:08 -0500 |
commit | 828c1018f38bab9a930cecce64646366d051d39b (patch) | |
tree | 38a60777520efb17017ed62fe3b299ba94aaccf2 /include/serd/writer.h | |
parent | a083c64f506175029280ff76defa0ad7d7ae2ea0 (diff) | |
download | serd-828c1018f38bab9a930cecce64646366d051d39b.tar.gz serd-828c1018f38bab9a930cecce64646366d051d39b.tar.bz2 serd-828c1018f38bab9a930cecce64646366d051d39b.zip |
Simplify output stream API
Diffstat (limited to 'include/serd/writer.h')
-rw-r--r-- | include/serd/writer.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/serd/writer.h b/include/serd/writer.h index 3cd7e2f4..41ffb8cd 100644 --- a/include/serd/writer.h +++ b/include/serd/writer.h @@ -6,14 +6,15 @@ #include "serd/attributes.h" #include "serd/env.h" +#include "serd/output_stream.h" #include "serd/sink.h" #include "serd/status.h" -#include "serd/stream.h" #include "serd/string_view.h" #include "serd/syntax.h" #include "serd/world.h" #include "zix/attributes.h" +#include <stddef.h> #include <stdint.h> SERD_BEGIN_DECLS @@ -38,9 +39,8 @@ typedef enum { SERD_WRITE_ASCII = 1U << 0U, ///< Escape all non-ASCII characters SERD_WRITE_UNQUALIFIED = 1U << 1U, ///< Do not shorten URIs into CURIEs SERD_WRITE_UNRESOLVED = 1U << 2U, ///< Do not make URIs relative - SERD_WRITE_BULK = 1U << 3U, ///< Write output in pages - SERD_WRITE_LAX = 1U << 4U, ///< Tolerate lossy output - SERD_WRITE_TERSE = 1U << 5U, ///< Write terser output without newlines + SERD_WRITE_LAX = 1U << 3U, ///< Tolerate lossy output + SERD_WRITE_TERSE = 1U << 4U, ///< Write terser output without newlines } SerdWriterFlag; /// Bitwise OR of #SerdWriterFlag values @@ -48,12 +48,12 @@ typedef uint32_t SerdWriterFlags; /// Create a new RDF writer SERD_API SerdWriter* ZIX_ALLOCATED -serd_writer_new(SerdWorld* ZIX_NONNULL world, - SerdSyntax syntax, - SerdWriterFlags flags, - SerdEnv* ZIX_NONNULL env, - SerdWriteFunc ZIX_NONNULL ssink, - void* ZIX_NULLABLE stream); +serd_writer_new(SerdWorld* ZIX_NONNULL world, + SerdSyntax syntax, + SerdWriterFlags flags, + SerdEnv* ZIX_NONNULL env, + SerdOutputStream* ZIX_NONNULL output, + size_t block_size); /// Free `writer` SERD_API void |