diff options
author | David Robillard <d@drobilla.net> | 2007-02-19 00:46:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-02-19 00:46:59 +0000 |
commit | d3d736deba06ca2ef655858ac22d8267c5cc6363 (patch) | |
tree | 1f21bcdb93d2935a3641c7e150771688bb1b63bb /src/plugin.c | |
parent | 0153919a422e7a520c38f9cd01e9a079f73c80fd (diff) | |
download | lilv-d3d736deba06ca2ef655858ac22d8267c5cc6363.tar.gz lilv-d3d736deba06ca2ef655858ac22d8267c5cc6363.tar.bz2 lilv-d3d736deba06ca2ef655858ac22d8267c5cc6363.zip |
Header/API cleanups.
Removed public exposure of raptor/rasqal.
Redefined opaque types properly.
git-svn-id: http://svn.drobilla.net/lad/slv2@317 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 49 |
1 files changed, 17 insertions, 32 deletions
diff --git a/src/plugin.c b/src/plugin.c index 6571326..8918fa3 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -24,14 +24,13 @@ #include <rasqal.h> #include <slv2/plugin.h> #include <slv2/types.h> -#include <slv2/query.h> #include <slv2/util.h> #include <slv2/stringlist.h> #include "private_types.h" -SLV2Plugin* -slv2_plugin_duplicate(const SLV2Plugin* p) +SLV2Plugin +slv2_plugin_duplicate(SLV2Plugin p) { assert(p); struct _Plugin* result = malloc(sizeof(struct _Plugin)); @@ -47,7 +46,7 @@ slv2_plugin_duplicate(const SLV2Plugin* p) const char* -slv2_plugin_get_uri(const SLV2Plugin* p) +slv2_plugin_get_uri(SLV2Plugin p) { assert(p); return p->plugin_uri; @@ -55,7 +54,7 @@ slv2_plugin_get_uri(const SLV2Plugin* p) SLV2Strings -slv2_plugin_get_data_uris(const SLV2Plugin* p) +slv2_plugin_get_data_uris(SLV2Plugin p) { assert(p); return p->data_uris; @@ -63,7 +62,7 @@ slv2_plugin_get_data_uris(const SLV2Plugin* p) const char* -slv2_plugin_get_library_uri(const SLV2Plugin* p) +slv2_plugin_get_library_uri(SLV2Plugin p) { assert(p); return p->lib_uri; @@ -71,7 +70,7 @@ slv2_plugin_get_library_uri(const SLV2Plugin* p) bool -slv2_plugin_verify(const SLV2Plugin* plugin) +slv2_plugin_verify(SLV2Plugin plugin) { // FIXME: finish this (properly) @@ -96,7 +95,7 @@ slv2_plugin_verify(const SLV2Plugin* plugin) char* -slv2_plugin_get_name(const SLV2Plugin* plugin) +slv2_plugin_get_name(SLV2Plugin plugin) { char* result = NULL; SLV2Strings prop = slv2_plugin_get_value(plugin, "doap:name"); @@ -113,25 +112,11 @@ slv2_plugin_get_name(const SLV2Plugin* plugin) SLV2Strings -slv2_plugin_get_value(const SLV2Plugin* p, - const char* predicate) +slv2_plugin_get_value(SLV2Plugin p, + const char* predicate) { assert(predicate); - /* - char* header = slv2_query_header(p); - char* lang_filter = slv2_query_lang_filter("?value"); - - char* query_string = slv2_strjoin( - header, - "SELECT DISTINCT ?value WHERE { \n", - "plugin: ", property, " ?value . \n", - ((lang_filter != NULL) ? lang_filter : ""), - "}", 0); - - free(header); - free(lang_filter);*/ - char* query = slv2_strjoin( "SELECT DISTINCT ?value WHERE {\n" "plugin: ", predicate, " ?value .\n" @@ -146,21 +131,21 @@ slv2_plugin_get_value(const SLV2Plugin* p, SLV2Strings -slv2_plugin_get_properties(const SLV2Plugin* p) +slv2_plugin_get_properties(SLV2Plugin p) { return slv2_plugin_get_value(p, "lv2:pluginProperty"); } SLV2Strings -slv2_plugin_get_hints(const SLV2Plugin* p) +slv2_plugin_get_hints(SLV2Plugin p) { return slv2_plugin_get_value(p, "lv2:pluginHint"); } uint32_t -slv2_plugin_get_num_ports(const SLV2Plugin* p) +slv2_plugin_get_num_ports(SLV2Plugin p) { const char* const query = "SELECT DISTINCT ?port\n" @@ -171,7 +156,7 @@ slv2_plugin_get_num_ports(const SLV2Plugin* p) bool -slv2_plugin_has_latency(const SLV2Plugin* p) +slv2_plugin_has_latency(SLV2Plugin p) { const char* const query = "SELECT DISTINCT ?port WHERE {\n" @@ -190,7 +175,7 @@ slv2_plugin_has_latency(const SLV2Plugin* p) uint32_t -slv2_plugin_get_latency_port(const SLV2Plugin* p) +slv2_plugin_get_latency_port(SLV2Plugin p) { const char* const query = "SELECT DISTINCT ?value WHERE {\n" @@ -212,7 +197,7 @@ slv2_plugin_get_latency_port(const SLV2Plugin* p) SLV2Strings -slv2_plugin_get_supported_features(const SLV2Plugin* p) +slv2_plugin_get_supported_features(SLV2Plugin p) { const char* const query = "SELECT DISTINCT ?feature WHERE {\n" @@ -228,7 +213,7 @@ slv2_plugin_get_supported_features(const SLV2Plugin* p) SLV2Strings -slv2_plugin_get_optional_features(const SLV2Plugin* p) +slv2_plugin_get_optional_features(SLV2Plugin p) { const char* const query = "SELECT DISTINCT ?feature WHERE {\n" @@ -242,7 +227,7 @@ slv2_plugin_get_optional_features(const SLV2Plugin* p) SLV2Strings -slv2_plugin_get_required_features(const SLV2Plugin* p) +slv2_plugin_get_required_features(SLV2Plugin p) { const char* const query = "SELECT DISTINCT ?feature WHERE {\n" |