Back to index

libunity  5.92.0
unity-lens-tools.c
Go to the documentation of this file.
00001 /* unity-lens-tools.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-lens-tools.vala, do not modify */
00003 
00004 /*
00005  * Copyright (C) 2011 Canonical, Ltd.
00006  *
00007  * This library is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU Lesser General Public License
00009  * version 3.0 as published by the Free Software Foundation.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License version 3.0 for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library. If not, see
00018  * <http://www.gnu.org/licenses/>.
00019  *
00020  * Authored by Neil Jagdish Patel <neil.patel@canonical.com>
00021  *
00022  */
00023 
00024 #include <glib.h>
00025 #include <glib-object.h>
00026 #include <stdlib.h>
00027 #include <string.h>
00028 #include <dee.h>
00029 #include <gee.h>
00030 #include "unity.h"
00031 #include <gobject/gvaluecollector.h>
00032 
00033 
00034 #define UNITY_TYPE_TOOLS (unity_tools_get_type ())
00035 #define UNITY_TOOLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_TOOLS, UnityTools))
00036 #define UNITY_TOOLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_TOOLS, UnityToolsClass))
00037 #define UNITY_IS_TOOLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_TOOLS))
00038 #define UNITY_IS_TOOLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_TOOLS))
00039 #define UNITY_TOOLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_TOOLS, UnityToolsClass))
00040 
00041 typedef struct _UnityTools UnityTools;
00042 typedef struct _UnityToolsClass UnityToolsClass;
00043 typedef struct _UnityToolsPrivate UnityToolsPrivate;
00044 #define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
00045 #define _g_free0(var) (var = (g_free (var), NULL))
00046 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
00047 #define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))
00048 typedef struct _UnityParamSpecTools UnityParamSpecTools;
00049 
00050 #define UNITY_TYPE_FILTERS_SYNCHRONIZER (unity_filters_synchronizer_get_type ())
00051 #define UNITY_FILTERS_SYNCHRONIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizer))
00052 #define UNITY_FILTERS_SYNCHRONIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizerClass))
00053 #define UNITY_IS_FILTERS_SYNCHRONIZER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_FILTERS_SYNCHRONIZER))
00054 #define UNITY_IS_FILTERS_SYNCHRONIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_FILTERS_SYNCHRONIZER))
00055 #define UNITY_FILTERS_SYNCHRONIZER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizerClass))
00056 
00057 typedef struct _UnityFiltersSynchronizer UnityFiltersSynchronizer;
00058 typedef struct _UnityFiltersSynchronizerClass UnityFiltersSynchronizerClass;
00059 typedef struct _UnityFiltersSynchronizerPrivate UnityFiltersSynchronizerPrivate;
00060 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00061 
00062 #define UNITY_TYPE_FILTER_COLUMN (unity_filter_column_get_type ())
00063 
00064 #define UNITY_TYPE_RESULTS_SYNCHRONIZER (unity_results_synchronizer_get_type ())
00065 #define UNITY_RESULTS_SYNCHRONIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizer))
00066 #define UNITY_RESULTS_SYNCHRONIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizerClass))
00067 #define UNITY_IS_RESULTS_SYNCHRONIZER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_RESULTS_SYNCHRONIZER))
00068 #define UNITY_IS_RESULTS_SYNCHRONIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_RESULTS_SYNCHRONIZER))
00069 #define UNITY_RESULTS_SYNCHRONIZER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizerClass))
00070 
00071 typedef struct _UnityResultsSynchronizer UnityResultsSynchronizer;
00072 typedef struct _UnityResultsSynchronizerClass UnityResultsSynchronizerClass;
00073 typedef struct _UnityResultsSynchronizerPrivate UnityResultsSynchronizerPrivate;
00074 
00075 struct _UnityTools {
00076        GTypeInstance parent_instance;
00077        volatile int ref_count;
00078        UnityToolsPrivate * priv;
00079 };
00080 
00081 struct _UnityToolsClass {
00082        GTypeClass parent_class;
00083        void (*finalize) (UnityTools *self);
00084 };
00085 
00086 struct _UnityParamSpecTools {
00087        GParamSpec parent_instance;
00088 };
00089 
00090 struct _UnityFiltersSynchronizer {
00091        GObject parent_instance;
00092        UnityFiltersSynchronizerPrivate * priv;
00093 };
00094 
00095 struct _UnityFiltersSynchronizerClass {
00096        GObjectClass parent_class;
00097 };
00098 
00099 struct _UnityFiltersSynchronizerPrivate {
00100        DeeModel* _provider;
00101        GeeArrayList* _receivers;
00102 };
00103 
00104 typedef enum  {
00105        UNITY_FILTER_COLUMN_ID = 0,
00106        UNITY_FILTER_COLUMN_NAME,
00107        UNITY_FILTER_COLUMN_ICON_HINT,
00108        UNITY_FILTER_COLUMN_RENDERER_NAME,
00109        UNITY_FILTER_COLUMN_RENDERER_STATE,
00110        UNITY_FILTER_COLUMN_VISIBLE,
00111        UNITY_FILTER_COLUMN_COLLAPSED,
00112        UNITY_FILTER_COLUMN_FILTERING
00113 } UnityFilterColumn;
00114 
00115 struct _UnityResultsSynchronizer {
00116        GObject parent_instance;
00117        UnityResultsSynchronizerPrivate * priv;
00118 };
00119 
00120 struct _UnityResultsSynchronizerClass {
00121        GObjectClass parent_class;
00122 };
00123 
00124 struct _UnityResultsSynchronizerPrivate {
00125        DeeModel* _receiver;
00126        UnityMergeStrategy* _merge_strategy;
00127        GeeArrayList* _providers;
00128        GeeHashMap* _provider_tags;
00129        GVariant** row_buf;
00130        gint row_buf_length1;
00131        gint _row_buf_size_;
00132 };
00133 
00134 
00135 static gpointer unity_tools_parent_class = NULL;
00136 static gpointer unity_filters_synchronizer_parent_class = NULL;
00137 static gpointer unity_results_synchronizer_parent_class = NULL;
00138 static UnityMergeStrategyIface* unity_results_synchronizer_unity_merge_strategy_parent_iface = NULL;
00139 
00140 gpointer unity_tools_ref (gpointer instance);
00141 void unity_tools_unref (gpointer instance);
00142 GParamSpec* unity_param_spec_tools (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
00143 void unity_value_set_tools (GValue* value, gpointer v_object);
00144 void unity_value_take_tools (GValue* value, gpointer v_object);
00145 gpointer unity_value_get_tools (const GValue* value);
00146 GType unity_tools_get_type (void) G_GNUC_CONST;
00147 enum  {
00148        UNITY_TOOLS_DUMMY_PROPERTY
00149 };
00150 GVariant* unity_tools_hash_table_to_asv (GHashTable* hash);
00151 UnityTools* unity_tools_new (void);
00152 UnityTools* unity_tools_construct (GType object_type);
00153 static void unity_tools_finalize (UnityTools* obj);
00154 GType unity_filters_synchronizer_get_type (void) G_GNUC_CONST;
00155 #define UNITY_FILTERS_SYNCHRONIZER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizerPrivate))
00156 enum  {
00157        UNITY_FILTERS_SYNCHRONIZER_DUMMY_PROPERTY,
00158        UNITY_FILTERS_SYNCHRONIZER_PROVIDER
00159 };
00160 UnityFiltersSynchronizer* unity_filters_synchronizer_new (DeeModel* provider);
00161 UnityFiltersSynchronizer* unity_filters_synchronizer_construct (GType object_type, DeeModel* provider);
00162 void unity_filters_synchronizer_add_receiver (UnityFiltersSynchronizer* self, DeeModel* receiver);
00163 DeeModel* unity_filters_synchronizer_get_provider (UnityFiltersSynchronizer* self);
00164 static void unity_filters_synchronizer_add_row (UnityFiltersSynchronizer* self, DeeModelIter* iter, DeeModel* receiver);
00165 void unity_filters_synchronizer_remove_receiver (UnityFiltersSynchronizer* self, DeeModel* receiver);
00166 static void unity_filters_synchronizer_on_row_added (UnityFiltersSynchronizer* self, DeeModel* model, DeeModelIter* iter);
00167 static void unity_filters_synchronizer_on_row_changed (UnityFiltersSynchronizer* self, DeeModel* model, DeeModelIter* iter);
00168 GType unity_filter_column_get_type (void) G_GNUC_CONST;
00169 static void unity_filters_synchronizer_on_row_removed (UnityFiltersSynchronizer* self, DeeModel* model, DeeModelIter* iter);
00170 static void unity_filters_synchronizer_set_provider (UnityFiltersSynchronizer* self, DeeModel* value);
00171 static GObject * unity_filters_synchronizer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00172 static void _unity_filters_synchronizer_on_row_added_dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00173 static void _unity_filters_synchronizer_on_row_changed_dee_model_row_changed (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00174 static void _unity_filters_synchronizer_on_row_removed_dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00175 static void unity_filters_synchronizer_finalize (GObject* obj);
00176 static void _vala_unity_filters_synchronizer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00177 static void _vala_unity_filters_synchronizer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00178 GType unity_results_synchronizer_get_type (void) G_GNUC_CONST;
00179 #define UNITY_RESULTS_SYNCHRONIZER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizerPrivate))
00180 enum  {
00181        UNITY_RESULTS_SYNCHRONIZER_DUMMY_PROPERTY,
00182        UNITY_RESULTS_SYNCHRONIZER_RECEIVER,
00183        UNITY_RESULTS_SYNCHRONIZER_MERGE_STRATEGY
00184 };
00185 UnityResultsSynchronizer* unity_results_synchronizer_new (DeeModel* receiver);
00186 UnityResultsSynchronizer* unity_results_synchronizer_construct (GType object_type, DeeModel* receiver);
00187 static DeeModelIter* unity_results_synchronizer_real_merge_result (UnityMergeStrategy* base, DeeModel* target, GVariant** row, int row_length1);
00188 void unity_results_synchronizer_add_provider (UnityResultsSynchronizer* self, DeeModel* provider, const gchar* uid);
00189 static void unity_results_synchronizer_on_row_added (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter);
00190 static void _unity_results_synchronizer_on_row_added_dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00191 static void unity_results_synchronizer_on_row_removed (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter);
00192 static void _unity_results_synchronizer_on_row_removed_dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00193 static void unity_results_synchronizer_on_row_changed (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter);
00194 static void _unity_results_synchronizer_on_row_changed_dee_model_row_changed (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00195 static gchar* unity_results_synchronizer_externalize_uri (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter);
00196 static void unity_results_synchronizer_prepare_row_buf (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter);
00197 UnityMergeStrategy* unity_results_synchronizer_get_merge_strategy (UnityResultsSynchronizer* self);
00198 DeeModel* unity_results_synchronizer_get_receiver (UnityResultsSynchronizer* self);
00199 static void unity_results_synchronizer_set_receiver (UnityResultsSynchronizer* self, DeeModel* value);
00200 void unity_results_synchronizer_set_merge_strategy (UnityResultsSynchronizer* self, UnityMergeStrategy* value);
00201 static GObject * unity_results_synchronizer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00202 static void unity_results_synchronizer_finalize (GObject* obj);
00203 static void _vala_unity_results_synchronizer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00204 static void _vala_unity_results_synchronizer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00205 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00206 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00207 
00208 
00209 static gpointer _g_variant_ref0 (gpointer self) {
00210        return self ? g_variant_ref (self) : NULL;
00211 }
00212 
00213 
00214 GVariant* unity_tools_hash_table_to_asv (GHashTable* hash) {
00215        GVariant* result = NULL;
00216        GVariantType* _tmp0_;
00217        GVariantType* _tmp1_;
00218        GVariantBuilder* _tmp2_;
00219        GVariantBuilder* _tmp3_;
00220        GVariantBuilder* b;
00221        GHashTable* _tmp4_;
00222        GHashTableIter iter = {0};
00223        gchar* key = NULL;
00224        GVariant* val = NULL;
00225        GVariantBuilder* _tmp13_;
00226        GVariant* _tmp14_ = NULL;
00227        g_return_val_if_fail (hash != NULL, NULL);
00228        _tmp0_ = g_variant_type_new ("a{sv}");
00229        _tmp1_ = _tmp0_;
00230        _tmp2_ = g_variant_builder_new (_tmp1_);
00231        _tmp3_ = _tmp2_;
00232        _g_variant_type_free0 (_tmp1_);
00233        b = _tmp3_;
00234        _tmp4_ = hash;
00235        g_hash_table_iter_init (&iter, _tmp4_);
00236        while (TRUE) {
00237               gconstpointer _tmp5_ = NULL;
00238               gconstpointer _tmp6_ = NULL;
00239               gboolean _tmp7_ = FALSE;
00240               gchar* _tmp8_;
00241               GVariant* _tmp9_;
00242               GVariantBuilder* _tmp10_;
00243               const gchar* _tmp11_;
00244               GVariant* _tmp12_;
00245               _tmp7_ = g_hash_table_iter_next (&iter, &_tmp5_, &_tmp6_);
00246               _g_free0 (key);
00247               _tmp8_ = g_strdup (_tmp5_);
00248               key = _tmp8_;
00249               _g_variant_unref0 (val);
00250               _tmp9_ = _g_variant_ref0 (_tmp6_);
00251               val = _tmp9_;
00252               if (!_tmp7_) {
00253                      break;
00254               }
00255               _tmp10_ = b;
00256               _tmp11_ = key;
00257               _tmp12_ = val;
00258               g_variant_builder_add (_tmp10_, "{sv}", _tmp11_, _tmp12_, NULL);
00259        }
00260        _tmp13_ = b;
00261        _tmp14_ = g_variant_builder_end (_tmp13_);
00262        g_variant_ref_sink (_tmp14_);
00263        result = _tmp14_;
00264        _g_variant_unref0 (val);
00265        _g_free0 (key);
00266        _g_variant_builder_unref0 (b);
00267        return result;
00268 }
00269 
00270 
00271 UnityTools* unity_tools_construct (GType object_type) {
00272        UnityTools* self = NULL;
00273        self = (UnityTools*) g_type_create_instance (object_type);
00274        return self;
00275 }
00276 
00277 
00278 UnityTools* unity_tools_new (void) {
00279        return unity_tools_construct (UNITY_TYPE_TOOLS);
00280 }
00281 
00282 
00283 static void unity_value_tools_init (GValue* value) {
00284        value->data[0].v_pointer = NULL;
00285 }
00286 
00287 
00288 static void unity_value_tools_free_value (GValue* value) {
00289        if (value->data[0].v_pointer) {
00290               unity_tools_unref (value->data[0].v_pointer);
00291        }
00292 }
00293 
00294 
00295 static void unity_value_tools_copy_value (const GValue* src_value, GValue* dest_value) {
00296        if (src_value->data[0].v_pointer) {
00297               dest_value->data[0].v_pointer = unity_tools_ref (src_value->data[0].v_pointer);
00298        } else {
00299               dest_value->data[0].v_pointer = NULL;
00300        }
00301 }
00302 
00303 
00304 static gpointer unity_value_tools_peek_pointer (const GValue* value) {
00305        return value->data[0].v_pointer;
00306 }
00307 
00308 
00309 static gchar* unity_value_tools_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
00310        if (collect_values[0].v_pointer) {
00311               UnityTools* object;
00312               object = collect_values[0].v_pointer;
00313               if (object->parent_instance.g_class == NULL) {
00314                      return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
00315               } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
00316                      return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
00317               }
00318               value->data[0].v_pointer = unity_tools_ref (object);
00319        } else {
00320               value->data[0].v_pointer = NULL;
00321        }
00322        return NULL;
00323 }
00324 
00325 
00326 static gchar* unity_value_tools_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
00327        UnityTools** object_p;
00328        object_p = collect_values[0].v_pointer;
00329        if (!object_p) {
00330               return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
00331        }
00332        if (!value->data[0].v_pointer) {
00333               *object_p = NULL;
00334        } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
00335               *object_p = value->data[0].v_pointer;
00336        } else {
00337               *object_p = unity_tools_ref (value->data[0].v_pointer);
00338        }
00339        return NULL;
00340 }
00341 
00342 
00343 GParamSpec* unity_param_spec_tools (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
00344        UnityParamSpecTools* spec;
00345        g_return_val_if_fail (g_type_is_a (object_type, UNITY_TYPE_TOOLS), NULL);
00346        spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
00347        G_PARAM_SPEC (spec)->value_type = object_type;
00348        return G_PARAM_SPEC (spec);
00349 }
00350 
00351 
00352 gpointer unity_value_get_tools (const GValue* value) {
00353        g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TYPE_TOOLS), NULL);
00354        return value->data[0].v_pointer;
00355 }
00356 
00357 
00358 void unity_value_set_tools (GValue* value, gpointer v_object) {
00359        UnityTools* old;
00360        g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TYPE_TOOLS));
00361        old = value->data[0].v_pointer;
00362        if (v_object) {
00363               g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TYPE_TOOLS));
00364               g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
00365               value->data[0].v_pointer = v_object;
00366               unity_tools_ref (value->data[0].v_pointer);
00367        } else {
00368               value->data[0].v_pointer = NULL;
00369        }
00370        if (old) {
00371               unity_tools_unref (old);
00372        }
00373 }
00374 
00375 
00376 void unity_value_take_tools (GValue* value, gpointer v_object) {
00377        UnityTools* old;
00378        g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TYPE_TOOLS));
00379        old = value->data[0].v_pointer;
00380        if (v_object) {
00381               g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TYPE_TOOLS));
00382               g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
00383               value->data[0].v_pointer = v_object;
00384        } else {
00385               value->data[0].v_pointer = NULL;
00386        }
00387        if (old) {
00388               unity_tools_unref (old);
00389        }
00390 }
00391 
00392 
00393 static void unity_tools_class_init (UnityToolsClass * klass) {
00394        unity_tools_parent_class = g_type_class_peek_parent (klass);
00395        UNITY_TOOLS_CLASS (klass)->finalize = unity_tools_finalize;
00396 }
00397 
00398 
00399 static void unity_tools_instance_init (UnityTools * self) {
00400        self->ref_count = 1;
00401 }
00402 
00403 
00404 static void unity_tools_finalize (UnityTools* obj) {
00405        UnityTools * self;
00406        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_TOOLS, UnityTools);
00407 }
00408 
00409 
00410 GType unity_tools_get_type (void) {
00411        static volatile gsize unity_tools_type_id__volatile = 0;
00412        if (g_once_init_enter (&unity_tools_type_id__volatile)) {
00413               static const GTypeValueTable g_define_type_value_table = { unity_value_tools_init, unity_value_tools_free_value, unity_value_tools_copy_value, unity_value_tools_peek_pointer, "p", unity_value_tools_collect_value, "p", unity_value_tools_lcopy_value };
00414               static const GTypeInfo g_define_type_info = { sizeof (UnityToolsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_tools_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityTools), 0, (GInstanceInitFunc) unity_tools_instance_init, &g_define_type_value_table };
00415               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) };
00416               GType unity_tools_type_id;
00417               unity_tools_type_id = g_type_register_fundamental (g_type_fundamental_next (), "UnityTools", &g_define_type_info, &g_define_type_fundamental_info, 0);
00418               g_once_init_leave (&unity_tools_type_id__volatile, unity_tools_type_id);
00419        }
00420        return unity_tools_type_id__volatile;
00421 }
00422 
00423 
00424 gpointer unity_tools_ref (gpointer instance) {
00425        UnityTools* self;
00426        self = instance;
00427        g_atomic_int_inc (&self->ref_count);
00428        return instance;
00429 }
00430 
00431 
00432 void unity_tools_unref (gpointer instance) {
00433        UnityTools* self;
00434        self = instance;
00435        if (g_atomic_int_dec_and_test (&self->ref_count)) {
00436               UNITY_TOOLS_GET_CLASS (self)->finalize (self);
00437               g_type_free_instance ((GTypeInstance *) self);
00438        }
00439 }
00440 
00441 
00442 UnityFiltersSynchronizer* unity_filters_synchronizer_construct (GType object_type, DeeModel* provider) {
00443        UnityFiltersSynchronizer * self = NULL;
00444        DeeModel* _tmp0_;
00445        g_return_val_if_fail (provider != NULL, NULL);
00446        _tmp0_ = provider;
00447        self = (UnityFiltersSynchronizer*) g_object_new (object_type, "provider", _tmp0_, NULL);
00448        return self;
00449 }
00450 
00451 
00452 UnityFiltersSynchronizer* unity_filters_synchronizer_new (DeeModel* provider) {
00453        return unity_filters_synchronizer_construct (UNITY_TYPE_FILTERS_SYNCHRONIZER, provider);
00454 }
00455 
00456 
00457 void unity_filters_synchronizer_add_receiver (UnityFiltersSynchronizer* self, DeeModel* receiver) {
00458        GeeArrayList* _tmp0_;
00459        DeeModel* _tmp1_;
00460        gboolean _tmp2_ = FALSE;
00461        DeeModel* _tmp3_;
00462        GeeArrayList* _tmp15_;
00463        DeeModel* _tmp16_;
00464        g_return_if_fail (self != NULL);
00465        g_return_if_fail (receiver != NULL);
00466        _tmp0_ = self->priv->_receivers;
00467        _tmp1_ = receiver;
00468        _tmp2_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp0_, _tmp1_);
00469        if (_tmp2_) {
00470               return;
00471        }
00472        _tmp3_ = receiver;
00473        dee_model_clear (_tmp3_);
00474        {
00475               gint i;
00476               i = 0;
00477               {
00478                      gboolean _tmp4_;
00479                      _tmp4_ = TRUE;
00480                      while (TRUE) {
00481                             gboolean _tmp5_;
00482                             gint _tmp7_;
00483                             DeeModel* _tmp8_;
00484                             guint _tmp9_ = 0U;
00485                             DeeModel* _tmp10_;
00486                             gint _tmp11_;
00487                             DeeModelIter* _tmp12_ = NULL;
00488                             DeeModelIter* iter;
00489                             DeeModelIter* _tmp13_;
00490                             DeeModel* _tmp14_;
00491                             _tmp5_ = _tmp4_;
00492                             if (!_tmp5_) {
00493                                    gint _tmp6_;
00494                                    _tmp6_ = i;
00495                                    i = _tmp6_ + 1;
00496                             }
00497                             _tmp4_ = FALSE;
00498                             _tmp7_ = i;
00499                             _tmp8_ = self->priv->_provider;
00500                             _tmp9_ = dee_model_get_n_rows (_tmp8_);
00501                             if (!(((guint) _tmp7_) < _tmp9_)) {
00502                                    break;
00503                             }
00504                             _tmp10_ = self->priv->_provider;
00505                             _tmp11_ = i;
00506                             _tmp12_ = dee_model_get_iter_at_row (_tmp10_, (guint) _tmp11_);
00507                             iter = _tmp12_;
00508                             _tmp13_ = iter;
00509                             _tmp14_ = receiver;
00510                             unity_filters_synchronizer_add_row (self, _tmp13_, _tmp14_);
00511                      }
00512               }
00513        }
00514        _tmp15_ = self->priv->_receivers;
00515        _tmp16_ = receiver;
00516        gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, _tmp16_);
00517 }
00518 
00519 
00520 void unity_filters_synchronizer_remove_receiver (UnityFiltersSynchronizer* self, DeeModel* receiver) {
00521        GeeArrayList* _tmp0_;
00522        DeeModel* _tmp1_;
00523        gint _tmp2_ = 0;
00524        gint index;
00525        gint _tmp3_;
00526        g_return_if_fail (self != NULL);
00527        g_return_if_fail (receiver != NULL);
00528        _tmp0_ = self->priv->_receivers;
00529        _tmp1_ = receiver;
00530        _tmp2_ = gee_abstract_list_index_of ((GeeAbstractList*) _tmp0_, _tmp1_);
00531        index = _tmp2_;
00532        _tmp3_ = index;
00533        if (_tmp3_ >= 0) {
00534               GeeArrayList* _tmp4_;
00535               gint _tmp5_;
00536               _tmp4_ = self->priv->_receivers;
00537               _tmp5_ = index;
00538               gee_abstract_list_remove_at ((GeeAbstractList*) _tmp4_, _tmp5_);
00539        } else {
00540               DeeModel* _tmp6_;
00541               _tmp6_ = receiver;
00542               g_warning ("unity-lens-tools.vala:87: Receiver [%p] was not registered", _tmp6_);
00543        }
00544 }
00545 
00546 
00547 static gpointer _g_object_ref0 (gpointer self) {
00548        return self ? g_object_ref (self) : NULL;
00549 }
00550 
00551 
00552 static void unity_filters_synchronizer_on_row_added (UnityFiltersSynchronizer* self, DeeModel* model, DeeModelIter* iter) {
00553        g_return_if_fail (self != NULL);
00554        g_return_if_fail (model != NULL);
00555        g_return_if_fail (iter != NULL);
00556        {
00557               GeeArrayList* _tmp0_;
00558               GeeArrayList* _tmp1_;
00559               GeeArrayList* _receiver_list;
00560               GeeArrayList* _tmp2_;
00561               gint _tmp3_;
00562               gint _tmp4_;
00563               gint _receiver_size;
00564               gint _receiver_index;
00565               _tmp0_ = self->priv->_receivers;
00566               _tmp1_ = _g_object_ref0 (_tmp0_);
00567               _receiver_list = _tmp1_;
00568               _tmp2_ = _receiver_list;
00569               _tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
00570               _tmp4_ = _tmp3_;
00571               _receiver_size = _tmp4_;
00572               _receiver_index = -1;
00573               while (TRUE) {
00574                      gint _tmp5_;
00575                      gint _tmp6_;
00576                      gint _tmp7_;
00577                      GeeArrayList* _tmp8_;
00578                      gint _tmp9_;
00579                      gpointer _tmp10_ = NULL;
00580                      DeeModel* receiver;
00581                      DeeModelIter* _tmp11_;
00582                      DeeModel* _tmp12_;
00583                      _tmp5_ = _receiver_index;
00584                      _receiver_index = _tmp5_ + 1;
00585                      _tmp6_ = _receiver_index;
00586                      _tmp7_ = _receiver_size;
00587                      if (!(_tmp6_ < _tmp7_)) {
00588                             break;
00589                      }
00590                      _tmp8_ = _receiver_list;
00591                      _tmp9_ = _receiver_index;
00592                      _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
00593                      receiver = (DeeModel*) _tmp10_;
00594                      _tmp11_ = iter;
00595                      _tmp12_ = receiver;
00596                      unity_filters_synchronizer_add_row (self, _tmp11_, _tmp12_);
00597               }
00598               _g_object_unref0 (_receiver_list);
00599        }
00600 }
00601 
00602 
00603 static void unity_filters_synchronizer_on_row_changed (UnityFiltersSynchronizer* self, DeeModel* model, DeeModelIter* iter) {
00604        g_return_if_fail (self != NULL);
00605        g_return_if_fail (model != NULL);
00606        g_return_if_fail (iter != NULL);
00607        {
00608               GeeArrayList* _tmp0_;
00609               GeeArrayList* _tmp1_;
00610               GeeArrayList* _receiver_list;
00611               GeeArrayList* _tmp2_;
00612               gint _tmp3_;
00613               gint _tmp4_;
00614               gint _receiver_size;
00615               gint _receiver_index;
00616               _tmp0_ = self->priv->_receivers;
00617               _tmp1_ = _g_object_ref0 (_tmp0_);
00618               _receiver_list = _tmp1_;
00619               _tmp2_ = _receiver_list;
00620               _tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
00621               _tmp4_ = _tmp3_;
00622               _receiver_size = _tmp4_;
00623               _receiver_index = -1;
00624               while (TRUE) {
00625                      gint _tmp5_;
00626                      gint _tmp6_;
00627                      gint _tmp7_;
00628                      GeeArrayList* _tmp8_;
00629                      gint _tmp9_;
00630                      gpointer _tmp10_ = NULL;
00631                      DeeModel* receiver;
00632                      DeeModel* _tmp11_;
00633                      DeeModel* _tmp12_;
00634                      DeeModelIter* _tmp13_;
00635                      guint _tmp14_ = 0U;
00636                      DeeModelIter* _tmp15_ = NULL;
00637                      DeeModelIter* riter;
00638                      DeeModel* _tmp16_;
00639                      DeeModelIter* _tmp17_;
00640                      DeeModel* _tmp18_;
00641                      DeeModelIter* _tmp19_;
00642                      const gchar* _tmp20_ = NULL;
00643                      DeeModel* _tmp21_;
00644                      DeeModelIter* _tmp22_;
00645                      const gchar* _tmp23_ = NULL;
00646                      DeeModel* _tmp24_;
00647                      DeeModelIter* _tmp25_;
00648                      const gchar* _tmp26_ = NULL;
00649                      DeeModel* _tmp27_;
00650                      DeeModelIter* _tmp28_;
00651                      const gchar* _tmp29_ = NULL;
00652                      DeeModel* _tmp30_;
00653                      DeeModelIter* _tmp31_;
00654                      GVariant* _tmp32_ = NULL;
00655                      GVariant* _tmp33_;
00656                      DeeModel* _tmp34_;
00657                      DeeModelIter* _tmp35_;
00658                      gboolean _tmp36_ = FALSE;
00659                      DeeModel* _tmp37_;
00660                      DeeModelIter* _tmp38_;
00661                      gboolean _tmp39_ = FALSE;
00662                      DeeModel* _tmp40_;
00663                      DeeModelIter* _tmp41_;
00664                      gboolean _tmp42_ = FALSE;
00665                      _tmp5_ = _receiver_index;
00666                      _receiver_index = _tmp5_ + 1;
00667                      _tmp6_ = _receiver_index;
00668                      _tmp7_ = _receiver_size;
00669                      if (!(_tmp6_ < _tmp7_)) {
00670                             break;
00671                      }
00672                      _tmp8_ = _receiver_list;
00673                      _tmp9_ = _receiver_index;
00674                      _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
00675                      receiver = (DeeModel*) _tmp10_;
00676                      _tmp11_ = receiver;
00677                      _tmp12_ = model;
00678                      _tmp13_ = iter;
00679                      _tmp14_ = dee_model_get_position (_tmp12_, _tmp13_);
00680                      _tmp15_ = dee_model_get_iter_at_row (_tmp11_, _tmp14_);
00681                      riter = _tmp15_;
00682                      _tmp16_ = receiver;
00683                      _tmp17_ = riter;
00684                      _tmp18_ = self->priv->_provider;
00685                      _tmp19_ = iter;
00686                      _tmp20_ = dee_model_get_string (_tmp18_, _tmp19_, (guint) UNITY_FILTER_COLUMN_ID);
00687                      _tmp21_ = self->priv->_provider;
00688                      _tmp22_ = iter;
00689                      _tmp23_ = dee_model_get_string (_tmp21_, _tmp22_, (guint) UNITY_FILTER_COLUMN_NAME);
00690                      _tmp24_ = self->priv->_provider;
00691                      _tmp25_ = iter;
00692                      _tmp26_ = dee_model_get_string (_tmp24_, _tmp25_, (guint) UNITY_FILTER_COLUMN_ICON_HINT);
00693                      _tmp27_ = self->priv->_provider;
00694                      _tmp28_ = iter;
00695                      _tmp29_ = dee_model_get_string (_tmp27_, _tmp28_, (guint) UNITY_FILTER_COLUMN_RENDERER_NAME);
00696                      _tmp30_ = self->priv->_provider;
00697                      _tmp31_ = iter;
00698                      _tmp32_ = dee_model_get_value (_tmp30_, _tmp31_, (guint) UNITY_FILTER_COLUMN_RENDERER_STATE);
00699                      _tmp33_ = _tmp32_;
00700                      _tmp34_ = self->priv->_provider;
00701                      _tmp35_ = iter;
00702                      _tmp36_ = dee_model_get_bool (_tmp34_, _tmp35_, (guint) UNITY_FILTER_COLUMN_VISIBLE);
00703                      _tmp37_ = self->priv->_provider;
00704                      _tmp38_ = iter;
00705                      _tmp39_ = dee_model_get_bool (_tmp37_, _tmp38_, (guint) UNITY_FILTER_COLUMN_COLLAPSED);
00706                      _tmp40_ = self->priv->_provider;
00707                      _tmp41_ = iter;
00708                      _tmp42_ = dee_model_get_bool (_tmp40_, _tmp41_, (guint) UNITY_FILTER_COLUMN_FILTERING);
00709                      dee_model_set (_tmp16_, _tmp17_, _tmp20_, _tmp23_, _tmp26_, _tmp29_, _tmp33_, _tmp36_, _tmp39_, _tmp42_, NULL);
00710                      _g_variant_unref0 (_tmp33_);
00711               }
00712               _g_object_unref0 (_receiver_list);
00713        }
00714 }
00715 
00716 
00717 static void unity_filters_synchronizer_on_row_removed (UnityFiltersSynchronizer* self, DeeModel* model, DeeModelIter* iter) {
00718        g_return_if_fail (self != NULL);
00719        g_return_if_fail (model != NULL);
00720        g_return_if_fail (iter != NULL);
00721        {
00722               GeeArrayList* _tmp0_;
00723               GeeArrayList* _tmp1_;
00724               GeeArrayList* _receiver_list;
00725               GeeArrayList* _tmp2_;
00726               gint _tmp3_;
00727               gint _tmp4_;
00728               gint _receiver_size;
00729               gint _receiver_index;
00730               _tmp0_ = self->priv->_receivers;
00731               _tmp1_ = _g_object_ref0 (_tmp0_);
00732               _receiver_list = _tmp1_;
00733               _tmp2_ = _receiver_list;
00734               _tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
00735               _tmp4_ = _tmp3_;
00736               _receiver_size = _tmp4_;
00737               _receiver_index = -1;
00738               while (TRUE) {
00739                      gint _tmp5_;
00740                      gint _tmp6_;
00741                      gint _tmp7_;
00742                      GeeArrayList* _tmp8_;
00743                      gint _tmp9_;
00744                      gpointer _tmp10_ = NULL;
00745                      DeeModel* receiver;
00746                      DeeModel* _tmp11_;
00747                      DeeModel* _tmp12_;
00748                      DeeModel* _tmp13_;
00749                      DeeModelIter* _tmp14_;
00750                      guint _tmp15_ = 0U;
00751                      DeeModelIter* _tmp16_ = NULL;
00752                      _tmp5_ = _receiver_index;
00753                      _receiver_index = _tmp5_ + 1;
00754                      _tmp6_ = _receiver_index;
00755                      _tmp7_ = _receiver_size;
00756                      if (!(_tmp6_ < _tmp7_)) {
00757                             break;
00758                      }
00759                      _tmp8_ = _receiver_list;
00760                      _tmp9_ = _receiver_index;
00761                      _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
00762                      receiver = (DeeModel*) _tmp10_;
00763                      _tmp11_ = receiver;
00764                      _tmp12_ = receiver;
00765                      _tmp13_ = model;
00766                      _tmp14_ = iter;
00767                      _tmp15_ = dee_model_get_position (_tmp13_, _tmp14_);
00768                      _tmp16_ = dee_model_get_iter_at_row (_tmp12_, _tmp15_);
00769                      dee_model_remove (_tmp11_, _tmp16_);
00770               }
00771               _g_object_unref0 (_receiver_list);
00772        }
00773 }
00774 
00775 
00776 static void unity_filters_synchronizer_add_row (UnityFiltersSynchronizer* self, DeeModelIter* iter, DeeModel* receiver) {
00777        DeeModel* _tmp0_;
00778        DeeModel* _tmp1_;
00779        DeeModelIter* _tmp2_;
00780        const gchar* _tmp3_ = NULL;
00781        DeeModel* _tmp4_;
00782        DeeModelIter* _tmp5_;
00783        const gchar* _tmp6_ = NULL;
00784        DeeModel* _tmp7_;
00785        DeeModelIter* _tmp8_;
00786        const gchar* _tmp9_ = NULL;
00787        DeeModel* _tmp10_;
00788        DeeModelIter* _tmp11_;
00789        const gchar* _tmp12_ = NULL;
00790        DeeModel* _tmp13_;
00791        DeeModelIter* _tmp14_;
00792        GVariant* _tmp15_ = NULL;
00793        GVariant* _tmp16_;
00794        DeeModel* _tmp17_;
00795        DeeModelIter* _tmp18_;
00796        gboolean _tmp19_ = FALSE;
00797        DeeModel* _tmp20_;
00798        DeeModelIter* _tmp21_;
00799        gboolean _tmp22_ = FALSE;
00800        DeeModel* _tmp23_;
00801        DeeModelIter* _tmp24_;
00802        gboolean _tmp25_ = FALSE;
00803        g_return_if_fail (self != NULL);
00804        g_return_if_fail (iter != NULL);
00805        g_return_if_fail (receiver != NULL);
00806        _tmp0_ = receiver;
00807        _tmp1_ = self->priv->_provider;
00808        _tmp2_ = iter;
00809        _tmp3_ = dee_model_get_string (_tmp1_, _tmp2_, (guint) UNITY_FILTER_COLUMN_ID);
00810        _tmp4_ = self->priv->_provider;
00811        _tmp5_ = iter;
00812        _tmp6_ = dee_model_get_string (_tmp4_, _tmp5_, (guint) UNITY_FILTER_COLUMN_NAME);
00813        _tmp7_ = self->priv->_provider;
00814        _tmp8_ = iter;
00815        _tmp9_ = dee_model_get_string (_tmp7_, _tmp8_, (guint) UNITY_FILTER_COLUMN_ICON_HINT);
00816        _tmp10_ = self->priv->_provider;
00817        _tmp11_ = iter;
00818        _tmp12_ = dee_model_get_string (_tmp10_, _tmp11_, (guint) UNITY_FILTER_COLUMN_RENDERER_NAME);
00819        _tmp13_ = self->priv->_provider;
00820        _tmp14_ = iter;
00821        _tmp15_ = dee_model_get_value (_tmp13_, _tmp14_, (guint) UNITY_FILTER_COLUMN_RENDERER_STATE);
00822        _tmp16_ = _tmp15_;
00823        _tmp17_ = self->priv->_provider;
00824        _tmp18_ = iter;
00825        _tmp19_ = dee_model_get_bool (_tmp17_, _tmp18_, (guint) UNITY_FILTER_COLUMN_VISIBLE);
00826        _tmp20_ = self->priv->_provider;
00827        _tmp21_ = iter;
00828        _tmp22_ = dee_model_get_bool (_tmp20_, _tmp21_, (guint) UNITY_FILTER_COLUMN_COLLAPSED);
00829        _tmp23_ = self->priv->_provider;
00830        _tmp24_ = iter;
00831        _tmp25_ = dee_model_get_bool (_tmp23_, _tmp24_, (guint) UNITY_FILTER_COLUMN_FILTERING);
00832        dee_model_append (_tmp0_, _tmp3_, _tmp6_, _tmp9_, _tmp12_, _tmp16_, _tmp19_, _tmp22_, _tmp25_, NULL);
00833        _g_variant_unref0 (_tmp16_);
00834 }
00835 
00836 
00837 DeeModel* unity_filters_synchronizer_get_provider (UnityFiltersSynchronizer* self) {
00838        DeeModel* result;
00839        DeeModel* _tmp0_;
00840        g_return_val_if_fail (self != NULL, NULL);
00841        _tmp0_ = self->priv->_provider;
00842        result = _tmp0_;
00843        return result;
00844 }
00845 
00846 
00847 static void unity_filters_synchronizer_set_provider (UnityFiltersSynchronizer* self, DeeModel* value) {
00848        DeeModel* _tmp0_;
00849        g_return_if_fail (self != NULL);
00850        _tmp0_ = value;
00851        self->priv->_provider = _tmp0_;
00852        g_object_notify ((GObject *) self, "provider");
00853 }
00854 
00855 
00856 static void _unity_filters_synchronizer_on_row_added_dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
00857        unity_filters_synchronizer_on_row_added (self, _sender, iter);
00858 }
00859 
00860 
00861 static void _unity_filters_synchronizer_on_row_changed_dee_model_row_changed (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
00862        unity_filters_synchronizer_on_row_changed (self, _sender, iter);
00863 }
00864 
00865 
00866 static void _unity_filters_synchronizer_on_row_removed_dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
00867        unity_filters_synchronizer_on_row_removed (self, _sender, iter);
00868 }
00869 
00870 
00871 static GObject * unity_filters_synchronizer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
00872        GObject * obj;
00873        GObjectClass * parent_class;
00874        UnityFiltersSynchronizer * self;
00875        GeeArrayList* _tmp0_;
00876        DeeModel* _tmp1_;
00877        DeeModel* _tmp2_;
00878        DeeModel* _tmp3_;
00879        parent_class = G_OBJECT_CLASS (unity_filters_synchronizer_parent_class);
00880        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
00881        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizer);
00882        _tmp0_ = gee_array_list_new (dee_model_get_type (), NULL, NULL, NULL);
00883        _g_object_unref0 (self->priv->_receivers);
00884        self->priv->_receivers = _tmp0_;
00885        _tmp1_ = self->priv->_provider;
00886        g_signal_connect_object (_tmp1_, "row-added", (GCallback) _unity_filters_synchronizer_on_row_added_dee_model_row_added, self, 0);
00887        _tmp2_ = self->priv->_provider;
00888        g_signal_connect_object (_tmp2_, "row-changed", (GCallback) _unity_filters_synchronizer_on_row_changed_dee_model_row_changed, self, 0);
00889        _tmp3_ = self->priv->_provider;
00890        g_signal_connect_object (_tmp3_, "row-removed", (GCallback) _unity_filters_synchronizer_on_row_removed_dee_model_row_removed, self, 0);
00891        return obj;
00892 }
00893 
00894 
00895 static void unity_filters_synchronizer_class_init (UnityFiltersSynchronizerClass * klass) {
00896        unity_filters_synchronizer_parent_class = g_type_class_peek_parent (klass);
00897        g_type_class_add_private (klass, sizeof (UnityFiltersSynchronizerPrivate));
00898        G_OBJECT_CLASS (klass)->get_property = _vala_unity_filters_synchronizer_get_property;
00899        G_OBJECT_CLASS (klass)->set_property = _vala_unity_filters_synchronizer_set_property;
00900        G_OBJECT_CLASS (klass)->constructor = unity_filters_synchronizer_constructor;
00901        G_OBJECT_CLASS (klass)->finalize = unity_filters_synchronizer_finalize;
00902        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_FILTERS_SYNCHRONIZER_PROVIDER, g_param_spec_object ("provider", "provider", "provider", dee_model_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
00903 }
00904 
00905 
00906 static void unity_filters_synchronizer_instance_init (UnityFiltersSynchronizer * self) {
00907        self->priv = UNITY_FILTERS_SYNCHRONIZER_GET_PRIVATE (self);
00908 }
00909 
00910 
00911 static void unity_filters_synchronizer_finalize (GObject* obj) {
00912        UnityFiltersSynchronizer * self;
00913        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizer);
00914        _g_object_unref0 (self->priv->_receivers);
00915        G_OBJECT_CLASS (unity_filters_synchronizer_parent_class)->finalize (obj);
00916 }
00917 
00918 
00919 GType unity_filters_synchronizer_get_type (void) {
00920        static volatile gsize unity_filters_synchronizer_type_id__volatile = 0;
00921        if (g_once_init_enter (&unity_filters_synchronizer_type_id__volatile)) {
00922               static const GTypeInfo g_define_type_info = { sizeof (UnityFiltersSynchronizerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_filters_synchronizer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityFiltersSynchronizer), 0, (GInstanceInitFunc) unity_filters_synchronizer_instance_init, NULL };
00923               GType unity_filters_synchronizer_type_id;
00924               unity_filters_synchronizer_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityFiltersSynchronizer", &g_define_type_info, 0);
00925               g_once_init_leave (&unity_filters_synchronizer_type_id__volatile, unity_filters_synchronizer_type_id);
00926        }
00927        return unity_filters_synchronizer_type_id__volatile;
00928 }
00929 
00930 
00931 static void _vala_unity_filters_synchronizer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
00932        UnityFiltersSynchronizer * self;
00933        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizer);
00934        switch (property_id) {
00935               case UNITY_FILTERS_SYNCHRONIZER_PROVIDER:
00936               g_value_set_object (value, unity_filters_synchronizer_get_provider (self));
00937               break;
00938               default:
00939               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00940               break;
00941        }
00942 }
00943 
00944 
00945 static void _vala_unity_filters_synchronizer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
00946        UnityFiltersSynchronizer * self;
00947        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizer);
00948        switch (property_id) {
00949               case UNITY_FILTERS_SYNCHRONIZER_PROVIDER:
00950               unity_filters_synchronizer_set_provider (self, g_value_get_object (value));
00951               break;
00952               default:
00953               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00954               break;
00955        }
00956 }
00957 
00958 
00959 UnityResultsSynchronizer* unity_results_synchronizer_construct (GType object_type, DeeModel* receiver) {
00960        UnityResultsSynchronizer * self = NULL;
00961        DeeModel* _tmp0_;
00962        g_return_val_if_fail (receiver != NULL, NULL);
00963        _tmp0_ = receiver;
00964        self = (UnityResultsSynchronizer*) g_object_new (object_type, "receiver", _tmp0_, NULL);
00965        return self;
00966 }
00967 
00968 
00969 UnityResultsSynchronizer* unity_results_synchronizer_new (DeeModel* receiver) {
00970        return unity_results_synchronizer_construct (UNITY_TYPE_RESULTS_SYNCHRONIZER, receiver);
00971 }
00972 
00973 
00974 static DeeModelIter* unity_results_synchronizer_real_merge_result (UnityMergeStrategy* base, DeeModel* target, GVariant** row, int row_length1) {
00975        UnityResultsSynchronizer * self;
00976        DeeModelIter* result = NULL;
00977        DeeModel* _tmp0_;
00978        GVariant** _tmp1_;
00979        gint _tmp1__length1;
00980        DeeModelIter* _tmp2_ = NULL;
00981        self = (UnityResultsSynchronizer*) base;
00982        g_return_val_if_fail (target != NULL, NULL);
00983        _tmp0_ = target;
00984        _tmp1_ = row;
00985        _tmp1__length1 = row_length1;
00986        _tmp2_ = dee_model_append_row (_tmp0_, _tmp1_);
00987        result = _tmp2_;
00988        return result;
00989 }
00990 
00991 
00992 static void _unity_results_synchronizer_on_row_added_dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
00993        unity_results_synchronizer_on_row_added (self, _sender, iter);
00994 }
00995 
00996 
00997 static void _unity_results_synchronizer_on_row_removed_dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
00998        unity_results_synchronizer_on_row_removed (self, _sender, iter);
00999 }
01000 
01001 
01002 static void _unity_results_synchronizer_on_row_changed_dee_model_row_changed (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
01003        unity_results_synchronizer_on_row_changed (self, _sender, iter);
01004 }
01005 
01006 
01007 void unity_results_synchronizer_add_provider (UnityResultsSynchronizer* self, DeeModel* provider, const gchar* uid) {
01008        DeeModel* _tmp0_;
01009        const gchar* _tmp1_;
01010        gchar* _tmp2_ = NULL;
01011        GeeArrayList* _tmp3_;
01012        DeeModel* _tmp4_;
01013        GeeHashMap* _tmp5_;
01014        DeeModel* _tmp6_;
01015        DeeModel* _tmp7_;
01016        DeeModelTag* _tmp8_;
01017        DeeModel* _tmp9_;
01018        DeeModel* _tmp10_;
01019        DeeModel* _tmp11_;
01020        g_return_if_fail (self != NULL);
01021        g_return_if_fail (provider != NULL);
01022        g_return_if_fail (uid != NULL);
01023        _tmp0_ = provider;
01024        _tmp1_ = uid;
01025        _tmp2_ = g_strdup_printf ("%s:", _tmp1_);
01026        g_object_set_data_full ((GObject*) _tmp0_, "uid", _tmp2_, g_free);
01027        _tmp3_ = self->priv->_providers;
01028        _tmp4_ = provider;
01029        gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, _tmp4_);
01030        _tmp5_ = self->priv->_provider_tags;
01031        _tmp6_ = provider;
01032        _tmp7_ = provider;
01033        _tmp8_ = dee_model_register_tag (_tmp7_, NULL);
01034        gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, _tmp6_, _tmp8_);
01035        _tmp9_ = provider;
01036        g_signal_connect_object (_tmp9_, "row-added", (GCallback) _unity_results_synchronizer_on_row_added_dee_model_row_added, self, 0);
01037        _tmp10_ = provider;
01038        g_signal_connect_object (_tmp10_, "row-removed", (GCallback) _unity_results_synchronizer_on_row_removed_dee_model_row_removed, self, 0);
01039        _tmp11_ = provider;
01040        g_signal_connect_object (_tmp11_, "row-changed", (GCallback) _unity_results_synchronizer_on_row_changed_dee_model_row_changed, self, 0);
01041 }
01042 
01043 
01044 static gchar* unity_results_synchronizer_externalize_uri (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter) {
01045        gchar* result = NULL;
01046        DeeModel* _tmp0_;
01047        gconstpointer _tmp1_ = NULL;
01048        DeeModel* _tmp2_;
01049        DeeModelIter* _tmp3_;
01050        const gchar* _tmp4_ = NULL;
01051        gchar* _tmp5_;
01052        g_return_val_if_fail (self != NULL, NULL);
01053        g_return_val_if_fail (provider != NULL, NULL);
01054        g_return_val_if_fail (iter != NULL, NULL);
01055        _tmp0_ = provider;
01056        _tmp1_ = g_object_get_data ((GObject*) _tmp0_, "uid");
01057        _tmp2_ = provider;
01058        _tmp3_ = iter;
01059        _tmp4_ = dee_model_get_string (_tmp2_, _tmp3_, (guint) 0);
01060        _tmp5_ = g_strconcat ((const gchar*) _tmp1_, _tmp4_, NULL);
01061        result = _tmp5_;
01062        return result;
01063 }
01064 
01065 
01066 static void unity_results_synchronizer_prepare_row_buf (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter) {
01067        GVariant** _tmp0_;
01068        gint _tmp0__length1;
01069        DeeModel* _tmp1_;
01070        DeeModelIter* _tmp2_;
01071        gchar* _tmp3_ = NULL;
01072        gchar* _tmp4_;
01073        GVariant* _tmp5_;
01074        GVariant* _tmp6_;
01075        GVariant** _tmp7_;
01076        gint _tmp7__length1;
01077        DeeModel* _tmp8_;
01078        DeeModelIter* _tmp9_;
01079        GVariant* _tmp10_ = NULL;
01080        GVariant* _tmp11_;
01081        GVariant** _tmp12_;
01082        gint _tmp12__length1;
01083        DeeModel* _tmp13_;
01084        DeeModelIter* _tmp14_;
01085        GVariant* _tmp15_ = NULL;
01086        GVariant* _tmp16_;
01087        GVariant** _tmp17_;
01088        gint _tmp17__length1;
01089        DeeModel* _tmp18_;
01090        DeeModelIter* _tmp19_;
01091        GVariant* _tmp20_ = NULL;
01092        GVariant* _tmp21_;
01093        GVariant** _tmp22_;
01094        gint _tmp22__length1;
01095        DeeModel* _tmp23_;
01096        DeeModelIter* _tmp24_;
01097        GVariant* _tmp25_ = NULL;
01098        GVariant* _tmp26_;
01099        GVariant** _tmp27_;
01100        gint _tmp27__length1;
01101        DeeModel* _tmp28_;
01102        DeeModelIter* _tmp29_;
01103        GVariant* _tmp30_ = NULL;
01104        GVariant* _tmp31_;
01105        GVariant** _tmp32_;
01106        gint _tmp32__length1;
01107        DeeModel* _tmp33_;
01108        DeeModelIter* _tmp34_;
01109        GVariant* _tmp35_ = NULL;
01110        GVariant* _tmp36_;
01111        g_return_if_fail (self != NULL);
01112        g_return_if_fail (provider != NULL);
01113        g_return_if_fail (iter != NULL);
01114        _tmp0_ = self->priv->row_buf;
01115        _tmp0__length1 = self->priv->row_buf_length1;
01116        _tmp1_ = provider;
01117        _tmp2_ = iter;
01118        _tmp3_ = unity_results_synchronizer_externalize_uri (self, _tmp1_, _tmp2_);
01119        _tmp4_ = _tmp3_;
01120        _tmp5_ = g_variant_new_string (_tmp4_);
01121        g_variant_ref_sink (_tmp5_);
01122        _g_variant_unref0 (_tmp0_[0]);
01123        _tmp0_[0] = _tmp5_;
01124        _tmp6_ = _tmp0_[0];
01125        _g_free0 (_tmp4_);
01126        _tmp7_ = self->priv->row_buf;
01127        _tmp7__length1 = self->priv->row_buf_length1;
01128        _tmp8_ = provider;
01129        _tmp9_ = iter;
01130        _tmp10_ = dee_model_get_value (_tmp8_, _tmp9_, (guint) 1);
01131        _g_variant_unref0 (_tmp7_[1]);
01132        _tmp7_[1] = _tmp10_;
01133        _tmp11_ = _tmp7_[1];
01134        _tmp12_ = self->priv->row_buf;
01135        _tmp12__length1 = self->priv->row_buf_length1;
01136        _tmp13_ = provider;
01137        _tmp14_ = iter;
01138        _tmp15_ = dee_model_get_value (_tmp13_, _tmp14_, (guint) 2);
01139        _g_variant_unref0 (_tmp12_[2]);
01140        _tmp12_[2] = _tmp15_;
01141        _tmp16_ = _tmp12_[2];
01142        _tmp17_ = self->priv->row_buf;
01143        _tmp17__length1 = self->priv->row_buf_length1;
01144        _tmp18_ = provider;
01145        _tmp19_ = iter;
01146        _tmp20_ = dee_model_get_value (_tmp18_, _tmp19_, (guint) 3);
01147        _g_variant_unref0 (_tmp17_[3]);
01148        _tmp17_[3] = _tmp20_;
01149        _tmp21_ = _tmp17_[3];
01150        _tmp22_ = self->priv->row_buf;
01151        _tmp22__length1 = self->priv->row_buf_length1;
01152        _tmp23_ = provider;
01153        _tmp24_ = iter;
01154        _tmp25_ = dee_model_get_value (_tmp23_, _tmp24_, (guint) 4);
01155        _g_variant_unref0 (_tmp22_[4]);
01156        _tmp22_[4] = _tmp25_;
01157        _tmp26_ = _tmp22_[4];
01158        _tmp27_ = self->priv->row_buf;
01159        _tmp27__length1 = self->priv->row_buf_length1;
01160        _tmp28_ = provider;
01161        _tmp29_ = iter;
01162        _tmp30_ = dee_model_get_value (_tmp28_, _tmp29_, (guint) 5);
01163        _g_variant_unref0 (_tmp27_[5]);
01164        _tmp27_[5] = _tmp30_;
01165        _tmp31_ = _tmp27_[5];
01166        _tmp32_ = self->priv->row_buf;
01167        _tmp32__length1 = self->priv->row_buf_length1;
01168        _tmp33_ = provider;
01169        _tmp34_ = iter;
01170        _tmp35_ = dee_model_get_value (_tmp33_, _tmp34_, (guint) 6);
01171        _g_variant_unref0 (_tmp32_[6]);
01172        _tmp32_[6] = _tmp35_;
01173        _tmp36_ = _tmp32_[6];
01174 }
01175 
01176 
01177 static void unity_results_synchronizer_on_row_added (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter) {
01178        DeeModelIter* i = NULL;
01179        DeeModel* _tmp0_;
01180        DeeModelIter* _tmp1_;
01181        UnityMergeStrategy* _tmp2_;
01182        DeeModel* _tmp3_;
01183        GVariant** _tmp4_;
01184        gint _tmp4__length1;
01185        DeeModelIter* _tmp5_ = NULL;
01186        DeeModelIter* _tmp6_;
01187        g_return_if_fail (self != NULL);
01188        g_return_if_fail (provider != NULL);
01189        g_return_if_fail (iter != NULL);
01190        _tmp0_ = provider;
01191        _tmp1_ = iter;
01192        unity_results_synchronizer_prepare_row_buf (self, _tmp0_, _tmp1_);
01193        _tmp2_ = self->priv->_merge_strategy;
01194        _tmp3_ = self->priv->_receiver;
01195        _tmp4_ = self->priv->row_buf;
01196        _tmp4__length1 = self->priv->row_buf_length1;
01197        _tmp5_ = unity_merge_strategy_merge_result (_tmp2_, _tmp3_, _tmp4_, _tmp4__length1);
01198        i = _tmp5_;
01199        _tmp6_ = i;
01200        if (_tmp6_ != NULL) {
01201               GeeHashMap* _tmp7_;
01202               DeeModel* _tmp8_;
01203               gpointer _tmp9_ = NULL;
01204               DeeModelTag* tag;
01205               DeeModelTag* _tmp10_;
01206               DeeModel* _tmp11_;
01207               DeeModelIter* _tmp12_;
01208               DeeModelIter* _tmp13_;
01209               _tmp7_ = self->priv->_provider_tags;
01210               _tmp8_ = provider;
01211               _tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp7_, _tmp8_);
01212               tag = (DeeModelTag*) _tmp9_;
01213               _tmp10_ = tag;
01214               _tmp11_ = provider;
01215               _tmp12_ = iter;
01216               _tmp13_ = i;
01217               dee_model_set_tag (_tmp11_, _tmp12_, _tmp10_, _tmp13_);
01218        }
01219 }
01220 
01221 
01222 static const gchar* string_to_string (const gchar* self) {
01223        const gchar* result = NULL;
01224        g_return_val_if_fail (self != NULL, NULL);
01225        result = self;
01226        return result;
01227 }
01228 
01229 
01230 static void unity_results_synchronizer_on_row_removed (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter) {
01231        GeeHashMap* _tmp0_;
01232        DeeModel* _tmp1_;
01233        gpointer _tmp2_ = NULL;
01234        DeeModelTag* tag;
01235        DeeModelTag* _tmp3_;
01236        DeeModel* _tmp4_;
01237        DeeModelIter* _tmp5_;
01238        gconstpointer _tmp6_ = NULL;
01239        DeeModelIter* riter;
01240        DeeModelIter* _tmp7_;
01241        g_return_if_fail (self != NULL);
01242        g_return_if_fail (provider != NULL);
01243        g_return_if_fail (iter != NULL);
01244        _tmp0_ = self->priv->_provider_tags;
01245        _tmp1_ = provider;
01246        _tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp1_);
01247        tag = (DeeModelTag*) _tmp2_;
01248        _tmp3_ = tag;
01249        _tmp4_ = provider;
01250        _tmp5_ = iter;
01251        _tmp6_ = dee_model_get_tag (_tmp4_, _tmp5_, _tmp3_);
01252        riter = (DeeModelIter*) _tmp6_;
01253        _tmp7_ = riter;
01254        if (_tmp7_ != NULL) {
01255               DeeModel* _tmp8_;
01256               DeeModelIter* _tmp9_;
01257               DeeModelTag* _tmp10_;
01258               DeeModel* _tmp11_;
01259               DeeModelIter* _tmp12_;
01260               _tmp8_ = self->priv->_receiver;
01261               _tmp9_ = riter;
01262               dee_model_remove (_tmp8_, _tmp9_);
01263               _tmp10_ = tag;
01264               _tmp11_ = provider;
01265               _tmp12_ = iter;
01266               dee_model_clear_tag (_tmp11_, _tmp12_, _tmp10_);
01267        } else {
01268               DeeModel* _tmp13_;
01269               DeeModelIter* _tmp14_;
01270               const gchar* _tmp15_ = NULL;
01271               const gchar* _tmp16_ = NULL;
01272               gchar* _tmp17_ = NULL;
01273               gchar* _tmp18_;
01274               _tmp13_ = provider;
01275               _tmp14_ = iter;
01276               _tmp15_ = dee_model_get_string (_tmp13_, _tmp14_, (guint) 0);
01277               _tmp16_ = string_to_string (_tmp15_);
01278               _tmp17_ = g_strconcat ("Could not find row to remove: ", _tmp16_, NULL);
01279               _tmp18_ = _tmp17_;
01280               g_debug ("unity-lens-tools.vala:228: %s", _tmp18_);
01281               _g_free0 (_tmp18_);
01282        }
01283 }
01284 
01285 
01286 static void unity_results_synchronizer_on_row_changed (UnityResultsSynchronizer* self, DeeModel* provider, DeeModelIter* iter) {
01287        GeeHashMap* _tmp0_;
01288        DeeModel* _tmp1_;
01289        gpointer _tmp2_ = NULL;
01290        DeeModelTag* tag;
01291        DeeModelTag* _tmp3_;
01292        DeeModel* _tmp4_;
01293        DeeModelIter* _tmp5_;
01294        gconstpointer _tmp6_ = NULL;
01295        DeeModelIter* riter;
01296        DeeModelIter* _tmp7_;
01297        g_return_if_fail (self != NULL);
01298        g_return_if_fail (provider != NULL);
01299        g_return_if_fail (iter != NULL);
01300        _tmp0_ = self->priv->_provider_tags;
01301        _tmp1_ = provider;
01302        _tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp1_);
01303        tag = (DeeModelTag*) _tmp2_;
01304        _tmp3_ = tag;
01305        _tmp4_ = provider;
01306        _tmp5_ = iter;
01307        _tmp6_ = dee_model_get_tag (_tmp4_, _tmp5_, _tmp3_);
01308        riter = (DeeModelIter*) _tmp6_;
01309        _tmp7_ = riter;
01310        if (_tmp7_ != NULL) {
01311               DeeModel* _tmp8_;
01312               DeeModelIter* _tmp9_;
01313               DeeModel* _tmp10_;
01314               DeeModelIter* _tmp11_;
01315               GVariant** _tmp12_;
01316               gint _tmp12__length1;
01317               _tmp8_ = provider;
01318               _tmp9_ = iter;
01319               unity_results_synchronizer_prepare_row_buf (self, _tmp8_, _tmp9_);
01320               _tmp10_ = self->priv->_receiver;
01321               _tmp11_ = riter;
01322               _tmp12_ = self->priv->row_buf;
01323               _tmp12__length1 = self->priv->row_buf_length1;
01324               dee_model_set_row (_tmp10_, _tmp11_, _tmp12_);
01325        } else {
01326               DeeModel* _tmp13_;
01327               DeeModelIter* _tmp14_;
01328               const gchar* _tmp15_ = NULL;
01329               const gchar* _tmp16_ = NULL;
01330               gchar* _tmp17_ = NULL;
01331               gchar* _tmp18_;
01332               _tmp13_ = provider;
01333               _tmp14_ = iter;
01334               _tmp15_ = dee_model_get_string (_tmp13_, _tmp14_, (guint) 0);
01335               _tmp16_ = string_to_string (_tmp15_);
01336               _tmp17_ = g_strconcat ("Could not find row to change: ", _tmp16_, NULL);
01337               _tmp18_ = _tmp17_;
01338               g_warning ("unity-lens-tools.vala:244: %s", _tmp18_);
01339               _g_free0 (_tmp18_);
01340        }
01341 }
01342 
01343 
01344 DeeModel* unity_results_synchronizer_get_receiver (UnityResultsSynchronizer* self) {
01345        DeeModel* result;
01346        DeeModel* _tmp0_;
01347        g_return_val_if_fail (self != NULL, NULL);
01348        _tmp0_ = self->priv->_receiver;
01349        result = _tmp0_;
01350        return result;
01351 }
01352 
01353 
01354 static void unity_results_synchronizer_set_receiver (UnityResultsSynchronizer* self, DeeModel* value) {
01355        DeeModel* _tmp0_;
01356        g_return_if_fail (self != NULL);
01357        _tmp0_ = value;
01358        self->priv->_receiver = _tmp0_;
01359        g_object_notify ((GObject *) self, "receiver");
01360 }
01361 
01362 
01363 UnityMergeStrategy* unity_results_synchronizer_get_merge_strategy (UnityResultsSynchronizer* self) {
01364        UnityMergeStrategy* result;
01365        UnityMergeStrategy* _tmp0_;
01366        g_return_val_if_fail (self != NULL, NULL);
01367        _tmp0_ = self->priv->_merge_strategy;
01368        result = _tmp0_;
01369        return result;
01370 }
01371 
01372 
01373 void unity_results_synchronizer_set_merge_strategy (UnityResultsSynchronizer* self, UnityMergeStrategy* value) {
01374        UnityMergeStrategy* _tmp0_;
01375        UnityMergeStrategy* _tmp1_;
01376        g_return_if_fail (self != NULL);
01377        _tmp0_ = value;
01378        _tmp1_ = _g_object_ref0 (_tmp0_);
01379        _g_object_unref0 (self->priv->_merge_strategy);
01380        self->priv->_merge_strategy = _tmp1_;
01381        g_object_notify ((GObject *) self, "merge-strategy");
01382 }
01383 
01384 
01385 static GObject * unity_results_synchronizer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
01386        GObject * obj;
01387        GObjectClass * parent_class;
01388        UnityResultsSynchronizer * self;
01389        GeeArrayList* _tmp0_;
01390        GeeHashMap* _tmp1_;
01391        parent_class = G_OBJECT_CLASS (unity_results_synchronizer_parent_class);
01392        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
01393        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizer);
01394        _tmp0_ = gee_array_list_new (dee_model_get_type (), NULL, NULL, NULL);
01395        _g_object_unref0 (self->priv->_providers);
01396        self->priv->_providers = _tmp0_;
01397        _tmp1_ = gee_hash_map_new (dee_model_get_type (), NULL, NULL, G_TYPE_POINTER, NULL, NULL, NULL, NULL, NULL);
01398        _g_object_unref0 (self->priv->_provider_tags);
01399        self->priv->_provider_tags = _tmp1_;
01400        unity_results_synchronizer_set_merge_strategy (self, (UnityMergeStrategy*) self);
01401        return obj;
01402 }
01403 
01404 
01405 static void unity_results_synchronizer_class_init (UnityResultsSynchronizerClass * klass) {
01406        unity_results_synchronizer_parent_class = g_type_class_peek_parent (klass);
01407        g_type_class_add_private (klass, sizeof (UnityResultsSynchronizerPrivate));
01408        G_OBJECT_CLASS (klass)->get_property = _vala_unity_results_synchronizer_get_property;
01409        G_OBJECT_CLASS (klass)->set_property = _vala_unity_results_synchronizer_set_property;
01410        G_OBJECT_CLASS (klass)->constructor = unity_results_synchronizer_constructor;
01411        G_OBJECT_CLASS (klass)->finalize = unity_results_synchronizer_finalize;
01412        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_RESULTS_SYNCHRONIZER_RECEIVER, g_param_spec_object ("receiver", "receiver", "receiver", dee_model_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01413        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_RESULTS_SYNCHRONIZER_MERGE_STRATEGY, g_param_spec_object ("merge-strategy", "merge-strategy", "merge-strategy", UNITY_TYPE_MERGE_STRATEGY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01414 }
01415 
01416 
01417 static void unity_results_synchronizer_unity_merge_strategy_interface_init (UnityMergeStrategyIface * iface) {
01418        unity_results_synchronizer_unity_merge_strategy_parent_iface = g_type_interface_peek_parent (iface);
01419        iface->merge_result = (DeeModelIter* (*)(UnityMergeStrategy*, DeeModel*, GVariant**, int)) unity_results_synchronizer_real_merge_result;
01420 }
01421 
01422 
01423 static void unity_results_synchronizer_instance_init (UnityResultsSynchronizer * self) {
01424        GVariant** _tmp0_ = NULL;
01425        self->priv = UNITY_RESULTS_SYNCHRONIZER_GET_PRIVATE (self);
01426        _tmp0_ = g_new0 (GVariant*, 7 + 1);
01427        self->priv->row_buf = _tmp0_;
01428        self->priv->row_buf_length1 = 7;
01429        self->priv->_row_buf_size_ = self->priv->row_buf_length1;
01430 }
01431 
01432 
01433 static void unity_results_synchronizer_finalize (GObject* obj) {
01434        UnityResultsSynchronizer * self;
01435        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizer);
01436        _g_object_unref0 (self->priv->_merge_strategy);
01437        _g_object_unref0 (self->priv->_providers);
01438        _g_object_unref0 (self->priv->_provider_tags);
01439        self->priv->row_buf = (_vala_array_free (self->priv->row_buf, self->priv->row_buf_length1, (GDestroyNotify) g_variant_unref), NULL);
01440        G_OBJECT_CLASS (unity_results_synchronizer_parent_class)->finalize (obj);
01441 }
01442 
01443 
01444 GType unity_results_synchronizer_get_type (void) {
01445        static volatile gsize unity_results_synchronizer_type_id__volatile = 0;
01446        if (g_once_init_enter (&unity_results_synchronizer_type_id__volatile)) {
01447               static const GTypeInfo g_define_type_info = { sizeof (UnityResultsSynchronizerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_results_synchronizer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityResultsSynchronizer), 0, (GInstanceInitFunc) unity_results_synchronizer_instance_init, NULL };
01448               static const GInterfaceInfo unity_merge_strategy_info = { (GInterfaceInitFunc) unity_results_synchronizer_unity_merge_strategy_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
01449               GType unity_results_synchronizer_type_id;
01450               unity_results_synchronizer_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityResultsSynchronizer", &g_define_type_info, 0);
01451               g_type_add_interface_static (unity_results_synchronizer_type_id, UNITY_TYPE_MERGE_STRATEGY, &unity_merge_strategy_info);
01452               g_once_init_leave (&unity_results_synchronizer_type_id__volatile, unity_results_synchronizer_type_id);
01453        }
01454        return unity_results_synchronizer_type_id__volatile;
01455 }
01456 
01457 
01458 static void _vala_unity_results_synchronizer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
01459        UnityResultsSynchronizer * self;
01460        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizer);
01461        switch (property_id) {
01462               case UNITY_RESULTS_SYNCHRONIZER_RECEIVER:
01463               g_value_set_object (value, unity_results_synchronizer_get_receiver (self));
01464               break;
01465               case UNITY_RESULTS_SYNCHRONIZER_MERGE_STRATEGY:
01466               g_value_set_object (value, unity_results_synchronizer_get_merge_strategy (self));
01467               break;
01468               default:
01469               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01470               break;
01471        }
01472 }
01473 
01474 
01475 static void _vala_unity_results_synchronizer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
01476        UnityResultsSynchronizer * self;
01477        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizer);
01478        switch (property_id) {
01479               case UNITY_RESULTS_SYNCHRONIZER_RECEIVER:
01480               unity_results_synchronizer_set_receiver (self, g_value_get_object (value));
01481               break;
01482               case UNITY_RESULTS_SYNCHRONIZER_MERGE_STRATEGY:
01483               unity_results_synchronizer_set_merge_strategy (self, g_value_get_object (value));
01484               break;
01485               default:
01486               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01487               break;
01488        }
01489 }
01490 
01491 
01492 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
01493        if ((array != NULL) && (destroy_func != NULL)) {
01494               int i;
01495               for (i = 0; i < array_length; i = i + 1) {
01496                      if (((gpointer*) array)[i] != NULL) {
01497                             destroy_func (((gpointer*) array)[i]);
01498                      }
01499               }
01500        }
01501 }
01502 
01503 
01504 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
01505        _vala_array_destroy (array, array_length, destroy_func);
01506        g_free (array);
01507 }
01508 
01509 
01510