summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--lilv/lilv.h12
-rw-r--r--src/lilv_internal.h2
-rw-r--r--src/port.c20
-rw-r--r--wscript2
5 files changed, 30 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index a44d3e6..f14ccf1 100644
--- a/NEWS
+++ b/NEWS
@@ -8,11 +8,12 @@ lilv (0.16.1) unstable;
* Call GetProcAddress with correct calling convention on Windows
* Add support for running plugins from Python by Kaspar Emanuel
* Clean up after test suite so multiple runs are successful
+ * Add lilv_port_get_node() for using world query functions with ports
* lv2info: Don't display invalid control maxes and defaults
(patch from Robin Gareus)
* lilvmm.hpp: Add wrappers for UI API
- -- David Robillard <d@drobilla.net> Mon, 30 Dec 2013 12:13:25 -0500
+ -- David Robillard <d@drobilla.net> Fri, 03 Jan 2014 23:16:58 -0500
lilv (0.16.0) stable;
diff --git a/lilv/lilv.h b/lilv/lilv.h
index 5abe867..bdf70dc 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -1065,6 +1065,18 @@ lilv_plugin_get_related(const LilvPlugin* plugin, const LilvNode* type);
*/
/**
+ Get the RDF node of @a port.
+
+ Ports nodes may be may be URIs or blank nodes.
+
+ @return A shared node which must not be modified or freed.
+*/
+LILV_API
+const LilvNode*
+lilv_port_get_node(const LilvPlugin* plugin,
+ const LilvPort* port);
+
+/**
Port analog of lilv_plugin_get_value.
*/
LILV_API
diff --git a/src/lilv_internal.h b/src/lilv_internal.h
index 99bdee1..567fcea 100644
--- a/src/lilv_internal.h
+++ b/src/lilv_internal.h
@@ -64,7 +64,7 @@ typedef struct LilvSpecImpl LilvSpec;
typedef void LilvCollection;
struct LilvPortImpl {
- SordNode* node; ///< RDF node
+ LilvNode* node; ///< RDF node
uint32_t index; ///< lv2:index
LilvNode* symbol; ///< lv2:symbol
LilvNodes* classes; ///< rdf:type
diff --git a/src/port.c b/src/port.c
index 48d87dd..5d076fd 100644
--- a/src/port.c
+++ b/src/port.c
@@ -32,7 +32,7 @@ lilv_port_new(LilvWorld* world,
const char* symbol)
{
LilvPort* port = (LilvPort*)malloc(sizeof(LilvPort));
- port->node = sord_node_copy(node);
+ port->node = lilv_node_new_from_node(world, node);
port->index = index;
port->symbol = lilv_node_new(world, LILV_VALUE_STRING, symbol);
port->classes = lilv_nodes_new();
@@ -43,7 +43,7 @@ void
lilv_port_free(const LilvPlugin* plugin, LilvPort* port)
{
if (port) {
- sord_node_free(plugin->world->world, port->node);
+ lilv_node_free(port->node);
lilv_nodes_free(port->classes);
lilv_node_free(port->symbol);
free(port);
@@ -71,7 +71,7 @@ lilv_port_has_property(const LilvPlugin* p,
{
return lilv_world_ask_internal(
p->world,
- port->node,
+ port->node->node,
p->world->uris.lv2_portProperty,
lilv_node_as_node(property));
}
@@ -88,7 +88,7 @@ lilv_port_supports_event(const LilvPlugin* p,
for (const uint8_t** pred = predicates; *pred; ++pred) {
if (lilv_world_ask_internal(p->world,
- port->node,
+ port->node->node,
sord_new_uri(p->world->world, *pred),
lilv_node_as_node(event))) {
return true;
@@ -104,12 +104,20 @@ lilv_port_get_value_by_node(const LilvPlugin* p,
{
return lilv_world_find_nodes_internal(
p->world,
- port->node,
+ port->node->node,
predicate,
NULL);
}
LILV_API
+const LilvNode*
+lilv_port_get_node(const LilvPlugin* plugin,
+ const LilvPort* port)
+{
+ return port->node;
+}
+
+LILV_API
LilvNodes*
lilv_port_get_value(const LilvPlugin* p,
const LilvPort* port,
@@ -229,7 +237,7 @@ lilv_port_get_scale_points(const LilvPlugin* p,
{
SordIter* points = lilv_world_query_internal(
p->world,
- port->node,
+ port->node->node,
sord_new_uri(p->world->world, (const uint8_t*)LV2_CORE__scalePoint),
NULL);
diff --git a/wscript b/wscript
index cfc1ff5..d4baaf1 100644
--- a/wscript
+++ b/wscript
@@ -12,7 +12,7 @@ import waflib.Logs as Logs
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-LILV_VERSION = '0.16.1'
+LILV_VERSION = '0.17.0'
LILV_MAJOR_VERSION = '0'
# Mandatory waf variables