summaryrefslogtreecommitdiffstats
path: root/lilv
diff options
context:
space:
mode:
Diffstat (limited to 'lilv')
-rw-r--r--lilv/lilv.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/lilv/lilv.h b/lilv/lilv.h
index 6719e67..f2dd17a 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -650,6 +650,21 @@ lilv_world_find_nodes(LilvWorld* world,
const LilvNode* object);
/**
+ Find a single node that matches a pattern.
+ Exactly one of @p subject, @p predicate, @p object must be NULL.
+ This function is equivalent to
+ lilv_nodes_get_first(lilv_world_find_nodes(...)) but simplifies the common
+ case of only wanting a single value.
+ @return the first matching node, or NULL if no matches are found.
+*/
+LILV_API
+LilvNode*
+lilv_world_get(LilvWorld* world,
+ const LilvNode* subject,
+ const LilvNode* predicate,
+ const LilvNode* object);
+
+/**
Return true iff a statement matching a certain pattern exists.
This is useful for checking if particular statement exists without having to
@@ -1058,6 +1073,19 @@ lilv_port_get_value(const LilvPlugin* plugin,
const LilvNode* predicate);
/**
+ Get a single property value of a port.
+
+ This is equivalent to lilv_nodes_get_first(lilv_port_get_value(...)) but is
+ simpler to use in the common case of only caring about one value. The
+ caller is responsible for freeing the returned node.
+*/
+LILV_API
+LilvNode*
+lilv_port_get(const LilvPlugin* plugin,
+ const LilvPort* port,
+ const LilvNode* predicate);
+
+/**
Return the LV2 port properties of a port.
*/
LILV_API