summaryrefslogtreecommitdiffstats
path: root/slv2/plugin.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-07 01:45:53 +0000
committerDavid Robillard <d@drobilla.net>2007-02-07 01:45:53 +0000
commit17ec1c5594772a89a5284449754b56ccb705ebe4 (patch)
treed3ee843acc698345b3760818b1a09f55a18517bb /slv2/plugin.h
parent87e016baff11bd74d905b68e48577461b36b992c (diff)
downloadlilv-17ec1c5594772a89a5284449754b56ccb705ebe4.tar.gz
lilv-17ec1c5594772a89a5284449754b56ccb705ebe4.tar.bz2
lilv-17ec1c5594772a89a5284449754b56ccb705ebe4.zip
Added lv2.ttl installation, lv2.ttl added as source by default to queries.
Changed port API to work by referring to either index or symbol. Plugged some leaks. Added access to plugin/port hints/properties. Updated lv2.ttl. git-svn-id: http://svn.drobilla.net/lad/slv2@285 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'slv2/plugin.h')
-rw-r--r--slv2/plugin.h61
1 files changed, 34 insertions, 27 deletions
diff --git a/slv2/plugin.h b/slv2/plugin.h
index 839137f..d646504 100644
--- a/slv2/plugin.h
+++ b/slv2/plugin.h
@@ -136,21 +136,45 @@ char*
slv2_plugin_get_name(const SLV2Plugin* plugin);
-/** Request some property of the plugin.
+/** Request some arbitrary RDF object of the plugin.
*
* May return NULL if the property was not found (ie is not defined in the
- * data file).
+ * data file), or if object is not sensibly represented as an SLV2Value
+ * (e.g. blank nodes).
*
- * Return value must be free()'d by caller.
+ * Return value must be freed by caller with slv2_value_free.
*
- * Note that some properties may have multiple values. If the property is a
+ * Note that this may return multiple values. If the property is a
* string with multiple languages defined, the translation according to
* $LANG will be returned if it is set. Otherwise all values will be
* returned.
*/
-SLV2Property
-slv2_plugin_get_property(const SLV2Plugin* p,
- const char* property);
+SLV2Value
+slv2_plugin_get_value(const SLV2Plugin* p,
+ const char* predicate);
+
+
+/** Get the LV2 Properties of a plugin.
+ *
+ * LV2 Properties are mandatory. Hosts MUST NOT use a plugin if they do not
+ * understand all the LV2 Properties associated with that plugin (if this is
+ * not what you want, see slv2_plugin_get_hints).
+ *
+ * Return value must be freed by caller with slv2_value_free.
+ */
+SLV2Value
+slv2_plugin_get_properties(const SLV2Plugin* p);
+
+
+/** Get the LV2 Hints of a plugin.
+ *
+ * LV2 Hints are suggestions that may be useful for a host. LV2 Hints may be
+ * ignored and the plugin will still function correctly.
+ *
+ * Return value must be freed by caller with slv2_value_free.
+ */
+SLV2Value
+slv2_plugin_get_hints(const SLV2Plugin* p);
/** Get the number of ports on this plugin.
@@ -179,29 +203,12 @@ slv2_plugin_has_latency(const SLV2Plugin* p);
uint32_t
slv2_plugin_get_latency_port(const SLV2Plugin* p);
-#if 0
-/** Return whether or not a plugin supports the given host feature / extension.
- *
- * This will return true for both supported and required host features.
- */
-bool
-slv2_plugin_supports_feature(const SLV2Plugin* p, const char* feature_uri);
-
-
-/** Return whether or not a plugin requires the given host feature / extension.
- *
- * If a plugin requires a feature, that feature MUST be passed to the plugin's
- * instantiate method or the plugin will fail to instantiate.
- */
-bool
-slv2_plugin_requires_features(const SLV2Plugin* p, const char* feature_uri);
-#endif
/** Get a plugin's supported host features / extensions.
*
* This returns a list of all supported features (both required and optional).
*/
-SLV2Property
+SLV2Value
slv2_plugin_get_supported_features(const SLV2Plugin* p);
@@ -210,7 +217,7 @@ slv2_plugin_get_supported_features(const SLV2Plugin* p);
* All feature URI's returned by this call MUST be passed to the plugin's
* instantiate method for the plugin to instantiate successfully.
*/
-SLV2Property
+SLV2Value
slv2_plugin_get_required_features(const SLV2Plugin* p);
@@ -220,7 +227,7 @@ slv2_plugin_get_required_features(const SLV2Plugin* p);
* instantiate method, those features will be used by the function, otherwise
* the plugin will act as it would if it did not support that feature at all.
*/
-SLV2Property
+SLV2Value
slv2_plugin_get_optional_features(const SLV2Plugin* p);