diff options
author | David Robillard <d@drobilla.net> | 2011-04-29 02:46:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-29 02:46:53 +0000 |
commit | 3760ff6900140d9bae6f811f8d13112862adc751 (patch) | |
tree | c166c4bca4b7eeba5967c691619f0df36f6aa113 /utils | |
parent | c1c9e8fd70ba0e8f377ffc551c817ecd8dee796e (diff) | |
download | lilv-3760ff6900140d9bae6f811f8d13112862adc751.tar.gz lilv-3760ff6900140d9bae6f811f8d13112862adc751.tar.bz2 lilv-3760ff6900140d9bae6f811f8d13112862adc751.zip |
Remove half-assed qname API.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3226 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lv2_inspect.c | 33 |
1 files changed, 18 insertions, 15 deletions
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(); |