aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-29 20:05:00 -0500
committerDavid Robillard <d@drobilla.net>2022-01-13 15:33:54 -0500
commit6cdd2b1e6f4ac37682ee20dca32441f88c92bcfa (patch)
tree350d096f47e2c9b3a3432de4c113ecdbfc29e964 /include/serd
parent9fa93ba7da0983e3a4e810138ae6f7c14751e180 (diff)
downloadserd-6cdd2b1e6f4ac37682ee20dca32441f88c92bcfa.tar.gz
serd-6cdd2b1e6f4ac37682ee20dca32441f88c92bcfa.tar.bz2
serd-6cdd2b1e6f4ac37682ee20dca32441f88c92bcfa.zip
Rename SerdStyle to SerdWriterFlags
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 7aea35c8..74d3104a 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -861,25 +861,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.
-} 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
+} 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,