aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-02-04 12:40:45 +0100
committerDavid Robillard <d@drobilla.net>2018-11-25 09:21:03 +0100
commitdbca226473e636e87693db1ccd31095b3d71eb4d (patch)
treee225c29eac17e1154c7a95c2a78ed3544152ac07 /src
parent6d57362026dcd33f6502b968cee57851d16ee665 (diff)
downloadserd-dbca226473e636e87693db1ccd31095b3d71eb4d.tar.gz
serd-dbca226473e636e87693db1ccd31095b3d71eb4d.tar.bz2
serd-dbca226473e636e87693db1ccd31095b3d71eb4d.zip
Add node accessor API
Diffstat (limited to 'src')
-rw-r--r--src/node.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index ebd6b3ad..c6f5841a 100644
--- a/src/node.c
+++ b/src/node.c
@@ -371,6 +371,30 @@ serd_node_new_blob(const void* buf, size_t size, bool wrap_lines)
return node;
}
+SerdType
+serd_node_get_type(const SerdNode* node)
+{
+ return node ? node->type : SERD_NOTHING;
+}
+
+const char*
+serd_node_get_string(const SerdNode* node)
+{
+ return node->buf;
+}
+
+size_t
+serd_node_get_length(const SerdNode* node)
+{
+ return node->n_bytes;
+}
+
+SerdNodeFlags
+serd_node_get_flags(const SerdNode* node)
+{
+ return node->flags;
+}
+
void
serd_node_free(SerdNode* node)
{