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 /src/plugin.c | |
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 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/src/plugin.c b/src/plugin.c index 7ff47c5..e91317f 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -383,7 +383,9 @@ LILV_API bool lilv_plugin_verify(const LilvPlugin* plugin) { - LilvValues* results = lilv_plugin_get_value_by_qname(plugin, "rdf:type"); + LilvValue* rdf_type = lilv_new_uri(plugin->world, LILV_NS_RDF "type"); + LilvValues* results = lilv_plugin_get_value(plugin, rdf_type); + lilv_value_free(rdf_type); if (!results) { return false; } @@ -395,13 +397,9 @@ lilv_plugin_verify(const LilvPlugin* plugin) } lilv_values_free(results); - results = lilv_plugin_get_value_by_qname(plugin, "doap:license"); - if (!results) { - return false; - } - - lilv_values_free(results); - results = lilv_plugin_get_value_by_qname(plugin, "lv2:port"); + LilvValue* lv2_port = lilv_new_uri(plugin->world, LILV_NS_LV2 "port"); + results = lilv_plugin_get_value(plugin, lv2_port); + lilv_value_free(lv2_port); if (!results) { return false; } @@ -442,23 +440,6 @@ lilv_plugin_get_value(const LilvPlugin* p, LILV_API LilvValues* -lilv_plugin_get_value_by_qname(const LilvPlugin* p, - const char* predicate) -{ - char* pred_uri = (char*)lilv_qname_expand(p, predicate); - if (!pred_uri) { - return NULL; - } - LilvValue* pred_value = lilv_new_uri(p->world, pred_uri); - LilvValues* ret = lilv_plugin_get_value(p, pred_value); - - lilv_value_free(pred_value); - free(pred_uri); - return ret; -} - -LILV_API -LilvValues* lilv_plugin_get_value_for_subject(const LilvPlugin* p, const LilvValue* subject, const LilvValue* predicate) @@ -657,14 +638,14 @@ LILV_API LilvValues* lilv_plugin_get_optional_features(const LilvPlugin* p) { - return lilv_plugin_get_value_by_qname(p, "lv2:optionalFeature"); + return lilv_plugin_get_value(p, p->world->lv2_optionalFeature_val); } LILV_API LilvValues* lilv_plugin_get_required_features(const LilvPlugin* p) { - return lilv_plugin_get_value_by_qname(p, "lv2:requiredFeature"); + return lilv_plugin_get_value(p, p->world->lv2_requiredFeature_val); } LILV_API |