summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--slv2/plugin.h2
-rw-r--r--slv2/pluginclasses.h83
-rw-r--r--slv2/plugins.h87
-rw-r--r--slv2/pluginuis.h87
-rw-r--r--slv2/port.h2
-rw-r--r--slv2/scalepoints.h73
-rw-r--r--slv2/slv2.h7
-rw-r--r--slv2/types.h1
-rw-r--r--slv2/values.h81
-rw-r--r--slv2/world.h3
-rw-r--r--src/plugin.c12
-rw-r--r--src/pluginclasses.c89
-rw-r--r--src/plugininstance.c5
-rw-r--r--src/plugins.c3
-rw-r--r--src/pluginui.c2
-rw-r--r--src/pluginuis.c92
-rw-r--r--src/port.c3
-rw-r--r--src/query.c8
-rw-r--r--src/scalepoints.c57
-rw-r--r--src/values.c77
-rw-r--r--wscript5
21 files changed, 22 insertions, 757 deletions
diff --git a/slv2/plugin.h b/slv2/plugin.h
index 8980f2e..56509ea 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/values.h"
+#include "slv2/collections.h"
/** \defgroup slv2_data Plugin data access
*
diff --git a/slv2/pluginclasses.h b/slv2/pluginclasses.h
deleted file mode 100644
index 7ad3455..0000000
--- a/slv2/pluginclasses.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* SLV2
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef __SLV2_PLUGIN_CLASSES_H__
-#define __SLV2_PLUGIN_CLASSES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "slv2/pluginclass.h"
-
-/** \addtogroup slv2_collections
- * @{
- */
-
-
-/** Free an SLV2PluginClasses.
- * Note that only certain plugin classes should be freed by the user
- * (as specified by the documentation of the slv2 function which returned it).
- */
-void slv2_plugin_classes_free(SLV2PluginClasses classes);
-
-
-/** Get the number of plugins in the collection.
- */
-unsigned
-slv2_plugin_classes_size(SLV2PluginClasses classes);
-
-
-/** Get a plugin class from the collection by URI.
- *
- * Return value is shared (stored in \a classes) and must not be freed or
- * modified by the caller in any way.
- *
- * Time = O(log2(n))
- *
- * \return NULL if plugin with \a url not found in \a classes.
- */
-SLV2PluginClass
-slv2_plugin_classes_get_by_uri(SLV2PluginClasses classes,
- SLV2Value uri);
-
-
-/** Get a plugin from the collection by index.
- *
- * \a index has no significance other than as an index into \a classes.
- * Any \a index not less than slv2_plugin_classes_get_length(classes) will return NULL,
- * so all plugin_classes in a classes 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.
- */
-SLV2PluginClass
-slv2_plugin_classes_get_at(SLV2PluginClasses classes,
- unsigned index);
-
-
-/** @} */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* __SLV2_PLUGIN_CLASSES_H__ */
-
diff --git a/slv2/plugins.h b/slv2/plugins.h
deleted file mode 100644
index 095bdbb..0000000
--- a/slv2/plugins.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* SLV2
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef __SLV2_PLUGINS_H__
-#define __SLV2_PLUGINS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "slv2/types.h"
-#include "slv2/plugin.h"
-
-/** \addtogroup slv2_collections
- * @{
- */
-
-
-/** Free a plugin plugins.
- *
- * Freeing a plugin collection does not destroy the plugins it contains
- * (plugins are owned by the world). \a plugins is invalid after this call.
- */
-void
-slv2_plugins_free(SLV2World world,
- SLV2Plugins plugins);
-
-
-/** Get the number of plugins in the collection.
- */
-unsigned
-slv2_plugins_size(SLV2Plugins plugins);
-
-
-/** Get a plugin from the collection by URI.
- *
- * Return value is shared (stored in \a plugins) and must not be freed or
- * modified by the caller in any way.
- *
- * Time = O(log2(n))
- *
- * \return NULL if plugin with \a url not found in \a plugins.
- */
-SLV2Plugin
-slv2_plugins_get_by_uri(SLV2Plugins plugins,
- SLV2Value uri);
-
-
-/** Get a plugin from the plugins by index.
- *
- * \a index has no significance other than as an index into this plugins.
- * Any \a index not less than slv2_plugins_get_length(plugins) will return NULL,
- * so all plugins in a plugins 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.
- */
-SLV2Plugin
-slv2_plugins_get_at(SLV2Plugins plugins,
- unsigned index);
-
-
-/** @} */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* __SLV2_PLUGINS_H__ */
-
diff --git a/slv2/pluginuis.h b/slv2/pluginuis.h
deleted file mode 100644
index 6df49a0..0000000
--- a/slv2/pluginuis.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* SLV2
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef __SLV2_PLUGIN_UIS_H__
-#define __SLV2_PLUGIN_UIS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "slv2/types.h"
-#include "slv2/plugin.h"
-
-/** \addtogroup slv2_collections
- *
- * @{
- */
-
-
-/** Free a plugin list.
- *
- * Freeing a plugin list does not destroy the plugins it contains (plugins
- * are owned by the world). \a list is invalid after this call.
- */
-void
-slv2_uis_free(SLV2UIs list);
-
-
-/** Get the number of plugins in the list.
- */
-unsigned
-slv2_uis_size(SLV2UIs 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.
- *
- * Time = O(log2(n))
- *
- * \return NULL if plugin with \a url not found in \a list.
- */
-SLV2UI
-slv2_uis_get_by_uri(SLV2UIs list,
- SLV2Value 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_list_get_length(list) will return NULL,
- * so all plugins 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.
- */
-SLV2UI
-slv2_uis_get_at(SLV2UIs list,
- unsigned index);
-
-
-/** @} */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* __SLV2_PLUGIN_UIS_H__ */
-
diff --git a/slv2/port.h b/slv2/port.h
index be6e03b..498da54 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/values.h"
+#include "slv2/collections.h"
/** \addtogroup slv2_data
* @{
diff --git a/slv2/scalepoints.h b/slv2/scalepoints.h
deleted file mode 100644
index fe1f121..0000000
--- a/slv2/scalepoints.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* SLV2
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef __SLV2_SCALE_POINTS_H__
-#define __SLV2_SCALE_POINTS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdbool.h>
-#include "slv2/value.h"
-
-/** \defgroup slv2_collections Collections of scale_points/objects
- *
- * Ordered collections of typed scale_points which are fast for random
- * access by index (i.e. a fancy array).
- *
- * @{
- */
-
-
-/** Allocate a new, empty SLV2ScalePoints
- */
-SLV2ScalePoints
-slv2_scale_points_new();
-
-
-/** Free an SLV2ScalePoints.
- */
-void
-slv2_scale_points_free(SLV2ScalePoints points);
-
-
-/** Get the number of scale points in a collection.
- */
-unsigned
-slv2_scale_points_size(SLV2ScalePoints points);
-
-
-/** Get the scale point at the given index in a collection.
- *
- * @return the element at \a index, or NULL if index is out of range.
- *
- * Time = O(1)
- */
-SLV2ScalePoint
-slv2_scale_points_get_at(SLV2ScalePoints points, unsigned index);
-
-
-/** @} */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* __SLV2_SCALE_POINTS_H__ */
-
diff --git a/slv2/slv2.h b/slv2/slv2.h
index a84165b..4381259 100644
--- a/slv2/slv2.h
+++ b/slv2/slv2.h
@@ -23,20 +23,17 @@
extern "C" {
#endif
+#include "slv2/collections.h"
#include "slv2/plugin.h"
#include "slv2/pluginclass.h"
#include "slv2/plugininstance.h"
-#include "slv2/plugins.h"
#include "slv2/pluginui.h"
#include "slv2/pluginuiinstance.h"
-#include "slv2/pluginuis.h"
#include "slv2/port.h"
+#include "slv2/scalepoint.h"
#include "slv2/types.h"
#include "slv2/util.h"
#include "slv2/value.h"
-#include "slv2/values.h"
-#include "slv2/scalepoint.h"
-#include "slv2/scalepoints.h"
#include "slv2/world.h"
#ifdef __cplusplus
diff --git a/slv2/types.h b/slv2/types.h
index fa98940..d17568f 100644
--- a/slv2/types.h
+++ b/slv2/types.h
@@ -24,6 +24,7 @@ extern "C" {
#endif
#include <stdint.h>
+#include <stdbool.h>
#define SLV2_NAMESPACE_LV2 "http://lv2plug.in/ns/lv2core#"
#define SLV2_PORT_CLASS_PORT "http://lv2plug.in/ns/lv2core#Port"
diff --git a/slv2/values.h b/slv2/values.h
deleted file mode 100644
index b0ec3e3..0000000
--- a/slv2/values.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* SLV2
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef __SLV2_VALUES_H__
-#define __SLV2_VALUES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdbool.h>
-#include "slv2/value.h"
-
-/** \defgroup slv2_collections Collections of values/objects
- *
- * Ordered collections of typed values which are fast for random
- * access by index (i.e. a fancy array).
- *
- * @{
- */
-
-
-/** Allocate a new, empty SLV2Values
- */
-SLV2Values
-slv2_values_new();
-
-
-/** Free an SLV2Values.
- */
-void
-slv2_values_free(SLV2Values values);
-
-
-/** Get the number of elements in a value collection.
- */
-unsigned
-slv2_values_size(SLV2Values values);
-
-
-/** Get the value at a given index in the collection.
- *
- * @return the element at \a index, or NULL if index is out of range.
- *
- * Time = O(1)
- */
-SLV2Value
-slv2_values_get_at(SLV2Values values, unsigned index);
-
-
-/** Return whether \a values contains \a value.
- *
- * Time = O(n)
- */
-bool
-slv2_values_contains(SLV2Values values, SLV2Value value);
-
-
-/** @} */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* __SLV2_VALUES_H__ */
-
diff --git a/slv2/world.h b/slv2/world.h
index 6028ca8..0e6106c 100644
--- a/slv2/world.h
+++ b/slv2/world.h
@@ -24,8 +24,7 @@ extern "C" {
#endif
#include <librdf.h>
-#include "slv2/plugins.h"
-#include "slv2/pluginclasses.h"
+#include "slv2/collections.h"
/** \defgroup slv2_world Global library state
*
diff --git a/src/plugin.c b/src/plugin.c
index 870a32e..ae2f8f3 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -18,19 +18,17 @@
#define _XOPEN_SOURCE 500
+#include <assert.h>
#include <math.h>
-#include <string.h>
#include <stdlib.h>
-#include <assert.h>
+#include <string.h>
#include <librdf.h>
-#include "slv2_internal.h"
+#include "slv2/collections.h"
#include "slv2/plugin.h"
+#include "slv2/pluginclass.h"
#include "slv2/types.h"
#include "slv2/util.h"
-#include "slv2/values.h"
-#include "slv2/pluginclass.h"
-#include "slv2/pluginclasses.h"
-#include "slv2/pluginuis.h"
+#include "slv2_internal.h"
/* private
diff --git a/src/pluginclasses.c b/src/pluginclasses.c
deleted file mode 100644
index 1e7e69c..0000000
--- a/src/pluginclasses.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* SLV2
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#define _XOPEN_SOURCE 500
-
-#include <string.h>
-#include <limits.h>
-#include <librdf.h>
-#include "slv2_internal.h"
-#include "slv2/value.h"
-#include "slv2/pluginclass.h"
-#include "slv2/pluginclasses.h"
-
-
-SLV2PluginClasses
-slv2_plugin_classes_new()
-{
- return raptor_new_sequence((void (*)(void*))&slv2_plugin_class_free, NULL);
-}
-
-
-void
-slv2_plugin_classes_free(SLV2PluginClasses list)
-{
- if (list)
- raptor_free_sequence(list);
-}
-
-
-unsigned
-slv2_plugin_classes_size(SLV2PluginClasses list)
-{
- return (list ? raptor_sequence_size(list) : 0);
-}
-
-
-SLV2PluginClass
-slv2_plugin_classes_get_by_uri(SLV2PluginClasses list, SLV2Value uri)
-{
- // good old fashioned binary search
-
- int lower = 0;
- int upper = raptor_sequence_size(list) - 1;
- int i;
-
- while (upper >= lower) {
- i = lower + ((upper - lower) / 2);
-
- SLV2PluginClass p = raptor_sequence_get_at(list, i);
-
- const int cmp = strcmp(slv2_value_as_uri(slv2_plugin_class_get_uri(p)),
- slv2_value_as_uri(uri));
-
- if (cmp == 0)
- return p;
- else if (cmp > 0)
- upper = i - 1;
- else
- lower = i + 1;
- }
-
- return NULL;
-}
-
-
-SLV2PluginClass
-slv2_plugin_classes_get_at(SLV2PluginClasses list, unsigned index)
-{
- if (index > INT_MAX)
- return NULL;
- else
- return (SLV2PluginClass)raptor_sequence_get_at(list, (int)index);
-}
-
diff --git a/src/plugininstance.c b/src/plugininstance.c
index 446a351..c3e0601 100644
--- a/src/plugininstance.c
+++ b/src/plugininstance.c
@@ -23,10 +23,11 @@
#include <string.h>
#include <assert.h>
#include <dlfcn.h>
-#include "slv2/types.h"
#include "slv2/plugin.h"
#include "slv2/plugininstance.h"
+#include "slv2/types.h"
#include "slv2/util.h"
+#include "slv2/value.h"
#include "slv2_internal.h"
@@ -66,7 +67,7 @@ slv2_plugin_instantiate(SLV2Plugin plugin,
} else {
// Search for plugin by URI
- // FIXME: Kluge to get bundle path (containing directory of binary)
+ // FIXME: Kludge to get bundle path (containing directory of binary)
const char* bundle_path = slv2_uri_to_path(slv2_value_as_uri(
slv2_plugin_get_bundle_uri(plugin)));
diff --git a/src/plugins.c b/src/plugins.c
index 1af7a25..f392bcd 100644
--- a/src/plugins.c
+++ b/src/plugins.c
@@ -25,8 +25,7 @@
#include <librdf.h>
#include "slv2/types.h"
#include "slv2/plugin.h"
-#include "slv2/plugins.h"
-#include "slv2/values.h"
+#include "slv2/collections.h"
#include "slv2/util.h"
#include "slv2_internal.h"
diff --git a/src/pluginui.c b/src/pluginui.c
index 606451e..fb87f63 100644
--- a/src/pluginui.c
+++ b/src/pluginui.c
@@ -21,7 +21,7 @@
#include <assert.h>
#include <string.h>
#include <stdlib.h>
-#include "slv2/values.h"
+#include "slv2/collections.h"
#include "slv2_internal.h"
diff --git a/src/pluginuis.c b/src/pluginuis.c
deleted file mode 100644
index 8cc14a2..0000000
--- a/src/pluginuis.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* SLV2
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#define _XOPEN_SOURCE 500
-#include <string.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <librdf.h>
-#include "slv2/types.h"
-#include "slv2/pluginuis.h"
-#include "slv2/pluginui.h"
-#include "slv2/util.h"
-#include "slv2_internal.h"
-
-
-SLV2UIs
-slv2_uis_new()
-{
- return raptor_new_sequence((void (*)(void*))&slv2_ui_free, NULL);
-}
-
-
-void
-slv2_uis_free(SLV2UIs list)
-{
- if (list)
- raptor_free_sequence(list);
-}
-
-
-unsigned
-slv2_uis_size(SLV2UIs list)
-{
- return (list ? raptor_sequence_size(list) : 0);
-}
-
-
-SLV2UI
-slv2_uis_get_by_uri(SLV2UIs list, SLV2Value uri)
-{
- // good old fashioned binary search
-
- int lower = 0;
- int upper = raptor_sequence_size(list) - 1;
- int i;
-
- while (upper >= lower) {
- i = lower + ((upper - lower) / 2);
-
- SLV2UI ui = raptor_sequence_get_at(list, i);
-
- const int cmp = strcmp(slv2_value_as_uri(slv2_ui_get_uri(ui)),
- slv2_value_as_uri(uri));
-
- if (cmp == 0)
- return ui;
- else if (cmp > 0)
- upper = i - 1;
- else
- lower = i + 1;
- }
-
- return NULL;
-}
-
-
-SLV2UI
-slv2_uis_get_at(SLV2UIs list, unsigned index)
-{
- if (index > INT_MAX)
- return NULL;
- else
- return (SLV2UI)raptor_sequence_get_at(list, (int)index);
-}
-
diff --git a/src/port.c b/src/port.c
index 3429f62..50cb946 100644
--- a/src/port.c
+++ b/src/port.c
@@ -25,8 +25,7 @@
#include "slv2/port.h"
#include "slv2/types.h"
#include "slv2/util.h"
-#include "slv2/values.h"
-#include "slv2/scalepoints.h"
+#include "slv2/collections.h"
#include "slv2_internal.h"
diff --git a/src/query.c b/src/query.c
index f32c4e0..c9d0d14 100644
--- a/src/query.c
+++ b/src/query.c
@@ -17,15 +17,15 @@
*/
#define _XOPEN_SOURCE 500
-#include <string.h>
-#include <stdlib.h>
#include <assert.h>
#include <librdf.h>
-#include <locale.h>
#include <limits.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include "slv2/collections.h"
#include "slv2/plugin.h"
#include "slv2/util.h"
-#include "slv2/values.h"
#include "slv2_internal.h"
diff --git a/src/scalepoints.c b/src/scalepoints.c
deleted file mode 100644
index 911c3e2..0000000
--- a/src/scalepoints.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* SLV2
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <raptor.h>
-#include "slv2/scalepoints.h"
-#include "slv2_internal.h"
-
-
-SLV2ScalePoints
-slv2_scale_points_new()
-{
- return raptor_new_sequence((void (*)(void*))&slv2_scale_point_free, NULL);
-}
-
-
-void
-slv2_scale_points_free(SLV2ScalePoints points)
-{
- if (points)
- raptor_free_sequence(points);
-}
-
-
-unsigned
-slv2_scale_points_size(SLV2ScalePoints points)
-{
- return (points ? raptor_sequence_size(points) : 0);
-}
-
-
-SLV2ScalePoint
-slv2_scale_points_get_at(SLV2ScalePoints points, unsigned index)
-{
- if (index > INT_MAX)
- return NULL;
- else
- return (SLV2ScalePoint)raptor_sequence_get_at(points, (int)index);
-}
-
diff --git a/src/values.c b/src/values.c
deleted file mode 100644
index 7f3df3c..0000000
--- a/src/values.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* SLV2
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <raptor.h>
-#include "slv2/values.h"
-#include "slv2_internal.h"
-
-
-SLV2Values
-slv2_values_new()
-{
- return raptor_new_sequence((void (*)(void*))&slv2_value_free, NULL);
-}
-
-
-void
-slv2_values_free(SLV2Values list)
-{
- if (list)
- raptor_free_sequence(list);
-}
-
-
-unsigned
-slv2_values_size(SLV2Values list)
-{
- return (list ? raptor_sequence_size(list) : 0);
-}
-
-
-SLV2Value
-slv2_values_get_at(SLV2Values list, unsigned index)
-{
- if (index > INT_MAX)
- return NULL;
- else
- return (SLV2Value)raptor_sequence_get_at(list, (int)index);
-}
-
-
-/* private */
-void
-slv2_values_set_at(SLV2Values list, unsigned index, void* value)
-{
- if (index <= INT_MAX)
- raptor_sequence_set_at(list, index, value);
-}
-
-
-bool
-slv2_values_contains(SLV2Values list, SLV2Value value)
-{
- for (unsigned i=0; i < slv2_values_size(list); ++i)
- if (slv2_value_equals(slv2_values_get_at(list, i), value))
- return true;
-
- return false;
-}
-
diff --git a/wscript b/wscript
index fe6559d..a9567a2 100644
--- a/wscript
+++ b/wscript
@@ -70,21 +70,18 @@ def build(bld):
autowaf.build_pc(bld, 'SLV2', SLV2_VERSION, ['REDLAND'])
lib_source = '''
+ src/collections.c
src/plugin.c
src/pluginclass.c
- src/pluginclasses.c
src/plugininstance.c
src/plugins.c
src/pluginui.c
src/pluginuiinstance.c
- src/pluginuis.c
src/port.c
src/query.c
src/scalepoint.c
- src/scalepoints.c
src/util.c
src/value.c
- src/values.c
src/world.c
'''