summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port.c')
-rw-r--r--src/port.c77
1 files changed, 29 insertions, 48 deletions
diff --git a/src/port.c b/src/port.c
index 5d076fd..b1eccf6 100644
--- a/src/port.c
+++ b/src/port.c
@@ -50,8 +50,7 @@ lilv_port_free(const LilvPlugin* plugin, LilvPort* port)
}
}
-LILV_API
-bool
+LILV_API bool
lilv_port_is_a(const LilvPlugin* plugin,
const LilvPort* port,
const LilvNode* port_class)
@@ -63,21 +62,18 @@ lilv_port_is_a(const LilvPlugin* plugin,
return false;
}
-LILV_API
-bool
+LILV_API bool
lilv_port_has_property(const LilvPlugin* p,
const LilvPort* port,
const LilvNode* property)
{
- return lilv_world_ask_internal(
- p->world,
- port->node->node,
- p->world->uris.lv2_portProperty,
- lilv_node_as_node(property));
+ return lilv_world_ask_internal(p->world,
+ port->node->node,
+ p->world->uris.lv2_portProperty,
+ property->node);
}
-LILV_API
-bool
+LILV_API bool
lilv_port_supports_event(const LilvPlugin* p,
const LilvPort* port,
const LilvNode* event)
@@ -90,7 +86,7 @@ lilv_port_supports_event(const LilvPlugin* p,
if (lilv_world_ask_internal(p->world,
port->node->node,
sord_new_uri(p->world->world, *pred),
- lilv_node_as_node(event))) {
+ event->node)) {
return true;
}
}
@@ -102,23 +98,20 @@ lilv_port_get_value_by_node(const LilvPlugin* p,
const LilvPort* port,
const SordNode* predicate)
{
- return lilv_world_find_nodes_internal(
- p->world,
- port->node->node,
- predicate,
- NULL);
+ return lilv_world_find_nodes_internal(p->world,
+ port->node->node,
+ predicate,
+ NULL);
}
-LILV_API
-const LilvNode*
+LILV_API const LilvNode*
lilv_port_get_node(const LilvPlugin* plugin,
const LilvPort* port)
{
return port->node;
}
-LILV_API
-LilvNodes*
+LILV_API LilvNodes*
lilv_port_get_value(const LilvPlugin* p,
const LilvPort* port,
const LilvNode* predicate)
@@ -129,13 +122,10 @@ lilv_port_get_value(const LilvPlugin* p,
return NULL;
}
- return lilv_port_get_value_by_node(
- p, port,
- lilv_node_as_node(predicate));
+ return lilv_port_get_value_by_node(p, port, predicate->node);
}
-LILV_API
-LilvNode*
+LILV_API LilvNode*
lilv_port_get(const LilvPlugin* p,
const LilvPort* port,
const LilvNode* predicate)
@@ -149,24 +139,21 @@ lilv_port_get(const LilvPlugin* p,
return value;
}
-LILV_API
-uint32_t
+LILV_API uint32_t
lilv_port_get_index(const LilvPlugin* p,
const LilvPort* port)
{
return port->index;
}
-LILV_API
-const LilvNode*
+LILV_API const LilvNode*
lilv_port_get_symbol(const LilvPlugin* p,
const LilvPort* port)
{
return port->symbol;
}
-LILV_API
-LilvNode*
+LILV_API LilvNode*
lilv_port_get_name(const LilvPlugin* p,
const LilvPort* port)
{
@@ -188,16 +175,14 @@ lilv_port_get_name(const LilvPlugin* p,
return ret;
}
-LILV_API
-const LilvNodes*
+LILV_API const LilvNodes*
lilv_port_get_classes(const LilvPlugin* p,
const LilvPort* port)
{
return port->classes;
}
-LILV_API
-void
+LILV_API void
lilv_port_get_range(const LilvPlugin* p,
const LilvPort* port,
LilvNode** def,
@@ -230,8 +215,7 @@ lilv_port_get_range(const LilvPlugin* p,
}
}
-LILV_API
-LilvScalePoints*
+LILV_API LilvScalePoints*
lilv_port_get_scale_points(const LilvPlugin* p,
const LilvPort* port)
{
@@ -248,15 +232,13 @@ lilv_port_get_scale_points(const LilvPlugin* p,
FOREACH_MATCH(points) {
const SordNode* point = sord_iter_get_node(points, SORD_OBJECT);
- LilvNode* value = lilv_plugin_get_unique(
- p,
- point,
- p->world->uris.rdf_value);
+ LilvNode* value = lilv_plugin_get_unique(p,
+ point,
+ p->world->uris.rdf_value);
- LilvNode* label = lilv_plugin_get_unique(
- p,
- point,
- p->world->uris.rdfs_label);
+ LilvNode* label = lilv_plugin_get_unique(p,
+ point,
+ p->world->uris.rdfs_label);
if (value && label) {
zix_tree_insert(
@@ -269,8 +251,7 @@ lilv_port_get_scale_points(const LilvPlugin* p,
return ret;
}
-LILV_API
-LilvNodes*
+LILV_API LilvNodes*
lilv_port_get_properties(const LilvPlugin* p,
const LilvPort* port)
{