summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-16 01:16:32 +0000
committerDavid Robillard <d@drobilla.net>2011-02-16 01:16:32 +0000
commit4cc15fb56f579e7eab9e0b947c433b96bc4c26f8 (patch)
treefeb005fcf32b46e5e39cc919f31939d54f94b236
parentb9f9dac34231a12828d5427f54fc41be57eefaa5 (diff)
downloadlilv-4cc15fb56f579e7eab9e0b947c433b96bc4c26f8.tar.gz
lilv-4cc15fb56f579e7eab9e0b947c433b96bc4c26f8.tar.bz2
lilv-4cc15fb56f579e7eab9e0b947c433b96bc4c26f8.zip
Update for new Sord API.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2955 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/plugin.c24
-rw-r--r--src/port.c6
-rw-r--r--src/query.c2
-rw-r--r--src/value.c4
-rw-r--r--src/world.c6
5 files changed, 20 insertions, 22 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 7e639d9..773f3de 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -469,7 +469,7 @@ slv2_plugin_get_value_for_subject(SLV2Plugin p,
SLV2Node subject_node = (slv2_value_is_uri(subject))
? slv2_node_copy(subject->val.uri_val)
- : sord_get_blank(p->world->model, false,
+ : sord_new_blank(p->world->model,
(const uint8_t*)slv2_value_as_blank(subject));
if (!subject_node) {
@@ -701,8 +701,8 @@ slv2_plugin_get_port_by_symbol(SLV2Plugin p,
static SLV2Node
slv2_plugin_get_author(SLV2Plugin p)
{
- SLV2Node doap_maintainer = sord_get_uri(
- p->world->model, true, NS_DOAP "maintainer");
+ SLV2Node doap_maintainer = sord_new_uri(
+ p->world->model, NS_DOAP "maintainer");
SLV2Matches maintainers = slv2_plugin_find_statements(
p,
@@ -729,8 +729,8 @@ slv2_plugin_get_author_name(SLV2Plugin plugin)
SLV2Node author = slv2_plugin_get_author(plugin);
if (author) {
return slv2_plugin_get_one(
- plugin, author, sord_get_uri(
- plugin->world->model, true, NS_FOAF "name"));
+ plugin, author, sord_new_uri(
+ plugin->world->model, NS_FOAF "name"));
}
return NULL;
}
@@ -742,8 +742,8 @@ slv2_plugin_get_author_email(SLV2Plugin plugin)
SLV2Node author = slv2_plugin_get_author(plugin);
if (author) {
return slv2_plugin_get_one(
- plugin, author, sord_get_uri(
- plugin->world->model, true, NS_FOAF "mbox"));
+ plugin, author, sord_new_uri(
+ plugin->world->model, NS_FOAF "mbox"));
}
return NULL;
}
@@ -755,8 +755,8 @@ slv2_plugin_get_author_homepage(SLV2Plugin plugin)
SLV2Node author = slv2_plugin_get_author(plugin);
if (author) {
return slv2_plugin_get_one(
- plugin, author, sord_get_uri(
- plugin->world->model, true, NS_FOAF "homepage"));
+ plugin, author, sord_new_uri(
+ plugin->world->model, NS_FOAF "homepage"));
}
return NULL;
}
@@ -768,11 +768,9 @@ slv2_plugin_get_uis(SLV2Plugin p)
{
#define NS_UI (const uint8_t*)"http://lv2plug.in/ns/extensions/ui#"
- SLV2Node ui_ui = sord_get_uri(
- p->world->model, true, NS_UI "ui");
+ SLV2Node ui_ui = sord_new_uri(p->world->model, NS_UI "ui");
- SLV2Node ui_binary_node = sord_get_uri(
- p->world->model, true, NS_UI "binary");
+ SLV2Node ui_binary_node = sord_new_uri(p->world->model, NS_UI "binary");
SLV2UIs result = slv2_uis_new();
SLV2Matches uis = slv2_plugin_find_statements(
diff --git a/src/port.c b/src/port.c
index bcd599c..49e0d45 100644
--- a/src/port.c
+++ b/src/port.c
@@ -120,7 +120,7 @@ slv2_port_supports_event(SLV2Plugin p,
SLV2Matches results = slv2_plugin_find_statements(
p,
port_node,
- sord_get_uri(p->world->model, true, NS_EV "supportsEvent"),
+ sord_new_uri(p->world->model, NS_EV "supportsEvent"),
slv2_value_as_node(event));
const bool ret = !slv2_matches_end(results);
@@ -144,7 +144,7 @@ slv2_port_get_value_by_qname(SLV2Plugin p,
SLV2Matches results = slv2_plugin_find_statements(
p,
port_node,
- sord_get_uri(p->world->model, true, pred_uri),
+ sord_new_uri(p->world->model, pred_uri),
NULL);
free(pred_uri);
@@ -266,7 +266,7 @@ slv2_port_get_scale_points(SLV2Plugin p,
SLV2Matches points = slv2_plugin_find_statements(
p,
port_node,
- sord_get_uri(p->world->model, true, SLV2_NS_LV2 "scalePoint"),
+ sord_new_uri(p->world->model, SLV2_NS_LV2 "scalePoint"),
NULL);
SLV2ScalePoints ret = NULL;
diff --git a/src/query.c b/src/query.c
index 2f5875e..0f6aaad 100644
--- a/src/query.c
+++ b/src/query.c
@@ -77,7 +77,7 @@ slv2_values_from_stream_objects_i18n(SLV2Plugin p,
FOREACH_MATCH(stream) {
SLV2Node value = slv2_match_object(stream);
if (sord_node_get_type(value) == SORD_LITERAL) {
- const char* lang = sord_literal_get_lang(value);
+ const char* lang = sord_node_get_language(value);
SLV2LangMatch lm = SLV2_LANG_MATCH_NONE;
if (lang) {
lm = (syslang)
diff --git a/src/value.c b/src/value.c
index 81def9e..51ff1a1 100644
--- a/src/value.c
+++ b/src/value.c
@@ -74,7 +74,7 @@ slv2_value_new(SLV2World world, SLV2ValueType type, const char* str)
switch (type) {
case SLV2_VALUE_URI:
- val->val.uri_val = sord_get_uri(world->model, true, (const uint8_t*)str);
+ val->val.uri_val = sord_new_uri(world->model, (const uint8_t*)str);
assert(val->val.uri_val);
val->str_val = (char*)sord_node_get_string(val->val.uri_val);
break;
@@ -108,7 +108,7 @@ slv2_value_new_from_node(SLV2World world, SordNode node)
result->str_val = (char*)sord_node_get_string(result->val.uri_val);
break;
case SORD_LITERAL:
- datatype_uri = sord_literal_get_datatype(node);
+ datatype_uri = sord_node_get_datatype(node);
if (datatype_uri) {
if (sord_node_equals(datatype_uri, world->xsd_boolean_node))
type = SLV2_VALUE_BOOL;
diff --git a/src/world.c b/src/world.c
index d24bad6..8ef301b 100644
--- a/src/world.c
+++ b/src/world.c
@@ -55,9 +55,9 @@ slv2_world_new()
#define NS_DYNMAN (const uint8_t*)"http://lv2plug.in/ns/ext/dynmanifest#"
-#define NEW_URI(uri) sord_get_uri(world->model, true, uri)
+#define NEW_URI(uri) sord_new_uri(world->model, uri)
#define NEW_URI_VAL(uri) slv2_value_new_from_node( \
- world,sord_get_uri(world->model, true, uri));
+ world, sord_new_uri(world->model, uri));
world->dyn_manifest_node = NEW_URI(NS_DYNMAN "DynManifest");
world->lv2_specification_node = NEW_URI(SLV2_NS_LV2 "Specification");
@@ -430,7 +430,7 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri)
SordQuad see_also_tup = {
slv2_node_copy(spec),
world->rdfs_seealso_node,
- sord_get_uri(world->model, true, manifest_uri.buf),
+ sord_new_uri(world->model, manifest_uri.buf),
NULL
};
sord_add(world->model, see_also_tup);