summaryrefslogtreecommitdiffstats
path: root/slv2/pluginlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'slv2/pluginlist.h')
-rw-r--r--slv2/pluginlist.h46
1 files changed, 24 insertions, 22 deletions
diff --git a/slv2/pluginlist.h b/slv2/pluginlist.h
index aca3bb7..5410bc3 100644
--- a/slv2/pluginlist.h
+++ b/slv2/pluginlist.h
@@ -24,16 +24,16 @@ extern "C" {
#endif
-typedef struct _PluginList* SLV2List;
+typedef struct _PluginList* SLV2Plugins;
-/** \defgroup lists Plugin discovery
- *
+/** \defgroup plugins Plugins - Collection of plugins, plugin discovery
+ *
* These functions are for locating plugins installed on the system.
*
* Normal hosts which just want to easily load plugins by URI are strongly
* recommended to simply find all installed plugins with
- * \ref slv2_list_load_all rather than find and load bundles manually.
+ * \ref slv2_plugins_load_all rather than find and load bundles manually.
*
* Functions are provided for hosts that wish to access bundles explicitly and
* individually for some reason, as well as make custom lists of plugins from
@@ -46,10 +46,10 @@ typedef struct _PluginList* SLV2List;
/** Create a new, empty plugin list.
*
- * Returned object must be freed with slv2_list_free.
+ * Returned object must be freed with slv2_plugins_free.
*/
-SLV2List
-slv2_list_new();
+SLV2Plugins
+slv2_plugins_new();
/** Free a plugin list.
@@ -61,10 +61,10 @@ slv2_list_new();
* will have to copy it with slv2_plugin_duplicate().
*
* \a list is invalid after this call (though it may be used again after a
- * "list = slv2_list_new()")
+ * "list = slv2_plugins_new()")
*/
void
-slv2_list_free(SLV2List list);
+slv2_plugins_free(SLV2Plugins list);
/** Add all plugins installed on the system to \a list.
@@ -81,18 +81,18 @@ slv2_list_free(SLV2List list);
* discouraged without a special reason to do so - use this one.
*/
void
-slv2_list_load_all(SLV2List list);
+slv2_plugins_load_all(SLV2Plugins list);
/** Add all plugins found in \a search_path to \a list.
*
* If \a search_path is NULL, \a list will be unmodified.
*
- * Use of this function is \b not recommended. Use \ref slv2_list_load_all.
+ * Use of this function is \b not recommended. Use \ref slv2_plugins_load_all.
*/
void
-slv2_list_load_path(SLV2List list,
- const char* search_path);
+slv2_plugins_load_path(SLV2Plugins list,
+ const char* search_path);
/** Add all plugins found in the bundle at \a bundle_base_url to \a list.
@@ -105,35 +105,37 @@ slv2_list_load_path(SLV2List list,
* remain consistent whatsoever. This function should only be used by apps
* which ship with a special bundle (which it knows exists at some path).
* It is \b not to be used by normal hosts that want to load system
- * installed plugins. Use \ref slv2_list_load_all for that.
+ * installed plugins. Use \ref slv2_plugins_load_all for that.
*/
void
-slv2_list_load_bundle(SLV2List list,
- const char* bundle_base_url);
+slv2_plugins_load_bundle(SLV2Plugins list,
+ const char* bundle_base_url);
/** Get the number of plugins in the list.
*/
size_t
-slv2_list_get_length(const SLV2List list);
+slv2_plugins_size(const SLV2Plugins list);
/** Get a plugin from the list by URI.
*
* Return value is shared (stored in \a list) and must not be freed or
* modified by the caller in any way.
+ * This functions is a search, slv2_plugins_get_at is
+ * significantly faster.
*
* \return NULL if plugin with \a url not found in \a list.
*/
const SLV2Plugin*
-slv2_list_get_plugin_by_uri(const SLV2List list,
- const char* uri);
+slv2_plugins_get_by_uri(const SLV2Plugins list,
+ const char* uri);
/** Get a plugin from the list by index.
*
* \a index has no significance. Any \a index not less than
- * slv2list_get_length(list) will return NULL. * All plugins in a list can
+ * slv2list_get_length(list) will return NULL. All plugins in a list can
* thus be easily enumerated by repeated calls to this function starting
* with \a index 0.
*
@@ -143,8 +145,8 @@ slv2_list_get_plugin_by_uri(const SLV2List list,
* \return NULL if \a index out of range.
*/
const SLV2Plugin*
-slv2_list_get_plugin_by_index(const SLV2List list,
- size_t index);
+slv2_plugins_get_at(const SLV2Plugins list,
+ size_t index);
/** @} */