aboutsummaryrefslogtreecommitdiffstats
path: root/src/sink.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-02-20 19:18:28 -0500
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:07 -0500
commitd62c7dc45af3256c6cd70d12a11e91b5b872c7db (patch)
tree63f9f1cc8f8900ad59b5bd8f07b70e6008522d21 /src/sink.h
parentab1aa43256fac3e017212abe6f9d845bf74c024c (diff)
downloadserd-d62c7dc45af3256c6cd70d12a11e91b5b872c7db.tar.gz
serd-d62c7dc45af3256c6cd70d12a11e91b5b872c7db.tar.bz2
serd-d62c7dc45af3256c6cd70d12a11e91b5b872c7db.zip
Replace multiple stream callbacks with SerdEvent
This makes plumbing easier since everything goes through the same "stream" and only one callback is required to handling everything. It's also more easily extensible in case more event types need to be added in the future.
Diffstat (limited to 'src/sink.h')
-rw-r--r--src/sink.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/sink.h b/src/sink.h
index 98884fe2..097e0d6d 100644
--- a/src/sink.h
+++ b/src/sink.h
@@ -4,18 +4,16 @@
#ifndef SERD_SRC_SINK_H
#define SERD_SRC_SINK_H
+#include "serd/event.h"
#include "serd/sink.h"
/**
An interface that receives a stream of RDF data.
*/
struct SerdSinkImpl {
- void* handle;
- SerdFreeFunc free_handle;
- SerdBaseFunc base;
- SerdPrefixFunc prefix;
- SerdStatementFunc statement;
- SerdEndFunc end;
+ void* handle;
+ SerdFreeFunc free_handle;
+ SerdEventFunc on_event;
};
#endif // SERD_SRC_SINK_H