Debian Codegraph @

docs/html/rasqal-section-general.html

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>General library facilities</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Rasqal RDF Query Library Manual">
8 <link rel="up" href="reference-manual.html" title="Part I. Reference Manual">
9 <link rel="prev" href="reference-manual.html" title="Part I. Reference Manual">
10 <link rel="next" href="rasqal-section-data.html" title="Data Graphs">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="reference-manual.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">Rasqal RDF Query Library Manual</th>
21 <td><a accesskey="n" href="rasqal-section-data.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#rasqal-section-general.synopsis" class="shortcut">Top</a>
25  | 
26 <a href="#rasqal-section-general.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="rasqal-section-general"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="rasqal-section-general.top_of_page"></a>General library facilities</span></h2>
34 <p>General library facilities — Startup and shutdown, memory handling, version checks and misc functions.</p>
35 </td>
36 <td valign="top" align="right"></td>
37 </tr></table></div>
38 <div class="refsynopsisdiv">
39 <a name="rasqal-section-general.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">typedef <a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world">rasqal_world</a>;
41 <span class="returnvalue">void</span> <a class="link" href="rasqal-section-general.html#rasqal-free-world" title="rasqal_free_world ()">rasqal_free_world</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>);
42 <a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="returnvalue">rasqal_world</span></a> * <a class="link" href="rasqal-section-general.html#rasqal-new-world" title="rasqal_new_world ()">rasqal_new_world</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
43 <span class="returnvalue">int</span> <a class="link" href="rasqal-section-general.html#rasqal-world-open" title="rasqal_world_open ()">rasqal_world_open</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>);
44 <span class="returnvalue">void</span> <a class="link" href="rasqal-section-general.html#rasqal-world-set-log-handler" title="rasqal_world_set_log_handler ()">rasqal_world_set_log_handler</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
45 <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
46 <em class="parameter"><code><span class="type">raptor_log_handler</span> handler</code></em>);
47 <span class="returnvalue">int</span> <a class="link" href="rasqal-section-general.html#rasqal-world-set-warning-level" title="rasqal_world_set_warning_level ()">rasqal_world_set_warning_level</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
48 <em class="parameter"><code>unsigned <span class="type">int</span> warning_level</code></em>);
49 <span class="returnvalue">raptor_world</span> * <a class="link" href="rasqal-section-general.html#rasqal-world-get-raptor" title="rasqal_world_get_raptor ()">rasqal_world_get_raptor</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>);
50 <span class="returnvalue">void</span> <a class="link" href="rasqal-section-general.html#rasqal-world-set-raptor" title="rasqal_world_set_raptor ()">rasqal_world_set_raptor</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
51 <em class="parameter"><code><span class="type">raptor_world</span> *raptor_world_ptr</code></em>);
52 const <span class="returnvalue">raptor_syntax_description</span> * <a class="link" href="rasqal-section-general.html#rasqal-world-get-query-language-description" title="rasqal_world_get_query_language_description ()">rasqal_world_get_query_language_description</a>
53 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
54 <em class="parameter"><code>unsigned <span class="type">int</span> counter</code></em>);
55 const <span class="returnvalue">raptor_syntax_description</span> * <a class="link" href="rasqal-section-general.html#rasqal-world-get-query-results-format-description" title="rasqal_world_get_query_results_format_description ()">rasqal_world_get_query_results_format_description</a>
56 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
57 <em class="parameter"><code>unsigned <span class="type">int</span> counter</code></em>);
58 <span class="returnvalue">char</span> * (<a class="link" href="rasqal-section-general.html#rasqal-generate-bnodeid-handler" title="rasqal_generate_bnodeid_handler ()">*rasqal_generate_bnodeid_handler</a>) (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
59 <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
60 <em class="parameter"><code>unsigned <span class="type">char</span> *user_bnodeid</code></em>);
61 <span class="returnvalue">int</span> <a class="link" href="rasqal-section-general.html#rasqal-world-set-generate-bnodeid-handler" title="rasqal_world_set_generate_bnodeid_handler ()">rasqal_world_set_generate_bnodeid_handler</a>
62 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
63 <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
64 <em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-generate-bnodeid-handler" title="rasqal_generate_bnodeid_handler ()"><span class="type">rasqal_generate_bnodeid_handler</span></a> handler</code></em>);
65 <span class="returnvalue">int</span> <a class="link" href="rasqal-section-general.html#rasqal-world-set-default-generate-bnodeid-parameters" title="rasqal_world_set_default_generate_bnodeid_parameters ()">rasqal_world_set_default_generate_bnodeid_parameters</a>
66 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
67 <em class="parameter"><code><span class="type">char</span> *prefix</code></em>,
68 <em class="parameter"><code><span class="type">int</span> base</code></em>);
69 const <span class="returnvalue">char</span> * <a class="link" href="rasqal-section-general.html#rasqal-world-guess-query-results-format-name" title="rasqal_world_guess_query_results_format_name ()">rasqal_world_guess_query_results_format_name</a>
70 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
71 <em class="parameter"><code><span class="type">raptor_uri</span> *uri</code></em>,
72 <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
73 <em class="parameter"><code>const <span class="type">char</span> *buffer</code></em>,
74 <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
75 <em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>);
76 extern const unsigned int <a class="link" href="rasqal-section-general.html#rasqal-version-decimal" title="rasqal_version_decimal">rasqal_version_decimal</a>;
77 extern const unsigned int <a class="link" href="rasqal-section-general.html#rasqal-version-major" title="rasqal_version_major">rasqal_version_major</a>;
78 extern const unsigned int <a class="link" href="rasqal-section-general.html#rasqal-version-minor" title="rasqal_version_minor">rasqal_version_minor</a>;
79 extern const unsigned int <a class="link" href="rasqal-section-general.html#rasqal-version-release" title="rasqal_version_release">rasqal_version_release</a>;
80 extern const char * const <a class="link" href="rasqal-section-general.html#rasqal-version-string" title="rasqal_version_string">rasqal_version_string</a>;
81 extern const char * const <a class="link" href="rasqal-section-general.html#rasqal-copyright-string" title="rasqal_copyright_string">rasqal_copyright_string</a>;
82 extern const char * const <a class="link" href="rasqal-section-general.html#rasqal-short-copyright-string" title="rasqal_short_copyright_string">rasqal_short_copyright_string</a>;
83 extern const char * const <a class="link" href="rasqal-section-general.html#rasqal-home-url-string" title="rasqal_home_url_string">rasqal_home_url_string</a>;
84 extern const char * const <a class="link" href="rasqal-section-general.html#rasqal-license-string" title="rasqal_license_string">rasqal_license_string</a>;
85 enum <a class="link" href="rasqal-section-general.html#rasqal-feature" title="enum rasqal_feature">rasqal_feature</a>;
86 <span class="returnvalue">int</span> <a class="link" href="rasqal-section-general.html#rasqal-language-name-check" title="rasqal_language_name_check ()">rasqal_language_name_check</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
87 <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
88 <span class="returnvalue">int</span> <a class="link" href="rasqal-section-general.html#rasqal-languages-enumerate" title="rasqal_languages_enumerate ()">rasqal_languages_enumerate</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
89 <em class="parameter"><code>unsigned <span class="type">int</span> counter</code></em>,
90 <em class="parameter"><code>const <span class="type">char</span> **name</code></em>,
91 <em class="parameter"><code>const <span class="type">char</span> **label</code></em>,
92 <em class="parameter"><code>const unsigned <span class="type">char</span> **uri_string</code></em>);
93 <span class="returnvalue">void</span> * <a class="link" href="rasqal-section-general.html#rasqal-alloc-memory" title="rasqal_alloc_memory ()">rasqal_alloc_memory</a> (<em class="parameter"><code><span class="type">size_t</span> size</code></em>);
94 <span class="returnvalue">void</span> * <a class="link" href="rasqal-section-general.html#rasqal-calloc-memory" title="rasqal_calloc_memory ()">rasqal_calloc_memory</a> (<em class="parameter"><code><span class="type">size_t</span> nmemb</code></em>,
95 <em class="parameter"><code><span class="type">size_t</span> size</code></em>);
96 <span class="returnvalue">void</span> <a class="link" href="rasqal-section-general.html#rasqal-free-memory" title="rasqal_free_memory ()">rasqal_free_memory</a> (<em class="parameter"><code><span class="type">void</span> *ptr</code></em>);
97 <a class="link" href="rasqal-section-general.html#rasqal-feature" title="enum rasqal_feature"><span class="returnvalue">rasqal_feature</span></a> <a class="link" href="rasqal-section-general.html#rasqal-feature-from-uri" title="rasqal_feature_from_uri ()">rasqal_feature_from_uri</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
98 <em class="parameter"><code><span class="type">raptor_uri</span> *uri</code></em>);
99 <span class="returnvalue">int</span> <a class="link" href="rasqal-section-general.html#rasqal-feature-value-type" title="rasqal_feature_value_type ()">rasqal_feature_value_type</a> (<em class="parameter"><code>const <a class="link" href="rasqal-section-general.html#rasqal-feature" title="enum rasqal_feature"><span class="type">rasqal_feature</span></a> feature</code></em>);
100 <span class="returnvalue">int</span> <a class="link" href="rasqal-section-general.html#rasqal-features-enumerate" title="rasqal_features_enumerate ()">rasqal_features_enumerate</a> (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
101 <em class="parameter"><code>const <a class="link" href="rasqal-section-general.html#rasqal-feature" title="enum rasqal_feature"><span class="type">rasqal_feature</span></a> feature</code></em>,
102 <em class="parameter"><code>const <span class="type">char</span> **name</code></em>,
103 <em class="parameter"><code><span class="type">raptor_uri</span> **uri</code></em>,
104 <em class="parameter"><code>const <span class="type">char</span> **label</code></em>);
105 unsigned <span class="returnvalue">int</span> <a class="link" href="rasqal-section-general.html#rasqal-get-feature-count" title="rasqal_get_feature_count ()">rasqal_get_feature_count</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
106 #define <a class="link" href="rasqal-section-general.html#RASQAL-DEPRECATED:CAPS" title="RASQAL_DEPRECATED">RASQAL_DEPRECATED</a>
107 #define <a class="link" href="rasqal-section-general.html#RASQAL-VERSION:CAPS" title="RASQAL_VERSION">RASQAL_VERSION</a>
108 #define <a class="link" href="rasqal-section-general.html#RASQAL-VERSION-MAJOR:CAPS" title="RASQAL_VERSION_MAJOR">RASQAL_VERSION_MAJOR</a>
109 #define <a class="link" href="rasqal-section-general.html#RASQAL-VERSION-MINOR:CAPS" title="RASQAL_VERSION_MINOR">RASQAL_VERSION_MINOR</a>
110 #define <a class="link" href="rasqal-section-general.html#RASQAL-VERSION-RELEASE:CAPS" title="RASQAL_VERSION_RELEASE">RASQAL_VERSION_RELEASE</a>
111 #define <a class="link" href="rasqal-section-general.html#RASQAL-VERSION-STRING:CAPS" title="RASQAL_VERSION_STRING">RASQAL_VERSION_STRING</a>
112 #define <a class="link" href="rasqal-section-general.html#RASQAL-RAPTOR-VERSION:CAPS" title="RASQAL_RAPTOR_VERSION">RASQAL_RAPTOR_VERSION</a>
113 </pre>
114 </div>
115 <div class="refsect1">
116 <a name="rasqal-section-general.description"></a><h2>Description</h2>
117 <p>
118 The functions in this section cover general library features such
119 as startup and shutdown, checking the current library version and
120 dealing with memory allocation and freeing. It also provides
121 functions to enumerate and check the supported query languages,
122 their names, labels and URI.
123 </p>
124 </div>
125 <div class="refsect1">
126 <a name="rasqal-section-general.details"></a><h2>Details</h2>
127 <div class="refsect2">
128 <a name="rasqal-world"></a><h3>rasqal_world</h3>
129 <pre class="programlisting">rasqal_world* world;
130 </pre>
131 <p>
132 Rasqal world class.
133 </p>
134 </div>
135 <hr>
136 <div class="refsect2">
137 <a name="rasqal-free-world"></a><h3>rasqal_free_world ()</h3>
138 <pre class="programlisting"><span class="returnvalue">void</span> rasqal_free_world (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>);</pre>
139 <p>
140 Terminate the rasqal library.
141 </p>
142 <p>
143 Destroys a rasqal_world object and all static information.
144 </p>
145 <div class="variablelist"><table border="0">
146 <col align="left" valign="top">
147 <tbody><tr>
148 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
149 <td>rasqal_world object</td>
150 </tr></tbody>
151 </table></div>
152 </div>
153 <hr>
154 <div class="refsect2">
155 <a name="rasqal-new-world"></a><h3>rasqal_new_world ()</h3>
156 <pre class="programlisting"><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="returnvalue">rasqal_world</span></a> * rasqal_new_world (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
157 <p>
158 Allocate a new rasqal_world object.
159 </p>
160 <p>
161 The rasqal_world is initialized with <a class="link" href="rasqal-section-general.html#rasqal-world-open" title="rasqal_world_open ()"><code class="function">rasqal_world_open()</code></a>.
162 Allocation and initialization are decoupled to allow
163 changing settings on the world object before init.
164 </p>
165 <div class="variablelist"><table border="0">
166 <col align="left" valign="top">
167 <tbody><tr>
168 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
169 <td>rasqal_world object or NULL on failure</td>
170 </tr></tbody>
171 </table></div>
172 </div>
173 <hr>
174 <div class="refsect2">
175 <a name="rasqal-world-open"></a><h3>rasqal_world_open ()</h3>
176 <pre class="programlisting"><span class="returnvalue">int</span> rasqal_world_open (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>);</pre>
177 <p>
178 Initialise the rasqal library.
179 </p>
180 <p>
181 Initializes a <a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> object created by <a class="link" href="rasqal-section-general.html#rasqal-new-world" title="rasqal_new_world ()"><code class="function">rasqal_new_world()</code></a>.
182 Allocation and initialization are decoupled to allow
183 changing settings on the world object before init.
184 These settings include e.g. the raptor library instance set with
185 <a class="link" href="rasqal-section-general.html#rasqal-world-set-raptor" title="rasqal_world_set_raptor ()"><code class="function">rasqal_world_set_raptor()</code></a>.
186 </p>
187 <p>
188 The initialized world object is used with subsequent rasqal API calls.
189 </p>
190 <div class="variablelist"><table border="0">
191 <col align="left" valign="top">
192 <tbody>
193 <tr>
194 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
195 <td>rasqal_world object</td>
196 </tr>
197 <tr>
198 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
199 <td>non-0 on failure</td>
200 </tr>
201 </tbody>
202 </table></div>
203 </div>
204 <hr>
205 <div class="refsect2">
206 <a name="rasqal-world-set-log-handler"></a><h3>rasqal_world_set_log_handler ()</h3>
207 <pre class="programlisting"><span class="returnvalue">void</span> rasqal_world_set_log_handler (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
208 <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
209 <em class="parameter"><code><span class="type">raptor_log_handler</span> handler</code></em>);</pre>
210 <p>
211 Set the log handler for this rasqal_world.
212 </p>
213 <p>
214 Also sets the raptor log handler to the same <em class="parameter"><code>user_data</code></em> and
215 <em class="parameter"><code>handler</code></em> via <code class="function">raptor_world_set_log_handler()</code>. (Rasqal 0.9.26+)
216 </p>
217 <div class="variablelist"><table border="0">
218 <col align="left" valign="top">
219 <tbody>
220 <tr>
221 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
222 <td>rasqal_world object</td>
223 </tr>
224 <tr>
225 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
226 <td>user data for log handler function</td>
227 </tr>
228 <tr>
229 <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
230 <td>log handler function</td>
231 </tr>
232 </tbody>
233 </table></div>
234 </div>
235 <hr>
236 <div class="refsect2">
237 <a name="rasqal-world-set-warning-level"></a><h3>rasqal_world_set_warning_level ()</h3>
238 <pre class="programlisting"><span class="returnvalue">int</span> rasqal_world_set_warning_level (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
239 <em class="parameter"><code>unsigned <span class="type">int</span> warning_level</code></em>);</pre>
240 <p>
241 Set the rasqal warning reporting level
242 </p>
243 <p>
244 The warning levels used are as follows:
245 </p>
246 <div class="orderedlist"><ol class="orderedlist" type="1">
247 <li class="listitem"><p>Level 10 is used for serious warnings that may be errors.
248 </p></li>
249 <li class="listitem"><p>Level 30 is used for moderate style warnings.
250 </p></li>
251 <li class="listitem"><p>Level 90 is used for strict conformance warnings.
252 </p></li>
253 </ol></div>
254 <p>
255 </p>
256 <p>
257 When this method is called to set a warning level, only warnings
258 of less than <em class="parameter"><code>warning_level</code></em> are reported. The default warning
259 level is 50.
260 </p>
261 <div class="variablelist"><table border="0">
262 <col align="left" valign="top">
263 <tbody>
264 <tr>
265 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
266 <td>world</td>
267 </tr>
268 <tr>
269 <td><p><span class="term"><em class="parameter"><code>warning_level</code></em> :</span></p></td>
270 <td>warning level 0..100</td>
271 </tr>
272 <tr>
273 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
274 <td>non-0 on failure</td>
275 </tr>
276 </tbody>
277 </table></div>
278 </div>
279 <hr>
280 <div class="refsect2">
281 <a name="rasqal-world-get-raptor"></a><h3>rasqal_world_get_raptor ()</h3>
282 <pre class="programlisting"><span class="returnvalue">raptor_world</span> * rasqal_world_get_raptor (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>);</pre>
283 <p>
284 Get the <span class="type">raptor_world</span> instance used by this <a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a>.
285 </p>
286 <div class="variablelist"><table border="0">
287 <col align="left" valign="top">
288 <tbody>
289 <tr>
290 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
291 <td>rasqal_world object</td>
292 </tr>
293 <tr>
294 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
295 <td>raptor_world object or NULL on failure (e.g. not initialized)</td>
296 </tr>
297 </tbody>
298 </table></div>
299 </div>
300 <hr>
301 <div class="refsect2">
302 <a name="rasqal-world-set-raptor"></a><h3>rasqal_world_set_raptor ()</h3>
303 <pre class="programlisting"><span class="returnvalue">void</span> rasqal_world_set_raptor (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
304 <em class="parameter"><code><span class="type">raptor_world</span> *raptor_world_ptr</code></em>);</pre>
305 <p>
306 Set the <span class="type">raptor_world</span> instance to be used with this <a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a>.
307 </p>
308 <p>
309 If no raptor_world instance is set with this function,
310 <a class="link" href="rasqal-section-general.html#rasqal-world-open" title="rasqal_world_open ()"><code class="function">rasqal_world_open()</code></a> creates a new instance.
311 </p>
312 <p>
313 Ownership of the raptor_world is not taken. If the raptor library
314 instance is set with this function, <a class="link" href="rasqal-section-general.html#rasqal-free-world" title="rasqal_free_world ()"><code class="function">rasqal_free_world()</code></a> will not
315 free it.
316 </p>
317 <div class="variablelist"><table border="0">
318 <col align="left" valign="top">
319 <tbody>
320 <tr>
321 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
322 <td>rasqal_world object</td>
323 </tr>
324 <tr>
325 <td><p><span class="term"><em class="parameter"><code>raptor_world_ptr</code></em> :</span></p></td>
326 <td>raptor_world object</td>
327 </tr>
328 </tbody>
329 </table></div>
330 </div>
331 <hr>
332 <div class="refsect2">
333 <a name="rasqal-world-get-query-language-description"></a><h3>rasqal_world_get_query_language_description ()</h3>
334 <pre class="programlisting">const <span class="returnvalue">raptor_syntax_description</span> * rasqal_world_get_query_language_description
335 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
336 <em class="parameter"><code>unsigned <span class="type">int</span> counter</code></em>);</pre>
337 <p>
338 Get query language descriptive information
339 </p>
340 <div class="variablelist"><table border="0">
341 <col align="left" valign="top">
342 <tbody>
343 <tr>
344 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
345 <td>world object</td>
346 </tr>
347 <tr>
348 <td><p><span class="term"><em class="parameter"><code>counter</code></em> :</span></p></td>
349 <td>index into the list of query languages</td>
350 </tr>
351 <tr>
352 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
353 <td>description or NULL if counter is out of range</td>
354 </tr>
355 </tbody>
356 </table></div>
357 </div>
358 <hr>
359 <div class="refsect2">
360 <a name="rasqal-world-get-query-results-format-description"></a><h3>rasqal_world_get_query_results_format_description ()</h3>
361 <pre class="programlisting">const <span class="returnvalue">raptor_syntax_description</span> * rasqal_world_get_query_results_format_description
362 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
363 <em class="parameter"><code>unsigned <span class="type">int</span> counter</code></em>);</pre>
364 <p>
365 Get query result format descriptive syntax information
366 </p>
367 <div class="variablelist"><table border="0">
368 <col align="left" valign="top">
369 <tbody>
370 <tr>
371 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
372 <td>world object</td>
373 </tr>
374 <tr>
375 <td><p><span class="term"><em class="parameter"><code>counter</code></em> :</span></p></td>
376 <td>index into the list of query result formats</td>
377 </tr>
378 <tr>
379 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
380 <td>description or NULL if counter is out of range</td>
381 </tr>
382 </tbody>
383 </table></div>
384 </div>
385 <hr>
386 <div class="refsect2">
387 <a name="rasqal-generate-bnodeid-handler"></a><h3>rasqal_generate_bnodeid_handler ()</h3>
388 <pre class="programlisting"><span class="returnvalue">char</span> * (*rasqal_generate_bnodeid_handler) (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
389 <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
390 <em class="parameter"><code>unsigned <span class="type">char</span> *user_bnodeid</code></em>);</pre>
391 <p>
392 User handler used with <a class="link" href="rasqal-section-general.html#rasqal-world-set-generate-bnodeid-handler" title="rasqal_world_set_generate_bnodeid_handler ()"><code class="function">rasqal_world_set_generate_bnodeid_handler()</code></a> to set method for generating a blank node ID.
393 </p>
394 <div class="variablelist"><table border="0">
395 <col align="left" valign="top">
396 <tbody>
397 <tr>
398 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
399 <td>world arg</td>
400 </tr>
401 <tr>
402 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
403 <td>user data given to</td>
404 </tr>
405 <tr>
406 <td><p><span class="term"><em class="parameter"><code>user_bnodeid</code></em> :</span></p></td>
407 <td>user blank node ID string passed in</td>
408 </tr>
409 <tr>
410 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
411 <td>blank node ID string or NULL on failure.</td>
412 </tr>
413 </tbody>
414 </table></div>
415 </div>
416 <hr>
417 <div class="refsect2">
418 <a name="rasqal-world-set-generate-bnodeid-handler"></a><h3>rasqal_world_set_generate_bnodeid_handler ()</h3>
419 <pre class="programlisting"><span class="returnvalue">int</span> rasqal_world_set_generate_bnodeid_handler
420 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
421 <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
422 <em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-generate-bnodeid-handler" title="rasqal_generate_bnodeid_handler ()"><span class="type">rasqal_generate_bnodeid_handler</span></a> handler</code></em>);</pre>
423 <p>
424 Set the generate blank node ID handler function
425 </p>
426 <p>
427 Sets the function to generate blank node IDs.
428 The handler is called with a pointer to the rasqal_world, the
429 <em class="parameter"><code>user_data</code></em> pointer and a user_bnodeid which is the value of
430 a user-provided blank node identifier (may be NULL).
431 It can either be returned directly as the generated value when present or
432 modified. The passed in value must be <code class="function">free()</code>d if it is not used.
433 </p>
434 <p>
435 If handler is NULL, the default method is used
436 </p>
437 <div class="variablelist"><table border="0">
438 <col align="left" valign="top">
439 <tbody>
440 <tr>
441 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
442 <td>
443 <a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> object</td>
444 </tr>
445 <tr>
446 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
447 <td>user data pointer for callback</td>
448 </tr>
449 <tr>
450 <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
451 <td>generate blank ID callback function</td>
452 </tr>
453 <tr>
454 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
455 <td>non-0 on failure</td>
456 </tr>
457 </tbody>
458 </table></div>
459 </div>
460 <hr>
461 <div class="refsect2">
462 <a name="rasqal-world-set-default-generate-bnodeid-parameters"></a><h3>rasqal_world_set_default_generate_bnodeid_parameters ()</h3>
463 <pre class="programlisting"><span class="returnvalue">int</span> rasqal_world_set_default_generate_bnodeid_parameters
464 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
465 <em class="parameter"><code><span class="type">char</span> *prefix</code></em>,
466 <em class="parameter"><code><span class="type">int</span> base</code></em>);</pre>
467 <p>
468 Set default bnodeid generation parameters
469 </p>
470 <p>
471 Sets the parameters for the default algorithm used to generate
472 blank node IDs. The default algorithm uses both <em class="parameter"><code>prefix</code></em> and <em class="parameter"><code>base</code></em>
473 to generate a new identifier. The exact identifier generated is
474 not guaranteed to be a strict concatenation of <em class="parameter"><code>prefix</code></em> and <em class="parameter"><code>base</code></em>
475 but will use both parts.
476 </p>
477 <p>
478 For finer control of the generated identifiers, use
479 <a class="link" href="rasqal-section-general.html#rasqal-world-set-generate-bnodeid-handler" title="rasqal_world_set_generate_bnodeid_handler ()"><code class="function">rasqal_world_set_generate_bnodeid_handler()</code></a>
480 </p>
481 <p>
482 If prefix is NULL, the default prefix is used (currently "bnodeid")
483 If base is less than 1, it is initialised to 1.
484 </p>
485 <div class="variablelist"><table border="0">
486 <col align="left" valign="top">
487 <tbody>
488 <tr>
489 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
490 <td>
491 <a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> object</td>
492 </tr>
493 <tr>
494 <td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
495 <td>prefix string</td>
496 </tr>
497 <tr>
498 <td><p><span class="term"><em class="parameter"><code>base</code></em> :</span></p></td>
499 <td>integer base identifier</td>
500 </tr>
501 <tr>
502 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
503 <td>non-0 on failure</td>
504 </tr>
505 </tbody>
506 </table></div>
507 </div>
508 <hr>
509 <div class="refsect2">
510 <a name="rasqal-world-guess-query-results-format-name"></a><h3>rasqal_world_guess_query_results_format_name ()</h3>
511 <pre class="programlisting">const <span class="returnvalue">char</span> * rasqal_world_guess_query_results_format_name
512 (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
513 <em class="parameter"><code><span class="type">raptor_uri</span> *uri</code></em>,
514 <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
515 <em class="parameter"><code>const <span class="type">char</span> *buffer</code></em>,
516 <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
517 <em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>);</pre>
518 <p>
519 Guess a query results format name for content.
520 </p>
521 <p>
522 Find a query results format by scoring recognition of the syntax
523 by a block of characters, the content identifier or a mime type.
524 The content identifier is typically a filename or URI or some
525 other identifier.
526 </p>
527 <div class="variablelist"><table border="0">
528 <col align="left" valign="top">
529 <tbody>
530 <tr>
531 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
532 <td>world object</td>
533 </tr>
534 <tr>
535 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
536 <td>URI identifying the syntax (or NULL)</td>
537 </tr>
538 <tr>
539 <td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
540 <td>mime type identifying the content (or NULL)</td>
541 </tr>
542 <tr>
543 <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
544 <td>buffer of content to guess (or NULL)</td>
545 </tr>
546 <tr>
547 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
548 <td>length of buffer</td>
549 </tr>
550 <tr>
551 <td><p><span class="term"><em class="parameter"><code>identifier</code></em> :</span></p></td>
552 <td>identifier of content (or NULL)</td>
553 </tr>
554 <tr>
555 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
556 <td>a query results format name or NULL if no guess
557 could be made</td>
558 </tr>
559 </tbody>
560 </table></div>
561 </div>
562 <hr>
563 <div class="refsect2">
564 <a name="rasqal-version-decimal"></a><h3>rasqal_version_decimal</h3>
565 <pre class="programlisting">extern const unsigned int rasqal_version_decimal;
566 </pre>
567 <p>
568 Rasqal version as a decimal number.
569 </p>
570 <p>
571 Format: major * 10000 + minor * 100 + release
572 </p>
573 </div>
574 <hr>
575 <div class="refsect2">
576 <a name="rasqal-version-major"></a><h3>rasqal_version_major</h3>
577 <pre class="programlisting">extern const unsigned int rasqal_version_major;
578 </pre>
579 <p>
580 Rasqal major version number.
581 </p>
582 </div>
583 <hr>
584 <div class="refsect2">
585 <a name="rasqal-version-minor"></a><h3>rasqal_version_minor</h3>
586 <pre class="programlisting">extern const unsigned int rasqal_version_minor;
587 </pre>
588 <p>
589 Rasqal minor version number.
590 </p>
591 </div>
592 <hr>
593 <div class="refsect2">
594 <a name="rasqal-version-release"></a><h3>rasqal_version_release</h3>
595 <pre class="programlisting">extern const unsigned int rasqal_version_release;
596 </pre>
597 <p>
598 Rasqal release version number.
599 </p>
600 </div>
601 <hr>
602 <div class="refsect2">
603 <a name="rasqal-version-string"></a><h3>rasqal_version_string</h3>
604 <pre class="programlisting">extern const char * const rasqal_version_string;
605 </pre>
606 <p>
607 Rasqal version as a string.
608 </p>
609 </div>
610 <hr>
611 <div class="refsect2">
612 <a name="rasqal-copyright-string"></a><h3>rasqal_copyright_string</h3>
613 <pre class="programlisting">extern const char * const rasqal_copyright_string;
614 </pre>
615 <p>
616 Copyright string (multiple lines).
617 </p>
618 </div>
619 <hr>
620 <div class="refsect2">
621 <a name="rasqal-short-copyright-string"></a><h3>rasqal_short_copyright_string</h3>
622 <pre class="programlisting">extern const char * const rasqal_short_copyright_string;
623 </pre>
624 <p>
625 Short copyright string (one line).
626 </p>
627 </div>
628 <hr>
629 <div class="refsect2">
630 <a name="rasqal-home-url-string"></a><h3>rasqal_home_url_string</h3>
631 <pre class="programlisting">extern const char * const rasqal_home_url_string;
632 </pre>
633 <p>
634 Rasqal home page URL.
635 </p>
636 </div>
637 <hr>
638 <div class="refsect2">
639 <a name="rasqal-license-string"></a><h3>rasqal_license_string</h3>
640 <pre class="programlisting">extern const char * const rasqal_license_string;
641 </pre>
642 <p>
643 Rasqal license string.
644 </p>
645 </div>
646 <hr>
647 <div class="refsect2">
648 <a name="rasqal-feature"></a><h3>enum rasqal_feature</h3>
649 <pre class="programlisting">typedef enum {
650 RASQAL_FEATURE_NO_NET,
651 RASQAL_FEATURE_RAND_SEED,
652 RASQAL_FEATURE_LAST = RASQAL_FEATURE_RAND_SEED
653 } rasqal_feature;
654 </pre>
655 <p>
656 Query features.
657 </p>
658 <p>
659 None currently defined.
660 </p>
661 <div class="variablelist"><table border="0">
662 <col align="left" valign="top">
663 <tbody>
664 <tr>
665 <td><p><a name="RASQAL-FEATURE-NO-NET:CAPS"></a><span class="term"><code class="literal">RASQAL_FEATURE_NO_NET</code></span></p></td>
666 <td>Deny network requests.
667 </td>
668 </tr>
669 <tr>
670 <td><p><a name="RASQAL-FEATURE-RAND-SEED:CAPS"></a><span class="term"><code class="literal">RASQAL_FEATURE_RAND_SEED</code></span></p></td>
671 <td>Set <code class="function">rand()</code> / <code class="function">rand_r()</code> seed
672 </td>
673 </tr>
674 <tr>
675 <td><p><a name="RASQAL-FEATURE-LAST:CAPS"></a><span class="term"><code class="literal">RASQAL_FEATURE_LAST</code></span></p></td>
676 <td>Internal.
677 </td>
678 </tr>
679 </tbody>
680 </table></div>
681 </div>
682 <hr>
683 <div class="refsect2">
684 <a name="rasqal-language-name-check"></a><h3>rasqal_language_name_check ()</h3>
685 <pre class="programlisting"><span class="returnvalue">int</span> rasqal_language_name_check (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
686 <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
687 <p>
688 Check name of a query language.
689 </p>
690 <div class="variablelist"><table border="0">
691 <col align="left" valign="top">
692 <tbody>
693 <tr>
694 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
695 <td>rasqal_world object</td>
696 </tr>
697 <tr>
698 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
699 <td>the query language name</td>
700 </tr>
701 <tr>
702 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
703 <td>non 0 if name is a known query language</td>
704 </tr>
705 </tbody>
706 </table></div>
707 </div>
708 <hr>
709 <div class="refsect2">
710 <a name="rasqal-languages-enumerate"></a><h3>rasqal_languages_enumerate ()</h3>
711 <pre class="programlisting"><span class="returnvalue">int</span> rasqal_languages_enumerate (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
712 <em class="parameter"><code>unsigned <span class="type">int</span> counter</code></em>,
713 <em class="parameter"><code>const <span class="type">char</span> **name</code></em>,
714 <em class="parameter"><code>const <span class="type">char</span> **label</code></em>,
715 <em class="parameter"><code>const unsigned <span class="type">char</span> **uri_string</code></em>);</pre>
716 <p>
717 <em class="parameter"><code>deprecated</code></em>: Use <a class="link" href="rasqal-section-general.html#rasqal-world-get-query-language-description" title="rasqal_world_get_query_language_description ()"><code class="function">rasqal_world_get_query_language_description()</code></a> instead.
718 </p>
719 <p>
720 Get information on query languages.
721 </p>
722 <div class="variablelist"><table border="0">
723 <col align="left" valign="top">
724 <tbody>
725 <tr>
726 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
727 <td>rasqal_world object</td>
728 </tr>
729 <tr>
730 <td><p><span class="term"><em class="parameter"><code>counter</code></em> :</span></p></td>
731 <td>index into the list of syntaxes</td>
732 </tr>
733 <tr>
734 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
735 <td>pointer to store the name of the syntax (or NULL)</td>
736 </tr>
737 <tr>
738 <td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
739 <td>pointer to store syntax readable label (or NULL)</td>
740 </tr>
741 <tr>
742 <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td>
743 <td>pointer to store syntax URI string (or NULL)</td>
744 </tr>
745 <tr>
746 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
747 <td>non 0 on failure of if counter is out of range</td>
748 </tr>
749 </tbody>
750 </table></div>
751 </div>
752 <hr>
753 <div class="refsect2">
754 <a name="rasqal-alloc-memory"></a><h3>rasqal_alloc_memory ()</h3>
755 <pre class="programlisting"><span class="returnvalue">void</span> * rasqal_alloc_memory (<em class="parameter"><code><span class="type">size_t</span> size</code></em>);</pre>
756 <p>
757 Allocate memory inside rasqal.
758 </p>
759 <p>
760 Some systems require memory allocated in a library to
761 be deallocated in that library. This function allows
762 memory to be allocated inside the rasqal shared library
763 that can be freed inside rasqal either internally or via
764 <a class="link" href="rasqal-section-general.html#rasqal-free-memory" title="rasqal_free_memory ()"><code class="function">rasqal_free_memory()</code></a>.
765 </p>
766 <div class="variablelist"><table border="0">
767 <col align="left" valign="top">
768 <tbody>
769 <tr>
770 <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
771 <td>size of memory to allocate</td>
772 </tr>
773 <tr>
774 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
775 <td>the address of the allocated memory or NULL on failure</td>
776 </tr>
777 </tbody>
778 </table></div>
779 </div>
780 <hr>
781 <div class="refsect2">
782 <a name="rasqal-calloc-memory"></a><h3>rasqal_calloc_memory ()</h3>
783 <pre class="programlisting"><span class="returnvalue">void</span> * rasqal_calloc_memory (<em class="parameter"><code><span class="type">size_t</span> nmemb</code></em>,
784 <em class="parameter"><code><span class="type">size_t</span> size</code></em>);</pre>
785 <p>
786 Allocate zeroed array of items inside rasqal.
787 </p>
788 <p>
789 Some systems require memory allocated in a library to
790 be deallocated in that library. This function allows
791 memory to be allocated inside the rasqal shared library
792 that can be freed inside rasqal either internally or via
793 <a class="link" href="rasqal-section-general.html#rasqal-free-memory" title="rasqal_free_memory ()"><code class="function">rasqal_free_memory()</code></a>.
794 </p>
795 <div class="variablelist"><table border="0">
796 <col align="left" valign="top">
797 <tbody>
798 <tr>
799 <td><p><span class="term"><em class="parameter"><code>nmemb</code></em> :</span></p></td>
800 <td>number of members</td>
801 </tr>
802 <tr>
803 <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
804 <td>size of item</td>
805 </tr>
806 <tr>
807 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
808 <td>the address of the allocated memory or NULL on failure</td>
809 </tr>
810 </tbody>
811 </table></div>
812 </div>
813 <hr>
814 <div class="refsect2">
815 <a name="rasqal-free-memory"></a><h3>rasqal_free_memory ()</h3>
816 <pre class="programlisting"><span class="returnvalue">void</span> rasqal_free_memory (<em class="parameter"><code><span class="type">void</span> *ptr</code></em>);</pre>
817 <p>
818 Free memory allocated inside rasqal.
819 </p>
820 <p>
821 Some systems require memory allocated in a library to
822 be deallocated in that library. This function allows
823 memory allocated by rasqal to be freed.
824 </p>
825 <div class="variablelist"><table border="0">
826 <col align="left" valign="top">
827 <tbody><tr>
828 <td><p><span class="term"><em class="parameter"><code>ptr</code></em> :</span></p></td>
829 <td>memory pointer</td>
830 </tr></tbody>
831 </table></div>
832 </div>
833 <hr>
834 <div class="refsect2">
835 <a name="rasqal-feature-from-uri"></a><h3>rasqal_feature_from_uri ()</h3>
836 <pre class="programlisting"><a class="link" href="rasqal-section-general.html#rasqal-feature" title="enum rasqal_feature"><span class="returnvalue">rasqal_feature</span></a> rasqal_feature_from_uri (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
837 <em class="parameter"><code><span class="type">raptor_uri</span> *uri</code></em>);</pre>
838 <p>
839 Turn a feature URI into an feature enum.
840 </p>
841 <p>
842 The allowed feature URIs are available via <a class="link" href="rasqal-section-general.html#rasqal-features-enumerate" title="rasqal_features_enumerate ()"><code class="function">rasqal_features_enumerate()</code></a>.
843 </p>
844 <div class="variablelist"><table border="0">
845 <col align="left" valign="top">
846 <tbody>
847 <tr>
848 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
849 <td>rasqal_world object</td>
850 </tr>
851 <tr>
852 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
853 <td>feature URI</td>
854 </tr>
855 <tr>
856 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
857 <td>&lt; 0 if the feature is unknown</td>
858 </tr>
859 </tbody>
860 </table></div>
861 </div>
862 <hr>
863 <div class="refsect2">
864 <a name="rasqal-feature-value-type"></a><h3>rasqal_feature_value_type ()</h3>
865 <pre class="programlisting"><span class="returnvalue">int</span> rasqal_feature_value_type (<em class="parameter"><code>const <a class="link" href="rasqal-section-general.html#rasqal-feature" title="enum rasqal_feature"><span class="type">rasqal_feature</span></a> feature</code></em>);</pre>
866 <p>
867 Get the type of a features.
868 </p>
869 <p>
870 The type of the <em class="parameter"><code>feature</code></em> is 0=integer , 1=string. Other values are
871 undefined. Most features are integer values and use
872 rasqal_query_set_feature <a class="link" href="rasqal-section-query.html#rasqal-query-get-feature" title="rasqal_query_get_feature ()"><code class="function">rasqal_query_get_feature()</code></a>
873 </p>
874 <div class="variablelist"><table border="0">
875 <col align="left" valign="top">
876 <tbody>
877 <tr>
878 <td><p><span class="term"><em class="parameter"><code>feature</code></em> :</span></p></td>
879 <td>rasqal query feature</td>
880 </tr>
881 <tr>
882 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
883 <td>the type of the feature or &lt;0 if <em class="parameter"><code>feature</code></em> is unknown</td>
884 </tr>
885 </tbody>
886 </table></div>
887 </div>
888 <hr>
889 <div class="refsect2">
890 <a name="rasqal-features-enumerate"></a><h3>rasqal_features_enumerate ()</h3>
891 <pre class="programlisting"><span class="returnvalue">int</span> rasqal_features_enumerate (<em class="parameter"><code><a class="link" href="rasqal-section-general.html#rasqal-world" title="rasqal_world"><span class="type">rasqal_world</span></a> *world</code></em>,
892 <em class="parameter"><code>const <a class="link" href="rasqal-section-general.html#rasqal-feature" title="enum rasqal_feature"><span class="type">rasqal_feature</span></a> feature</code></em>,
893 <em class="parameter"><code>const <span class="type">char</span> **name</code></em>,
894 <em class="parameter"><code><span class="type">raptor_uri</span> **uri</code></em>,
895 <em class="parameter"><code>const <span class="type">char</span> **label</code></em>);</pre>
896 <p>
897 Get list of rasqal features.
898 </p>
899 <p>
900 If uri is not NULL, a pointer to a new raptor_uri is returned
901 that must be freed by the caller with <code class="function">raptor_free_uri()</code>.
902 </p>
903 <div class="variablelist"><table border="0">
904 <col align="left" valign="top">
905 <tbody>
906 <tr>
907 <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
908 <td>rasqal_world object</td>
909 </tr>
910 <tr>
911 <td><p><span class="term"><em class="parameter"><code>feature</code></em> :</span></p></td>
912 <td>feature enumeration (0+)</td>
913 </tr>
914 <tr>
915 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
916 <td>pointer to store feature short name (or NULL)</td>
917 </tr>
918 <tr>
919 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
920 <td>pointer to store feature URI (or NULL)</td>
921 </tr>
922 <tr>
923 <td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
924 <td>pointer to feature label (or NULL)</td>
925 </tr>
926 <tr>
927 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
928 <td>0 on success, &lt;0 on failure, &gt;0 if feature is unknown</td>
929 </tr>
930 </tbody>
931 </table></div>
932 </div>
933 <hr>
934 <div class="refsect2">
935 <a name="rasqal-get-feature-count"></a><h3>rasqal_get_feature_count ()</h3>
936 <pre class="programlisting">unsigned <span class="returnvalue">int</span> rasqal_get_feature_count (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
937 <p>
938 Get the count of features defined.
939 </p>
940 <p>
941 This is prefered to the compile time-only symbol <a class="link" href="rasqal-section-general.html#RASQAL-FEATURE-LAST:CAPS"><span class="type">RASQAL_FEATURE_LAST</span></a>
942 and returns a count of the number of features which is
943 <a class="link" href="rasqal-section-general.html#RASQAL-FEATURE-LAST:CAPS"><span class="type">RASQAL_FEATURE_LAST</span></a>+1.
944 </p>
945 <div class="variablelist"><table border="0">
946 <col align="left" valign="top">
947 <tbody><tr>
948 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
949 <td>count of features in the <a class="link" href="rasqal-section-general.html#rasqal-feature" title="enum rasqal_feature"><span class="type">rasqal_feature</span></a> enumeration</td>
950 </tr></tbody>
951 </table></div>
952 </div>
953 <hr>
954 <div class="refsect2">
955 <a name="RASQAL-DEPRECATED:CAPS"></a><h3>RASQAL_DEPRECATED</h3>
956 <pre class="programlisting">#define RASQAL_DEPRECATED __attribute__((deprecated))
957 </pre>
958 <p>
959 When defined before a function, indicates that the function
960 has been deprecated and may be replaced in a future release.
961 With some versions of gcc this may give a compilation warning.
962 </p>
963 </div>
964 <hr>
965 <div class="refsect2">
966 <a name="RASQAL-VERSION:CAPS"></a><h3>RASQAL_VERSION</h3>
967 <pre class="programlisting">#define RASQAL_VERSION 933
968 </pre>
969 <p>
970 Rasqal library version number
971 </p>
972 <p>
973 Format: major * 10000 + minor * 100 + release
974 </p>
975 </div>
976 <hr>
977 <div class="refsect2">
978 <a name="RASQAL-VERSION-MAJOR:CAPS"></a><h3>RASQAL_VERSION_MAJOR</h3>
979 <pre class="programlisting">#define RASQAL_VERSION_MAJOR 0
980 </pre>
981 <p>
982 Rasqal library major version
983 </p>
984 </div>
985 <hr>
986 <div class="refsect2">
987 <a name="RASQAL-VERSION-MINOR:CAPS"></a><h3>RASQAL_VERSION_MINOR</h3>
988 <pre class="programlisting">#define RASQAL_VERSION_MINOR 9
989 </pre>
990 <p>
991 Rasqal library minor version
992 </p>
993 </div>
994 <hr>
995 <div class="refsect2">
996 <a name="RASQAL-VERSION-RELEASE:CAPS"></a><h3>RASQAL_VERSION_RELEASE</h3>
997 <pre class="programlisting">#define RASQAL_VERSION_RELEASE 33
998 </pre>
999 <p>
1000 Rasqal library release
1001 </p>
1002 </div>
1003 <hr>
1004 <div class="refsect2">
1005 <a name="RASQAL-VERSION-STRING:CAPS"></a><h3>RASQAL_VERSION_STRING</h3>
1006 <pre class="programlisting">#define RASQAL_VERSION_STRING "0.9.33"
1007 </pre>
1008 <p>
1009 Rasqal library version string
1010 </p>
1011 </div>
1012 <hr>
1013 <div class="refsect2">
1014 <a name="RASQAL-RAPTOR-VERSION:CAPS"></a><h3>RASQAL_RAPTOR_VERSION</h3>
1015 <pre class="programlisting">#define RASQAL_RAPTOR_VERSION 20015
1016 </pre>
1017 <p>
1018 Version of Raptor that Rasqal was configured against.
1019 </p>
1020 </div>
1021 </div>
1022 </div>
1023 <div class="footer">
1024 <hr>
1025 Generated by GTK-Doc V1.18</div>
1026 </body>
1027 </html>