summaryrefslogtreecommitdiffstats
path: root/utils/lv2_inspect.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-02-14 00:48:45 +0000
committerDavid Robillard <d@drobilla.net>2009-02-14 00:48:45 +0000
commit6f8391945483823638c031d9f31c3f412e6276d2 (patch)
tree9589f437d79e204d49f0045056809f254656f7d0 /utils/lv2_inspect.c
parentd9b5f38ffb9c0d0a6841368e7d52a71b9819d087 (diff)
downloadlilv-6f8391945483823638c031d9f31c3f412e6276d2.tar.gz
lilv-6f8391945483823638c031d9f31c3f412e6276d2.tar.bz2
lilv-6f8391945483823638c031d9f31c3f412e6276d2.zip
New generic query API.
List presets in lv2_inspect. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@1932 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'utils/lv2_inspect.c')
-rw-r--r--utils/lv2_inspect.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c
index 9ceb54b..46abc22 100644
--- a/utils/lv2_inspect.c
+++ b/utils/lv2_inspect.c
@@ -205,6 +205,20 @@ print_plugin(SLV2Plugin p)
printf("\n");
slv2_values_free(features);
+
+ /* Presets */
+
+ SLV2Results presets = slv2_plugin_query_sparql(p, "\
+PREFIX lv2p: <http://lv2plug.in/ns/dev/presets#> \
+PREFIX dc: <http://dublincore.org/documents/dcmi-namespace/> \
+SELECT ?name WHERE { <> lv2p:hasPreset ?preset . ?preset dc:title ?name }");
+ if (!slv2_results_finished(presets))
+ printf("\tPresets: \n");
+ for (; !slv2_results_finished(presets); slv2_results_next(presets)) {
+ SLV2Value name = slv2_results_get_binding_value(presets, 0);
+ printf("\t %s\n", slv2_value_as_string(name));
+ }
+ slv2_results_free(presets);
/* Ports */