summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-09-29 18:14:43 +0000
committerDavid Robillard <d@drobilla.net>2008-09-29 18:14:43 +0000
commit169f29c36847991537e9e7770c297956803c2f1c (patch)
tree97c70fe8a65cbdd2df0b3297b19cfcbb2b10259a
parent6ad5c37141cedcf00ef46ca2fd6bd141eca81d60 (diff)
downloadlilv-169f29c36847991537e9e7770c297956803c2f1c.tar.gz
lilv-169f29c36847991537e9e7770c297956803c2f1c.tar.bz2
lilv-169f29c36847991537e9e7770c297956803c2f1c.zip
Add slv2_instance_get_extension_data.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@1536 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--ChangeLog1
-rw-r--r--slv2/plugininstance.h19
2 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e870051..38eaa25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ slv2 (9999) unstable; urgency=low
* NOT YET RELEASED
* Add slv2_port_get_value (analogous to slv2_plugin_get_value).
+ * Add slv2_instance_get_extension_data.
-- Dave Robillard <dave@drobilla.net> Sun, 01 Jan 9999 00:00:00 -0400
diff --git a/slv2/plugininstance.h b/slv2/plugininstance.h
index e648513..7c05468 100644
--- a/slv2/plugininstance.h
+++ b/slv2/plugininstance.h
@@ -173,6 +173,25 @@ slv2_instance_deactivate(SLV2Instance instance)
}
+/** Get extension data from the plugin instance.
+ *
+ * The type and semantics of the data returned is specific to the particular
+ * extension, though in all cases it is shared and must not be deleted.
+ */
+static inline const void*
+slv2_instance_get_extension_data(SLV2Instance instance,
+ const char* uri)
+{
+ assert(instance);
+ assert(instance->lv2_descriptor);
+
+ if (instance->lv2_descriptor->extension_data)
+ return instance->lv2_descriptor->extension_data(uri);
+ else
+ return NULL;
+}
+
+
/** Get the LV2_Descriptor of the plugin instance.
*
* Normally hosts should not need to access the LV2_Descriptor directly,