SLV2 0.6.6

- Main Page
- Modules
- Files

- File List

query.h
1 /* SLV2
2 * Copyright (C) 2008-2009 Dave Robillard <http://drobilla.net>
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; either version 2 of the License, or (at your option)
7 * any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #ifndef __SLV2_QUERY_H__
20 #define __SLV2_QUERY_H__
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
33 SLV2Results
34 slv2_plugin_query_sparql(SLV2Plugin plugin,
35 const char* sparql_str);
36
37
40 void
41 slv2_results_free(SLV2Results results);
42
43
49 unsigned
50 slv2_results_size(SLV2Results results);
51
52
55 bool
56 slv2_results_finished(SLV2Results results);
57
58
64 SLV2Value
65 slv2_results_get_binding_value(SLV2Results results, unsigned index);
66
67
73 SLV2Value
74 slv2_results_get_binding_value_by_name(SLV2Results results, const char* name);
75
76
81 const char*
82 slv2_results_get_binding_name(SLV2Results results, unsigned index);
83
84
87 void
88 slv2_results_next(SLV2Results results);
89
90
93 #ifdef __cplusplus
94 } /* extern "C" */
95 #endif
96
97 #endif /* __SLV2_QUERY_H__ */
slv2_results_finished
bool slv2_results_finished(SLV2Results results)
Return true iff the end of results has been reached.
slv2_results_get_binding_name
const char * slv2_results_get_binding_name(SLV2Results results, unsigned index)
Return the name of a binding in results.
slv2_results_get_binding_value
SLV2Value slv2_results_get_binding_value(SLV2Results results, unsigned index)
Return a binding in results by index.
slv2_plugin_query_sparql
SLV2Results slv2_plugin_query_sparql(SLV2Plugin plugin, const char *sparql_str)
Query a plugin with an arbitrary SPARQL string.
slv2_results_next
void slv2_results_next(SLV2Results results)
Increment results to the next match.
slv2_results_size
unsigned slv2_results_size(SLV2Results results)
Return the number of matches in results.
slv2_results_get_binding_value_by_name
SLV2Value slv2_results_get_binding_value_by_name(SLV2Results results, const char *name)
Return a binding in results by name.
slv2_results_free
void slv2_results_free(SLV2Results results)
Free query results.