No issues found
1 /* tracker-cursor.c generated by valac 0.18.1, the Vala compiler
2 * generated from tracker-cursor.vala, do not modify */
3
4 /*
5 * Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22 /**
23 * SECTION: tracker-sparql-cursor
24 * @short_description: Iteration of the query results
25 * @title: TrackerSparqlCursor
26 * @stability: Stable
27 * @include: tracker-sparql.h
28 *
29 * <para>
30 * #TrackerSparqlCursor is an object which provides methods to iterate the
31 * results of a query to the Tracker Store.
32 * </para>
33 */
34 /**
35 * tracker_sparql_cursor_next_finish:
36 * @self: a #TrackerSparqlCursor
37 * @_res_: a #GAsyncResult with the result of the operation
38 * @error: #GError for error reporting.
39 *
40 * Finishes the asynchronous iteration to the next result.
41 *
42 * Returns: %FALSE if no more results found, otherwise %TRUE.
43 *
44 * Since: 0.10
45 */
46
47 #include <glib.h>
48 #include <glib-object.h>
49 #include <stdlib.h>
50 #include <string.h>
51 #include <gio/gio.h>
52 #include <float.h>
53 #include <math.h>
54
55
56 #define TRACKER_SPARQL_TYPE_VALUE_TYPE (tracker_sparql_value_type_get_type ())
57
58 #define TRACKER_SPARQL_TYPE_CURSOR (tracker_sparql_cursor_get_type ())
59 #define TRACKER_SPARQL_CURSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_CURSOR, TrackerSparqlCursor))
60 #define TRACKER_SPARQL_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_CURSOR, TrackerSparqlCursorClass))
61 #define TRACKER_SPARQL_IS_CURSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_CURSOR))
62 #define TRACKER_SPARQL_IS_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_CURSOR))
63 #define TRACKER_SPARQL_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_CURSOR, TrackerSparqlCursorClass))
64
65 typedef struct _TrackerSparqlCursor TrackerSparqlCursor;
66 typedef struct _TrackerSparqlCursorClass TrackerSparqlCursorClass;
67 typedef struct _TrackerSparqlCursorPrivate TrackerSparqlCursorPrivate;
68
69 #define TRACKER_SPARQL_TYPE_CONNECTION (tracker_sparql_connection_get_type ())
70 #define TRACKER_SPARQL_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_CONNECTION, TrackerSparqlConnection))
71 #define TRACKER_SPARQL_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_CONNECTION, TrackerSparqlConnectionClass))
72 #define TRACKER_SPARQL_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_CONNECTION))
73 #define TRACKER_SPARQL_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_CONNECTION))
74 #define TRACKER_SPARQL_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_CONNECTION, TrackerSparqlConnectionClass))
75
76 typedef struct _TrackerSparqlConnection TrackerSparqlConnection;
77 typedef struct _TrackerSparqlConnectionClass TrackerSparqlConnectionClass;
78 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
79
80 typedef enum {
81 TRACKER_SPARQL_VALUE_TYPE_UNBOUND,
82 TRACKER_SPARQL_VALUE_TYPE_URI,
83 TRACKER_SPARQL_VALUE_TYPE_STRING,
84 TRACKER_SPARQL_VALUE_TYPE_INTEGER,
85 TRACKER_SPARQL_VALUE_TYPE_DOUBLE,
86 TRACKER_SPARQL_VALUE_TYPE_DATETIME,
87 TRACKER_SPARQL_VALUE_TYPE_BLANK_NODE,
88 TRACKER_SPARQL_VALUE_TYPE_BOOLEAN
89 } TrackerSparqlValueType;
90
91 struct _TrackerSparqlCursor {
92 GObject parent_instance;
93 TrackerSparqlCursorPrivate * priv;
94 };
95
96 struct _TrackerSparqlCursorClass {
97 GObjectClass parent_class;
98 TrackerSparqlValueType (*get_value_type) (TrackerSparqlCursor* self, gint column);
99 const gchar* (*get_variable_name) (TrackerSparqlCursor* self, gint column);
100 const gchar* (*get_string) (TrackerSparqlCursor* self, gint column, glong* length);
101 gboolean (*next) (TrackerSparqlCursor* self, GCancellable* cancellable, GError** error);
102 void (*next_async) (TrackerSparqlCursor* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
103 gboolean (*next_finish) (TrackerSparqlCursor* self, GAsyncResult* _res_, GError** error);
104 void (*rewind) (TrackerSparqlCursor* self);
105 void (*close) (TrackerSparqlCursor* self);
106 gint64 (*get_integer) (TrackerSparqlCursor* self, gint column);
107 gdouble (*get_double) (TrackerSparqlCursor* self, gint column);
108 gboolean (*get_boolean) (TrackerSparqlCursor* self, gint column);
109 gboolean (*is_bound) (TrackerSparqlCursor* self, gint column);
110 gint (*get_n_columns) (TrackerSparqlCursor* self);
111 };
112
113 struct _TrackerSparqlCursorPrivate {
114 TrackerSparqlConnection* _connection;
115 };
116
117
118 static gpointer tracker_sparql_cursor_parent_class = NULL;
119
120 GType tracker_sparql_value_type_get_type (void) G_GNUC_CONST;
121 GType tracker_sparql_cursor_get_type (void) G_GNUC_CONST;
122 GType tracker_sparql_connection_get_type (void) G_GNUC_CONST;
123 #define TRACKER_SPARQL_CURSOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_CURSOR, TrackerSparqlCursorPrivate))
124 enum {
125 TRACKER_SPARQL_CURSOR_DUMMY_PROPERTY,
126 TRACKER_SPARQL_CURSOR_CONNECTION,
127 TRACKER_SPARQL_CURSOR_N_COLUMNS
128 };
129 TrackerSparqlValueType tracker_sparql_cursor_get_value_type (TrackerSparqlCursor* self, gint column);
130 static TrackerSparqlValueType tracker_sparql_cursor_real_get_value_type (TrackerSparqlCursor* self, gint column);
131 const gchar* tracker_sparql_cursor_get_variable_name (TrackerSparqlCursor* self, gint column);
132 static const gchar* tracker_sparql_cursor_real_get_variable_name (TrackerSparqlCursor* self, gint column);
133 const gchar* tracker_sparql_cursor_get_string (TrackerSparqlCursor* self, gint column, glong* length);
134 static const gchar* tracker_sparql_cursor_real_get_string (TrackerSparqlCursor* self, gint column, glong* length);
135 gboolean tracker_sparql_cursor_next (TrackerSparqlCursor* self, GCancellable* cancellable, GError** error);
136 static gboolean tracker_sparql_cursor_real_next (TrackerSparqlCursor* self, GCancellable* cancellable, GError** error);
137 void tracker_sparql_cursor_next_async (TrackerSparqlCursor* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
138 gboolean tracker_sparql_cursor_next_finish (TrackerSparqlCursor* self, GAsyncResult* _res_, GError** error);
139 void tracker_sparql_cursor_rewind (TrackerSparqlCursor* self);
140 static void tracker_sparql_cursor_real_rewind (TrackerSparqlCursor* self);
141 void tracker_sparql_cursor_close (TrackerSparqlCursor* self);
142 static void tracker_sparql_cursor_real_close (TrackerSparqlCursor* self);
143 gint64 tracker_sparql_cursor_get_integer (TrackerSparqlCursor* self, gint column);
144 static gint64 tracker_sparql_cursor_real_get_integer (TrackerSparqlCursor* self, gint column);
145 gdouble tracker_sparql_cursor_get_double (TrackerSparqlCursor* self, gint column);
146 static gdouble tracker_sparql_cursor_real_get_double (TrackerSparqlCursor* self, gint column);
147 gboolean tracker_sparql_cursor_get_boolean (TrackerSparqlCursor* self, gint column);
148 static gboolean tracker_sparql_cursor_real_get_boolean (TrackerSparqlCursor* self, gint column);
149 gboolean tracker_sparql_cursor_is_bound (TrackerSparqlCursor* self, gint column);
150 static gboolean tracker_sparql_cursor_real_is_bound (TrackerSparqlCursor* self, gint column);
151 TrackerSparqlCursor* tracker_sparql_cursor_construct (GType object_type);
152 TrackerSparqlConnection* tracker_sparql_cursor_get_connection (TrackerSparqlCursor* self);
153 void tracker_sparql_cursor_set_connection (TrackerSparqlCursor* self, TrackerSparqlConnection* value);
154 gint tracker_sparql_cursor_get_n_columns (TrackerSparqlCursor* self);
155 static void tracker_sparql_cursor_finalize (GObject* obj);
156 static void _vala_tracker_sparql_cursor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
157 static void _vala_tracker_sparql_cursor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
158
159
160 /**
161 * TrackerSparqlValueType:
162 * @TRACKER_SPARQL_VALUE_TYPE_UNBOUND: Unbound value type
163 * @TRACKER_SPARQL_VALUE_TYPE_URI: Uri value type, rdfs:Resource
164 * @TRACKER_SPARQL_VALUE_TYPE_STRING: String value type, xsd:string
165 * @TRACKER_SPARQL_VALUE_TYPE_INTEGER: Integer value type, xsd:integer
166 * @TRACKER_SPARQL_VALUE_TYPE_DOUBLE: Double value type, xsd:double
167 * @TRACKER_SPARQL_VALUE_TYPE_DATETIME: Datetime value type, xsd:dateTime
168 * @TRACKER_SPARQL_VALUE_TYPE_BLANK_NODE: Blank node value type
169 * @TRACKER_SPARQL_VALUE_TYPE_BOOLEAN: Boolean value type, xsd:boolean
170 *
171 * Enumeration with the possible types of the cursor's cells
172 *
173 * Since: 0.10
174 */
175 GType tracker_sparql_value_type_get_type (void) {
176 static volatile gsize tracker_sparql_value_type_type_id__volatile = 0;
177 if (g_once_init_enter (&tracker_sparql_value_type_type_id__volatile)) {
178 static const GEnumValue values[] = {{TRACKER_SPARQL_VALUE_TYPE_UNBOUND, "TRACKER_SPARQL_VALUE_TYPE_UNBOUND", "unbound"}, {TRACKER_SPARQL_VALUE_TYPE_URI, "TRACKER_SPARQL_VALUE_TYPE_URI", "uri"}, {TRACKER_SPARQL_VALUE_TYPE_STRING, "TRACKER_SPARQL_VALUE_TYPE_STRING", "string"}, {TRACKER_SPARQL_VALUE_TYPE_INTEGER, "TRACKER_SPARQL_VALUE_TYPE_INTEGER", "integer"}, {TRACKER_SPARQL_VALUE_TYPE_DOUBLE, "TRACKER_SPARQL_VALUE_TYPE_DOUBLE", "double"}, {TRACKER_SPARQL_VALUE_TYPE_DATETIME, "TRACKER_SPARQL_VALUE_TYPE_DATETIME", "datetime"}, {TRACKER_SPARQL_VALUE_TYPE_BLANK_NODE, "TRACKER_SPARQL_VALUE_TYPE_BLANK_NODE", "blank-node"}, {TRACKER_SPARQL_VALUE_TYPE_BOOLEAN, "TRACKER_SPARQL_VALUE_TYPE_BOOLEAN", "boolean"}, {0, NULL, NULL}};
179 GType tracker_sparql_value_type_type_id;
180 tracker_sparql_value_type_type_id = g_enum_register_static ("TrackerSparqlValueType", values);
181 g_once_init_leave (&tracker_sparql_value_type_type_id__volatile, tracker_sparql_value_type_type_id);
182 }
183 return tracker_sparql_value_type_type_id__volatile;
184 }
185
186
187 /**
188 * tracker_sparql_cursor_get_value_type:
189 * @self: a #TrackerSparqlCursor
190 * @column: column number to retrieve (first one is 0)
191 *
192 * The data type bound to the current row in @column is returned.
193 *
194 * Returns: a #TrackerSparqlValueType.
195 *
196 * Since: 0.10
197 */
198 static TrackerSparqlValueType tracker_sparql_cursor_real_get_value_type (TrackerSparqlCursor* self, gint column) {
199 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
200 g_critical ("Type `%s' does not implement abstract method `tracker_sparql_cursor_get_value_type'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
201 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
202 return 0;
203 #line 204 "tracker-cursor.c"
204 }
205
206
207 TrackerSparqlValueType tracker_sparql_cursor_get_value_type (TrackerSparqlCursor* self, gint column) {
208 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
209 g_return_val_if_fail (self != NULL, 0);
210 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
211 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->get_value_type (self, column);
212 #line 213 "tracker-cursor.c"
213 }
214
215
216 /**
217 * tracker_sparql_cursor_get_variable_name:
218 * @self: a #TrackerSparqlCursor
219 * @column: column number to retrieve (first one is 0)
220 *
221 * Retrieves the variable name for the current row in @column.
222 *
223 * Returns: a string which must not be freed.
224 *
225 * Since: 0.10
226 */
227 static const gchar* tracker_sparql_cursor_real_get_variable_name (TrackerSparqlCursor* self, gint column) {
228 #line 139 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
229 g_critical ("Type `%s' does not implement abstract method `tracker_sparql_cursor_get_variable_name'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
230 #line 139 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
231 return NULL;
232 #line 233 "tracker-cursor.c"
233 }
234
235
236 const gchar* tracker_sparql_cursor_get_variable_name (TrackerSparqlCursor* self, gint column) {
237 #line 139 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
238 g_return_val_if_fail (self != NULL, NULL);
239 #line 139 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
240 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->get_variable_name (self, column);
241 #line 242 "tracker-cursor.c"
242 }
243
244
245 /**
246 * tracker_sparql_cursor_get_string:
247 * @self: a #TrackerSparqlCursor
248 * @column: column number to retrieve (first one is 0)
249 * @length: length of the returned string
250 *
251 * Retrieves a string representation of the data in the current
252 * row in @column.
253 *
254 * Returns: a string which must not be freed. %NULL is returned if
255 * the column is not in the [0,#n_columns] range.
256 *
257 * Since: 0.10
258 */
259 static const gchar* tracker_sparql_cursor_real_get_string (TrackerSparqlCursor* self, gint column, glong* length) {
260 #line 155 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
261 g_critical ("Type `%s' does not implement abstract method `tracker_sparql_cursor_get_string'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
262 #line 155 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
263 return NULL;
264 #line 265 "tracker-cursor.c"
265 }
266
267
268 const gchar* tracker_sparql_cursor_get_string (TrackerSparqlCursor* self, gint column, glong* length) {
269 #line 155 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
270 g_return_val_if_fail (self != NULL, NULL);
271 #line 155 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
272 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->get_string (self, column, length);
273 #line 274 "tracker-cursor.c"
274 }
275
276
277 /**
278 * tracker_sparql_cursor_next:
279 * @self: a #TrackerSparqlCursor
280 * @cancellable: a #GCancellable used to cancel the operation
281 * @error: #GError for error reporting.
282 *
283 * Iterates to the next result. This is completely synchronous and
284 * it may block.
285 *
286 * Returns: %FALSE if no more results found, otherwise %TRUE.
287 *
288 * Since: 0.10
289 */
290 static gboolean tracker_sparql_cursor_real_next (TrackerSparqlCursor* self, GCancellable* cancellable, GError** error) {
291 #line 170 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
292 g_critical ("Type `%s' does not implement abstract method `tracker_sparql_cursor_next'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
293 #line 170 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
294 return FALSE;
295 #line 296 "tracker-cursor.c"
296 }
297
298
299 gboolean tracker_sparql_cursor_next (TrackerSparqlCursor* self, GCancellable* cancellable, GError** error) {
300 #line 170 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
301 g_return_val_if_fail (self != NULL, FALSE);
302 #line 170 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
303 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->next (self, cancellable, error);
304 #line 305 "tracker-cursor.c"
305 }
306
307
308 void tracker_sparql_cursor_next_async (TrackerSparqlCursor* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
309 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
310 TRACKER_SPARQL_CURSOR_GET_CLASS (self)->next_async (self, cancellable, _callback_, _user_data_);
311 #line 312 "tracker-cursor.c"
312 }
313
314
315 gboolean tracker_sparql_cursor_next_finish (TrackerSparqlCursor* self, GAsyncResult* _res_, GError** error) {
316 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
317 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->next_finish (self, _res_, error);
318 #line 319 "tracker-cursor.c"
319 }
320
321
322 /**
323 * tracker_sparql_cursor_rewind:
324 * @self: a #TrackerSparqlCursor
325 *
326 * Resets the iterator to point back to the first result.
327 *
328 * Since: 0.10
329 */
330 static void tracker_sparql_cursor_real_rewind (TrackerSparqlCursor* self) {
331 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
332 g_critical ("Type `%s' does not implement abstract method `tracker_sparql_cursor_rewind'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
333 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
334 return;
335 #line 336 "tracker-cursor.c"
336 }
337
338
339 void tracker_sparql_cursor_rewind (TrackerSparqlCursor* self) {
340 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
341 g_return_if_fail (self != NULL);
342 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
343 TRACKER_SPARQL_CURSOR_GET_CLASS (self)->rewind (self);
344 #line 345 "tracker-cursor.c"
345 }
346
347
348 /**
349 * tracker_sparql_cursor_close:
350 * @self: a #TrackerSparqlCursor
351 *
352 * Closes the iterator, making it invalid.
353 *
354 * Since: 0.12
355 */
356 static void tracker_sparql_cursor_real_close (TrackerSparqlCursor* self) {
357 }
358
359
360 void tracker_sparql_cursor_close (TrackerSparqlCursor* self) {
361 #line 217 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
362 g_return_if_fail (self != NULL);
363 #line 217 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
364 TRACKER_SPARQL_CURSOR_GET_CLASS (self)->close (self);
365 #line 366 "tracker-cursor.c"
366 }
367
368
369 /**
370 * tracker_sparql_cursor_get_integer:
371 * @self: a #TrackerSparqlCursor
372 * @column: column number to retrieve (first one is 0)
373 *
374 * Retrieve an integer for the current row in @column.
375 *
376 * Returns: a #gint64.
377 *
378 * Since: 0.10
379 */
380 static gint64 int64_parse (const gchar* str) {
381 gint64 result = 0LL;
382 const gchar* _tmp0_;
383 gint64 _tmp1_ = 0LL;
384 #line 593 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
385 g_return_val_if_fail (str != NULL, 0LL);
386 #line 594 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
387 _tmp0_ = str;
388 #line 594 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
389 _tmp1_ = g_ascii_strtoll (_tmp0_, NULL, (guint) 0);
390 #line 594 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
391 result = _tmp1_;
392 #line 594 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
393 return result;
394 #line 395 "tracker-cursor.c"
395 }
396
397
398 static gint64 tracker_sparql_cursor_real_get_integer (TrackerSparqlCursor* self, gint column) {
399 gint64 result = 0LL;
400 gint _tmp0_;
401 TrackerSparqlValueType _tmp1_ = 0;
402 gint _tmp2_;
403 const gchar* _tmp3_ = NULL;
404 const gchar* as_str;
405 gint64 _tmp4_ = 0LL;
406 #line 232 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
407 _tmp0_ = column;
408 #line 232 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
409 _tmp1_ = tracker_sparql_cursor_get_value_type (self, _tmp0_);
410 #line 232 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
411 g_return_val_if_fail (_tmp1_ == TRACKER_SPARQL_VALUE_TYPE_INTEGER, 0);
412 #line 233 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
413 _tmp2_ = column;
414 #line 233 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
415 _tmp3_ = tracker_sparql_cursor_get_string (self, _tmp2_, NULL);
416 #line 233 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
417 as_str = _tmp3_;
418 #line 234 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
419 _tmp4_ = int64_parse (as_str);
420 #line 234 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
421 result = _tmp4_;
422 #line 234 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
423 return result;
424 #line 425 "tracker-cursor.c"
425 }
426
427
428 gint64 tracker_sparql_cursor_get_integer (TrackerSparqlCursor* self, gint column) {
429 #line 231 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
430 g_return_val_if_fail (self != NULL, 0LL);
431 #line 231 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
432 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->get_integer (self, column);
433 #line 434 "tracker-cursor.c"
434 }
435
436
437 /**
438 * tracker_sparql_cursor_get_double:
439 * @self: a #TrackerSparqlCursor
440 * @column: column number to retrieve (first one is 0)
441 *
442 * Retrieve a double for the current row in @column.
443 *
444 * Returns: a double.
445 *
446 * Since: 0.10
447 */
448 static gdouble double_parse (const gchar* str) {
449 gdouble result = 0.0;
450 const gchar* _tmp0_;
451 gdouble _tmp1_ = 0.0;
452 #line 777 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
453 g_return_val_if_fail (str != NULL, 0.0);
454 #line 778 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
455 _tmp0_ = str;
456 #line 778 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
457 _tmp1_ = g_ascii_strtod (_tmp0_, NULL);
458 #line 778 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
459 result = _tmp1_;
460 #line 778 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
461 return result;
462 #line 463 "tracker-cursor.c"
463 }
464
465
466 static gdouble tracker_sparql_cursor_real_get_double (TrackerSparqlCursor* self, gint column) {
467 gdouble result = 0.0;
468 gint _tmp0_;
469 TrackerSparqlValueType _tmp1_ = 0;
470 gint _tmp2_;
471 const gchar* _tmp3_ = NULL;
472 const gchar* as_str;
473 gdouble _tmp4_ = 0.0;
474 #line 249 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
475 _tmp0_ = column;
476 #line 249 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
477 _tmp1_ = tracker_sparql_cursor_get_value_type (self, _tmp0_);
478 #line 249 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
479 g_return_val_if_fail (_tmp1_ == TRACKER_SPARQL_VALUE_TYPE_DOUBLE, 0);
480 #line 250 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
481 _tmp2_ = column;
482 #line 250 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
483 _tmp3_ = tracker_sparql_cursor_get_string (self, _tmp2_, NULL);
484 #line 250 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
485 as_str = _tmp3_;
486 #line 251 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
487 _tmp4_ = double_parse (as_str);
488 #line 251 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
489 result = _tmp4_;
490 #line 251 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
491 return result;
492 #line 493 "tracker-cursor.c"
493 }
494
495
496 gdouble tracker_sparql_cursor_get_double (TrackerSparqlCursor* self, gint column) {
497 #line 248 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
498 g_return_val_if_fail (self != NULL, 0.0);
499 #line 248 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
500 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->get_double (self, column);
501 #line 502 "tracker-cursor.c"
502 }
503
504
505 /**
506 * tracker_sparql_cursor_get_boolean:
507 * @self: a #TrackerSparqlCursor
508 * @column: column number to retrieve (first one is 0)
509 *
510 * Retrieve a boolean for the current row in @column.
511 *
512 * Returns: a #gboolean.
513 *
514 * Since: 0.10
515 */
516 static gboolean tracker_sparql_cursor_real_get_boolean (TrackerSparqlCursor* self, gint column) {
517 gboolean result = FALSE;
518 gint _tmp0_;
519 TrackerSparqlValueType _tmp1_ = 0;
520 TrackerSparqlValueType type;
521 gint _tmp2_;
522 const gchar* _tmp3_ = NULL;
523 const gchar* as_str;
524 GCompareFunc _tmp4_;
525 gint _tmp5_ = 0;
526 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
527 _tmp0_ = column;
528 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
529 _tmp1_ = tracker_sparql_cursor_get_value_type (self, _tmp0_);
530 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
531 type = _tmp1_;
532 #line 267 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
533 g_return_val_if_fail (type == TRACKER_SPARQL_VALUE_TYPE_BOOLEAN, 0);
534 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
535 _tmp2_ = column;
536 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
537 _tmp3_ = tracker_sparql_cursor_get_string (self, _tmp2_, NULL);
538 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
539 as_str = _tmp3_;
540 #line 269 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
541 _tmp4_ = g_strcmp0;
542 #line 269 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
543 _tmp5_ = _tmp4_ (as_str, "true");
544 #line 269 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
545 result = _tmp5_ == 0;
546 #line 269 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
547 return result;
548 #line 549 "tracker-cursor.c"
549 }
550
551
552 gboolean tracker_sparql_cursor_get_boolean (TrackerSparqlCursor* self, gint column) {
553 #line 265 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
554 g_return_val_if_fail (self != NULL, FALSE);
555 #line 265 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
556 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->get_boolean (self, column);
557 #line 558 "tracker-cursor.c"
558 }
559
560
561 /**
562 * tracker_sparql_cursor_is_bound:
563 * @self: a #TrackerSparqlCursor
564 * @column: column number to retrieve (first one is 0)
565 *
566 * If the current row and @column are bound to a value, %TRUE is returned.
567 *
568 * Returns: a %TRUE or %FALSE.
569 *
570 * Since: 0.10
571 */
572 static gboolean tracker_sparql_cursor_real_is_bound (TrackerSparqlCursor* self, gint column) {
573 gboolean result = FALSE;
574 gint _tmp0_;
575 TrackerSparqlValueType _tmp1_ = 0;
576 #line 284 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
577 _tmp0_ = column;
578 #line 284 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
579 _tmp1_ = tracker_sparql_cursor_get_value_type (self, _tmp0_);
580 #line 284 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
581 if (_tmp1_ != TRACKER_SPARQL_VALUE_TYPE_UNBOUND) {
582 #line 285 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
583 result = TRUE;
584 #line 285 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
585 return result;
586 #line 587 "tracker-cursor.c"
587 }
588 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
589 result = FALSE;
590 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
591 return result;
592 #line 593 "tracker-cursor.c"
593 }
594
595
596 gboolean tracker_sparql_cursor_is_bound (TrackerSparqlCursor* self, gint column) {
597 #line 283 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
598 g_return_val_if_fail (self != NULL, FALSE);
599 #line 283 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
600 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->is_bound (self, column);
601 #line 602 "tracker-cursor.c"
602 }
603
604
605 TrackerSparqlCursor* tracker_sparql_cursor_construct (GType object_type) {
606 TrackerSparqlCursor * self = NULL;
607 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
608 self = (TrackerSparqlCursor*) g_object_new (object_type, NULL);
609 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
610 return self;
611 #line 612 "tracker-cursor.c"
612 }
613
614
615 /**
616 * tracker_sparql_cursor_get_connection:
617 * @self: a #TrackerSparqlCursor
618 *
619 * Returns: the #TrackerSparqlConnection associated with this
620 * #TrackerSparqlCursor. The returned object must not be unreferenced
621 * by the caller.
622 *
623 * Since: 0.10
624 */
625 TrackerSparqlConnection* tracker_sparql_cursor_get_connection (TrackerSparqlCursor* self) {
626 TrackerSparqlConnection* result;
627 TrackerSparqlConnection* _tmp0_;
628 #line 85 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
629 g_return_val_if_fail (self != NULL, NULL);
630 #line 85 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
631 _tmp0_ = self->priv->_connection;
632 #line 85 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
633 result = _tmp0_;
634 #line 85 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
635 return result;
636 #line 637 "tracker-cursor.c"
637 }
638
639
640 static gpointer _g_object_ref0 (gpointer self) {
641 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
642 return self ? g_object_ref (self) : NULL;
643 #line 644 "tracker-cursor.c"
644 }
645
646
647 void tracker_sparql_cursor_set_connection (TrackerSparqlCursor* self, TrackerSparqlConnection* value) {
648 TrackerSparqlConnection* _tmp0_;
649 TrackerSparqlConnection* _tmp1_;
650 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
651 g_return_if_fail (self != NULL);
652 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
653 _tmp0_ = value;
654 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
655 _tmp1_ = _g_object_ref0 (_tmp0_);
656 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
657 _g_object_unref0 (self->priv->_connection);
658 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
659 self->priv->_connection = _tmp1_;
660 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
661 g_object_notify ((GObject *) self, "connection");
662 #line 663 "tracker-cursor.c"
663 }
664
665
666 /**
667 * tracker_sparql_cursor_get_n_columns:
668 * @self: a #TrackerSparqlCursor
669 *
670 * This method should only be called after a successful
671 * tracker_sparql_cursor_next(); otherwise its return value
672 * will be undefined.
673 *
674 * Returns: a #gint representing the number of columns available in the
675 * results to iterate.
676 *
677 * Since: 0.10
678 */
679 gint tracker_sparql_cursor_get_n_columns (TrackerSparqlCursor* self) {
680 #line 112 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
681 g_return_val_if_fail (self != NULL, 0);
682 #line 112 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
683 return TRACKER_SPARQL_CURSOR_GET_CLASS (self)->get_n_columns (self);
684 #line 685 "tracker-cursor.c"
685 }
686
687
688 static void tracker_sparql_cursor_class_init (TrackerSparqlCursorClass * klass) {
689 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
690 tracker_sparql_cursor_parent_class = g_type_class_peek_parent (klass);
691 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
692 g_type_class_add_private (klass, sizeof (TrackerSparqlCursorPrivate));
693 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
694 TRACKER_SPARQL_CURSOR_CLASS (klass)->get_value_type = tracker_sparql_cursor_real_get_value_type;
695 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
696 TRACKER_SPARQL_CURSOR_CLASS (klass)->get_variable_name = tracker_sparql_cursor_real_get_variable_name;
697 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
698 TRACKER_SPARQL_CURSOR_CLASS (klass)->get_string = tracker_sparql_cursor_real_get_string;
699 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
700 TRACKER_SPARQL_CURSOR_CLASS (klass)->next = tracker_sparql_cursor_real_next;
701 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
702 TRACKER_SPARQL_CURSOR_CLASS (klass)->rewind = tracker_sparql_cursor_real_rewind;
703 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
704 TRACKER_SPARQL_CURSOR_CLASS (klass)->close = tracker_sparql_cursor_real_close;
705 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
706 TRACKER_SPARQL_CURSOR_CLASS (klass)->get_integer = tracker_sparql_cursor_real_get_integer;
707 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
708 TRACKER_SPARQL_CURSOR_CLASS (klass)->get_double = tracker_sparql_cursor_real_get_double;
709 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
710 TRACKER_SPARQL_CURSOR_CLASS (klass)->get_boolean = tracker_sparql_cursor_real_get_boolean;
711 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
712 TRACKER_SPARQL_CURSOR_CLASS (klass)->is_bound = tracker_sparql_cursor_real_is_bound;
713 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
714 G_OBJECT_CLASS (klass)->get_property = _vala_tracker_sparql_cursor_get_property;
715 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
716 G_OBJECT_CLASS (klass)->set_property = _vala_tracker_sparql_cursor_set_property;
717 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
718 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_cursor_finalize;
719 #line 720 "tracker-cursor.c"
720 /**
721 * TrackerSparqlCursor:connection:
722 *
723 * The #TrackerSparqlConnection used to retrieve the results.
724 *
725 * Since: 0.10
726 */
727 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
728 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_CURSOR_CONNECTION, g_param_spec_object ("connection", "connection", "connection", TRACKER_SPARQL_TYPE_CONNECTION, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
729 #line 730 "tracker-cursor.c"
730 /**
731 * TrackerSparqlCursor:n_columns:
732 *
733 * Number of columns available in the results to iterate.
734 *
735 * Since: 0.10
736 */
737 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
738 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_CURSOR_N_COLUMNS, g_param_spec_int ("n-columns", "n-columns", "n-columns", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
739 #line 740 "tracker-cursor.c"
740 }
741
742
743 static void tracker_sparql_cursor_instance_init (TrackerSparqlCursor * self) {
744 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
745 self->priv = TRACKER_SPARQL_CURSOR_GET_PRIVATE (self);
746 #line 747 "tracker-cursor.c"
747 }
748
749
750 static void tracker_sparql_cursor_finalize (GObject* obj) {
751 TrackerSparqlCursor * self;
752 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
753 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_CURSOR, TrackerSparqlCursor);
754 #line 74 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
755 _g_object_unref0 (self->priv->_connection);
756 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
757 G_OBJECT_CLASS (tracker_sparql_cursor_parent_class)->finalize (obj);
758 #line 759 "tracker-cursor.c"
759 }
760
761
762 /**
763 * TrackerSparqlCursor:
764 *
765 * The <structname>TrackerSparqlCursor</structname> object represents an
766 * iterator of results.
767 */
768 GType tracker_sparql_cursor_get_type (void) {
769 static volatile gsize tracker_sparql_cursor_type_id__volatile = 0;
770 if (g_once_init_enter (&tracker_sparql_cursor_type_id__volatile)) {
771 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlCursorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_cursor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlCursor), 0, (GInstanceInitFunc) tracker_sparql_cursor_instance_init, NULL };
772 GType tracker_sparql_cursor_type_id;
773 tracker_sparql_cursor_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlCursor", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
774 g_once_init_leave (&tracker_sparql_cursor_type_id__volatile, tracker_sparql_cursor_type_id);
775 }
776 return tracker_sparql_cursor_type_id__volatile;
777 }
778
779
780 static void _vala_tracker_sparql_cursor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
781 TrackerSparqlCursor * self;
782 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_CURSOR, TrackerSparqlCursor);
783 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
784 switch (property_id) {
785 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
786 case TRACKER_SPARQL_CURSOR_CONNECTION:
787 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
788 g_value_set_object (value, tracker_sparql_cursor_get_connection (self));
789 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
790 break;
791 #line 792 "tracker-cursor.c"
792 default:
793 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
794 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
795 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
796 break;
797 #line 798 "tracker-cursor.c"
798 }
799 }
800
801
802 static void _vala_tracker_sparql_cursor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
803 TrackerSparqlCursor * self;
804 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_CURSOR, TrackerSparqlCursor);
805 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
806 switch (property_id) {
807 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
808 case TRACKER_SPARQL_CURSOR_CONNECTION:
809 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
810 tracker_sparql_cursor_set_connection (self, g_value_get_object (value));
811 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
812 break;
813 #line 814 "tracker-cursor.c"
814 default:
815 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
816 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
817 #line 65 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-cursor.vala"
818 break;
819 #line 820 "tracker-cursor.c"
820 }
821 }