summaryrefslogtreecommitdiffstats
path: root/slv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-21 01:23:59 +0000
committerDavid Robillard <d@drobilla.net>2007-04-21 01:23:59 +0000
commit081352a14c7c4f73113d9a491280e327eec14c83 (patch)
tree41887d3ffce2709a6d0fd7a9ea72a99f54186475 /slv2
parent09e5c017b096bc84bbbc0b273baffd221144213a (diff)
downloadlilv-081352a14c7c4f73113d9a491280e327eec14c83.tar.gz
lilv-081352a14c7c4f73113d9a491280e327eec14c83.tar.bz2
lilv-081352a14c7c4f73113d9a491280e327eec14c83.zip
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
Diffstat (limited to 'slv2')
-rw-r--r--slv2/Makefile.am8
-rw-r--r--slv2/plugin.h8
-rw-r--r--slv2/pluginclass.h (renamed from slv2/category.h)30
-rw-r--r--slv2/pluginclasses.h (renamed from slv2/categories.h)32
-rw-r--r--slv2/plugins.h (renamed from slv2/pluginlist.h)6
-rw-r--r--slv2/port.h2
-rw-r--r--slv2/slv2.h6
-rw-r--r--slv2/strings.h (renamed from slv2/stringlist.h)6
-rw-r--r--slv2/types.h4
-rw-r--r--slv2/world.h33
10 files changed, 79 insertions, 56 deletions
diff --git a/slv2/Makefile.am b/slv2/Makefile.am
index 8e1b827..05fc432 100644
--- a/slv2/Makefile.am
+++ b/slv2/Makefile.am
@@ -5,12 +5,12 @@ slv2include_HEADERS = \
types.h \
slv2.h \
world.h \
- category.h \
- categories.h \
+ pluginclass.h \
+ pluginclasses.h \
plugin.h \
port.h \
- pluginlist.h \
+ plugins.h \
plugininstance.h \
- stringlist.h \
+ strings.h \
util.h
diff --git a/slv2/plugin.h b/slv2/plugin.h
index 4db5130..c8f4be0 100644
--- a/slv2/plugin.h
+++ b/slv2/plugin.h
@@ -27,7 +27,7 @@ extern "C" {
#include <stdbool.h>
#include <slv2/types.h>
#include <slv2/port.h>
-#include <slv2/stringlist.h>
+#include <slv2/strings.h>
/** \defgroup data Plugin data access
*
@@ -134,10 +134,10 @@ char*
slv2_plugin_get_name(SLV2Plugin plugin);
-/** Get the category this plugin belongs to.
+/** Get the class this plugin belongs to (ie Filters).
*/
-SLV2Category
-slv2_plugin_get_category(SLV2Plugin plugin);
+SLV2PluginClass
+slv2_plugin_get_class(SLV2Plugin plugin);
/** Get a value associated with the plugin in a plugin's data files.
diff --git a/slv2/category.h b/slv2/pluginclass.h
index 1d0159f..1124bd8 100644
--- a/slv2/category.h
+++ b/slv2/pluginclass.h
@@ -16,8 +16,8 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __SLV2_CATEGORY_H__
-#define __SLV2_CATEGORY_H__
+#ifndef __SLV2_PLUGIN_CLASS_H__
+#define __SLV2_PLUGIN_CLASS_H__
#ifdef __cplusplus
extern "C" {
@@ -30,35 +30,35 @@ extern "C" {
*/
-/** Get the URI of this category.
+/** Get the URI of this plugin class.
*
- * Returned value is owned by \a category and must not be freed by caller.
+ * Returned value is owned by \a plugin_class and must not be freed by caller.
*
* Time = O(1)
*/
-const char* slv2_category_get_uri(SLV2Category category);
+const char* slv2_plugin_class_get_uri(SLV2PluginClass plugin_class);
-/** Get the label of this category, ie "Oscillators".
+/** Get the label of this plugin_class, ie "Oscillators".
*
- * Returned value is owned by \a category and must not be freed by caller.
+ * Returned value is owned by \a plugin_class and must not be freed by caller.
*
* Time = O(1)
*/
-const char* slv2_category_get_label(SLV2Category category);
+const char* slv2_plugin_class_get_label(SLV2PluginClass plugin_class);
#if 0
-/** Get the path of this category, ie "Plugins/Generators/Oscillators".
+/** Get the path of this plugin_class, ie "Plugins/Generators/Oscillators".
*
- * SLV2 automatically generates an ideal category heirarchy given the plugins
- * present. The last fragment of the path is the category's label,
- * as returned by slv2_category_get_label.
+ * SLV2 automatically generates an ideal plugin_class heirarchy given the plugins
+ * present. The last fragment of the path is the plugin_class's label,
+ * as returned by slv2_plugin_class_get_label.
*
- * Returned value is owned by \a category and must not be freed by caller.
+ * Returned value is owned by \a plugin_class and must not be freed by caller.
*
* Time = O(1)
*/
-const char* slv2_category_get_path(SLV2Category category);
+const char* slv2_plugin_class_get_path(SLV2PluginClass plugin_class);
#endif
/** @} */
@@ -67,4 +67,4 @@ const char* slv2_category_get_path(SLV2Category category);
}
#endif
-#endif /* __SLV2_CATEGORY_H__ */
+#endif /* __SLV2_PLUGIN_CLASS_H__ */
diff --git a/slv2/categories.h b/slv2/pluginclasses.h
index 44b9aee..39177b8 100644
--- a/slv2/categories.h
+++ b/slv2/pluginclasses.h
@@ -16,20 +16,20 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __SLV2_CATEGORIES_H__
-#define __SLV2_CATEGORIES_H__
+#ifndef __SLV2_PLUGIN_CLASSES_H__
+#define __SLV2_PLUGIN_CLASSES_H__
-#include <slv2/category.h>
+#include <slv2/pluginclass.h>
#ifdef __cplusplus
extern "C" {
#endif
-typedef void* SLV2Categories;
+typedef void* SLV2PluginClasses;
-/** \defgroup categories Categories
+/** \defgroup plugin_classes Plugin classes (categories)
*
* @{
*/
@@ -37,10 +37,10 @@ typedef void* SLV2Categories;
/** Get the number of plugins in the list.
*/
unsigned
-slv2_categories_size(SLV2Categories list);
+slv2_plugin_classes_size(SLV2PluginClasses list);
-/** Get a category from the list by URI.
+/** Get a plugin class 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.
@@ -49,25 +49,25 @@ slv2_categories_size(SLV2Categories list);
*
* \return NULL if plugin with \a url not found in \a list.
*/
-SLV2Category
-slv2_categories_get_by_uri(SLV2Categories list,
- const char* uri);
+SLV2PluginClass
+slv2_plugin_classes_get_by_uri(SLV2PluginClasses list,
+ const char* uri);
/** Get a plugin from the list by index.
*
* \a index has no significance other than as an index into this list.
- * Any \a index not less than slv2_categories_get_length(list) will return NULL,
- * so all categories in a list can be enumerated by repeated calls
+ * Any \a index not less than slv2_plugin_classes_get_length(list) will return NULL,
+ * so all plugin_classes in a list can be enumerated by repeated calls
* to this function starting with \a index = 0.
*
* Time = O(1)
*
* \return NULL if \a index out of range.
*/
-SLV2Category
-slv2_categories_get_at(SLV2Categories list,
- unsigned index);
+SLV2PluginClass
+slv2_plugin_classes_get_at(SLV2PluginClasses list,
+ unsigned index);
/** @} */
@@ -76,5 +76,5 @@ slv2_categories_get_at(SLV2Categories list,
}
#endif
-#endif /* __SLV2_CATEGORIES_H__ */
+#endif /* __SLV2_PLUGIN_CLASSES_H__ */
diff --git a/slv2/pluginlist.h b/slv2/plugins.h
index a2978e1..7b9a5a3 100644
--- a/slv2/pluginlist.h
+++ b/slv2/plugins.h
@@ -16,8 +16,8 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __SLV2_PLUGINLIST_H__
-#define __SLV2_PLUGINLIST_H__
+#ifndef __SLV2_PLUGINS_H__
+#define __SLV2_PLUGINS_H__
#include <slv2/plugin.h>
@@ -91,5 +91,5 @@ slv2_plugins_get_at(SLV2Plugins list,
}
#endif
-#endif /* __SLV2_PLUGINLIST_H__ */
+#endif /* __SLV2_PLUGINS_H__ */
diff --git a/slv2/port.h b/slv2/port.h
index d415f84..165c1f1 100644
--- a/slv2/port.h
+++ b/slv2/port.h
@@ -26,7 +26,7 @@ extern "C" {
#include <slv2/types.h>
#include <slv2/plugin.h>
#include <slv2/port.h>
-#include <slv2/stringlist.h>
+#include <slv2/strings.h>
/** \addtogroup data
* @{
diff --git a/slv2/slv2.h b/slv2/slv2.h
index a052e56..2d89e4e 100644
--- a/slv2/slv2.h
+++ b/slv2/slv2.h
@@ -25,12 +25,12 @@ extern "C" {
#include <slv2/types.h>
#include <slv2/world.h>
-#include <slv2/category.h>
+#include <slv2/pluginclass.h>
#include <slv2/plugin.h>
#include <slv2/port.h>
-#include <slv2/pluginlist.h>
+#include <slv2/plugins.h>
#include <slv2/plugininstance.h>
-#include <slv2/stringlist.h>
+#include <slv2/strings.h>
#ifdef __cplusplus
diff --git a/slv2/stringlist.h b/slv2/strings.h
index eb613d6..5a16025 100644
--- a/slv2/stringlist.h
+++ b/slv2/strings.h
@@ -16,8 +16,8 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __SLV2_STRINGLIST_H__
-#define __SLV2_STRINGLIST_H__
+#ifndef __SLV2_STRINGS_H__
+#define __SLV2_STRINGS_H__
#include <stdbool.h>
@@ -80,5 +80,5 @@ slv2_strings_free(SLV2Strings);
}
#endif
-#endif /* __SLV2_STRINGLIST_H__ */
+#endif /* __SLV2_STRINGS_H__ */
diff --git a/slv2/types.h b/slv2/types.h
index f595dd1..42f2e59 100644
--- a/slv2/types.h
+++ b/slv2/types.h
@@ -56,8 +56,8 @@ typedef struct _Plugin* SLV2Plugin;
typedef struct _World* SLV2World;
-/** A plugin category. Opaque, but valid to compare to NULL. */
-typedef struct _Category* SLV2Category;
+/** A plugin class. Opaque, but valid to compare to NULL. */
+typedef struct _PluginClass* SLV2PluginClass;
#ifdef __cplusplus
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 <slv2/pluginlist.h>
+#include <slv2/plugins.h>
+#include <slv2/pluginclasses.h>
#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.
*