diff options
author | David Robillard <d@drobilla.net> | 2013-12-27 19:47:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-12-27 19:47:45 +0000 |
commit | 72ddaae31b6746f2d0f889c3b7cba38512952b94 (patch) | |
tree | cec980f7d18bf8acb0595315c0b702cc4e384e85 /src/plugin.c | |
parent | e35514910e663618be0da6edd0cae5926e3753ac (diff) | |
download | lilv-72ddaae31b6746f2d0f889c3b7cba38512952b94.tar.gz lilv-72ddaae31b6746f2d0f889c3b7cba38512952b94.tar.bz2 lilv-72ddaae31b6746f2d0f889c3b7cba38512952b94.zip |
Implement lv2:prototype.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5219 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 22 |
1 files changed, 22 insertions, 0 deletions
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); |