tracker-0.16.2/src/tracker-needle/tracker-result-store.c

Location Tool Test ID Function Issue
tracker-result-store.c:780:39 gcc unused-but-set-variable tracker_result_store_load_operation_finish variable '_data_' set but not used
tracker-result-store.c:781:2 clang-analyzer Value stored to '_data_' is never read
tracker-result-store.c:1251:38 gcc unused-but-set-variable tracker_result_store_load_category_finish variable '_data_' set but not used
tracker-result-store.c:1252:2 clang-analyzer Value stored to '_data_' is never read
tracker-result-store.c:1522:3 clang-analyzer Value stored to '_tmp7_' is never read
tracker-result-store.c:1547:10 gcc unused-but-set-variable tracker_result_store_clear_results variable '_tmp17__length1' set but not used
tracker-result-store.c:1569:5 clang-analyzer Value stored to '_tmp17__length1' is never read
tracker-result-store.c:1586:3 clang-analyzer Value stored to '_tmp26_' is never read
tracker-result-store.c:1767:31 gcc unused-but-set-variable tracker_result_store_real_get_flags variable '_tmp0_' set but not used
tracker-result-store.c:1771:2 clang-analyzer Value stored to '_tmp0_' is never read
tracker-result-store.c:1808:2 clang-analyzer Value stored to '_indices_size_' is never read
tracker-result-store.c:1811:2 clang-analyzer Value stored to '_tmp3_' is never read
tracker-result-store.c:1823:8 gcc unused-but-set-variable tracker_result_store_real_get_iter variable '_tmp11__length1' set but not used
tracker-result-store.c:1830:3 clang-analyzer Value stored to '_tmp4__length1' is never read
tracker-result-store.c:1847:3 clang-analyzer Value stored to '_tmp11__length1' is never read
tracker-result-store.c:1908:3 clang-analyzer Value stored to '_tmp28__length1' is never read
tracker-result-store.c:1924:3 clang-analyzer Value stored to '_tmp34__length1' is never read
tracker-result-store.c:1926:3 clang-analyzer Value stored to '_tmp35__length1' is never read
tracker-result-store.c:1931:3 clang-analyzer Value stored to '_tmp38__length1' is never read
tracker-result-store.c:1966:31 gcc unused-but-set-variable tracker_result_store_real_get_path variable '_tmp1_' set but not used
tracker-result-store.c:1974:2 clang-analyzer Value stored to '_tmp1_' is never read
tracker-result-store.c:2069:40 gcc unused-but-set-variable tracker_result_store_fetch_thumbnail_finish variable '_data_' set but not used
tracker-result-store.c:2070:2 clang-analyzer Value stored to '_data_' is never read
tracker-result-store.c:2185:5 gcc deprecated-declarations tracker_result_store_fetch_thumbnail_co 'gtk_icon_info_free' is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkicontheme.h:198): Use 'g_object_unref' instead
tracker-result-store.c:2322:2 clang-analyzer Value stored to '_tmp3_' is never read
tracker-result-store.c:2518:3 clang-analyzer Value stored to '_tmp58__length1' is never read
tracker-result-store.c:2537:35 gcc unused-but-set-variable tracker_result_store_real_get_value variable '_tmp66_' set but not used
tracker-result-store.c:2539:6 clang-analyzer Value stored to '_tmp66_' is never read
tracker-result-store.c:2555:5 clang-analyzer Value stored to '_tmp69__length1' is never read
tracker-result-store.c:2624:3 clang-analyzer Value stored to '_tmp4_' is never read
tracker-result-store.c:2659:9 gcc unused-but-set-variable tracker_result_store_real_iter_children variable '_tmp16__length1' set but not used
tracker-result-store.c:2667:14 clang-analyzer Access to field 'results' results in a dereference of a null pointer (loaded from variable '_tmp15_')
tracker-result-store.c:2668:4 clang-analyzer Value stored to '_tmp16__length1' is never read
tracker-result-store.c:2697:2 clang-analyzer Value stored to '_tmp24_' is never read
tracker-result-store.c:2714:2 clang-analyzer Value stored to '_tmp28__length1' is never read
tracker-result-store.c:2728:23 gcc unused-but-set-variable tracker_result_store_real_iter_has_child variable 'self' set but not used
tracker-result-store.c:2732:2 clang-analyzer Value stored to 'self' is never read
tracker-result-store.c:2774:32 gcc unused-but-set-variable tracker_result_store_real_iter_n_children variable '_tmp1_' set but not used
tracker-result-store.c:2776:3 clang-analyzer Value stored to '_tmp1_' is never read
tracker-result-store.c:2898:8 gcc unused-but-set-variable tracker_result_store_real_iter_next variable '_tmp25__length1' set but not used
tracker-result-store.c:2918:3 clang-analyzer Value stored to '_tmp25__length1' is never read
tracker-result-store.c:2952:8 gcc unused-but-set-variable tracker_result_store_real_iter_nth_child variable '_tmp10__length1' set but not used
tracker-result-store.c:2979:3 clang-analyzer Value stored to '_tmp10__length1' is never read
tracker-result-store.c:3003:3 clang-analyzer Value stored to '_tmp14_' is never read
tracker-result-store.c:3051:3 clang-analyzer Value stored to '_tmp30_' is never read
tracker-result-store.c:3060:4 clang-analyzer Value stored to '_tmp32__length1' is never read
tracker-result-store.c:3084:31 gcc unused-but-set-variable tracker_result_store_real_iter_parent variable '_tmp1_' set but not used
tracker-result-store.c:3090:2 clang-analyzer Value stored to '_tmp1_' is never read
tracker-result-store.c:3129:23 gcc unused-but-set-variable tracker_result_store_real_ref_node variable 'self' set but not used
tracker-result-store.c:3130:2 clang-analyzer Value stored to 'self' is never read
tracker-result-store.c:3136:23 gcc unused-but-set-variable tracker_result_store_real_unref_node variable 'self' set but not used
tracker-result-store.c:3137:2 clang-analyzer Value stored to 'self' is never read
tracker-result-store.c:3209:11 gcc unused-but-set-variable tracker_result_store_theme_changed variable '_tmp25__length1' set but not used
tracker-result-store.c:3228:6 clang-analyzer Value stored to '_tmp20__length1' is never read
tracker-result-store.c:3235:6 clang-analyzer Value stored to '_tmp25__length1' is never read
tracker-result-store.c:3344:2 gcc missing-braces tracker_result_store_add_query missing braces around initializer
tracker-result-store.c:3396:5 clang-analyzer Value stored to '_tmp6_' is never read
tracker-result-store.c:3397:5 clang-analyzer Value stored to '_tmp6__length1' is never read
tracker-result-store.c:3404:2 clang-analyzer Value stored to '_tmp9_' is never read
tracker-result-store.c:3430:2 clang-analyzer Value stored to '_tmp15_' is never read
tracker-result-store.c:3431:2 clang-analyzer Value stored to '_tmp15__length1' is never read
tracker-result-store.c:3555:9 gcc unused-but-set-variable tracker_result_store_set_search_term variable '_tmp12__length1' set but not used
tracker-result-store.c:3566:4 clang-analyzer Value stored to '_tmp11_' is never read
tracker-result-store.c:3572:4 clang-analyzer Value stored to '_tmp12__length1' is never read
   1 /* tracker-result-store.c generated by valac 0.18.1, the Vala compiler
   2  * generated from tracker-result-store.vala, do not modify */
   3 
   4 /**/
   5 /* Copyright 2010, Carlos Garnacho <carlos@lanedo.com>*/
   6 /**/
   7 /* This program is free software; you can redistribute it and/or*/
   8 /* modify it under the terms of the GNU General Public License*/
   9 /* as published by the Free Software Foundation; either version 2*/
  10 /* of the License, or (at your option) any later version.*/
  11 /**/
  12 /* This program 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*/
  15 /* GNU General Public License for more details.*/
  16 /**/
  17 /* You should have received a copy of the GNU General Public License*/
  18 /* along with this program; if not, write to the Free Software*/
  19 /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA*/
  20 /* 02110-1301, USA.*/
  21 /**/
  22 
  23 #include <glib.h>
  24 #include <glib-object.h>
  25 #include <gtk/gtk.h>
  26 #include <gio/gio.h>
  27 #include <stdlib.h>
  28 #include <string.h>
  29 #include "libtracker-sparql/tracker-sparql.h"
  30 #include <gdk-pixbuf/gdk-pixbuf.h>
  31 #include <gdk/gdk.h>
  32 #include <stdarg.h>
  33 #include <gobject/gvaluecollector.h>
  34 
  35 
  36 #define TRACKER_TYPE_RESULT_STORE (tracker_result_store_get_type ())
  37 #define TRACKER_RESULT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_RESULT_STORE, TrackerResultStore))
  38 #define TRACKER_RESULT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_RESULT_STORE, TrackerResultStoreClass))
  39 #define TRACKER_IS_RESULT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_RESULT_STORE))
  40 #define TRACKER_IS_RESULT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_RESULT_STORE))
  41 #define TRACKER_RESULT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_RESULT_STORE, TrackerResultStoreClass))
  42 
  43 typedef struct _TrackerResultStore TrackerResultStore;
  44 typedef struct _TrackerResultStoreClass TrackerResultStoreClass;
  45 typedef struct _TrackerResultStorePrivate TrackerResultStorePrivate;
  46 
  47 #define TRACKER_RESULT_STORE_TYPE_QUERY_DATA (tracker_result_store_query_data_get_type ())
  48 
  49 #define TRACKER_QUERY_TYPE_TYPE (tracker_query_type_get_type ())
  50 
  51 #define TRACKER_QUERY_TYPE_MATCH (tracker_query_match_get_type ())
  52 typedef struct _TrackerResultStoreQueryData TrackerResultStoreQueryData;
  53 
  54 #define TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE (tracker_result_store_category_node_get_type ())
  55 #define TRACKER_RESULT_STORE_CATEGORY_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNode))
  56 #define TRACKER_RESULT_STORE_CATEGORY_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNodeClass))
  57 #define TRACKER_RESULT_STORE_IS_CATEGORY_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE))
  58 #define TRACKER_RESULT_STORE_IS_CATEGORY_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE))
  59 #define TRACKER_RESULT_STORE_CATEGORY_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNodeClass))
  60 
  61 typedef struct _TrackerResultStoreCategoryNode TrackerResultStoreCategoryNode;
  62 typedef struct _TrackerResultStoreCategoryNodeClass TrackerResultStoreCategoryNodeClass;
  63 
  64 #define TRACKER_RESULT_STORE_TYPE_OPERATION (tracker_result_store_operation_get_type ())
  65 #define TRACKER_RESULT_STORE_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_RESULT_STORE_TYPE_OPERATION, TrackerResultStoreOperation))
  66 #define TRACKER_RESULT_STORE_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_RESULT_STORE_TYPE_OPERATION, TrackerResultStoreOperationClass))
  67 #define TRACKER_RESULT_STORE_IS_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_RESULT_STORE_TYPE_OPERATION))
  68 #define TRACKER_RESULT_STORE_IS_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_RESULT_STORE_TYPE_OPERATION))
  69 #define TRACKER_RESULT_STORE_OPERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_RESULT_STORE_TYPE_OPERATION, TrackerResultStoreOperationClass))
  70 
  71 typedef struct _TrackerResultStoreOperation TrackerResultStoreOperation;
  72 typedef struct _TrackerResultStoreOperationClass TrackerResultStoreOperationClass;
  73 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
  74 #define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
  75 #define _g_free0(var) (var = (g_free (var), NULL))
  76 typedef struct _TrackerResultStoreOperationPrivate TrackerResultStoreOperationPrivate;
  77 
  78 #define TRACKER_TYPE_QUERY (tracker_query_get_type ())
  79 #define TRACKER_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_QUERY, TrackerQuery))
  80 #define TRACKER_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_QUERY, TrackerQueryClass))
  81 #define TRACKER_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_QUERY))
  82 #define TRACKER_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_QUERY))
  83 #define TRACKER_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_QUERY, TrackerQueryClass))
  84 
  85 typedef struct _TrackerQuery TrackerQuery;
  86 typedef struct _TrackerQueryClass TrackerQueryClass;
  87 #define _tracker_query_unref0(var) ((var == NULL) ? NULL : (var = (tracker_query_unref (var), NULL)))
  88 typedef struct _TrackerResultStoreCategoryNodePrivate TrackerResultStoreCategoryNodePrivate;
  89 
  90 #define TRACKER_RESULT_STORE_TYPE_RESULT_NODE (tracker_result_store_result_node_get_type ())
  91 typedef struct _TrackerResultStoreResultNode TrackerResultStoreResultNode;
  92 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
  93 #define _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))
  94 typedef struct _TrackerResultStoreLoadOperationData TrackerResultStoreLoadOperationData;
  95 #define _tracker_result_store_category_node_unref0(var) ((var == NULL) ? NULL : (var = (tracker_result_store_category_node_unref (var), NULL)))
  96 typedef struct _TrackerResultStoreLoadCategoryData TrackerResultStoreLoadCategoryData;
  97 #define _gtk_icon_info_free0(var) ((var == NULL) ? NULL : (var = (gtk_icon_info_free (var), NULL)))
  98 typedef struct _TrackerResultStoreFetchThumbnailData TrackerResultStoreFetchThumbnailData;
  99 typedef struct _TrackerResultStoreParamSpecCategoryNode TrackerResultStoreParamSpecCategoryNode;
 100 
 101 struct _TrackerResultStore {
 102 	GObject parent_instance;
 103 	TrackerResultStorePrivate * priv;
 104 };
 105 
 106 struct _TrackerResultStoreClass {
 107 	GObjectClass parent_class;
 108 };
 109 
 110 typedef enum  {
 111 	TRACKER_QUERY_TYPE_ALL,
 112 	TRACKER_QUERY_TYPE_CONTACTS,
 113 	TRACKER_QUERY_TYPE_APPLICATIONS,
 114 	TRACKER_QUERY_TYPE_MUSIC,
 115 	TRACKER_QUERY_TYPE_IMAGES,
 116 	TRACKER_QUERY_TYPE_VIDEOS,
 117 	TRACKER_QUERY_TYPE_DOCUMENTS,
 118 	TRACKER_QUERY_TYPE_MAIL,
 119 	TRACKER_QUERY_TYPE_CALENDAR,
 120 	TRACKER_QUERY_TYPE_FOLDERS,
 121 	TRACKER_QUERY_TYPE_BOOKMARKS
 122 } TrackerQueryType;
 123 
 124 typedef enum  {
 125 	TRACKER_QUERY_MATCH_NONE,
 126 	TRACKER_QUERY_MATCH_FTS,
 127 	TRACKER_QUERY_MATCH_FTS_INDIRECT,
 128 	TRACKER_QUERY_MATCH_TITLES,
 129 	TRACKER_QUERY_MATCH_TITLES_INDIRECT,
 130 	TRACKER_QUERY_MATCH_TAGS_ONLY,
 131 	TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT
 132 } TrackerQueryMatch;
 133 
 134 struct _TrackerResultStoreQueryData {
 135 	TrackerQueryType type;
 136 	TrackerQueryMatch match;
 137 	gchar** args;
 138 	gint args_length1;
 139 	gint _args_size_;
 140 };
 141 
 142 struct _TrackerResultStorePrivate {
 143 	GCancellable* cancellable;
 144 	TrackerResultStoreQueryData* queries;
 145 	gint queries_length1;
 146 	gint _queries_size_;
 147 	GPtrArray* categories;
 148 	GPtrArray* running_operations;
 149 	GPtrArray* delayed_operations;
 150 	gint n_extra_columns;
 151 	gint n_columns;
 152 	gint timestamp;
 153 	gint _icon_size;
 154 	guint _limit;
 155 	gchar* _search_term;
 156 	GPtrArray* _search_tags;
 157 	gboolean _active;
 158 };
 159 
 160 struct _TrackerResultStoreOperation {
 161 	GObject parent_instance;
 162 	TrackerResultStoreOperationPrivate * priv;
 163 	TrackerResultStoreCategoryNode* node;
 164 	gint offset;
 165 };
 166 
 167 struct _TrackerResultStoreOperationClass {
 168 	GObjectClass parent_class;
 169 };
 170 
 171 struct _TrackerResultStoreResultNode {
 172 	gchar** values;
 173 	gint values_length1;
 174 	gint _values_size_;
 175 	GdkPixbuf* pixbuf;
 176 };
 177 
 178 struct _TrackerResultStoreCategoryNode {
 179 	GTypeInstance parent_instance;
 180 	volatile int ref_count;
 181 	TrackerResultStoreCategoryNodePrivate * priv;
 182 	TrackerQueryType type;
 183 	TrackerResultStoreQueryData* query;
 184 	TrackerResultStoreResultNode* results;
 185 	gint results_length1;
 186 	gint _results_size_;
 187 	GdkPixbuf* pixbuf;
 188 	gint count;
 189 };
 190 
 191 struct _TrackerResultStoreCategoryNodeClass {
 192 	GTypeClass parent_class;
 193 	void (*finalize) (TrackerResultStoreCategoryNode *self);
 194 };
 195 
 196 struct _TrackerResultStoreLoadOperationData {
 197 	int _state_;
 198 	GObject* _source_object_;
 199 	GAsyncResult* _res_;
 200 	GSimpleAsyncResult* _async_result;
 201 	TrackerResultStore* self;
 202 	TrackerResultStoreOperation* op;
 203 	GCancellable* cancellable;
 204 	TrackerQuery* query;
 205 	TrackerSparqlCursor* cursor;
 206 	gint i;
 207 	GCancellable* _tmp0_;
 208 	TrackerQuery* _tmp1_;
 209 	TrackerQuery* _tmp2_;
 210 	const gchar* _tmp3_;
 211 	TrackerQuery* _tmp4_;
 212 	GPtrArray* _tmp5_;
 213 	TrackerQuery* _tmp6_;
 214 	guint _tmp7_;
 215 	TrackerQuery* _tmp8_;
 216 	TrackerResultStoreOperation* _tmp9_;
 217 	gint _tmp10_;
 218 	TrackerQuery* _tmp11_;
 219 	TrackerResultStoreOperation* _tmp12_;
 220 	TrackerResultStoreCategoryNode* _tmp13_;
 221 	TrackerResultStoreQueryData* _tmp14_;
 222 	TrackerQueryType _tmp15_;
 223 	TrackerResultStoreOperation* _tmp16_;
 224 	TrackerResultStoreCategoryNode* _tmp17_;
 225 	TrackerResultStoreQueryData* _tmp18_;
 226 	TrackerQueryMatch _tmp19_;
 227 	TrackerResultStoreOperation* _tmp20_;
 228 	TrackerResultStoreCategoryNode* _tmp21_;
 229 	TrackerResultStoreQueryData* _tmp22_;
 230 	gchar** _tmp23_;
 231 	gint _tmp23__length1;
 232 	GCancellable* _tmp24_;
 233 	TrackerSparqlCursor* _tmp25_;
 234 	TrackerSparqlCursor* _tmp26_;
 235 	GCancellable* _tmp27_;
 236 	TrackerSparqlCursor* _tmp28_;
 237 	TrackerResultStoreOperation* _tmp29_;
 238 	gint _tmp30_;
 239 	gboolean _tmp31_;
 240 	gboolean _tmp32_;
 241 	gint _tmp33_;
 242 	gint _tmp34_;
 243 	TrackerResultStoreOperation* _tmp35_;
 244 	gint _tmp36_;
 245 	TrackerResultStoreResultNode* _result_;
 246 	GtkTreeIter iter;
 247 	GtkTreePath* path;
 248 	gboolean b;
 249 	gint j;
 250 	TrackerSparqlCursor* _tmp37_;
 251 	GCancellable* _tmp38_;
 252 	gboolean _tmp39_;
 253 	gboolean _tmp40_;
 254 	GError* ge;
 255 	GCancellable* _tmp41_;
 256 	gboolean _tmp42_;
 257 	GError* _tmp43_;
 258 	const gchar* _tmp44_;
 259 	gboolean _tmp45_;
 260 	TrackerResultStoreOperation* _tmp46_;
 261 	TrackerResultStoreCategoryNode* _tmp47_;
 262 	TrackerResultStoreResultNode* _tmp48_;
 263 	gint _tmp48__length1;
 264 	gint _tmp49_;
 265 	gboolean _tmp50_;
 266 	gboolean _tmp51_;
 267 	gint _tmp52_;
 268 	gint _tmp53_;
 269 	gint _tmp54_;
 270 	gint _tmp55_;
 271 	gint _tmp56_;
 272 	TrackerSparqlCursor* _tmp57_;
 273 	gint _tmp58_;
 274 	const gchar* _tmp59_;
 275 	gchar* _tmp60_;
 276 	gchar* s;
 277 	const gchar* _tmp61_;
 278 	TrackerResultStoreResultNode* _tmp62_;
 279 	gchar** _tmp63_;
 280 	gint _tmp63__length1;
 281 	gint _tmp64_;
 282 	const gchar* _tmp65_;
 283 	gchar* _tmp66_;
 284 	gchar* _tmp67_;
 285 	TrackerResultStoreResultNode* _tmp68_;
 286 	gchar** _tmp69_;
 287 	gint _tmp69__length1;
 288 	gint _tmp70_;
 289 	gchar* _tmp71_;
 290 	TrackerResultStoreResultNode* _tmp72_;
 291 	gchar** _tmp73_;
 292 	gint _tmp73__length1;
 293 	gint _tmp74_;
 294 	TrackerSparqlCursor* _tmp75_;
 295 	gint _tmp76_;
 296 	const gchar* _tmp77_;
 297 	gchar* _tmp78_;
 298 	gchar* _tmp79_;
 299 	gint _tmp80_;
 300 	TrackerResultStoreOperation* _tmp81_;
 301 	TrackerResultStoreCategoryNode* _tmp82_;
 302 	TrackerResultStoreResultNode* _tmp83_;
 303 	gint _tmp84_;
 304 	void* _tmp85_;
 305 	GtkTreeIter _tmp86_;
 306 	GtkTreePath* _tmp87_;
 307 	GtkTreePath* _tmp88_;
 308 	GtkTreeIter _tmp89_;
 309 	GPtrArray* _tmp90_;
 310 	TrackerResultStoreOperation* _tmp91_;
 311 	GError* ie;
 312 	GCancellable* _tmp92_;
 313 	gboolean _tmp93_;
 314 	GError* _tmp94_;
 315 	const gchar* _tmp95_;
 316 	GPtrArray* _tmp96_;
 317 	gint _tmp97_;
 318 	gint _tmp98_;
 319 	TrackerResultStoreOperation* next_to_start;
 320 	GPtrArray* _tmp99_;
 321 	GPtrArray* _tmp100_;
 322 	gint _tmp101_;
 323 	gint _tmp102_;
 324 	gconstpointer _tmp103_;
 325 	TrackerResultStoreOperation* _tmp104_;
 326 	GPtrArray* _tmp105_;
 327 	TrackerResultStoreOperation* _tmp106_;
 328 	GPtrArray* _tmp107_;
 329 	TrackerResultStoreOperation* _tmp108_;
 330 	TrackerResultStoreOperation* _tmp109_;
 331 	TrackerResultStoreOperation* _tmp110_;
 332 	GCancellable* _tmp111_;
 333 	GPtrArray* _tmp112_;
 334 	gint _tmp113_;
 335 	gint _tmp114_;
 336 	GError * _inner_error_;
 337 };
 338 
 339 struct _TrackerResultStoreLoadCategoryData {
 340 	int _state_;
 341 	GObject* _source_object_;
 342 	GAsyncResult* _res_;
 343 	GSimpleAsyncResult* _async_result;
 344 	TrackerResultStore* self;
 345 	TrackerResultStoreQueryData* query_data;
 346 	GCancellable* cancellable;
 347 	guint count;
 348 	GCancellable* _tmp0_;
 349 	TrackerQuery* _tmp1_;
 350 	TrackerQuery* query;
 351 	TrackerQuery* _tmp2_;
 352 	const gchar* _tmp3_;
 353 	TrackerQuery* _tmp4_;
 354 	GPtrArray* _tmp5_;
 355 	TrackerQuery* _tmp6_;
 356 	TrackerResultStoreQueryData* _tmp7_;
 357 	TrackerQueryType _tmp8_;
 358 	TrackerResultStoreQueryData* _tmp9_;
 359 	TrackerQueryMatch _tmp10_;
 360 	GCancellable* _tmp11_;
 361 	guint _tmp12_;
 362 	guint _tmp13_;
 363 	GCancellable* _tmp14_;
 364 	GError* ie;
 365 	GCancellable* _tmp15_;
 366 	gboolean _tmp16_;
 367 	GError* _tmp17_;
 368 	const gchar* _tmp18_;
 369 	guint _tmp19_;
 370 	TrackerResultStoreCategoryNode* cat;
 371 	TrackerResultStoreResultNode* res;
 372 	gint i;
 373 	guint _tmp20_;
 374 	guint _tmp21_;
 375 	guint _tmp22_;
 376 	GtkTreeIter iter;
 377 	GtkTreePath* path;
 378 	TrackerResultStoreCategoryNode* _tmp23_;
 379 	TrackerResultStoreCategoryNode* _tmp24_;
 380 	TrackerResultStoreQueryData* _tmp25_;
 381 	TrackerQueryType _tmp26_;
 382 	TrackerResultStoreCategoryNode* _tmp27_;
 383 	TrackerResultStoreQueryData* _tmp28_;
 384 	TrackerResultStoreCategoryNode* _tmp29_;
 385 	guint _tmp30_;
 386 	gint _tmp31_;
 387 	GPtrArray* _tmp32_;
 388 	TrackerResultStoreCategoryNode* _tmp33_;
 389 	TrackerResultStoreCategoryNode* _tmp34_;
 390 	gint _tmp35_;
 391 	TrackerResultStoreCategoryNode* _tmp36_;
 392 	TrackerResultStoreQueryData* _tmp37_;
 393 	gint _tmp37__length1;
 394 	GtkTreeIter _tmp38_;
 395 	GtkTreePath* _tmp39_;
 396 	GtkTreePath* _tmp40_;
 397 	GtkTreeIter _tmp41_;
 398 	gboolean _tmp42_;
 399 	gboolean _tmp43_;
 400 	gint _tmp44_;
 401 	gint _tmp45_;
 402 	guint _tmp46_;
 403 	TrackerResultStoreCategoryNode* _tmp47_;
 404 	TrackerResultStoreResultNode* _tmp48_;
 405 	gint _tmp48__length1;
 406 	gint _tmp49_;
 407 	TrackerResultStoreResultNode* _tmp50_;
 408 	gint _tmp51_;
 409 	gchar** _tmp52_;
 410 	TrackerResultStoreResultNode* _tmp53_;
 411 	gint _tmp54_;
 412 	void* _tmp55_;
 413 	GtkTreeIter _tmp56_;
 414 	GtkTreePath* _tmp57_;
 415 	TrackerResultStoreCategoryNode* _tmp58_;
 416 	gint _tmp59_;
 417 	GtkTreePath* _tmp60_;
 418 	GtkTreeIter _tmp61_;
 419 	TrackerResultStoreQueryData* _tmp62_;
 420 	gint _tmp62__length1;
 421 	GtkTreeIter _tmp63_;
 422 	GtkTreePath* _tmp64_;
 423 	GtkTreePath* _tmp65_;
 424 	GtkTreeIter _tmp66_;
 425 	GPtrArray* _tmp67_;
 426 	gint _tmp68_;
 427 	gint _tmp69_;
 428 	GError * _inner_error_;
 429 };
 430 
 431 struct _TrackerResultStoreFetchThumbnailData {
 432 	int _state_;
 433 	GObject* _source_object_;
 434 	GAsyncResult* _res_;
 435 	GSimpleAsyncResult* _async_result;
 436 	TrackerResultStore* self;
 437 	GtkTreeIter iter;
 438 	GFile* file;
 439 	GFileInfo* info;
 440 	TrackerResultStoreResultNode* _result_;
 441 	gchar* thumb_path;
 442 	GdkPixbuf* pixbuf;
 443 	GtkTreeIter _tmp0_;
 444 	void* _tmp1_;
 445 	TrackerResultStoreResultNode* _tmp2_;
 446 	gchar** _tmp3_;
 447 	gint _tmp3__length1;
 448 	const gchar* _tmp4_;
 449 	GFile* _tmp5_;
 450 	GFile* _tmp6_;
 451 	GCancellable* _tmp7_;
 452 	GFileInfo* _tmp8_;
 453 	GFileInfo* _tmp9_;
 454 	GError* ie;
 455 	GCancellable* _tmp10_;
 456 	gboolean _tmp11_;
 457 	GError* _tmp12_;
 458 	const gchar* _tmp13_;
 459 	GFileInfo* _tmp14_;
 460 	const gchar* _tmp15_;
 461 	gchar* _tmp16_;
 462 	const gchar* _tmp17_;
 463 	const gchar* _tmp18_;
 464 	gint _tmp19_;
 465 	gint _tmp20_;
 466 	GdkPixbuf* _tmp21_;
 467 	GdkPixbuf* _tmp22_;
 468 	GIcon* icon;
 469 	GtkIconInfo* icon_info;
 470 	GFileInfo* _tmp23_;
 471 	GObject* _tmp24_;
 472 	GIcon* _tmp25_;
 473 	GIcon* _tmp26_;
 474 	GdkScreen* _tmp27_;
 475 	GtkIconTheme* _tmp28_;
 476 	GtkIconTheme* _tmp29_;
 477 	GtkIconTheme* theme;
 478 	GtkIconTheme* _tmp30_;
 479 	GIcon* _tmp31_;
 480 	gint _tmp32_;
 481 	GtkIconInfo* _tmp33_;
 482 	GtkIconInfo* _tmp34_;
 483 	GtkIconInfo* _tmp35_;
 484 	GdkPixbuf* _tmp36_;
 485 	GdkPixbuf* _tmp37_;
 486 	GError* e;
 487 	GError* _tmp38_;
 488 	const gchar* _tmp39_;
 489 	GdkPixbuf* _tmp40_;
 490 	GtkTreePath* path;
 491 	TrackerResultStoreResultNode* _tmp41_;
 492 	GdkPixbuf* _tmp42_;
 493 	GdkPixbuf* _tmp43_;
 494 	GtkTreeIter _tmp44_;
 495 	GtkTreePath* _tmp45_;
 496 	GtkTreePath* _tmp46_;
 497 	GtkTreeIter _tmp47_;
 498 	GError * _inner_error_;
 499 };
 500 
 501 struct _TrackerResultStoreParamSpecCategoryNode {
 502 	GParamSpec parent_instance;
 503 };
 504 
 505 
 506 static gpointer tracker_result_store_parent_class = NULL;
 507 static gpointer tracker_result_store_category_node_parent_class = NULL;
 508 static gpointer tracker_result_store_operation_parent_class = NULL;
 509 static GtkTreeModelIface* tracker_result_store_gtk_tree_model_parent_iface = NULL;
 510 
 511 GType tracker_result_store_get_type (void) G_GNUC_CONST;
 512 static GType tracker_result_store_query_data_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
 513 GType tracker_query_type_get_type (void) G_GNUC_CONST;
 514 GType tracker_query_match_get_type (void) G_GNUC_CONST;
 515 static TrackerResultStoreQueryData* tracker_result_store_query_data_dup (const TrackerResultStoreQueryData* self);
 516 static void tracker_result_store_query_data_free (TrackerResultStoreQueryData* self);
 517 static void tracker_result_store_query_data_copy (const TrackerResultStoreQueryData* self, TrackerResultStoreQueryData* dest);
 518 static void tracker_result_store_query_data_destroy (TrackerResultStoreQueryData* self);
 519 static gpointer tracker_result_store_category_node_ref (gpointer instance);
 520 static void tracker_result_store_category_node_unref (gpointer instance);
 521 static GParamSpec* tracker_result_store_param_spec_category_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
 522 static void tracker_result_store_value_set_category_node (GValue* value, gpointer v_object) G_GNUC_UNUSED;
 523 static void tracker_result_store_value_take_category_node (GValue* value, gpointer v_object) G_GNUC_UNUSED;
 524 static gpointer tracker_result_store_value_get_category_node (const GValue* value) G_GNUC_UNUSED;
 525 static GType tracker_result_store_category_node_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
 526 static GType tracker_result_store_operation_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
 527 #define TRACKER_RESULT_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_RESULT_STORE, TrackerResultStorePrivate))
 528 enum  {
 529 	TRACKER_RESULT_STORE_DUMMY_PROPERTY,
 530 	TRACKER_RESULT_STORE_ICON_SIZE,
 531 	TRACKER_RESULT_STORE_LIMIT,
 532 	TRACKER_RESULT_STORE_SEARCH_TERM,
 533 	TRACKER_RESULT_STORE_SEARCH_TAGS,
 534 	TRACKER_RESULT_STORE_ACTIVE
 535 };
 536 static void _vala_TrackerResultStoreQueryData_array_free (TrackerResultStoreQueryData* array, gint array_length);
 537 static TrackerResultStoreOperation* tracker_result_store_find_operation (TrackerResultStore* self, GPtrArray* array, TrackerResultStoreCategoryNode* node, gint offset);
 538 static void tracker_result_store_load_operation_data_free (gpointer _data);
 539 static void tracker_result_store_load_operation (TrackerResultStore* self, TrackerResultStoreOperation* op, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 540 static void tracker_result_store_load_operation_finish (TrackerResultStore* self, GAsyncResult* _res_);
 541 static gboolean tracker_result_store_load_operation_co (TrackerResultStoreLoadOperationData* _data_);
 542 gpointer tracker_query_ref (gpointer instance);
 543 void tracker_query_unref (gpointer instance);
 544 GParamSpec* tracker_param_spec_query (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
 545 void tracker_value_set_query (GValue* value, gpointer v_object);
 546 void tracker_value_take_query (GValue* value, gpointer v_object);
 547 gpointer tracker_value_get_query (const GValue* value);
 548 GType tracker_query_get_type (void) G_GNUC_CONST;
 549 TrackerQuery* tracker_query_new (void);
 550 TrackerQuery* tracker_query_construct (GType object_type);
 551 void tracker_query_set_criteria (TrackerQuery* self, const gchar* value);
 552 GPtrArray* tracker_result_store_get_search_tags (TrackerResultStore* self);
 553 void tracker_query_set_tags (TrackerQuery* self, GPtrArray* value);
 554 guint tracker_result_store_get_limit (TrackerResultStore* self);
 555 void tracker_query_set_limit (TrackerQuery* self, guint value);
 556 void tracker_query_set_offset (TrackerQuery* self, guint value);
 557 void tracker_query_perform_async (TrackerQuery* self, TrackerQueryType query_type, TrackerQueryMatch match_type, gchar** args, int args_length1, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 558 TrackerSparqlCursor* tracker_query_perform_finish (TrackerQuery* self, GAsyncResult* _res_, GError** error);
 559 static GType tracker_result_store_result_node_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
 560 static TrackerResultStoreResultNode* tracker_result_store_result_node_dup (const TrackerResultStoreResultNode* self);
 561 static void tracker_result_store_result_node_free (TrackerResultStoreResultNode* self);
 562 static void tracker_result_store_result_node_copy (const TrackerResultStoreResultNode* self, TrackerResultStoreResultNode* dest);
 563 static void tracker_result_store_result_node_destroy (TrackerResultStoreResultNode* self);
 564 static void tracker_result_store_load_operation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 565 static void tracker_result_store_set_active (TrackerResultStore* self, gboolean value);
 566 static void tracker_result_store_add_operation (TrackerResultStore* self, TrackerResultStoreCategoryNode* cat, gint offset);
 567 static TrackerResultStoreOperation* tracker_result_store_operation_new (void);
 568 static TrackerResultStoreOperation* tracker_result_store_operation_construct (GType object_type);
 569 static void tracker_result_store_load_category_data_free (gpointer _data);
 570 static void tracker_result_store_load_category (TrackerResultStore* self, TrackerResultStoreQueryData* query_data, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 571 static void tracker_result_store_load_category_finish (TrackerResultStore* self, GAsyncResult* _res_);
 572 static gboolean tracker_result_store_load_category_co (TrackerResultStoreLoadCategoryData* _data_);
 573 void tracker_query_get_count_async (TrackerQuery* self, TrackerQueryType query_type, TrackerQueryMatch match_type, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 574 guint tracker_query_get_count_finish (TrackerQuery* self, GAsyncResult* _res_, GError** error);
 575 static void tracker_result_store_load_category_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 576 static TrackerResultStoreCategoryNode* tracker_result_store_category_node_new (void);
 577 static TrackerResultStoreCategoryNode* tracker_result_store_category_node_construct (GType object_type);
 578 static void tracker_result_store_clear_results (TrackerResultStore* self);
 579 static gint tracker_result_store_find_nth_category_index (TrackerResultStore* self, TrackerResultStoreCategoryNode* node, gint n);
 580 static gint tracker_result_store_filled_categories_count (TrackerResultStore* self);
 581 static GType tracker_result_store_real_get_column_type (GtkTreeModel* base, gint index_);
 582 static GtkTreeModelFlags tracker_result_store_real_get_flags (GtkTreeModel* base);
 583 static gboolean tracker_result_store_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path);
 584 static gint tracker_result_store_real_get_n_columns (GtkTreeModel* base);
 585 static GtkTreePath* tracker_result_store_real_get_path (GtkTreeModel* base, GtkTreeIter* iter);
 586 static void tracker_result_store_fetch_thumbnail_data_free (gpointer _data);
 587 static void tracker_result_store_fetch_thumbnail (TrackerResultStore* self, GtkTreeIter* iter, GAsyncReadyCallback _callback_, gpointer _user_data_);
 588 static void tracker_result_store_fetch_thumbnail_finish (TrackerResultStore* self, GAsyncResult* _res_);
 589 static gboolean tracker_result_store_fetch_thumbnail_co (TrackerResultStoreFetchThumbnailData* _data_);
 590 static void tracker_result_store_fetch_thumbnail_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 591 gint tracker_result_store_get_icon_size (TrackerResultStore* self);
 592 static void tracker_result_store_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value);
 593 GdkPixbuf* tracker_pixbuf_new_from_name (GtkIconTheme* theme, const gchar* name, gint size);
 594 static gboolean tracker_result_store_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent);
 595 static gboolean tracker_result_store_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter);
 596 static gint tracker_result_store_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter);
 597 static gboolean tracker_result_store_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter);
 598 static gboolean tracker_result_store_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n);
 599 static gboolean tracker_result_store_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child);
 600 static void tracker_result_store_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter);
 601 static void tracker_result_store_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter);
 602 static void tracker_result_store_theme_changed (TrackerResultStore* self, GtkIconTheme* theme);
 603 TrackerResultStore* tracker_result_store_new (gint _n_columns);
 604 TrackerResultStore* tracker_result_store_construct (GType object_type, gint _n_columns);
 605 static void _tracker_result_store_category_node_unref0_ (gpointer var);
 606 static void _g_object_unref0_ (gpointer var);
 607 void tracker_result_store_set_icon_size (TrackerResultStore* self, gint value);
 608 static void _tracker_result_store_theme_changed_gtk_icon_theme_changed (GtkIconTheme* _sender, gpointer self);
 609 void tracker_result_store_add_query (TrackerResultStore* self, TrackerQueryType type, TrackerQueryMatch match, ...);
 610 static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
 611 static gchar** _vala_array_dup2 (gchar** self, int length);
 612 static void _vala_array_add3 (TrackerResultStoreQueryData** array, int* length, int* size, const TrackerResultStoreQueryData* value);
 613 gboolean tracker_result_store_has_results (TrackerResultStore* self);
 614 void tracker_result_store_cancel_search (TrackerResultStore* self);
 615 void tracker_result_store_set_limit (TrackerResultStore* self, guint value);
 616 const gchar* tracker_result_store_get_search_term (TrackerResultStore* self);
 617 void tracker_result_store_set_search_term (TrackerResultStore* self, const gchar* value);
 618 void tracker_result_store_set_search_tags (TrackerResultStore* self, GPtrArray* value);
 619 gboolean tracker_result_store_get_active (TrackerResultStore* self);
 620 enum  {
 621 	TRACKER_RESULT_STORE_CATEGORY_NODE_DUMMY_PROPERTY
 622 };
 623 static void _vala_TrackerResultStoreResultNode_array_free (TrackerResultStoreResultNode* array, gint array_length);
 624 static void tracker_result_store_category_node_finalize (TrackerResultStoreCategoryNode* obj);
 625 enum  {
 626 	TRACKER_RESULT_STORE_OPERATION_DUMMY_PROPERTY
 627 };
 628 static void tracker_result_store_operation_finalize (GObject* obj);
 629 static gchar** _vala_array_dup3 (gchar** self, int length);
 630 static gchar** _vala_array_dup4 (gchar** self, int length);
 631 static void tracker_result_store_finalize (GObject* obj);
 632 static void _vala_tracker_result_store_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
 633 static void _vala_tracker_result_store_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
 634 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
 635 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
 636 
 637 
 638 static void _vala_TrackerResultStoreQueryData_array_free (TrackerResultStoreQueryData* array, gint array_length) {
 639 	if (array != NULL) {
 640 		int i;
 641 		for (i = 0; i < array_length; i = i + 1) {
 642 			tracker_result_store_query_data_destroy (&array[i]);
 643 		}
 644 	}
 645 	g_free (array);
 646 }
 647 
 648 
 649 static gint g_ptr_array_get_length (GPtrArray* self) {
 650 	gint result;
 651 	guint _tmp0_;
 652 	g_return_val_if_fail (self != NULL, 0);
 653 	_tmp0_ = self->len;
 654 	result = (gint) _tmp0_;
 655 	return result;
 656 }
 657 
 658 
 659 static void g_ptr_array_set_length (GPtrArray* self, gint value) {
 660 	gint _tmp0_;
 661 	g_return_if_fail (self != NULL);
 662 	_tmp0_ = value;
 663 	g_ptr_array_set_size (self, _tmp0_);
 664 }
 665 
 666 
 667 static gpointer _g_object_ref0 (gpointer self) {
 668 	return self ? g_object_ref (self) : NULL;
 669 }
 670 
 671 
 672 static TrackerResultStoreOperation* tracker_result_store_find_operation (TrackerResultStore* self, GPtrArray* array, TrackerResultStoreCategoryNode* node, gint offset) {
 673 	TrackerResultStoreOperation* result = NULL;
 674 	TrackerResultStoreOperation* op = NULL;
 675 	gint i = 0;
 676 	g_return_val_if_fail (self != NULL, NULL);
 677 	g_return_val_if_fail (array != NULL, NULL);
 678 	g_return_val_if_fail (node != NULL, NULL);
 679 	{
 680 		gboolean _tmp0_;
 681 		i = 0;
 682 		_tmp0_ = TRUE;
 683 		while (TRUE) {
 684 			gboolean _tmp1_;
 685 			gint _tmp3_;
 686 			GPtrArray* _tmp4_;
 687 			gint _tmp5_;
 688 			gint _tmp6_;
 689 			GPtrArray* _tmp7_;
 690 			gint _tmp8_;
 691 			gconstpointer _tmp9_ = NULL;
 692 			TrackerResultStoreOperation* _tmp10_;
 693 			gboolean _tmp11_ = FALSE;
 694 			TrackerResultStoreOperation* _tmp12_;
 695 			TrackerResultStoreCategoryNode* _tmp13_;
 696 			TrackerResultStoreCategoryNode* _tmp14_;
 697 			gboolean _tmp18_;
 698 			_tmp1_ = _tmp0_;
 699 			if (!_tmp1_) {
 700 				gint _tmp2_;
 701 				_tmp2_ = i;
 702 				i = _tmp2_ + 1;
 703 			}
 704 			_tmp0_ = FALSE;
 705 			_tmp3_ = i;
 706 			_tmp4_ = array;
 707 			_tmp5_ = g_ptr_array_get_length (_tmp4_);
 708 			_tmp6_ = _tmp5_;
 709 			if (!(_tmp3_ < _tmp6_)) {
 710 				break;
 711 			}
 712 			_tmp7_ = array;
 713 			_tmp8_ = i;
 714 			_tmp9_ = g_ptr_array_index (_tmp7_, (guint) _tmp8_);
 715 			_tmp10_ = _g_object_ref0 ((TrackerResultStoreOperation*) _tmp9_);
 716 			_g_object_unref0 (op);
 717 			op = _tmp10_;
 718 			_tmp12_ = op;
 719 			_tmp13_ = _tmp12_->node;
 720 			_tmp14_ = node;
 721 			if (_tmp13_ == _tmp14_) {
 722 				TrackerResultStoreOperation* _tmp15_;
 723 				gint _tmp16_;
 724 				gint _tmp17_;
 725 				_tmp15_ = op;
 726 				_tmp16_ = _tmp15_->offset;
 727 				_tmp17_ = offset;
 728 				_tmp11_ = _tmp16_ == _tmp17_;
 729 			} else {
 730 				_tmp11_ = FALSE;
 731 			}
 732 			_tmp18_ = _tmp11_;
 733 			if (_tmp18_) {
 734 				result = op;
 735 				return result;
 736 			}
 737 		}
 738 	}
 739 	result = NULL;
 740 	_g_object_unref0 (op);
 741 	return result;
 742 }
 743 
 744 
 745 static void tracker_result_store_load_operation_data_free (gpointer _data) {
 746 	TrackerResultStoreLoadOperationData* _data_;
 747 	_data_ = _data;
 748 	_g_object_unref0 (_data_->op);
 749 	_g_object_unref0 (_data_->cancellable);
 750 	_g_object_unref0 (_data_->self);
 751 	g_slice_free (TrackerResultStoreLoadOperationData, _data_);
 752 }
 753 
 754 
 755 static void tracker_result_store_load_operation (TrackerResultStore* self, TrackerResultStoreOperation* op, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
 756 	TrackerResultStoreLoadOperationData* _data_;
 757 	TrackerResultStore* _tmp0_;
 758 	TrackerResultStoreOperation* _tmp1_;
 759 	TrackerResultStoreOperation* _tmp2_;
 760 	GCancellable* _tmp3_;
 761 	GCancellable* _tmp4_;
 762 	_data_ = g_slice_new0 (TrackerResultStoreLoadOperationData);
 763 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_result_store_load_operation);
 764 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_result_store_load_operation_data_free);
 765 	_tmp0_ = _g_object_ref0 (self);
 766 	_data_->self = _tmp0_;
 767 	_tmp1_ = op;
 768 	_tmp2_ = _g_object_ref0 (_tmp1_);
 769 	_g_object_unref0 (_data_->op);
 770 	_data_->op = _tmp2_;
 771 	_tmp3_ = cancellable;
 772 	_tmp4_ = _g_object_ref0 (_tmp3_);
 773 	_g_object_unref0 (_data_->cancellable);
 774 	_data_->cancellable = _tmp4_;
 775 	tracker_result_store_load_operation_co (_data_);
 776 }
 777 
 778 
 779 static void tracker_result_store_load_operation_finish (TrackerResultStore* self, GAsyncResult* _res_) {
 780 	TrackerResultStoreLoadOperationData* _data_;
variable '_data_' set but not used
(emitted by gcc)
781 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
Value stored to '_data_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

782 } 783 784 785 static void tracker_result_store_load_operation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 786 TrackerResultStoreLoadOperationData* _data_; 787 _data_ = _user_data_; 788 _data_->_source_object_ = source_object; 789 _data_->_res_ = _res_; 790 tracker_result_store_load_operation_co (_data_); 791 } 792 793 794 static gboolean tracker_result_store_load_operation_co (TrackerResultStoreLoadOperationData* _data_) { 795 switch (_data_->_state_) { 796 case 0: 797 goto _state_0; 798 case 1: 799 goto _state_1; 800 case 2: 801 goto _state_2; 802 default: 803 g_assert_not_reached (); 804 } 805 _state_0: 806 _data_->cursor = NULL; 807 { 808 _data_->_tmp0_ = _data_->cancellable; 809 g_cancellable_set_error_if_cancelled (_data_->_tmp0_, &_data_->_inner_error_); 810 if (_data_->_inner_error_ != NULL) { 811 if (_data_->_inner_error_->domain == G_IO_ERROR) { 812 goto __catch6_g_io_error; 813 } 814 _g_object_unref0 (_data_->cursor); 815 _tracker_query_unref0 (_data_->query); 816 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 817 g_clear_error (&_data_->_inner_error_); 818 return FALSE; 819 } 820 _data_->_tmp1_ = tracker_query_new (); 821 _tracker_query_unref0 (_data_->query); 822 _data_->query = _data_->_tmp1_; 823 _data_->_tmp2_ = _data_->query; 824 _data_->_tmp3_ = _data_->self->priv->_search_term; 825 tracker_query_set_criteria (_data_->_tmp2_, _data_->_tmp3_); 826 _data_->_tmp4_ = _data_->query; 827 _data_->_tmp5_ = _data_->self->priv->_search_tags; 828 tracker_query_set_tags (_data_->_tmp4_, _data_->_tmp5_); 829 _data_->_tmp6_ = _data_->query; 830 _data_->_tmp7_ = _data_->self->priv->_limit; 831 tracker_query_set_limit (_data_->_tmp6_, _data_->_tmp7_); 832 _data_->_tmp8_ = _data_->query; 833 _data_->_tmp9_ = _data_->op; 834 _data_->_tmp10_ = _data_->_tmp9_->offset; 835 tracker_query_set_offset (_data_->_tmp8_, (guint) _data_->_tmp10_); 836 _data_->_tmp11_ = _data_->query; 837 _data_->_tmp12_ = _data_->op; 838 _data_->_tmp13_ = _data_->_tmp12_->node; 839 _data_->_tmp14_ = _data_->_tmp13_->query; 840 _data_->_tmp15_ = (*_data_->_tmp14_).type; 841 _data_->_tmp16_ = _data_->op; 842 _data_->_tmp17_ = _data_->_tmp16_->node; 843 _data_->_tmp18_ = _data_->_tmp17_->query; 844 _data_->_tmp19_ = (*_data_->_tmp18_).match; 845 _data_->_tmp20_ = _data_->op; 846 _data_->_tmp21_ = _data_->_tmp20_->node; 847 _data_->_tmp22_ = _data_->_tmp21_->query; 848 _data_->_tmp23_ = (*_data_->_tmp22_).args; 849 _data_->_tmp23__length1 = (*_data_->_tmp22_).args_length1; 850 _data_->_tmp24_ = _data_->cancellable; 851 _data_->_state_ = 1; 852 tracker_query_perform_async (_data_->_tmp11_, _data_->_tmp15_, _data_->_tmp19_, _data_->_tmp23_, _data_->_tmp23__length1, _data_->_tmp24_, tracker_result_store_load_operation_ready, _data_); 853 return FALSE; 854 _state_1: 855 _data_->_tmp25_ = NULL; 856 _data_->_tmp25_ = tracker_query_perform_finish (_data_->_tmp11_, _data_->_res_, &_data_->_inner_error_); 857 _data_->_tmp26_ = _data_->_tmp25_; 858 if (_data_->_inner_error_ != NULL) { 859 if (_data_->_inner_error_->domain == G_IO_ERROR) { 860 goto __catch6_g_io_error; 861 } 862 _g_object_unref0 (_data_->cursor); 863 _tracker_query_unref0 (_data_->query); 864 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 865 g_clear_error (&_data_->_inner_error_); 866 return FALSE; 867 } 868 _g_object_unref0 (_data_->cursor); 869 _data_->cursor = _data_->_tmp26_; 870 _data_->_tmp27_ = _data_->cancellable; 871 g_cancellable_set_error_if_cancelled (_data_->_tmp27_, &_data_->_inner_error_); 872 if (_data_->_inner_error_ != NULL) { 873 if (_data_->_inner_error_->domain == G_IO_ERROR) { 874 goto __catch6_g_io_error; 875 } 876 _g_object_unref0 (_data_->cursor); 877 _tracker_query_unref0 (_data_->query); 878 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 879 g_clear_error (&_data_->_inner_error_); 880 return FALSE; 881 } 882 _data_->_tmp28_ = _data_->cursor; 883 if (_data_->_tmp28_ != NULL) { 884 { 885 _data_->_tmp29_ = _data_->op; 886 _data_->_tmp30_ = _data_->_tmp29_->offset; 887 _data_->i = _data_->_tmp30_; 888 _data_->_tmp31_ = TRUE; 889 while (TRUE) { 890 _data_->_tmp32_ = _data_->_tmp31_; 891 if (!_data_->_tmp32_) { 892 _data_->_tmp33_ = _data_->i; 893 _data_->i = _data_->_tmp33_ + 1; 894 } 895 _data_->_tmp31_ = FALSE; 896 _data_->_tmp34_ = _data_->i; 897 _data_->_tmp35_ = _data_->op; 898 _data_->_tmp36_ = _data_->_tmp35_->offset; 899 if (!(_data_->_tmp34_ < (_data_->_tmp36_ + 100))) { 900 break; 901 } 902 _data_->b = FALSE; 903 { 904 _data_->_tmp37_ = _data_->cursor; 905 _data_->_tmp38_ = _data_->cancellable; 906 _data_->_state_ = 2; 907 tracker_sparql_cursor_next_async (_data_->_tmp37_, _data_->_tmp38_, tracker_result_store_load_operation_ready, _data_); 908 return FALSE; 909 _state_2: 910 _data_->_tmp39_ = FALSE; 911 _data_->_tmp39_ = tracker_sparql_cursor_next_finish (_data_->_tmp37_, _data_->_res_, &_data_->_inner_error_); 912 _data_->_tmp40_ = _data_->_tmp39_; 913 if (_data_->_inner_error_ != NULL) { 914 goto __catch7_g_error; 915 } 916 _data_->b = _data_->_tmp40_; 917 } 918 goto __finally7; 919 __catch7_g_error: 920 { 921 _data_->ge = _data_->_inner_error_; 922 _data_->_inner_error_ = NULL; 923 _data_->_tmp41_ = _data_->cancellable; 924 _data_->_tmp42_ = FALSE; 925 _data_->_tmp42_ = g_cancellable_is_cancelled (_data_->_tmp41_); 926 if (!_data_->_tmp42_) { 927 _data_->_tmp43_ = _data_->ge; 928 _data_->_tmp44_ = _data_->_tmp43_->message; 929 g_warning ("tracker-result-store.vala:117: Could not fetch row: %s\n", _data_->_tmp44_); 930 } 931 _g_error_free0 (_data_->ge); 932 } 933 __finally7: 934 if (_data_->_inner_error_ != NULL) { 935 _gtk_tree_path_free0 (_data_->path); 936 if (_data_->_inner_error_->domain == G_IO_ERROR) { 937 goto __catch6_g_io_error; 938 } 939 _gtk_tree_path_free0 (_data_->path); 940 _g_object_unref0 (_data_->cursor); 941 _tracker_query_unref0 (_data_->query); 942 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 943 g_clear_error (&_data_->_inner_error_); 944 return FALSE; 945 } 946 _data_->_tmp45_ = _data_->b; 947 if (!_data_->_tmp45_) { 948 _gtk_tree_path_free0 (_data_->path); 949 break; 950 } 951 _data_->_tmp46_ = _data_->op; 952 _data_->_tmp47_ = _data_->_tmp46_->node; 953 _data_->_tmp48_ = _data_->_tmp47_->results; 954 _data_->_tmp48__length1 = _data_->_tmp47_->results_length1; 955 _data_->_tmp49_ = _data_->i; 956 _data_->_result_ = &_data_->_tmp48_[_data_->_tmp49_]; 957 { 958 _data_->j = 0; 959 _data_->_tmp50_ = TRUE; 960 while (TRUE) { 961 _data_->_tmp51_ = _data_->_tmp50_; 962 if (!_data_->_tmp51_) { 963 _data_->_tmp52_ = _data_->j; 964 _data_->j = _data_->_tmp52_ + 1; 965 } 966 _data_->_tmp50_ = FALSE; 967 _data_->_tmp53_ = _data_->j; 968 _data_->_tmp54_ = _data_->self->priv->n_columns; 969 if (!(_data_->_tmp53_ < _data_->_tmp54_)) { 970 break; 971 } 972 _data_->_tmp55_ = _data_->j; 973 _data_->_tmp56_ = _data_->self->priv->n_columns; 974 if (_data_->_tmp55_ == (_data_->_tmp56_ - 1)) { 975 _data_->_tmp57_ = _data_->cursor; 976 _data_->_tmp58_ = _data_->j; 977 _data_->_tmp59_ = NULL; 978 _data_->_tmp59_ = tracker_sparql_cursor_get_string (_data_->_tmp57_, _data_->_tmp58_, NULL); 979 _data_->_tmp60_ = g_strdup (_data_->_tmp59_); 980 _data_->s = _data_->_tmp60_; 981 _data_->_tmp61_ = _data_->s; 982 if (_data_->_tmp61_ != NULL) { 983 _data_->_tmp62_ = _data_->_result_; 984 _data_->_tmp63_ = (*_data_->_tmp62_).values; 985 _data_->_tmp63__length1 = (*_data_->_tmp62_).values_length1; 986 _data_->_tmp64_ = _data_->j; 987 _data_->_tmp65_ = _data_->s; 988 _data_->_tmp66_ = NULL; 989 _data_->_tmp66_ = g_markup_escape_text (_data_->_tmp65_, (gssize) (-1)); 990 _g_free0 (_data_->_tmp63_[_data_->_tmp64_]); 991 _data_->_tmp63_[_data_->_tmp64_] = _data_->_tmp66_; 992 _data_->_tmp67_ = _data_->_tmp63_[_data_->_tmp64_]; 993 } else { 994 _data_->_tmp68_ = _data_->_result_; 995 _data_->_tmp69_ = (*_data_->_tmp68_).values; 996 _data_->_tmp69__length1 = (*_data_->_tmp68_).values_length1; 997 _data_->_tmp70_ = _data_->j; 998 _g_free0 (_data_->_tmp69_[_data_->_tmp70_]); 999 _data_->_tmp69_[_data_->_tmp70_] = NULL; 1000 _data_->_tmp71_ = _data_->_tmp69_[_data_->_tmp70_]; 1001 } 1002 _g_free0 (_data_->s); 1003 } else { 1004 _data_->_tmp72_ = _data_->_result_; 1005 _data_->_tmp73_ = (*_data_->_tmp72_).values; 1006 _data_->_tmp73__length1 = (*_data_->_tmp72_).values_length1; 1007 _data_->_tmp74_ = _data_->j; 1008 _data_->_tmp75_ = _data_->cursor; 1009 _data_->_tmp76_ = _data_->j; 1010 _data_->_tmp77_ = NULL; 1011 _data_->_tmp77_ = tracker_sparql_cursor_get_string (_data_->_tmp75_, _data_->_tmp76_, NULL); 1012 _data_->_tmp78_ = g_strdup (_data_->_tmp77_); 1013 _g_free0 (_data_->_tmp73_[_data_->_tmp74_]); 1014 _data_->_tmp73_[_data_->_tmp74_] = _data_->_tmp78_; 1015 _data_->_tmp79_ = _data_->_tmp73_[_data_->_tmp74_]; 1016 } 1017 } 1018 } 1019 memset (&_data_->iter, 0, sizeof (GtkTreeIter)); 1020 _data_->_tmp80_ = _data_->self->priv->timestamp; 1021 _data_->iter.stamp = _data_->_tmp80_; 1022 _data_->_tmp81_ = _data_->op; 1023 _data_->_tmp82_ = _data_->_tmp81_->node; 1024 _data_->iter.user_data = _data_->_tmp82_; 1025 _data_->_tmp83_ = _data_->_result_; 1026 _data_->iter.user_data2 = _data_->_tmp83_; 1027 _data_->_tmp84_ = _data_->i; 1028 _data_->_tmp85_ = NULL; 1029 _data_->_tmp85_ = GINT_TO_POINTER (_data_->_tmp84_); 1030 _data_->iter.user_data3 = _data_->_tmp85_; 1031 _data_->_tmp86_ = _data_->iter; 1032 _data_->_tmp87_ = NULL; 1033 _data_->_tmp87_ = gtk_tree_model_get_path ((GtkTreeModel*) _data_->self, &_data_->_tmp86_); 1034 _gtk_tree_path_free0 (_data_->path); 1035 _data_->path = _data_->_tmp87_; 1036 _data_->_tmp88_ = _data_->path; 1037 _data_->_tmp89_ = _data_->iter; 1038 gtk_tree_model_row_changed ((GtkTreeModel*) _data_->self, _data_->_tmp88_, &_data_->_tmp89_); 1039 _gtk_tree_path_free0 (_data_->path); 1040 } 1041 } 1042 } 1043 _data_->_tmp90_ = _data_->self->priv->running_operations; 1044 _data_->_tmp91_ = _data_->op; 1045 g_ptr_array_remove (_data_->_tmp90_, _data_->_tmp91_); 1046 } 1047 goto __finally6; 1048 __catch6_g_io_error: 1049 { 1050 _data_->ie = _data_->_inner_error_; 1051 _data_->_inner_error_ = NULL; 1052 _data_->_tmp92_ = _data_->cancellable; 1053 _data_->_tmp93_ = FALSE; 1054 _data_->_tmp93_ = g_cancellable_is_cancelled (_data_->_tmp92_); 1055 if (!_data_->_tmp93_) { 1056 _data_->_tmp94_ = _data_->ie; 1057 _data_->_tmp95_ = _data_->_tmp94_->message; 1058 g_warning ("tracker-result-store.vala:156: Could not load items: %s\n", _data_->_tmp95_); 1059 } 1060 _g_error_free0 (_data_->ie); 1061 _g_object_unref0 (_data_->cursor); 1062 _tracker_query_unref0 (_data_->query); 1063 if (_data_->_state_ == 0) { 1064 g_simple_async_result_complete_in_idle (_data_->_async_result); 1065 } else { 1066 g_simple_async_result_complete (_data_->_async_result); 1067 } 1068 g_object_unref (_data_->_async_result); 1069 return FALSE; 1070 } 1071 __finally6: 1072 if (_data_->_inner_error_ != NULL) { 1073 _g_object_unref0 (_data_->cursor); 1074 _tracker_query_unref0 (_data_->query); 1075 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 1076 g_clear_error (&_data_->_inner_error_); 1077 return FALSE; 1078 } 1079 _data_->_tmp96_ = _data_->self->priv->delayed_operations; 1080 _data_->_tmp97_ = g_ptr_array_get_length (_data_->_tmp96_); 1081 _data_->_tmp98_ = _data_->_tmp97_; 1082 if (_data_->_tmp98_ > 0) { 1083 _data_->_tmp99_ = _data_->self->priv->delayed_operations; 1084 _data_->_tmp100_ = _data_->self->priv->delayed_operations; 1085 _data_->_tmp101_ = g_ptr_array_get_length (_data_->_tmp100_); 1086 _data_->_tmp102_ = _data_->_tmp101_; 1087 _data_->_tmp103_ = NULL; 1088 _data_->_tmp103_ = g_ptr_array_index (_data_->_tmp99_, (guint) (_data_->_tmp102_ - 1)); 1089 _data_->_tmp104_ = _g_object_ref0 ((TrackerResultStoreOperation*) _data_->_tmp103_); 1090 _g_object_unref0 (_data_->next_to_start); 1091 _data_->next_to_start = _data_->_tmp104_; 1092 _data_->_tmp105_ = _data_->self->priv->delayed_operations; 1093 _data_->_tmp106_ = _data_->next_to_start; 1094 g_ptr_array_remove (_data_->_tmp105_, _data_->_tmp106_); 1095 _data_->_tmp107_ = _data_->self->priv->running_operations; 1096 _data_->_tmp108_ = _data_->next_to_start; 1097 _data_->_tmp109_ = _g_object_ref0 (_data_->_tmp108_); 1098 g_ptr_array_add (_data_->_tmp107_, _data_->_tmp109_); 1099 _data_->_tmp110_ = _data_->next_to_start; 1100 _data_->_tmp111_ = _data_->cancellable; 1101 tracker_result_store_load_operation (_data_->self, _data_->_tmp110_, _data_->_tmp111_, NULL, NULL); 1102 _g_object_unref0 (_data_->next_to_start); 1103 } else { 1104 _data_->_tmp112_ = _data_->self->priv->running_operations; 1105 _data_->_tmp113_ = g_ptr_array_get_length (_data_->_tmp112_); 1106 _data_->_tmp114_ = _data_->_tmp113_; 1107 if (_data_->_tmp114_ == 0) { 1108 tracker_result_store_set_active (_data_->self, FALSE); 1109 } 1110 } 1111 _g_object_unref0 (_data_->cursor); 1112 _tracker_query_unref0 (_data_->query); 1113 if (_data_->_state_ == 0) { 1114 g_simple_async_result_complete_in_idle (_data_->_async_result); 1115 } else { 1116 g_simple_async_result_complete (_data_->_async_result); 1117 } 1118 g_object_unref (_data_->_async_result); 1119 return FALSE; 1120 } 1121 1122 1123 static gpointer _tracker_result_store_category_node_ref0 (gpointer self) { 1124 return self ? tracker_result_store_category_node_ref (self) : NULL; 1125 } 1126 1127 1128 static void tracker_result_store_add_operation (TrackerResultStore* self, TrackerResultStoreCategoryNode* cat, gint offset) { 1129 TrackerResultStoreOperation* _tmp0_; 1130 TrackerResultStoreOperation* op; 1131 TrackerResultStoreOperation* old = NULL; 1132 TrackerResultStoreOperation* _tmp1_; 1133 TrackerResultStoreCategoryNode* _tmp2_; 1134 TrackerResultStoreCategoryNode* _tmp3_; 1135 TrackerResultStoreOperation* _tmp4_; 1136 gint _tmp5_; 1137 GPtrArray* _tmp6_; 1138 TrackerResultStoreCategoryNode* _tmp7_; 1139 gint _tmp8_; 1140 TrackerResultStoreOperation* _tmp9_ = NULL; 1141 TrackerResultStoreOperation* _tmp10_; 1142 gboolean _tmp11_; 1143 GPtrArray* _tmp12_; 1144 TrackerResultStoreCategoryNode* _tmp13_; 1145 gint _tmp14_; 1146 TrackerResultStoreOperation* _tmp15_ = NULL; 1147 TrackerResultStoreOperation* _tmp16_; 1148 GPtrArray* _tmp19_; 1149 gint _tmp20_; 1150 gint _tmp21_; 1151 g_return_if_fail (self != NULL); 1152 g_return_if_fail (cat != NULL); 1153 _tmp0_ = tracker_result_store_operation_new (); 1154 op = _tmp0_; 1155 _tmp1_ = op; 1156 _tmp2_ = cat; 1157 _tmp3_ = _tracker_result_store_category_node_ref0 (_tmp2_); 1158 _tracker_result_store_category_node_unref0 (_tmp1_->node); 1159 _tmp1_->node = _tmp3_; 1160 _tmp4_ = op; 1161 _tmp5_ = offset; 1162 _tmp4_->offset = _tmp5_; 1163 _tmp6_ = self->priv->running_operations; 1164 _tmp7_ = cat; 1165 _tmp8_ = offset; 1166 _tmp9_ = tracker_result_store_find_operation (self, _tmp6_, _tmp7_, _tmp8_); 1167 _tmp10_ = _tmp9_; 1168 _tmp11_ = _tmp10_ != NULL; 1169 _g_object_unref0 (_tmp10_); 1170 if (_tmp11_) { 1171 _g_object_unref0 (old); 1172 _g_object_unref0 (op); 1173 return; 1174 } 1175 _tmp12_ = self->priv->delayed_operations; 1176 _tmp13_ = cat; 1177 _tmp14_ = offset; 1178 _tmp15_ = tracker_result_store_find_operation (self, _tmp12_, _tmp13_, _tmp14_); 1179 _g_object_unref0 (old); 1180 old = _tmp15_; 1181 _tmp16_ = old; 1182 if (_tmp16_ != NULL) { 1183 GPtrArray* _tmp17_; 1184 TrackerResultStoreOperation* _tmp18_; 1185 _tmp17_ = self->priv->delayed_operations; 1186 _tmp18_ = old; 1187 g_ptr_array_remove (_tmp17_, _tmp18_); 1188 } 1189 tracker_result_store_set_active (self, TRUE); 1190 _tmp19_ = self->priv->running_operations; 1191 _tmp20_ = g_ptr_array_get_length (_tmp19_); 1192 _tmp21_ = _tmp20_; 1193 if (_tmp21_ < 2) { 1194 GPtrArray* _tmp22_; 1195 TrackerResultStoreOperation* _tmp23_; 1196 TrackerResultStoreOperation* _tmp24_; 1197 TrackerResultStoreOperation* _tmp25_; 1198 GCancellable* _tmp26_; 1199 _tmp22_ = self->priv->running_operations; 1200 _tmp23_ = op; 1201 _tmp24_ = _g_object_ref0 (_tmp23_); 1202 g_ptr_array_add (_tmp22_, _tmp24_); 1203 _tmp25_ = op; 1204 _tmp26_ = self->priv->cancellable; 1205 tracker_result_store_load_operation (self, _tmp25_, _tmp26_, NULL, NULL); 1206 } else { 1207 GPtrArray* _tmp27_; 1208 TrackerResultStoreOperation* _tmp28_; 1209 TrackerResultStoreOperation* _tmp29_; 1210 _tmp27_ = self->priv->delayed_operations; 1211 _tmp28_ = op; 1212 _tmp29_ = _g_object_ref0 (_tmp28_); 1213 g_ptr_array_add (_tmp27_, _tmp29_); 1214 } 1215 _g_object_unref0 (old); 1216 _g_object_unref0 (op); 1217 } 1218 1219 1220 static void tracker_result_store_load_category_data_free (gpointer _data) { 1221 TrackerResultStoreLoadCategoryData* _data_; 1222 _data_ = _data; 1223 _g_object_unref0 (_data_->cancellable); 1224 _g_object_unref0 (_data_->self); 1225 g_slice_free (TrackerResultStoreLoadCategoryData, _data_); 1226 } 1227 1228 1229 static void tracker_result_store_load_category (TrackerResultStore* self, TrackerResultStoreQueryData* query_data, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 1230 TrackerResultStoreLoadCategoryData* _data_; 1231 TrackerResultStore* _tmp0_; 1232 TrackerResultStoreQueryData* _tmp1_; 1233 GCancellable* _tmp2_; 1234 GCancellable* _tmp3_; 1235 _data_ = g_slice_new0 (TrackerResultStoreLoadCategoryData); 1236 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_result_store_load_category); 1237 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_result_store_load_category_data_free); 1238 _tmp0_ = _g_object_ref0 (self); 1239 _data_->self = _tmp0_; 1240 _tmp1_ = query_data; 1241 _data_->query_data = _tmp1_; 1242 _tmp2_ = cancellable; 1243 _tmp3_ = _g_object_ref0 (_tmp2_); 1244 _g_object_unref0 (_data_->cancellable); 1245 _data_->cancellable = _tmp3_; 1246 tracker_result_store_load_category_co (_data_); 1247 } 1248 1249 1250 static void tracker_result_store_load_category_finish (TrackerResultStore* self, GAsyncResult* _res_) { 1251 TrackerResultStoreLoadCategoryData* _data_;
variable '_data_' set but not used
(emitted by gcc)
1252 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
Value stored to '_data_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1253 } 1254 1255 1256 static void tracker_result_store_load_category_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 1257 TrackerResultStoreLoadCategoryData* _data_; 1258 _data_ = _user_data_; 1259 _data_->_source_object_ = source_object; 1260 _data_->_res_ = _res_; 1261 tracker_result_store_load_category_co (_data_); 1262 } 1263 1264 1265 static gboolean tracker_result_store_load_category_co (TrackerResultStoreLoadCategoryData* _data_) { 1266 switch (_data_->_state_) { 1267 case 0: 1268 goto _state_0; 1269 case 1: 1270 goto _state_1; 1271 default: 1272 g_assert_not_reached (); 1273 } 1274 _state_0: 1275 _data_->count = (guint) 0; 1276 { 1277 _data_->_tmp0_ = _data_->cancellable; 1278 g_cancellable_set_error_if_cancelled (_data_->_tmp0_, &_data_->_inner_error_); 1279 if (_data_->_inner_error_ != NULL) { 1280 if (_data_->_inner_error_->domain == G_IO_ERROR) { 1281 goto __catch8_g_io_error; 1282 } 1283 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 1284 g_clear_error (&_data_->_inner_error_); 1285 return FALSE; 1286 } 1287 _data_->_tmp1_ = tracker_query_new (); 1288 _data_->query = _data_->_tmp1_; 1289 _data_->_tmp2_ = _data_->query; 1290 _data_->_tmp3_ = _data_->self->priv->_search_term; 1291 tracker_query_set_criteria (_data_->_tmp2_, _data_->_tmp3_); 1292 _data_->_tmp4_ = _data_->query; 1293 _data_->_tmp5_ = _data_->self->priv->_search_tags; 1294 tracker_query_set_tags (_data_->_tmp4_, _data_->_tmp5_); 1295 _data_->_tmp6_ = _data_->query; 1296 _data_->_tmp7_ = _data_->query_data; 1297 _data_->_tmp8_ = (*_data_->_tmp7_).type; 1298 _data_->_tmp9_ = _data_->query_data; 1299 _data_->_tmp10_ = (*_data_->_tmp9_).match; 1300 _data_->_tmp11_ = _data_->cancellable; 1301 _data_->_state_ = 1; 1302 tracker_query_get_count_async (_data_->_tmp6_, _data_->_tmp8_, _data_->_tmp10_, _data_->_tmp11_, tracker_result_store_load_category_ready, _data_); 1303 return FALSE; 1304 _state_1: 1305 _data_->_tmp12_ = 0U; 1306 _data_->_tmp12_ = tracker_query_get_count_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_); 1307 _data_->_tmp13_ = _data_->_tmp12_; 1308 if (_data_->_inner_error_ != NULL) { 1309 _tracker_query_unref0 (_data_->query); 1310 if (_data_->_inner_error_->domain == G_IO_ERROR) { 1311 goto __catch8_g_io_error; 1312 } 1313 _tracker_query_unref0 (_data_->query); 1314 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 1315 g_clear_error (&_data_->_inner_error_); 1316 return FALSE; 1317 } 1318 _data_->count = _data_->_tmp13_; 1319 _data_->_tmp14_ = _data_->cancellable; 1320 g_cancellable_set_error_if_cancelled (_data_->_tmp14_, &_data_->_inner_error_); 1321 if (_data_->_inner_error_ != NULL) { 1322 _tracker_query_unref0 (_data_->query); 1323 if (_data_->_inner_error_->domain == G_IO_ERROR) { 1324 goto __catch8_g_io_error; 1325 } 1326 _tracker_query_unref0 (_data_->query); 1327 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 1328 g_clear_error (&_data_->_inner_error_); 1329 return FALSE; 1330 } 1331 _tracker_query_unref0 (_data_->query); 1332 } 1333 goto __finally8; 1334 __catch8_g_io_error: 1335 { 1336 _data_->ie = _data_->_inner_error_; 1337 _data_->_inner_error_ = NULL; 1338 _data_->_tmp15_ = _data_->cancellable; 1339 _data_->_tmp16_ = FALSE; 1340 _data_->_tmp16_ = g_cancellable_is_cancelled (_data_->_tmp15_); 1341 if (!_data_->_tmp16_) { 1342 _data_->_tmp17_ = _data_->ie; 1343 _data_->_tmp18_ = _data_->_tmp17_->message; 1344 g_warning ("tracker-result-store.vala:226: Could not get count: %s\n", _data_->_tmp18_); 1345 } 1346 _g_error_free0 (_data_->ie); 1347 if (_data_->_state_ == 0) { 1348 g_simple_async_result_complete_in_idle (_data_->_async_result); 1349 } else { 1350 g_simple_async_result_complete (_data_->_async_result); 1351 } 1352 g_object_unref (_data_->_async_result); 1353 return FALSE; 1354 } 1355 __finally8: 1356 if (_data_->_inner_error_ != NULL) { 1357 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 1358 g_clear_error (&_data_->_inner_error_); 1359 return FALSE; 1360 } 1361 _data_->_tmp19_ = _data_->count; 1362 if (_data_->_tmp19_ != ((guint) 0)) { 1363 _data_->_tmp20_ = _data_->count; 1364 _data_->_tmp21_ = _data_->self->priv->_limit; 1365 if (_data_->_tmp20_ > _data_->_tmp21_) { 1366 g_signal_emit_by_name (_data_->self, "result-overflow"); 1367 _data_->_tmp22_ = _data_->self->priv->_limit; 1368 _data_->count = _data_->_tmp22_; 1369 } 1370 _data_->_tmp23_ = tracker_result_store_category_node_new (); 1371 _tracker_result_store_category_node_unref0 (_data_->cat); 1372 _data_->cat = _data_->_tmp23_; 1373 _data_->_tmp24_ = _data_->cat; 1374 _data_->_tmp25_ = _data_->query_data; 1375 _data_->_tmp26_ = (*_data_->_tmp25_).type; 1376 _data_->_tmp24_->type = _data_->_tmp26_; 1377 _data_->_tmp27_ = _data_->cat; 1378 _data_->_tmp28_ = _data_->query_data; 1379 _data_->_tmp27_->query = _data_->_tmp28_; 1380 _data_->_tmp29_ = _data_->cat; 1381 _data_->_tmp30_ = _data_->count; 1382 _data_->_tmp31_ = 0; 1383 _data_->_tmp31_ = (gint) _data_->_tmp30_; 1384 _data_->_tmp29_->results = g_renew (TrackerResultStoreResultNode, _data_->_tmp29_->results, (gint) _data_->_tmp30_); 1385 (_data_->_tmp31_ > _data_->_tmp29_->results_length1) ? memset (_data_->_tmp29_->results + _data_->_tmp29_->results_length1, 0, sizeof (TrackerResultStoreResultNode) * (_data_->_tmp31_ - _data_->_tmp29_->results_length1)) : NULL; 1386 _data_->_tmp29_->results_length1 = _data_->_tmp31_; 1387 _data_->_tmp29_->_results_size_ = _data_->_tmp31_; 1388 _data_->_tmp32_ = _data_->self->priv->categories; 1389 _data_->_tmp33_ = _data_->cat; 1390 _data_->_tmp34_ = _tracker_result_store_category_node_ref0 (_data_->_tmp33_); 1391 g_ptr_array_add (_data_->_tmp32_, _data_->_tmp34_); 1392 memset (&_data_->iter, 0, sizeof (GtkTreeIter)); 1393 _data_->_tmp35_ = _data_->self->priv->timestamp; 1394 _data_->iter.stamp = _data_->_tmp35_; 1395 _data_->_tmp36_ = _data_->cat; 1396 _data_->iter.user_data = _data_->_tmp36_; 1397 _data_->_tmp37_ = _data_->self->priv->queries; 1398 _data_->_tmp37__length1 = _data_->self->priv->queries_length1; 1399 if (_data_->_tmp37__length1 > 1) { 1400 _data_->_tmp38_ = _data_->iter; 1401 _data_->_tmp39_ = NULL; 1402 _data_->_tmp39_ = gtk_tree_model_get_path ((GtkTreeModel*) _data_->self, &_data_->_tmp38_); 1403 _gtk_tree_path_free0 (_data_->path); 1404 _data_->path = _data_->_tmp39_; 1405 _data_->_tmp40_ = _data_->path; 1406 _data_->_tmp41_ = _data_->iter; 1407 gtk_tree_model_row_inserted ((GtkTreeModel*) _data_->self, _data_->_tmp40_, &_data_->_tmp41_); 1408 } 1409 { 1410 _data_->i = 0; 1411 _data_->_tmp42_ = TRUE; 1412 while (TRUE) { 1413 _data_->_tmp43_ = _data_->_tmp42_; 1414 if (!_data_->_tmp43_) { 1415 _data_->_tmp44_ = _data_->i; 1416 _data_->i = _data_->_tmp44_ + 1; 1417 } 1418 _data_->_tmp42_ = FALSE; 1419 _data_->_tmp45_ = _data_->i; 1420 _data_->_tmp46_ = _data_->count; 1421 if (!(((guint) _data_->_tmp45_) < _data_->_tmp46_)) { 1422 break; 1423 } 1424 _data_->_tmp47_ = _data_->cat; 1425 _data_->_tmp48_ = _data_->_tmp47_->results; 1426 _data_->_tmp48__length1 = _data_->_tmp47_->results_length1; 1427 _data_->_tmp49_ = _data_->i; 1428 _data_->res = &_data_->_tmp48_[_data_->_tmp49_]; 1429 _data_->_tmp50_ = _data_->res; 1430 _data_->_tmp51_ = _data_->self->priv->n_columns; 1431 _data_->_tmp52_ = NULL; 1432 _data_->_tmp52_ = g_new0 (gchar*, _data_->_tmp51_ + 1); 1433 (*_data_->_tmp50_).values = (_vala_array_free ((*_data_->_tmp50_).values, (*_data_->_tmp50_).values_length1, (GDestroyNotify) g_free), NULL); 1434 (*_data_->_tmp50_).values = _data_->_tmp52_; 1435 (*_data_->_tmp50_).values_length1 = _data_->_tmp51_; 1436 (*_data_->_tmp50_)._values_size_ = (*_data_->_tmp50_).values_length1; 1437 _data_->_tmp53_ = _data_->res; 1438 _data_->iter.user_data2 = _data_->_tmp53_; 1439 _data_->_tmp54_ = _data_->i; 1440 _data_->_tmp55_ = NULL; 1441 _data_->_tmp55_ = GINT_TO_POINTER (_data_->_tmp54_); 1442 _data_->iter.user_data3 = _data_->_tmp55_; 1443 _data_->_tmp56_ = _data_->iter; 1444 _data_->_tmp57_ = NULL; 1445 _data_->_tmp57_ = gtk_tree_model_get_path ((GtkTreeModel*) _data_->self, &_data_->_tmp56_); 1446 _gtk_tree_path_free0 (_data_->path); 1447 _data_->path = _data_->_tmp57_; 1448 _data_->_tmp58_ = _data_->cat; 1449 _data_->_tmp59_ = _data_->_tmp58_->count; 1450 _data_->_tmp58_->count = _data_->_tmp59_ + 1; 1451 _data_->_tmp60_ = _data_->path; 1452 _data_->_tmp61_ = _data_->iter; 1453 gtk_tree_model_row_inserted ((GtkTreeModel*) _data_->self, _data_->_tmp60_, &_data_->_tmp61_); 1454 } 1455 } 1456 _data_->_tmp62_ = _data_->self->priv->queries; 1457 _data_->_tmp62__length1 = _data_->self->priv->queries_length1; 1458 if (_data_->_tmp62__length1 > 1) { 1459 _data_->iter.user_data2 = NULL; 1460 _data_->iter.user_data3 = NULL; 1461 _data_->_tmp63_ = _data_->iter; 1462 _data_->_tmp64_ = NULL; 1463 _data_->_tmp64_ = gtk_tree_model_get_path ((GtkTreeModel*) _data_->self, &_data_->_tmp63_); 1464 _gtk_tree_path_free0 (_data_->path); 1465 _data_->path = _data_->_tmp64_; 1466 _data_->_tmp65_ = _data_->path; 1467 _data_->_tmp66_ = _data_->iter; 1468 gtk_tree_model_row_changed ((GtkTreeModel*) _data_->self, _data_->_tmp65_, &_data_->_tmp66_); 1469 } 1470 _gtk_tree_path_free0 (_data_->path); 1471 _tracker_result_store_category_node_unref0 (_data_->cat); 1472 } 1473 _data_->_tmp67_ = _data_->self->priv->running_operations; 1474 _data_->_tmp68_ = g_ptr_array_get_length (_data_->_tmp67_); 1475 _data_->_tmp69_ = _data_->_tmp68_; 1476 if (_data_->_tmp69_ == 0) { 1477 tracker_result_store_set_active (_data_->self, FALSE); 1478 } 1479 if (_data_->_state_ == 0) { 1480 g_simple_async_result_complete_in_idle (_data_->_async_result); 1481 } else { 1482 g_simple_async_result_complete (_data_->_async_result); 1483 } 1484 g_object_unref (_data_->_async_result); 1485 return FALSE; 1486 } 1487 1488 1489 static void tracker_result_store_clear_results (TrackerResultStore* self) { 1490 gint j = 0; 1491 g_return_if_fail (self != NULL); 1492 while (TRUE) { 1493 GPtrArray* _tmp0_; 1494 gint _tmp1_; 1495 gint _tmp2_; 1496 GPtrArray* _tmp3_; 1497 gconstpointer _tmp4_ = NULL; 1498 TrackerResultStoreCategoryNode* _tmp5_; 1499 TrackerResultStoreCategoryNode* cat; 1500 GtkTreeIter iter = {0}; 1501 GtkTreePath* path = NULL; 1502 TrackerResultStoreCategoryNode* _tmp6_; 1503 TrackerResultStoreResultNode* _tmp7_; 1504 gint _tmp7__length1; 1505 gint _tmp8_; 1506 TrackerResultStoreCategoryNode* _tmp9_; 1507 TrackerResultStoreQueryData* _tmp26_; 1508 gint _tmp26__length1; 1509 GPtrArray* _tmp30_; 1510 TrackerResultStoreCategoryNode* _tmp31_; 1511 _tmp0_ = self->priv->categories; 1512 _tmp1_ = g_ptr_array_get_length (_tmp0_); 1513 _tmp2_ = _tmp1_; 1514 if (!(_tmp2_ > 0)) { 1515 break; 1516 } 1517 _tmp3_ = self->priv->categories; 1518 _tmp4_ = g_ptr_array_index (_tmp3_, (guint) 0); 1519 _tmp5_ = _tracker_result_store_category_node_ref0 ((TrackerResultStoreCategoryNode*) _tmp4_); 1520 cat = _tmp5_; 1521 _tmp6_ = cat; 1522 _tmp7_ = _tmp6_->results;
Value stored to '_tmp7_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1523 _tmp7__length1 = _tmp6_->results_length1; 1524 if (_tmp7__length1 == 0) { 1525 _gtk_tree_path_free0 (path); 1526 _tracker_result_store_category_node_unref0 (cat); 1527 continue; 1528 } 1529 memset (&iter, 0, sizeof (GtkTreeIter)); 1530 _tmp8_ = self->priv->timestamp; 1531 iter.stamp = _tmp8_; 1532 _tmp9_ = cat; 1533 iter.user_data = _tmp9_; 1534 { 1535 TrackerResultStoreCategoryNode* _tmp10_; 1536 gint _tmp11_; 1537 gboolean _tmp12_; 1538 _tmp10_ = cat; 1539 _tmp11_ = _tmp10_->count; 1540 j = _tmp11_ - 1; 1541 _tmp12_ = TRUE; 1542 while (TRUE) { 1543 gboolean _tmp13_; 1544 gint _tmp15_; 1545 TrackerResultStoreCategoryNode* _tmp16_; 1546 TrackerResultStoreResultNode* _tmp17_; 1547 gint _tmp17__length1;
variable '_tmp17__length1' set but not used
(emitted by gcc)
1548 gint _tmp18_; 1549 gint _tmp19_; 1550 void* _tmp20_ = NULL; 1551 GtkTreeIter _tmp21_; 1552 GtkTreePath* _tmp22_ = NULL; 1553 GtkTreePath* _tmp23_; 1554 TrackerResultStoreCategoryNode* _tmp24_; 1555 gint _tmp25_; 1556 _tmp13_ = _tmp12_; 1557 if (!_tmp13_) { 1558 gint _tmp14_; 1559 _tmp14_ = j; 1560 j = _tmp14_ - 1; 1561 } 1562 _tmp12_ = FALSE; 1563 _tmp15_ = j; 1564 if (!(_tmp15_ >= 0)) { 1565 break; 1566 } 1567 _tmp16_ = cat; 1568 _tmp17_ = _tmp16_->results; 1569 _tmp17__length1 = _tmp16_->results_length1;
Value stored to '_tmp17__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1570 _tmp18_ = j; 1571 iter.user_data2 = &_tmp17_[_tmp18_]; 1572 _tmp19_ = j; 1573 _tmp20_ = GINT_TO_POINTER (_tmp19_); 1574 iter.user_data3 = _tmp20_; 1575 _tmp21_ = iter; 1576 _tmp22_ = gtk_tree_model_get_path ((GtkTreeModel*) self, &_tmp21_); 1577 _gtk_tree_path_free0 (path); 1578 path = _tmp22_; 1579 _tmp23_ = path; 1580 gtk_tree_model_row_deleted ((GtkTreeModel*) self, _tmp23_); 1581 _tmp24_ = cat; 1582 _tmp25_ = _tmp24_->count; 1583 _tmp24_->count = _tmp25_ - 1; 1584 } 1585 } 1586 _tmp26_ = self->priv->queries;
Value stored to '_tmp26_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1587 _tmp26__length1 = self->priv->queries_length1; 1588 if (_tmp26__length1 > 1) { 1589 GtkTreeIter _tmp27_; 1590 GtkTreePath* _tmp28_ = NULL; 1591 GtkTreePath* _tmp29_; 1592 iter.user_data2 = NULL; 1593 iter.user_data3 = NULL; 1594 _tmp27_ = iter; 1595 _tmp28_ = gtk_tree_model_get_path ((GtkTreeModel*) self, &_tmp27_); 1596 _gtk_tree_path_free0 (path); 1597 path = _tmp28_; 1598 _tmp29_ = path; 1599 gtk_tree_model_row_deleted ((GtkTreeModel*) self, _tmp29_); 1600 } 1601 _tmp30_ = self->priv->categories; 1602 _tmp31_ = cat; 1603 g_ptr_array_remove (_tmp30_, _tmp31_); 1604 _gtk_tree_path_free0 (path); 1605 _tracker_result_store_category_node_unref0 (cat); 1606 } 1607 } 1608 1609 1610 static gint tracker_result_store_find_nth_category_index (TrackerResultStore* self, TrackerResultStoreCategoryNode* node, gint n) { 1611 gint result = 0; 1612 gint i = 0; 1613 TrackerResultStoreCategoryNode* _tmp0_; 1614 g_return_val_if_fail (self != NULL, 0); 1615 _tmp0_ = node; 1616 if (_tmp0_ == NULL) { 1617 gint _tmp1_; 1618 _tmp1_ = n; 1619 result = _tmp1_; 1620 return result; 1621 } 1622 { 1623 gboolean _tmp2_; 1624 i = 0; 1625 _tmp2_ = TRUE; 1626 while (TRUE) { 1627 gboolean _tmp3_; 1628 gint _tmp5_; 1629 GPtrArray* _tmp6_; 1630 gint _tmp7_; 1631 gint _tmp8_; 1632 TrackerResultStoreCategoryNode* cat = NULL; 1633 GPtrArray* _tmp9_; 1634 gint _tmp10_; 1635 gconstpointer _tmp11_ = NULL; 1636 TrackerResultStoreCategoryNode* _tmp12_; 1637 TrackerResultStoreCategoryNode* _tmp13_; 1638 TrackerResultStoreCategoryNode* _tmp14_; 1639 _tmp3_ = _tmp2_; 1640 if (!_tmp3_) { 1641 gint _tmp4_; 1642 _tmp4_ = i; 1643 i = _tmp4_ + 1; 1644 } 1645 _tmp2_ = FALSE; 1646 _tmp5_ = i; 1647 _tmp6_ = self->priv->categories; 1648 _tmp7_ = g_ptr_array_get_length (_tmp6_); 1649 _tmp8_ = _tmp7_; 1650 if (!(_tmp5_ < _tmp8_)) { 1651 break; 1652 } 1653 _tmp9_ = self->priv->categories; 1654 _tmp10_ = i; 1655 _tmp11_ = g_ptr_array_index (_tmp9_, (guint) _tmp10_); 1656 _tmp12_ = _tracker_result_store_category_node_ref0 ((TrackerResultStoreCategoryNode*) _tmp11_); 1657 _tracker_result_store_category_node_unref0 (cat); 1658 cat = _tmp12_; 1659 _tmp13_ = cat; 1660 _tmp14_ = node; 1661 if (_tmp13_ == _tmp14_) { 1662 gint _tmp15_; 1663 gint _tmp16_; 1664 _tmp15_ = i; 1665 _tmp16_ = n; 1666 result = _tmp15_ + _tmp16_; 1667 _tracker_result_store_category_node_unref0 (cat); 1668 return result; 1669 } 1670 _tracker_result_store_category_node_unref0 (cat); 1671 } 1672 } 1673 result = -1; 1674 return result; 1675 } 1676 1677 1678 static gint tracker_result_store_filled_categories_count (TrackerResultStore* self) { 1679 gint result = 0; 1680 gint i = 0; 1681 gint n; 1682 g_return_val_if_fail (self != NULL, 0); 1683 n = 0; 1684 { 1685 gboolean _tmp0_; 1686 i = 0; 1687 _tmp0_ = TRUE; 1688 while (TRUE) { 1689 gboolean _tmp1_; 1690 gint _tmp3_; 1691 GPtrArray* _tmp4_; 1692 gint _tmp5_; 1693 gint _tmp6_; 1694 TrackerResultStoreCategoryNode* cat = NULL; 1695 GPtrArray* _tmp7_; 1696 gint _tmp8_; 1697 gconstpointer _tmp9_ = NULL; 1698 TrackerResultStoreCategoryNode* _tmp10_; 1699 TrackerResultStoreCategoryNode* _tmp11_; 1700 gint _tmp12_; 1701 _tmp1_ = _tmp0_; 1702 if (!_tmp1_) { 1703 gint _tmp2_; 1704 _tmp2_ = i; 1705 i = _tmp2_ + 1; 1706 } 1707 _tmp0_ = FALSE; 1708 _tmp3_ = i; 1709 _tmp4_ = self->priv->categories; 1710 _tmp5_ = g_ptr_array_get_length (_tmp4_); 1711 _tmp6_ = _tmp5_; 1712 if (!(_tmp3_ < _tmp6_)) { 1713 break; 1714 } 1715 _tmp7_ = self->priv->categories; 1716 _tmp8_ = i; 1717 _tmp9_ = g_ptr_array_index (_tmp7_, (guint) _tmp8_); 1718 _tmp10_ = _tracker_result_store_category_node_ref0 ((TrackerResultStoreCategoryNode*) _tmp9_); 1719 _tracker_result_store_category_node_unref0 (cat); 1720 cat = _tmp10_; 1721 _tmp11_ = cat; 1722 _tmp12_ = _tmp11_->count; 1723 if (_tmp12_ > 0) { 1724 gint _tmp13_; 1725 _tmp13_ = n; 1726 n = _tmp13_ + 1; 1727 } 1728 _tracker_result_store_category_node_unref0 (cat); 1729 } 1730 } 1731 result = n; 1732 return result; 1733 } 1734 1735 1736 static GType tracker_result_store_real_get_column_type (GtkTreeModel* base, gint index_) { 1737 TrackerResultStore * self; 1738 GType result = 0UL; 1739 gint _tmp0_; 1740 gint _tmp1_; 1741 self = (TrackerResultStore*) base; 1742 _tmp0_ = index_; 1743 _tmp1_ = self->priv->n_columns; 1744 if (_tmp0_ == _tmp1_) { 1745 result = GDK_TYPE_PIXBUF; 1746 return result; 1747 } else { 1748 gint _tmp2_; 1749 gint _tmp3_; 1750 _tmp2_ = index_; 1751 _tmp3_ = self->priv->n_columns; 1752 if (_tmp2_ == (_tmp3_ + 1)) { 1753 result = TRACKER_QUERY_TYPE_TYPE; 1754 return result; 1755 } else { 1756 result = G_TYPE_STRING; 1757 return result; 1758 } 1759 } 1760 } 1761 1762 1763 static GtkTreeModelFlags tracker_result_store_real_get_flags (GtkTreeModel* base) { 1764 TrackerResultStore * self; 1765 GtkTreeModelFlags result = 0; 1766 GtkTreeModelFlags flags = 0; 1767 TrackerResultStoreQueryData* _tmp0_;
variable '_tmp0_' set but not used
(emitted by gcc)
1768 gint _tmp0__length1; 1769 self = (TrackerResultStore*) base; 1770 flags = GTK_TREE_MODEL_ITERS_PERSIST; 1771 _tmp0_ = self->priv->queries;
Value stored to '_tmp0_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1772 _tmp0__length1 = self->priv->queries_length1; 1773 if (_tmp0__length1 == 1) { 1774 GtkTreeModelFlags _tmp1_; 1775 _tmp1_ = flags; 1776 flags = _tmp1_ | GTK_TREE_MODEL_LIST_ONLY; 1777 } 1778 result = flags; 1779 return result; 1780 } 1781 1782 1783 static gboolean tracker_result_store_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path) { 1784 TrackerResultStore * self; 1785 GtkTreeIter _vala_iter = {0}; 1786 gboolean result = FALSE; 1787 GtkTreePath* _tmp0_; 1788 gint _tmp1_ = 0; 1789 gint* _tmp2_ = NULL; 1790 gint* indices; 1791 gint indices_length1; 1792 gint _indices_size_; 1793 TrackerResultStoreCategoryNode* cat = NULL; 1794 gint i; 1795 TrackerResultStoreQueryData* _tmp3_; 1796 gint _tmp3__length1; 1797 gint _tmp23_; 1798 TrackerResultStoreCategoryNode* _tmp24_; 1799 GtkTreePath* _tmp25_; 1800 gint _tmp26_ = 0; 1801 gint _tmp27_; 1802 self = (TrackerResultStore*) base; 1803 g_return_val_if_fail (path != NULL, FALSE); 1804 _tmp0_ = path; 1805 _tmp2_ = gtk_tree_path_get_indices_with_depth (_tmp0_, &_tmp1_); 1806 indices = _tmp2_; 1807 indices_length1 = _tmp1_; 1808 _indices_size_ = indices_length1;
Value stored to '_indices_size_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1809 i = 0; 1810 memset (&_vala_iter, 0, sizeof (GtkTreeIter)); 1811 _tmp3_ = self->priv->queries;
Value stored to '_tmp3_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1812 _tmp3__length1 = self->priv->queries_length1; 1813 if (_tmp3__length1 > 1) { 1814 gint* _tmp4_; 1815 gint _tmp4__length1; 1816 gint _tmp5_; 1817 gint _tmp6_; 1818 GPtrArray* _tmp7_; 1819 gint _tmp8_; 1820 gint _tmp9_; 1821 GPtrArray* _tmp10_; 1822 gint* _tmp11_; 1823 gint _tmp11__length1;
variable '_tmp11__length1' set but not used
(emitted by gcc)
1824 gint _tmp12_; 1825 gint _tmp13_; 1826 gconstpointer _tmp14_ = NULL; 1827 TrackerResultStoreCategoryNode* _tmp15_; 1828 gint _tmp16_; 1829 _tmp4_ = indices; 1830 _tmp4__length1 = indices_length1;
Value stored to '_tmp4__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1831 _tmp5_ = i; 1832 _tmp6_ = _tmp4_[_tmp5_]; 1833 _tmp7_ = self->priv->categories; 1834 _tmp8_ = g_ptr_array_get_length (_tmp7_); 1835 _tmp9_ = _tmp8_; 1836 if (_tmp6_ >= _tmp9_) { 1837 _vala_iter.stamp = 0; 1838 result = FALSE; 1839 _tracker_result_store_category_node_unref0 (cat); 1840 if (iter) { 1841 *iter = _vala_iter; 1842 } 1843 return result; 1844 } 1845 _tmp10_ = self->priv->categories; 1846 _tmp11_ = indices; 1847 _tmp11__length1 = indices_length1;
Value stored to '_tmp11__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1848 _tmp12_ = i; 1849 _tmp13_ = _tmp11_[_tmp12_]; 1850 _tmp14_ = g_ptr_array_index (_tmp10_, (guint) _tmp13_); 1851 _tmp15_ = _tracker_result_store_category_node_ref0 ((TrackerResultStoreCategoryNode*) _tmp14_); 1852 _tracker_result_store_category_node_unref0 (cat); 1853 cat = _tmp15_; 1854 _tmp16_ = i; 1855 i = _tmp16_ + 1; 1856 } else { 1857 GPtrArray* _tmp17_; 1858 gint _tmp18_; 1859 gint _tmp19_; 1860 GPtrArray* _tmp20_; 1861 gconstpointer _tmp21_ = NULL; 1862 TrackerResultStoreCategoryNode* _tmp22_; 1863 _tmp17_ = self->priv->categories; 1864 _tmp18_ = g_ptr_array_get_length (_tmp17_); 1865 _tmp19_ = _tmp18_; 1866 if (_tmp19_ == 0) { 1867 _vala_iter.stamp = 0; 1868 result = FALSE; 1869 _tracker_result_store_category_node_unref0 (cat); 1870 if (iter) { 1871 *iter = _vala_iter; 1872 } 1873 return result; 1874 } 1875 _tmp20_ = self->priv->categories; 1876 _tmp21_ = g_ptr_array_index (_tmp20_, (guint) 0); 1877 _tmp22_ = _tracker_result_store_category_node_ref0 ((TrackerResultStoreCategoryNode*) _tmp21_); 1878 _tracker_result_store_category_node_unref0 (cat); 1879 cat = _tmp22_; 1880 } 1881 _tmp23_ = self->priv->timestamp; 1882 _vala_iter.stamp = _tmp23_; 1883 _tmp24_ = cat; 1884 _vala_iter.user_data = _tmp24_; 1885 _tmp25_ = path; 1886 _tmp26_ = gtk_tree_path_get_depth (_tmp25_); 1887 _tmp27_ = i; 1888 if (_tmp26_ == (_tmp27_ + 1)) { 1889 gint* _tmp28_; 1890 gint _tmp28__length1; 1891 gint _tmp29_; 1892 gint _tmp30_; 1893 TrackerResultStoreCategoryNode* _tmp31_; 1894 gint _tmp32_; 1895 TrackerResultStoreCategoryNode* _tmp33_; 1896 TrackerResultStoreResultNode* _tmp34_; 1897 gint _tmp34__length1; 1898 gint* _tmp35_; 1899 gint _tmp35__length1; 1900 gint _tmp36_; 1901 gint _tmp37_; 1902 gint* _tmp38_; 1903 gint _tmp38__length1; 1904 gint _tmp39_; 1905 gint _tmp40_; 1906 void* _tmp41_ = NULL; 1907 _tmp28_ = indices; 1908 _tmp28__length1 = indices_length1;
Value stored to '_tmp28__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1909 _tmp29_ = i; 1910 _tmp30_ = _tmp28_[_tmp29_]; 1911 _tmp31_ = cat; 1912 _tmp32_ = _tmp31_->count; 1913 if (_tmp30_ >= _tmp32_) { 1914 _vala_iter.stamp = 0; 1915 result = FALSE; 1916 _tracker_result_store_category_node_unref0 (cat); 1917 if (iter) { 1918 *iter = _vala_iter; 1919 } 1920 return result; 1921 } 1922 _tmp33_ = cat; 1923 _tmp34_ = _tmp33_->results; 1924 _tmp34__length1 = _tmp33_->results_length1;
Value stored to '_tmp34__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1925 _tmp35_ = indices; 1926 _tmp35__length1 = indices_length1;
Value stored to '_tmp35__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1927 _tmp36_ = i; 1928 _tmp37_ = _tmp35_[_tmp36_]; 1929 _vala_iter.user_data2 = &_tmp34_[_tmp37_]; 1930 _tmp38_ = indices; 1931 _tmp38__length1 = indices_length1;
Value stored to '_tmp38__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1932 _tmp39_ = i; 1933 _tmp40_ = _tmp38_[_tmp39_]; 1934 _tmp41_ = GINT_TO_POINTER (_tmp40_); 1935 _vala_iter.user_data3 = _tmp41_; 1936 } 1937 result = TRUE; 1938 _tracker_result_store_category_node_unref0 (cat); 1939 if (iter) { 1940 *iter = _vala_iter; 1941 } 1942 return result; 1943 } 1944 1945 1946 static gint tracker_result_store_real_get_n_columns (GtkTreeModel* base) { 1947 TrackerResultStore * self; 1948 gint result = 0; 1949 gint _tmp0_; 1950 gint _tmp1_; 1951 self = (TrackerResultStore*) base; 1952 _tmp0_ = self->priv->n_columns; 1953 _tmp1_ = self->priv->n_extra_columns; 1954 result = _tmp0_ + _tmp1_; 1955 return result; 1956 } 1957 1958 1959 static GtkTreePath* tracker_result_store_real_get_path (GtkTreeModel* base, GtkTreeIter* iter) { 1960 TrackerResultStore * self; 1961 GtkTreePath* result = NULL; 1962 GtkTreePath* _tmp0_; 1963 GtkTreePath* path; 1964 TrackerResultStoreCategoryNode* cat = NULL; 1965 gint i = 0; 1966 TrackerResultStoreQueryData* _tmp1_;
variable '_tmp1_' set but not used
(emitted by gcc)
1967 gint _tmp1__length1; 1968 GtkTreeIter _tmp18_; 1969 void* _tmp19_; 1970 self = (TrackerResultStore*) base; 1971 g_return_val_if_fail (iter != NULL, NULL); 1972 _tmp0_ = gtk_tree_path_new (); 1973 path = _tmp0_; 1974 _tmp1_ = self->priv->queries;
Value stored to '_tmp1_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1975 _tmp1__length1 = self->priv->queries_length1; 1976 if (_tmp1__length1 > 1) { 1977 { 1978 gboolean _tmp2_; 1979 i = 0; 1980 _tmp2_ = TRUE; 1981 while (TRUE) { 1982 gboolean _tmp3_; 1983 gint _tmp5_; 1984 GPtrArray* _tmp6_; 1985 gint _tmp7_; 1986 gint _tmp8_; 1987 GPtrArray* _tmp9_; 1988 gint _tmp10_; 1989 gconstpointer _tmp11_ = NULL; 1990 TrackerResultStoreCategoryNode* _tmp12_; 1991 TrackerResultStoreCategoryNode* _tmp13_; 1992 GtkTreeIter _tmp14_; 1993 void* _tmp15_; 1994 _tmp3_ = _tmp2_; 1995 if (!_tmp3_) { 1996 gint _tmp4_; 1997 _tmp4_ = i; 1998 i = _tmp4_ + 1; 1999 } 2000 _tmp2_ = FALSE; 2001 _tmp5_ = i; 2002 _tmp6_ = self->priv->categories; 2003 _tmp7_ = g_ptr_array_get_length (_tmp6_); 2004 _tmp8_ = _tmp7_; 2005 if (!(_tmp5_ < _tmp8_)) { 2006 break; 2007 } 2008 _tmp9_ = self->priv->categories; 2009 _tmp10_ = i; 2010 _tmp11_ = g_ptr_array_index (_tmp9_, (guint) _tmp10_); 2011 _tmp12_ = _tracker_result_store_category_node_ref0 ((TrackerResultStoreCategoryNode*) _tmp11_); 2012 _tracker_result_store_category_node_unref0 (cat); 2013 cat = _tmp12_; 2014 _tmp13_ = cat; 2015 _tmp14_ = *iter; 2016 _tmp15_ = _tmp14_.user_data; 2017 if (_tmp13_ == _tmp15_) { 2018 GtkTreePath* _tmp16_; 2019 gint _tmp17_; 2020 _tmp16_ = path; 2021 _tmp17_ = i; 2022 gtk_tree_path_append_index (_tmp16_, _tmp17_); 2023 break; 2024 } 2025 } 2026 } 2027 } 2028 _tmp18_ = *iter; 2029 _tmp19_ = _tmp18_.user_data2; 2030 if (_tmp19_ != NULL) { 2031 GtkTreePath* _tmp20_; 2032 GtkTreeIter _tmp21_; 2033 void* _tmp22_; 2034 _tmp20_ = path; 2035 _tmp21_ = *iter; 2036 _tmp22_ = _tmp21_.user_data3; 2037 gtk_tree_path_append_index (_tmp20_, (gint) ((glong) _tmp22_)); 2038 } 2039 result = path; 2040 _tracker_result_store_category_node_unref0 (cat); 2041 return result; 2042 } 2043 2044 2045 static void tracker_result_store_fetch_thumbnail_data_free (gpointer _data) { 2046 TrackerResultStoreFetchThumbnailData* _data_; 2047 _data_ = _data; 2048 _g_object_unref0 (_data_->self); 2049 g_slice_free (TrackerResultStoreFetchThumbnailData, _data_); 2050 } 2051 2052 2053 static void tracker_result_store_fetch_thumbnail (TrackerResultStore* self, GtkTreeIter* iter, GAsyncReadyCallback _callback_, gpointer _user_data_) { 2054 TrackerResultStoreFetchThumbnailData* _data_; 2055 TrackerResultStore* _tmp0_; 2056 GtkTreeIter _tmp1_; 2057 _data_ = g_slice_new0 (TrackerResultStoreFetchThumbnailData); 2058 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_result_store_fetch_thumbnail); 2059 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_result_store_fetch_thumbnail_data_free); 2060 _tmp0_ = _g_object_ref0 (self); 2061 _data_->self = _tmp0_; 2062 _tmp1_ = *iter; 2063 _data_->iter = _tmp1_; 2064 tracker_result_store_fetch_thumbnail_co (_data_); 2065 } 2066 2067 2068 static void tracker_result_store_fetch_thumbnail_finish (TrackerResultStore* self, GAsyncResult* _res_) { 2069 TrackerResultStoreFetchThumbnailData* _data_;
variable '_data_' set but not used
(emitted by gcc)
2070 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
Value stored to '_data_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2071 } 2072 2073 2074 static void tracker_result_store_fetch_thumbnail_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 2075 TrackerResultStoreFetchThumbnailData* _data_; 2076 _data_ = _user_data_; 2077 _data_->_source_object_ = source_object; 2078 _data_->_res_ = _res_; 2079 tracker_result_store_fetch_thumbnail_co (_data_); 2080 } 2081 2082 2083 static gboolean tracker_result_store_fetch_thumbnail_co (TrackerResultStoreFetchThumbnailData* _data_) { 2084 switch (_data_->_state_) { 2085 case 0: 2086 goto _state_0; 2087 case 1: 2088 goto _state_1; 2089 default: 2090 g_assert_not_reached (); 2091 } 2092 _state_0: 2093 _data_->pixbuf = NULL; 2094 _data_->_tmp0_ = _data_->iter; 2095 _data_->_tmp1_ = _data_->_tmp0_.user_data2; 2096 _data_->_result_ = _data_->_tmp1_; 2097 _data_->_tmp2_ = _data_->_result_; 2098 _data_->_tmp3_ = (*_data_->_tmp2_).values; 2099 _data_->_tmp3__length1 = (*_data_->_tmp2_).values_length1; 2100 _data_->_tmp4_ = _data_->_tmp3_[1]; 2101 _data_->_tmp5_ = NULL; 2102 _data_->_tmp5_ = g_file_new_for_uri (_data_->_tmp4_); 2103 _g_object_unref0 (_data_->file); 2104 _data_->file = _data_->_tmp5_; 2105 { 2106 _data_->_tmp6_ = _data_->file; 2107 _data_->_tmp7_ = _data_->self->priv->cancellable; 2108 _data_->_state_ = 1; 2109 g_file_query_info_async (_data_->_tmp6_, "thumbnail::path,standard::icon", G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, _data_->_tmp7_, tracker_result_store_fetch_thumbnail_ready, _data_); 2110 return FALSE; 2111 _state_1: 2112 _data_->_tmp8_ = NULL; 2113 _data_->_tmp8_ = g_file_query_info_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_); 2114 _data_->_tmp9_ = _data_->_tmp8_; 2115 if (_data_->_inner_error_ != NULL) { 2116 goto __catch9_g_error; 2117 } 2118 _g_object_unref0 (_data_->info); 2119 _data_->info = _data_->_tmp9_; 2120 } 2121 goto __finally9; 2122 __catch9_g_error: 2123 { 2124 _data_->ie = _data_->_inner_error_; 2125 _data_->_inner_error_ = NULL; 2126 _data_->_tmp10_ = _data_->self->priv->cancellable; 2127 _data_->_tmp11_ = FALSE; 2128 _data_->_tmp11_ = g_cancellable_is_cancelled (_data_->_tmp10_); 2129 if (!_data_->_tmp11_) { 2130 _data_->_tmp12_ = _data_->ie; 2131 _data_->_tmp13_ = _data_->_tmp12_->message; 2132 g_warning ("tracker-result-store.vala:505: Could not get thumbnail: %s", _data_->_tmp13_); 2133 } 2134 _g_error_free0 (_data_->ie); 2135 _g_object_unref0 (_data_->pixbuf); 2136 _g_free0 (_data_->thumb_path); 2137 _g_object_unref0 (_data_->info); 2138 _g_object_unref0 (_data_->file); 2139 if (_data_->_state_ == 0) { 2140 g_simple_async_result_complete_in_idle (_data_->_async_result); 2141 } else { 2142 g_simple_async_result_complete (_data_->_async_result); 2143 } 2144 g_object_unref (_data_->_async_result); 2145 return FALSE; 2146 } 2147 __finally9: 2148 if (_data_->_inner_error_ != NULL) { 2149 _g_object_unref0 (_data_->pixbuf); 2150 _g_free0 (_data_->thumb_path); 2151 _g_object_unref0 (_data_->info); 2152 _g_object_unref0 (_data_->file); 2153 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 2154 g_clear_error (&_data_->_inner_error_); 2155 return FALSE; 2156 } 2157 _data_->_tmp14_ = _data_->info; 2158 _data_->_tmp15_ = NULL; 2159 _data_->_tmp15_ = g_file_info_get_attribute_byte_string (_data_->_tmp14_, "thumbnail::path"); 2160 _data_->_tmp16_ = g_strdup (_data_->_tmp15_); 2161 _g_free0 (_data_->thumb_path); 2162 _data_->thumb_path = _data_->_tmp16_; 2163 { 2164 _data_->_tmp17_ = _data_->thumb_path; 2165 if (_data_->_tmp17_ != NULL) { 2166 _data_->_tmp18_ = _data_->thumb_path; 2167 _data_->_tmp19_ = _data_->self->priv->_icon_size; 2168 _data_->_tmp20_ = _data_->self->priv->_icon_size; 2169 _data_->_tmp21_ = gdk_pixbuf_new_from_file_at_size (_data_->_tmp18_, _data_->_tmp19_, _data_->_tmp20_, &_data_->_inner_error_); 2170 _data_->_tmp22_ = _data_->_tmp21_; 2171 if (_data_->_inner_error_ != NULL) { 2172 goto __catch10_g_error; 2173 } 2174 _g_object_unref0 (_data_->pixbuf); 2175 _data_->pixbuf = _data_->_tmp22_; 2176 } else { 2177 _data_->_tmp23_ = _data_->info; 2178 _data_->_tmp24_ = NULL; 2179 _data_->_tmp24_ = g_file_info_get_attribute_object (_data_->_tmp23_, "standard::icon"); 2180 _data_->_tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp24_, G_TYPE_ICON, GIcon)); 2181 _g_object_unref0 (_data_->icon); 2182 _data_->icon = _data_->_tmp25_; 2183 _data_->_tmp26_ = _data_->icon; 2184 if (_data_->_tmp26_ == NULL) { 2185 _gtk_icon_info_free0 (_data_->icon_info);
'gtk_icon_info_free' is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkicontheme.h:198): Use 'g_object_unref' instead
(emitted by gcc)
2186 _g_object_unref0 (_data_->icon); 2187 _g_object_unref0 (_data_->pixbuf); 2188 _g_free0 (_data_->thumb_path); 2189 _g_object_unref0 (_data_->info); 2190 _g_object_unref0 (_data_->file); 2191 if (_data_->_state_ == 0) { 2192 g_simple_async_result_complete_in_idle (_data_->_async_result); 2193 } else { 2194 g_simple_async_result_complete (_data_->_async_result); 2195 } 2196 g_object_unref (_data_->_async_result); 2197 return FALSE; 2198 } 2199 _data_->_tmp27_ = NULL; 2200 _data_->_tmp27_ = gdk_screen_get_default (); 2201 _data_->_tmp28_ = NULL; 2202 _data_->_tmp28_ = gtk_icon_theme_get_for_screen (_data_->_tmp27_); 2203 _data_->_tmp29_ = _g_object_ref0 (_data_->_tmp28_); 2204 _data_->theme = _data_->_tmp29_; 2205 _data_->_tmp30_ = _data_->theme; 2206 _data_->_tmp31_ = _data_->icon; 2207 _data_->_tmp32_ = _data_->self->priv->_icon_size; 2208 _data_->_tmp33_ = NULL; 2209 _data_->_tmp33_ = gtk_icon_theme_lookup_by_gicon (_data_->_tmp30_, _data_->_tmp31_, _data_->_tmp32_, 0); 2210 _gtk_icon_info_free0 (_data_->icon_info); 2211 _data_->icon_info = _data_->_tmp33_; 2212 _data_->_tmp34_ = _data_->icon_info; 2213 if (_data_->_tmp34_ == NULL) { 2214 _g_object_unref0 (_data_->theme); 2215 _gtk_icon_info_free0 (_data_->icon_info); 2216 _g_object_unref0 (_data_->icon); 2217 _g_object_unref0 (_data_->pixbuf); 2218 _g_free0 (_data_->thumb_path); 2219 _g_object_unref0 (_data_->info); 2220 _g_object_unref0 (_data_->file); 2221 if (_data_->_state_ == 0) { 2222 g_simple_async_result_complete_in_idle (_data_->_async_result); 2223 } else { 2224 g_simple_async_result_complete (_data_->_async_result); 2225 } 2226 g_object_unref (_data_->_async_result); 2227 return FALSE; 2228 } 2229 _data_->_tmp35_ = _data_->icon_info; 2230 _data_->_tmp36_ = NULL; 2231 _data_->_tmp36_ = gtk_icon_info_load_icon (_data_->_tmp35_, &_data_->_inner_error_); 2232 _data_->_tmp37_ = _data_->_tmp36_; 2233 if (_data_->_inner_error_ != NULL) { 2234 _g_object_unref0 (_data_->theme); 2235 _gtk_icon_info_free0 (_data_->icon_info); 2236 _g_object_unref0 (_data_->icon); 2237 goto __catch10_g_error; 2238 } 2239 _g_object_unref0 (_data_->pixbuf); 2240 _data_->pixbuf = _data_->_tmp37_; 2241 _g_object_unref0 (_data_->theme); 2242 _gtk_icon_info_free0 (_data_->icon_info); 2243 _g_object_unref0 (_data_->icon); 2244 } 2245 } 2246 goto __finally10; 2247 __catch10_g_error: 2248 { 2249 _data_->e = _data_->_inner_error_; 2250 _data_->_inner_error_ = NULL; 2251 _data_->_tmp38_ = _data_->e; 2252 _data_->_tmp39_ = _data_->_tmp38_->message; 2253 g_warning ("tracker-result-store.vala:535: Could not get icon pixbuf: %s\n", _data_->_tmp39_); 2254 _g_error_free0 (_data_->e); 2255 } 2256 __finally10: 2257 if (_data_->_inner_error_ != NULL) { 2258 _g_object_unref0 (_data_->pixbuf); 2259 _g_free0 (_data_->thumb_path); 2260 _g_object_unref0 (_data_->info); 2261 _g_object_unref0 (_data_->file); 2262 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); 2263 g_clear_error (&_data_->_inner_error_); 2264 return FALSE; 2265 } 2266 _data_->_tmp40_ = _data_->pixbuf; 2267 if (_data_->_tmp40_ != NULL) { 2268 _data_->_tmp41_ = _data_->_result_; 2269 _data_->_tmp42_ = _data_->pixbuf; 2270 _data_->_tmp43_ = _g_object_ref0 (_data_->_tmp42_); 2271 _g_object_unref0 ((*_data_->_tmp41_).pixbuf); 2272 (*_data_->_tmp41_).pixbuf = _data_->_tmp43_; 2273 _data_->_tmp44_ = _data_->iter; 2274 _data_->_tmp45_ = NULL; 2275 _data_->_tmp45_ = gtk_tree_model_get_path ((GtkTreeModel*) _data_->self, &_data_->_tmp44_); 2276 _gtk_tree_path_free0 (_data_->path); 2277 _data_->path = _data_->_tmp45_; 2278 _data_->_tmp46_ = _data_->path; 2279 _data_->_tmp47_ = _data_->iter; 2280 gtk_tree_model_row_changed ((GtkTreeModel*) _data_->self, _data_->_tmp46_, &_data_->_tmp47_); 2281 _gtk_tree_path_free0 (_data_->path); 2282 } 2283 _g_object_unref0 (_data_->pixbuf); 2284 _g_free0 (_data_->thumb_path); 2285 _g_object_unref0 (_data_->info); 2286 _g_object_unref0 (_data_->file); 2287 if (_data_->_state_ == 0) { 2288 g_simple_async_result_complete_in_idle (_data_->_async_result); 2289 } else { 2290 g_simple_async_result_complete (_data_->_async_result); 2291 } 2292 g_object_unref (_data_->_async_result); 2293 return FALSE; 2294 } 2295 2296 2297 static void tracker_result_store_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value) { 2298 TrackerResultStore * self; 2299 GValue _vala_value = {0}; 2300 TrackerResultStoreCategoryNode* cat = NULL; 2301 gint _tmp0_; 2302 GType _tmp1_ = 0UL; 2303 GValue _tmp2_ = {0}; 2304 GValue _tmp3_; 2305 gint _tmp4_; 2306 gint _tmp5_; 2307 gint _tmp6_; 2308 GtkTreeIter _tmp7_; 2309 void* _tmp8_; 2310 TrackerResultStoreCategoryNode* _tmp9_; 2311 gint _tmp10_; 2312 gint _tmp11_; 2313 GtkTreeIter _tmp14_; 2314 void* _tmp15_; 2315 self = (TrackerResultStore*) base; 2316 g_return_if_fail (iter != NULL); 2317 _tmp0_ = column; 2318 _tmp1_ = gtk_tree_model_get_column_type ((GtkTreeModel*) self, _tmp0_); 2319 g_value_init (&_tmp2_, _tmp1_); 2320 G_IS_VALUE (&_vala_value) ? (g_value_unset (&_vala_value), NULL) : NULL; 2321 _vala_value = _tmp2_; 2322 _tmp3_ = _vala_value;
Value stored to '_tmp3_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2323 _tmp4_ = column; 2324 _tmp5_ = self->priv->n_columns; 2325 _tmp6_ = self->priv->n_extra_columns; 2326 if (_tmp4_ >= (_tmp5_ + _tmp6_)) { 2327 _tracker_result_store_category_node_unref0 (cat); 2328 if (value) { 2329 *value = _vala_value; 2330 } else { 2331 G_IS_VALUE (&_vala_value) ? (g_value_unset (&_vala_value), NULL) : NULL; 2332 } 2333 return; 2334 } 2335 _tmp7_ = *iter; 2336 _tmp8_ = _tmp7_.user_data; 2337 _tmp9_ = _tracker_result_store_category_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNode)); 2338 _tracker_result_store_category_node_unref0 (cat); 2339 cat = _tmp9_; 2340 _tmp10_ = column; 2341 _tmp11_ = self->priv->n_columns; 2342 if (_tmp10_ == (_tmp11_ + 1)) { 2343 TrackerResultStoreCategoryNode* _tmp12_; 2344 TrackerQueryType _tmp13_; 2345 _tmp12_ = cat; 2346 _tmp13_ = _tmp12_->type; 2347 g_value_set_enum (&_vala_value, (gint) _tmp13_); 2348 _tracker_result_store_category_node_unref0 (cat); 2349 if (value) { 2350 *value = _vala_value; 2351 } else { 2352 G_IS_VALUE (&_vala_value) ? (g_value_unset (&_vala_value), NULL) : NULL; 2353 } 2354 return; 2355 } 2356 _tmp14_ = *iter; 2357 _tmp15_ = _tmp14_.user_data2; 2358 if (_tmp15_ == NULL) { 2359 gint _tmp16_; 2360 gint _tmp17_; 2361 _tmp16_ = column; 2362 _tmp17_ = self->priv->n_columns; 2363 if (_tmp16_ == _tmp17_) { 2364 GdkPixbuf* pixbuf = NULL; 2365 TrackerResultStoreCategoryNode* _tmp18_; 2366 GdkPixbuf* _tmp19_; 2367 GdkPixbuf* _tmp20_; 2368 GdkPixbuf* _tmp21_; 2369 GdkPixbuf* _tmp52_; 2370 _tmp18_ = cat; 2371 _tmp19_ = _tmp18_->pixbuf; 2372 _tmp20_ = _g_object_ref0 (_tmp19_); 2373 _g_object_unref0 (pixbuf); 2374 pixbuf = _tmp20_; 2375 _tmp21_ = pixbuf; 2376 if (_tmp21_ == NULL) { 2377 GdkScreen* _tmp22_ = NULL; 2378 GtkIconTheme* _tmp23_ = NULL; 2379 GtkIconTheme* _tmp24_; 2380 GtkIconTheme* theme; 2381 gint _tmp25_; 2382 gint size; 2383 TrackerResultStoreCategoryNode* _tmp26_; 2384 TrackerQueryType _tmp27_; 2385 _tmp22_ = gdk_screen_get_default (); 2386 _tmp23_ = gtk_icon_theme_get_for_screen (_tmp22_); 2387 _tmp24_ = _g_object_ref0 (_tmp23_); 2388 theme = _tmp24_; 2389 _tmp25_ = self->priv->_icon_size; 2390 size = _tmp25_; 2391 _tmp26_ = cat; 2392 _tmp27_ = _tmp26_->type; 2393 switch (_tmp27_) { 2394 case TRACKER_QUERY_TYPE_APPLICATIONS: 2395 { 2396 GtkIconTheme* _tmp28_; 2397 gint _tmp29_; 2398 GdkPixbuf* _tmp30_ = NULL; 2399 _tmp28_ = theme; 2400 _tmp29_ = size; 2401 _tmp30_ = tracker_pixbuf_new_from_name (_tmp28_, "package-x-generic", _tmp29_); 2402 _g_object_unref0 (pixbuf); 2403 pixbuf = _tmp30_; 2404 break; 2405 } 2406 case TRACKER_QUERY_TYPE_MUSIC: 2407 { 2408 GtkIconTheme* _tmp31_; 2409 gint _tmp32_; 2410 GdkPixbuf* _tmp33_ = NULL; 2411 _tmp31_ = theme; 2412 _tmp32_ = size; 2413 _tmp33_ = tracker_pixbuf_new_from_name (_tmp31_, "audio-x-generic", _tmp32_); 2414 _g_object_unref0 (pixbuf); 2415 pixbuf = _tmp33_; 2416 break; 2417 } 2418 case TRACKER_QUERY_TYPE_IMAGES: 2419 { 2420 GtkIconTheme* _tmp34_; 2421 gint _tmp35_; 2422 GdkPixbuf* _tmp36_ = NULL; 2423 _tmp34_ = theme; 2424 _tmp35_ = size; 2425 _tmp36_ = tracker_pixbuf_new_from_name (_tmp34_, "image-x-generic", _tmp35_); 2426 _g_object_unref0 (pixbuf); 2427 pixbuf = _tmp36_; 2428 break; 2429 } 2430 case TRACKER_QUERY_TYPE_VIDEOS: 2431 { 2432 GtkIconTheme* _tmp37_; 2433 gint _tmp38_; 2434 GdkPixbuf* _tmp39_ = NULL; 2435 _tmp37_ = theme; 2436 _tmp38_ = size; 2437 _tmp39_ = tracker_pixbuf_new_from_name (_tmp37_, "video-x-generic", _tmp38_); 2438 _g_object_unref0 (pixbuf); 2439 pixbuf = _tmp39_; 2440 break; 2441 } 2442 case TRACKER_QUERY_TYPE_DOCUMENTS: 2443 { 2444 GtkIconTheme* _tmp40_; 2445 gint _tmp41_; 2446 GdkPixbuf* _tmp42_ = NULL; 2447 _tmp40_ = theme; 2448 _tmp41_ = size; 2449 _tmp42_ = tracker_pixbuf_new_from_name (_tmp40_, "x-office-presentation", _tmp41_); 2450 _g_object_unref0 (pixbuf); 2451 pixbuf = _tmp42_; 2452 break; 2453 } 2454 case TRACKER_QUERY_TYPE_MAIL: 2455 { 2456 GtkIconTheme* _tmp43_; 2457 gint _tmp44_; 2458 GdkPixbuf* _tmp45_ = NULL; 2459 _tmp43_ = theme; 2460 _tmp44_ = size; 2461 _tmp45_ = tracker_pixbuf_new_from_name (_tmp43_, "emblem-mail", _tmp44_); 2462 _g_object_unref0 (pixbuf); 2463 pixbuf = _tmp45_; 2464 break; 2465 } 2466 case TRACKER_QUERY_TYPE_FOLDERS: 2467 { 2468 GtkIconTheme* _tmp46_; 2469 gint _tmp47_; 2470 GdkPixbuf* _tmp48_ = NULL; 2471 _tmp46_ = theme; 2472 _tmp47_ = size; 2473 _tmp48_ = tracker_pixbuf_new_from_name (_tmp46_, "folder", _tmp47_); 2474 _g_object_unref0 (pixbuf); 2475 pixbuf = _tmp48_; 2476 break; 2477 } 2478 case TRACKER_QUERY_TYPE_BOOKMARKS: 2479 { 2480 GtkIconTheme* _tmp49_; 2481 gint _tmp50_; 2482 GdkPixbuf* _tmp51_ = NULL; 2483 _tmp49_ = theme; 2484 _tmp50_ = size; 2485 _tmp51_ = tracker_pixbuf_new_from_name (_tmp49_, "web-browser", _tmp50_); 2486 _g_object_unref0 (pixbuf); 2487 pixbuf = _tmp51_; 2488 break; 2489 } 2490 default: 2491 break; 2492 } 2493 _g_object_unref0 (theme); 2494 } 2495 _tmp52_ = pixbuf; 2496 g_value_set_object (&_vala_value, (GObject*) _tmp52_); 2497 _g_object_unref0 (pixbuf); 2498 } 2499 } else { 2500 TrackerResultStoreResultNode* _result_ = NULL; 2501 gint n_node = 0; 2502 GtkTreeIter _tmp53_; 2503 void* _tmp54_; 2504 GtkTreeIter _tmp55_; 2505 void* _tmp56_; 2506 TrackerResultStoreResultNode* _tmp57_; 2507 gchar** _tmp58_; 2508 gint _tmp58__length1; 2509 const gchar* _tmp59_; 2510 _tmp53_ = *iter; 2511 _tmp54_ = _tmp53_.user_data2; 2512 _result_ = _tmp54_; 2513 _tmp55_ = *iter; 2514 _tmp56_ = _tmp55_.user_data3; 2515 n_node = (gint) ((glong) _tmp56_); 2516 _tmp57_ = _result_; 2517 _tmp58_ = (*_tmp57_).values; 2518 _tmp58__length1 = (*_tmp57_).values_length1;
Value stored to '_tmp58__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2519 _tmp59_ = _tmp58_[0]; 2520 if (_tmp59_ != NULL) { 2521 gint _tmp60_; 2522 gint _tmp61_; 2523 _tmp60_ = column; 2524 _tmp61_ = self->priv->n_columns; 2525 if (_tmp60_ == _tmp61_) { 2526 TrackerResultStoreResultNode* _tmp62_; 2527 GdkPixbuf* _tmp63_; 2528 _tmp62_ = _result_; 2529 _tmp63_ = (*_tmp62_).pixbuf; 2530 if (_tmp63_ != NULL) { 2531 TrackerResultStoreResultNode* _tmp64_; 2532 GdkPixbuf* _tmp65_; 2533 _tmp64_ = _result_; 2534 _tmp65_ = (*_tmp64_).pixbuf; 2535 g_value_set_object (&_vala_value, (GObject*) _tmp65_); 2536 } else { 2537 TrackerResultStoreQueryData* _tmp66_;
variable '_tmp66_' set but not used
(emitted by gcc)
2538 gint _tmp66__length1; 2539 _tmp66_ = self->priv->queries;
Value stored to '_tmp66_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2540 _tmp66__length1 = self->priv->queries_length1; 2541 if (_tmp66__length1 == 1) { 2542 GtkTreeIter _tmp67_; 2543 _tmp67_ = *iter; 2544 tracker_result_store_fetch_thumbnail (self, &_tmp67_, NULL, NULL); 2545 } 2546 } 2547 } else { 2548 TrackerResultStoreResultNode* _tmp68_; 2549 gchar** _tmp69_; 2550 gint _tmp69__length1; 2551 gint _tmp70_; 2552 const gchar* _tmp71_; 2553 _tmp68_ = _result_; 2554 _tmp69_ = (*_tmp68_).values; 2555 _tmp69__length1 = (*_tmp68_).values_length1;
Value stored to '_tmp69__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2556 _tmp70_ = column; 2557 _tmp71_ = _tmp69_[_tmp70_]; 2558 g_value_set_string (&_vala_value, _tmp71_); 2559 } 2560 } else { 2561 gint _tmp72_; 2562 gint _tmp73_; 2563 TrackerResultStoreCategoryNode* _tmp74_; 2564 gint _tmp75_; 2565 _tmp72_ = n_node; 2566 n_node = _tmp72_ / 100; 2567 _tmp73_ = n_node; 2568 n_node = _tmp73_ * 100; 2569 _tmp74_ = cat; 2570 _tmp75_ = n_node; 2571 tracker_result_store_add_operation (self, _tmp74_, _tmp75_); 2572 } 2573 } 2574 _tracker_result_store_category_node_unref0 (cat); 2575 if (value) { 2576 *value = _vala_value; 2577 } else { 2578 G_IS_VALUE (&_vala_value) ? (g_value_unset (&_vala_value), NULL) : NULL; 2579 } 2580 } 2581 2582 2583 static gboolean tracker_result_store_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent) { 2584 TrackerResultStore * self; 2585 GtkTreeIter _vala_iter = {0}; 2586 gboolean result = FALSE; 2587 TrackerResultStoreCategoryNode* cat = NULL; 2588 GtkTreeIter* _tmp0_; 2589 GtkTreeIter* _tmp18_; 2590 void* _tmp19_; 2591 GtkTreeIter* _tmp20_; 2592 void* _tmp21_; 2593 TrackerResultStoreCategoryNode* _tmp22_; 2594 TrackerResultStoreCategoryNode* _tmp23_; 2595 TrackerResultStoreResultNode* _tmp24_; 2596 gint _tmp24__length1; 2597 gint _tmp25_; 2598 TrackerResultStoreCategoryNode* _tmp26_; 2599 TrackerResultStoreCategoryNode* _tmp27_; 2600 TrackerResultStoreResultNode* _tmp28_; 2601 gint _tmp28__length1; 2602 void* _tmp29_ = NULL; 2603 self = (TrackerResultStore*) base; 2604 memset (&_vala_iter, 0, sizeof (GtkTreeIter)); 2605 _tmp0_ = parent; 2606 if (_tmp0_ == NULL) { 2607 GPtrArray* _tmp1_; 2608 gint _tmp2_; 2609 gint _tmp3_; 2610 TrackerResultStoreQueryData* _tmp4_; 2611 gint _tmp4__length1; 2612 _tmp1_ = self->priv->categories; 2613 _tmp2_ = g_ptr_array_get_length (_tmp1_); 2614 _tmp3_ = _tmp2_; 2615 if (_tmp3_ == 0) { 2616 _vala_iter.stamp = 0; 2617 result = FALSE; 2618 _tracker_result_store_category_node_unref0 (cat); 2619 if (iter) { 2620 *iter = _vala_iter; 2621 } 2622 return result; 2623 } 2624 _tmp4_ = self->priv->queries;
Value stored to '_tmp4_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2625 _tmp4__length1 = self->priv->queries_length1; 2626 if (_tmp4__length1 > 1) { 2627 gint i = 0; 2628 gint _tmp5_ = 0; 2629 GPtrArray* _tmp6_; 2630 gint _tmp7_; 2631 gconstpointer _tmp8_ = NULL; 2632 TrackerResultStoreCategoryNode* _tmp9_; 2633 gint _tmp10_; 2634 TrackerResultStoreCategoryNode* _tmp11_; 2635 _tmp5_ = tracker_result_store_find_nth_category_index (self, NULL, 0); 2636 i = _tmp5_; 2637 _tmp6_ = self->priv->categories; 2638 _tmp7_ = i; 2639 _tmp8_ = g_ptr_array_index (_tmp6_, (guint) _tmp7_); 2640 _tmp9_ = _tracker_result_store_category_node_ref0 ((TrackerResultStoreCategoryNode*) _tmp8_); 2641 _tracker_result_store_category_node_unref0 (cat); 2642 cat = _tmp9_; 2643 _tmp10_ = self->priv->timestamp; 2644 _vala_iter.stamp = _tmp10_; 2645 _tmp11_ = cat; 2646 _vala_iter.user_data = _tmp11_; 2647 result = TRUE; 2648 _tracker_result_store_category_node_unref0 (cat); 2649 if (iter) { 2650 *iter = _vala_iter; 2651 } 2652 return result; 2653 } else { 2654 gint _tmp12_; 2655 GPtrArray* _tmp13_; 2656 gconstpointer _tmp14_ = NULL; 2657 TrackerResultStoreCategoryNode* _tmp15_; 2658 TrackerResultStoreResultNode* _tmp16_; 2659 gint _tmp16__length1;
variable '_tmp16__length1' set but not used
(emitted by gcc)
2660 void* _tmp17_ = NULL; 2661 _tmp12_ = self->priv->timestamp; 2662 _vala_iter.stamp = _tmp12_; 2663 _tmp13_ = self->priv->categories; 2664 _tmp14_ = g_ptr_array_index (_tmp13_, (guint) 0); 2665 _vala_iter.user_data = (TrackerResultStoreCategoryNode*) _tmp14_; 2666 _tmp15_ = cat; 2667 _tmp16_ = _tmp15_->results;
Access to field 'results' results in a dereference of a null pointer (loaded from variable '_tmp15_')
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2668 _tmp16__length1 = _tmp15_->results_length1;
Value stored to '_tmp16__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2669 _vala_iter.user_data2 = &_tmp16_[0]; 2670 _tmp17_ = GINT_TO_POINTER (0); 2671 _vala_iter.user_data3 = _tmp17_; 2672 result = TRUE; 2673 _tracker_result_store_category_node_unref0 (cat); 2674 if (iter) { 2675 *iter = _vala_iter; 2676 } 2677 return result; 2678 } 2679 } 2680 _tmp18_ = parent; 2681 _tmp19_ = (*_tmp18_).user_data2; 2682 if (_tmp19_ != NULL) { 2683 _vala_iter.stamp = 0; 2684 result = FALSE; 2685 _tracker_result_store_category_node_unref0 (cat); 2686 if (iter) { 2687 *iter = _vala_iter; 2688 } 2689 return result; 2690 } 2691 _tmp20_ = parent; 2692 _tmp21_ = (*_tmp20_).user_data; 2693 _tmp22_ = _tracker_result_store_category_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNode)); 2694 _tracker_result_store_category_node_unref0 (cat); 2695 cat = _tmp22_; 2696 _tmp23_ = cat; 2697 _tmp24_ = _tmp23_->results;
Value stored to '_tmp24_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2698 _tmp24__length1 = _tmp23_->results_length1; 2699 if (_tmp24__length1 <= 0) { 2700 _vala_iter.stamp = 0; 2701 result = FALSE; 2702 _tracker_result_store_category_node_unref0 (cat); 2703 if (iter) { 2704 *iter = _vala_iter; 2705 } 2706 return result; 2707 } 2708 _tmp25_ = self->priv->timestamp; 2709 _vala_iter.stamp = _tmp25_; 2710 _tmp26_ = cat; 2711 _vala_iter.user_data = _tmp26_; 2712 _tmp27_ = cat; 2713 _tmp28_ = _tmp27_->results; 2714 _tmp28__length1 = _tmp27_->results_length1;
Value stored to '_tmp28__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2715 _vala_iter.user_data2 = &_tmp28_[0]; 2716 _tmp29_ = GINT_TO_POINTER (0); 2717 _vala_iter.user_data3 = _tmp29_; 2718 result = TRUE; 2719 _tracker_result_store_category_node_unref0 (cat); 2720 if (iter) { 2721 *iter = _vala_iter; 2722 } 2723 return result; 2724 } 2725 2726 2727 static gboolean tracker_result_store_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter) { 2728 TrackerResultStore * self;
variable 'self' set but not used
(emitted by gcc)
2729 gboolean result = FALSE; 2730 GtkTreeIter _tmp0_; 2731 void* _tmp1_; 2732 self = (TrackerResultStore*) base;
Value stored to 'self' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2733 g_return_val_if_fail (iter != NULL, FALSE); 2734 _tmp0_ = *iter; 2735 _tmp1_ = _tmp0_.user_data2; 2736 if (_tmp1_ == NULL) { 2737 TrackerResultStoreCategoryNode* cat = NULL; 2738 GtkTreeIter _tmp2_; 2739 void* _tmp3_; 2740 TrackerResultStoreCategoryNode* _tmp4_; 2741 TrackerResultStoreCategoryNode* _tmp5_; 2742 gint _tmp6_; 2743 _tmp2_ = *iter; 2744 _tmp3_ = _tmp2_.user_data; 2745 _tmp4_ = _tracker_result_store_category_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNode)); 2746 _tracker_result_store_category_node_unref0 (cat); 2747 cat = _tmp4_; 2748 _tmp5_ = cat; 2749 _tmp6_ = _tmp5_->count; 2750 result = _tmp6_ > 0; 2751 _tracker_result_store_category_node_unref0 (cat); 2752 return result; 2753 } 2754 result = FALSE; 2755 return result; 2756 } 2757 2758 2759 static gint tracker_result_store_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter) { 2760 TrackerResultStore * self; 2761 gint result = 0; 2762 GtkTreeIter* _tmp0_; 2763 GtkTreeIter* _tmp11_; 2764 void* _tmp12_; 2765 GtkTreeIter* _tmp13_; 2766 void* _tmp14_; 2767 TrackerResultStoreCategoryNode* _tmp15_; 2768 TrackerResultStoreCategoryNode* cat; 2769 TrackerResultStoreCategoryNode* _tmp16_; 2770 gint _tmp17_; 2771 self = (TrackerResultStore*) base; 2772 _tmp0_ = iter; 2773 if (_tmp0_ == NULL) { 2774 TrackerResultStoreQueryData* _tmp1_;
variable '_tmp1_' set but not used
(emitted by gcc)
2775 gint _tmp1__length1; 2776 _tmp1_ = self->priv->queries;
Value stored to '_tmp1_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2777 _tmp1__length1 = self->priv->queries_length1; 2778 if (_tmp1__length1 > 1) { 2779 GPtrArray* _tmp2_; 2780 gint _tmp3_; 2781 gint _tmp4_; 2782 _tmp2_ = self->priv->categories; 2783 _tmp3_ = g_ptr_array_get_length (_tmp2_); 2784 _tmp4_ = _tmp3_; 2785 result = _tmp4_ - 1; 2786 return result; 2787 } else { 2788 GPtrArray* _tmp5_; 2789 gint _tmp6_; 2790 gint _tmp7_; 2791 _tmp5_ = self->priv->categories; 2792 _tmp6_ = g_ptr_array_get_length (_tmp5_); 2793 _tmp7_ = _tmp6_; 2794 if (_tmp7_ > 0) { 2795 GPtrArray* _tmp8_; 2796 gconstpointer _tmp9_ = NULL; 2797 gint _tmp10_; 2798 _tmp8_ = self->priv->categories; 2799 _tmp9_ = g_ptr_array_index (_tmp8_, (guint) 0); 2800 _tmp10_ = ((TrackerResultStoreCategoryNode*) _tmp9_)->count; 2801 result = _tmp10_; 2802 return result; 2803 } else { 2804 result = -1; 2805 return result; 2806 } 2807 } 2808 } 2809 _tmp11_ = iter; 2810 _tmp12_ = (*_tmp11_).user_data2; 2811 if (_tmp12_ != NULL) { 2812 result = -1; 2813 return result; 2814 } 2815 _tmp13_ = iter; 2816 _tmp14_ = (*_tmp13_).user_data; 2817 _tmp15_ = _tracker_result_store_category_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNode)); 2818 cat = _tmp15_; 2819 _tmp16_ = cat; 2820 _tmp17_ = _tmp16_->count; 2821 result = _tmp17_; 2822 _tracker_result_store_category_node_unref0 (cat); 2823 return result; 2824 } 2825 2826 2827 static gboolean tracker_result_store_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter) { 2828 TrackerResultStore * self; 2829 gboolean result = FALSE; 2830 TrackerResultStoreCategoryNode* cat = NULL; 2831 gint i = 0; 2832 GtkTreeIter _tmp0_; 2833 void* _tmp1_; 2834 TrackerResultStoreCategoryNode* _tmp2_; 2835 GtkTreeIter _tmp3_; 2836 void* _tmp4_; 2837 self = (TrackerResultStore*) base; 2838 g_return_val_if_fail (iter != NULL, FALSE); 2839 _tmp0_ = *iter; 2840 _tmp1_ = _tmp0_.user_data; 2841 _tmp2_ = _tracker_result_store_category_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNode)); 2842 _tracker_result_store_category_node_unref0 (cat); 2843 cat = _tmp2_; 2844 _tmp3_ = *iter; 2845 _tmp4_ = _tmp3_.user_data2; 2846 if (_tmp4_ == NULL) { 2847 TrackerResultStoreCategoryNode* _tmp5_; 2848 gint _tmp6_ = 0; 2849 gboolean _tmp7_ = FALSE; 2850 gint _tmp8_; 2851 gboolean _tmp13_; 2852 gint _tmp14_; 2853 GPtrArray* _tmp15_; 2854 gint _tmp16_; 2855 gconstpointer _tmp17_ = NULL; 2856 _tmp5_ = cat; 2857 _tmp6_ = tracker_result_store_find_nth_category_index (self, _tmp5_, 1); 2858 i = _tmp6_; 2859 _tmp8_ = i; 2860 if (_tmp8_ < 0) { 2861 _tmp7_ = TRUE; 2862 } else { 2863 gint _tmp9_; 2864 GPtrArray* _tmp10_; 2865 gint _tmp11_; 2866 gint _tmp12_; 2867 _tmp9_ = i; 2868 _tmp10_ = self->priv->categories; 2869 _tmp11_ = g_ptr_array_get_length (_tmp10_); 2870 _tmp12_ = _tmp11_; 2871 _tmp7_ = _tmp9_ >= _tmp12_; 2872 } 2873 _tmp13_ = _tmp7_; 2874 if (_tmp13_) { 2875 (*iter).stamp = 0; 2876 result = FALSE; 2877 _tracker_result_store_category_node_unref0 (cat); 2878 return result; 2879 } 2880 _tmp14_ = self->priv->timestamp; 2881 (*iter).stamp = _tmp14_; 2882 _tmp15_ = self->priv->categories; 2883 _tmp16_ = i; 2884 _tmp17_ = g_ptr_array_index (_tmp15_, (guint) _tmp16_); 2885 (*iter).user_data = (TrackerResultStoreCategoryNode*) _tmp17_; 2886 result = TRUE; 2887 _tracker_result_store_category_node_unref0 (cat); 2888 return result; 2889 } else { 2890 GtkTreeIter _tmp18_; 2891 void* _tmp19_; 2892 gint _tmp20_; 2893 gint _tmp21_; 2894 TrackerResultStoreCategoryNode* _tmp22_; 2895 gint _tmp23_; 2896 TrackerResultStoreCategoryNode* _tmp24_; 2897 TrackerResultStoreResultNode* _tmp25_; 2898 gint _tmp25__length1;
variable '_tmp25__length1' set but not used
(emitted by gcc)
2899 gint _tmp26_; 2900 gint _tmp27_; 2901 void* _tmp28_ = NULL; 2902 _tmp18_ = *iter; 2903 _tmp19_ = _tmp18_.user_data3; 2904 i = (gint) ((glong) _tmp19_); 2905 _tmp20_ = i; 2906 i = _tmp20_ + 1; 2907 _tmp21_ = i; 2908 _tmp22_ = cat; 2909 _tmp23_ = _tmp22_->count; 2910 if (_tmp21_ >= _tmp23_) { 2911 (*iter).stamp = 0; 2912 result = FALSE; 2913 _tracker_result_store_category_node_unref0 (cat); 2914 return result; 2915 } 2916 _tmp24_ = cat; 2917 _tmp25_ = _tmp24_->results; 2918 _tmp25__length1 = _tmp24_->results_length1;
Value stored to '_tmp25__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2919 _tmp26_ = i; 2920 (*iter).user_data2 = &_tmp25_[_tmp26_]; 2921 _tmp27_ = i; 2922 _tmp28_ = GINT_TO_POINTER (_tmp27_); 2923 (*iter).user_data3 = _tmp28_; 2924 result = TRUE; 2925 _tracker_result_store_category_node_unref0 (cat); 2926 return result; 2927 } 2928 _tracker_result_store_category_node_unref0 (cat); 2929 } 2930 2931 2932 static gboolean tracker_result_store_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n) { 2933 TrackerResultStore * self; 2934 GtkTreeIter _vala_iter = {0}; 2935 gboolean result = FALSE; 2936 TrackerResultStoreCategoryNode* cat = NULL; 2937 GtkTreeIter* _tmp0_; 2938 self = (TrackerResultStore*) base; 2939 memset (&_vala_iter, 0, sizeof (GtkTreeIter)); 2940 _tmp0_ = parent; 2941 if (_tmp0_ != NULL) { 2942 GtkTreeIter* _tmp1_; 2943 void* _tmp2_; 2944 TrackerResultStoreCategoryNode* _tmp3_; 2945 gint _tmp4_; 2946 TrackerResultStoreCategoryNode* _tmp5_; 2947 gint _tmp6_; 2948 gint _tmp7_; 2949 TrackerResultStoreCategoryNode* _tmp8_; 2950 TrackerResultStoreCategoryNode* _tmp9_; 2951 TrackerResultStoreResultNode* _tmp10_; 2952 gint _tmp10__length1;
variable '_tmp10__length1' set but not used
(emitted by gcc)
2953 gint _tmp11_; 2954 gint _tmp12_; 2955 void* _tmp13_ = NULL; 2956 _tmp1_ = parent; 2957 _tmp2_ = (*_tmp1_).user_data; 2958 _tmp3_ = _tracker_result_store_category_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNode)); 2959 _tracker_result_store_category_node_unref0 (cat); 2960 cat = _tmp3_; 2961 _tmp4_ = n; 2962 _tmp5_ = cat; 2963 _tmp6_ = _tmp5_->count; 2964 if (_tmp4_ >= _tmp6_) { 2965 _vala_iter.stamp = 0; 2966 result = FALSE; 2967 _tracker_result_store_category_node_unref0 (cat); 2968 if (iter) { 2969 *iter = _vala_iter; 2970 } 2971 return result; 2972 } 2973 _tmp7_ = self->priv->timestamp; 2974 _vala_iter.stamp = _tmp7_; 2975 _tmp8_ = cat; 2976 _vala_iter.user_data = _tmp8_; 2977 _tmp9_ = cat; 2978 _tmp10_ = _tmp9_->results; 2979 _tmp10__length1 = _tmp9_->results_length1;
Value stored to '_tmp10__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2980 _tmp11_ = n; 2981 _vala_iter.user_data2 = &_tmp10_[_tmp11_]; 2982 _tmp12_ = n; 2983 _tmp13_ = GINT_TO_POINTER (_tmp12_); 2984 _vala_iter.user_data3 = _tmp13_; 2985 result = TRUE; 2986 _tracker_result_store_category_node_unref0 (cat); 2987 if (iter) { 2988 *iter = _vala_iter; 2989 } 2990 return result; 2991 } else { 2992 gint index = 0; 2993 TrackerResultStoreQueryData* _tmp14_; 2994 gint _tmp14__length1; 2995 GPtrArray* _tmp24_; 2996 gint _tmp25_; 2997 gconstpointer _tmp26_ = NULL; 2998 TrackerResultStoreCategoryNode* _tmp27_; 2999 gint _tmp28_; 3000 TrackerResultStoreCategoryNode* _tmp29_; 3001 TrackerResultStoreQueryData* _tmp30_; 3002 gint _tmp30__length1; 3003 _tmp14_ = self->priv->queries;
Value stored to '_tmp14_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3004 _tmp14__length1 = self->priv->queries_length1; 3005 if (_tmp14__length1 > 1) { 3006 gint _tmp15_; 3007 gint _tmp16_ = 0; 3008 gboolean _tmp17_ = FALSE; 3009 gint _tmp18_; 3010 gboolean _tmp23_; 3011 _tmp15_ = n; 3012 _tmp16_ = tracker_result_store_find_nth_category_index (self, NULL, _tmp15_); 3013 index = _tmp16_; 3014 _tmp18_ = index; 3015 if (_tmp18_ < 0) { 3016 _tmp17_ = TRUE; 3017 } else { 3018 gint _tmp19_; 3019 GPtrArray* _tmp20_; 3020 gint _tmp21_; 3021 gint _tmp22_; 3022 _tmp19_ = index; 3023 _tmp20_ = self->priv->categories; 3024 _tmp21_ = g_ptr_array_get_length (_tmp20_); 3025 _tmp22_ = _tmp21_; 3026 _tmp17_ = _tmp19_ >= _tmp22_; 3027 } 3028 _tmp23_ = _tmp17_; 3029 if (_tmp23_) { 3030 _vala_iter.stamp = 0; 3031 result = FALSE; 3032 _tracker_result_store_category_node_unref0 (cat); 3033 if (iter) { 3034 *iter = _vala_iter; 3035 } 3036 return result; 3037 } 3038 } else { 3039 index = 0; 3040 } 3041 _tmp24_ = self->priv->categories; 3042 _tmp25_ = index; 3043 _tmp26_ = g_ptr_array_index (_tmp24_, (guint) _tmp25_); 3044 _tmp27_ = _tracker_result_store_category_node_ref0 ((TrackerResultStoreCategoryNode*) _tmp26_); 3045 _tracker_result_store_category_node_unref0 (cat); 3046 cat = _tmp27_; 3047 _tmp28_ = self->priv->timestamp; 3048 _vala_iter.stamp = _tmp28_; 3049 _tmp29_ = cat; 3050 _vala_iter.user_data = _tmp29_; 3051 _tmp30_ = self->priv->queries;
Value stored to '_tmp30_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3052 _tmp30__length1 = self->priv->queries_length1; 3053 if (_tmp30__length1 > 1) { 3054 TrackerResultStoreCategoryNode* _tmp31_; 3055 TrackerResultStoreResultNode* _tmp32_; 3056 gint _tmp32__length1; 3057 void* _tmp33_ = NULL; 3058 _tmp31_ = cat; 3059 _tmp32_ = _tmp31_->results; 3060 _tmp32__length1 = _tmp31_->results_length1;
Value stored to '_tmp32__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3061 _vala_iter.user_data2 = &_tmp32_[0]; 3062 _tmp33_ = GINT_TO_POINTER (0); 3063 _vala_iter.user_data3 = _tmp33_; 3064 } 3065 result = TRUE; 3066 _tracker_result_store_category_node_unref0 (cat); 3067 if (iter) { 3068 *iter = _vala_iter; 3069 } 3070 return result; 3071 } 3072 _tracker_result_store_category_node_unref0 (cat); 3073 if (iter) { 3074 *iter = _vala_iter; 3075 } 3076 } 3077 3078 3079 static gboolean tracker_result_store_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child) { 3080 TrackerResultStore * self; 3081 GtkTreeIter _vala_iter = {0}; 3082 gboolean result = FALSE; 3083 gboolean _tmp0_ = FALSE; 3084 TrackerResultStoreQueryData* _tmp1_;
variable '_tmp1_' set but not used
(emitted by gcc)
3085 gint _tmp1__length1; 3086 gboolean _tmp4_; 3087 self = (TrackerResultStore*) base; 3088 g_return_val_if_fail (child != NULL, FALSE); 3089 memset (&_vala_iter, 0, sizeof (GtkTreeIter)); 3090 _tmp1_ = self->priv->queries;
Value stored to '_tmp1_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3091 _tmp1__length1 = self->priv->queries_length1; 3092 if (_tmp1__length1 > 1) { 3093 GtkTreeIter _tmp2_; 3094 void* _tmp3_; 3095 _tmp2_ = *child; 3096 _tmp3_ = _tmp2_.user_data2; 3097 _tmp0_ = _tmp3_ != NULL; 3098 } else { 3099 _tmp0_ = FALSE; 3100 } 3101 _tmp4_ = _tmp0_; 3102 if (_tmp4_) { 3103 gint _tmp5_; 3104 GtkTreeIter _tmp6_; 3105 void* _tmp7_; 3106 _tmp5_ = self->priv->timestamp; 3107 _vala_iter.stamp = _tmp5_; 3108 _tmp6_ = *child; 3109 _tmp7_ = _tmp6_.user_data; 3110 _vala_iter.user_data = _tmp7_; 3111 _vala_iter.user_data2 = NULL; 3112 _vala_iter.user_data3 = NULL; 3113 result = TRUE; 3114 if (iter) { 3115 *iter = _vala_iter; 3116 } 3117 return result; 3118 } 3119 _vala_iter.stamp = 0; 3120 result = FALSE; 3121 if (iter) { 3122 *iter = _vala_iter; 3123 } 3124 return result; 3125 } 3126 3127 3128 static void tracker_result_store_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter) { 3129 TrackerResultStore * self;
variable 'self' set but not used
(emitted by gcc)
3130 self = (TrackerResultStore*) base;
Value stored to 'self' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3131 g_return_if_fail (iter != NULL); 3132 } 3133 3134 3135 static void tracker_result_store_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter) { 3136 TrackerResultStore * self;
variable 'self' set but not used
(emitted by gcc)
3137 self = (TrackerResultStore*) base;
Value stored to 'self' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3138 g_return_if_fail (iter != NULL); 3139 } 3140 3141 3142 static void tracker_result_store_theme_changed (TrackerResultStore* self, GtkIconTheme* theme) { 3143 GtkTreeIter iter = {0}; 3144 gint i = 0; 3145 gint j = 0; 3146 gint _tmp0_; 3147 g_return_if_fail (self != NULL); 3148 g_return_if_fail (theme != NULL); 3149 memset (&iter, 0, sizeof (GtkTreeIter)); 3150 _tmp0_ = self->priv->timestamp; 3151 iter.stamp = _tmp0_; 3152 { 3153 gboolean _tmp1_; 3154 i = 0; 3155 _tmp1_ = TRUE; 3156 while (TRUE) { 3157 gboolean _tmp2_; 3158 gint _tmp4_; 3159 GPtrArray* _tmp5_; 3160 gint _tmp6_; 3161 gint _tmp7_; 3162 GPtrArray* _tmp8_; 3163 gint _tmp9_; 3164 gconstpointer _tmp10_ = NULL; 3165 TrackerResultStoreCategoryNode* _tmp11_; 3166 TrackerResultStoreCategoryNode* cat; 3167 TrackerResultStoreCategoryNode* _tmp12_; 3168 _tmp2_ = _tmp1_; 3169 if (!_tmp2_) { 3170 gint _tmp3_; 3171 _tmp3_ = i; 3172 i = _tmp3_ + 1; 3173 } 3174 _tmp1_ = FALSE; 3175 _tmp4_ = i; 3176 _tmp5_ = self->priv->categories; 3177 _tmp6_ = g_ptr_array_get_length (_tmp5_); 3178 _tmp7_ = _tmp6_; 3179 if (!(_tmp4_ < _tmp7_)) { 3180 break; 3181 } 3182 _tmp8_ = self->priv->categories; 3183 _tmp9_ = i; 3184 _tmp10_ = g_ptr_array_index (_tmp8_, (guint) _tmp9_); 3185 _tmp11_ = _tracker_result_store_category_node_ref0 ((TrackerResultStoreCategoryNode*) _tmp10_); 3186 cat = _tmp11_; 3187 _tmp12_ = cat; 3188 iter.user_data = _tmp12_; 3189 { 3190 TrackerResultStoreCategoryNode* _tmp13_; 3191 gint _tmp14_; 3192 gboolean _tmp15_; 3193 _tmp13_ = cat; 3194 _tmp14_ = _tmp13_->count; 3195 j = _tmp14_ - 1; 3196 _tmp15_ = TRUE; 3197 while (TRUE) { 3198 gboolean _tmp16_; 3199 gint _tmp18_; 3200 TrackerResultStoreCategoryNode* _tmp19_; 3201 TrackerResultStoreResultNode* _tmp20_; 3202 gint _tmp20__length1; 3203 gint _tmp21_; 3204 TrackerResultStoreResultNode _tmp22_; 3205 TrackerResultStoreResultNode _tmp23_ = {0}; 3206 TrackerResultStoreResultNode _result_; 3207 TrackerResultStoreCategoryNode* _tmp24_; 3208 TrackerResultStoreResultNode* _tmp25_; 3209 gint _tmp25__length1;
variable '_tmp25__length1' set but not used
(emitted by gcc)
3210 gint _tmp26_; 3211 gint _tmp27_; 3212 void* _tmp28_ = NULL; 3213 TrackerResultStoreResultNode _tmp29_; 3214 GdkPixbuf* _tmp30_; 3215 _tmp16_ = _tmp15_; 3216 if (!_tmp16_) { 3217 gint _tmp17_; 3218 _tmp17_ = j; 3219 j = _tmp17_ - 1; 3220 } 3221 _tmp15_ = FALSE; 3222 _tmp18_ = j; 3223 if (!(_tmp18_ >= 0)) { 3224 break; 3225 } 3226 _tmp19_ = cat; 3227 _tmp20_ = _tmp19_->results; 3228 _tmp20__length1 = _tmp19_->results_length1;
Value stored to '_tmp20__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3229 _tmp21_ = j; 3230 _tmp22_ = _tmp20_[_tmp21_]; 3231 tracker_result_store_result_node_copy (&_tmp22_, &_tmp23_); 3232 _result_ = _tmp23_; 3233 _tmp24_ = cat; 3234 _tmp25_ = _tmp24_->results; 3235 _tmp25__length1 = _tmp24_->results_length1;
Value stored to '_tmp25__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3236 _tmp26_ = j; 3237 iter.user_data2 = &_tmp25_[_tmp26_]; 3238 _tmp27_ = j; 3239 _tmp28_ = GINT_TO_POINTER (_tmp27_); 3240 iter.user_data3 = _tmp28_; 3241 _tmp29_ = _result_; 3242 _tmp30_ = _tmp29_.pixbuf; 3243 if (_tmp30_ != NULL) { 3244 GtkTreeIter _tmp31_; 3245 _tmp31_ = iter; 3246 tracker_result_store_fetch_thumbnail (self, &_tmp31_, NULL, NULL); 3247 } 3248 tracker_result_store_result_node_destroy (&_result_); 3249 } 3250 } 3251 _tracker_result_store_category_node_unref0 (cat); 3252 } 3253 } 3254 } 3255 3256 3257 static void _tracker_result_store_category_node_unref0_ (gpointer var) { 3258 (var == NULL) ? NULL : (var = (tracker_result_store_category_node_unref (var), NULL)); 3259 } 3260 3261 3262 static void _g_object_unref0_ (gpointer var) { 3263 (var == NULL) ? NULL : (var = (g_object_unref (var), NULL)); 3264 } 3265 3266 3267 static void _tracker_result_store_theme_changed_gtk_icon_theme_changed (GtkIconTheme* _sender, gpointer self) { 3268 tracker_result_store_theme_changed (self, _sender); 3269 } 3270 3271 3272 TrackerResultStore* tracker_result_store_construct (GType object_type, gint _n_columns) { 3273 TrackerResultStore * self = NULL; 3274 GPtrArray* _tmp0_; 3275 GPtrArray* _tmp1_; 3276 GPtrArray* _tmp2_; 3277 gint _tmp3_; 3278 GdkScreen* _tmp4_ = NULL; 3279 GtkIconTheme* _tmp5_ = NULL; 3280 GtkIconTheme* _tmp6_; 3281 GtkIconTheme* theme; 3282 self = (TrackerResultStore*) g_object_new (object_type, NULL); 3283 _tmp0_ = g_ptr_array_new_with_free_func (_tracker_result_store_category_node_unref0_); 3284 _g_ptr_array_unref0 (self->priv->categories); 3285 self->priv->categories = _tmp0_; 3286 _tmp1_ = g_ptr_array_new_with_free_func (_g_object_unref0_); 3287 _g_ptr_array_unref0 (self->priv->running_operations); 3288 self->priv->running_operations = _tmp1_; 3289 _tmp2_ = g_ptr_array_new_with_free_func (_g_object_unref0_); 3290 _g_ptr_array_unref0 (self->priv->delayed_operations); 3291 self->priv->delayed_operations = _tmp2_; 3292 _tmp3_ = _n_columns; 3293 self->priv->n_columns = _tmp3_; 3294 self->priv->timestamp = 1; 3295 tracker_result_store_set_icon_size (self, 24); 3296 _tmp4_ = gdk_screen_get_default (); 3297 _tmp5_ = gtk_icon_theme_get_for_screen (_tmp4_); 3298 _tmp6_ = _g_object_ref0 (_tmp5_); 3299 theme = _tmp6_; 3300 g_signal_connect_object (theme, "changed", (GCallback) _tracker_result_store_theme_changed_gtk_icon_theme_changed, self, 0); 3301 _g_object_unref0 (theme); 3302 return self; 3303 } 3304 3305 3306 TrackerResultStore* tracker_result_store_new (gint _n_columns) { 3307 return tracker_result_store_construct (TRACKER_TYPE_RESULT_STORE, _n_columns); 3308 } 3309 3310 3311 static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) { 3312 if ((*length) == (*size)) { 3313 *size = (*size) ? (2 * (*size)) : 4; 3314 *array = g_renew (gchar*, *array, (*size) + 1); 3315 } 3316 (*array)[(*length)++] = value; 3317 (*array)[*length] = NULL; 3318 } 3319 3320 3321 static gchar** _vala_array_dup2 (gchar** self, int length) { 3322 gchar** result; 3323 int i; 3324 result = g_new0 (gchar*, length + 1); 3325 for (i = 0; i < length; i++) { 3326 gchar* _tmp0_; 3327 _tmp0_ = g_strdup (self[i]); 3328 result[i] = _tmp0_; 3329 } 3330 return result; 3331 } 3332 3333 3334 static void _vala_array_add3 (TrackerResultStoreQueryData** array, int* length, int* size, const TrackerResultStoreQueryData* value) { 3335 if ((*length) == (*size)) { 3336 *size = (*size) ? (2 * (*size)) : 4; 3337 *array = g_renew (TrackerResultStoreQueryData, *array, *size); 3338 } 3339 (*array)[(*length)++] = *value; 3340 } 3341 3342 3343 void tracker_result_store_add_query (TrackerResultStore* self, TrackerQueryType type, TrackerQueryMatch match, ...) { 3344 va_list l = {0};
missing braces around initializer
(emitted by gcc)
3345 gchar* str; 3346 gchar** args; 3347 gint args_length1; 3348 gint _args_size_; 3349 TrackerResultStoreQueryData query_data = {0}; 3350 gchar** _tmp9_; 3351 gint _tmp9__length1; 3352 gint _tmp10_; 3353 TrackerQueryType _tmp11_; 3354 TrackerQueryMatch _tmp12_; 3355 gchar** _tmp13_; 3356 gint _tmp13__length1; 3357 gchar** _tmp14_; 3358 gint _tmp14__length1; 3359 TrackerResultStoreQueryData* _tmp15_; 3360 gint _tmp15__length1; 3361 TrackerResultStoreQueryData _tmp16_; 3362 TrackerResultStoreQueryData _tmp17_ = {0}; 3363 g_return_if_fail (self != NULL); 3364 va_start (l, match); 3365 str = NULL; 3366 args = NULL; 3367 args_length1 = 0; 3368 _args_size_ = args_length1; 3369 { 3370 gboolean _tmp0_; 3371 _tmp0_ = TRUE; 3372 while (TRUE) { 3373 gboolean _tmp1_; 3374 const gchar* _tmp3_ = NULL; 3375 gchar* _tmp4_; 3376 const gchar* _tmp5_; 3377 _tmp1_ = _tmp0_; 3378 if (!_tmp1_) { 3379 const gchar* _tmp2_; 3380 _tmp2_ = str; 3381 if (!(_tmp2_ != NULL)) { 3382 break; 3383 } 3384 } 3385 _tmp0_ = FALSE; 3386 _tmp3_ = va_arg (l, gchar*); 3387 _tmp4_ = g_strdup (_tmp3_); 3388 _g_free0 (str); 3389 str = _tmp4_; 3390 _tmp5_ = str; 3391 if (_tmp5_ != NULL) { 3392 gchar** _tmp6_; 3393 gint _tmp6__length1; 3394 const gchar* _tmp7_; 3395 gchar* _tmp8_; 3396 _tmp6_ = args;
Value stored to '_tmp6_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3397 _tmp6__length1 = args_length1;
Value stored to '_tmp6__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3398 _tmp7_ = str; 3399 _tmp8_ = g_strdup (_tmp7_); 3400 _vala_array_add2 (&args, &args_length1, &_args_size_, _tmp8_); 3401 } 3402 } 3403 } 3404 _tmp9_ = args;
Value stored to '_tmp9_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3405 _tmp9__length1 = args_length1; 3406 _tmp10_ = self->priv->n_columns; 3407 if (_tmp9__length1 != _tmp10_) { 3408 g_warning ("tracker-result-store.vala:866: Arguments and number of columns doesn't" \ 3409 " match"); 3410 tracker_result_store_query_data_destroy (&query_data); 3411 args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL); 3412 _g_free0 (str); 3413 va_end (l); 3414 return; 3415 } 3416 tracker_result_store_query_data_destroy (&query_data); 3417 memset (&query_data, 0, sizeof (TrackerResultStoreQueryData)); 3418 _tmp11_ = type; 3419 query_data.type = _tmp11_; 3420 _tmp12_ = match; 3421 query_data.match = _tmp12_; 3422 _tmp13_ = args; 3423 _tmp13__length1 = args_length1; 3424 _tmp14_ = (_tmp13_ != NULL) ? _vala_array_dup2 (_tmp13_, _tmp13__length1) : ((gpointer) _tmp13_); 3425 _tmp14__length1 = _tmp13__length1; 3426 query_data.args = (_vala_array_free (query_data.args, query_data.args_length1, (GDestroyNotify) g_free), NULL); 3427 query_data.args = _tmp14_; 3428 query_data.args_length1 = _tmp14__length1; 3429 query_data._args_size_ = query_data.args_length1; 3430 _tmp15_ = self->priv->queries;
Value stored to '_tmp15_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3431 _tmp15__length1 = self->priv->queries_length1;
Value stored to '_tmp15__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3432 _tmp16_ = query_data; 3433 tracker_result_store_query_data_copy (&_tmp16_, &_tmp17_); 3434 _vala_array_add3 (&self->priv->queries, &self->priv->queries_length1, &self->priv->_queries_size_, &_tmp17_); 3435 tracker_result_store_query_data_destroy (&query_data); 3436 args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL); 3437 _g_free0 (str); 3438 va_end (l); 3439 } 3440 3441 3442 gboolean tracker_result_store_has_results (TrackerResultStore* self) { 3443 gboolean result = FALSE; 3444 gint _tmp0_ = 0; 3445 g_return_val_if_fail (self != NULL, FALSE); 3446 _tmp0_ = tracker_result_store_filled_categories_count (self); 3447 result = _tmp0_ > 0; 3448 return result; 3449 } 3450 3451 3452 void tracker_result_store_cancel_search (TrackerResultStore* self) { 3453 GCancellable* _tmp0_; 3454 g_return_if_fail (self != NULL); 3455 _tmp0_ = self->priv->cancellable; 3456 if (_tmp0_ != NULL) { 3457 GCancellable* _tmp1_; 3458 _tmp1_ = self->priv->cancellable; 3459 g_cancellable_cancel (_tmp1_); 3460 _g_object_unref0 (self->priv->cancellable); 3461 self->priv->cancellable = NULL; 3462 } 3463 tracker_result_store_clear_results (self); 3464 } 3465 3466 3467 gint tracker_result_store_get_icon_size (TrackerResultStore* self) { 3468 gint result; 3469 gint _tmp0_; 3470 g_return_val_if_fail (self != NULL, 0); 3471 _tmp0_ = self->priv->_icon_size; 3472 result = _tmp0_; 3473 return result; 3474 } 3475 3476 3477 void tracker_result_store_set_icon_size (TrackerResultStore* self, gint value) { 3478 gint _tmp0_; 3479 g_return_if_fail (self != NULL); 3480 _tmp0_ = value; 3481 self->priv->_icon_size = _tmp0_; 3482 g_object_notify ((GObject *) self, "icon-size"); 3483 } 3484 3485 3486 guint tracker_result_store_get_limit (TrackerResultStore* self) { 3487 guint result; 3488 guint _tmp0_; 3489 g_return_val_if_fail (self != NULL, 0U); 3490 _tmp0_ = self->priv->_limit; 3491 result = _tmp0_; 3492 return result; 3493 } 3494 3495 3496 void tracker_result_store_set_limit (TrackerResultStore* self, guint value) { 3497 guint _tmp0_; 3498 g_return_if_fail (self != NULL); 3499 _tmp0_ = value; 3500 self->priv->_limit = _tmp0_; 3501 g_object_notify ((GObject *) self, "limit"); 3502 } 3503 3504 3505 const gchar* tracker_result_store_get_search_term (TrackerResultStore* self) { 3506 const gchar* result; 3507 const gchar* _tmp0_; 3508 g_return_val_if_fail (self != NULL, NULL); 3509 _tmp0_ = self->priv->_search_term; 3510 result = _tmp0_; 3511 return result; 3512 } 3513 3514 3515 void tracker_result_store_set_search_term (TrackerResultStore* self, const gchar* value) { 3516 gint i = 0; 3517 const gchar* _tmp0_; 3518 gchar* _tmp1_; 3519 GCancellable* _tmp2_; 3520 GPtrArray* _tmp3_; 3521 GPtrArray* _tmp4_; 3522 GPtrArray* _tmp5_; 3523 gint _tmp6_; 3524 g_return_if_fail (self != NULL); 3525 tracker_result_store_cancel_search (self); 3526 _tmp0_ = value; 3527 _tmp1_ = g_strdup (_tmp0_); 3528 _g_free0 (self->priv->_search_term); 3529 self->priv->_search_term = _tmp1_; 3530 _tmp2_ = g_cancellable_new (); 3531 _g_object_unref0 (self->priv->cancellable); 3532 self->priv->cancellable = _tmp2_; 3533 tracker_result_store_set_active (self, TRUE); 3534 _tmp3_ = g_ptr_array_new_with_free_func (_tracker_result_store_category_node_unref0_); 3535 _g_ptr_array_unref0 (self->priv->categories); 3536 self->priv->categories = _tmp3_; 3537 _tmp4_ = g_ptr_array_new_with_free_func (_g_object_unref0_); 3538 _g_ptr_array_unref0 (self->priv->running_operations); 3539 self->priv->running_operations = _tmp4_; 3540 _tmp5_ = g_ptr_array_new_with_free_func (_g_object_unref0_); 3541 _g_ptr_array_unref0 (self->priv->delayed_operations); 3542 self->priv->delayed_operations = _tmp5_; 3543 _tmp6_ = self->priv->timestamp; 3544 self->priv->timestamp = _tmp6_ + 1; 3545 { 3546 gboolean _tmp7_; 3547 i = 0; 3548 _tmp7_ = TRUE; 3549 while (TRUE) { 3550 gboolean _tmp8_; 3551 gint _tmp10_; 3552 TrackerResultStoreQueryData* _tmp11_; 3553 gint _tmp11__length1; 3554 TrackerResultStoreQueryData* _tmp12_; 3555 gint _tmp12__length1;
variable '_tmp12__length1' set but not used
(emitted by gcc)
3556 gint _tmp13_; 3557 GCancellable* _tmp14_; 3558 _tmp8_ = _tmp7_; 3559 if (!_tmp8_) { 3560 gint _tmp9_; 3561 _tmp9_ = i; 3562 i = _tmp9_ + 1; 3563 } 3564 _tmp7_ = FALSE; 3565 _tmp10_ = i; 3566 _tmp11_ = self->priv->queries;
Value stored to '_tmp11_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3567 _tmp11__length1 = self->priv->queries_length1; 3568 if (!(_tmp10_ < _tmp11__length1)) { 3569 break; 3570 } 3571 _tmp12_ = self->priv->queries; 3572 _tmp12__length1 = self->priv->queries_length1;
Value stored to '_tmp12__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3573 _tmp13_ = i; 3574 _tmp14_ = self->priv->cancellable; 3575 tracker_result_store_load_category (self, &_tmp12_[_tmp13_], _tmp14_, NULL, NULL); 3576 } 3577 } 3578 g_object_notify ((GObject *) self, "search-term"); 3579 } 3580 3581 3582 GPtrArray* tracker_result_store_get_search_tags (TrackerResultStore* self) { 3583 GPtrArray* result; 3584 GPtrArray* _tmp0_; 3585 g_return_val_if_fail (self != NULL, NULL); 3586 _tmp0_ = self->priv->_search_tags; 3587 result = _tmp0_; 3588 return result; 3589 } 3590 3591 3592 static gpointer _g_ptr_array_ref0 (gpointer self) { 3593 return self ? g_ptr_array_ref (self) : NULL; 3594 } 3595 3596 3597 void tracker_result_store_set_search_tags (TrackerResultStore* self, GPtrArray* value) { 3598 GPtrArray* _tmp0_; 3599 GPtrArray* _tmp1_; 3600 g_return_if_fail (self != NULL); 3601 _tmp0_ = value; 3602 _tmp1_ = _g_ptr_array_ref0 (_tmp0_); 3603 _g_ptr_array_unref0 (self->priv->_search_tags); 3604 self->priv->_search_tags = _tmp1_; 3605 g_object_notify ((GObject *) self, "search-tags"); 3606 } 3607 3608 3609 gboolean tracker_result_store_get_active (TrackerResultStore* self) { 3610 gboolean result; 3611 gboolean _tmp0_; 3612 g_return_val_if_fail (self != NULL, FALSE); 3613 _tmp0_ = self->priv->_active; 3614 result = _tmp0_; 3615 return result; 3616 } 3617 3618 3619 static void tracker_result_store_set_active (TrackerResultStore* self, gboolean value) { 3620 gboolean _tmp0_; 3621 g_return_if_fail (self != NULL); 3622 _tmp0_ = value; 3623 self->priv->_active = _tmp0_; 3624 g_object_notify ((GObject *) self, "active"); 3625 } 3626 3627 3628 static void _vala_TrackerResultStoreResultNode_array_free (TrackerResultStoreResultNode* array, gint array_length) { 3629 if (array != NULL) { 3630 int i; 3631 for (i = 0; i < array_length; i = i + 1) { 3632 tracker_result_store_result_node_destroy (&array[i]); 3633 } 3634 } 3635 g_free (array); 3636 } 3637 3638 3639 static TrackerResultStoreCategoryNode* tracker_result_store_category_node_construct (GType object_type) { 3640 TrackerResultStoreCategoryNode* self = NULL; 3641 self = (TrackerResultStoreCategoryNode*) g_type_create_instance (object_type); 3642 return self; 3643 } 3644 3645 3646 static TrackerResultStoreCategoryNode* tracker_result_store_category_node_new (void) { 3647 return tracker_result_store_category_node_construct (TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE); 3648 } 3649 3650 3651 static void tracker_result_store_value_category_node_init (GValue* value) { 3652 value->data[0].v_pointer = NULL; 3653 } 3654 3655 3656 static void tracker_result_store_value_category_node_free_value (GValue* value) { 3657 if (value->data[0].v_pointer) { 3658 tracker_result_store_category_node_unref (value->data[0].v_pointer); 3659 } 3660 } 3661 3662 3663 static void tracker_result_store_value_category_node_copy_value (const GValue* src_value, GValue* dest_value) { 3664 if (src_value->data[0].v_pointer) { 3665 dest_value->data[0].v_pointer = tracker_result_store_category_node_ref (src_value->data[0].v_pointer); 3666 } else { 3667 dest_value->data[0].v_pointer = NULL; 3668 } 3669 } 3670 3671 3672 static gpointer tracker_result_store_value_category_node_peek_pointer (const GValue* value) { 3673 return value->data[0].v_pointer; 3674 } 3675 3676 3677 static gchar* tracker_result_store_value_category_node_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { 3678 if (collect_values[0].v_pointer) { 3679 TrackerResultStoreCategoryNode* object; 3680 object = collect_values[0].v_pointer; 3681 if (object->parent_instance.g_class == NULL) { 3682 return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); 3683 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { 3684 return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); 3685 } 3686 value->data[0].v_pointer = tracker_result_store_category_node_ref (object); 3687 } else { 3688 value->data[0].v_pointer = NULL; 3689 } 3690 return NULL; 3691 } 3692 3693 3694 static gchar* tracker_result_store_value_category_node_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { 3695 TrackerResultStoreCategoryNode** object_p; 3696 object_p = collect_values[0].v_pointer; 3697 if (!object_p) { 3698 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); 3699 } 3700 if (!value->data[0].v_pointer) { 3701 *object_p = NULL; 3702 } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { 3703 *object_p = value->data[0].v_pointer; 3704 } else { 3705 *object_p = tracker_result_store_category_node_ref (value->data[0].v_pointer); 3706 } 3707 return NULL; 3708 } 3709 3710 3711 static GParamSpec* tracker_result_store_param_spec_category_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { 3712 TrackerResultStoreParamSpecCategoryNode* spec; 3713 g_return_val_if_fail (g_type_is_a (object_type, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE), NULL); 3714 spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); 3715 G_PARAM_SPEC (spec)->value_type = object_type; 3716 return G_PARAM_SPEC (spec); 3717 } 3718 3719 3720 static gpointer tracker_result_store_value_get_category_node (const GValue* value) { 3721 g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE), NULL); 3722 return value->data[0].v_pointer; 3723 } 3724 3725 3726 static void tracker_result_store_value_set_category_node (GValue* value, gpointer v_object) { 3727 TrackerResultStoreCategoryNode* old; 3728 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE)); 3729 old = value->data[0].v_pointer; 3730 if (v_object) { 3731 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE)); 3732 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); 3733 value->data[0].v_pointer = v_object; 3734 tracker_result_store_category_node_ref (value->data[0].v_pointer); 3735 } else { 3736 value->data[0].v_pointer = NULL; 3737 } 3738 if (old) { 3739 tracker_result_store_category_node_unref (old); 3740 } 3741 } 3742 3743 3744 static void tracker_result_store_value_take_category_node (GValue* value, gpointer v_object) { 3745 TrackerResultStoreCategoryNode* old; 3746 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE)); 3747 old = value->data[0].v_pointer; 3748 if (v_object) { 3749 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE)); 3750 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); 3751 value->data[0].v_pointer = v_object; 3752 } else { 3753 value->data[0].v_pointer = NULL; 3754 } 3755 if (old) { 3756 tracker_result_store_category_node_unref (old); 3757 } 3758 } 3759 3760 3761 static void tracker_result_store_category_node_class_init (TrackerResultStoreCategoryNodeClass * klass) { 3762 tracker_result_store_category_node_parent_class = g_type_class_peek_parent (klass); 3763 TRACKER_RESULT_STORE_CATEGORY_NODE_CLASS (klass)->finalize = tracker_result_store_category_node_finalize; 3764 } 3765 3766 3767 static void tracker_result_store_category_node_instance_init (TrackerResultStoreCategoryNode * self) { 3768 self->ref_count = 1; 3769 } 3770 3771 3772 static void tracker_result_store_category_node_finalize (TrackerResultStoreCategoryNode* obj) { 3773 TrackerResultStoreCategoryNode * self; 3774 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_RESULT_STORE_TYPE_CATEGORY_NODE, TrackerResultStoreCategoryNode); 3775 self->results = (_vala_TrackerResultStoreResultNode_array_free (self->results, self->results_length1), NULL); 3776 _g_object_unref0 (self->pixbuf); 3777 } 3778 3779 3780 static GType tracker_result_store_category_node_get_type (void) { 3781 static volatile gsize tracker_result_store_category_node_type_id__volatile = 0; 3782 if (g_once_init_enter (&tracker_result_store_category_node_type_id__volatile)) { 3783 static const GTypeValueTable g_define_type_value_table = { tracker_result_store_value_category_node_init, tracker_result_store_value_category_node_free_value, tracker_result_store_value_category_node_copy_value, tracker_result_store_value_category_node_peek_pointer, "p", tracker_result_store_value_category_node_collect_value, "p", tracker_result_store_value_category_node_lcopy_value }; 3784 static const GTypeInfo g_define_type_info = { sizeof (TrackerResultStoreCategoryNodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_result_store_category_node_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerResultStoreCategoryNode), 0, (GInstanceInitFunc) tracker_result_store_category_node_instance_init, &g_define_type_value_table }; 3785 static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; 3786 GType tracker_result_store_category_node_type_id; 3787 tracker_result_store_category_node_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TrackerResultStoreCategoryNode", &g_define_type_info, &g_define_type_fundamental_info, 0); 3788 g_once_init_leave (&tracker_result_store_category_node_type_id__volatile, tracker_result_store_category_node_type_id); 3789 } 3790 return tracker_result_store_category_node_type_id__volatile; 3791 } 3792 3793 3794 static gpointer tracker_result_store_category_node_ref (gpointer instance) { 3795 TrackerResultStoreCategoryNode* self; 3796 self = instance; 3797 g_atomic_int_inc (&self->ref_count); 3798 return instance; 3799 } 3800 3801 3802 static void tracker_result_store_category_node_unref (gpointer instance) { 3803 TrackerResultStoreCategoryNode* self; 3804 self = instance; 3805 if (g_atomic_int_dec_and_test (&self->ref_count)) { 3806 TRACKER_RESULT_STORE_CATEGORY_NODE_GET_CLASS (self)->finalize (self); 3807 g_type_free_instance ((GTypeInstance *) self); 3808 } 3809 } 3810 3811 3812 static TrackerResultStoreOperation* tracker_result_store_operation_construct (GType object_type) { 3813 TrackerResultStoreOperation * self = NULL; 3814 self = (TrackerResultStoreOperation*) g_object_new (object_type, NULL); 3815 return self; 3816 } 3817 3818 3819 static TrackerResultStoreOperation* tracker_result_store_operation_new (void) { 3820 return tracker_result_store_operation_construct (TRACKER_RESULT_STORE_TYPE_OPERATION); 3821 } 3822 3823 3824 static void tracker_result_store_operation_class_init (TrackerResultStoreOperationClass * klass) { 3825 tracker_result_store_operation_parent_class = g_type_class_peek_parent (klass); 3826 G_OBJECT_CLASS (klass)->finalize = tracker_result_store_operation_finalize; 3827 } 3828 3829 3830 static void tracker_result_store_operation_instance_init (TrackerResultStoreOperation * self) { 3831 } 3832 3833 3834 static void tracker_result_store_operation_finalize (GObject* obj) { 3835 TrackerResultStoreOperation * self; 3836 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_RESULT_STORE_TYPE_OPERATION, TrackerResultStoreOperation); 3837 _tracker_result_store_category_node_unref0 (self->node); 3838 G_OBJECT_CLASS (tracker_result_store_operation_parent_class)->finalize (obj); 3839 } 3840 3841 3842 static GType tracker_result_store_operation_get_type (void) { 3843 static volatile gsize tracker_result_store_operation_type_id__volatile = 0; 3844 if (g_once_init_enter (&tracker_result_store_operation_type_id__volatile)) { 3845 static const GTypeInfo g_define_type_info = { sizeof (TrackerResultStoreOperationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_result_store_operation_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerResultStoreOperation), 0, (GInstanceInitFunc) tracker_result_store_operation_instance_init, NULL }; 3846 GType tracker_result_store_operation_type_id; 3847 tracker_result_store_operation_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerResultStoreOperation", &g_define_type_info, 0); 3848 g_once_init_leave (&tracker_result_store_operation_type_id__volatile, tracker_result_store_operation_type_id); 3849 } 3850 return tracker_result_store_operation_type_id__volatile; 3851 } 3852 3853 3854 static gchar** _vala_array_dup3 (gchar** self, int length) { 3855 gchar** result; 3856 int i; 3857 result = g_new0 (gchar*, length + 1); 3858 for (i = 0; i < length; i++) { 3859 gchar* _tmp0_; 3860 _tmp0_ = g_strdup (self[i]); 3861 result[i] = _tmp0_; 3862 } 3863 return result; 3864 } 3865 3866 3867 static void tracker_result_store_result_node_copy (const TrackerResultStoreResultNode* self, TrackerResultStoreResultNode* dest) { 3868 gchar** _tmp0_; 3869 gint _tmp0__length1; 3870 gchar** _tmp1_; 3871 gint _tmp1__length1; 3872 GdkPixbuf* _tmp2_; 3873 GdkPixbuf* _tmp3_; 3874 _tmp0_ = (*self).values; 3875 _tmp0__length1 = (*self).values_length1; 3876 _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup3 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); 3877 _tmp1__length1 = _tmp0__length1; 3878 (*dest).values = (_vala_array_free ((*dest).values, (*dest).values_length1, (GDestroyNotify) g_free), NULL); 3879 (*dest).values = _tmp1_; 3880 (*dest).values_length1 = _tmp1__length1; 3881 (*dest)._values_size_ = (*dest).values_length1; 3882 _tmp2_ = (*self).pixbuf; 3883 _tmp3_ = _g_object_ref0 (_tmp2_); 3884 _g_object_unref0 ((*dest).pixbuf); 3885 (*dest).pixbuf = _tmp3_; 3886 } 3887 3888 3889 static void tracker_result_store_result_node_destroy (TrackerResultStoreResultNode* self) { 3890 (*self).values = (_vala_array_free ((*self).values, (*self).values_length1, (GDestroyNotify) g_free), NULL); 3891 _g_object_unref0 ((*self).pixbuf); 3892 } 3893 3894 3895 static TrackerResultStoreResultNode* tracker_result_store_result_node_dup (const TrackerResultStoreResultNode* self) { 3896 TrackerResultStoreResultNode* dup; 3897 dup = g_new0 (TrackerResultStoreResultNode, 1); 3898 tracker_result_store_result_node_copy (self, dup); 3899 return dup; 3900 } 3901 3902 3903 static void tracker_result_store_result_node_free (TrackerResultStoreResultNode* self) { 3904 tracker_result_store_result_node_destroy (self); 3905 g_free (self); 3906 } 3907 3908 3909 static GType tracker_result_store_result_node_get_type (void) { 3910 static volatile gsize tracker_result_store_result_node_type_id__volatile = 0; 3911 if (g_once_init_enter (&tracker_result_store_result_node_type_id__volatile)) { 3912 GType tracker_result_store_result_node_type_id; 3913 tracker_result_store_result_node_type_id = g_boxed_type_register_static ("TrackerResultStoreResultNode", (GBoxedCopyFunc) tracker_result_store_result_node_dup, (GBoxedFreeFunc) tracker_result_store_result_node_free); 3914 g_once_init_leave (&tracker_result_store_result_node_type_id__volatile, tracker_result_store_result_node_type_id); 3915 } 3916 return tracker_result_store_result_node_type_id__volatile; 3917 } 3918 3919 3920 static gchar** _vala_array_dup4 (gchar** self, int length) { 3921 gchar** result; 3922 int i; 3923 result = g_new0 (gchar*, length + 1); 3924 for (i = 0; i < length; i++) { 3925 gchar* _tmp0_; 3926 _tmp0_ = g_strdup (self[i]); 3927 result[i] = _tmp0_; 3928 } 3929 return result; 3930 } 3931 3932 3933 static void tracker_result_store_query_data_copy (const TrackerResultStoreQueryData* self, TrackerResultStoreQueryData* dest) { 3934 TrackerQueryType _tmp0_; 3935 TrackerQueryMatch _tmp1_; 3936 gchar** _tmp2_; 3937 gint _tmp2__length1; 3938 gchar** _tmp3_; 3939 gint _tmp3__length1; 3940 _tmp0_ = (*self).type; 3941 (*dest).type = _tmp0_; 3942 _tmp1_ = (*self).match; 3943 (*dest).match = _tmp1_; 3944 _tmp2_ = (*self).args; 3945 _tmp2__length1 = (*self).args_length1; 3946 _tmp3_ = (_tmp2_ != NULL) ? _vala_array_dup4 (_tmp2_, _tmp2__length1) : ((gpointer) _tmp2_); 3947 _tmp3__length1 = _tmp2__length1; 3948 (*dest).args = (_vala_array_free ((*dest).args, (*dest).args_length1, (GDestroyNotify) g_free), NULL); 3949 (*dest).args = _tmp3_; 3950 (*dest).args_length1 = _tmp3__length1; 3951 (*dest)._args_size_ = (*dest).args_length1; 3952 } 3953 3954 3955 static void tracker_result_store_query_data_destroy (TrackerResultStoreQueryData* self) { 3956 (*self).args = (_vala_array_free ((*self).args, (*self).args_length1, (GDestroyNotify) g_free), NULL); 3957 } 3958 3959 3960 static TrackerResultStoreQueryData* tracker_result_store_query_data_dup (const TrackerResultStoreQueryData* self) { 3961 TrackerResultStoreQueryData* dup; 3962 dup = g_new0 (TrackerResultStoreQueryData, 1); 3963 tracker_result_store_query_data_copy (self, dup); 3964 return dup; 3965 } 3966 3967 3968 static void tracker_result_store_query_data_free (TrackerResultStoreQueryData* self) { 3969 tracker_result_store_query_data_destroy (self); 3970 g_free (self); 3971 } 3972 3973 3974 static GType tracker_result_store_query_data_get_type (void) { 3975 static volatile gsize tracker_result_store_query_data_type_id__volatile = 0; 3976 if (g_once_init_enter (&tracker_result_store_query_data_type_id__volatile)) { 3977 GType tracker_result_store_query_data_type_id; 3978 tracker_result_store_query_data_type_id = g_boxed_type_register_static ("TrackerResultStoreQueryData", (GBoxedCopyFunc) tracker_result_store_query_data_dup, (GBoxedFreeFunc) tracker_result_store_query_data_free); 3979 g_once_init_leave (&tracker_result_store_query_data_type_id__volatile, tracker_result_store_query_data_type_id); 3980 } 3981 return tracker_result_store_query_data_type_id__volatile; 3982 } 3983 3984 3985 static void tracker_result_store_class_init (TrackerResultStoreClass * klass) { 3986 tracker_result_store_parent_class = g_type_class_peek_parent (klass); 3987 g_type_class_add_private (klass, sizeof (TrackerResultStorePrivate)); 3988 G_OBJECT_CLASS (klass)->get_property = _vala_tracker_result_store_get_property; 3989 G_OBJECT_CLASS (klass)->set_property = _vala_tracker_result_store_set_property; 3990 G_OBJECT_CLASS (klass)->finalize = tracker_result_store_finalize; 3991 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_RESULT_STORE_ICON_SIZE, g_param_spec_int ("icon-size", "icon-size", "icon-size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); 3992 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_RESULT_STORE_LIMIT, g_param_spec_uint ("limit", "limit", "limit", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); 3993 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_RESULT_STORE_SEARCH_TERM, g_param_spec_string ("search-term", "search-term", "search-term", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); 3994 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_RESULT_STORE_SEARCH_TAGS, g_param_spec_boxed ("search-tags", "search-tags", "search-tags", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); 3995 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_RESULT_STORE_ACTIVE, g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); 3996 g_signal_new ("result_overflow", TRACKER_TYPE_RESULT_STORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); 3997 } 3998 3999 4000 static void tracker_result_store_gtk_tree_model_interface_init (GtkTreeModelIface * iface) { 4001 tracker_result_store_gtk_tree_model_parent_iface = g_type_interface_peek_parent (iface); 4002 iface->get_column_type = (GType (*)(GtkTreeModel*, gint)) tracker_result_store_real_get_column_type; 4003 iface->get_flags = (GtkTreeModelFlags (*)(GtkTreeModel*)) tracker_result_store_real_get_flags; 4004 iface->get_iter = (gboolean (*)(GtkTreeModel*, GtkTreeIter*, GtkTreePath*)) tracker_result_store_real_get_iter; 4005 iface->get_n_columns = (gint (*)(GtkTreeModel*)) tracker_result_store_real_get_n_columns; 4006 iface->get_path = (GtkTreePath* (*)(GtkTreeModel*, GtkTreeIter*)) tracker_result_store_real_get_path; 4007 iface->get_value = (void (*)(GtkTreeModel*, GtkTreeIter*, gint, GValue*)) tracker_result_store_real_get_value; 4008 iface->iter_children = (gboolean (*)(GtkTreeModel*, GtkTreeIter*, GtkTreeIter*)) tracker_result_store_real_iter_children; 4009 iface->iter_has_child = (gboolean (*)(GtkTreeModel*, GtkTreeIter*)) tracker_result_store_real_iter_has_child; 4010 iface->iter_n_children = (gint (*)(GtkTreeModel*, GtkTreeIter*)) tracker_result_store_real_iter_n_children; 4011 iface->iter_next = (gboolean (*)(GtkTreeModel*, GtkTreeIter*)) tracker_result_store_real_iter_next; 4012 iface->iter_nth_child = (gboolean (*)(GtkTreeModel*, GtkTreeIter*, GtkTreeIter*, gint)) tracker_result_store_real_iter_nth_child; 4013 iface->iter_parent = (gboolean (*)(GtkTreeModel*, GtkTreeIter*, GtkTreeIter*)) tracker_result_store_real_iter_parent; 4014 iface->ref_node = (void (*)(GtkTreeModel*, GtkTreeIter*)) tracker_result_store_real_ref_node; 4015 iface->unref_node = (void (*)(GtkTreeModel*, GtkTreeIter*)) tracker_result_store_real_unref_node; 4016 } 4017 4018 4019 static void tracker_result_store_instance_init (TrackerResultStore * self) { 4020 self->priv = TRACKER_RESULT_STORE_GET_PRIVATE (self); 4021 self->priv->n_extra_columns = 2; 4022 } 4023 4024 4025 static void tracker_result_store_finalize (GObject* obj) { 4026 TrackerResultStore * self; 4027 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_TYPE_RESULT_STORE, TrackerResultStore); 4028 _g_object_unref0 (self->priv->cancellable); 4029 self->priv->queries = (_vala_TrackerResultStoreQueryData_array_free (self->priv->queries, self->priv->queries_length1), NULL); 4030 _g_ptr_array_unref0 (self->priv->categories); 4031 _g_ptr_array_unref0 (self->priv->running_operations); 4032 _g_ptr_array_unref0 (self->priv->delayed_operations); 4033 _g_free0 (self->priv->_search_term); 4034 _g_ptr_array_unref0 (self->priv->_search_tags); 4035 G_OBJECT_CLASS (tracker_result_store_parent_class)->finalize (obj); 4036 } 4037 4038 4039 GType tracker_result_store_get_type (void) { 4040 static volatile gsize tracker_result_store_type_id__volatile = 0; 4041 if (g_once_init_enter (&tracker_result_store_type_id__volatile)) { 4042 static const GTypeInfo g_define_type_info = { sizeof (TrackerResultStoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_result_store_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerResultStore), 0, (GInstanceInitFunc) tracker_result_store_instance_init, NULL }; 4043 static const GInterfaceInfo gtk_tree_model_info = { (GInterfaceInitFunc) tracker_result_store_gtk_tree_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; 4044 GType tracker_result_store_type_id; 4045 tracker_result_store_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerResultStore", &g_define_type_info, 0); 4046 g_type_add_interface_static (tracker_result_store_type_id, GTK_TYPE_TREE_MODEL, &gtk_tree_model_info); 4047 g_once_init_leave (&tracker_result_store_type_id__volatile, tracker_result_store_type_id); 4048 } 4049 return tracker_result_store_type_id__volatile; 4050 } 4051 4052 4053 static void _vala_tracker_result_store_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { 4054 TrackerResultStore * self; 4055 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_TYPE_RESULT_STORE, TrackerResultStore); 4056 switch (property_id) { 4057 case TRACKER_RESULT_STORE_ICON_SIZE: 4058 g_value_set_int (value, tracker_result_store_get_icon_size (self)); 4059 break; 4060 case TRACKER_RESULT_STORE_LIMIT: 4061 g_value_set_uint (value, tracker_result_store_get_limit (self)); 4062 break; 4063 case TRACKER_RESULT_STORE_SEARCH_TERM: 4064 g_value_set_string (value, tracker_result_store_get_search_term (self)); 4065 break; 4066 case TRACKER_RESULT_STORE_SEARCH_TAGS: 4067 g_value_set_boxed (value, tracker_result_store_get_search_tags (self)); 4068 break; 4069 case TRACKER_RESULT_STORE_ACTIVE: 4070 g_value_set_boolean (value, tracker_result_store_get_active (self)); 4071 break; 4072 default: 4073 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); 4074 break; 4075 } 4076 } 4077 4078 4079 static void _vala_tracker_result_store_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { 4080 TrackerResultStore * self; 4081 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_TYPE_RESULT_STORE, TrackerResultStore); 4082 switch (property_id) { 4083 case TRACKER_RESULT_STORE_ICON_SIZE: 4084 tracker_result_store_set_icon_size (self, g_value_get_int (value)); 4085 break; 4086 case TRACKER_RESULT_STORE_LIMIT: 4087 tracker_result_store_set_limit (self, g_value_get_uint (value)); 4088 break; 4089 case TRACKER_RESULT_STORE_SEARCH_TERM: 4090 tracker_result_store_set_search_term (self, g_value_get_string (value)); 4091 break; 4092 case TRACKER_RESULT_STORE_SEARCH_TAGS: 4093 tracker_result_store_set_search_tags (self, g_value_get_boxed (value)); 4094 break; 4095 case TRACKER_RESULT_STORE_ACTIVE: 4096 tracker_result_store_set_active (self, g_value_get_boolean (value)); 4097 break; 4098 default: 4099 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); 4100 break; 4101 } 4102 } 4103 4104 4105 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { 4106 if ((array != NULL) && (destroy_func != NULL)) { 4107 int i; 4108 for (i = 0; i < array_length; i = i + 1) { 4109 if (((gpointer*) array)[i] != NULL) { 4110 destroy_func (((gpointer*) array)[i]); 4111 } 4112 } 4113 } 4114 } 4115 4116 4117 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { 4118 _vala_array_destroy (array, array_length, destroy_func); 4119 g_free (array); 4120 }