aboutsummaryrefslogtreecommitdiffstats
path: root/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-21 06:28:23 +0000
committerDavid Robillard <d@drobilla.net>2011-01-21 06:28:23 +0000
commitff9510dc36fb3d6c5a85e3f4d41220c59b26ee93 (patch)
treee5d64ae74cf195a8d1783d8dfe9b268369c5036e /serd/serd.h
parentc5a3f407cb46797f8b122d2f3843d382760a2c3b (diff)
downloadserd-ff9510dc36fb3d6c5a85e3f4d41220c59b26ee93.tar.gz
serd-ff9510dc36fb3d6c5a85e3f4d41220c59b26ee93.tar.bz2
serd-ff9510dc36fb3d6c5a85e3f4d41220c59b26ee93.zip
Preliminary support for writing abbreviated Turtle.
git-svn-id: http://svn.drobilla.net/serd/trunk@22 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'serd/serd.h')
-rw-r--r--serd/serd.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/serd/serd.h b/serd/serd.h
index 8efaab20..d350cf4c 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -244,10 +244,17 @@ serd_reader_free(SerdReader reader);
* @{
*/
+typedef enum {
+ SERD_STYLE_ABBREVIATED = 1,
+ SERD_STYLE_ASCII = 1 << 1,
+ SERD_STYLE_ESCAPE_
+} SerdStyle;
+
/** Create a new RDF writer. */
SERD_API
SerdWriter
serd_writer_new(SerdSyntax syntax,
+ SerdStyle style,
SerdNamespaces ns,
const SerdURI* base_uri,
SerdSink sink,
@@ -258,12 +265,19 @@ SERD_API
void
serd_writer_free(SerdWriter writer);
-/** Set the base URI of writer. */
+/** Set the current output base URI. */
SERD_API
void
serd_writer_set_base_uri(SerdWriter writer,
const SerdURI* uri);
+/** Set the current output base URI. */
+SERD_API
+void
+serd_writer_set_prefix(SerdWriter writer,
+ const SerdString* name,
+ const SerdString* uri);
+
/** Write a statement. */
SERD_API
bool
@@ -278,6 +292,11 @@ serd_writer_write_statement(SerdWriter writer,
const SerdString* object_datatype,
const SerdString* object_lang);
+/** Finish a write. */
+SERD_API
+void
+serd_writer_finish(SerdWriter writer);
+
/** @} */
/** @} */