aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/writer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/serd/writer.h')
-rw-r--r--include/serd/writer.h40
1 files changed, 4 insertions, 36 deletions
diff --git a/include/serd/writer.h b/include/serd/writer.h
index 94747309..5f1d0535 100644
--- a/include/serd/writer.h
+++ b/include/serd/writer.h
@@ -8,7 +8,7 @@
#include "serd/env.h"
#include "serd/error.h"
#include "serd/node.h"
-#include "serd/statement.h"
+#include "serd/sink.h"
#include "serd/status.h"
#include "serd/stream.h"
#include "serd/syntax.h"
@@ -57,9 +57,9 @@ serd_writer_new(SerdSyntax syntax,
SERD_API void
serd_writer_free(SerdWriter* SERD_NULLABLE writer);
-/// Return the env used by `writer`
-SERD_PURE_API SerdEnv* SERD_NONNULL
-serd_writer_env(SerdWriter* SERD_NONNULL writer);
+/// Return a sink interface that emits statements via `writer`
+SERD_CONST_API const SerdSink* SERD_NONNULL
+serd_writer_sink(SerdWriter* SERD_NONNULL writer);
/**
Set a function to be called when errors occur during writing.
@@ -106,38 +106,6 @@ serd_writer_set_root_uri(SerdWriter* SERD_NONNULL writer,
const SerdNode* SERD_NULLABLE uri);
/**
- Set a namespace prefix (and emit directive if applicable).
-
- Note this function can be safely casted to #SerdPrefixFunc.
-*/
-SERD_API SerdStatus
-serd_writer_set_prefix(SerdWriter* SERD_NONNULL writer,
- const SerdNode* SERD_NONNULL name,
- const SerdNode* SERD_NONNULL uri);
-
-/**
- Write a statement.
-
- Note this function can be safely casted to #SerdStatementFunc.
-*/
-SERD_API SerdStatus
-serd_writer_write_statement(SerdWriter* SERD_NONNULL writer,
- SerdStatementFlags flags,
- const SerdNode* SERD_NULLABLE graph,
- const SerdNode* SERD_NONNULL subject,
- const SerdNode* SERD_NONNULL predicate,
- const SerdNode* SERD_NONNULL object);
-
-/**
- Mark the end of an anonymous node's description.
-
- Note this function can be safely casted to #SerdEndFunc.
-*/
-SERD_API SerdStatus
-serd_writer_end_anon(SerdWriter* SERD_NONNULL writer,
- const SerdNode* SERD_NULLABLE node);
-
-/**
Finish a write.
This flushes any pending output, for example terminating punctuation, so