From 3760ff6900140d9bae6f811f8d13112862adc751 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 29 Apr 2011 02:46:53 +0000 Subject: Remove half-assed qname API. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3226 a436a847-0d15-0410-975c-d299462d15a1 --- utils/lv2_inspect.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'utils/lv2_inspect.c') diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c index b4a09d9..46176f5 100644 --- a/utils/lv2_inspect.c +++ b/utils/lv2_inspect.c @@ -24,12 +24,13 @@ #include "lilv-config.h" -LilvValue* event_class = NULL; -LilvValue* control_class = NULL; -LilvValue* in_group_pred = NULL; -LilvValue* role_pred = NULL; -LilvValue* preset_pred = NULL; -LilvValue* title_pred = NULL; +LilvValue* event_class = NULL; +LilvValue* control_class = NULL; +LilvValue* in_group_pred = NULL; +LilvValue* role_pred = NULL; +LilvValue* preset_pred = NULL; +LilvValue* title_pred = NULL; +LilvValue* supports_event_pred = NULL; void print_group(const LilvPlugin* p, @@ -72,8 +73,8 @@ print_port(const LilvPlugin* p, } if (lilv_port_is_a(p, port, event_class)) { - LilvValues* supported = lilv_port_get_value_by_qname(p, port, - "lv2ev:supportsEvent"); + LilvValues* supported = lilv_port_get_value( + p, port, supports_event_pred); if (lilv_values_size(supported) > 0) { printf("\n\t\tSupported events:\n"); LILV_FOREACH(values, i, supported) { @@ -324,13 +325,15 @@ main(int argc, char** argv) #define NS_DC "http://dublincore.org/documents/dcmi-namespace/" #define NS_PG "http://lv2plug.in/ns/ext/port-groups#" #define NS_PSET "http://lv2plug.in/ns/ext/presets#" - - control_class = lilv_new_uri(world, LILV_PORT_CLASS_CONTROL); - event_class = lilv_new_uri(world, LILV_PORT_CLASS_EVENT); - in_group_pred = lilv_new_uri(world, NS_PG "inGroup"); - preset_pred = lilv_new_uri(world, NS_PSET "hasPreset"); - role_pred = lilv_new_uri(world, NS_PG "role"); - title_pred = lilv_new_uri(world, NS_DC "title"); +#define NS_EV "http://lv2plug.in/ns/ext/event#" + + control_class = lilv_new_uri(world, LILV_PORT_CLASS_CONTROL); + event_class = lilv_new_uri(world, LILV_PORT_CLASS_EVENT); + in_group_pred = lilv_new_uri(world, NS_PG "inGroup"); + preset_pred = lilv_new_uri(world, NS_PSET "hasPreset"); + role_pred = lilv_new_uri(world, NS_PG "role"); + title_pred = lilv_new_uri(world, NS_DC "title"); + supports_event_pred = lilv_new_uri(world, NS_EV "supportsEvent"); if (argc != 2) { print_usage(); -- cgit v1.2.1