summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lilv_internal.h1
-rw-r--r--src/plugin.c22
-rw-r--r--src/world.c3
-rw-r--r--wscript2
4 files changed, 26 insertions, 2 deletions
diff --git a/src/lilv_internal.h b/src/lilv_internal.h
index 502d214..99bdee1 100644
--- a/src/lilv_internal.h
+++ b/src/lilv_internal.h
@@ -173,6 +173,7 @@ struct LilvWorldImpl {
SordNode* lv2_reportsLatency;
SordNode* lv2_requiredFeature;
SordNode* lv2_symbol;
+ SordNode* lv2_prototype;
SordNode* null_uri;
SordNode* pset_value;
SordNode* rdf_a;
diff --git a/src/plugin.c b/src/plugin.c
index 4383cc0..0ff7f9f 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -142,6 +142,28 @@ lilv_plugin_load(LilvPlugin* p)
SerdReader* reader = sord_new_reader(p->world->model, env, SERD_TURTLE,
bundle_uri_node);
+ SordIter* prototypes = sord_search(p->world->model,
+ p->plugin_uri->node,
+ p->world->uris.lv2_prototype,
+ NULL, NULL);
+ FOREACH_MATCH(prototypes) {
+ const SordNode* t = sord_iter_get_node(prototypes, SORD_OBJECT);
+ LilvNode* prototype = lilv_node_new_from_node(p->world, t);
+
+ lilv_world_load_resource(p->world, prototype);
+
+ SordIter* statements = sord_search(
+ p->world->model, prototype->node, NULL, NULL, NULL);
+ FOREACH_MATCH(statements) {
+ SordQuad quad;
+ sord_iter_get(statements, quad);
+ quad[0] = p->plugin_uri->node;
+ sord_add(p->world->model, quad);
+ }
+
+ lilv_node_free(prototype);
+ }
+
// Parse all the plugin's data files into RDF model
LILV_FOREACH(nodes, i, p->data_uris) {
const LilvNode* data_uri_val = lilv_nodes_get(p->data_uris, i);
diff --git a/src/world.c b/src/world.c
index e64c5d2..5e1142a 100644
--- a/src/world.c
+++ b/src/world.c
@@ -74,6 +74,7 @@ lilv_world_new(void)
world->uris.lv2_reportsLatency = NEW_URI(LV2_CORE__reportsLatency);
world->uris.lv2_requiredFeature = NEW_URI(LV2_CORE__requiredFeature);
world->uris.lv2_symbol = NEW_URI(LV2_CORE__symbol);
+ world->uris.lv2_prototype = NEW_URI(LV2_CORE__prototype);
world->uris.pset_value = NEW_URI(LV2_PRESETS__value);
world->uris.rdf_a = NEW_URI(LILV_NS_RDF "type");
world->uris.rdf_value = NEW_URI(LILV_NS_RDF "value");
@@ -322,7 +323,7 @@ lilv_world_add_spec(LilvWorld* world,
spec->bundle = sord_node_copy(bundle_node);
spec->data_uris = lilv_nodes_new();
- // Add all plugin data files (rdfs:seeAlso)
+ // Add all data files (rdfs:seeAlso)
SordIter* files = sord_search(
world->model,
specification_node,
diff --git a/wscript b/wscript
index a36764a..7f48032 100644
--- a/wscript
+++ b/wscript
@@ -75,7 +75,7 @@ def configure(conf):
conf.fatal('Neither a shared nor a static build requested')
autowaf.check_pkg(conf, 'lv2', uselib_store='LV2',
- atleast_version='1.0.0', mandatory=True)
+ atleast_version='1.6.2', mandatory=True)
autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD',
atleast_version='0.14.0', mandatory=True)
autowaf.check_pkg(conf, 'sord-0', uselib_store='SORD',