summaryrefslogtreecommitdiffstats
path: root/slv2/lv2.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-19 00:06:50 +0000
committerDavid Robillard <d@drobilla.net>2006-10-19 00:06:50 +0000
commit28ee21cecbd2eb5d347c65bc9c87c8100dd33774 (patch)
tree01bbde854ff565c01781934847c5cf240b2ff61e /slv2/lv2.h
parent3f3c5c4ff31fd778287c2e75b2225bde1eba17cc (diff)
downloadlilv-28ee21cecbd2eb5d347c65bc9c87c8100dd33774.tar.gz
lilv-28ee21cecbd2eb5d347c65bc9c87c8100dd33774.tar.bz2
lilv-28ee21cecbd2eb5d347c65bc9c87c8100dd33774.zip
Added extension_data hook to LV2_Descriptor
git-svn-id: http://svn.drobilla.net/lad/slv2@189 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'slv2/lv2.h')
-rw-r--r--slv2/lv2.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/slv2/lv2.h b/slv2/lv2.h
index e38e2ac..b3d97bf 100644
--- a/slv2/lv2.h
+++ b/slv2/lv2.h
@@ -260,6 +260,31 @@ typedef struct _LV2_Descriptor {
* Hosts MUST NOT call cleanup() unless instantiate() was previously
* called. */
void (*cleanup)(LV2_Handle Instance);
+
+ /** Function pointer that can be used to return additional instance data for
+ * a plugin defined by some extenion (e.g. a struct containing additional
+ * function pointers).
+ *
+ * The actual type and meaning of the returned object MUST be specified
+ * precisely by the extension if it defines any extra data. If a particular
+ * extension does not define extra instance data, this function MUST return
+ * NULL for that extension's URI. If a plugin does not support any
+ * extensions that define extra instance data, this function pointer may be
+ * set to NULL rather than providing an empty function.
+ *
+ * The only parameter is the URI of the extension. The plugin MUST return
+ * NULL if it does not support the extension, but hosts SHOULD NOT use this
+ * as a discovery method (e.g. hosts should only call this function for
+ * extensions known to be supported by the plugin from the data file).
+ *
+ * NOTE: It is highly recommended that this function returns a struct, and
+ * NOT a direct function pointer. Standard C++ (for real reasons) does not
+ * allow type casts from void* to a function pointer type. To provide
+ * additional functions a struct should be returned containing the extra
+ * function pointers (which is valid standard C++, and a much better idea
+ * for extensibility anyway).
+ */
+ void* (*extension_data)(const char * URI);
} LV2_Descriptor;