summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-29 16:09:20 +0000
committerDavid Robillard <d@drobilla.net>2011-04-29 16:09:20 +0000
commit22f4ed918d99c17cd3bb8890eeaac173060394bf (patch)
treeb7b2357c1ddffc43a9b70535b59958977cebea39
parent94e46eab73854967d643b47a7140c2bcbccc0425 (diff)
downloadlilv-22f4ed918d99c17cd3bb8890eeaac173060394bf.tar.gz
lilv-22f4ed918d99c17cd3bb8890eeaac173060394bf.tar.bz2
lilv-22f4ed918d99c17cd3bb8890eeaac173060394bf.zip
Remove LilvNode and LilvMatches typedefs for Sord stuff.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3233 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/lilv_internal.h53
-rw-r--r--src/plugin.c54
-rw-r--r--src/pluginclass.c8
-rw-r--r--src/port.c28
-rw-r--r--src/query.c20
-rw-r--r--src/value.c2
-rw-r--r--src/world.c94
7 files changed, 128 insertions, 131 deletions
diff --git a/src/lilv_internal.h b/src/lilv_internal.h
index 6b118ee..774f5fd 100644
--- a/src/lilv_internal.h
+++ b/src/lilv_internal.h
@@ -55,28 +55,25 @@ static inline char* dlerror(void) { return "Unknown error"; }
#define LILV_NS_XSD "http://www.w3.org/2001/XMLSchema#"
#define LILV_NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-typedef SordIter* LilvMatches;
-typedef const SordNode* LilvNode;
-
#define FOREACH_MATCH(iter) \
for (; !sord_iter_end(iter); sord_iter_next(iter))
static inline const SordNode*
-lilv_match_subject(LilvMatches iter) {
+lilv_match_subject(SordIter* iter) {
SordQuad tup;
sord_iter_get(iter, tup);
return tup[SORD_SUBJECT];
}
static inline const SordNode*
-lilv_match_object(LilvMatches iter) {
+lilv_match_object(SordIter* iter) {
SordQuad tup;
sord_iter_get(iter, tup);
return tup[SORD_OBJECT];
}
static inline void
-lilv_match_end(LilvMatches iter)
+lilv_match_end(SordIter* iter)
{
sord_iter_free(iter);
}
@@ -139,8 +136,8 @@ void lilv_plugin_free(LilvPlugin* plugin);
LilvValue*
lilv_plugin_get_unique(const LilvPlugin* p,
- LilvNode subject,
- LilvNode predicate);
+ const SordNode* subject,
+ const SordNode* predicate);
/* ********* Plugins ********* */
@@ -194,10 +191,10 @@ struct LilvPluginClassImpl {
LilvValue* label;
};
-LilvPluginClass* lilv_plugin_class_new(LilvWorld* world,
- LilvNode parent_uri,
- LilvNode uri,
- const char* label);
+LilvPluginClass* lilv_plugin_class_new(LilvWorld* world,
+ const SordNode* parent_uri,
+ const SordNode* uri,
+ const char* label);
void lilv_plugin_class_free(LilvPluginClass* plugin_class);
@@ -304,8 +301,8 @@ struct LilvValueImpl {
};
LilvValue* lilv_value_new(LilvWorld* world, LilvValueType type, const char* val);
-LilvValue* lilv_value_new_from_node(LilvWorld* world, LilvNode node);
-LilvNode lilv_value_as_node(const LilvValue* value);
+LilvValue* lilv_value_new_from_node(LilvWorld* world, const SordNode* node);
+const SordNode* lilv_value_as_node(const LilvValue* value);
int
lilv_header_compare_by_uri(const void* a, const void* b, void* user_data);
@@ -324,7 +321,7 @@ lilv_array_append(GSequence* seq, void* value) {
struct LilvHeader*
lilv_sequence_get_by_uri(const GSequence* seq, const LilvValue* uri);
-static inline SordNode* lilv_node_copy(LilvNode node) {
+static inline SordNode* lilv_node_copy(const SordNode* node) {
return sord_node_copy(node);
}
@@ -344,28 +341,28 @@ void lilv_scale_point_free(LilvScalePoint* point);
/* ********* Query Results ********* */
-LilvMatches
-lilv_world_query(LilvWorld* world,
- LilvNode subject,
- LilvNode predicate,
- LilvNode object);
+SordIter*
+lilv_world_query(LilvWorld* world,
+ const SordNode* subject,
+ const SordNode* predicate,
+ const SordNode* object);
LilvValues*
-lilv_world_query_values(LilvWorld* world,
- LilvNode subject,
- LilvNode predicate,
- LilvNode object);
+lilv_world_query_values(LilvWorld* world,
+ const SordNode* subject,
+ const SordNode* predicate,
+ const SordNode* object);
-static inline bool lilv_matches_next(LilvMatches matches) {
+static inline bool lilv_matches_next(SordIter* matches) {
return sord_iter_next(matches);
}
-static inline bool lilv_matches_end(LilvMatches matches) {
+static inline bool lilv_matches_end(SordIter* matches) {
return sord_iter_end(matches);
}
-LilvValues* lilv_values_from_stream_objects(LilvWorld* w,
- LilvMatches stream);
+LilvValues* lilv_values_from_stream_objects(LilvWorld* w,
+ SordIter* stream);
/* ********* Utilities ********* */
diff --git a/src/plugin.c b/src/plugin.c
index 224cd97..3703ed6 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -82,7 +82,7 @@ lilv_plugin_free(LilvPlugin* p)
}
LilvValue*
-lilv_plugin_get_unique(const LilvPlugin* p, LilvNode subject, LilvNode predicate)
+lilv_plugin_get_unique(const LilvPlugin* p, const SordNode* subject, const SordNode* predicate)
{
LilvValues* values = lilv_world_query_values(p->world,
subject, predicate, NULL);
@@ -97,7 +97,7 @@ lilv_plugin_get_unique(const LilvPlugin* p, LilvNode subject, LilvNode predicate
}
static LilvValue*
-lilv_plugin_get_one(const LilvPlugin* p, LilvNode subject, LilvNode predicate)
+lilv_plugin_get_one(const LilvPlugin* p, const SordNode* subject, const SordNode* predicate)
{
LilvValues* values = lilv_world_query_values(p->world,
subject, predicate, NULL);
@@ -177,7 +177,7 @@ lilv_plugin_load_ports_if_necessary(const LilvPlugin* const_p)
p->ports = malloc(sizeof(LilvPort*));
p->ports[0] = NULL;
- LilvMatches ports = lilv_world_query(
+ SordIter* ports = lilv_world_query(
p->world,
p->plugin_uri->val.uri_val,
p->world->lv2_port_node,
@@ -185,7 +185,7 @@ lilv_plugin_load_ports_if_necessary(const LilvPlugin* const_p)
FOREACH_MATCH(ports) {
LilvValue* index = NULL;
- LilvNode port = lilv_match_object(ports);
+ const SordNode* port = lilv_match_object(ports);
LilvValue* symbol = lilv_plugin_get_unique(
p, port, p->world->lv2_symbol_node);
@@ -222,10 +222,10 @@ lilv_plugin_load_ports_if_necessary(const LilvPlugin* const_p)
p->ports[this_index] = this_port;
}
- LilvMatches types = lilv_world_query(
+ SordIter* types = lilv_world_query(
p->world, port, p->world->rdf_a_node, NULL);
FOREACH_MATCH(types) {
- LilvNode type = lilv_match_object(types);
+ const SordNode* type = lilv_match_object(types);
if (sord_node_get_type(type) == SORD_URI) {
lilv_array_append(
this_port->classes,
@@ -286,13 +286,13 @@ lilv_plugin_get_library_uri(const LilvPlugin* const_p)
lilv_plugin_load_if_necessary(p);
if (!p->binary_uri) {
// <plugin> lv2:binary ?binary
- LilvMatches results = lilv_world_query(
+ SordIter* results = lilv_world_query(
p->world,
p->plugin_uri->val.uri_val,
p->world->lv2_binary_node,
NULL);
FOREACH_MATCH(results) {
- LilvNode binary_node = lilv_match_object(results);
+ const SordNode* binary_node = lilv_match_object(results);
if (sord_node_get_type(binary_node) == SORD_URI) {
p->binary_uri = lilv_value_new_from_node(p->world, binary_node);
break;
@@ -322,13 +322,13 @@ lilv_plugin_get_class(const LilvPlugin* const_p)
lilv_plugin_load_if_necessary(p);
if (!p->plugin_class) {
// <plugin> a ?class
- LilvMatches results = lilv_world_query(
+ SordIter* results = lilv_world_query(
p->world,
p->plugin_uri->val.uri_val,
p->world->rdf_a_node,
NULL);
FOREACH_MATCH(results) {
- LilvNode class_node = lilv_match_object(results);
+ const SordNode* class_node = lilv_match_object(results);
if (sord_node_get_type(class_node) != SORD_URI) {
continue;
}
@@ -520,7 +520,7 @@ bool
lilv_plugin_has_latency(const LilvPlugin* p)
{
lilv_plugin_load_if_necessary(p);
- LilvMatches ports = lilv_world_query(
+ SordIter* ports = lilv_world_query(
p->world,
p->plugin_uri->val.uri_val,
p->world->lv2_port_node,
@@ -528,8 +528,8 @@ lilv_plugin_has_latency(const LilvPlugin* p)
bool ret = false;
FOREACH_MATCH(ports) {
- LilvNode port = lilv_match_object(ports);
- LilvMatches reports_latency = lilv_world_query(
+ const SordNode* port = lilv_match_object(ports);
+ SordIter* reports_latency = lilv_world_query(
p->world,
port,
p->world->lv2_portproperty_node,
@@ -551,7 +551,7 @@ uint32_t
lilv_plugin_get_latency_port_index(const LilvPlugin* p)
{
lilv_plugin_load_if_necessary(p);
- LilvMatches ports = lilv_world_query(
+ SordIter* ports = lilv_world_query(
p->world,
p->plugin_uri->val.uri_val,
p->world->lv2_port_node,
@@ -559,8 +559,8 @@ lilv_plugin_get_latency_port_index(const LilvPlugin* p)
uint32_t ret = 0;
FOREACH_MATCH(ports) {
- LilvNode port = lilv_match_object(ports);
- LilvMatches reports_latency = lilv_world_query(
+ const SordNode* port = lilv_match_object(ports);
+ SordIter* reports_latency = lilv_world_query(
p->world,
port,
p->world->lv2_portproperty_node,
@@ -656,7 +656,7 @@ lilv_plugin_get_port_by_symbol(const LilvPlugin* p,
return NULL;
}
-static LilvNode
+static const SordNode*
lilv_plugin_get_author(const LilvPlugin* p)
{
lilv_plugin_load_if_necessary(p);
@@ -664,7 +664,7 @@ lilv_plugin_get_author(const LilvPlugin* p)
SordNode* doap_maintainer = sord_new_uri(
p->world->world, NS_DOAP "maintainer");
- LilvMatches maintainers = lilv_world_query(
+ SordIter* maintainers = lilv_world_query(
p->world,
p->plugin_uri->val.uri_val,
doap_maintainer,
@@ -676,7 +676,7 @@ lilv_plugin_get_author(const LilvPlugin* p)
return NULL;
}
- LilvNode author = lilv_match_object(maintainers);
+ const SordNode* author = lilv_match_object(maintainers);
lilv_match_end(maintainers);
return author;
@@ -686,7 +686,7 @@ LILV_API
LilvValue*
lilv_plugin_get_author_name(const LilvPlugin* plugin)
{
- LilvNode author = lilv_plugin_get_author(plugin);
+ const SordNode* author = lilv_plugin_get_author(plugin);
if (author) {
return lilv_plugin_get_one(
plugin, author, sord_new_uri(
@@ -699,7 +699,7 @@ LILV_API
LilvValue*
lilv_plugin_get_author_email(const LilvPlugin* plugin)
{
- LilvNode author = lilv_plugin_get_author(plugin);
+ const SordNode* author = lilv_plugin_get_author(plugin);
if (author) {
return lilv_plugin_get_one(
plugin, author, sord_new_uri(
@@ -712,7 +712,7 @@ LILV_API
LilvValue*
lilv_plugin_get_author_homepage(const LilvPlugin* plugin)
{
- LilvNode author = lilv_plugin_get_author(plugin);
+ const SordNode* author = lilv_plugin_get_author(plugin);
if (author) {
return lilv_plugin_get_one(
plugin, author, sord_new_uri(
@@ -737,17 +737,17 @@ lilv_plugin_get_uis(const LilvPlugin* p)
SordNode* ui_ui_node = sord_new_uri(p->world->world, NS_UI "ui");
SordNode* ui_binary_node = sord_new_uri(p->world->world, NS_UI "binary");
- LilvUIs* result = lilv_uis_new();
- LilvMatches uis = lilv_world_query(
+ LilvUIs* result = lilv_uis_new();
+ SordIter* uis = lilv_world_query(
p->world,
p->plugin_uri->val.uri_val,
ui_ui_node,
NULL);
FOREACH_MATCH(uis) {
- LilvNode ui = lilv_match_object(uis);
- LilvValue* type = lilv_plugin_get_unique(p, ui, p->world->rdf_a_node);
- LilvValue* binary = lilv_plugin_get_unique(p, ui, ui_binary_node);
+ const SordNode* ui = lilv_match_object(uis);
+ LilvValue* type = lilv_plugin_get_unique(p, ui, p->world->rdf_a_node);
+ LilvValue* binary = lilv_plugin_get_unique(p, ui, ui_binary_node);
if (sord_node_get_type(ui) != SORD_URI
|| !lilv_value_is_uri(type)
diff --git a/src/pluginclass.c b/src/pluginclass.c
index 010f99e..60e57dc 100644
--- a/src/pluginclass.c
+++ b/src/pluginclass.c
@@ -23,10 +23,10 @@
#include "lilv_internal.h"
LilvPluginClass*
-lilv_plugin_class_new(LilvWorld* world,
- LilvNode parent_node,
- LilvNode uri,
- const char* label)
+lilv_plugin_class_new(LilvWorld* world,
+ const SordNode* parent_node,
+ const SordNode* uri,
+ const char* label)
{
if (parent_node && sord_node_get_type(parent_node) != SORD_URI) {
return NULL; // Not an LV2 plugin superclass (FIXME: discover properly)
diff --git a/src/port.c b/src/port.c
index 3845d29..6f3f560 100644
--- a/src/port.c
+++ b/src/port.c
@@ -55,18 +55,18 @@ lilv_port_is_a(const LilvPlugin* plugin,
return false;
}
-static LilvNode
+static const SordNode*
lilv_port_get_node(const LilvPlugin* p,
const LilvPort* port)
{
- LilvMatches ports = lilv_world_query(
+ SordIter* ports = lilv_world_query(
p->world,
p->plugin_uri->val.uri_val,
p->world->lv2_port_node,
NULL);
- LilvNode ret = NULL;
+ const SordNode* ret = NULL;
FOREACH_MATCH(ports) {
- LilvNode node = lilv_match_object(ports);
+ const SordNode* node = lilv_match_object(ports);
LilvValue* symbol = lilv_plugin_get_unique(
p,
node,
@@ -93,8 +93,8 @@ lilv_port_has_property(const LilvPlugin* p,
const LilvValue* property)
{
assert(property);
- LilvNode port_node = lilv_port_get_node(p, port);
- LilvMatches results = lilv_world_query(
+ const SordNode* port_node = lilv_port_get_node(p, port);
+ SordIter* results = lilv_world_query(
p->world,
port_node,
p->world->lv2_portproperty_node,
@@ -114,8 +114,8 @@ lilv_port_supports_event(const LilvPlugin* p,
#define NS_EV (const uint8_t*)"http://lv2plug.in/ns/ext/event#"
assert(event);
- LilvNode port_node = lilv_port_get_node(p, port);
- LilvMatches results = lilv_world_query(
+ const SordNode* port_node = lilv_port_get_node(p, port);
+ SordIter* results = lilv_world_query(
p->world,
port_node,
sord_new_uri(p->world->world, NS_EV "supportsEvent"),
@@ -129,12 +129,12 @@ lilv_port_supports_event(const LilvPlugin* p,
static LilvValues*
lilv_port_get_value_by_node(const LilvPlugin* p,
const LilvPort* port,
- LilvNode predicate)
+ const SordNode* predicate)
{
assert(sord_node_get_type(predicate) == SORD_URI);
- LilvNode port_node = lilv_port_get_node(p, port);
- LilvMatches results = lilv_world_query(
+ const SordNode* port_node = lilv_port_get_node(p, port);
+ SordIter* results = lilv_world_query(
p->world,
port_node,
predicate,
@@ -237,8 +237,8 @@ LilvScalePoints*
lilv_port_get_scale_points(const LilvPlugin* p,
const LilvPort* port)
{
- LilvNode port_node = lilv_port_get_node(p, port);
- LilvMatches points = lilv_world_query(
+ const SordNode* port_node = lilv_port_get_node(p, port);
+ SordIter* points = lilv_world_query(
p->world,
port_node,
sord_new_uri(p->world->world, (const uint8_t*)LILV_NS_LV2 "scalePoint"),
@@ -249,7 +249,7 @@ lilv_port_get_scale_points(const LilvPlugin* p,
ret = lilv_scale_points_new();
FOREACH_MATCH(points) {
- LilvNode point = lilv_match_object(points);
+ const SordNode* point = lilv_match_object(points);
LilvValue* value = lilv_plugin_get_unique(
p,
diff --git a/src/query.c b/src/query.c
index bea8788..c55fe5b 100644
--- a/src/query.c
+++ b/src/query.c
@@ -54,15 +54,15 @@ lilv_lang_matches(const char* a, const char* b)
}
LilvValues*
-lilv_values_from_stream_objects_i18n(LilvWorld* world,
- LilvMatches stream)
+lilv_values_from_stream_objects_i18n(LilvWorld* world,
+ SordIter* stream)
{
- LilvValues* values = lilv_values_new();
- LilvNode nolang = NULL; // Untranslated value
- LilvNode partial = NULL; // Partial language match
- char* syslang = lilv_get_lang();
+ LilvValues* values = lilv_values_new();
+ const SordNode* nolang = NULL; // Untranslated value
+ const SordNode* partial = NULL; // Partial language match
+ char* syslang = lilv_get_lang();
FOREACH_MATCH(stream) {
- LilvNode value = lilv_match_object(stream);
+ const SordNode* value = lilv_match_object(stream);
if (sord_node_get_type(value) == SORD_LITERAL) {
const char* lang = sord_node_get_language(value);
LilvLangMatch lm = LILV_LANG_MATCH_NONE;
@@ -95,7 +95,7 @@ lilv_values_from_stream_objects_i18n(LilvWorld* world,
return values;
}
- LilvNode best = nolang;
+ const SordNode* best = nolang;
if (syslang && partial) {
// Partial language match for system language
best = partial;
@@ -117,8 +117,8 @@ lilv_values_from_stream_objects_i18n(LilvWorld* world,
}
LilvValues*
-lilv_values_from_stream_objects(LilvWorld* world,
- LilvMatches stream)
+lilv_values_from_stream_objects(LilvWorld* world,
+ SordIter* stream)
{
if (lilv_matches_end(stream)) {
lilv_match_end(stream);
diff --git a/src/value.c b/src/value.c
index 94d37f8..f50c6bd 100644
--- a/src/value.c
+++ b/src/value.c
@@ -312,7 +312,7 @@ lilv_value_as_uri(const LilvValue* value)
return value->str_val;
}
-LilvNode
+const SordNode*
lilv_value_as_node(const LilvValue* value)
{
assert(lilv_value_is_uri(value));
diff --git a/src/world.c b/src/world.c
index 4fba762..8bc4b49 100644
--- a/src/world.c
+++ b/src/world.c
@@ -200,33 +200,33 @@ lilv_world_set_option(LilvWorld* world,
LILV_WARNF("Unrecognized or invalid option `%s'\n", option);
}
-static LilvMatches
-lilv_world_find_statements(LilvWorld* world,
- SordModel* model,
- LilvNode subject,
- LilvNode predicate,
- LilvNode object,
- LilvNode graph)
+static SordIter*
+lilv_world_find_statements(LilvWorld* world,
+ SordModel* model,
+ const SordNode* subject,
+ const SordNode* predicate,
+ const SordNode* object,
+ const SordNode* graph)
{
SordQuad pat = { subject, predicate, object, graph };
return sord_find(model, pat);
}
-LilvMatches
-lilv_world_query(LilvWorld* world,
- LilvNode subject,
- LilvNode predicate,
- LilvNode object)
+SordIter*
+lilv_world_query(LilvWorld* world,
+ const SordNode* subject,
+ const SordNode* predicate,
+ const SordNode* object)
{
return lilv_world_find_statements(world, world->model,
subject, predicate, object, NULL);
}
LilvValues*
-lilv_world_query_values(LilvWorld* world,
- LilvNode subject,
- LilvNode predicate,
- LilvNode object)
+lilv_world_query_values(LilvWorld* world,
+ const SordNode* subject,
+ const SordNode* predicate,
+ const SordNode* object)
{
return lilv_values_from_stream_objects(world,
lilv_world_query(world, subject, predicate, object));
@@ -295,9 +295,9 @@ lilv_sequence_get_by_uri(const GSequence* const_seq,
}
static void
-lilv_world_add_spec(LilvWorld* world,
- LilvNode specification_node,
- LilvNode bundle_node)
+lilv_world_add_spec(LilvWorld* world,
+ const SordNode* specification_node,
+ const SordNode* bundle_node)
{
LilvSpec* spec = malloc(sizeof(struct LilvSpecImpl));
spec->spec = lilv_node_copy(specification_node);
@@ -305,14 +305,14 @@ lilv_world_add_spec(LilvWorld* world,
spec->data_uris = lilv_values_new();
// Add all plugin data files (rdfs:seeAlso)
- LilvMatches files = lilv_world_find_statements(
+ SordIter* files = lilv_world_find_statements(
world, world->model,
specification_node,
world->rdfs_seealso_node,
NULL,
NULL);
FOREACH_MATCH(files) {
- LilvNode file_node = lilv_match_object(files);
+ const SordNode* file_node = lilv_match_object(files);
lilv_array_append(spec->data_uris,
lilv_value_new_from_node(world, file_node));
}
@@ -323,11 +323,11 @@ lilv_world_add_spec(LilvWorld* world,
}
static void
-lilv_world_add_plugin(LilvWorld* world,
- LilvNode plugin_node,
- SerdNode* manifest_uri,
- LilvNode dyn_manifest_lib,
- LilvNode bundle_node)
+lilv_world_add_plugin(LilvWorld* world,
+ const SordNode* plugin_node,
+ SerdNode* manifest_uri,
+ const SordNode* dyn_manifest_lib,
+ const SordNode* bundle_node)
{
LilvValue* plugin_uri = lilv_value_new_from_node(world, plugin_node);
@@ -355,14 +355,14 @@ lilv_world_add_plugin(LilvWorld* world,
}
// Add all plugin data files (rdfs:seeAlso)
- LilvMatches files = lilv_world_find_statements(
+ SordIter* files = lilv_world_find_statements(
world, world->model,
plugin_node,
world->rdfs_seealso_node,
NULL,
NULL);
FOREACH_MATCH(files) {
- LilvNode file_node = lilv_match_object(files);
+ const SordNode* file_node = lilv_match_object(files);
lilv_array_append(plugin->data_uris,
lilv_value_new_from_node(world, file_node));
}
@@ -386,17 +386,17 @@ lilv_world_load_dyn_manifest(LilvWorld* world,
LV2_Dyn_Manifest_Handle handle = NULL;
// ?dman a dynman:DynManifest
- LilvMatches dmanifests = lilv_world_find_statements(
+ SordIter* dmanifests = lilv_world_find_statements(
world, world->model,
NULL,
world->rdf_a_node,
world->dyn_manifest_node,
bundle_node);
FOREACH_MATCH(dmanifests) {
- LilvNode dmanifest = lilv_match_subject(dmanifests);
+ const SordNode* dmanifest = lilv_match_subject(dmanifests);
// ?dman lv2:binary ?binary
- LilvMatches binaries = lilv_world_find_statements(
+ SordIter* binaries = lilv_world_find_statements(
world, world->model,
dmanifest,
world->lv2_binary_node,
@@ -410,9 +410,9 @@ lilv_world_load_dyn_manifest(LilvWorld* world,
}
// Get binary path
- LilvNode binary = lilv_match_object(binaries);
- const uint8_t* lib_uri = sord_node_get_string(binary);
- const char* lib_path = lilv_uri_to_path((const char*)lib_uri);
+ const SordNode* binary = lilv_match_object(binaries);
+ const uint8_t* lib_uri = sord_node_get_string(binary);
+ const char* lib_path = lilv_uri_to_path((const char*)lib_uri);
if (!lib_path) {
LILV_ERROR("No dynamic manifest library path\n");
continue;
@@ -457,14 +457,14 @@ lilv_world_load_dyn_manifest(LilvWorld* world,
fclose(fd);
// ?plugin a lv2:Plugin
- LilvMatches plug_results = lilv_world_find_statements(
+ SordIter* plug_results = lilv_world_find_statements(
world, world->model,
NULL,
world->rdf_a_node,
world->lv2_plugin_node,
bundle_node);
FOREACH_MATCH(plug_results) {
- LilvNode plugin_node = lilv_match_subject(plug_results);
+ const SordNode* plugin_node = lilv_match_subject(plug_results);
lilv_world_add_plugin(world, plugin_node,
&manifest_uri, binary, bundle_node);
}
@@ -495,14 +495,14 @@ lilv_world_load_bundle(LilvWorld* world, LilvValue* bundle_uri)
lilv_world_blank_node_prefix(world));
// ?plugin a lv2:Plugin
- LilvMatches plug_results = lilv_world_find_statements(
+ SordIter* plug_results = lilv_world_find_statements(
world, world->model,
NULL,
world->rdf_a_node,
world->lv2_plugin_node,
bundle_node);
FOREACH_MATCH(plug_results) {
- LilvNode plugin_node = lilv_match_subject(plug_results);
+ const SordNode* plugin_node = lilv_match_subject(plug_results);
lilv_world_add_plugin(world, plugin_node,
&manifest_uri, NULL, bundle_node);
}
@@ -511,14 +511,14 @@ lilv_world_load_bundle(LilvWorld* world, LilvValue* bundle_uri)
lilv_world_load_dyn_manifest(world, bundle_node, manifest_uri);
// ?specification a lv2:Specification
- LilvMatches spec_results = lilv_world_find_statements(
+ SordIter* spec_results = lilv_world_find_statements(
world, world->model,
NULL,
world->rdf_a_node,
world->lv2_specification_node,
bundle_node);
FOREACH_MATCH(spec_results) {
- LilvNode spec = lilv_match_subject(spec_results);
+ const SordNode* spec = lilv_match_subject(spec_results);
lilv_world_add_spec(world, spec, bundle_node);
}
lilv_match_end(spec_results);
@@ -672,17 +672,17 @@ lilv_world_load_plugin_classes(LilvWorld* world)
a menu), they won't be seen anyway...
*/
- LilvMatches classes = lilv_world_find_statements(
+ SordIter* classes = lilv_world_find_statements(
world, world->model,
NULL,
world->rdf_a_node,
world->rdfs_class_node,
NULL);
FOREACH_MATCH(classes) {
- LilvNode class_node = lilv_match_subject(classes);
+ const SordNode* class_node = lilv_match_subject(classes);
// Get parents (superclasses)
- LilvMatches parents = lilv_world_find_statements(
+ SordIter* parents = lilv_world_find_statements(
world, world->model,
class_node,
world->rdfs_subclassof_node,
@@ -694,7 +694,7 @@ lilv_world_load_plugin_classes(LilvWorld* world)
continue;
}
- LilvNode parent_node = lilv_match_object(parents);
+ const SordNode* parent_node = lilv_match_object(parents);
lilv_match_end(parents);
if (!sord_node_get_type(parent_node) == SORD_URI) {
@@ -703,7 +703,7 @@ lilv_world_load_plugin_classes(LilvWorld* world)
}
// Get labels
- LilvMatches labels = lilv_world_find_statements(
+ SordIter* labels = lilv_world_find_statements(
world, world->model,
class_node,
world->rdfs_label_node,
@@ -715,7 +715,7 @@ lilv_world_load_plugin_classes(LilvWorld* world)
continue;
}
- LilvNode label_node = lilv_match_object(labels);
+ const SordNode* label_node = lilv_match_object(labels);
const uint8_t* label = (const uint8_t*)sord_node_get_string(label_node);
lilv_match_end(labels);
@@ -746,7 +746,7 @@ lilv_world_load_all(LilvWorld* world)
const LilvValue* plugin_uri = lilv_plugin_get_uri(plugin);
// ?new dc:replaces plugin
- LilvMatches replacement = lilv_world_find_statements(
+ SordIter* replacement = lilv_world_find_statements(
world, world->model,
NULL,
world->dc_replaces_node,