summaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-03-07 08:42:56 +0000
committerDavid Robillard <d@drobilla.net>2015-03-07 08:42:56 +0000
commit1b420b15b3c88ebbcd6789f78b69bd284e0a98f7 (patch)
tree2871ea66f0651b2a43ff98c6f107e1654ee3aeed /src/node.c
parentcd320a7ccd392a5da2df31ec5edc9b07db5befab (diff)
downloadlilv-1b420b15b3c88ebbcd6789f78b69bd284e0a98f7.tar.gz
lilv-1b420b15b3c88ebbcd6789f78b69bd284e0a98f7.tar.bz2
lilv-1b420b15b3c88ebbcd6789f78b69bd284e0a98f7.zip
Add support for state deletion.
Add lilv_node_get_path(). Add lilv_state_get_uri(). Add lilv_state_delete(). Fix creation of duplicate manifest entries when saving state. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5617 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index b57b1b8..d745adb 100644
--- a/src/node.c
+++ b/src/node.c
@@ -385,3 +385,12 @@ lilv_node_as_bool(const LilvNode* value)
{
return lilv_node_is_bool(value) ? value->val.bool_val : false;
}
+
+LILV_API char*
+lilv_node_get_path(const LilvNode* value, char** hostname)
+{
+ if (lilv_node_is_uri(value)) {
+ return lilv_file_uri_parse(lilv_node_as_uri(value), hostname);
+ }
+ return NULL;
+}