From 41c4935f03caef37baff3d22310b90abd300fd02 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Dec 2018 20:05:00 -0500 Subject: Rename SerdStyle to SerdWriterFlags --- include/serd/serd.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/serd/serd.h b/include/serd/serd.h index c2308b16..c7ff1358 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -815,25 +815,28 @@ serd_reader_free(SerdReader* SERD_NULLABLE reader); typedef struct SerdWriterImpl SerdWriter; /** - Syntax style options. + Writer style options. These flags allow more precise control of writer output style. Note that some options are only supported for some syntaxes, for example, NTriples does not support abbreviation and is always ASCII. */ typedef enum { - SERD_STYLE_ABBREVIATED = 1U << 0U, ///< Abbreviate triples when possible. - SERD_STYLE_ASCII = 1U << 1U, ///< Escape all non-ASCII characters. - SERD_STYLE_RESOLVED = 1U << 2U, ///< Resolve URIs against base URI. - SERD_STYLE_CURIED = 1U << 3U, ///< Shorten URIs into CURIEs. - SERD_STYLE_BULK = 1U << 4U, ///< Write output in pages. - SERD_STYLE_STRICT = 1U << 5U, ///< Abort with error on lossy output -} SerdStyle; + SERD_WRITE_ABBREVIATED = 1U << 0U, ///< Abbreviate triples when possible + SERD_WRITE_ASCII = 1U << 1U, ///< Escape all non-ASCII characters + SERD_WRITE_RESOLVED = 1U << 2U, ///< Resolve URIs against base URI + SERD_WRITE_CURIED = 1U << 3U, ///< Shorten URIs into CURIEs + SERD_WRITE_BULK = 1U << 4U, ///< Write output in pages + SERD_WRITE_STRICT = 1U << 5U, ///< Abort with error on lossy output +} SerdWriterFlag; + +/// Bitwise OR of SerdWriterFlag values +typedef uint32_t SerdWriterFlags; /// Create a new RDF writer SERD_API SerdWriter* SERD_ALLOCATED serd_writer_new(SerdSyntax syntax, - SerdStyle style, + SerdWriterFlags flags, SerdEnv* SERD_NONNULL env, const SerdURIView* SERD_NULLABLE base_uri, SerdSink SERD_NONNULL ssink, -- cgit v1.2.1