summaryrefslogtreecommitdiffstats
path: root/slv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-20 01:42:50 +0000
committerDavid Robillard <d@drobilla.net>2007-02-20 01:42:50 +0000
commita909c448b72481e517eb792930a5455ffbf6ff21 (patch)
tree8f89fc3be386eb4f1e1e423218709beeeab1e9e2 /slv2
parent07b6e7736550541b38f40f6889b846c508c13ad1 (diff)
downloadlilv-a909c448b72481e517eb792930a5455ffbf6ff21.tar.gz
lilv-a909c448b72481e517eb792930a5455ffbf6ff21.tar.bz2
lilv-a909c448b72481e517eb792930a5455ffbf6ff21.zip
Added simple accessor for values with subjects other than the plugin itself.
git-svn-id: http://svn.drobilla.net/lad/slv2@321 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'slv2')
-rw-r--r--slv2/plugin.h36
1 files changed, 27 insertions, 9 deletions
diff --git a/slv2/plugin.h b/slv2/plugin.h
index 3cc2f8c..f5add26 100644
--- a/slv2/plugin.h
+++ b/slv2/plugin.h
@@ -131,24 +131,42 @@ char*
slv2_plugin_get_name(SLV2Plugin plugin);
-/** Request some arbitrary RDF object of the plugin.
+/** Get a value associated with the plugin in a plugin's data files.
*
- * May return NULL if the property was not found (ie is not defined in the
- * data file), or if object is not sensibly represented as an SLV2Strings
- * (e.g. blank nodes).
+ * Returns the ?object of all triples found of the form:
*
- * Return value must be freed by caller with slv2_value_free.
+ * <code>&lt;plugin-uri&gt; predicate ?object</code>
+ *
+ * May return NULL if the property was not found, or if object is not
+ * sensibly represented as an SLV2Strings (e.g. blank nodes).
*
- * 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.
+ * Return value must be freed by caller with slv2_strings_free.
*/
SLV2Strings
slv2_plugin_get_value(SLV2Plugin p,
const char* predicate);
+/** Get a value associated with some subject in a plugin's data files.
+ *
+ * Returns the ?object of all triples found of the form:
+ *
+ * <code>subject predicate ?object</code>
+ *
+ * This can be used to investigate URIs returned by slv2_plugin_get_value
+ * (if information about it is contained in the plugin's data files).
+ *
+ * May return NULL if the property was not found, or if object is not
+ * sensibly represented as an SLV2Strings (e.g. blank nodes).
+ *
+ * Return value must be freed by caller with slv2_strings_free.
+ */
+SLV2Strings
+slv2_plugin_get_value_for_subject(SLV2Plugin p,
+ const char* subject,
+ const char* predicate);
+
+
/** Get the LV2 Properties of a plugin.
*
* LV2 Properties are mandatory. Hosts MUST NOT use a plugin if they do not