From 98ea88b5fd404ff4ba43709f731ba074f291eb5b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 19 Apr 2007 16:49:25 +0000 Subject: Added Redland dependency, using in-memory RDF models. Numerous significant performance improvements. git-svn-id: http://svn.drobilla.net/lad/slv2@457 a436a847-0d15-0410-975c-d299462d15a1 --- slv2/plugin.h | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'slv2/plugin.h') diff --git a/slv2/plugin.h b/slv2/plugin.h index 77a0f61..7b8d62b 100644 --- a/slv2/plugin.h +++ b/slv2/plugin.h @@ -26,17 +26,18 @@ extern "C" { #include #include #include +#include #include - -typedef struct _Plugin* SLV2Plugin; - - -/** \defgroup data Data file access +/** \defgroup data Plugin data access * * These functions work exclusively with the plugin's RDF data file. * They do not load or access the plugin dynamic library in any way. * + * An SLV2Plugin is a weak reference (ie URIs) to an LV2 plugin in the + * Model. Most functions which operate on an SLV2Plugin actually query + * the data in the model. + * * @{ */ @@ -162,8 +163,8 @@ slv2_plugin_get_value(SLV2Plugin p, */ SLV2Strings slv2_plugin_get_value_for_subject(SLV2Plugin p, - const char* subject, - const char* predicate); + const char* subject, + const char* predicate); /** Get the LV2 Properties of a plugin. @@ -266,6 +267,31 @@ slv2_plugin_query_count(SLV2Plugin plugin, const char* sparql_str); +/** Get a port on this plugin by \a index. + * + * To perform multiple calls on a port, the returned value should + * be cached and used repeatedly. + * + * O(1) + */ +SLV2Port +slv2_plugin_get_port_by_index(SLV2Plugin plugin, + uint32_t index); + + +/** Get a port on this plugin by \a symbol. + * + * To perform multiple calls on a port, the returned value should + * be cached and used repeatedly. + * + * O(num_ports) + */ +SLV2Port +slv2_plugin_get_port_by_symbol(SLV2Plugin plugin, + const char* symbol); + + + /** @} */ #ifdef __cplusplus -- cgit v1.2.1