From 081352a14c7c4f73113d9a491280e327eec14c83 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 21 Apr 2007 01:23:59 +0000 Subject: Changed "categories" to "plugin classes" to better match RDF. Renamed files to match API. git-svn-id: http://svn.drobilla.net/lad/slv2@466 a436a847-0d15-0410-975c-d299462d15a1 --- slv2/world.h | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'slv2/world.h') diff --git a/slv2/world.h b/slv2/world.h index 64f0fc2..59b0adc 100644 --- a/slv2/world.h +++ b/slv2/world.h @@ -19,7 +19,8 @@ #ifndef __SLV2_WORLD_H__ #define __SLV2_WORLD_H__ -#include +#include +#include #ifdef __cplusplus extern "C" { @@ -102,6 +103,16 @@ slv2_world_load_bundle(SLV2World world, const char* bundle_uri); +/** Return a list of all found plugin classes. + * + * Returned list is owned by world and must not be freed by the caller. + * + * Time = O(1) + */ +SLV2PluginClasses +slv2_world_get_plugin_classes(SLV2World world); + + /** Return a list of all found plugins. * * The returned list contains just enough references to query @@ -110,8 +121,8 @@ slv2_world_load_bundle(SLV2World world, * a query (at which time the data is cached with the SLV2Plugin so future * queries are very fast). * - * Returned plugins contain a reference to this world, world must not be - * destroyed until plugins are finished with. + * Returned list must be freed by user with slv2_plugins_free. The contained + * plugins are owned by \a world and must not be freed by caller. * * Time = O(1) */ @@ -125,8 +136,8 @@ slv2_world_get_all_plugins(SLV2World world); * \a include (a pointer to a function which takes an SLV2Plugin and returns * a bool) will be in the returned list. * - * Returned plugins contain a reference to this world, world must not be - * destroyed until plugins are finished with. + * Returned list must be freed by user with slv2_plugins_free. The contained + * plugins are owned by \a world and must not be freed by caller. * * Time = O(n * Time(include)) */ @@ -135,6 +146,18 @@ slv2_world_get_plugins_by_filter(SLV2World world, bool (*include)(SLV2Plugin)); +/** Return a list of found plugins in a given class. + * + * Returned list must be freed by user with slv2_plugins_free. The contained + * plugins are owned by \a world and must not be freed by caller. + * + * Time = O(n) + */ +SLV2Plugins +slv2_world_get_plugins_by_class(SLV2World world, + SLV2PluginClass plugin_class); + + #if 0 /** Get plugins filtered by a user-defined SPARQL query. * -- cgit v1.2.1