summaryrefslogtreecommitdiffstats
path: root/lilv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-26 22:20:40 +0000
committerDavid Robillard <d@drobilla.net>2012-02-26 22:20:40 +0000
commit72e3c06d3a6b2558e5e156f917e1c28441819417 (patch)
tree2a82d6701e1a2e75fd1d3d38eb11fbc7fc8b5fce /lilv
parente1624b6435b3392ed03b8b5d4751cfeb53eb1f61 (diff)
downloadlilv-72e3c06d3a6b2558e5e156f917e1c28441819417.tar.gz
lilv-72e3c06d3a6b2558e5e156f917e1c28441819417.tar.bz2
lilv-72e3c06d3a6b2558e5e156f917e1c28441819417.zip
Add lilv_plugin_get_port_by_property() and lilv_port_get_index() as an improved generic alternative to lilv_plugin_get_latency_port_index().
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4001 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'lilv')
-rw-r--r--lilv/lilv.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/lilv/lilv.h b/lilv/lilv.h
index f392b6f..f41a4a9 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -899,6 +899,17 @@ lilv_plugin_get_port_by_symbol(const LilvPlugin* plugin,
const LilvNode* symbol);
/**
+ Get a port on @c plugin by an lv2:PortProperty.
+ This function only makes sense for port properties which apply to a single
+ port per plugin (like lv2:reportsLatency). Otherwise, the matching port
+ with the lowest index will be returned.
+*/
+LILV_API
+LilvPort*
+lilv_plugin_get_port_by_property(const LilvPlugin* plugin,
+ const LilvNode* port_property);
+
+/**
Get the full name of the plugin's author.
Returns NULL if author name is not present.
Returned value must be freed by caller.
@@ -1021,6 +1032,16 @@ lilv_port_supports_event(const LilvPlugin* p,
const LilvNode* event_uri);
/**
+ Get the index of a port.
+ The index is only valid for the life of the plugin and may change between
+ versions. For a stable identifier, use the symbol.
+*/
+LILV_API
+uint32_t
+lilv_port_get_index(const LilvPlugin* plugin,
+ const LilvPort* port);
+
+/**
Get the symbol of a port.
The 'symbol' is a short string, a valid C identifier.
Returned value is owned by @a port and must not be freed.