Location | Tool | Test ID | Function | Issue |
---|---|---|---|---|
tracker-builder.c:255:7 | gcc | unused-but-set-variable | tracker_sparql_builder_construct_update | variable '_tmp0__length1' set but not used |
tracker-builder.c:259:2 | clang-analyzer | Value stored to '_tmp0_' is never read | ||
tracker-builder.c:261:2 | clang-analyzer | Value stored to '_tmp0__length1' is never read | ||
tracker-builder.c:340:7 | gcc | unused-but-set-variable | tracker_sparql_builder_construct_embedded_insert | variable '_tmp2__length1' set but not used |
tracker-builder.c:344:2 | clang-analyzer | Value stored to '_tmp0_' is never read | ||
tracker-builder.c:346:2 | clang-analyzer | Value stored to '_tmp0__length1' is never read | ||
tracker-builder.c:350:2 | clang-analyzer | Value stored to '_tmp1_' is never read | ||
tracker-builder.c:352:2 | clang-analyzer | Value stored to '_tmp1__length1' is never read | ||
tracker-builder.c:356:2 | clang-analyzer | Value stored to '_tmp2_' is never read | ||
tracker-builder.c:358:2 | clang-analyzer | Value stored to '_tmp2__length1' is never read | ||
tracker-builder.c:402:7 | gcc | unused-but-set-variable | tracker_sparql_builder_insert_open | variable '_tmp2__length1' set but not used |
tracker-builder.c:413:2 | clang-analyzer | Value stored to '_tmp2_' is never read | ||
tracker-builder.c:415:2 | clang-analyzer | Value stored to '_tmp2__length1' is never read | ||
tracker-builder.c:479:7 | gcc | unused-but-set-variable | tracker_sparql_builder_insert_silent_open | variable '_tmp2__length1' set but not used |
tracker-builder.c:490:2 | clang-analyzer | Value stored to '_tmp2_' is never read | ||
tracker-builder.c:492:2 | clang-analyzer | Value stored to '_tmp2__length1' is never read | ||
tracker-builder.c:566:8 | gcc | unused-but-set-variable | tracker_sparql_builder_insert_close | variable '_tmp7_' set but not used |
tracker-builder.c:574:3 | clang-analyzer | Value stored to '_tmp7_' is never read | ||
tracker-builder.c:627:7 | gcc | unused-but-set-variable | tracker_sparql_builder_delete_open | variable '_tmp2__length1' set but not used |
tracker-builder.c:638:2 | clang-analyzer | Value stored to '_tmp2_' is never read | ||
tracker-builder.c:640:2 | clang-analyzer | Value stored to '_tmp2__length1' is never read | ||
tracker-builder.c:713:8 | gcc | unused-but-set-variable | tracker_sparql_builder_delete_close | variable '_tmp7_' set but not used |
tracker-builder.c:721:3 | clang-analyzer | Value stored to '_tmp7_' is never read | ||
tracker-builder.c:772:7 | gcc | unused-but-set-variable | tracker_sparql_builder_graph_open | variable '_tmp10__length1' set but not used |
tracker-builder.c:802:2 | clang-analyzer | Value stored to '_tmp10_' is never read | ||
tracker-builder.c:804:2 | clang-analyzer | Value stored to '_tmp10__length1' is never read | ||
tracker-builder.c:854:8 | gcc | unused-but-set-variable | tracker_sparql_builder_graph_close | variable '_tmp7_' set but not used |
tracker-builder.c:862:3 | clang-analyzer | Value stored to '_tmp7_' is never read | ||
tracker-builder.c:905:7 | gcc | unused-but-set-variable | tracker_sparql_builder_where_open | variable '_tmp2__length1' set but not used |
tracker-builder.c:916:2 | clang-analyzer | Value stored to '_tmp2_' is never read | ||
tracker-builder.c:918:2 | clang-analyzer | Value stored to '_tmp2__length1' is never read | ||
tracker-builder.c:966:8 | gcc | unused-but-set-variable | tracker_sparql_builder_where_close | variable '_tmp7_' set but not used |
tracker-builder.c:974:3 | clang-analyzer | Value stored to '_tmp7_' is never read | ||
tracker-builder.c:1164:8 | gcc | unused-but-set-variable | tracker_sparql_builder_subject | variable '_tmp15_' set but not used |
tracker-builder.c:1172:3 | clang-analyzer | Value stored to '_tmp15_' is never read | ||
tracker-builder.c:1182:2 | clang-analyzer | Value stored to '_tmp18_' is never read | ||
tracker-builder.c:1184:2 | clang-analyzer | Value stored to '_tmp18__length1' is never read | ||
tracker-builder.c:1286:8 | gcc | unused-but-set-variable | tracker_sparql_builder_predicate | variable '_tmp9_' set but not used |
tracker-builder.c:1294:3 | clang-analyzer | Value stored to '_tmp9_' is never read | ||
tracker-builder.c:1308:2 | clang-analyzer | Value stored to '_tmp13_' is never read | ||
tracker-builder.c:1310:2 | clang-analyzer | Value stored to '_tmp13__length1' is never read | ||
tracker-builder.c:1383:7 | gcc | unused-but-set-variable | tracker_sparql_builder_object | variable '_tmp11__length1' set but not used |
tracker-builder.c:1429:2 | clang-analyzer | Value stored to '_tmp11_' is never read | ||
tracker-builder.c:1431:2 | clang-analyzer | Value stored to '_tmp11__length1' is never read | ||
tracker-builder.c:1479:7 | gcc | unused-but-set-variable | tracker_sparql_builder_object_string | variable '_tmp26__length1' set but not used |
tracker-builder.c:1651:2 | clang-analyzer | Value stored to '_tmp26_' is never read | ||
tracker-builder.c:1653:2 | clang-analyzer | Value stored to '_tmp26__length1' is never read | ||
tracker-builder.c:1984:12 | clang-analyzer | Value stored to '_result_' during its initialization is never read | ||
tracker-builder.c:2073:7 | gcc | unused-but-set-variable | double_to_string | variable '_tmp1__length1' set but not used |
tracker-builder.c:2082:2 | clang-analyzer | Value stored to '_tmp1__length1' is never read | ||
tracker-builder.c:2153:7 | gcc | unused-but-set-variable | tracker_sparql_builder_object_blank_open | variable '_tmp9__length1' set but not used |
tracker-builder.c:2190:2 | clang-analyzer | Value stored to '_tmp9_' is never read | ||
tracker-builder.c:2192:2 | clang-analyzer | Value stored to '_tmp9__length1' is never read | ||
tracker-builder.c:2233:7 | gcc | unused-but-set-variable | tracker_sparql_builder_object_blank_close | variable '_tmp7__length1' set but not used |
tracker-builder.c:2244:2 | clang-analyzer | Value stored to '_tmp2__length1' is never read | ||
tracker-builder.c:2246:2 | clang-analyzer | Value stored to '_tmp3_' is never read | ||
tracker-builder.c:2260:2 | clang-analyzer | Value stored to '_tmp6_' is never read | ||
tracker-builder.c:2262:2 | clang-analyzer | Value stored to '_tmp7_' is never read | ||
tracker-builder.c:2264:2 | clang-analyzer | Value stored to '_tmp7__length1' is never read | ||
tracker-builder.c:2341:8 | gcc | unused-but-set-variable | tracker_sparql_builder_append | variable '_tmp3_' set but not used |
tracker-builder.c:2349:3 | clang-analyzer | Value stored to '_tmp3_' is never read | ||
tracker-builder.c:2394:2 | clang-analyzer | Value stored to '_tmp1_' is never read | ||
tracker-builder.c:2411:3 | clang-analyzer | Value stored to '_tmp3__length1' is never read | ||
tracker-builder.c:2417:31 | gcc | unused-but-set-variable | tracker_sparql_builder_get_result | variable '_tmp5_' set but not used |
tracker-builder.c:2420:4 | clang-analyzer | Value stored to '_tmp5_' is never read | ||
tracker-builder.c:2486:29 | gcc | unused-but-set-variable | tracker_sparql_builder_get_state | variable '_tmp1_' set but not used |
tracker-builder.c:2494:2 | clang-analyzer | Value stored to '_tmp0__length1' is never read | ||
tracker-builder.c:2496:2 | clang-analyzer | Value stored to '_tmp1_' is never read |
1 /* tracker-builder.c generated by valac 0.18.1, the Vala compiler
2 * generated from tracker-builder.vala, do not modify */
3
4 /*
5 * Copyright (C) 2009, 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-builder
24 * @short_description: Creating insertion/update SPARQL queries.
25 * @title: TrackerSparqlBuilder
26 * @stability: Stable
27 * @include: tracker-sparql.h
28 *
29 * <para>
30 * #TrackerSparqlBuilder is an object what will gather a set of
31 * subject/predicate/object triples, together with an optional WHERE clause,
32 * in order to create a query that may be issued to tracker-store.
33 * </para>
34 *
35 * <para>
36 * When using #TrackerSparqlBuilder, note that you may append several predicates
37 * for the same subject, and several objects for the same predicate.
38 * </para>
39 */
40 /**
41 * TrackerSparqlBuilder:
42 *
43 * The <structname>TrackerSparqlBuilder</structname> object represents an
44 * insertion/update SPARQL query.
45 */
46 /**
47 * tracker_sparql_builder_get_result:
48 * @self: a #TrackerSparqlBuilder
49 *
50 * Retrieves a string representation of the constructed SPARQL query.
51 *
52 * Returns: the created SPARQL query. The string is contained in the
53 * #TrackerSparqlBuilder object, and should not be freed by the caller.
54 *
55 * Since: 0.10
56 */
57 /**
58 * tracker_sparql_builder_get_length:
59 * @self: a #TrackerSparqlBuilder
60 *
61 * Returns the number of objects added to @self.
62 *
63 * Returns: the number of objects contained.
64 *
65 * Since: 0.10
66 */
67 /**
68 * tracker_sparql_builder_get_state:
69 * @self: a #TrackerSparqlBuilder
70 *
71 * Returns the current state of @self
72 *
73 * Returns: a #TrackerSparqlBuilderState defining the current state of @self
74 *
75 * Since: 0.10
76 */
77
78 #include <glib.h>
79 #include <glib-object.h>
80 #include <stdlib.h>
81 #include <string.h>
82 #include <time.h>
83 #include <float.h>
84 #include <math.h>
85
86
87 #define TRACKER_SPARQL_TYPE_BUILDER (tracker_sparql_builder_get_type ())
88 #define TRACKER_SPARQL_BUILDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_BUILDER, TrackerSparqlBuilder))
89 #define TRACKER_SPARQL_BUILDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_BUILDER, TrackerSparqlBuilderClass))
90 #define TRACKER_SPARQL_IS_BUILDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_BUILDER))
91 #define TRACKER_SPARQL_IS_BUILDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_BUILDER))
92 #define TRACKER_SPARQL_BUILDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_BUILDER, TrackerSparqlBuilderClass))
93
94 typedef struct _TrackerSparqlBuilder TrackerSparqlBuilder;
95 typedef struct _TrackerSparqlBuilderClass TrackerSparqlBuilderClass;
96 typedef struct _TrackerSparqlBuilderPrivate TrackerSparqlBuilderPrivate;
97
98 #define TRACKER_SPARQL_BUILDER_TYPE_STATE (tracker_sparql_builder_state_get_type ())
99 #define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
100 #define _g_free0(var) (var = (g_free (var), NULL))
101
102 struct _TrackerSparqlBuilder {
103 GObject parent_instance;
104 TrackerSparqlBuilderPrivate * priv;
105 };
106
107 struct _TrackerSparqlBuilderClass {
108 GObjectClass parent_class;
109 };
110
111 typedef enum {
112 TRACKER_SPARQL_BUILDER_STATE_UPDATE,
113 TRACKER_SPARQL_BUILDER_STATE_INSERT,
114 TRACKER_SPARQL_BUILDER_STATE_DELETE,
115 TRACKER_SPARQL_BUILDER_STATE_SUBJECT,
116 TRACKER_SPARQL_BUILDER_STATE_PREDICATE,
117 TRACKER_SPARQL_BUILDER_STATE_OBJECT,
118 TRACKER_SPARQL_BUILDER_STATE_BLANK,
119 TRACKER_SPARQL_BUILDER_STATE_WHERE,
120 TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT,
121 TRACKER_SPARQL_BUILDER_STATE_GRAPH
122 } TrackerSparqlBuilderState;
123
124 struct _TrackerSparqlBuilderPrivate {
125 gint _length;
126 TrackerSparqlBuilderState* states;
127 gint states_length1;
128 gint _states_size_;
129 GString* str;
130 };
131
132
133 static gpointer tracker_sparql_builder_parent_class = NULL;
134
135 GType tracker_sparql_builder_get_type (void) G_GNUC_CONST;
136 GType tracker_sparql_builder_state_get_type (void) G_GNUC_CONST;
137 #define TRACKER_SPARQL_BUILDER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_BUILDER, TrackerSparqlBuilderPrivate))
138 enum {
139 TRACKER_SPARQL_BUILDER_DUMMY_PROPERTY,
140 TRACKER_SPARQL_BUILDER_RESULT,
141 TRACKER_SPARQL_BUILDER_LENGTH,
142 TRACKER_SPARQL_BUILDER_STATE
143 };
144 TrackerSparqlBuilder* tracker_sparql_builder_new_update (void);
145 TrackerSparqlBuilder* tracker_sparql_builder_construct_update (GType object_type);
146 static void _vala_array_add1 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
147 TrackerSparqlBuilder* tracker_sparql_builder_new_embedded_insert (void);
148 TrackerSparqlBuilder* tracker_sparql_builder_construct_embedded_insert (GType object_type);
149 static void _vala_array_add2 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
150 static void _vala_array_add3 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
151 static void _vala_array_add4 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
152 void tracker_sparql_builder_insert_open (TrackerSparqlBuilder* self, const gchar* graph);
153 TrackerSparqlBuilderState tracker_sparql_builder_get_state (TrackerSparqlBuilder* self);
154 static void _vala_array_add5 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
155 void tracker_sparql_builder_insert_silent_open (TrackerSparqlBuilder* self, const gchar* graph);
156 static void _vala_array_add6 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
157 void tracker_sparql_builder_insert_close (TrackerSparqlBuilder* self);
158 void tracker_sparql_builder_delete_open (TrackerSparqlBuilder* self, const gchar* graph);
159 static void _vala_array_add7 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
160 void tracker_sparql_builder_delete_close (TrackerSparqlBuilder* self);
161 void tracker_sparql_builder_graph_open (TrackerSparqlBuilder* self, const gchar* graph);
162 static void _vala_array_add8 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
163 void tracker_sparql_builder_graph_close (TrackerSparqlBuilder* self);
164 void tracker_sparql_builder_where_open (TrackerSparqlBuilder* self);
165 static void _vala_array_add9 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
166 void tracker_sparql_builder_where_close (TrackerSparqlBuilder* self);
167 void tracker_sparql_builder_subject_variable (TrackerSparqlBuilder* self, const gchar* var_name);
168 void tracker_sparql_builder_subject (TrackerSparqlBuilder* self, const gchar* s);
169 void tracker_sparql_builder_object_variable (TrackerSparqlBuilder* self, const gchar* var_name);
170 void tracker_sparql_builder_object (TrackerSparqlBuilder* self, const gchar* s);
171 void tracker_sparql_builder_subject_iri (TrackerSparqlBuilder* self, const gchar* iri);
172 static void _vala_array_add10 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
173 void tracker_sparql_builder_predicate_iri (TrackerSparqlBuilder* self, const gchar* iri);
174 void tracker_sparql_builder_predicate (TrackerSparqlBuilder* self, const gchar* s);
175 static void _vala_array_add11 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
176 void tracker_sparql_builder_object_iri (TrackerSparqlBuilder* self, const gchar* iri);
177 static void _vala_array_add12 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
178 gint tracker_sparql_builder_get_length (TrackerSparqlBuilder* self);
179 static void tracker_sparql_builder_set_length (TrackerSparqlBuilder* self, gint value);
180 void tracker_sparql_builder_object_string (TrackerSparqlBuilder* self, const gchar* literal);
181 static void _vala_array_add13 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
182 void tracker_sparql_builder_object_unvalidated (TrackerSparqlBuilder* self, const gchar* value);
183 void tracker_sparql_builder_object_boolean (TrackerSparqlBuilder* self, gboolean literal);
184 void tracker_sparql_builder_object_int64 (TrackerSparqlBuilder* self, gint64 literal);
185 void tracker_sparql_builder_object_date (TrackerSparqlBuilder* self, time_t* literal);
186 void tracker_sparql_builder_object_double (TrackerSparqlBuilder* self, gdouble literal);
187 void tracker_sparql_builder_object_blank_open (TrackerSparqlBuilder* self);
188 static void _vala_array_add14 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
189 void tracker_sparql_builder_object_blank_close (TrackerSparqlBuilder* self);
190 static void _vala_array_add15 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
191 void tracker_sparql_builder_prepend (TrackerSparqlBuilder* self, const gchar* raw);
192 void tracker_sparql_builder_append (TrackerSparqlBuilder* self, const gchar* raw);
193 TrackerSparqlBuilder* tracker_sparql_builder_new (void);
194 TrackerSparqlBuilder* tracker_sparql_builder_construct (GType object_type);
195 const gchar* tracker_sparql_builder_get_result (TrackerSparqlBuilder* self);
196 static void tracker_sparql_builder_finalize (GObject* obj);
197 static void _vala_tracker_sparql_builder_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
198 static void _vala_tracker_sparql_builder_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
199
200
201 /**
202 * TrackerSparqlBuilderState:
203 * @TRACKER_SPARQL_BUILDER_STATE_UPDATE: Builder is generating an UPDATE
204 * @TRACKER_SPARQL_BUILDER_STATE_INSERT: Builder is generating an INSERT
205 * @TRACKER_SPARQL_BUILDER_STATE_DELETE: Builder is generating a DELETE
206 * @TRACKER_SPARQL_BUILDER_STATE_SUBJECT: Builder is generating the subject of the query
207 * @TRACKER_SPARQL_BUILDER_STATE_PREDICATE: Builder is generating the predicate of the query
208 * @TRACKER_SPARQL_BUILDER_STATE_OBJECT: Builder is generating the object of the query
209 * @TRACKER_SPARQL_BUILDER_STATE_BLANK: Builder is generating a blank node subject
210 * @TRACKER_SPARQL_BUILDER_STATE_WHERE: Builder is generating the WHERE clause contents
211 * @TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT: Builder is generating an embedded INSERT
212 * @TRACKER_SPARQL_BUILDER_STATE_GRAPH: Builder is generating the GRAPH clause contents
213 *
214 * Enumeration with the possible states of the SPARQL Builder
215 */
216 GType tracker_sparql_builder_state_get_type (void) {
217 static volatile gsize tracker_sparql_builder_state_type_id__volatile = 0;
218 if (g_once_init_enter (&tracker_sparql_builder_state_type_id__volatile)) {
219 static const GEnumValue values[] = {{TRACKER_SPARQL_BUILDER_STATE_UPDATE, "TRACKER_SPARQL_BUILDER_STATE_UPDATE", "update"}, {TRACKER_SPARQL_BUILDER_STATE_INSERT, "TRACKER_SPARQL_BUILDER_STATE_INSERT", "insert"}, {TRACKER_SPARQL_BUILDER_STATE_DELETE, "TRACKER_SPARQL_BUILDER_STATE_DELETE", "delete"}, {TRACKER_SPARQL_BUILDER_STATE_SUBJECT, "TRACKER_SPARQL_BUILDER_STATE_SUBJECT", "subject"}, {TRACKER_SPARQL_BUILDER_STATE_PREDICATE, "TRACKER_SPARQL_BUILDER_STATE_PREDICATE", "predicate"}, {TRACKER_SPARQL_BUILDER_STATE_OBJECT, "TRACKER_SPARQL_BUILDER_STATE_OBJECT", "object"}, {TRACKER_SPARQL_BUILDER_STATE_BLANK, "TRACKER_SPARQL_BUILDER_STATE_BLANK", "blank"}, {TRACKER_SPARQL_BUILDER_STATE_WHERE, "TRACKER_SPARQL_BUILDER_STATE_WHERE", "where"}, {TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT, "TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT", "embedded-insert"}, {TRACKER_SPARQL_BUILDER_STATE_GRAPH, "TRACKER_SPARQL_BUILDER_STATE_GRAPH", "graph"}, {0, NULL, NULL}};
220 GType tracker_sparql_builder_state_type_id;
221 tracker_sparql_builder_state_type_id = g_enum_register_static ("TrackerSparqlBuilderState", values);
222 g_once_init_leave (&tracker_sparql_builder_state_type_id__volatile, tracker_sparql_builder_state_type_id);
223 }
224 return tracker_sparql_builder_state_type_id__volatile;
225 }
226
227
228 /**
229 * tracker_sparql_builder_new_update:
230 *
231 * Creates an empty #TrackerSparqlBuilder for an update query.
232 *
233 * Returns: a newly created #TrackerSparqlBuilder. Free with g_object_unref() when done
234 *
235 * Since: 0.10
236 */
237 static void _vala_array_add1 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
238 #line 173 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
239 if ((*length) == (*size)) {
240 #line 173 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
241 *size = (*size) ? (2 * (*size)) : 4;
242 #line 173 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
243 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
244 #line 245 "tracker-builder.c"
245 }
246 #line 173 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
247 (*array)[(*length)++] = value;
248 #line 249 "tracker-builder.c"
249 }
250
251
252 TrackerSparqlBuilder* tracker_sparql_builder_construct_update (GType object_type) {
253 TrackerSparqlBuilder * self = NULL;
254 TrackerSparqlBuilderState* _tmp0_;
255 gint _tmp0__length1;
(emitted by gcc) 256 #line 172 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
257 self = (TrackerSparqlBuilder*) g_object_new (object_type, NULL);
258 #line 173 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
259 _tmp0_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
260 #line 173 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
261 _tmp0__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
262 #line 173 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
263 _vala_array_add1 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_UPDATE);
264 #line 172 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
265 return self;
266 #line 267 "tracker-builder.c"
267 }
268
269
270 TrackerSparqlBuilder* tracker_sparql_builder_new_update (void) {
271 #line 172 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
272 return tracker_sparql_builder_construct_update (TRACKER_SPARQL_TYPE_BUILDER);
273 #line 274 "tracker-builder.c"
274 }
275
276
277 /**
278 * tracker_sparql_builder_new_embedded_insert:
279 *
280 * Creates a #TrackerSparqlBuilder ready to be embedded in another query. In embedded
281 * inserts, the subject is implied (responsibility of the embedder), so only calls to
282 * append predicates and objects for the given subject are allowed.
283 *
284 * Returns: a newly created #TrackerSparqlBuilder. Free with g_object_unref() when done
285 *
286 * Since: 0.10
287 */
288 static void _vala_array_add2 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
289 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
290 if ((*length) == (*size)) {
291 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
292 *size = (*size) ? (2 * (*size)) : 4;
293 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
294 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
295 #line 296 "tracker-builder.c"
296 }
297 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
298 (*array)[(*length)++] = value;
299 #line 300 "tracker-builder.c"
300 }
301
302
303 static void _vala_array_add3 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
304 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
305 if ((*length) == (*size)) {
306 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
307 *size = (*size) ? (2 * (*size)) : 4;
308 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
309 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
310 #line 311 "tracker-builder.c"
311 }
312 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
313 (*array)[(*length)++] = value;
314 #line 315 "tracker-builder.c"
315 }
316
317
318 static void _vala_array_add4 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
319 #line 190 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
320 if ((*length) == (*size)) {
321 #line 190 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
322 *size = (*size) ? (2 * (*size)) : 4;
323 #line 190 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
324 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
325 #line 326 "tracker-builder.c"
326 }
327 #line 190 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
328 (*array)[(*length)++] = value;
329 #line 330 "tracker-builder.c"
330 }
331
332
333 TrackerSparqlBuilder* tracker_sparql_builder_construct_embedded_insert (GType object_type) {
334 TrackerSparqlBuilder * self = NULL;
335 TrackerSparqlBuilderState* _tmp0_;
336 gint _tmp0__length1;
337 TrackerSparqlBuilderState* _tmp1_;
338 gint _tmp1__length1;
339 TrackerSparqlBuilderState* _tmp2_;
340 gint _tmp2__length1;
(emitted by gcc) 341 #line 187 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
342 self = (TrackerSparqlBuilder*) g_object_new (object_type, NULL);
343 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
344 _tmp0_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
345 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
346 _tmp0__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
347 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
348 _vala_array_add2 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT);
349 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
350 _tmp1_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
351 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
352 _tmp1__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
353 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
354 _vala_array_add3 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_INSERT);
355 #line 190 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
356 _tmp2_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
357 #line 190 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
358 _tmp2__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
359 #line 190 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
360 _vala_array_add4 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_SUBJECT);
361 #line 187 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
362 return self;
363 #line 364 "tracker-builder.c"
364 }
365
366
367 TrackerSparqlBuilder* tracker_sparql_builder_new_embedded_insert (void) {
368 #line 187 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
369 return tracker_sparql_builder_construct_embedded_insert (TRACKER_SPARQL_TYPE_BUILDER);
370 #line 371 "tracker-builder.c"
371 }
372
373
374 /**
375 * tracker_sparql_builder_insert_open:
376 * @self: a #TrackerSparqlBuilder
377 * @graph: graph name, or %NULL.
378 *
379 * Opens an insertion statement.
380 *
381 * Since: 0.10
382 */
383 static void _vala_array_add5 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
384 #line 205 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
385 if ((*length) == (*size)) {
386 #line 205 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
387 *size = (*size) ? (2 * (*size)) : 4;
388 #line 205 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
389 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
390 #line 391 "tracker-builder.c"
391 }
392 #line 205 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
393 (*array)[(*length)++] = value;
394 #line 395 "tracker-builder.c"
395 }
396
397
398 void tracker_sparql_builder_insert_open (TrackerSparqlBuilder* self, const gchar* graph) {
399 TrackerSparqlBuilderState _tmp0_;
400 TrackerSparqlBuilderState _tmp1_;
401 TrackerSparqlBuilderState* _tmp2_;
402 gint _tmp2__length1;
(emitted by gcc) 403 const gchar* _tmp3_;
404 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
405 g_return_if_fail (self != NULL);
406 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
407 _tmp0_ = tracker_sparql_builder_get_state (self);
408 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
409 _tmp1_ = _tmp0_;
410 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
411 g_return_if_fail (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_UPDATE);
412 #line 205 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
413 _tmp2_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
414 #line 205 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
415 _tmp2__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
416 #line 205 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
417 _vala_array_add5 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_INSERT);
418 #line 206 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
419 _tmp3_ = graph;
420 #line 206 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
421 if (_tmp3_ != NULL) {
422 #line 423 "tracker-builder.c"
423 GString* _tmp4_;
424 const gchar* _tmp5_;
425 gchar* _tmp6_ = NULL;
426 gchar* _tmp7_;
427 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
428 _tmp4_ = self->priv->str;
429 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
430 _tmp5_ = graph;
431 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
432 _tmp6_ = g_strdup_printf ("INSERT INTO <%s> {\n", _tmp5_);
433 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
434 _tmp7_ = _tmp6_;
435 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
436 g_string_append (_tmp4_, _tmp7_);
437 #line 207 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
438 _g_free0 (_tmp7_);
439 #line 440 "tracker-builder.c"
440 } else {
441 GString* _tmp8_;
442 #line 209 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
443 _tmp8_ = self->priv->str;
444 #line 209 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
445 g_string_append (_tmp8_, "INSERT {\n");
446 #line 447 "tracker-builder.c"
447 }
448 }
449
450
451 /**
452 * tracker_sparql_builder_insert_silent_open:
453 * @self: a #TrackerSparqlBuilder
454 * @graph: graph name, or %NULL.
455 *
456 * Opens a silent insertion statement.
457 *
458 * Since: 0.10
459 */
460 static void _vala_array_add6 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
461 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
462 if ((*length) == (*size)) {
463 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
464 *size = (*size) ? (2 * (*size)) : 4;
465 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
466 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
467 #line 468 "tracker-builder.c"
468 }
469 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
470 (*array)[(*length)++] = value;
471 #line 472 "tracker-builder.c"
472 }
473
474
475 void tracker_sparql_builder_insert_silent_open (TrackerSparqlBuilder* self, const gchar* graph) {
476 TrackerSparqlBuilderState _tmp0_;
477 TrackerSparqlBuilderState _tmp1_;
478 TrackerSparqlBuilderState* _tmp2_;
479 gint _tmp2__length1;
(emitted by gcc) 480 const gchar* _tmp3_;
481 #line 221 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
482 g_return_if_fail (self != NULL);
483 #line 221 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
484 _tmp0_ = tracker_sparql_builder_get_state (self);
485 #line 221 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
486 _tmp1_ = _tmp0_;
487 #line 221 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
488 g_return_if_fail (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_UPDATE);
489 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
490 _tmp2_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
491 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
492 _tmp2__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
493 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
494 _vala_array_add6 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_INSERT);
495 #line 225 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
496 _tmp3_ = graph;
497 #line 225 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
498 if (_tmp3_ != NULL) {
499 #line 500 "tracker-builder.c"
500 GString* _tmp4_;
501 const gchar* _tmp5_;
502 gchar* _tmp6_ = NULL;
503 gchar* _tmp7_;
504 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
505 _tmp4_ = self->priv->str;
506 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
507 _tmp5_ = graph;
508 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
509 _tmp6_ = g_strdup_printf ("INSERT SILENT INTO <%s> {\n", _tmp5_);
510 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
511 _tmp7_ = _tmp6_;
512 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
513 g_string_append (_tmp4_, _tmp7_);
514 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
515 _g_free0 (_tmp7_);
516 #line 517 "tracker-builder.c"
517 } else {
518 GString* _tmp8_;
519 #line 228 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
520 _tmp8_ = self->priv->str;
521 #line 228 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
522 g_string_append (_tmp8_, "INSERT SILENT {\n");
523 #line 524 "tracker-builder.c"
524 }
525 }
526
527
528 /**
529 * tracker_sparql_builder_insert_close:
530 * @self: a #TrackerSparqlBuilder
531 *
532 * Closes an insertion statement opened with tracker_sparql_builder_insert_open().
533 *
534 * Since: 0.10
535 */
536 void tracker_sparql_builder_insert_close (TrackerSparqlBuilder* self) {
537 TrackerSparqlBuilderState _tmp0_;
538 TrackerSparqlBuilderState _tmp1_;
539 TrackerSparqlBuilderState _tmp2_;
540 TrackerSparqlBuilderState _tmp3_;
541 TrackerSparqlBuilderState _tmp4_;
542 TrackerSparqlBuilderState _tmp5_;
543 gint _tmp8_;
544 TrackerSparqlBuilderState _tmp9_;
545 TrackerSparqlBuilderState _tmp10_;
546 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
547 g_return_if_fail (self != NULL);
548 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
549 _tmp0_ = tracker_sparql_builder_get_state (self);
550 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
551 _tmp1_ = _tmp0_;
552 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
553 _tmp2_ = tracker_sparql_builder_get_state (self);
554 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
555 _tmp3_ = _tmp2_;
556 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
557 g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_INSERT) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
558 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
559 _tmp4_ = tracker_sparql_builder_get_state (self);
560 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
561 _tmp5_ = _tmp4_;
562 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
563 if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
564 #line 565 "tracker-builder.c"
565 GString* _tmp6_;
566 gint _tmp7_;
(emitted by gcc) 567 #line 243 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
568 _tmp6_ = self->priv->str;
569 #line 243 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
570 g_string_append (_tmp6_, " .\n");
571 #line 244 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
572 self->priv->states_length1 = self->priv->states_length1 - 3;
573 #line 244 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
574 _tmp7_ = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
575 #line 576 "tracker-builder.c"
576 }
577 #line 246 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
578 _tmp8_ = self->priv->states_length1;
579 #line 246 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
580 self->priv->states_length1 = _tmp8_ - 1;
581 #line 248 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
582 _tmp9_ = tracker_sparql_builder_get_state (self);
583 #line 248 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
584 _tmp10_ = _tmp9_;
585 #line 248 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
586 if (_tmp10_ != TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT) {
587 #line 588 "tracker-builder.c"
588 GString* _tmp11_;
589 #line 249 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
590 _tmp11_ = self->priv->str;
591 #line 249 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
592 g_string_append (_tmp11_, "}\n");
593 #line 594 "tracker-builder.c"
594 }
595 }
596
597
598 /**
599 * tracker_sparql_builder_delete_open:
600 * @self: a #TrackerSparqlBuilder
601 * @graph: graph name, or %NULL.
602 *
603 * Opens a DELETE clause. Data triples may be appended in order to prepare
604 * a query to delete them.
605 *
606 * Since: 0.10
607 */
608 static void _vala_array_add7 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
609 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
610 if ((*length) == (*size)) {
611 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
612 *size = (*size) ? (2 * (*size)) : 4;
613 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
614 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
615 #line 616 "tracker-builder.c"
616 }
617 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
618 (*array)[(*length)++] = value;
619 #line 620 "tracker-builder.c"
620 }
621
622
623 void tracker_sparql_builder_delete_open (TrackerSparqlBuilder* self, const gchar* graph) {
624 TrackerSparqlBuilderState _tmp0_;
625 TrackerSparqlBuilderState _tmp1_;
626 TrackerSparqlBuilderState* _tmp2_;
627 gint _tmp2__length1;
(emitted by gcc) 628 const gchar* _tmp3_;
629 #line 263 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
630 g_return_if_fail (self != NULL);
631 #line 263 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
632 _tmp0_ = tracker_sparql_builder_get_state (self);
633 #line 263 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
634 _tmp1_ = _tmp0_;
635 #line 263 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
636 g_return_if_fail (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_UPDATE);
637 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
638 _tmp2_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
639 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
640 _tmp2__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
641 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
642 _vala_array_add7 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_DELETE);
643 #line 267 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
644 _tmp3_ = graph;
645 #line 267 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
646 if (_tmp3_ != NULL) {
647 #line 648 "tracker-builder.c"
648 GString* _tmp4_;
649 const gchar* _tmp5_;
650 gchar* _tmp6_ = NULL;
651 gchar* _tmp7_;
652 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
653 _tmp4_ = self->priv->str;
654 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
655 _tmp5_ = graph;
656 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
657 _tmp6_ = g_strdup_printf ("DELETE FROM <%s> {\n", _tmp5_);
658 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
659 _tmp7_ = _tmp6_;
660 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
661 g_string_append (_tmp4_, _tmp7_);
662 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
663 _g_free0 (_tmp7_);
664 #line 665 "tracker-builder.c"
665 } else {
666 GString* _tmp8_;
667 #line 270 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
668 _tmp8_ = self->priv->str;
669 #line 270 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
670 g_string_append (_tmp8_, "DELETE {\n");
671 #line 672 "tracker-builder.c"
672 }
673 }
674
675
676 /**
677 * tracker_sparql_builder_delete_close:
678 * @self: a #TrackerSparqlBuilder
679 *
680 * Closes a DELETE clause opened through tracker_sparql_builder_delete_open().
681 *
682 * Since: 0.10
683 */
684 void tracker_sparql_builder_delete_close (TrackerSparqlBuilder* self) {
685 TrackerSparqlBuilderState _tmp0_;
686 TrackerSparqlBuilderState _tmp1_;
687 TrackerSparqlBuilderState _tmp2_;
688 TrackerSparqlBuilderState _tmp3_;
689 TrackerSparqlBuilderState _tmp4_;
690 TrackerSparqlBuilderState _tmp5_;
691 gint _tmp8_;
692 GString* _tmp9_;
693 #line 281 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
694 g_return_if_fail (self != NULL);
695 #line 281 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
696 _tmp0_ = tracker_sparql_builder_get_state (self);
697 #line 281 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
698 _tmp1_ = _tmp0_;
699 #line 281 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
700 _tmp2_ = tracker_sparql_builder_get_state (self);
701 #line 281 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
702 _tmp3_ = _tmp2_;
703 #line 281 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
704 g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_DELETE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
705 #line 284 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
706 _tmp4_ = tracker_sparql_builder_get_state (self);
707 #line 284 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
708 _tmp5_ = _tmp4_;
709 #line 284 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
710 if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
711 #line 712 "tracker-builder.c"
712 GString* _tmp6_;
713 gint _tmp7_;
(emitted by gcc) 714 #line 285 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
715 _tmp6_ = self->priv->str;
716 #line 285 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
717 g_string_append (_tmp6_, " .\n");
718 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
719 self->priv->states_length1 = self->priv->states_length1 - 3;
720 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
721 _tmp7_ = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
722 #line 723 "tracker-builder.c"
723 }
724 #line 288 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
725 _tmp8_ = self->priv->states_length1;
726 #line 288 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
727 self->priv->states_length1 = _tmp8_ - 1;
728 #line 290 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
729 _tmp9_ = self->priv->str;
730 #line 290 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
731 g_string_append (_tmp9_, "}\n");
732 #line 733 "tracker-builder.c"
733 }
734
735
736 /**
737 * tracker_sparql_builder_graph_open:
738 * @self: a #TrackerSparqlBuilder
739 * @graph: graph name.
740 *
741 * Opens a GRAPH clause within INSERT, DELETE, or WHERE.
742 *
743 * Since: 0.10
744 */
745 static void _vala_array_add8 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
746 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
747 if ((*length) == (*size)) {
748 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
749 *size = (*size) ? (2 * (*size)) : 4;
750 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
751 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
752 #line 753 "tracker-builder.c"
753 }
754 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
755 (*array)[(*length)++] = value;
756 #line 757 "tracker-builder.c"
757 }
758
759
760 void tracker_sparql_builder_graph_open (TrackerSparqlBuilder* self, const gchar* graph) {
761 TrackerSparqlBuilderState _tmp0_;
762 TrackerSparqlBuilderState _tmp1_;
763 TrackerSparqlBuilderState _tmp2_;
764 TrackerSparqlBuilderState _tmp3_;
765 TrackerSparqlBuilderState _tmp4_;
766 TrackerSparqlBuilderState _tmp5_;
767 TrackerSparqlBuilderState _tmp6_;
768 TrackerSparqlBuilderState _tmp7_;
769 TrackerSparqlBuilderState _tmp8_;
770 TrackerSparqlBuilderState _tmp9_;
771 TrackerSparqlBuilderState* _tmp10_;
772 gint _tmp10__length1;
(emitted by gcc) 773 GString* _tmp11_;
774 const gchar* _tmp12_;
775 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
776 g_return_if_fail (self != NULL);
777 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
778 g_return_if_fail (graph != NULL);
779 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
780 _tmp0_ = tracker_sparql_builder_get_state (self);
781 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
782 _tmp1_ = _tmp0_;
783 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
784 _tmp2_ = tracker_sparql_builder_get_state (self);
785 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
786 _tmp3_ = _tmp2_;
787 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
788 _tmp4_ = tracker_sparql_builder_get_state (self);
789 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
790 _tmp5_ = _tmp4_;
791 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
792 _tmp6_ = tracker_sparql_builder_get_state (self);
793 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
794 _tmp7_ = _tmp6_;
795 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
796 _tmp8_ = tracker_sparql_builder_get_state (self);
797 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
798 _tmp9_ = _tmp8_;
799 #line 302 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
800 g_return_if_fail (((((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_INSERT) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_DELETE)) || (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT)) || (_tmp7_ == TRACKER_SPARQL_BUILDER_STATE_WHERE)) || (_tmp9_ == TRACKER_SPARQL_BUILDER_STATE_GRAPH));
801 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
802 _tmp10_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
803 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
804 _tmp10__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
805 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
806 _vala_array_add8 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_GRAPH);
807 #line 306 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
808 _tmp11_ = self->priv->str;
809 #line 306 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
810 _tmp12_ = graph;
811 #line 306 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
812 g_string_append_printf (_tmp11_, "GRAPH <%s> {\n", _tmp12_);
813 #line 814 "tracker-builder.c"
814 }
815
816
817 /**
818 * tracker_sparql_builder_graph_close:
819 * @self: a #TrackerSparqlBuilder
820 *
821 * Closes a GRAPH clause opened through tracker_sparql_builder_graph_open().
822 *
823 * Since: 0.10
824 */
825 void tracker_sparql_builder_graph_close (TrackerSparqlBuilder* self) {
826 TrackerSparqlBuilderState _tmp0_;
827 TrackerSparqlBuilderState _tmp1_;
828 TrackerSparqlBuilderState _tmp2_;
829 TrackerSparqlBuilderState _tmp3_;
830 TrackerSparqlBuilderState _tmp4_;
831 TrackerSparqlBuilderState _tmp5_;
832 gint _tmp8_;
833 GString* _tmp9_;
834 #line 317 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
835 g_return_if_fail (self != NULL);
836 #line 317 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
837 _tmp0_ = tracker_sparql_builder_get_state (self);
838 #line 317 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
839 _tmp1_ = _tmp0_;
840 #line 317 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
841 _tmp2_ = tracker_sparql_builder_get_state (self);
842 #line 317 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
843 _tmp3_ = _tmp2_;
844 #line 317 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
845 g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_GRAPH) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
846 #line 320 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
847 _tmp4_ = tracker_sparql_builder_get_state (self);
848 #line 320 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
849 _tmp5_ = _tmp4_;
850 #line 320 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
851 if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
852 #line 853 "tracker-builder.c"
853 GString* _tmp6_;
854 gint _tmp7_;
(emitted by gcc) 855 #line 321 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
856 _tmp6_ = self->priv->str;
857 #line 321 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
858 g_string_append (_tmp6_, " .\n");
859 #line 322 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
860 self->priv->states_length1 = self->priv->states_length1 - 3;
861 #line 322 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
862 _tmp7_ = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
863 #line 864 "tracker-builder.c"
864 }
865 #line 324 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
866 _tmp8_ = self->priv->states_length1;
867 #line 324 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
868 self->priv->states_length1 = _tmp8_ - 1;
869 #line 326 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
870 _tmp9_ = self->priv->str;
871 #line 326 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
872 g_string_append (_tmp9_, "}\n");
873 #line 874 "tracker-builder.c"
874 }
875
876
877 /**
878 * tracker_sparql_builder_where_open:
879 * @self: a #TrackerSparqlBuilder
880 *
881 * Opens a WHERE clause. Data triples may be appended then to narrow the scope
882 * to which the update query applies.
883 *
884 * Since: 0.10
885 */
886 static void _vala_array_add9 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
887 #line 341 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
888 if ((*length) == (*size)) {
889 #line 341 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
890 *size = (*size) ? (2 * (*size)) : 4;
891 #line 341 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
892 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
893 #line 894 "tracker-builder.c"
894 }
895 #line 341 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
896 (*array)[(*length)++] = value;
897 #line 898 "tracker-builder.c"
898 }
899
900
901 void tracker_sparql_builder_where_open (TrackerSparqlBuilder* self) {
902 TrackerSparqlBuilderState _tmp0_;
903 TrackerSparqlBuilderState _tmp1_;
904 TrackerSparqlBuilderState* _tmp2_;
905 gint _tmp2__length1;
(emitted by gcc) 906 GString* _tmp3_;
907 #line 338 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
908 g_return_if_fail (self != NULL);
909 #line 338 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
910 _tmp0_ = tracker_sparql_builder_get_state (self);
911 #line 338 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
912 _tmp1_ = _tmp0_;
913 #line 338 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
914 g_return_if_fail (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_UPDATE);
915 #line 341 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
916 _tmp2_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
917 #line 341 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
918 _tmp2__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
919 #line 341 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
920 _vala_array_add9 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_WHERE);
921 #line 342 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
922 _tmp3_ = self->priv->str;
923 #line 342 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
924 g_string_append (_tmp3_, "WHERE {\n");
925 #line 926 "tracker-builder.c"
926 }
927
928
929 /**
930 * tracker_sparql_builder_where_close:
931 * @self: a #TrackerSparqlBuilder
932 *
933 * Closes a WHERE clause opened through tracker_sparql_builder_where_open().
934 *
935 * Since: 0.10
936 */
937 void tracker_sparql_builder_where_close (TrackerSparqlBuilder* self) {
938 TrackerSparqlBuilderState _tmp0_;
939 TrackerSparqlBuilderState _tmp1_;
940 TrackerSparqlBuilderState _tmp2_;
941 TrackerSparqlBuilderState _tmp3_;
942 TrackerSparqlBuilderState _tmp4_;
943 TrackerSparqlBuilderState _tmp5_;
944 gint _tmp8_;
945 GString* _tmp9_;
946 #line 353 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
947 g_return_if_fail (self != NULL);
948 #line 353 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
949 _tmp0_ = tracker_sparql_builder_get_state (self);
950 #line 353 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
951 _tmp1_ = _tmp0_;
952 #line 353 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
953 _tmp2_ = tracker_sparql_builder_get_state (self);
954 #line 353 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
955 _tmp3_ = _tmp2_;
956 #line 353 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
957 g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_WHERE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
958 #line 356 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
959 _tmp4_ = tracker_sparql_builder_get_state (self);
960 #line 356 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
961 _tmp5_ = _tmp4_;
962 #line 356 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
963 if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
964 #line 965 "tracker-builder.c"
965 GString* _tmp6_;
966 gint _tmp7_;
(emitted by gcc) 967 #line 357 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
968 _tmp6_ = self->priv->str;
969 #line 357 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
970 g_string_append (_tmp6_, " .\n");
971 #line 358 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
972 self->priv->states_length1 = self->priv->states_length1 - 3;
973 #line 358 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
974 _tmp7_ = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
975 #line 976 "tracker-builder.c"
976 }
977 #line 360 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
978 _tmp8_ = self->priv->states_length1;
979 #line 360 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
980 self->priv->states_length1 = _tmp8_ - 1;
981 #line 361 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
982 _tmp9_ = self->priv->str;
983 #line 361 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
984 g_string_append (_tmp9_, "}\n");
985 #line 986 "tracker-builder.c"
986 }
987
988
989 /**
990 * tracker_sparql_builder_subject_variable:
991 * @self: a #TrackerSparqlBuilder
992 * @var_name: variable name, without leading '?'
993 *
994 * Appends a subject as a SPARQL variable, such as "?urn".
995 *
996 * Since: 0.10
997 */
998 void tracker_sparql_builder_subject_variable (TrackerSparqlBuilder* self, const gchar* var_name) {
999 const gchar* _tmp0_;
1000 gchar* _tmp1_ = NULL;
1001 gchar* _tmp2_;
1002 #line 373 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1003 g_return_if_fail (self != NULL);
1004 #line 373 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1005 g_return_if_fail (var_name != NULL);
1006 #line 374 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1007 _tmp0_ = var_name;
1008 #line 374 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1009 _tmp1_ = g_strdup_printf ("?%s", _tmp0_);
1010 #line 374 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1011 _tmp2_ = _tmp1_;
1012 #line 374 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1013 tracker_sparql_builder_subject (self, _tmp2_);
1014 #line 374 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1015 _g_free0 (_tmp2_);
1016 #line 1017 "tracker-builder.c"
1017 }
1018
1019
1020 /**
1021 * tracker_sparql_builder_object_variable:
1022 * @self: a #TrackerSparqlBuilder
1023 * @var_name: variable name, without leading '?'
1024 *
1025 * Appends an object as a SparQL variable, such as "?urn".
1026 *
1027 * Since: 0.10
1028 */
1029 void tracker_sparql_builder_object_variable (TrackerSparqlBuilder* self, const gchar* var_name) {
1030 const gchar* _tmp0_;
1031 gchar* _tmp1_ = NULL;
1032 gchar* _tmp2_;
1033 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1034 g_return_if_fail (self != NULL);
1035 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1036 g_return_if_fail (var_name != NULL);
1037 #line 387 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1038 _tmp0_ = var_name;
1039 #line 387 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1040 _tmp1_ = g_strdup_printf ("?%s", _tmp0_);
1041 #line 387 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1042 _tmp2_ = _tmp1_;
1043 #line 387 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1044 tracker_sparql_builder_object (self, _tmp2_);
1045 #line 387 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1046 _g_free0 (_tmp2_);
1047 #line 1048 "tracker-builder.c"
1048 }
1049
1050
1051 /**
1052 * tracker_sparql_builder_subject_iri:
1053 * @self: a #TrackerSparqlBuilder
1054 * @iri: IRI name, without leading and trailing greater/less than symbols.
1055 *
1056 * Appends a subject as an IRI, such as "<urn:file:1234-5678>". IRIs
1057 * univocally identify a resource in tracker-store.
1058 *
1059 * Since: 0.10
1060 */
1061 void tracker_sparql_builder_subject_iri (TrackerSparqlBuilder* self, const gchar* iri) {
1062 const gchar* _tmp0_;
1063 gchar* _tmp1_ = NULL;
1064 gchar* _tmp2_;
1065 #line 400 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1066 g_return_if_fail (self != NULL);
1067 #line 400 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1068 g_return_if_fail (iri != NULL);
1069 #line 401 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1070 _tmp0_ = iri;
1071 #line 401 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1072 _tmp1_ = g_strdup_printf ("<%s>", _tmp0_);
1073 #line 401 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1074 _tmp2_ = _tmp1_;
1075 #line 401 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1076 tracker_sparql_builder_subject (self, _tmp2_);
1077 #line 401 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1078 _g_free0 (_tmp2_);
1079 #line 1080 "tracker-builder.c"
1080 }
1081
1082
1083 /**
1084 * tracker_sparql_builder_subject:
1085 * @self: a #TrackerSparqlBuilder
1086 * @s: subject string
1087 *
1088 * Appends a subject.
1089 *
1090 * Since: 0.10
1091 */
1092 static void _vala_array_add10 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
1093 #line 421 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1094 if ((*length) == (*size)) {
1095 #line 421 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1096 *size = (*size) ? (2 * (*size)) : 4;
1097 #line 421 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1098 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
1099 #line 1100 "tracker-builder.c"
1100 }
1101 #line 421 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1102 (*array)[(*length)++] = value;
1103 #line 1104 "tracker-builder.c"
1104 }
1105
1106
1107 void tracker_sparql_builder_subject (TrackerSparqlBuilder* self, const gchar* s) {
1108 TrackerSparqlBuilderState _tmp0_;
1109 TrackerSparqlBuilderState _tmp1_;
1110 TrackerSparqlBuilderState _tmp2_;
1111 TrackerSparqlBuilderState _tmp3_;
1112 TrackerSparqlBuilderState _tmp4_;
1113 TrackerSparqlBuilderState _tmp5_;
1114 TrackerSparqlBuilderState _tmp6_;
1115 TrackerSparqlBuilderState _tmp7_;
1116 TrackerSparqlBuilderState _tmp8_;
1117 TrackerSparqlBuilderState _tmp9_;
1118 TrackerSparqlBuilderState _tmp10_;
1119 TrackerSparqlBuilderState _tmp11_;
1120 TrackerSparqlBuilderState _tmp12_;
1121 TrackerSparqlBuilderState _tmp13_;
1122 GString* _tmp16_;
1123 const gchar* _tmp17_;
1124 TrackerSparqlBuilderState* _tmp18_;
1125 gint _tmp18__length1;
1126 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1127 g_return_if_fail (self != NULL);
1128 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1129 g_return_if_fail (s != NULL);
1130 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1131 _tmp0_ = tracker_sparql_builder_get_state (self);
1132 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1133 _tmp1_ = _tmp0_;
1134 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1135 _tmp2_ = tracker_sparql_builder_get_state (self);
1136 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1137 _tmp3_ = _tmp2_;
1138 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1139 _tmp4_ = tracker_sparql_builder_get_state (self);
1140 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1141 _tmp5_ = _tmp4_;
1142 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1143 _tmp6_ = tracker_sparql_builder_get_state (self);
1144 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1145 _tmp7_ = _tmp6_;
1146 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1147 _tmp8_ = tracker_sparql_builder_get_state (self);
1148 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1149 _tmp9_ = _tmp8_;
1150 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1151 _tmp10_ = tracker_sparql_builder_get_state (self);
1152 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1153 _tmp11_ = _tmp10_;
1154 #line 413 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1155 g_return_if_fail ((((((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_INSERT) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT)) || (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT)) || (_tmp7_ == TRACKER_SPARQL_BUILDER_STATE_DELETE)) || (_tmp9_ == TRACKER_SPARQL_BUILDER_STATE_WHERE)) || (_tmp11_ == TRACKER_SPARQL_BUILDER_STATE_GRAPH));
1156 #line 416 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1157 _tmp12_ = tracker_sparql_builder_get_state (self);
1158 #line 416 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1159 _tmp13_ = _tmp12_;
1160 #line 416 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1161 if (_tmp13_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
1162 #line 1163 "tracker-builder.c"
1163 GString* _tmp14_;
1164 gint _tmp15_;
(emitted by gcc) 1165 #line 417 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1166 _tmp14_ = self->priv->str;
1167 #line 417 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1168 g_string_append (_tmp14_, " .\n");
1169 #line 418 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1170 self->priv->states_length1 = self->priv->states_length1 - 3;
1171 #line 418 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1172 _tmp15_ = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1173 #line 1174 "tracker-builder.c"
1174 }
1175 #line 420 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1176 _tmp16_ = self->priv->str;
1177 #line 420 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1178 _tmp17_ = s;
1179 #line 420 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1180 g_string_append (_tmp16_, _tmp17_);
1181 #line 421 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1182 _tmp18_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1183 #line 421 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1184 _tmp18__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1185 #line 421 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1186 _vala_array_add10 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_SUBJECT);
1187 #line 1188 "tracker-builder.c"
1188 }
1189
1190
1191 /**
1192 * tracker_sparql_builder_predicate_iri:
1193 * @self: a #TrackerSparqlBuilder
1194 * @iri: IRI name, without leading and trailing greater/less than symbols.
1195 *
1196 * Appends a predicate as an IRI.
1197 *
1198 * Since: 0.10
1199 */
1200 void tracker_sparql_builder_predicate_iri (TrackerSparqlBuilder* self, const gchar* iri) {
1201 const gchar* _tmp0_;
1202 gchar* _tmp1_ = NULL;
1203 gchar* _tmp2_;
1204 #line 433 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1205 g_return_if_fail (self != NULL);
1206 #line 433 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1207 g_return_if_fail (iri != NULL);
1208 #line 434 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1209 _tmp0_ = iri;
1210 #line 434 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1211 _tmp1_ = g_strdup_printf ("<%s>", _tmp0_);
1212 #line 434 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1213 _tmp2_ = _tmp1_;
1214 #line 434 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1215 tracker_sparql_builder_predicate (self, _tmp2_);
1216 #line 434 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1217 _g_free0 (_tmp2_);
1218 #line 1219 "tracker-builder.c"
1219 }
1220
1221
1222 /**
1223 * tracker_sparql_builder_predicate:
1224 * @self: a #TrackerSparqlBuilder
1225 * @s: predicate string
1226 *
1227 * Appends a predicate for the previously appended subject.
1228 *
1229 * Since: 0.10
1230 */
1231 static void _vala_array_add11 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
1232 #line 455 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1233 if ((*length) == (*size)) {
1234 #line 455 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1235 *size = (*size) ? (2 * (*size)) : 4;
1236 #line 455 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1237 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
1238 #line 1239 "tracker-builder.c"
1239 }
1240 #line 455 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1241 (*array)[(*length)++] = value;
1242 #line 1243 "tracker-builder.c"
1243 }
1244
1245
1246 void tracker_sparql_builder_predicate (TrackerSparqlBuilder* self, const gchar* s) {
1247 TrackerSparqlBuilderState _tmp0_;
1248 TrackerSparqlBuilderState _tmp1_;
1249 TrackerSparqlBuilderState _tmp2_;
1250 TrackerSparqlBuilderState _tmp3_;
1251 TrackerSparqlBuilderState _tmp4_;
1252 TrackerSparqlBuilderState _tmp5_;
1253 TrackerSparqlBuilderState _tmp6_;
1254 TrackerSparqlBuilderState _tmp7_;
1255 GString* _tmp10_;
1256 GString* _tmp11_;
1257 const gchar* _tmp12_;
1258 TrackerSparqlBuilderState* _tmp13_;
1259 gint _tmp13__length1;
1260 #line 446 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1261 g_return_if_fail (self != NULL);
1262 #line 446 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1263 g_return_if_fail (s != NULL);
1264 #line 446 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1265 _tmp0_ = tracker_sparql_builder_get_state (self);
1266 #line 446 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1267 _tmp1_ = _tmp0_;
1268 #line 446 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1269 _tmp2_ = tracker_sparql_builder_get_state (self);
1270 #line 446 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1271 _tmp3_ = _tmp2_;
1272 #line 446 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1273 _tmp4_ = tracker_sparql_builder_get_state (self);
1274 #line 446 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1275 _tmp5_ = _tmp4_;
1276 #line 446 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1277 g_return_if_fail (((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_SUBJECT) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT)) || (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_BLANK));
1278 #line 449 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1279 _tmp6_ = tracker_sparql_builder_get_state (self);
1280 #line 449 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1281 _tmp7_ = _tmp6_;
1282 #line 449 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1283 if (_tmp7_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
1284 #line 1285 "tracker-builder.c"
1285 GString* _tmp8_;
1286 gint _tmp9_;
(emitted by gcc) 1287 #line 450 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1288 _tmp8_ = self->priv->str;
1289 #line 450 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1290 g_string_append (_tmp8_, " ;\n\t");
1291 #line 451 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1292 self->priv->states_length1 = self->priv->states_length1 - 2;
1293 #line 451 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1294 _tmp9_ = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1295 #line 1296 "tracker-builder.c"
1296 }
1297 #line 453 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1298 _tmp10_ = self->priv->str;
1299 #line 453 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1300 g_string_append (_tmp10_, " ");
1301 #line 454 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1302 _tmp11_ = self->priv->str;
1303 #line 454 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1304 _tmp12_ = s;
1305 #line 454 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1306 g_string_append (_tmp11_, _tmp12_);
1307 #line 455 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1308 _tmp13_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1309 #line 455 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1310 _tmp13__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1311 #line 455 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1312 _vala_array_add11 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_PREDICATE);
1313 #line 1314 "tracker-builder.c"
1314 }
1315
1316
1317 /**
1318 * tracker_sparql_builder_object_iri:
1319 * @self: a #TrackerSparqlBuilder
1320 * @iri: IRI name, without leading and trailing greater/less than symbols.
1321 *
1322 * Appends an object as an IRI.
1323 *
1324 * Since: 0.10
1325 */
1326 void tracker_sparql_builder_object_iri (TrackerSparqlBuilder* self, const gchar* iri) {
1327 const gchar* _tmp0_;
1328 gchar* _tmp1_ = NULL;
1329 gchar* _tmp2_;
1330 #line 467 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1331 g_return_if_fail (self != NULL);
1332 #line 467 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1333 g_return_if_fail (iri != NULL);
1334 #line 468 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1335 _tmp0_ = iri;
1336 #line 468 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1337 _tmp1_ = g_strdup_printf ("<%s>", _tmp0_);
1338 #line 468 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1339 _tmp2_ = _tmp1_;
1340 #line 468 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1341 tracker_sparql_builder_object (self, _tmp2_);
1342 #line 468 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1343 _g_free0 (_tmp2_);
1344 #line 1345 "tracker-builder.c"
1345 }
1346
1347
1348 /**
1349 * tracker_sparql_builder_object:
1350 * @self: a #TrackerSparqlBuilder
1351 * @s: object string
1352 *
1353 * Appends a free-form object for the previously appended subject and predicate.
1354 *
1355 * Since: 0.10
1356 */
1357 static void _vala_array_add12 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
1358 #line 489 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1359 if ((*length) == (*size)) {
1360 #line 489 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1361 *size = (*size) ? (2 * (*size)) : 4;
1362 #line 489 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1363 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
1364 #line 1365 "tracker-builder.c"
1365 }
1366 #line 489 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1367 (*array)[(*length)++] = value;
1368 #line 1369 "tracker-builder.c"
1369 }
1370
1371
1372 void tracker_sparql_builder_object (TrackerSparqlBuilder* self, const gchar* s) {
1373 TrackerSparqlBuilderState _tmp0_;
1374 TrackerSparqlBuilderState _tmp1_;
1375 TrackerSparqlBuilderState _tmp2_;
1376 TrackerSparqlBuilderState _tmp3_;
1377 TrackerSparqlBuilderState _tmp4_;
1378 TrackerSparqlBuilderState _tmp5_;
1379 GString* _tmp8_;
1380 GString* _tmp9_;
1381 const gchar* _tmp10_;
1382 TrackerSparqlBuilderState* _tmp11_;
1383 gint _tmp11__length1;
(emitted by gcc) 1384 gint _tmp12_;
1385 #line 480 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1386 g_return_if_fail (self != NULL);
1387 #line 480 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1388 g_return_if_fail (s != NULL);
1389 #line 480 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1390 _tmp0_ = tracker_sparql_builder_get_state (self);
1391 #line 480 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1392 _tmp1_ = _tmp0_;
1393 #line 480 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1394 _tmp2_ = tracker_sparql_builder_get_state (self);
1395 #line 480 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1396 _tmp3_ = _tmp2_;
1397 #line 480 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1398 g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_PREDICATE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
1399 #line 483 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1400 _tmp4_ = tracker_sparql_builder_get_state (self);
1401 #line 483 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1402 _tmp5_ = _tmp4_;
1403 #line 483 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1404 if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
1405 #line 1406 "tracker-builder.c"
1406 GString* _tmp6_;
1407 gint _tmp7_;
1408 #line 484 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1409 _tmp6_ = self->priv->str;
1410 #line 484 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1411 g_string_append (_tmp6_, " ,");
1412 #line 485 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1413 _tmp7_ = self->priv->states_length1;
1414 #line 485 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1415 self->priv->states_length1 = _tmp7_ - 1;
1416 #line 1417 "tracker-builder.c"
1417 }
1418 #line 487 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1419 _tmp8_ = self->priv->str;
1420 #line 487 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1421 g_string_append (_tmp8_, " ");
1422 #line 488 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1423 _tmp9_ = self->priv->str;
1424 #line 488 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1425 _tmp10_ = s;
1426 #line 488 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1427 g_string_append (_tmp9_, _tmp10_);
1428 #line 489 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1429 _tmp11_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1430 #line 489 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1431 _tmp11__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1432 #line 489 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1433 _vala_array_add12 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_OBJECT);
1434 #line 491 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1435 _tmp12_ = self->priv->_length;
1436 #line 491 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1437 tracker_sparql_builder_set_length (self, _tmp12_ + 1);
1438 #line 1439 "tracker-builder.c"
1439 }
1440
1441
1442 /**
1443 * tracker_sparql_builder_object_string:
1444 * @self: a #TrackerSparqlBuilder
1445 * @literal: string object
1446 *
1447 * Appends an object formatted as an string. @literal will be escaped and surrounded
1448 * by double quotes.
1449 *
1450 * Since: 0.10
1451 */
1452 static void _vala_array_add13 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
1453 #line 543 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1454 if ((*length) == (*size)) {
1455 #line 543 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1456 *size = (*size) ? (2 * (*size)) : 4;
1457 #line 543 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1458 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
1459 #line 1460 "tracker-builder.c"
1460 }
1461 #line 543 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1462 (*array)[(*length)++] = value;
1463 #line 1464 "tracker-builder.c"
1464 }
1465
1466
1467 void tracker_sparql_builder_object_string (TrackerSparqlBuilder* self, const gchar* literal) {
1468 TrackerSparqlBuilderState _tmp0_;
1469 TrackerSparqlBuilderState _tmp1_;
1470 TrackerSparqlBuilderState _tmp2_;
1471 TrackerSparqlBuilderState _tmp3_;
1472 TrackerSparqlBuilderState _tmp4_;
1473 TrackerSparqlBuilderState _tmp5_;
1474 GString* _tmp8_;
1475 const gchar* _tmp9_;
1476 gchar* p;
1477 GString* _tmp25_;
1478 TrackerSparqlBuilderState* _tmp26_;
1479 gint _tmp26__length1;
(emitted by gcc) 1480 gint _tmp27_;
1481 #line 504 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1482 g_return_if_fail (self != NULL);
1483 #line 504 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1484 g_return_if_fail (literal != NULL);
1485 #line 504 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1486 _tmp0_ = tracker_sparql_builder_get_state (self);
1487 #line 504 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1488 _tmp1_ = _tmp0_;
1489 #line 504 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1490 _tmp2_ = tracker_sparql_builder_get_state (self);
1491 #line 504 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1492 _tmp3_ = _tmp2_;
1493 #line 504 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1494 g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_PREDICATE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
1495 #line 507 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1496 _tmp4_ = tracker_sparql_builder_get_state (self);
1497 #line 507 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1498 _tmp5_ = _tmp4_;
1499 #line 507 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1500 if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
1501 #line 1502 "tracker-builder.c"
1502 GString* _tmp6_;
1503 gint _tmp7_;
1504 #line 508 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1505 _tmp6_ = self->priv->str;
1506 #line 508 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1507 g_string_append (_tmp6_, " ,");
1508 #line 509 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1509 _tmp7_ = self->priv->states_length1;
1510 #line 509 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1511 self->priv->states_length1 = _tmp7_ - 1;
1512 #line 1513 "tracker-builder.c"
1513 }
1514 #line 512 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1515 _tmp8_ = self->priv->str;
1516 #line 512 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1517 g_string_append (_tmp8_, " \"");
1518 #line 514 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1519 _tmp9_ = literal;
1520 #line 514 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1521 p = _tmp9_;
1522 #line 515 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1523 while (TRUE) {
1524 #line 1525 "tracker-builder.c"
1525 gchar* _tmp10_;
1526 gchar* _tmp11_;
1527 gsize _tmp12_ = 0UL;
1528 gsize len;
1529 GString* _tmp13_;
1530 gchar* _tmp14_;
1531 gsize _tmp15_;
1532 gchar* _tmp16_;
1533 gsize _tmp17_;
1534 gchar* _tmp18_;
1535 gchar* _tmp24_;
1536 #line 515 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1537 _tmp10_ = p;
1538 #line 515 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1539 if (!((*_tmp10_) != '\0')) {
1540 #line 515 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1541 break;
1542 #line 1543 "tracker-builder.c"
1543 }
1544 #line 516 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1545 _tmp11_ = p;
1546 #line 516 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1547 _tmp12_ = strcspn ((const gchar*) _tmp11_, "\t\n\r\"\\");
1548 #line 516 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1549 len = _tmp12_;
1550 #line 517 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1551 _tmp13_ = self->priv->str;
1552 #line 517 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1553 _tmp14_ = p;
1554 #line 517 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1555 _tmp15_ = len;
1556 #line 517 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1557 g_string_append_len (_tmp13_, (const gchar*) _tmp14_, (gssize) ((glong) _tmp15_));
1558 #line 518 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1559 _tmp16_ = p;
1560 #line 518 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1561 _tmp17_ = len;
1562 #line 518 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1563 p = _tmp16_ + _tmp17_;
1564 #line 519 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1565 _tmp18_ = p;
1566 #line 519 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1567 switch (*_tmp18_) {
1568 #line 519 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1569 case '\t':
1570 #line 1571 "tracker-builder.c"
1571 {
1572 GString* _tmp19_;
1573 #line 521 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1574 _tmp19_ = self->priv->str;
1575 #line 521 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1576 g_string_append (_tmp19_, "\\t");
1577 #line 522 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1578 break;
1579 #line 1580 "tracker-builder.c"
1580 }
1581 #line 519 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1582 case '\n':
1583 #line 1584 "tracker-builder.c"
1584 {
1585 GString* _tmp20_;
1586 #line 524 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1587 _tmp20_ = self->priv->str;
1588 #line 524 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1589 g_string_append (_tmp20_, "\\n");
1590 #line 525 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1591 break;
1592 #line 1593 "tracker-builder.c"
1593 }
1594 #line 519 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1595 case '\r':
1596 #line 1597 "tracker-builder.c"
1597 {
1598 GString* _tmp21_;
1599 #line 527 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1600 _tmp21_ = self->priv->str;
1601 #line 527 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1602 g_string_append (_tmp21_, "\\r");
1603 #line 528 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1604 break;
1605 #line 1606 "tracker-builder.c"
1606 }
1607 #line 519 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1608 case '"':
1609 #line 1610 "tracker-builder.c"
1610 {
1611 GString* _tmp22_;
1612 #line 530 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1613 _tmp22_ = self->priv->str;
1614 #line 530 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1615 g_string_append (_tmp22_, "\\\"");
1616 #line 531 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1617 break;
1618 #line 1619 "tracker-builder.c"
1619 }
1620 #line 519 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1621 case '\\':
1622 #line 1623 "tracker-builder.c"
1623 {
1624 GString* _tmp23_;
1625 #line 533 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1626 _tmp23_ = self->priv->str;
1627 #line 533 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1628 g_string_append (_tmp23_, "\\\\");
1629 #line 534 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1630 break;
1631 #line 1632 "tracker-builder.c"
1632 }
1633 default:
1634 {
1635 #line 536 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1636 continue;
1637 #line 1638 "tracker-builder.c"
1638 }
1639 }
1640 #line 538 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1641 _tmp24_ = p;
1642 #line 538 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1643 p = _tmp24_ + 1;
1644 #line 1645 "tracker-builder.c"
1645 }
1646 #line 541 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1647 _tmp25_ = self->priv->str;
1648 #line 541 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1649 g_string_append (_tmp25_, "\"");
1650 #line 543 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1651 _tmp26_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1652 #line 543 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1653 _tmp26__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1654 #line 543 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1655 _vala_array_add13 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_OBJECT);
1656 #line 545 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1657 _tmp27_ = self->priv->_length;
1658 #line 545 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1659 tracker_sparql_builder_set_length (self, _tmp27_ + 1);
1660 #line 1661 "tracker-builder.c"
1661 }
1662
1663
1664 /**
1665 * tracker_sparql_builder_object_unvalidated:
1666 * @self: a #TrackerSparqlBuilder
1667 * @value: possibly UTF-8 invalid string.
1668 *
1669 * Appends a string not validated as UTF-8 as an object.
1670 *
1671 * Since: 0.10
1672 */
1673 static glong string_strnlen (gchar* str, glong maxlen) {
1674 glong result = 0L;
1675 gchar* _tmp0_;
1676 glong _tmp1_;
1677 gchar* _tmp2_ = NULL;
1678 gchar* end;
1679 gchar* _tmp3_;
1680 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1681 _tmp0_ = str;
1682 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1683 _tmp1_ = maxlen;
1684 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1685 _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
1686 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1687 end = _tmp2_;
1688 #line 1148 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1689 _tmp3_ = end;
1690 #line 1148 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1691 if (_tmp3_ == NULL) {
1692 #line 1693 "tracker-builder.c"
1693 glong _tmp4_;
1694 #line 1149 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1695 _tmp4_ = maxlen;
1696 #line 1149 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1697 result = _tmp4_;
1698 #line 1149 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1699 return result;
1700 #line 1701 "tracker-builder.c"
1701 } else {
1702 gchar* _tmp5_;
1703 gchar* _tmp6_;
1704 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1705 _tmp5_ = end;
1706 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1707 _tmp6_ = str;
1708 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1709 result = (glong) (_tmp5_ - _tmp6_);
1710 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1711 return result;
1712 #line 1713 "tracker-builder.c"
1713 }
1714 }
1715
1716
1717 static gchar* string_substring (const gchar* self, glong offset, glong len) {
1718 gchar* result = NULL;
1719 glong string_length = 0L;
1720 gboolean _tmp0_ = FALSE;
1721 glong _tmp1_;
1722 gboolean _tmp3_;
1723 glong _tmp9_;
1724 glong _tmp15_;
1725 glong _tmp18_;
1726 glong _tmp19_;
1727 glong _tmp20_;
1728 glong _tmp21_;
1729 glong _tmp22_;
1730 gchar* _tmp23_ = NULL;
1731 #line 1158 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1732 g_return_val_if_fail (self != NULL, NULL);
1733 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1734 _tmp1_ = offset;
1735 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1736 if (_tmp1_ >= ((glong) 0)) {
1737 #line 1738 "tracker-builder.c"
1738 glong _tmp2_;
1739 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1740 _tmp2_ = len;
1741 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1742 _tmp0_ = _tmp2_ >= ((glong) 0);
1743 #line 1744 "tracker-builder.c"
1744 } else {
1745 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1746 _tmp0_ = FALSE;
1747 #line 1748 "tracker-builder.c"
1748 }
1749 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1750 _tmp3_ = _tmp0_;
1751 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1752 if (_tmp3_) {
1753 #line 1754 "tracker-builder.c"
1754 glong _tmp4_;
1755 glong _tmp5_;
1756 glong _tmp6_ = 0L;
1757 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1758 _tmp4_ = offset;
1759 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1760 _tmp5_ = len;
1761 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1762 _tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_);
1763 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1764 string_length = _tmp6_;
1765 #line 1766 "tracker-builder.c"
1766 } else {
1767 gint _tmp7_;
1768 gint _tmp8_;
1769 #line 1164 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1770 _tmp7_ = strlen (self);
1771 #line 1164 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1772 _tmp8_ = _tmp7_;
1773 #line 1164 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1774 string_length = (glong) _tmp8_;
1775 #line 1776 "tracker-builder.c"
1776 }
1777 #line 1167 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1778 _tmp9_ = offset;
1779 #line 1167 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1780 if (_tmp9_ < ((glong) 0)) {
1781 #line 1782 "tracker-builder.c"
1782 glong _tmp10_;
1783 glong _tmp11_;
1784 glong _tmp12_;
1785 #line 1168 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1786 _tmp10_ = string_length;
1787 #line 1168 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1788 _tmp11_ = offset;
1789 #line 1168 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1790 offset = _tmp10_ + _tmp11_;
1791 #line 1169 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1792 _tmp12_ = offset;
1793 #line 1169 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1794 g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL);
1795 #line 1796 "tracker-builder.c"
1796 } else {
1797 glong _tmp13_;
1798 glong _tmp14_;
1799 #line 1171 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1800 _tmp13_ = offset;
1801 #line 1171 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1802 _tmp14_ = string_length;
1803 #line 1171 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1804 g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL);
1805 #line 1806 "tracker-builder.c"
1806 }
1807 #line 1173 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1808 _tmp15_ = len;
1809 #line 1173 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1810 if (_tmp15_ < ((glong) 0)) {
1811 #line 1812 "tracker-builder.c"
1812 glong _tmp16_;
1813 glong _tmp17_;
1814 #line 1174 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1815 _tmp16_ = string_length;
1816 #line 1174 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1817 _tmp17_ = offset;
1818 #line 1174 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1819 len = _tmp16_ - _tmp17_;
1820 #line 1821 "tracker-builder.c"
1821 }
1822 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1823 _tmp18_ = offset;
1824 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1825 _tmp19_ = len;
1826 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1827 _tmp20_ = string_length;
1828 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1829 g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL);
1830 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1831 _tmp21_ = offset;
1832 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1833 _tmp22_ = len;
1834 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1835 _tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_);
1836 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1837 result = _tmp23_;
1838 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1839 return result;
1840 #line 1841 "tracker-builder.c"
1841 }
1842
1843
1844 void tracker_sparql_builder_object_unvalidated (TrackerSparqlBuilder* self, const gchar* value) {
1845 gchar* end = NULL;
1846 const gchar* _tmp0_;
1847 gchar* _tmp1_ = NULL;
1848 gboolean _tmp2_ = FALSE;
1849 const gchar* _tmp10_;
1850 #line 557 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1851 g_return_if_fail (self != NULL);
1852 #line 557 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1853 g_return_if_fail (value != NULL);
1854 #line 560 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1855 _tmp0_ = value;
1856 #line 560 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1857 _tmp2_ = g_utf8_validate (_tmp0_, (gssize) (-1), &_tmp1_);
1858 #line 560 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1859 end = _tmp1_;
1860 #line 560 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1861 if (!_tmp2_) {
1862 #line 1863 "tracker-builder.c"
1863 const gchar* _tmp3_;
1864 gchar* _tmp4_;
1865 #line 561 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1866 _tmp3_ = value;
1867 #line 561 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1868 _tmp4_ = end;
1869 #line 561 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1870 if (_tmp3_ != _tmp4_) {
1871 #line 1872 "tracker-builder.c"
1872 const gchar* _tmp5_;
1873 gchar* _tmp6_;
1874 const gchar* _tmp7_;
1875 gchar* _tmp8_ = NULL;
1876 gchar* _tmp9_;
1877 #line 562 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1878 _tmp5_ = value;
1879 #line 562 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1880 _tmp6_ = end;
1881 #line 562 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1882 _tmp7_ = value;
1883 #line 562 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1884 _tmp8_ = string_substring (_tmp5_, (glong) 0, (glong) (_tmp6_ - ((gchar*) _tmp7_)));
1885 #line 562 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1886 _tmp9_ = _tmp8_;
1887 #line 562 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1888 tracker_sparql_builder_object_string (self, _tmp9_);
1889 #line 562 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1890 _g_free0 (_tmp9_);
1891 #line 1892 "tracker-builder.c"
1892 } else {
1893 #line 564 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1894 tracker_sparql_builder_object_string (self, "(invalid data)");
1895 #line 1896 "tracker-builder.c"
1896 }
1897 #line 567 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1898 return;
1899 #line 1900 "tracker-builder.c"
1900 }
1901 #line 570 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1902 _tmp10_ = value;
1903 #line 570 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1904 tracker_sparql_builder_object_string (self, _tmp10_);
1905 #line 1906 "tracker-builder.c"
1906 }
1907
1908
1909 /**
1910 * tracker_sparql_builder_object_boolean:
1911 * @self: a #TrackerSparqlBuilder
1912 * @literal: object as a #gboolean
1913 *
1914 * Appends a #gboolean value as an object.
1915 *
1916 * Since: 0.10
1917 */
1918 void tracker_sparql_builder_object_boolean (TrackerSparqlBuilder* self, gboolean literal) {
1919 const gchar* _tmp0_ = NULL;
1920 gboolean _tmp1_;
1921 const gchar* _tmp2_;
1922 #line 582 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1923 g_return_if_fail (self != NULL);
1924 #line 583 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1925 _tmp1_ = literal;
1926 #line 583 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1927 if (_tmp1_) {
1928 #line 583 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1929 _tmp0_ = "true";
1930 #line 1931 "tracker-builder.c"
1931 } else {
1932 #line 583 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1933 _tmp0_ = "false";
1934 #line 1935 "tracker-builder.c"
1935 }
1936 #line 583 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1937 _tmp2_ = _tmp0_;
1938 #line 583 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1939 tracker_sparql_builder_object (self, _tmp2_);
1940 #line 1941 "tracker-builder.c"
1941 }
1942
1943
1944 /**
1945 * tracker_sparql_builder_object_int64:
1946 * @self: a #TrackerSparqlBuilder
1947 * @literal: object as a #gint64
1948 *
1949 * Appends a #gint64 value as an object.
1950 *
1951 * Since: 0.10
1952 */
1953 void tracker_sparql_builder_object_int64 (TrackerSparqlBuilder* self, gint64 literal) {
1954 gint64 _tmp0_;
1955 gchar* _tmp1_ = NULL;
1956 gchar* _tmp2_;
1957 #line 595 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1958 g_return_if_fail (self != NULL);
1959 #line 596 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1960 _tmp0_ = literal;
1961 #line 596 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1962 _tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp0_);
1963 #line 596 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1964 _tmp2_ = _tmp1_;
1965 #line 596 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1966 tracker_sparql_builder_object (self, _tmp2_);
1967 #line 596 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
1968 _g_free0 (_tmp2_);
1969 #line 1970 "tracker-builder.c"
1970 }
1971
1972
1973 /**
1974 * tracker_sparql_builder_object_date:
1975 * @self: a #TrackerSparqlBuilder
1976 * @literal: object as a #time_t
1977 *
1978 * Appends a #time_t value as an object. @literal will be converted
1979 * to a string in the date format used by tracker-store.
1980 *
1981 * Since: 0.10
1982 */
1983 static void g_time_gm (time_t time, struct tm* result) {
1984 struct tm _result_ = {0};
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1985 struct tm _tmp0_ = {0};
1986 #line 2373 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1987 gmtime_r (&time, &_tmp0_);
1988 #line 2373 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1989 _result_ = _tmp0_;
1990 #line 2374 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1991 *result = _result_;
1992 #line 2374 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
1993 return;
1994 #line 1995 "tracker-builder.c"
1995 }
1996
1997
1998 void tracker_sparql_builder_object_date (TrackerSparqlBuilder* self, time_t* literal) {
1999 time_t _tmp0_;
2000 struct tm _tmp1_ = {0};
2001 struct tm tm;
2002 struct tm _tmp2_;
2003 gint _tmp3_;
2004 struct tm _tmp4_;
2005 gint _tmp5_;
2006 struct tm _tmp6_;
2007 gint _tmp7_;
2008 struct tm _tmp8_;
2009 gint _tmp9_;
2010 struct tm _tmp10_;
2011 gint _tmp11_;
2012 struct tm _tmp12_;
2013 gint _tmp13_;
2014 gchar* _tmp14_ = NULL;
2015 gchar* _tmp15_;
2016 #line 609 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2017 g_return_if_fail (self != NULL);
2018 #line 610 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2019 _tmp0_ = *literal;
2020 #line 610 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2021 g_time_gm (_tmp0_, &_tmp1_);
2022 #line 610 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2023 tm = _tmp1_;
2024 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2025 _tmp2_ = tm;
2026 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2027 _tmp3_ = _tmp2_.tm_year;
2028 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2029 _tmp4_ = tm;
2030 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2031 _tmp5_ = _tmp4_.tm_mon;
2032 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2033 _tmp6_ = tm;
2034 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2035 _tmp7_ = _tmp6_.tm_mday;
2036 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2037 _tmp8_ = tm;
2038 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2039 _tmp9_ = _tmp8_.tm_hour;
2040 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2041 _tmp10_ = tm;
2042 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2043 _tmp11_ = _tmp10_.tm_min;
2044 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2045 _tmp12_ = tm;
2046 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2047 _tmp13_ = _tmp12_.tm_sec;
2048 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2049 _tmp14_ = g_strdup_printf ("%04d-%02d-%02dT%02d:%02d:%02dZ", _tmp3_ + 1900, _tmp5_ + 1, _tmp7_, _tmp9_, _tmp11_, _tmp13_);
2050 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2051 _tmp15_ = _tmp14_;
2052 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2053 tracker_sparql_builder_object_string (self, _tmp15_);
2054 #line 612 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2055 _g_free0 (_tmp15_);
2056 #line 2057 "tracker-builder.c"
2057 }
2058
2059
2060 /**
2061 * tracker_sparql_builder_object_double:
2062 * @self: a #TrackerSparqlBuilder
2063 * @literal: object as a #gdouble
2064 *
2065 * Appends a #gdouble value as an object.
2066 *
2067 * Since: 0.10
2068 */
2069 static gchar* double_to_string (gdouble self) {
2070 gchar* result = NULL;
2071 gchar* _tmp0_ = NULL;
2072 gchar* _tmp1_;
2073 gint _tmp1__length1;
(emitted by gcc) 2074 const gchar* _tmp2_ = NULL;
2075 gchar* _tmp3_;
2076 gchar* _tmp4_;
2077 #line 771 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2078 _tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
2079 #line 771 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2080 _tmp1_ = _tmp0_;
2081 #line 771 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2082 _tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2083 #line 771 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2084 _tmp2_ = g_ascii_dtostr (_tmp1_, G_ASCII_DTOSTR_BUF_SIZE, self);
2085 #line 771 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2086 _tmp3_ = g_strdup (_tmp2_);
2087 #line 771 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2088 _tmp4_ = _tmp3_;
2089 #line 771 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2090 _tmp1_ = (g_free (_tmp1_), NULL);
2091 #line 771 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2092 result = _tmp4_;
2093 #line 771 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2094 return result;
2095 #line 2096 "tracker-builder.c"
2096 }
2097
2098
2099 void tracker_sparql_builder_object_double (TrackerSparqlBuilder* self, gdouble literal) {
2100 gdouble _tmp0_;
2101 gchar* _tmp1_ = NULL;
2102 gchar* _tmp2_;
2103 #line 624 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2104 g_return_if_fail (self != NULL);
2105 #line 625 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2106 _tmp0_ = literal;
2107 #line 625 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2108 _tmp1_ = double_to_string (_tmp0_);
2109 #line 625 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2110 _tmp2_ = _tmp1_;
2111 #line 625 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2112 tracker_sparql_builder_object (self, _tmp2_);
2113 #line 625 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2114 _g_free0 (_tmp2_);
2115 #line 2116 "tracker-builder.c"
2116 }
2117
2118
2119 /**
2120 * tracker_sparql_builder_object_blank_open:
2121 * @self: a #TrackerSparqlBuilder
2122 *
2123 * Opens an anonymous blank node. In insertions this can be used to create
2124 * anonymous nodes for not previously known data without the need of a
2125 * separate insertion.
2126 *
2127 * Since: 0.10
2128 */
2129 static void _vala_array_add14 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
2130 #line 646 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2131 if ((*length) == (*size)) {
2132 #line 646 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2133 *size = (*size) ? (2 * (*size)) : 4;
2134 #line 646 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2135 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
2136 #line 2137 "tracker-builder.c"
2137 }
2138 #line 646 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2139 (*array)[(*length)++] = value;
2140 #line 2141 "tracker-builder.c"
2141 }
2142
2143
2144 void tracker_sparql_builder_object_blank_open (TrackerSparqlBuilder* self) {
2145 TrackerSparqlBuilderState _tmp0_;
2146 TrackerSparqlBuilderState _tmp1_;
2147 TrackerSparqlBuilderState _tmp2_;
2148 TrackerSparqlBuilderState _tmp3_;
2149 TrackerSparqlBuilderState _tmp4_;
2150 TrackerSparqlBuilderState _tmp5_;
2151 GString* _tmp8_;
2152 TrackerSparqlBuilderState* _tmp9_;
2153 gint _tmp9__length1;
(emitted by gcc) 2154 #line 638 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2155 g_return_if_fail (self != NULL);
2156 #line 638 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2157 _tmp0_ = tracker_sparql_builder_get_state (self);
2158 #line 638 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2159 _tmp1_ = _tmp0_;
2160 #line 638 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2161 _tmp2_ = tracker_sparql_builder_get_state (self);
2162 #line 638 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2163 _tmp3_ = _tmp2_;
2164 #line 638 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2165 g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_PREDICATE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
2166 #line 641 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2167 _tmp4_ = tracker_sparql_builder_get_state (self);
2168 #line 641 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2169 _tmp5_ = _tmp4_;
2170 #line 641 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2171 if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
2172 #line 2173 "tracker-builder.c"
2173 GString* _tmp6_;
2174 gint _tmp7_;
2175 #line 642 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2176 _tmp6_ = self->priv->str;
2177 #line 642 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2178 g_string_append (_tmp6_, " ,");
2179 #line 643 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2180 _tmp7_ = self->priv->states_length1;
2181 #line 643 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2182 self->priv->states_length1 = _tmp7_ - 1;
2183 #line 2184 "tracker-builder.c"
2184 }
2185 #line 645 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2186 _tmp8_ = self->priv->str;
2187 #line 645 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2188 g_string_append (_tmp8_, " [");
2189 #line 646 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2190 _tmp9_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2191 #line 646 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2192 _tmp9__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2193 #line 646 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2194 _vala_array_add14 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_BLANK);
2195 #line 2196 "tracker-builder.c"
2196 }
2197
2198
2199 /**
2200 * tracker_sparql_builder_object_blank_close:
2201 * @self: a #TrackerSparqlBuilder
2202 *
2203 * Closes an anomymous blank node opened with tracker_sparql_builder_object_blank_open()
2204 *
2205 * Since: 0.10
2206 */
2207 static void _vala_array_add15 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
2208 #line 662 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2209 if ((*length) == (*size)) {
2210 #line 662 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2211 *size = (*size) ? (2 * (*size)) : 4;
2212 #line 662 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2213 *array = g_renew (TrackerSparqlBuilderState, *array, *size);
2214 #line 2215 "tracker-builder.c"
2215 }
2216 #line 662 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2217 (*array)[(*length)++] = value;
2218 #line 2219 "tracker-builder.c"
2219 }
2220
2221
2222 void tracker_sparql_builder_object_blank_close (TrackerSparqlBuilder* self) {
2223 TrackerSparqlBuilderState _tmp0_;
2224 TrackerSparqlBuilderState _tmp1_;
2225 TrackerSparqlBuilderState* _tmp2_;
2226 gint _tmp2__length1;
2227 TrackerSparqlBuilderState* _tmp3_;
2228 gint _tmp3__length1;
2229 TrackerSparqlBuilderState _tmp4_;
2230 GString* _tmp5_;
2231 gint _tmp6_;
2232 TrackerSparqlBuilderState* _tmp7_;
2233 gint _tmp7__length1;
(emitted by gcc) 2234 gint _tmp8_;
2235 #line 657 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2236 g_return_if_fail (self != NULL);
2237 #line 657 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2238 _tmp0_ = tracker_sparql_builder_get_state (self);
2239 #line 657 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2240 _tmp1_ = _tmp0_;
2241 #line 657 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2242 _tmp2_ = self->priv->states;
2243 #line 657 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2244 _tmp2__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2245 #line 657 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2246 _tmp3_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2247 #line 657 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2248 _tmp3__length1 = self->priv->states_length1;
2249 #line 657 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2250 _tmp4_ = _tmp2_[_tmp3__length1 - 3];
2251 #line 657 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2252 g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) && (_tmp4_ == TRACKER_SPARQL_BUILDER_STATE_BLANK));
2253 #line 660 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2254 _tmp5_ = self->priv->str;
2255 #line 660 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2256 g_string_append (_tmp5_, "]");
2257 #line 661 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2258 self->priv->states_length1 = self->priv->states_length1 - 3;
2259 #line 661 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2260 _tmp6_ = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2261 #line 662 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2262 _tmp7_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2263 #line 662 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2264 _tmp7__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2265 #line 662 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2266 _vala_array_add15 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_OBJECT);
2267 #line 664 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2268 _tmp8_ = self->priv->_length;
2269 #line 664 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2270 tracker_sparql_builder_set_length (self, _tmp8_ + 1);
2271 #line 2272 "tracker-builder.c"
2272 }
2273
2274
2275 /**
2276 * tracker_sparql_builder_prepend:
2277 * @self: a #TrackerSparqlBuilder
2278 * @raw: raw content to prepend.
2279 *
2280 * Prepends raw, unvalidated content to @self.
2281 *
2282 * Since: 0.10
2283 */
2284 void tracker_sparql_builder_prepend (TrackerSparqlBuilder* self, const gchar* raw) {
2285 GString* _tmp0_;
2286 const gchar* _tmp1_;
2287 gchar* _tmp2_ = NULL;
2288 gchar* _tmp3_;
2289 gint _tmp4_;
2290 #line 676 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2291 g_return_if_fail (self != NULL);
2292 #line 676 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2293 g_return_if_fail (raw != NULL);
2294 #line 678 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2295 _tmp0_ = self->priv->str;
2296 #line 678 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2297 _tmp1_ = raw;
2298 #line 678 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2299 _tmp2_ = g_strdup_printf ("%s\n", _tmp1_);
2300 #line 678 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2301 _tmp3_ = _tmp2_;
2302 #line 678 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2303 g_string_prepend (_tmp0_, _tmp3_);
2304 #line 678 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2305 _g_free0 (_tmp3_);
2306 #line 680 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2307 _tmp4_ = self->priv->_length;
2308 #line 680 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2309 tracker_sparql_builder_set_length (self, _tmp4_ + 1);
2310 #line 2311 "tracker-builder.c"
2311 }
2312
2313
2314 /**
2315 * tracker_sparql_builder_append:
2316 * @self: a #TrackerSparqlBuilder
2317 * @raw: raw content to append.
2318 *
2319 * Appends raw, unvalidated content to @self.
2320 *
2321 * Since: 0.10
2322 */
2323 void tracker_sparql_builder_append (TrackerSparqlBuilder* self, const gchar* raw) {
2324 TrackerSparqlBuilderState _tmp0_;
2325 TrackerSparqlBuilderState _tmp1_;
2326 GString* _tmp4_;
2327 const gchar* _tmp5_;
2328 gint _tmp6_;
2329 #line 692 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2330 g_return_if_fail (self != NULL);
2331 #line 692 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2332 g_return_if_fail (raw != NULL);
2333 #line 694 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2334 _tmp0_ = tracker_sparql_builder_get_state (self);
2335 #line 694 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2336 _tmp1_ = _tmp0_;
2337 #line 694 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2338 if (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
2339 #line 2340 "tracker-builder.c"
2340 GString* _tmp2_;
2341 gint _tmp3_;
(emitted by gcc) 2342 #line 695 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2343 _tmp2_ = self->priv->str;
2344 #line 695 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2345 g_string_append (_tmp2_, " .\n");
2346 #line 696 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2347 self->priv->states_length1 = self->priv->states_length1 - 3;
2348 #line 696 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2349 _tmp3_ = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2350 #line 2351 "tracker-builder.c"
2351 }
2352 #line 699 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2353 _tmp4_ = self->priv->str;
2354 #line 699 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2355 _tmp5_ = raw;
2356 #line 699 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2357 g_string_append (_tmp4_, _tmp5_);
2358 #line 701 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2359 _tmp6_ = self->priv->_length;
2360 #line 701 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2361 tracker_sparql_builder_set_length (self, _tmp6_ + 1);
2362 #line 2363 "tracker-builder.c"
2363 }
2364
2365
2366 TrackerSparqlBuilder* tracker_sparql_builder_construct (GType object_type) {
2367 TrackerSparqlBuilder * self = NULL;
2368 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2369 self = (TrackerSparqlBuilder*) g_object_new (object_type, NULL);
2370 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2371 return self;
2372 #line 2373 "tracker-builder.c"
2373 }
2374
2375
2376 TrackerSparqlBuilder* tracker_sparql_builder_new (void) {
2377 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2378 return tracker_sparql_builder_construct (TRACKER_SPARQL_TYPE_BUILDER);
2379 #line 2380 "tracker-builder.c"
2380 }
2381
2382
2383 const gchar* tracker_sparql_builder_get_result (TrackerSparqlBuilder* self) {
2384 const gchar* result;
2385 gboolean _tmp0_ = FALSE;
2386 TrackerSparqlBuilderState* _tmp1_;
2387 gint _tmp1__length1;
2388 gboolean _tmp7_;
2389 GString* _tmp8_;
2390 const gchar* _tmp9_;
2391 #line 107 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2392 g_return_val_if_fail (self != NULL, NULL);
2393 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2394 _tmp1_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2395 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2396 _tmp1__length1 = self->priv->states_length1;
2397 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2398 if (_tmp1__length1 == 1) {
2399 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2400 _tmp0_ = TRUE;
2401 #line 2402 "tracker-builder.c"
2402 } else {
2403 gboolean _tmp2_ = FALSE;
2404 TrackerSparqlBuilderState* _tmp3_;
2405 gint _tmp3__length1;
2406 TrackerSparqlBuilderState _tmp4_;
2407 gboolean _tmp6_;
2408 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2409 _tmp3_ = self->priv->states;
2410 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2411 _tmp3__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2412 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2413 _tmp4_ = _tmp3_[0];
2414 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2415 if (_tmp4_ == TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT) {
2416 #line 2417 "tracker-builder.c"
2417 TrackerSparqlBuilderState* _tmp5_;
(emitted by gcc) 2418 gint _tmp5__length1;
2419 #line 110 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2420 _tmp5_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2421 #line 110 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2422 _tmp5__length1 = self->priv->states_length1;
2423 #line 110 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2424 _tmp2_ = _tmp5__length1 == 3;
2425 #line 2426 "tracker-builder.c"
2426 } else {
2427 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2428 _tmp2_ = FALSE;
2429 #line 2430 "tracker-builder.c"
2430 }
2431 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2432 _tmp6_ = _tmp2_;
2433 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2434 _tmp0_ = _tmp6_;
2435 #line 2436 "tracker-builder.c"
2436 }
2437 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2438 _tmp7_ = _tmp0_;
2439 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2440 g_warn_if_fail (_tmp7_);
2441 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2442 _tmp8_ = self->priv->str;
2443 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2444 _tmp9_ = _tmp8_->str;
2445 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2446 result = _tmp9_;
2447 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2448 return result;
2449 #line 2450 "tracker-builder.c"
2450 }
2451
2452
2453 gint tracker_sparql_builder_get_length (TrackerSparqlBuilder* self) {
2454 gint result;
2455 gint _tmp0_;
2456 #line 134 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2457 g_return_val_if_fail (self != NULL, 0);
2458 #line 134 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2459 _tmp0_ = self->priv->_length;
2460 #line 134 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2461 result = _tmp0_;
2462 #line 134 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2463 return result;
2464 #line 2465 "tracker-builder.c"
2465 }
2466
2467
2468 static void tracker_sparql_builder_set_length (TrackerSparqlBuilder* self, gint value) {
2469 gint _tmp0_;
2470 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2471 g_return_if_fail (self != NULL);
2472 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2473 _tmp0_ = value;
2474 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2475 self->priv->_length = _tmp0_;
2476 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2477 g_object_notify ((GObject *) self, "length");
2478 #line 2479 "tracker-builder.c"
2479 }
2480
2481
2482 TrackerSparqlBuilderState tracker_sparql_builder_get_state (TrackerSparqlBuilder* self) {
2483 TrackerSparqlBuilderState result;
2484 TrackerSparqlBuilderState* _tmp0_;
2485 gint _tmp0__length1;
2486 TrackerSparqlBuilderState* _tmp1_;
(emitted by gcc) 2487 gint _tmp1__length1;
2488 TrackerSparqlBuilderState _tmp2_;
2489 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2490 g_return_val_if_fail (self != NULL, 0);
2491 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2492 _tmp0_ = self->priv->states;
2493 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2494 _tmp0__length1 = self->priv->states_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2495 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2496 _tmp1_ = self->priv->states;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2497 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2498 _tmp1__length1 = self->priv->states_length1;
2499 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2500 _tmp2_ = _tmp0_[_tmp1__length1 - 1];
2501 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2502 result = _tmp2_;
2503 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2504 return result;
2505 #line 2506 "tracker-builder.c"
2506 }
2507
2508
2509 static void tracker_sparql_builder_class_init (TrackerSparqlBuilderClass * klass) {
2510 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2511 tracker_sparql_builder_parent_class = g_type_class_peek_parent (klass);
2512 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2513 g_type_class_add_private (klass, sizeof (TrackerSparqlBuilderPrivate));
2514 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2515 G_OBJECT_CLASS (klass)->get_property = _vala_tracker_sparql_builder_get_property;
2516 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2517 G_OBJECT_CLASS (klass)->set_property = _vala_tracker_sparql_builder_set_property;
2518 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2519 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_builder_finalize;
2520 #line 2521 "tracker-builder.c"
2521 /**
2522 * TrackerSparqlBuilder:result:
2523 *
2524 * String containing the constructed SPARQL in the #TrackerSparqlBuilder.
2525 *
2526 * Since: 0.10
2527 */
2528 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2529 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_BUILDER_RESULT, g_param_spec_string ("result", "result", "result", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
2530 #line 2531 "tracker-builder.c"
2531 /**
2532 * TrackerSparqlBuilder:length:
2533 *
2534 * Number of objects added to the #TrackerSparqlBuilder.
2535 *
2536 * Since: 0.10
2537 */
2538 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2539 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_BUILDER_LENGTH, g_param_spec_int ("length", "length", "length", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
2540 #line 2541 "tracker-builder.c"
2541 /**
2542 * TrackerSparqlBuilder:state:
2543 *
2544 * Current state of the #TrackerSparqlBuilder.
2545 *
2546 * Since: 0.10
2547 */
2548 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2549 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_BUILDER_STATE, g_param_spec_enum ("state", "state", "state", TRACKER_SPARQL_BUILDER_TYPE_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
2550 #line 2551 "tracker-builder.c"
2551 }
2552
2553
2554 static void tracker_sparql_builder_instance_init (TrackerSparqlBuilder * self) {
2555 GString* _tmp0_;
2556 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2557 self->priv = TRACKER_SPARQL_BUILDER_GET_PRIVATE (self);
2558 #line 161 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2559 _tmp0_ = g_string_new ("");
2560 #line 161 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2561 self->priv->str = _tmp0_;
2562 #line 2563 "tracker-builder.c"
2563 }
2564
2565
2566 static void tracker_sparql_builder_finalize (GObject* obj) {
2567 TrackerSparqlBuilder * self;
2568 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2569 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_BUILDER, TrackerSparqlBuilder);
2570 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2571 self->priv->states = (g_free (self->priv->states), NULL);
2572 #line 161 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2573 _g_string_free0 (self->priv->str);
2574 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2575 G_OBJECT_CLASS (tracker_sparql_builder_parent_class)->finalize (obj);
2576 #line 2577 "tracker-builder.c"
2577 }
2578
2579
2580 /**
2581 * tracker_sparql_builder_new:
2582 *
2583 * Creates a stateless #TrackerSparqlBuilder.
2584 *
2585 * Returns: a newly created #TrackerSparqlBuilder. Free with g_object_unref() when done
2586 *
2587 * Since: 0.10
2588 */
2589 GType tracker_sparql_builder_get_type (void) {
2590 static volatile gsize tracker_sparql_builder_type_id__volatile = 0;
2591 if (g_once_init_enter (&tracker_sparql_builder_type_id__volatile)) {
2592 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlBuilderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_builder_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlBuilder), 0, (GInstanceInitFunc) tracker_sparql_builder_instance_init, NULL };
2593 GType tracker_sparql_builder_type_id;
2594 tracker_sparql_builder_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlBuilder", &g_define_type_info, 0);
2595 g_once_init_leave (&tracker_sparql_builder_type_id__volatile, tracker_sparql_builder_type_id);
2596 }
2597 return tracker_sparql_builder_type_id__volatile;
2598 }
2599
2600
2601 static void _vala_tracker_sparql_builder_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
2602 TrackerSparqlBuilder * self;
2603 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_BUILDER, TrackerSparqlBuilder);
2604 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2605 switch (property_id) {
2606 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2607 case TRACKER_SPARQL_BUILDER_RESULT:
2608 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2609 g_value_set_string (value, tracker_sparql_builder_get_result (self));
2610 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2611 break;
2612 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2613 case TRACKER_SPARQL_BUILDER_LENGTH:
2614 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2615 g_value_set_int (value, tracker_sparql_builder_get_length (self));
2616 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2617 break;
2618 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2619 case TRACKER_SPARQL_BUILDER_STATE:
2620 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2621 g_value_set_enum (value, tracker_sparql_builder_get_state (self));
2622 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2623 break;
2624 #line 2625 "tracker-builder.c"
2625 default:
2626 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2627 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
2628 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2629 break;
2630 #line 2631 "tracker-builder.c"
2631 }
2632 }
2633
2634
2635 static void _vala_tracker_sparql_builder_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
2636 TrackerSparqlBuilder * self;
2637 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_BUILDER, TrackerSparqlBuilder);
2638 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2639 switch (property_id) {
2640 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2641 case TRACKER_SPARQL_BUILDER_LENGTH:
2642 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2643 tracker_sparql_builder_set_length (self, g_value_get_int (value));
2644 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2645 break;
2646 #line 2647 "tracker-builder.c"
2647 default:
2648 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2649 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
2650 #line 57 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.vala"
2651 break;
2652 #line 2653 "tracker-builder.c"
2653 }
2654 }