summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-20 01:42:50 +0000
committerDavid Robillard <d@drobilla.net>2007-02-20 01:42:50 +0000
commita909c448b72481e517eb792930a5455ffbf6ff21 (patch)
tree8f89fc3be386eb4f1e1e423218709beeeab1e9e2 /src/plugin.c
parent07b6e7736550541b38f40f6889b846c508c13ad1 (diff)
downloadlilv-a909c448b72481e517eb792930a5455ffbf6ff21.tar.gz
lilv-a909c448b72481e517eb792930a5455ffbf6ff21.tar.bz2
lilv-a909c448b72481e517eb792930a5455ffbf6ff21.zip
Added simple accessor for values with subjects other than the plugin itself.
git-svn-id: http://svn.drobilla.net/lad/slv2@321 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 8441aec..abb577b 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -172,6 +172,26 @@ slv2_plugin_get_value(SLV2Plugin p,
return result;
}
+
+SLV2Strings
+slv2_plugin_get_value_for_subject(SLV2Plugin p,
+ const char* subject,
+ const char* predicate)
+{
+ assert(predicate);
+
+ char* query = slv2_strjoin(
+ "SELECT DISTINCT ?value WHERE {\n",
+ subject, " ", predicate, " ?value .\n"
+ "}\n", NULL);
+
+ SLV2Strings result = slv2_plugin_simple_query(p, query, "value");
+
+ free(query);
+
+ return result;
+}
+
SLV2Strings
slv2_plugin_get_properties(SLV2Plugin p)