diff options
author | David Robillard <d@drobilla.net> | 2007-07-01 19:44:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-01 19:44:19 +0000 |
commit | e67a923c73c26dfd335cfb325511c831996952ab (patch) | |
tree | 9f33af93a0ec3d8e20ad475495f4e5811bfcc660 /slv2 | |
parent | 34eff8deba278aebe01b50fec879ab5d3d2335dc (diff) | |
download | lilv-e67a923c73c26dfd335cfb325511c831996952ab.tar.gz lilv-e67a923c73c26dfd335cfb325511c831996952ab.tar.bz2 lilv-e67a923c73c26dfd335cfb325511c831996952ab.zip |
Fix a couple memory leaks/errors.
Add proper bundle path finding (support plugins with binaries not immediately under their bundle paths, though none exist).
Add slv2_plugin_get_bundle_uri.
Add stub for loading plugin GUIs.
git-svn-id: http://svn.drobilla.net/lad/slv2@553 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'slv2')
-rw-r--r-- | slv2/plugin.h | 38 | ||||
-rw-r--r-- | slv2/value.h | 2 |
2 files changed, 39 insertions, 1 deletions
diff --git a/slv2/plugin.h b/slv2/plugin.h index 36add35..f77ca16 100644 --- a/slv2/plugin.h +++ b/slv2/plugin.h @@ -80,8 +80,29 @@ const char* slv2_plugin_get_uri(SLV2Plugin plugin); +/** Get the (resolvable) URI of the plugins "main" bundle. + * + * This returns the URI of the bundle where the plugin itself was found. + * Note that the data for a plugin may be spread over many bundles, that is, + * slv2_plugin_get_data_uris may returns URIs which are not below this one. + * + * Typical hosts should not need to use this function. + * + * Note this always returns a fully qualified URI. If you want a local + * filesystem path, use slv2_uri_to_path. + * + * \return a shared string which must not be modified or freed. + * + * Time = O(1) + */ +const char* +slv2_plugin_get_bundle_uri(SLV2Plugin plugin); + + /** Get the (resolvable) URIs of the RDF data files that define a plugin. * + * Typical hosts should not need to use this function. + * * Note this always returns fully qualified URIs. If you want local * filesystem paths, use slv2_uri_to_path. * @@ -340,6 +361,9 @@ slv2_plugin_get_guis(SLV2Plugin plugin); * \param plugin The plugin that the GUI is for. * \param gui A GUI identifier as returned by slv2_plugin_get_guis() (with type SLV2_VALUE_GUI). * + * This function if provided for completeness, but if you want to load a GUI + * as easily as possible, use slv2_plugin_load_gui. + * * Time = Query */ SLV2Value @@ -347,6 +371,20 @@ slv2_plugin_get_gui_library_uri(SLV2Plugin plugin, SLV2Value gui); +/** Load and instantiate a plugin GUI. + * + * The type returned depends on the type of the GUI. For SLV2_GTK2_GUI, the + * return value must be cast to LV2UI_Handle. + * + * NULL returned on error. + * + * Time = Query + O(# of GUIs in GUI shared library) + */ +void* +slv2_plugin_load_gui(SLV2Plugin plugin, + SLV2Value gui); + + /** @} */ #ifdef __cplusplus diff --git a/slv2/value.h b/slv2/value.h index 4fd0cf4..f2db361 100644 --- a/slv2/value.h +++ b/slv2/value.h @@ -57,7 +57,7 @@ slv2_value_equals(SLV2Value value, SLV2Value other); * 1.0 * 1 * - * Returned string is newly allocation and must be freed by caller. + * Returned string is newly allocation and must be freed by caller. */ char* slv2_value_get_turtle_token(SLV2Value value); |