summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--slv2/value.h24
-rw-r--r--slv2/world.h39
-rw-r--r--src/plugin.c20
-rw-r--r--src/plugins.c15
-rw-r--r--src/port.c13
-rw-r--r--src/slv2_internal.h3
-rw-r--r--src/world.c60
7 files changed, 0 insertions, 174 deletions
diff --git a/slv2/value.h b/slv2/value.h
index 4a71cad..80e428a 100644
--- a/slv2/value.h
+++ b/slv2/value.h
@@ -124,30 +124,6 @@ const char*
slv2_value_as_uri(SLV2Value value);
-#if 0
-/** Return whether the value is a QName ("qualified name", a prefixed URI).
- *
- * A QName will return true for both this, and slv2_value_is_uri.
- * slv2_value_as_uri and slv2_value_as_qname will both return appropriately.
- *
- * Time = O(1)
- */
-bool
-slv2_value_is_qname(SLV2Value value);
-
-
-/** Return this value as a QName string, e.g. "lv2:Plugin".
- *
- * Valid to call only if slv2_value_is_qname(\a value) returns true.
- * Returned value is owned by \a value and must not be freed by caller.
- *
- * Time = O(1)
- */
-const char*
-slv2_value_as_qname(SLV2Value value);
-#endif
-
-
/** Return whether this value is a literal (i.e. not a URI).
*
* Returns true if \a value is a string or numeric value.
diff --git a/slv2/world.h b/slv2/world.h
index bb84868..060b2f0 100644
--- a/slv2/world.h
+++ b/slv2/world.h
@@ -170,45 +170,6 @@ slv2_world_get_plugins_by_filter(SLV2World world,
bool (*include)(SLV2Plugin));
-#if 0
-/** 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);
-#endif
-
-#if 0
-/** Get plugins filtered by a user-defined SPARQL query.
- *
- * This is much faster than using slv2_world_get_plugins_by_filter with a
- * filter function which calls the various slv2_plugin_* functions.
- *
- * \param query A valid SPARQL query which SELECTs a single variable, which
- * should match the URI of plugins to be loaded.
- *
- * \b Example: Get all plugins with at least 1 audio input and output:
-<tt> \verbatim
-PREFIX : <http://lv2plug.in/ns/lv2core#>
-SELECT DISTINCT ?plugin WHERE {
- ?plugin :port [ a :AudioPort; a :InputPort ] ;
- :port [ a :AudioPort; a :OutputPort ] .
-}
-\endverbatim </tt>
- *
- * Returned plugins contain a reference to this world, world must not be
- * destroyed until plugins are finished with.
- */
-SLV2Plugins
-slv2_world_get_plugins_by_query(SLV2World world,
- const char* query);
-#endif
-
/** @} */
#ifdef __cplusplus
diff --git a/src/plugin.c b/src/plugin.c
index 0be7c52..cc62ea8 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -106,24 +106,6 @@ slv2_plugin_free(SLV2Plugin p)
}
-/** comparator for sorting */
-#if 0
-static int
-slv2_port_compare_by_index(const void* a, const void* b)
-{
- SLV2Port port_a = *(SLV2Port*)a;
- SLV2Port port_b = *(SLV2Port*)b;
-
- if (port_a->index < port_b->index)
- return -1;
- else if (port_a->index == port_b->index)
- return 0;
- else //if (port_a->index > port_b->index)
- return 1;
-}
-#endif
-
-
/* private */
void
slv2_plugin_load_if_necessary(SLV2Plugin p)
@@ -206,8 +188,6 @@ slv2_plugin_load_ports_if_necessary(SLV2Plugin p)
void
slv2_plugin_load(SLV2Plugin p)
{
- //printf("Loading cache for %s\n", slv2_value_as_string(p->plugin_uri));
-
if (!p->storage) {
assert(!p->rdf);
p->storage = slv2_world_new_storage(p->world);
diff --git a/src/plugins.c b/src/plugins.c
index 4aee191..73fb20d 100644
--- a/src/plugins.c
+++ b/src/plugins.c
@@ -33,7 +33,6 @@
SLV2Plugins
slv2_plugins_new()
{
- //return raptor_new_sequence((void (*)(void*))&slv2_plugin_free, NULL);
return raptor_new_sequence(NULL, NULL);
}
@@ -45,20 +44,6 @@ slv2_plugins_free(SLV2World world, SLV2Plugins list)
raptor_free_sequence(list);
}
-#if 0
-void
-slv2_plugins_filter(SLV2Plugins dest, SLV2Plugins source, bool (*include)(SLV2Plugin))
-{
- assert(dest);
-
- for (int i=0; i < raptor_sequence_size(source); ++i) {
- SLV2Plugin p = raptor_sequence_get_at(source, i);
- if (include(p))
- raptor_sequence_push(dest, slv2_plugin_duplicate(p));
- }
-}
-#endif
-
unsigned
slv2_plugins_size(SLV2Plugins list)
diff --git a/src/port.c b/src/port.c
index 383bf67..63f622d 100644
--- a/src/port.c
+++ b/src/port.c
@@ -52,19 +52,6 @@ slv2_port_free(SLV2Port port)
}
-/* private */
-#if 0
-SLV2Port
-slv2_port_duplicate(SLV2Port port)
-{
- SLV2Port ret = malloc(sizeof(struct _SLV2Port));
- ret->index = port->index;
- ret->symbol = slv2_value_duplicate(port->symbol);
- return ret;
-}
-#endif
-
-
bool
slv2_port_is_a(SLV2Plugin plugin,
SLV2Port port,
diff --git a/src/slv2_internal.h b/src/slv2_internal.h
index 4202b92..9e3bdb5 100644
--- a/src/slv2_internal.h
+++ b/src/slv2_internal.h
@@ -50,7 +50,6 @@ struct _SLV2Port {
SLV2Port slv2_port_new(SLV2World world, uint32_t index, const char* symbol);
-//SLV2Port slv2_port_duplicate(SLV2Port port);
void slv2_port_free(SLV2Port port);
@@ -66,9 +65,7 @@ struct _SLV2Plugin {
SLV2Value plugin_uri;
SLV2Value bundle_uri; ///< Bundle directory plugin was loaded from
SLV2Value binary_uri; ///< lv2:binary
-//#ifdef SLV2_DYN_MANIFEST
SLV2Value dynman_uri; ///< dynamic manifest binary
-//#endif
SLV2PluginClass plugin_class;
raptor_sequence* data_uris; ///< rdfs::seeAlso
SLV2Port* ports;
diff --git a/src/world.c b/src/world.c
index e057fd5..cec9feb 100644
--- a/src/world.c
+++ b/src/world.c
@@ -730,27 +730,6 @@ slv2_world_load_all(SLV2World world)
}
-#if 0
-void
-slv2_world_serialize(const char* filename)
-{
- librdf_uri* lv2_uri = librdf_new_uri(slv2_rdf_world,
- (unsigned char*)"http://lv2plug.in/ns/lv2core#");
-
- librdf_uri* rdfs_uri = librdf_new_uri(slv2_rdf_world,
- (unsigned char*)"http://www.w3.org/2000/01/rdf-schema#");
-
- // Write out test file
- librdf_serializer* serializer = librdf_new_serializer(slv2_rdf_world,
- "turtle", NULL, NULL);
- librdf_serializer_set_namespace(serializer, lv2_uri, "");
- librdf_serializer_set_namespace(serializer, rdfs_uri, "rdfs");
- librdf_serializer_serialize_world_to_file(serializer, filename, NULL, slv2_model);
- librdf_free_serializer(serializer);
-}
-#endif
-
-
SLV2PluginClass
slv2_world_get_plugin_class(SLV2World world)
{
@@ -786,42 +765,3 @@ slv2_world_get_plugins_by_filter(SLV2World world, bool (*include)(SLV2Plugin))
return result;
}
-
-#if 0
-SLV2Plugins
-slv2_world_get_plugins_by_query(SLV2World world, const char* query)
-{
- SLV2Plugins list = slv2_plugins_new();
-
- librdf_query* rq = librdf_new_query(world->world, "sparql",
- NULL, (const unsigned char*)query, NULL);
-
- librdf_query_results* results = librdf_query_execute(rq, world->model);
-
- while (!librdf_query_results_finished(results)) {
- librdf_node* plugin_node = librdf_query_results_get_binding_value(results, 0);
- librdf_uri* plugin_uri = librdf_node_get_uri(plugin_node);
-
- SLV2Plugin plugin = slv2_plugins_get_by_uri(list,
- (const char*)librdf_uri_as_string(plugin_uri));
-
- /* Create a new SLV2Plugin */
- if (!plugin) {
- SLV2Plugin new_plugin = slv2_plugin_new(world, plugin_uri);
- raptor_sequence_push(list, new_plugin);
- }
-
- librdf_free_node(plugin_node);
-
- librdf_query_results_next(results);
- }
-
- if (results)
- librdf_free_query_results(results);
-
- librdf_free_query(rq);
-
- return list;
-}
-#endif
-