summaryrefslogtreecommitdiffstats
path: root/slv2/query.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-19 00:46:59 +0000
committerDavid Robillard <d@drobilla.net>2007-02-19 00:46:59 +0000
commitd3d736deba06ca2ef655858ac22d8267c5cc6363 (patch)
tree1f21bcdb93d2935a3641c7e150771688bb1b63bb /slv2/query.h
parent0153919a422e7a520c38f9cd01e9a079f73c80fd (diff)
downloadlilv-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 'slv2/query.h')
-rw-r--r--slv2/query.h130
1 files changed, 0 insertions, 130 deletions
diff --git a/slv2/query.h b/slv2/query.h
deleted file mode 100644
index ea78735..0000000
--- a/slv2/query.h
+++ /dev/null
@@ -1,130 +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_QUERY_H__
-#define __SLV2_QUERY_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rasqal.h>
-#include "plugin.h"
-#include "types.h"
-
-
-// FIXME: much of this should not be exposed
-
-
-/** \defgroup query SPARQL query helpers
- *
- * This part is in progress, incomplete, a random mishmash of crap that
- * evolved along with my understanding of this rasqal library. Nothing
- * to see here, move long now. Nothing to see here.
- *
- * Eventually this will contain functions that make it convenient for host
- * authors to query plugins in ways libslv2 doesn't nicely wrap (eg. for
- * extensions not (yet) supported by libslv2).
- *
- * @{
- */
-
-/** Return a header for a SPARQL query on the given plugin.
- *
- * The returned header defines the namespace prefixes used in the standard
- * (rdf: rdfs: doap: lv2:), plugin: as the plugin's URI, and data: as the
- * URL of the plugin's RDF (Turtle) data file.
- *
- * Example query to get a plugin's doap:name using this header:
- *
- * <code>
- * SELECT DISTINCT ?value FROM data: WHERE {
- * plugin: doap:name ?value
- * }
- * </code>
- *
- * \return an unsigned (UTF-8) string which must be free()'d.
- */
-char*
-slv2_query_header(const SLV2Plugin* p);
-
-
-/** Return a language filter for the given variable.
- *
- * If the environment variable $LANG is not set, returns NULL.
- *
- * \arg variable SPARQL variable, including "?" or "$" (eg "?value").
- *
- * This needs to be put inside the WHERE block, after the triples.
- *
- * eg. FILTER( LANG(?value) = "en" || LANG(?value) = "" )
- */
-char*
-slv2_query_lang_filter(const char* variable);
-
-
-rasqal_query_results*
-slv2_plugin_query(SLV2Plugin* plugin,
- const char* sparql_str);
-
-SLV2Strings
-slv2_plugin_simple_query(SLV2Plugin* plugin,
- const char* sparql_str,
- const char* variable);
-
-unsigned
-slv2_plugin_query_count(SLV2Plugin* plugin,
- const char* sparql_str);
-
-#if 0
-/** Run a SPARQL query on a plugin's data file and return variable matches.
- *
- * Header from slv2query_header will be prepended to passed query string (so
- * the default prefixes will be already defined, you don't need to add them
- * yourself).
- *
- * Returned is a list of all matches for the query variable \a var_name.
- */
-SLV2Strings
-slv2_query_get_results(const SLV2Plugin* p,
- const char* query_string,
- const char* var_name);
-
-/** Run a SPARQL query on a plugin's data file and just count the matches.
- *
- * Header from slv2query_header will be prepended to passed query string (so
- * the default prefixes will be already defined, you don't need to add them
- * yourself).
- *
- * Returned is the total of all variable matches resulting from the query.
- */
-size_t
-slv2_query_count_results(const SLV2Plugin* p,
- const char* query_string);
-#endif
-
-
-/** @} */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SLV2_QUERY_H__ */
-