summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lilv/lilv.h17
-rw-r--r--lilv/lilvmm.hpp10
-rw-r--r--src/plugin.c2
-rw-r--r--src/pluginui.c2
-rw-r--r--src/value.c28
-rw-r--r--src/world.c6
-rw-r--r--test/lilv_test.c98
-rw-r--r--utils/lv2_inspect.c14
-rw-r--r--utils/lv2_jack_host.c18
9 files changed, 98 insertions, 97 deletions
diff --git a/lilv/lilv.h b/lilv/lilv.h
index ce0729d..a6b2297 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -103,7 +103,7 @@ lilv_uri_to_path(const char* uri);
*/
LILV_API
LilvValue*
-lilv_value_new_uri(LilvWorld* world, const char* uri);
+lilv_new_uri(LilvWorld* world, const char* uri);
/**
Create a new string value (with no language).
@@ -111,7 +111,7 @@ lilv_value_new_uri(LilvWorld* world, const char* uri);
*/
LILV_API
LilvValue*
-lilv_value_new_string(LilvWorld* world, const char* str);
+lilv_new_string(LilvWorld* world, const char* str);
/**
Create a new integer value.
@@ -119,7 +119,7 @@ lilv_value_new_string(LilvWorld* world, const char* str);
*/
LILV_API
LilvValue*
-lilv_value_new_int(LilvWorld* world, int val);
+lilv_new_int(LilvWorld* world, int val);
/**
Create a new floating point value.
@@ -127,7 +127,7 @@ lilv_value_new_int(LilvWorld* world, int val);
*/
LILV_API
LilvValue*
-lilv_value_new_float(LilvWorld* world, float val);
+lilv_new_float(LilvWorld* world, float val);
/**
Create a new boolean value.
@@ -135,7 +135,7 @@ lilv_value_new_float(LilvWorld* world, float val);
*/
LILV_API
LilvValue*
-lilv_value_new_bool(LilvWorld* world, bool val);
+lilv_new_bool(LilvWorld* world, bool val);
/**
Free an LilvValue.
@@ -1009,10 +1009,11 @@ lilv_port_is_a(const LilvPlugin* plugin,
/**
Get the default, minimum, and maximum values of a port.
+
@a def, @a min, and @a max are outputs, pass pointers to uninitialized
- (i.e. NOT created with lilv_value_new) LilvValue variables. These will
- be set to point at new values (which must be freed by the caller using
- lilv_value_free), or NULL if the value does not exist.
+ LilvValue* variables. These will be set to point at new values (which must
+ be freed by the caller using lilv_value_free), or NULL if the value does not
+ exist.
*/
LILV_API
void
diff --git a/lilv/lilvmm.hpp b/lilv/lilvmm.hpp
index 66a0276..3c2189a 100644
--- a/lilv/lilvmm.hpp
+++ b/lilv/lilvmm.hpp
@@ -130,19 +130,19 @@ struct World {
inline ~World() { /*lilv_world_free(me);*/ }
inline LilvValue* new_uri(const char* uri) {
- return lilv_value_new_uri(me, uri);
+ return lilv_new_uri(me, uri);
}
inline LilvValue* new_string(const char* str) {
- return lilv_value_new_string(me, str);
+ return lilv_new_string(me, str);
}
inline LilvValue* new_int(int val) {
- return lilv_value_new_int(me, val);
+ return lilv_new_int(me, val);
}
inline LilvValue* new_float(float val) {
- return lilv_value_new_float(me, val);
+ return lilv_new_float(me, val);
}
inline LilvValue* new_bool(bool val) {
- return lilv_value_new_bool(me, val);
+ return lilv_new_bool(me, val);
}
LILV_WRAP2_VOID(world, set_option, const char*, uri, LilvValue*, value);
diff --git a/src/plugin.c b/src/plugin.c
index b03205c..7ff47c5 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -449,7 +449,7 @@ lilv_plugin_get_value_by_qname(const LilvPlugin* p,
if (!pred_uri) {
return NULL;
}
- LilvValue* pred_value = lilv_value_new_uri(p->world, pred_uri);
+ LilvValue* pred_value = lilv_new_uri(p->world, pred_uri);
LilvValues* ret = lilv_plugin_get_value(p, pred_value);
lilv_value_free(pred_value);
diff --git a/src/pluginui.c b/src/pluginui.c
index b6fa60a..a2df5f2 100644
--- a/src/pluginui.c
+++ b/src/pluginui.c
@@ -41,7 +41,7 @@ lilv_ui_new(LilvWorld* world,
char* bundle = lilv_strdup(lilv_value_as_string(ui->binary_uri));
char* last_slash = strrchr(bundle, '/') + 1;
*last_slash = '\0';
- ui->bundle_uri = lilv_value_new_uri(world, bundle);
+ ui->bundle_uri = lilv_new_uri(world, bundle);
free(bundle);
ui->classes = lilv_values_new();
diff --git a/src/value.c b/src/value.c
index 3ede347..235a385 100644
--- a/src/value.c
+++ b/src/value.c
@@ -65,7 +65,7 @@ lilv_value_set_numerics_from_string(LilvValue* val)
* exact string value is known.
*/
LilvValue*
-lilv_value_new(LilvWorld* world, LilvValueType type, const char* str)
+lilv_new(LilvWorld* world, LilvValueType type, const char* str)
{
LilvValue* val = malloc(sizeof(struct LilvValueImpl));
val->world = world;
@@ -92,7 +92,7 @@ lilv_value_new(LilvWorld* world, LilvValueType type, const char* str)
/** Create a new LilvValue from @a node, or return NULL if impossible */
LilvValue*
-lilv_value_new_from_node(LilvWorld* world, const SordNode* node)
+lilv_new_from_node(LilvWorld* world, const SordNode* node)
{
LilvValue* result = NULL;
SordNode* datatype_uri = NULL;
@@ -120,7 +120,7 @@ lilv_value_new_from_node(LilvWorld* world, const SordNode* node)
else
LILV_ERRORF("Unknown datatype %s\n", sord_node_get_string(datatype_uri));
}
- result = lilv_value_new(world, type, (const char*)sord_node_get_string(node));
+ result = lilv_new(world, type, (const char*)sord_node_get_string(node));
switch (result->type) {
case LILV_VALUE_INT:
case LILV_VALUE_FLOAT:
@@ -132,7 +132,7 @@ lilv_value_new_from_node(LilvWorld* world, const SordNode* node)
break;
case SORD_BLANK:
type = LILV_VALUE_BLANK;
- result = lilv_value_new(world, type, (const char*)sord_node_get_string(node));
+ result = lilv_new(world, type, (const char*)sord_node_get_string(node));
break;
default:
assert(false);
@@ -143,45 +143,45 @@ lilv_value_new_from_node(LilvWorld* world, const SordNode* node)
LILV_API
LilvValue*
-lilv_value_new_uri(LilvWorld* world, const char* uri)
+lilv_new_uri(LilvWorld* world, const char* uri)
{
- return lilv_value_new(world, LILV_VALUE_URI, uri);
+ return lilv_new(world, LILV_VALUE_URI, uri);
}
LILV_API
LilvValue*
-lilv_value_new_string(LilvWorld* world, const char* str)
+lilv_new_string(LilvWorld* world, const char* str)
{
- return lilv_value_new(world, LILV_VALUE_STRING, str);
+ return lilv_new(world, LILV_VALUE_STRING, str);
}
LILV_API
LilvValue*
-lilv_value_new_int(LilvWorld* world, int val)
+lilv_new_int(LilvWorld* world, int val)
{
char str[32];
snprintf(str, sizeof(str), "%d", val);
- LilvValue* ret = lilv_value_new(world, LILV_VALUE_INT, str);
+ LilvValue* ret = lilv_new(world, LILV_VALUE_INT, str);
ret->val.int_val = val;
return ret;
}
LILV_API
LilvValue*
-lilv_value_new_float(LilvWorld* world, float val)
+lilv_new_float(LilvWorld* world, float val)
{
char str[32];
snprintf(str, sizeof(str), "%f", val);
- LilvValue* ret = lilv_value_new(world, LILV_VALUE_FLOAT, str);
+ LilvValue* ret = lilv_new(world, LILV_VALUE_FLOAT, str);
ret->val.float_val = val;
return ret;
}
LILV_API
LilvValue*
-lilv_value_new_bool(LilvWorld* world, bool val)
+lilv_new_bool(LilvWorld* world, bool val)
{
- LilvValue* ret = lilv_value_new(world, LILV_VALUE_BOOL, val ? "true" : "false");
+ LilvValue* ret = lilv_new(world, LILV_VALUE_BOOL, val ? "true" : "false");
ret->val.bool_val = val;
return ret;
}
diff --git a/src/world.c b/src/world.c
index 92f3ddc..e930964 100644
--- a/src/world.c
+++ b/src/world.c
@@ -60,7 +60,7 @@ lilv_world_new()
#define NS_DC (const uint8_t*)"http://dublincore.org/documents/dcmi-namespace/"
#define NEW_URI(uri) sord_new_uri(world->world, uri)
-#define NEW_URI_VAL(uri) lilv_value_new_uri(world, (const char*)(uri));
+#define NEW_URI_VAL(uri) lilv_new_uri(world, (const char*)(uri));
world->dc_replaces_node = NEW_URI(NS_DC "replaces");
world->dyn_manifest_node = NEW_URI(NS_DYNMAN "DynManifest");
@@ -325,7 +325,7 @@ lilv_world_add_plugin(LilvWorld* world,
// Add manifest as plugin data file (as if it were rdfs:seeAlso)
lilv_array_append(plugin->data_uris,
- lilv_value_new_uri(world, (const char*)manifest_uri->buf));
+ lilv_new_uri(world, (const char*)manifest_uri->buf));
// Set dynamic manifest library URI, if applicable
if (dyn_manifest_lib) {
@@ -569,7 +569,7 @@ lilv_world_load_directory(LilvWorld* world, const char* dir_path)
DIR* const bundle_dir = opendir(uri + file_scheme_len);
if (bundle_dir) {
closedir(bundle_dir);
- LilvValue* uri_val = lilv_value_new_uri(world, uri);
+ LilvValue* uri_val = lilv_new_uri(world, uri);
lilv_world_load_bundle(world, uri_val);
lilv_value_free(uri_val);
} else {
diff --git a/test/lilv_test.c b/test/lilv_test.c
index 3ebf128..9a42631 100644
--- a/test/lilv_test.c
+++ b/test/lilv_test.c
@@ -170,8 +170,8 @@ static LilvValue* plugin2_uri_value;
void
init_uris()
{
- plugin_uri_value = lilv_value_new_uri(world, uris_plugin);
- plugin2_uri_value = lilv_value_new_uri(world, "http://example.org/foobar");
+ plugin_uri_value = lilv_new_uri(world, uris_plugin);
+ plugin2_uri_value = lilv_new_uri(world, "http://example.org/foobar");
TEST_ASSERT(plugin_uri_value);
TEST_ASSERT(plugin2_uri_value);
}
@@ -215,10 +215,10 @@ test_value()
init_uris();
- LilvValue* uval = lilv_value_new_uri(world, "http://example.org");
- LilvValue* sval = lilv_value_new_string(world, "Foo");
- LilvValue* ival = lilv_value_new_int(world, 42);
- LilvValue* fval = lilv_value_new_float(world, 1.6180);
+ LilvValue* uval = lilv_new_uri(world, "http://example.org");
+ LilvValue* sval = lilv_new_string(world, "Foo");
+ LilvValue* ival = lilv_new_int(world, 42);
+ LilvValue* fval = lilv_new_float(world, 1.6180);
TEST_ASSERT(lilv_value_is_uri(uval));
TEST_ASSERT(lilv_value_is_string(sval));
@@ -248,14 +248,14 @@ test_value()
TEST_ASSERT(!strncmp(tok, "1.6180", 6));
free(tok);
- LilvValue* uval_e = lilv_value_new_uri(world, "http://example.org");
- LilvValue* sval_e = lilv_value_new_string(world, "Foo");
- LilvValue* ival_e = lilv_value_new_int(world, 42);
- LilvValue* fval_e = lilv_value_new_float(world, 1.6180);
- LilvValue* uval_ne = lilv_value_new_uri(world, "http://no-example.org");
- LilvValue* sval_ne = lilv_value_new_string(world, "Bar");
- LilvValue* ival_ne = lilv_value_new_int(world, 24);
- LilvValue* fval_ne = lilv_value_new_float(world, 3.14159);
+ LilvValue* uval_e = lilv_new_uri(world, "http://example.org");
+ LilvValue* sval_e = lilv_new_string(world, "Foo");
+ LilvValue* ival_e = lilv_new_int(world, 42);
+ LilvValue* fval_e = lilv_new_float(world, 1.6180);
+ LilvValue* uval_ne = lilv_new_uri(world, "http://no-example.org");
+ LilvValue* sval_ne = lilv_new_string(world, "Bar");
+ LilvValue* ival_ne = lilv_new_int(world, 24);
+ LilvValue* fval_ne = lilv_new_float(world, 3.14159);
TEST_ASSERT(lilv_value_equals(uval, uval_e));
TEST_ASSERT(lilv_value_equals(sval, sval_e));
@@ -274,7 +274,7 @@ test_value()
LilvValue* uval_dup = lilv_value_duplicate(uval);
TEST_ASSERT(lilv_value_equals(uval, uval_dup));
- LilvValue* ifval = lilv_value_new_float(world, 42.0);
+ LilvValue* ifval = lilv_new_float(world, 42.0);
TEST_ASSERT(!lilv_value_equals(ival, ifval));
lilv_value_free(ifval);
@@ -445,7 +445,7 @@ test_classes()
lilv_plugin_class_get_uri(plugin)));
}
- LilvValue* some_uri = lilv_value_new_uri(world, "http://example.org/whatever");
+ LilvValue* some_uri = lilv_new_uri(world, "http://example.org/whatever");
TEST_ASSERT(lilv_plugin_classes_get_by_uri(classes, some_uri) == NULL);
lilv_value_free(some_uri);
@@ -512,11 +512,11 @@ test_plugin()
snprintf(data_uri, TEST_PATH_MAX, "%s%s",
lilv_value_as_string(plug_bundle_uri), "plugin.ttl");
- LilvValue* manifest_uri_val = lilv_value_new_uri(world, manifest_uri);
+ LilvValue* manifest_uri_val = lilv_new_uri(world, manifest_uri);
TEST_ASSERT(lilv_values_contains(data_uris, manifest_uri_val));
lilv_value_free(manifest_uri_val);
- LilvValue* data_uri_val = lilv_value_new_uri(world, data_uri);
+ LilvValue* data_uri_val = lilv_new_uri(world, data_uri);
TEST_ASSERT(lilv_values_contains(data_uris, data_uri_val));
lilv_value_free(data_uri_val);
@@ -531,13 +531,13 @@ test_plugin()
TEST_ASSERT(maxs[0] == 1.0f);
TEST_ASSERT(defs[0] == 0.5f);
- LilvValue* audio_class = lilv_value_new_uri(world,
+ LilvValue* audio_class = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#AudioPort");
- LilvValue* control_class = lilv_value_new_uri(world,
+ LilvValue* control_class = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#ControlPort");
- LilvValue* in_class = lilv_value_new_uri(world,
+ LilvValue* in_class = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#InputPort");
- LilvValue* out_class = lilv_value_new_uri(world,
+ LilvValue* out_class = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#OutputPort");
TEST_ASSERT(lilv_plugin_get_num_ports_of_class(plug, control_class, NULL) == 3);
@@ -552,11 +552,11 @@ test_plugin()
TEST_ASSERT(lilv_plugin_has_latency(plug));
TEST_ASSERT(lilv_plugin_get_latency_port_index(plug) == 2);
- LilvValue* rt_feature = lilv_value_new_uri(world,
+ LilvValue* rt_feature = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#hardRTCapable");
- LilvValue* event_feature = lilv_value_new_uri(world,
+ LilvValue* event_feature = lilv_new_uri(world,
"http://lv2plug.in/ns/ext/event");
- LilvValue* pretend_feature = lilv_value_new_uri(world,
+ LilvValue* pretend_feature = lilv_new_uri(world,
"http://example.org/solvesWorldHunger");
TEST_ASSERT(lilv_plugin_has_feature(plug, rt_feature));
@@ -577,21 +577,21 @@ test_plugin()
lilv_values_free(required);
lilv_values_free(optional);
- LilvValue* foo_p = lilv_value_new_uri(world, "http://example.org/foo");
+ LilvValue* foo_p = lilv_new_uri(world, "http://example.org/foo");
LilvValues* foos = lilv_plugin_get_value(plug, foo_p);
TEST_ASSERT(lilv_values_size(foos) == 1);
TEST_ASSERT(fabs(lilv_value_as_float(lilv_values_get_first(foos)) - 1.6180) < FLT_EPSILON);
lilv_value_free(foo_p);
lilv_values_free(foos);
- LilvValue* bar_p = lilv_value_new_uri(world, "http://example.org/bar");
+ LilvValue* bar_p = lilv_new_uri(world, "http://example.org/bar");
LilvValues* bars = lilv_plugin_get_value(plug, bar_p);
TEST_ASSERT(lilv_values_size(bars) == 1);
TEST_ASSERT(lilv_value_as_bool(lilv_values_get_first(bars)) == true);
lilv_value_free(bar_p);
lilv_values_free(bars);
- LilvValue* baz_p = lilv_value_new_uri(world, "http://example.org/baz");
+ LilvValue* baz_p = lilv_new_uri(world, "http://example.org/baz");
LilvValues* bazs = lilv_plugin_get_value(plug, baz_p);
TEST_ASSERT(lilv_values_size(bazs) == 1);
TEST_ASSERT(lilv_value_as_bool(lilv_values_get_first(bazs)) == false);
@@ -610,8 +610,8 @@ test_plugin()
TEST_ASSERT(!strcmp(lilv_value_as_string(author_homepage), "http://drobilla.net"));
lilv_value_free(author_homepage);
- LilvValue* thing_uri = lilv_value_new_uri(world, "http://example.org/thing");
- LilvValue* name_p = lilv_value_new_uri(world, "http://usefulinc.com/ns/doap#name");
+ LilvValue* thing_uri = lilv_new_uri(world, "http://example.org/thing");
+ LilvValue* name_p = lilv_new_uri(world, "http://usefulinc.com/ns/doap#name");
LilvValues* thing_names = lilv_plugin_get_value_for_subject(plug, thing_uri, name_p);
TEST_ASSERT(lilv_values_size(thing_names) == 1);
LilvValue* thing_name = lilv_values_get_first(thing_names);
@@ -669,7 +669,7 @@ test_port()
const LilvPlugin* plug = lilv_plugins_get_by_uri(plugins, plugin_uri_value);
TEST_ASSERT(plug);
- LilvValue* psym = lilv_value_new_string(world, "foo");
+ LilvValue* psym = lilv_new_string(world, "foo");
const LilvPort* p = lilv_plugin_get_port_by_index(plug, 0);
const LilvPort* p2 = lilv_plugin_get_port_by_symbol(plug, psym);
lilv_value_free(psym);
@@ -677,16 +677,16 @@ test_port()
TEST_ASSERT(p2 != NULL);
TEST_ASSERT(p == p2);
- LilvValue* nopsym = lilv_value_new_string(world, "thisaintnoportfoo");
+ LilvValue* nopsym = lilv_new_string(world, "thisaintnoportfoo");
const LilvPort* p3 = lilv_plugin_get_port_by_symbol(plug, nopsym);
TEST_ASSERT(p3 == NULL);
lilv_value_free(nopsym);
- LilvValue* audio_class = lilv_value_new_uri(world,
+ LilvValue* audio_class = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#AudioPort");
- LilvValue* control_class = lilv_value_new_uri(world,
+ LilvValue* control_class = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#ControlPort");
- LilvValue* in_class = lilv_value_new_uri(world,
+ LilvValue* in_class = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#InputPort");
TEST_ASSERT(lilv_values_size(lilv_port_get_classes(plug, p)) == 2);
@@ -747,7 +747,7 @@ test_port()
TEST_ASSERT(!strcmp(lilv_value_as_string(lilv_scale_point_get_label(sp1)), "Cos"));
TEST_ASSERT(lilv_value_as_float(lilv_scale_point_get_value(sp1)) == 4);
- LilvValue* homepage_p = lilv_value_new_uri(world, "http://usefulinc.com/ns/doap#homepage");
+ LilvValue* homepage_p = lilv_new_uri(world, "http://usefulinc.com/ns/doap#homepage");
LilvValues* homepages = lilv_plugin_get_value(plug, homepage_p);
TEST_ASSERT(lilv_values_size(homepages) == 1);
TEST_ASSERT(!strcmp(lilv_value_as_string(lilv_values_get_first(homepages)),
@@ -762,28 +762,28 @@ test_port()
TEST_ASSERT(lilv_value_as_float(min) == -1.0);
TEST_ASSERT(lilv_value_as_float(max) == 1.0);
- LilvValue* integer_prop = lilv_value_new_uri(world, "http://lv2plug.in/ns/lv2core#integer");
- LilvValue* toggled_prop = lilv_value_new_uri(world, "http://lv2plug.in/ns/lv2core#toggled");
+ LilvValue* integer_prop = lilv_new_uri(world, "http://lv2plug.in/ns/lv2core#integer");
+ LilvValue* toggled_prop = lilv_new_uri(world, "http://lv2plug.in/ns/lv2core#toggled");
TEST_ASSERT(lilv_port_has_property(plug, p, integer_prop));
TEST_ASSERT(!lilv_port_has_property(plug, p, toggled_prop));
const LilvPort* ep = lilv_plugin_get_port_by_index(plug, 1);
- LilvValue* event_type = lilv_value_new_uri(world, "http://example.org/event");
- LilvValue* event_type_2 = lilv_value_new_uri(world, "http://example.org/otherEvent");
+ LilvValue* event_type = lilv_new_uri(world, "http://example.org/event");
+ LilvValue* event_type_2 = lilv_new_uri(world, "http://example.org/otherEvent");
TEST_ASSERT(lilv_port_supports_event(plug, ep, event_type));
TEST_ASSERT(!lilv_port_supports_event(plug, ep, event_type_2));
- LilvValue* name_p = lilv_value_new_uri(world, "http://lv2plug.in/ns/lv2core#name");
+ LilvValue* name_p = lilv_new_uri(world, "http://lv2plug.in/ns/lv2core#name");
LilvValues* names = lilv_port_get_value(plug, p, name_p);
TEST_ASSERT(lilv_values_size(names) == 1);
TEST_ASSERT(!strcmp(lilv_value_as_string(lilv_values_get_first(names)),
"store"));
lilv_values_free(names);
- LilvValue* true_val = lilv_value_new_bool(world, true);
- LilvValue* false_val = lilv_value_new_bool(world, false);
+ LilvValue* true_val = lilv_new_bool(world, true);
+ LilvValue* false_val = lilv_new_bool(world, false);
lilv_world_set_option(world, LILV_OPTION_FILTER_LANG, false_val);
names = lilv_port_get_value(plug, p, name_p);
@@ -870,10 +870,10 @@ test_ui()
const LilvUI* ui0 = lilv_uis_get(uis, lilv_uis_begin(uis));
TEST_ASSERT(ui0);
- LilvValue* ui_uri = lilv_value_new_uri(world, "http://example.org/ui");
- LilvValue* ui2_uri = lilv_value_new_uri(world, "http://example.org/ui3");
- LilvValue* ui3_uri = lilv_value_new_uri(world, "http://example.org/ui4");
- LilvValue* noui_uri = lilv_value_new_uri(world, "http://example.org/notaui");
+ LilvValue* ui_uri = lilv_new_uri(world, "http://example.org/ui");
+ LilvValue* ui2_uri = lilv_new_uri(world, "http://example.org/ui3");
+ LilvValue* ui3_uri = lilv_new_uri(world, "http://example.org/ui4");
+ LilvValue* noui_uri = lilv_new_uri(world, "http://example.org/notaui");
const LilvUI* ui0_2 = lilv_uis_get_by_uri(uis, ui_uri);
TEST_ASSERT(ui0 == ui0_2);
@@ -890,7 +890,7 @@ test_ui()
const LilvValues* classes = lilv_ui_get_classes(ui0);
TEST_ASSERT(lilv_values_size(classes) == 1);
- LilvValue* ui_class_uri = lilv_value_new_uri(world,
+ LilvValue* ui_class_uri = lilv_new_uri(world,
"http://lv2plug.in/ns/extensions/ui#GtkUI");
TEST_ASSERT(lilv_value_equals(lilv_values_get_first(classes), ui_class_uri));
@@ -906,7 +906,7 @@ test_ui()
const LilvValue* ui_binary_uri = lilv_ui_get_binary_uri(ui0);
- LilvValue* expected_uri = lilv_value_new_uri(world, ui_binary_uri_str);
+ LilvValue* expected_uri = lilv_new_uri(world, ui_binary_uri_str);
TEST_ASSERT(lilv_value_equals(expected_uri, ui_binary_uri));
free(ui_binary_uri_str);
diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c
index 453f37f..b4a09d9 100644
--- a/utils/lv2_inspect.c
+++ b/utils/lv2_inspect.c
@@ -325,12 +325,12 @@ main(int argc, char** argv)
#define NS_PG "http://lv2plug.in/ns/ext/port-groups#"
#define NS_PSET "http://lv2plug.in/ns/ext/presets#"
- control_class = lilv_value_new_uri(world, LILV_PORT_CLASS_CONTROL);
- event_class = lilv_value_new_uri(world, LILV_PORT_CLASS_EVENT);
- in_group_pred = lilv_value_new_uri(world, NS_PG "inGroup");
- preset_pred = lilv_value_new_uri(world, NS_PSET "hasPreset");
- role_pred = lilv_value_new_uri(world, NS_PG "role");
- title_pred = lilv_value_new_uri(world, NS_DC "title");
+ 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");
if (argc != 2) {
print_usage();
@@ -353,7 +353,7 @@ main(int argc, char** argv)
}
const LilvPlugins* plugins = lilv_world_get_all_plugins(world);
- LilvValue* uri = lilv_value_new_uri(world, argv[1]);
+ LilvValue* uri = lilv_new_uri(world, argv[1]);
const LilvPlugin* p = lilv_plugins_get_by_uri(plugins, uri);
diff --git a/utils/lv2_jack_host.c b/utils/lv2_jack_host.c
index 1bdfe61..24e1c1a 100644
--- a/utils/lv2_jack_host.c
+++ b/utils/lv2_jack_host.c
@@ -310,14 +310,14 @@ main(int argc, char** argv)
const LilvPlugins* plugins = lilv_world_get_all_plugins(world);
/* Set up the port classes this app supports */
- host.input_class = lilv_value_new_uri(world, LILV_PORT_CLASS_INPUT);
- host.output_class = lilv_value_new_uri(world, LILV_PORT_CLASS_OUTPUT);
- host.control_class = lilv_value_new_uri(world, LILV_PORT_CLASS_CONTROL);
- host.audio_class = lilv_value_new_uri(world, LILV_PORT_CLASS_AUDIO);
- host.event_class = lilv_value_new_uri(world, LILV_PORT_CLASS_EVENT);
- host.midi_class = lilv_value_new_uri(world, LILV_EVENT_CLASS_MIDI);
- host.optional = lilv_value_new_uri(world, LILV_NAMESPACE_LV2
- "connectionOptional");
+ host.input_class = lilv_new_uri(world, LILV_PORT_CLASS_INPUT);
+ host.output_class = lilv_new_uri(world, LILV_PORT_CLASS_OUTPUT);
+ host.control_class = lilv_new_uri(world, LILV_PORT_CLASS_CONTROL);
+ host.audio_class = lilv_new_uri(world, LILV_PORT_CLASS_AUDIO);
+ host.event_class = lilv_new_uri(world, LILV_PORT_CLASS_EVENT);
+ host.midi_class = lilv_new_uri(world, LILV_EVENT_CLASS_MIDI);
+ host.optional = lilv_new_uri(world, LILV_NAMESPACE_LV2
+ "connectionOptional");
#ifdef LILV_JACK_SESSION
if (argc != 2 && argc != 3) {
@@ -334,7 +334,7 @@ main(int argc, char** argv)
printf("Plugin: %s\n", plugin_uri_str);
- LilvValue* plugin_uri = lilv_value_new_uri(world, plugin_uri_str);
+ LilvValue* plugin_uri = lilv_new_uri(world, plugin_uri_str);
host.plugin = lilv_plugins_get_by_uri(plugins, plugin_uri);
lilv_value_free(plugin_uri);