aboutsummaryrefslogtreecommitdiffstats
path: root/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-02-04 12:40:45 +0100
committerDavid Robillard <d@drobilla.net>2018-12-30 17:56:22 -0500
commitd1f34556ac1e1761d5d227ea1611913561c2a03d (patch)
treef4c74e0f050440692c207c9436dfbe1e235433db /serd/serd.h
parent86681fbf464d47f8962238d472a7d521643d5dd6 (diff)
downloadserd-d1f34556ac1e1761d5d227ea1611913561c2a03d.tar.gz
serd-d1f34556ac1e1761d5d227ea1611913561c2a03d.tar.bz2
serd-d1f34556ac1e1761d5d227ea1611913561c2a03d.zip
Add node accessor API
Diffstat (limited to 'serd/serd.h')
-rw-r--r--serd/serd.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h
index 5c28aa50..4fe2c61d 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -606,6 +606,34 @@ SerdNode
serd_node_new_blob(const void* buf, size_t size, bool wrap_lines);
/**
+ Return the type of a node (SERD_URI, SERD_BLANK, or SERD_LITERAL).
+*/
+SERD_API
+SerdType
+serd_node_get_type(const SerdNode* node);
+
+/**
+ Return the string value of a node.
+*/
+SERD_API
+const char*
+serd_node_get_string(const SerdNode* node);
+
+/**
+ Return the length of the string value of a node in bytes.
+*/
+SERD_API
+size_t
+serd_node_get_length(const SerdNode* node);
+
+/**
+ Return the flags (string properties) of a node.
+*/
+SERD_API
+SerdNodeFlags
+serd_node_get_flags(const SerdNode* node);
+
+/**
Free any data owned by `node`.
Note that if `node` is itself dynamically allocated (which is not the case