Back to index

libunity  5.92.0
unity-lens-private.c
Go to the documentation of this file.
00001 /* unity-lens-private.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-lens-private.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 <unity-protocol.h>
00027 #include "unity.h"
00028 #include <dee.h>
00029 #include <stdlib.h>
00030 #include <string.h>
00031 #include <gio/gio.h>
00032 #include <gee.h>
00033 #include <unity-trace.h>
00034 
00035 
00036 #define UNITY_TYPE_LENS_IMPL (unity_lens_impl_get_type ())
00037 #define UNITY_LENS_IMPL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_LENS_IMPL, UnityLensImpl))
00038 #define UNITY_LENS_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_LENS_IMPL, UnityLensImplClass))
00039 #define UNITY_IS_LENS_IMPL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_LENS_IMPL))
00040 #define UNITY_IS_LENS_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_LENS_IMPL))
00041 #define UNITY_LENS_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_LENS_IMPL, UnityLensImplClass))
00042 
00043 typedef struct _UnityLensImpl UnityLensImpl;
00044 typedef struct _UnityLensImplClass UnityLensImplClass;
00045 typedef struct _UnityLensImplPrivate UnityLensImplPrivate;
00046 
00047 #define UNITY_TYPE_SCOPE_FACTORY (unity_scope_factory_get_type ())
00048 #define UNITY_SCOPE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactory))
00049 #define UNITY_SCOPE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactoryClass))
00050 #define UNITY_IS_SCOPE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_FACTORY))
00051 #define UNITY_IS_SCOPE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_FACTORY))
00052 #define UNITY_SCOPE_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactoryClass))
00053 
00054 typedef struct _UnityScopeFactory UnityScopeFactory;
00055 typedef struct _UnityScopeFactoryClass UnityScopeFactoryClass;
00056 
00057 #define UNITY_TYPE_FILTERS_SYNCHRONIZER (unity_filters_synchronizer_get_type ())
00058 #define UNITY_FILTERS_SYNCHRONIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizer))
00059 #define UNITY_FILTERS_SYNCHRONIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizerClass))
00060 #define UNITY_IS_FILTERS_SYNCHRONIZER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_FILTERS_SYNCHRONIZER))
00061 #define UNITY_IS_FILTERS_SYNCHRONIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_FILTERS_SYNCHRONIZER))
00062 #define UNITY_FILTERS_SYNCHRONIZER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_FILTERS_SYNCHRONIZER, UnityFiltersSynchronizerClass))
00063 
00064 typedef struct _UnityFiltersSynchronizer UnityFiltersSynchronizer;
00065 typedef struct _UnityFiltersSynchronizerClass UnityFiltersSynchronizerClass;
00066 
00067 #define UNITY_TYPE_RESULTS_SYNCHRONIZER (unity_results_synchronizer_get_type ())
00068 #define UNITY_RESULTS_SYNCHRONIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizer))
00069 #define UNITY_RESULTS_SYNCHRONIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizerClass))
00070 #define UNITY_IS_RESULTS_SYNCHRONIZER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_RESULTS_SYNCHRONIZER))
00071 #define UNITY_IS_RESULTS_SYNCHRONIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_RESULTS_SYNCHRONIZER))
00072 #define UNITY_RESULTS_SYNCHRONIZER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_RESULTS_SYNCHRONIZER, UnityResultsSynchronizerClass))
00073 
00074 typedef struct _UnityResultsSynchronizer UnityResultsSynchronizer;
00075 typedef struct _UnityResultsSynchronizerClass UnityResultsSynchronizerClass;
00076 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00077 #define _g_free0(var) (var = (g_free (var), NULL))
00078 
00079 #define UNITY_TYPE_SCOPE_PROXY (unity_scope_proxy_get_type ())
00080 #define UNITY_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxy))
00081 #define UNITY_IS_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY))
00082 #define UNITY_SCOPE_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxyIface))
00083 
00084 typedef struct _UnityScopeProxy UnityScopeProxy;
00085 typedef struct _UnityScopeProxyIface UnityScopeProxyIface;
00086 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
00087 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
00088 #define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
00089 typedef struct _Block1Data Block1Data;
00090 
00091 #define UNITY_TYPE_SCOPE_PROXY_REMOTE (unity_scope_proxy_remote_get_type ())
00092 #define UNITY_SCOPE_PROXY_REMOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemote))
00093 #define UNITY_SCOPE_PROXY_REMOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))
00094 #define UNITY_IS_SCOPE_PROXY_REMOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE))
00095 #define UNITY_IS_SCOPE_PROXY_REMOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE))
00096 #define UNITY_SCOPE_PROXY_REMOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))
00097 
00098 typedef struct _UnityScopeProxyRemote UnityScopeProxyRemote;
00099 typedef struct _UnityScopeProxyRemoteClass UnityScopeProxyRemoteClass;
00100 
00101 #define UNITY_TYPE_FILTER_COLUMN (unity_filter_column_get_type ())
00102 typedef struct _UnityLensImplInfoRequestData UnityLensImplInfoRequestData;
00103 typedef struct _UnityLensImplActivateData UnityLensImplActivateData;
00104 typedef struct _UnityLensImplUpdatePreviewPropertyData UnityLensImplUpdatePreviewPropertyData;
00105 typedef struct _Block2Data Block2Data;
00106 typedef struct _Block3Data Block3Data;
00107 typedef struct _Block4Data Block4Data;
00108 typedef struct _UnityScopeFactoryPrivate UnityScopeFactoryPrivate;
00109 typedef struct _UnityLensImplSearchData UnityLensImplSearchData;
00110 typedef struct _Block5Data Block5Data;
00111 typedef struct _Block6Data Block6Data;
00112 typedef struct _Block7Data Block7Data;
00113 typedef struct _UnityLensImplGlobalSearchData UnityLensImplGlobalSearchData;
00114 typedef struct _UnityLensImplUpdateFilterData UnityLensImplUpdateFilterData;
00115 typedef struct _UnityLensImplUpdateActiveSourcesData UnityLensImplUpdateActiveSourcesData;
00116 typedef struct _UnityLensImplSetViewTypeData UnityLensImplSetViewTypeData;
00117 
00118 struct _UnityLensImpl {
00119        GObject parent_instance;
00120        UnityLensImplPrivate * priv;
00121 };
00122 
00123 struct _UnityLensImplClass {
00124        GObjectClass parent_class;
00125 };
00126 
00127 struct _UnityLensImplPrivate {
00128        UnityLens* _owner;
00129        guint _dbus_id;
00130        guint _info_changed_id;
00131        guint _sources_update_id;
00132        DeeSharedModel* _results_model;
00133        DeeSharedModel* _global_results_model;
00134        DeeSharedModel* _categories_model;
00135        DeeSharedModel* _filters_model;
00136        UnityOptionsFilter* _sources;
00137        UnityScopeFactory* _scope_factory;
00138        UnityFiltersSynchronizer* _filters_sync;
00139        UnityResultsSynchronizer* _results_sync;
00140        UnityResultsSynchronizer* _global_results_sync;
00141 };
00142 
00143 struct _UnityScopeProxyIface {
00144        GTypeInterface parent_iface;
00145        void (*activate) (UnityScopeProxy* self, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00146        void (*activate_finish) (UnityScopeProxy* self, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result);
00147        void (*update_preview_property) (UnityScopeProxy* self, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00148        GHashTable* (*update_preview_property_finish) (UnityScopeProxy* self, GAsyncResult* _res_, GError** error);
00149        void (*search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00150        GHashTable* (*search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00151        void (*global_search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00152        GHashTable* (*global_search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00153        void (*set_active_sources) (UnityScopeProxy* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
00154        void (*set_active_sources_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00155        UnityOptionsFilter* (*get_sources) (UnityScopeProxy* self);
00156        void (*set_sources) (UnityScopeProxy* self, UnityOptionsFilter* value);
00157        gboolean (*get_search_in_global) (UnityScopeProxy* self);
00158        void (*set_search_in_global) (UnityScopeProxy* self, gboolean value);
00159        UnityProtocolViewType (*get_view_type) (UnityScopeProxy* self);
00160        void (*set_view_type) (UnityScopeProxy* self, UnityProtocolViewType value);
00161        DeeSerializableModel* (*get_results_model) (UnityScopeProxy* self);
00162        void (*set_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00163        DeeSerializableModel* (*get_global_results_model) (UnityScopeProxy* self);
00164        void (*set_global_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00165        DeeSerializableModel* (*get_filters_model) (UnityScopeProxy* self);
00166        void (*set_filters_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00167 };
00168 
00169 struct _Block1Data {
00170        int _ref_count_;
00171        UnityLensImpl * self;
00172        UnityScopeProxy* scope;
00173 };
00174 
00175 typedef enum  {
00176        UNITY_FILTER_COLUMN_ID = 0,
00177        UNITY_FILTER_COLUMN_NAME,
00178        UNITY_FILTER_COLUMN_ICON_HINT,
00179        UNITY_FILTER_COLUMN_RENDERER_NAME,
00180        UNITY_FILTER_COLUMN_RENDERER_STATE,
00181        UNITY_FILTER_COLUMN_VISIBLE,
00182        UNITY_FILTER_COLUMN_COLLAPSED,
00183        UNITY_FILTER_COLUMN_FILTERING
00184 } UnityFilterColumn;
00185 
00186 struct _UnityLensImplInfoRequestData {
00187        int _state_;
00188        GObject* _source_object_;
00189        GAsyncResult* _res_;
00190        GSimpleAsyncResult* _async_result;
00191        UnityLensImpl* self;
00192 };
00193 
00194 struct _UnityLensImplActivateData {
00195        int _state_;
00196        GObject* _source_object_;
00197        GAsyncResult* _res_;
00198        GSimpleAsyncResult* _async_result;
00199        UnityLensImpl* self;
00200        gchar* uri;
00201        guint action_type;
00202        UnityProtocolActivationReplyRaw result;
00203        gchar** tokens;
00204        gint tokens_length1;
00205        gint _tokens_size_;
00206        UnityScopeProxy* scope;
00207        gchar* scope_uri;
00208        guint _tmp0_;
00209        const gchar* _tmp1_;
00210        gchar** _tmp2_;
00211        gchar** _tmp3_;
00212        gchar** _tmp4_;
00213        gint _tmp4__length1;
00214        const gchar* _tmp5_;
00215        UnityScopeProxy* _tmp6_;
00216        gchar** _tmp7_;
00217        gint _tmp7__length1;
00218        const gchar* _tmp8_;
00219        gchar** _tmp9_;
00220        gint _tmp9__length1;
00221        const gchar* _tmp10_;
00222        gchar* _tmp11_;
00223        const gchar* _tmp12_;
00224        gchar** _tmp13_;
00225        gchar** _tmp14_;
00226        gchar** _tmp15_;
00227        gint _tmp15__length1;
00228        const gchar* _tmp16_;
00229        UnityScopeProxy* _tmp17_;
00230        gchar** _tmp18_;
00231        gint _tmp18__length1;
00232        const gchar* _tmp19_;
00233        gchar* _tmp20_;
00234        UnityProtocolActivationReplyRaw raw;
00235        GHashTable* _tmp21_;
00236        UnityScopeProxy* _tmp22_;
00237        UnityScopeProxy* _tmp23_;
00238        const gchar* _tmp24_;
00239        guint _tmp25_;
00240        UnityProtocolActivationReplyRaw _tmp26_;
00241        UnityScopeProxy* _tmp27_;
00242        gchar* _tmp28_;
00243        gchar* _tmp29_;
00244        UnityProtocolActivationReplyRaw _tmp30_;
00245        const gchar* _tmp31_;
00246        gchar* _tmp32_;
00247        const gchar* _tmp33_;
00248        const gchar* _tmp34_;
00249        gchar* _tmp35_;
00250        UnityProtocolActivationReplyRaw _tmp36_;
00251        guint _tmp37_;
00252 };
00253 
00254 struct _UnityLensImplUpdatePreviewPropertyData {
00255        int _state_;
00256        GObject* _source_object_;
00257        GAsyncResult* _res_;
00258        GSimpleAsyncResult* _async_result;
00259        UnityLensImpl* self;
00260        gchar* uri;
00261        GHashTable* values;
00262        GHashTable* result;
00263        const gchar* _tmp0_;
00264        gchar** _tmp1_;
00265        gchar** _tmp2_;
00266        gchar** tokens;
00267        gint tokens_length1;
00268        gint _tokens_size_;
00269        gchar** _tmp3_;
00270        gint _tmp3__length1;
00271        const gchar* _tmp4_;
00272        gchar* _tmp5_;
00273        gchar* scope_uri;
00274        gchar** _tmp6_;
00275        gint _tmp6__length1;
00276        const gchar* _tmp7_;
00277        UnityScopeProxy* _tmp8_;
00278        UnityScopeProxy* scope;
00279        UnityScopeProxy* _tmp9_;
00280        UnityScopeProxy* _tmp10_;
00281        const gchar* _tmp11_;
00282        GHashTable* _tmp12_;
00283        GHashTable* _tmp13_;
00284        GHashTable* reply;
00285        const gchar* _tmp14_;
00286        GHashFunc _tmp15_;
00287        GEqualFunc _tmp16_;
00288        GHashTable* _tmp17_;
00289        GError * _inner_error_;
00290 };
00291 
00292 struct _Block2Data {
00293        int _ref_count_;
00294        UnityLensImpl * self;
00295        GHashTable* _result_;
00296        gint num_scopes;
00297        gpointer _async_data_;
00298 };
00299 
00300 struct _Block3Data {
00301        int _ref_count_;
00302        Block2Data * _data2_;
00303        guint64 seqnum;
00304 };
00305 
00306 struct _Block4Data {
00307        int _ref_count_;
00308        Block3Data * _data3_;
00309        gulong update_sig_id;
00310 };
00311 
00312 struct _UnityScopeFactory {
00313        GObject parent_instance;
00314        UnityScopeFactoryPrivate * priv;
00315        GeeArrayList* scopes;
00316 };
00317 
00318 struct _UnityScopeFactoryClass {
00319        GObjectClass parent_class;
00320 };
00321 
00322 struct _UnityLensImplSearchData {
00323        int _state_;
00324        GObject* _source_object_;
00325        GAsyncResult* _res_;
00326        GSimpleAsyncResult* _async_result;
00327        UnityLensImpl* self;
00328        gchar* search_string;
00329        GHashTable* hints;
00330        GHashTable* result;
00331        Block2Data* _data2_;
00332        GHashFunc _tmp0_;
00333        GEqualFunc _tmp1_;
00334        GHashTable* _tmp2_;
00335        GAsyncReadyCallback cb;
00336        void* cb_target;
00337        GDestroyNotify cb_target_destroy_notify;
00338        UnityScopeFactory* _tmp3_;
00339        GeeArrayList* _tmp4_;
00340        GeeArrayList* _tmp5_;
00341        GeeArrayList* _scope_list;
00342        GeeArrayList* _tmp6_;
00343        gint _tmp7_;
00344        gint _tmp8_;
00345        gint _scope_size;
00346        gint _scope_index;
00347        gint _tmp9_;
00348        gint _tmp10_;
00349        gint _tmp11_;
00350        GeeArrayList* _tmp12_;
00351        gint _tmp13_;
00352        gpointer _tmp14_;
00353        UnityScopeProxy* scope;
00354        gint _tmp15_;
00355        UnityScopeProxy* _tmp16_;
00356        const gchar* _tmp17_;
00357        GHashTable* _tmp18_;
00358        GAsyncReadyCallback _tmp19_;
00359        void* _tmp19__target;
00360        gint _tmp20_;
00361        GHashTable* _tmp21_;
00362        gchar* _tmp22_;
00363        DeeSharedModel* _tmp23_;
00364        guint64 _tmp24_;
00365        GVariant* _tmp25_;
00366        GHashTable* _tmp26_;
00367        GHashTable* _tmp27_;
00368 };
00369 
00370 struct _Block5Data {
00371        int _ref_count_;
00372        UnityLensImpl * self;
00373        gint num_scopes;
00374        gpointer _async_data_;
00375 };
00376 
00377 struct _Block6Data {
00378        int _ref_count_;
00379        Block5Data * _data5_;
00380        guint64 seqnum;
00381 };
00382 
00383 struct _Block7Data {
00384        int _ref_count_;
00385        Block6Data * _data6_;
00386        gulong update_sig_id;
00387 };
00388 
00389 struct _UnityLensImplGlobalSearchData {
00390        int _state_;
00391        GObject* _source_object_;
00392        GAsyncResult* _res_;
00393        GSimpleAsyncResult* _async_result;
00394        UnityLensImpl* self;
00395        gchar* search_string;
00396        GHashTable* hints;
00397        GHashTable* result;
00398        Block5Data* _data5_;
00399        GAsyncReadyCallback cb;
00400        void* cb_target;
00401        GDestroyNotify cb_target_destroy_notify;
00402        UnityScopeFactory* _tmp0_;
00403        GeeArrayList* _tmp1_;
00404        GeeArrayList* _tmp2_;
00405        GeeArrayList* _scope_list;
00406        GeeArrayList* _tmp3_;
00407        gint _tmp4_;
00408        gint _tmp5_;
00409        gint _scope_size;
00410        gint _scope_index;
00411        gint _tmp6_;
00412        gint _tmp7_;
00413        gint _tmp8_;
00414        GeeArrayList* _tmp9_;
00415        gint _tmp10_;
00416        gpointer _tmp11_;
00417        UnityScopeProxy* scope;
00418        UnityScopeProxy* _tmp12_;
00419        gboolean _tmp13_;
00420        gboolean _tmp14_;
00421        gint _tmp15_;
00422        UnityScopeProxy* _tmp16_;
00423        const gchar* _tmp17_;
00424        GHashTable* _tmp18_;
00425        GAsyncReadyCallback _tmp19_;
00426        void* _tmp19__target;
00427        gint _tmp20_;
00428        GHashFunc _tmp21_;
00429        GEqualFunc _tmp22_;
00430        GHashTable* _tmp23_;
00431        GHashTable* _result_;
00432        gchar* _tmp24_;
00433        DeeSharedModel* _tmp25_;
00434        guint64 _tmp26_;
00435        GVariant* _tmp27_;
00436 };
00437 
00438 struct _UnityLensImplUpdateFilterData {
00439        int _state_;
00440        GObject* _source_object_;
00441        GAsyncResult* _res_;
00442        GSimpleAsyncResult* _async_result;
00443        UnityLensImpl* self;
00444        gchar* filter_name;
00445        GHashTable* properties;
00446        const gchar* _tmp0_;
00447 };
00448 
00449 struct _UnityLensImplUpdateActiveSourcesData {
00450        int _state_;
00451        GObject* _source_object_;
00452        GAsyncResult* _res_;
00453        GSimpleAsyncResult* _async_result;
00454        UnityLensImpl* self;
00455        GeeSet* updated_scope_uids;
00456        GeeSet* _tmp0_;
00457        GeeIterator* _tmp1_;
00458        GeeIterator* _scope_uid_it;
00459        GeeIterator* _tmp2_;
00460        gboolean _tmp3_;
00461        GeeIterator* _tmp4_;
00462        gpointer _tmp5_;
00463        gchar* scope_uid;
00464        const gchar* _tmp6_;
00465        UnityScopeProxy* _tmp7_;
00466        UnityScopeProxy* scope;
00467        UnityScopeProxy* _tmp8_;
00468        gchar** _tmp9_;
00469        gchar** active_sources;
00470        gint active_sources_length1;
00471        gint _active_sources_size_;
00472        UnityOptionsFilter* _tmp10_;
00473        GList* _tmp11_;
00474        GList* filter_option_collection;
00475        GList* filter_option_it;
00476        UnityFilterOption* _tmp12_;
00477        UnityFilterOption* filter_option;
00478        gboolean _tmp13_;
00479        UnityFilterOption* _tmp14_;
00480        const gchar* _tmp15_;
00481        const gchar* _tmp16_;
00482        const gchar* _tmp17_;
00483        gboolean _tmp18_;
00484        UnityFilterOption* _tmp19_;
00485        gboolean _tmp20_;
00486        gboolean _tmp21_;
00487        gboolean _tmp22_;
00488        gchar** _tmp23_;
00489        gint _tmp23__length1;
00490        UnityFilterOption* _tmp24_;
00491        const gchar* _tmp25_;
00492        const gchar* _tmp26_;
00493        const gchar* _tmp27_;
00494        gint _tmp28_;
00495        gint _tmp29_;
00496        gchar* _tmp30_;
00497        UnityScopeProxy* _tmp31_;
00498        gchar** _tmp32_;
00499        gint _tmp32__length1;
00500 };
00501 
00502 struct _UnityLensImplSetViewTypeData {
00503        int _state_;
00504        GObject* _source_object_;
00505        GAsyncResult* _res_;
00506        GSimpleAsyncResult* _async_result;
00507        UnityLensImpl* self;
00508        guint view_type;
00509        UnityScopeFactory* _tmp0_;
00510        GeeArrayList* _tmp1_;
00511        GeeArrayList* _tmp2_;
00512        GeeArrayList* _scope_list;
00513        GeeArrayList* _tmp3_;
00514        gint _tmp4_;
00515        gint _tmp5_;
00516        gint _scope_size;
00517        gint _scope_index;
00518        gint _tmp6_;
00519        gint _tmp7_;
00520        gint _tmp8_;
00521        GeeArrayList* _tmp9_;
00522        gint _tmp10_;
00523        gpointer _tmp11_;
00524        UnityScopeProxy* scope;
00525        UnityScopeProxy* _tmp12_;
00526        guint _tmp13_;
00527        UnityLens* _tmp14_;
00528        guint _tmp15_;
00529 };
00530 
00531 
00532 static gpointer unity_lens_impl_parent_class = NULL;
00533 static const gchar* unity_lens_impl_LENS_DIRECTORY;
00534 static const gchar* unity_lens_impl_LENS_DIRECTORY = NULL;
00535 static UnityProtocolLensServiceIface* unity_lens_impl_unity_protocol_lens_service_parent_iface = NULL;
00536 
00537 GType unity_lens_impl_get_type (void) G_GNUC_CONST;
00538 GType unity_scope_factory_get_type (void) G_GNUC_CONST;
00539 GType unity_filters_synchronizer_get_type (void) G_GNUC_CONST;
00540 GType unity_results_synchronizer_get_type (void) G_GNUC_CONST;
00541 #define UNITY_LENS_IMPL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_LENS_IMPL, UnityLensImplPrivate))
00542 enum  {
00543        UNITY_LENS_IMPL_DUMMY_PROPERTY,
00544        UNITY_LENS_IMPL_RESULTS_SYNC,
00545        UNITY_LENS_IMPL_GLOBAL_RESULTS_SYNC
00546 };
00547 UnityLensImpl* unity_lens_impl_new (UnityLens* owner);
00548 UnityLensImpl* unity_lens_impl_construct (GType object_type, UnityLens* owner);
00549 static void unity_lens_impl_queue_info_changed (UnityLensImpl* self);
00550 static void _unity_lens_impl_queue_info_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00551 static void unity_lens_impl_sources_display_name_changed (UnityLensImpl* self, GObject* obj, GParamSpec* pspec);
00552 static void _unity_lens_impl_sources_display_name_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00553 #define UNITY_LENS_SOURCES_FILTER_ID "unity-sources"
00554 static void unity_lens_impl_create_models (UnityLensImpl* self, const gchar* dbus_name);
00555 static gchar* unity_lens_impl_create_dbus_name (UnityLensImpl* self);
00556 static void unity_lens_impl_create_synchronizers (UnityLensImpl* self);
00557 UnityScopeFactory* unity_scope_factory_new (const gchar* lens_id_, const gchar* lenses_directory_);
00558 UnityScopeFactory* unity_scope_factory_construct (GType object_type, const gchar* lens_id_, const gchar* lenses_directory_);
00559 GType unity_scope_proxy_get_type (void) G_GNUC_CONST;
00560 static void unity_lens_impl_on_scope_added (UnityLensImpl* self, UnityScopeFactory* factory, UnityScopeProxy* scope);
00561 static void _unity_lens_impl_on_scope_added_unity_scope_factory_scope_added (UnityScopeFactory* _sender, UnityScopeProxy* scope, gpointer self);
00562 static DeeSharedModel* unity_lens_impl_create_master_model (UnityLensImpl* self, const gchar* swarm_name);
00563 UnityResultsSynchronizer* unity_results_synchronizer_new (DeeModel* receiver);
00564 UnityResultsSynchronizer* unity_results_synchronizer_construct (GType object_type, DeeModel* receiver);
00565 UnityFiltersSynchronizer* unity_filters_synchronizer_new (DeeModel* provider);
00566 UnityFiltersSynchronizer* unity_filters_synchronizer_construct (GType object_type, DeeModel* provider);
00567 static void __lambda13_ (UnityLensImpl* self, DeeModel* model, DeeModelIter* iter);
00568 static void unity_lens_impl_sources_filter_changed (UnityLensImpl* self, DeeModel* model, DeeModelIter* iter);
00569 static void ___lambda13__dee_model_row_changed (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00570 void unity_lens_impl_export (UnityLensImpl* self, GError** error);
00571 void unity_lens_impl_load_categories (UnityLensImpl* self, GList* categories);
00572 const gchar* unity_category_get_renderer (UnityCategory* self);
00573 GVariant* unity_tools_hash_table_to_asv (GHashTable* hash);
00574 GHashTable* unity_category_get_hints (UnityCategory* self);
00575 void unity_lens_impl_load_filters (UnityLensImpl* self, GList* filters);
00576 static void unity_lens_impl_on_filter_changed (UnityLensImpl* self, UnityFilter* filter);
00577 static void _unity_lens_impl_on_filter_changed_unity_filter_changed (UnityFilter* _sender, gpointer self);
00578 const gchar* unity_filter_get_renderer_name (UnityFilterRenderer renderer);
00579 GHashTable* unity_filter_get_hints (UnityFilter* self);
00580 static gboolean unity_lens_impl_emit_info_changed (UnityLensImpl* self);
00581 static gboolean _unity_lens_impl_emit_info_changed_gsource_func (gpointer self);
00582 static void _g_free0_ (gpointer var);
00583 static void _g_variant_unref0_ (gpointer var);
00584 DeeSerializableModel* unity_scope_proxy_get_results_model (UnityScopeProxy* self);
00585 static void unity_lens_impl_on_scope_results_model_changed (UnityLensImpl* self, GObject* obj, GParamSpec* pspec);
00586 DeeSerializableModel* unity_scope_proxy_get_global_results_model (UnityScopeProxy* self);
00587 static void unity_lens_impl_on_scope_global_results_model_changed (UnityLensImpl* self, GObject* obj, GParamSpec* pspec);
00588 DeeSerializableModel* unity_scope_proxy_get_filters_model (UnityScopeProxy* self);
00589 static void unity_lens_impl_on_scope_filters_model_changed (UnityLensImpl* self, GObject* obj, GParamSpec* pspec);
00590 static void _unity_lens_impl_on_scope_results_model_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00591 static void _unity_lens_impl_on_scope_global_results_model_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00592 static void _unity_lens_impl_on_scope_filters_model_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00593 static void unity_lens_impl_on_scope_sources_updated (UnityLensImpl* self, GObject* obj, GParamSpec* pspec);
00594 static void _unity_lens_impl_on_scope_sources_updated_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00595 void unity_results_synchronizer_add_provider (UnityResultsSynchronizer* self, DeeModel* provider, const gchar* uid);
00596 static gchar* unity_lens_impl_uid_for_scope (UnityLensImpl* self, UnityScopeProxy* scope);
00597 static Block1Data* block1_data_ref (Block1Data* _data1_);
00598 static void block1_data_unref (void * _userdata_);
00599 GType unity_scope_proxy_remote_get_type (void) G_GNUC_CONST;
00600 static void ___lambda14_ (Block1Data* _data1_);
00601 void unity_filters_synchronizer_add_receiver (UnityFiltersSynchronizer* self, DeeModel* receiver);
00602 static void ____lambda14__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00603 static void unity_lens_impl_scope_filter_model_vanished (UnityLensImpl* self, DeeModel* filter_model);
00604 void unity_filters_synchronizer_remove_receiver (UnityFiltersSynchronizer* self, DeeModel* receiver);
00605 UnityOptionsFilter* unity_scope_proxy_get_sources (UnityScopeProxy* self);
00606 void unity_filter_option_set_active (UnityFilterOption* self, gboolean value);
00607 static void unity_lens_impl_queue_sources_update (UnityLensImpl* self);
00608 GType unity_filter_column_get_type (void) G_GNUC_CONST;
00609 void unity_filter_set_display_name (UnityFilter* self, const gchar* value);
00610 static gboolean ___lambda12_ (UnityLensImpl* self);
00611 static gboolean ____lambda12__gsource_func (gpointer self);
00612 void unity_filter_set_filtering (UnityFilter* self, gboolean value);
00613 void unity_filter_update (UnityFilter* self, GVariant* properties);
00614 void unity_lens_impl_update_active_sources (UnityLensImpl* self, GeeSet* updated_scope_uids, GAsyncReadyCallback _callback_, gpointer _user_data_);
00615 void unity_lens_impl_update_active_sources_finish (UnityLensImpl* self, GAsyncResult* _res_);
00616 void unity_lens_impl_add_local_scope (UnityLensImpl* self, UnityScope* scope);
00617 void unity_scope_factory_add_local_scope (UnityScopeFactory* self, UnityScope* scope);
00618 UnityOptionsFilter* unity_lens_impl_get_sources (UnityLensImpl* self);
00619 DeeModel* unity_lens_impl_get_model (UnityLensImpl* self, gint index);
00620 static void unity_lens_impl_real_info_request_data_free (gpointer _data);
00621 static void unity_lens_impl_real_info_request (UnityProtocolLensService* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
00622 static gboolean unity_lens_impl_real_info_request_co (UnityLensImplInfoRequestData* _data_);
00623 static void unity_lens_impl_real_activate_data_free (gpointer _data);
00624 static void unity_lens_impl_real_activate (UnityProtocolLensService* base, const gchar* uri, guint action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00625 static gboolean unity_lens_impl_real_activate_co (UnityLensImplActivateData* _data_);
00626 static UnityScopeProxy* unity_lens_impl_get_scope_for_uid (UnityLensImpl* self, const gchar* uid);
00627 void unity_scope_proxy_activate (UnityScopeProxy* self, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00628 void unity_scope_proxy_activate_finish (UnityScopeProxy* self, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result);
00629 static void unity_lens_impl_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00630 static void unity_lens_impl_real_update_preview_property_data_free (gpointer _data);
00631 static void unity_lens_impl_real_update_preview_property (UnityProtocolLensService* base, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00632 static gboolean unity_lens_impl_real_update_preview_property_co (UnityLensImplUpdatePreviewPropertyData* _data_);
00633 void unity_scope_proxy_update_preview_property (UnityScopeProxy* self, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00634 GHashTable* unity_scope_proxy_update_preview_property_finish (UnityScopeProxy* self, GAsyncResult* _res_, GError** error);
00635 static void unity_lens_impl_update_preview_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00636 static void unity_lens_impl_real_search_data_free (gpointer _data);
00637 static void unity_lens_impl_real_search (UnityProtocolLensService* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00638 static gboolean unity_lens_impl_real_search_co (UnityLensImplSearchData* _data_);
00639 static Block2Data* block2_data_ref (Block2Data* _data2_);
00640 static void block2_data_unref (void * _userdata_);
00641 static void __lambda15_ (Block2Data* _data2_, GObject* obj, GAsyncResult* res);
00642 void unity_scope_proxy_search (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00643 GHashTable* unity_scope_proxy_search_finish (UnityScopeProxy* self, GAsyncResult* _res_);
00644 static Block3Data* block3_data_ref (Block3Data* _data3_);
00645 static void block3_data_unref (void * _userdata_);
00646 static Block4Data* block4_data_ref (Block4Data* _data4_);
00647 static void block4_data_unref (void * _userdata_);
00648 static void _____lambda16_ (Block4Data* _data4_, DeeSharedModel* m, guint64 begin_seqnum, guint64 end_seqnum);
00649 static void ______lambda16__dee_shared_model_end_transaction (DeeSharedModel* _sender, guint64 begin_seqnum, guint64 end_seqnum, gpointer self);
00650 static void ___lambda15__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
00651 static void unity_lens_impl_real_global_search_data_free (gpointer _data);
00652 static void unity_lens_impl_real_global_search (UnityProtocolLensService* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00653 static gboolean unity_lens_impl_real_global_search_co (UnityLensImplGlobalSearchData* _data_);
00654 static Block5Data* block5_data_ref (Block5Data* _data5_);
00655 static void block5_data_unref (void * _userdata_);
00656 static void __lambda17_ (Block5Data* _data5_, GObject* obj, GAsyncResult* _result_);
00657 void unity_scope_proxy_global_search (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00658 GHashTable* unity_scope_proxy_global_search_finish (UnityScopeProxy* self, GAsyncResult* _res_);
00659 static Block6Data* block6_data_ref (Block6Data* _data6_);
00660 static void block6_data_unref (void * _userdata_);
00661 static Block7Data* block7_data_ref (Block7Data* _data7_);
00662 static void block7_data_unref (void * _userdata_);
00663 static void ____lambda18_ (Block7Data* _data7_, DeeSharedModel* m, guint64 begin_seqnum, guint64 end_seqnum);
00664 static void _____lambda18__dee_shared_model_end_transaction (DeeSharedModel* _sender, guint64 begin_seqnum, guint64 end_seqnum, gpointer self);
00665 static void ___lambda17__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
00666 gboolean unity_scope_proxy_get_search_in_global (UnityScopeProxy* self);
00667 static void unity_lens_impl_real_update_filter_data_free (gpointer _data);
00668 static void unity_lens_impl_real_update_filter (UnityProtocolLensService* base, const gchar* filter_name, GHashTable* properties, GAsyncReadyCallback _callback_, gpointer _user_data_);
00669 static gboolean unity_lens_impl_real_update_filter_co (UnityLensImplUpdateFilterData* _data_);
00670 static void unity_lens_impl_update_active_sources_data_free (gpointer _data);
00671 static gboolean unity_lens_impl_update_active_sources_co (UnityLensImplUpdateActiveSourcesData* _data_);
00672 static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
00673 void unity_scope_proxy_set_active_sources (UnityScopeProxy* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
00674 void unity_scope_proxy_set_active_sources_finish (UnityScopeProxy* self, GAsyncResult* _res_);
00675 static void unity_lens_impl_real_set_view_type_data_free (gpointer _data);
00676 static void unity_lens_impl_real_set_view_type (UnityProtocolLensService* base, guint view_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00677 static gboolean unity_lens_impl_real_set_view_type_co (UnityLensImplSetViewTypeData* _data_);
00678 void unity_scope_proxy_set_view_type (UnityScopeProxy* self, UnityProtocolViewType value);
00679 void unity_lens_set_active_internal (UnityLens* self, gboolean is_active);
00680 UnityResultsSynchronizer* unity_lens_impl_get_results_sync (UnityLensImpl* self);
00681 UnityResultsSynchronizer* unity_lens_impl_get_global_results_sync (UnityLensImpl* self);
00682 static void unity_lens_impl_finalize (GObject* obj);
00683 static void _vala_unity_lens_impl_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00684 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00685 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00686 static gint _vala_array_length (gpointer array);
00687 
00688 
00689 static void _unity_lens_impl_queue_info_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
00690        unity_lens_impl_queue_info_changed (self);
00691 }
00692 
00693 
00694 static void _unity_lens_impl_sources_display_name_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
00695        unity_lens_impl_sources_display_name_changed (self, _sender, pspec);
00696 }
00697 
00698 
00699 static void _unity_lens_impl_on_scope_added_unity_scope_factory_scope_added (UnityScopeFactory* _sender, UnityScopeProxy* scope, gpointer self) {
00700        unity_lens_impl_on_scope_added (self, _sender, scope);
00701 }
00702 
00703 
00704 UnityLensImpl* unity_lens_impl_construct (GType object_type, UnityLens* owner) {
00705        UnityLensImpl * self = NULL;
00706        UnityLens* _tmp0_;
00707        UnityLens* _tmp1_;
00708        UnityLens* _tmp2_;
00709        UnityLens* _tmp3_;
00710        UnityLens* _tmp4_;
00711        UnityLens* _tmp5_;
00712        const gchar* _tmp6_;
00713        const gchar* _tmp7_;
00714        UnityCheckOptionFilter* _tmp8_;
00715        gchar* _tmp9_ = NULL;
00716        gchar* _tmp10_;
00717        UnityLens* _tmp11_;
00718        const gchar* _tmp12_;
00719        const gchar* _tmp13_;
00720        const gchar* _tmp14_;
00721        UnityScopeFactory* _tmp15_;
00722        UnityScopeFactory* _tmp16_;
00723        g_return_val_if_fail (owner != NULL, NULL);
00724        self = (UnityLensImpl*) g_object_new (object_type, NULL);
00725        _tmp0_ = owner;
00726        self->priv->_owner = _tmp0_;
00727        _tmp1_ = self->priv->_owner;
00728        g_signal_connect_object ((GObject*) _tmp1_, "notify::search-in-global", (GCallback) _unity_lens_impl_queue_info_changed_g_object_notify, self, 0);
00729        _tmp2_ = self->priv->_owner;
00730        g_signal_connect_object ((GObject*) _tmp2_, "notify::visible", (GCallback) _unity_lens_impl_queue_info_changed_g_object_notify, self, 0);
00731        _tmp3_ = self->priv->_owner;
00732        g_signal_connect_object ((GObject*) _tmp3_, "notify::search-hint", (GCallback) _unity_lens_impl_queue_info_changed_g_object_notify, self, 0);
00733        _tmp4_ = self->priv->_owner;
00734        g_signal_connect_object ((GObject*) _tmp4_, "notify::sources-display-name", (GCallback) _unity_lens_impl_sources_display_name_changed_g_object_notify, self, 0);
00735        _tmp5_ = self->priv->_owner;
00736        _tmp6_ = unity_lens_get_sources_display_name (_tmp5_);
00737        _tmp7_ = _tmp6_;
00738        _tmp8_ = unity_check_option_filter_new (UNITY_LENS_SOURCES_FILTER_ID, _tmp7_, NULL, TRUE);
00739        _g_object_unref0 (self->priv->_sources);
00740        self->priv->_sources = (UnityOptionsFilter*) _tmp8_;
00741        _tmp9_ = unity_lens_impl_create_dbus_name (self);
00742        _tmp10_ = _tmp9_;
00743        unity_lens_impl_create_models (self, _tmp10_);
00744        _g_free0 (_tmp10_);
00745        unity_lens_impl_create_synchronizers (self);
00746        _tmp11_ = self->priv->_owner;
00747        _tmp12_ = unity_lens_get_id (_tmp11_);
00748        _tmp13_ = _tmp12_;
00749        _tmp14_ = unity_lens_impl_LENS_DIRECTORY;
00750        _tmp15_ = unity_scope_factory_new (_tmp13_, _tmp14_);
00751        _g_object_unref0 (self->priv->_scope_factory);
00752        self->priv->_scope_factory = _tmp15_;
00753        _tmp16_ = self->priv->_scope_factory;
00754        g_signal_connect_object (_tmp16_, "scope-added", (GCallback) _unity_lens_impl_on_scope_added_unity_scope_factory_scope_added, self, 0);
00755        return self;
00756 }
00757 
00758 
00759 UnityLensImpl* unity_lens_impl_new (UnityLens* owner) {
00760        return unity_lens_impl_construct (UNITY_TYPE_LENS_IMPL, owner);
00761 }
00762 
00763 
00764 static gchar* unity_lens_impl_create_dbus_name (UnityLensImpl* self) {
00765        gchar* result = NULL;
00766        GTimeVal tv = {0};
00767        GTimeVal _tmp0_;
00768        glong _tmp1_;
00769        gint64 milli;
00770        gint64 _tmp2_;
00771        GTimeVal _tmp3_;
00772        glong _tmp4_;
00773        UnityLens* _tmp5_;
00774        const gchar* _tmp6_;
00775        const gchar* _tmp7_;
00776        gint64 _tmp8_;
00777        gchar* _tmp9_ = NULL;
00778        g_return_val_if_fail (self != NULL, NULL);
00779        g_get_current_time (&tv);
00780        _tmp0_ = tv;
00781        _tmp1_ = _tmp0_.tv_sec;
00782        milli = (gint64) _tmp1_;
00783        _tmp2_ = milli;
00784        _tmp3_ = tv;
00785        _tmp4_ = _tmp3_.tv_usec;
00786        milli = (_tmp2_ * 1000) + (_tmp4_ / 1000);
00787        _tmp5_ = self->priv->_owner;
00788        _tmp6_ = unity_lens_get_id (_tmp5_);
00789        _tmp7_ = _tmp6_;
00790        _tmp8_ = milli;
00791        _tmp9_ = g_strdup_printf ("com.canonical.Unity.Lens.%s.T%" G_GINT64_FORMAT "", _tmp7_, _tmp8_);
00792        result = _tmp9_;
00793        return result;
00794 }
00795 
00796 
00797 static DeeSharedModel* unity_lens_impl_create_master_model (UnityLensImpl* self, const gchar* swarm_name) {
00798        DeeSharedModel* result = NULL;
00799        const gchar* _tmp0_;
00800        GObject* _tmp1_ = NULL;
00801        GObject* _tmp2_;
00802        DeePeer* peer;
00803        DeeSharedModelAccessMode access_mode;
00804        DeeSequenceModel* _tmp3_;
00805        DeeSequenceModel* _tmp4_;
00806        GObject* _tmp5_ = NULL;
00807        GObject* _tmp6_;
00808        DeeSharedModel* _tmp7_;
00809        g_return_val_if_fail (self != NULL, NULL);
00810        g_return_val_if_fail (swarm_name != NULL, NULL);
00811        _tmp0_ = swarm_name;
00812        _tmp1_ = g_object_new (dee_peer_get_type (), "swarm-name", _tmp0_, "swarm-owner", TRUE, NULL, NULL);
00813        _tmp2_ = G_IS_INITIALLY_UNOWNED (_tmp1_) ? g_object_ref_sink (_tmp1_) : _tmp1_;
00814        peer = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, dee_peer_get_type ()) ? ((DeePeer*) _tmp2_) : NULL;
00815        access_mode = DEE_SHARED_MODEL_ACCESS_MODE_LEADER_WRITABLE;
00816        _tmp3_ = (DeeSequenceModel*) dee_sequence_model_new ();
00817        _tmp4_ = _tmp3_;
00818        _tmp5_ = g_object_new (dee_shared_model_get_type (), "peer", peer, "back-end", _tmp4_, "access-mode", access_mode, NULL, NULL);
00819        _tmp6_ = G_IS_INITIALLY_UNOWNED (_tmp5_) ? g_object_ref_sink (_tmp5_) : _tmp5_;
00820        _tmp7_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, dee_shared_model_get_type ()) ? ((DeeSharedModel*) _tmp6_) : NULL;
00821        _g_object_unref0 (_tmp4_);
00822        result = _tmp7_;
00823        _g_object_unref0 (peer);
00824        return result;
00825 }
00826 
00827 
00828 static void unity_lens_impl_create_models (UnityLensImpl* self, const gchar* dbus_name) {
00829        const gchar* _tmp0_;
00830        gchar* _tmp1_;
00831        gchar* _tmp2_;
00832        DeeSharedModel* _tmp3_ = NULL;
00833        DeeSharedModel* _tmp4_;
00834        const gchar* _tmp5_;
00835        gchar* _tmp6_;
00836        gchar* _tmp7_;
00837        DeeSharedModel* _tmp8_ = NULL;
00838        DeeSharedModel* _tmp9_;
00839        const gchar* _tmp10_;
00840        gchar* _tmp11_;
00841        gchar* _tmp12_;
00842        DeeSharedModel* _tmp13_ = NULL;
00843        DeeSharedModel* _tmp14_;
00844        const gchar* _tmp15_;
00845        gchar* _tmp16_;
00846        gchar* _tmp17_;
00847        DeeSharedModel* _tmp18_;
00848        DeeSharedModel* _tmp19_;
00849        g_return_if_fail (self != NULL);
00850        g_return_if_fail (dbus_name != NULL);
00851        _tmp0_ = dbus_name;
00852        _tmp1_ = g_strconcat (_tmp0_, ".Results", NULL);
00853        _tmp2_ = _tmp1_;
00854        _tmp3_ = unity_lens_impl_create_master_model (self, _tmp2_);
00855        _g_object_unref0 (self->priv->_results_model);
00856        self->priv->_results_model = _tmp3_;
00857        _g_free0 (_tmp2_);
00858        _tmp4_ = self->priv->_results_model;
00859        dee_model_set_schema ((DeeModel*) _tmp4_, "s", "s", "u", "s", "s", "s", "s", NULL);
00860        _tmp5_ = dbus_name;
00861        _tmp6_ = g_strconcat (_tmp5_, ".GlobalResults", NULL);
00862        _tmp7_ = _tmp6_;
00863        _tmp8_ = unity_lens_impl_create_master_model (self, _tmp7_);
00864        _g_object_unref0 (self->priv->_global_results_model);
00865        self->priv->_global_results_model = _tmp8_;
00866        _g_free0 (_tmp7_);
00867        _tmp9_ = self->priv->_global_results_model;
00868        dee_model_set_schema ((DeeModel*) _tmp9_, "s", "s", "u", "s", "s", "s", "s", NULL);
00869        _tmp10_ = dbus_name;
00870        _tmp11_ = g_strconcat (_tmp10_, ".Categories", NULL);
00871        _tmp12_ = _tmp11_;
00872        _tmp13_ = unity_lens_impl_create_master_model (self, _tmp12_);
00873        _g_object_unref0 (self->priv->_categories_model);
00874        self->priv->_categories_model = _tmp13_;
00875        _g_free0 (_tmp12_);
00876        _tmp14_ = self->priv->_categories_model;
00877        dee_model_set_schema ((DeeModel*) _tmp14_, "s", "s", "s", "a{sv}", NULL);
00878        _tmp15_ = dbus_name;
00879        _tmp16_ = g_strconcat (_tmp15_, ".Filters", NULL);
00880        _tmp17_ = _tmp16_;
00881        _tmp18_ = (DeeSharedModel*) dee_shared_model_new (_tmp17_);
00882        _g_object_unref0 (self->priv->_filters_model);
00883        self->priv->_filters_model = _tmp18_;
00884        _g_free0 (_tmp17_);
00885        _tmp19_ = self->priv->_filters_model;
00886        dee_model_set_schema ((DeeModel*) _tmp19_, "s", "s", "s", "s", "a{sv}", "b", "b", "b", NULL);
00887 }
00888 
00889 
00890 static void __lambda13_ (UnityLensImpl* self, DeeModel* model, DeeModelIter* iter) {
00891        DeeModel* _tmp0_;
00892        DeeModelIter* _tmp1_;
00893        const gchar* _tmp2_ = NULL;
00894        DeeModel* _tmp3_;
00895        DeeModelIter* _tmp4_;
00896        g_return_if_fail (model != NULL);
00897        g_return_if_fail (iter != NULL);
00898        _tmp0_ = model;
00899        _tmp1_ = iter;
00900        _tmp2_ = dee_model_get_string (_tmp0_, _tmp1_, (guint) 0);
00901        if (g_strcmp0 (_tmp2_, UNITY_LENS_SOURCES_FILTER_ID) != 0) {
00902               return;
00903        }
00904        _tmp3_ = model;
00905        _tmp4_ = iter;
00906        unity_lens_impl_sources_filter_changed (self, _tmp3_, _tmp4_);
00907 }
00908 
00909 
00910 static void ___lambda13__dee_model_row_changed (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
00911        __lambda13_ (self, _sender, iter);
00912 }
00913 
00914 
00915 static void unity_lens_impl_create_synchronizers (UnityLensImpl* self) {
00916        DeeSharedModel* _tmp0_;
00917        UnityResultsSynchronizer* _tmp1_;
00918        DeeSharedModel* _tmp2_;
00919        UnityResultsSynchronizer* _tmp3_;
00920        DeeSharedModel* _tmp4_;
00921        UnityFiltersSynchronizer* _tmp5_;
00922        DeeSharedModel* _tmp6_;
00923        g_return_if_fail (self != NULL);
00924        _tmp0_ = self->priv->_results_model;
00925        _tmp1_ = unity_results_synchronizer_new ((DeeModel*) _tmp0_);
00926        _g_object_unref0 (self->priv->_results_sync);
00927        self->priv->_results_sync = _tmp1_;
00928        _tmp2_ = self->priv->_global_results_model;
00929        _tmp3_ = unity_results_synchronizer_new ((DeeModel*) _tmp2_);
00930        _g_object_unref0 (self->priv->_global_results_sync);
00931        self->priv->_global_results_sync = _tmp3_;
00932        _tmp4_ = self->priv->_filters_model;
00933        _tmp5_ = unity_filters_synchronizer_new ((DeeModel*) _tmp4_);
00934        _g_object_unref0 (self->priv->_filters_sync);
00935        self->priv->_filters_sync = _tmp5_;
00936        _tmp6_ = self->priv->_filters_model;
00937        g_signal_connect_object ((DeeModel*) _tmp6_, "row-changed", (GCallback) ___lambda13__dee_model_row_changed, self, 0);
00938 }
00939 
00940 
00941 void unity_lens_impl_export (UnityLensImpl* self, GError** error) {
00942        GDBusConnection* _tmp0_ = NULL;
00943        GDBusConnection* conn;
00944        GDBusConnection* _tmp1_;
00945        UnityLens* _tmp2_;
00946        const gchar* _tmp3_;
00947        const gchar* _tmp4_;
00948        guint _tmp5_ = 0U;
00949        guint _tmp6_;
00950        GError * _inner_error_ = NULL;
00951        g_return_if_fail (self != NULL);
00952        _tmp0_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
00953        conn = _tmp0_;
00954        if (_inner_error_ != NULL) {
00955               if (_inner_error_->domain == G_IO_ERROR) {
00956                      g_propagate_error (error, _inner_error_);
00957                      return;
00958               } else {
00959                      g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
00960                      g_clear_error (&_inner_error_);
00961                      return;
00962               }
00963        }
00964        _tmp1_ = conn;
00965        _tmp2_ = self->priv->_owner;
00966        _tmp3_ = unity_lens_get_dbus_path (_tmp2_);
00967        _tmp4_ = _tmp3_;
00968        _tmp5_ = unity_protocol_lens_service_register_object (G_TYPE_CHECK_INSTANCE_TYPE (self, UNITY_PROTOCOL_TYPE_LENS_SERVICE) ? ((UnityProtocolLensService*) self) : NULL, _tmp1_, _tmp4_, &_inner_error_);
00969        _tmp6_ = _tmp5_;
00970        if (_inner_error_ != NULL) {
00971               if (_inner_error_->domain == G_IO_ERROR) {
00972                      g_propagate_error (error, _inner_error_);
00973                      _g_object_unref0 (conn);
00974                      return;
00975               } else {
00976                      _g_object_unref0 (conn);
00977                      g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
00978                      g_clear_error (&_inner_error_);
00979                      return;
00980               }
00981        }
00982        self->priv->_dbus_id = _tmp6_;
00983        unity_lens_impl_queue_info_changed (self);
00984        _g_object_unref0 (conn);
00985 }
00986 
00987 
00988 static gpointer _g_object_ref0 (gpointer self) {
00989        return self ? g_object_ref (self) : NULL;
00990 }
00991 
00992 
00993 void unity_lens_impl_load_categories (UnityLensImpl* self, GList* categories) {
00994        GList* _tmp0_;
00995        g_return_if_fail (self != NULL);
00996        _tmp0_ = categories;
00997        {
00998               GList* category_collection = NULL;
00999               GList* category_it = NULL;
01000               category_collection = _tmp0_;
01001               for (category_it = category_collection; category_it != NULL; category_it = category_it->next) {
01002                      UnityCategory* _tmp1_;
01003                      UnityCategory* category = NULL;
01004                      _tmp1_ = _g_object_ref0 ((UnityCategory*) category_it->data);
01005                      category = _tmp1_;
01006                      {
01007                             gchar* _tmp2_ = NULL;
01008                             UnityCategory* _tmp3_;
01009                             GIcon* _tmp4_;
01010                             GIcon* _tmp5_;
01011                             const gchar* _tmp11_;
01012                             gchar* _tmp12_;
01013                             gchar* icon_hint_s;
01014                             DeeSharedModel* _tmp13_;
01015                             UnityCategory* _tmp14_;
01016                             const gchar* _tmp15_;
01017                             const gchar* _tmp16_;
01018                             const gchar* _tmp17_;
01019                             UnityCategory* _tmp18_;
01020                             const gchar* _tmp19_;
01021                             const gchar* _tmp20_;
01022                             UnityCategory* _tmp21_;
01023                             GHashTable* _tmp22_;
01024                             GHashTable* _tmp23_;
01025                             GVariant* _tmp24_ = NULL;
01026                             GVariant* _tmp25_;
01027                             _tmp3_ = category;
01028                             _tmp4_ = unity_category_get_icon_hint (_tmp3_);
01029                             _tmp5_ = _tmp4_;
01030                             if (_tmp5_ != NULL) {
01031                                    UnityCategory* _tmp6_;
01032                                    GIcon* _tmp7_;
01033                                    GIcon* _tmp8_;
01034                                    gchar* _tmp9_ = NULL;
01035                                    _tmp6_ = category;
01036                                    _tmp7_ = unity_category_get_icon_hint (_tmp6_);
01037                                    _tmp8_ = _tmp7_;
01038                                    _tmp9_ = g_icon_to_string (_tmp8_);
01039                                    _g_free0 (_tmp2_);
01040                                    _tmp2_ = _tmp9_;
01041                             } else {
01042                                    gchar* _tmp10_;
01043                                    _tmp10_ = g_strdup ("");
01044                                    _g_free0 (_tmp2_);
01045                                    _tmp2_ = _tmp10_;
01046                             }
01047                             _tmp11_ = _tmp2_;
01048                             _tmp12_ = g_strdup (_tmp11_);
01049                             icon_hint_s = _tmp12_;
01050                             _tmp13_ = self->priv->_categories_model;
01051                             _tmp14_ = category;
01052                             _tmp15_ = unity_category_get_name (_tmp14_);
01053                             _tmp16_ = _tmp15_;
01054                             _tmp17_ = icon_hint_s;
01055                             _tmp18_ = category;
01056                             _tmp19_ = unity_category_get_renderer (_tmp18_);
01057                             _tmp20_ = _tmp19_;
01058                             _tmp21_ = category;
01059                             _tmp22_ = unity_category_get_hints (_tmp21_);
01060                             _tmp23_ = _tmp22_;
01061                             _tmp24_ = unity_tools_hash_table_to_asv (_tmp23_);
01062                             _tmp25_ = _tmp24_;
01063                             dee_model_append ((DeeModel*) _tmp13_, _tmp16_, _tmp17_, _tmp20_, _tmp25_, NULL);
01064                             _g_variant_unref0 (_tmp25_);
01065                             _g_free0 (icon_hint_s);
01066                             _g_free0 (_tmp2_);
01067                             _g_object_unref0 (category);
01068                      }
01069               }
01070        }
01071 }
01072 
01073 
01074 static void _unity_lens_impl_on_filter_changed_unity_filter_changed (UnityFilter* _sender, gpointer self) {
01075        unity_lens_impl_on_filter_changed (self, _sender);
01076 }
01077 
01078 
01079 void unity_lens_impl_load_filters (UnityLensImpl* self, GList* filters) {
01080        DeeSharedModel* _tmp0_;
01081        GList* _tmp1_;
01082        GList* _tmp3_;
01083        GList* _tmp4_ = NULL;
01084        GList* filters_and_sources;
01085        UnityOptionsFilter* _tmp5_;
01086        GList* _tmp6_;
01087        guint _tmp7_ = 0U;
01088        GList* _tmp9_;
01089        g_return_if_fail (self != NULL);
01090        _tmp0_ = self->priv->_filters_model;
01091        dee_model_clear ((DeeModel*) _tmp0_);
01092        _tmp1_ = filters;
01093        {
01094               GList* filter_collection = NULL;
01095               GList* filter_it = NULL;
01096               filter_collection = _tmp1_;
01097               for (filter_it = filter_collection; filter_it != NULL; filter_it = filter_it->next) {
01098                      UnityFilter* filter = NULL;
01099                      filter = (UnityFilter*) filter_it->data;
01100                      {
01101                             UnityFilter* _tmp2_;
01102                             _tmp2_ = filter;
01103                             g_signal_connect_object (_tmp2_, "changed", (GCallback) _unity_lens_impl_on_filter_changed_unity_filter_changed, self, 0);
01104                      }
01105               }
01106        }
01107        _tmp3_ = filters;
01108        _tmp4_ = g_list_copy (_tmp3_);
01109        filters_and_sources = _tmp4_;
01110        _tmp5_ = self->priv->_sources;
01111        _tmp6_ = _tmp5_->options;
01112        _tmp7_ = g_list_length (_tmp6_);
01113        if (_tmp7_ > ((guint) 0)) {
01114               UnityOptionsFilter* _tmp8_;
01115               _tmp8_ = self->priv->_sources;
01116               filters_and_sources = g_list_append (filters_and_sources, (UnityFilter*) _tmp8_);
01117        }
01118        _tmp9_ = filters_and_sources;
01119        {
01120               GList* filter_collection = NULL;
01121               GList* filter_it = NULL;
01122               filter_collection = _tmp9_;
01123               for (filter_it = filter_collection; filter_it != NULL; filter_it = filter_it->next) {
01124                      UnityFilter* filter = NULL;
01125                      filter = (UnityFilter*) filter_it->data;
01126                      {
01127                             gchar* _tmp10_ = NULL;
01128                             UnityFilter* _tmp11_;
01129                             GIcon* _tmp12_;
01130                             GIcon* _tmp13_;
01131                             const gchar* _tmp19_;
01132                             gchar* _tmp20_;
01133                             gchar* icon_hint_s;
01134                             DeeSharedModel* _tmp21_;
01135                             UnityFilter* _tmp22_;
01136                             const gchar* _tmp23_;
01137                             const gchar* _tmp24_;
01138                             UnityFilter* _tmp25_;
01139                             const gchar* _tmp26_;
01140                             const gchar* _tmp27_;
01141                             const gchar* _tmp28_;
01142                             UnityFilter* _tmp29_;
01143                             UnityFilterRenderer _tmp30_;
01144                             UnityFilterRenderer _tmp31_;
01145                             const gchar* _tmp32_ = NULL;
01146                             UnityFilter* _tmp33_;
01147                             GHashTable* _tmp34_ = NULL;
01148                             GHashTable* _tmp35_;
01149                             GVariant* _tmp36_ = NULL;
01150                             GVariant* _tmp37_;
01151                             UnityFilter* _tmp38_;
01152                             gboolean _tmp39_;
01153                             gboolean _tmp40_;
01154                             UnityFilter* _tmp41_;
01155                             gboolean _tmp42_;
01156                             gboolean _tmp43_;
01157                             UnityFilter* _tmp44_;
01158                             gboolean _tmp45_;
01159                             gboolean _tmp46_;
01160                             _tmp11_ = filter;
01161                             _tmp12_ = unity_filter_get_icon_hint (_tmp11_);
01162                             _tmp13_ = _tmp12_;
01163                             if (_tmp13_ != NULL) {
01164                                    UnityFilter* _tmp14_;
01165                                    GIcon* _tmp15_;
01166                                    GIcon* _tmp16_;
01167                                    gchar* _tmp17_ = NULL;
01168                                    _tmp14_ = filter;
01169                                    _tmp15_ = unity_filter_get_icon_hint (_tmp14_);
01170                                    _tmp16_ = _tmp15_;
01171                                    _tmp17_ = g_icon_to_string (_tmp16_);
01172                                    _g_free0 (_tmp10_);
01173                                    _tmp10_ = _tmp17_;
01174                             } else {
01175                                    gchar* _tmp18_;
01176                                    _tmp18_ = g_strdup ("");
01177                                    _g_free0 (_tmp10_);
01178                                    _tmp10_ = _tmp18_;
01179                             }
01180                             _tmp19_ = _tmp10_;
01181                             _tmp20_ = g_strdup (_tmp19_);
01182                             icon_hint_s = _tmp20_;
01183                             _tmp21_ = self->priv->_filters_model;
01184                             _tmp22_ = filter;
01185                             _tmp23_ = unity_filter_get_id (_tmp22_);
01186                             _tmp24_ = _tmp23_;
01187                             _tmp25_ = filter;
01188                             _tmp26_ = unity_filter_get_display_name (_tmp25_);
01189                             _tmp27_ = _tmp26_;
01190                             _tmp28_ = icon_hint_s;
01191                             _tmp29_ = filter;
01192                             _tmp30_ = unity_filter_get_renderer (_tmp29_);
01193                             _tmp31_ = _tmp30_;
01194                             _tmp32_ = unity_filter_get_renderer_name (_tmp31_);
01195                             _tmp33_ = filter;
01196                             _tmp34_ = unity_filter_get_hints (_tmp33_);
01197                             _tmp35_ = _tmp34_;
01198                             _tmp36_ = unity_tools_hash_table_to_asv (_tmp35_);
01199                             _tmp37_ = _tmp36_;
01200                             _tmp38_ = filter;
01201                             _tmp39_ = unity_filter_get_visible (_tmp38_);
01202                             _tmp40_ = _tmp39_;
01203                             _tmp41_ = filter;
01204                             _tmp42_ = unity_filter_get_collapsed (_tmp41_);
01205                             _tmp43_ = _tmp42_;
01206                             _tmp44_ = filter;
01207                             _tmp45_ = unity_filter_get_filtering (_tmp44_);
01208                             _tmp46_ = _tmp45_;
01209                             dee_model_append ((DeeModel*) _tmp21_, _tmp24_, _tmp27_, _tmp28_, _tmp32_, _tmp37_, _tmp40_, _tmp43_, _tmp46_, NULL);
01210                             _g_variant_unref0 (_tmp37_);
01211                             _g_hash_table_unref0 (_tmp35_);
01212                             _g_free0 (icon_hint_s);
01213                             _g_free0 (_tmp10_);
01214                      }
01215               }
01216        }
01217        _g_list_free0 (filters_and_sources);
01218 }
01219 
01220 
01221 static gboolean _unity_lens_impl_emit_info_changed_gsource_func (gpointer self) {
01222        gboolean result;
01223        result = unity_lens_impl_emit_info_changed (self);
01224        return result;
01225 }
01226 
01227 
01228 static void unity_lens_impl_queue_info_changed (UnityLensImpl* self) {
01229        guint _tmp0_;
01230        g_return_if_fail (self != NULL);
01231        _tmp0_ = self->priv->_info_changed_id;
01232        if (_tmp0_ == ((guint) 0)) {
01233               guint _tmp1_ = 0U;
01234               _tmp1_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _unity_lens_impl_emit_info_changed_gsource_func, g_object_ref (self), g_object_unref);
01235               self->priv->_info_changed_id = _tmp1_;
01236        }
01237 }
01238 
01239 
01240 static void _g_free0_ (gpointer var) {
01241        var = (g_free (var), NULL);
01242 }
01243 
01244 
01245 static void _g_variant_unref0_ (gpointer var) {
01246        (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
01247 }
01248 
01249 
01250 static gboolean unity_lens_impl_emit_info_changed (UnityLensImpl* self) {
01251        gboolean result = FALSE;
01252        UnityProtocolLensInfo info = {0};
01253        UnityLens* _tmp0_;
01254        const gchar* _tmp1_;
01255        const gchar* _tmp2_;
01256        gchar* _tmp3_;
01257        UnityLens* _tmp4_;
01258        gboolean _tmp5_;
01259        gboolean _tmp6_;
01260        UnityLens* _tmp7_;
01261        const gchar* _tmp8_;
01262        const gchar* _tmp9_;
01263        gchar* _tmp10_;
01264        UnityLens* _tmp11_;
01265        gboolean _tmp12_;
01266        gboolean _tmp13_;
01267        gchar* _tmp14_;
01268        DeeSharedModel* _tmp15_;
01269        const gchar* _tmp16_ = NULL;
01270        gchar* _tmp17_;
01271        DeeSharedModel* _tmp18_;
01272        const gchar* _tmp19_ = NULL;
01273        gchar* _tmp20_;
01274        DeeSharedModel* _tmp21_;
01275        const gchar* _tmp22_ = NULL;
01276        gchar* _tmp23_;
01277        DeeSharedModel* _tmp24_;
01278        const gchar* _tmp25_ = NULL;
01279        gchar* _tmp26_;
01280        GHashTable* _tmp27_;
01281        UnityProtocolLensInfo _tmp28_;
01282        g_return_val_if_fail (self != NULL, FALSE);
01283        memset (&info, 0, sizeof (UnityProtocolLensInfo));
01284        _tmp0_ = self->priv->_owner;
01285        _tmp1_ = unity_lens_get_dbus_path (_tmp0_);
01286        _tmp2_ = _tmp1_;
01287        _tmp3_ = g_strdup (_tmp2_);
01288        _g_free0 (info.dbus_path);
01289        info.dbus_path = _tmp3_;
01290        _tmp4_ = self->priv->_owner;
01291        _tmp5_ = unity_lens_get_search_in_global (_tmp4_);
01292        _tmp6_ = _tmp5_;
01293        info.search_in_global = _tmp6_;
01294        _tmp7_ = self->priv->_owner;
01295        _tmp8_ = unity_lens_get_search_hint (_tmp7_);
01296        _tmp9_ = _tmp8_;
01297        _tmp10_ = g_strdup (_tmp9_);
01298        _g_free0 (info.search_hint);
01299        info.search_hint = _tmp10_;
01300        _tmp11_ = self->priv->_owner;
01301        _tmp12_ = unity_lens_get_visible (_tmp11_);
01302        _tmp13_ = _tmp12_;
01303        info.visible = _tmp13_;
01304        _tmp14_ = g_strdup ("<not implemented>");
01305        _g_free0 (info.private_connection_name);
01306        info.private_connection_name = _tmp14_;
01307        _tmp15_ = self->priv->_results_model;
01308        _tmp16_ = dee_shared_model_get_swarm_name (_tmp15_);
01309        _tmp17_ = g_strdup (_tmp16_);
01310        _g_free0 (info.results_model_name);
01311        info.results_model_name = _tmp17_;
01312        _tmp18_ = self->priv->_global_results_model;
01313        _tmp19_ = dee_shared_model_get_swarm_name (_tmp18_);
01314        _tmp20_ = g_strdup (_tmp19_);
01315        _g_free0 (info.global_results_model_name);
01316        info.global_results_model_name = _tmp20_;
01317        _tmp21_ = self->priv->_categories_model;
01318        _tmp22_ = dee_shared_model_get_swarm_name (_tmp21_);
01319        _tmp23_ = g_strdup (_tmp22_);
01320        _g_free0 (info.categories_model_name);
01321        info.categories_model_name = _tmp23_;
01322        _tmp24_ = self->priv->_filters_model;
01323        _tmp25_ = dee_shared_model_get_swarm_name (_tmp24_);
01324        _tmp26_ = g_strdup (_tmp25_);
01325        _g_free0 (info.filters_model_name);
01326        info.filters_model_name = _tmp26_;
01327        _tmp27_ = g_hash_table_new_full (NULL, NULL, _g_free0_, _g_variant_unref0_);
01328        _g_hash_table_unref0 (info.hints);
01329        info.hints = _tmp27_;
01330        _tmp28_ = info;
01331        g_signal_emit_by_name ((UnityProtocolLensService*) self, "changed", &_tmp28_);
01332        self->priv->_info_changed_id = (guint) 0;
01333        result = FALSE;
01334        unity_protocol_lens_info_destroy (&info);
01335        return result;
01336 }
01337 
01338 
01339 static void _unity_lens_impl_on_scope_results_model_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01340        unity_lens_impl_on_scope_results_model_changed (self, _sender, pspec);
01341 }
01342 
01343 
01344 static void _unity_lens_impl_on_scope_global_results_model_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01345        unity_lens_impl_on_scope_global_results_model_changed (self, _sender, pspec);
01346 }
01347 
01348 
01349 static void _unity_lens_impl_on_scope_filters_model_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01350        unity_lens_impl_on_scope_filters_model_changed (self, _sender, pspec);
01351 }
01352 
01353 
01354 static void _unity_lens_impl_on_scope_sources_updated_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01355        unity_lens_impl_on_scope_sources_updated (self, _sender, pspec);
01356 }
01357 
01358 
01359 static void unity_lens_impl_on_scope_added (UnityLensImpl* self, UnityScopeFactory* factory, UnityScopeProxy* scope) {
01360        UnityScopeProxy* _tmp0_;
01361        DeeSerializableModel* _tmp1_;
01362        DeeSerializableModel* _tmp2_;
01363        UnityScopeProxy* _tmp4_;
01364        DeeSerializableModel* _tmp5_;
01365        DeeSerializableModel* _tmp6_;
01366        UnityScopeProxy* _tmp8_;
01367        DeeSerializableModel* _tmp9_;
01368        DeeSerializableModel* _tmp10_;
01369        UnityScopeProxy* _tmp12_;
01370        UnityScopeProxy* _tmp13_;
01371        UnityScopeProxy* _tmp14_;
01372        UnityScopeProxy* _tmp15_;
01373        g_return_if_fail (self != NULL);
01374        g_return_if_fail (factory != NULL);
01375        g_return_if_fail (scope != NULL);
01376        _tmp0_ = scope;
01377        _tmp1_ = unity_scope_proxy_get_results_model (_tmp0_);
01378        _tmp2_ = _tmp1_;
01379        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, dee_model_get_type ())) {
01380               UnityScopeProxy* _tmp3_;
01381               _tmp3_ = scope;
01382               unity_lens_impl_on_scope_results_model_changed (self, (GObject*) _tmp3_, NULL);
01383        }
01384        _tmp4_ = scope;
01385        _tmp5_ = unity_scope_proxy_get_global_results_model (_tmp4_);
01386        _tmp6_ = _tmp5_;
01387        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, dee_model_get_type ())) {
01388               UnityScopeProxy* _tmp7_;
01389               _tmp7_ = scope;
01390               unity_lens_impl_on_scope_global_results_model_changed (self, (GObject*) _tmp7_, NULL);
01391        }
01392        _tmp8_ = scope;
01393        _tmp9_ = unity_scope_proxy_get_filters_model (_tmp8_);
01394        _tmp10_ = _tmp9_;
01395        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, dee_model_get_type ())) {
01396               UnityScopeProxy* _tmp11_;
01397               _tmp11_ = scope;
01398               unity_lens_impl_on_scope_filters_model_changed (self, (GObject*) _tmp11_, NULL);
01399        }
01400        _tmp12_ = scope;
01401        g_signal_connect_object ((GObject*) _tmp12_, "notify::results-model", (GCallback) _unity_lens_impl_on_scope_results_model_changed_g_object_notify, self, 0);
01402        _tmp13_ = scope;
01403        g_signal_connect_object ((GObject*) _tmp13_, "notify::global-results-model", (GCallback) _unity_lens_impl_on_scope_global_results_model_changed_g_object_notify, self, 0);
01404        _tmp14_ = scope;
01405        g_signal_connect_object ((GObject*) _tmp14_, "notify::filters-model", (GCallback) _unity_lens_impl_on_scope_filters_model_changed_g_object_notify, self, 0);
01406        _tmp15_ = scope;
01407        g_signal_connect_object ((GObject*) _tmp15_, "notify::sources", (GCallback) _unity_lens_impl_on_scope_sources_updated_g_object_notify, self, 0);
01408 }
01409 
01410 
01411 static void unity_lens_impl_on_scope_results_model_changed (UnityLensImpl* self, GObject* obj, GParamSpec* pspec) {
01412        GObject* _tmp0_;
01413        UnityScopeProxy* _tmp1_;
01414        UnityScopeProxy* scope;
01415        UnityResultsSynchronizer* _tmp2_;
01416        DeeSerializableModel* _tmp3_;
01417        DeeSerializableModel* _tmp4_;
01418        gchar* _tmp5_ = NULL;
01419        gchar* _tmp6_;
01420        g_return_if_fail (self != NULL);
01421        g_return_if_fail (obj != NULL);
01422        _tmp0_ = obj;
01423        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, UNITY_TYPE_SCOPE_PROXY) ? ((UnityScopeProxy*) _tmp0_) : NULL);
01424        scope = _tmp1_;
01425        _tmp2_ = self->priv->_results_sync;
01426        _tmp3_ = unity_scope_proxy_get_results_model (scope);
01427        _tmp4_ = _tmp3_;
01428        _tmp5_ = unity_lens_impl_uid_for_scope (self, scope);
01429        _tmp6_ = _tmp5_;
01430        unity_results_synchronizer_add_provider (_tmp2_, (DeeModel*) _tmp4_, _tmp6_);
01431        _g_free0 (_tmp6_);
01432        _g_object_unref0 (scope);
01433 }
01434 
01435 
01436 static void unity_lens_impl_on_scope_global_results_model_changed (UnityLensImpl* self, GObject* obj, GParamSpec* pspec) {
01437        GObject* _tmp0_;
01438        UnityScopeProxy* _tmp1_;
01439        UnityScopeProxy* scope;
01440        UnityResultsSynchronizer* _tmp2_;
01441        DeeSerializableModel* _tmp3_;
01442        DeeSerializableModel* _tmp4_;
01443        gchar* _tmp5_ = NULL;
01444        gchar* _tmp6_;
01445        g_return_if_fail (self != NULL);
01446        g_return_if_fail (obj != NULL);
01447        _tmp0_ = obj;
01448        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, UNITY_TYPE_SCOPE_PROXY) ? ((UnityScopeProxy*) _tmp0_) : NULL);
01449        scope = _tmp1_;
01450        _tmp2_ = self->priv->_global_results_sync;
01451        _tmp3_ = unity_scope_proxy_get_global_results_model (scope);
01452        _tmp4_ = _tmp3_;
01453        _tmp5_ = g_strdup_printf ("%p", scope);
01454        _tmp6_ = _tmp5_;
01455        unity_results_synchronizer_add_provider (_tmp2_, (DeeModel*) _tmp4_, _tmp6_);
01456        _g_free0 (_tmp6_);
01457        _g_object_unref0 (scope);
01458 }
01459 
01460 
01461 static Block1Data* block1_data_ref (Block1Data* _data1_) {
01462        g_atomic_int_inc (&_data1_->_ref_count_);
01463        return _data1_;
01464 }
01465 
01466 
01467 static void block1_data_unref (void * _userdata_) {
01468        Block1Data* _data1_;
01469        _data1_ = (Block1Data*) _userdata_;
01470        if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
01471               UnityLensImpl * self;
01472               self = _data1_->self;
01473               _g_object_unref0 (_data1_->scope);
01474               _g_object_unref0 (self);
01475               g_slice_free (Block1Data, _data1_);
01476        }
01477 }
01478 
01479 
01480 static void ___lambda14_ (Block1Data* _data1_) {
01481        UnityLensImpl * self;
01482        UnityFiltersSynchronizer* _tmp0_;
01483        UnityScopeProxy* _tmp1_;
01484        DeeSerializableModel* _tmp2_;
01485        DeeSerializableModel* _tmp3_;
01486        self = _data1_->self;
01487        _tmp0_ = self->priv->_filters_sync;
01488        _tmp1_ = _data1_->scope;
01489        _tmp2_ = unity_scope_proxy_get_filters_model (_tmp1_);
01490        _tmp3_ = _tmp2_;
01491        unity_filters_synchronizer_add_receiver (_tmp0_, (DeeModel*) _tmp3_);
01492 }
01493 
01494 
01495 static void ____lambda14__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01496        ___lambda14_ (self);
01497 }
01498 
01499 
01500 static void unity_lens_impl_on_scope_filters_model_changed (UnityLensImpl* self, GObject* obj, GParamSpec* pspec) {
01501        Block1Data* _data1_;
01502        GObject* _tmp0_;
01503        UnityScopeProxy* _tmp1_;
01504        gboolean _tmp2_ = FALSE;
01505        UnityScopeProxy* _tmp3_;
01506        gboolean _tmp9_;
01507        UnityScopeProxy* _tmp17_;
01508        DeeSerializableModel* _tmp18_;
01509        DeeSerializableModel* _tmp19_;
01510        g_return_if_fail (self != NULL);
01511        g_return_if_fail (obj != NULL);
01512        _data1_ = g_slice_new0 (Block1Data);
01513        _data1_->_ref_count_ = 1;
01514        _data1_->self = g_object_ref (self);
01515        _tmp0_ = obj;
01516        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, UNITY_TYPE_SCOPE_PROXY) ? ((UnityScopeProxy*) _tmp0_) : NULL);
01517        _data1_->scope = _tmp1_;
01518        _tmp3_ = _data1_->scope;
01519        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, UNITY_TYPE_SCOPE_PROXY_REMOTE)) {
01520               UnityScopeProxy* _tmp4_;
01521               DeeSerializableModel* _tmp5_;
01522               DeeSerializableModel* _tmp6_;
01523               gboolean _tmp7_ = FALSE;
01524               gboolean _tmp8_;
01525               _tmp4_ = _data1_->scope;
01526               _tmp5_ = unity_scope_proxy_get_filters_model (_tmp4_);
01527               _tmp6_ = _tmp5_;
01528               g_object_get (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, dee_shared_model_get_type ()) ? ((DeeSharedModel*) _tmp6_) : NULL, "synchronized", &_tmp7_, NULL);
01529               _tmp8_ = _tmp7_;
01530               _tmp2_ = _tmp8_ == FALSE;
01531        } else {
01532               _tmp2_ = FALSE;
01533        }
01534        _tmp9_ = _tmp2_;
01535        if (_tmp9_) {
01536               UnityScopeProxy* _tmp10_;
01537               DeeSerializableModel* _tmp11_;
01538               DeeSerializableModel* _tmp12_;
01539               _tmp10_ = _data1_->scope;
01540               _tmp11_ = unity_scope_proxy_get_filters_model (_tmp10_);
01541               _tmp12_ = _tmp11_;
01542               g_signal_connect_data ((GObject*) _tmp12_, "notify::synchronized", (GCallback) ____lambda14__g_object_notify, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
01543        } else {
01544               UnityFiltersSynchronizer* _tmp13_;
01545               UnityScopeProxy* _tmp14_;
01546               DeeSerializableModel* _tmp15_;
01547               DeeSerializableModel* _tmp16_;
01548               _tmp13_ = self->priv->_filters_sync;
01549               _tmp14_ = _data1_->scope;
01550               _tmp15_ = unity_scope_proxy_get_filters_model (_tmp14_);
01551               _tmp16_ = _tmp15_;
01552               unity_filters_synchronizer_add_receiver (_tmp13_, (DeeModel*) _tmp16_);
01553        }
01554        _tmp17_ = _data1_->scope;
01555        _tmp18_ = unity_scope_proxy_get_filters_model (_tmp17_);
01556        _tmp19_ = _tmp18_;
01557        g_object_weak_ref ((GObject*) _tmp19_, (GWeakNotify) unity_lens_impl_scope_filter_model_vanished, self);
01558        block1_data_unref (_data1_);
01559        _data1_ = NULL;
01560 }
01561 
01562 
01563 static void unity_lens_impl_scope_filter_model_vanished (UnityLensImpl* self, DeeModel* filter_model) {
01564        UnityFiltersSynchronizer* _tmp0_;
01565        DeeModel* _tmp1_;
01566        g_return_if_fail (self != NULL);
01567        g_return_if_fail (filter_model != NULL);
01568        _tmp0_ = self->priv->_filters_sync;
01569        _tmp1_ = filter_model;
01570        unity_filters_synchronizer_remove_receiver (_tmp0_, _tmp1_);
01571 }
01572 
01573 
01574 static void unity_lens_impl_on_scope_sources_updated (UnityLensImpl* self, GObject* obj, GParamSpec* pspec) {
01575        GObject* _tmp0_;
01576        UnityScopeProxy* _tmp1_;
01577        UnityScopeProxy* scope;
01578        GeeHashSet* _tmp2_;
01579        GeeHashSet* touched_filters;
01580        UnityScopeProxy* _tmp3_;
01581        UnityOptionsFilter* _tmp4_;
01582        UnityOptionsFilter* _tmp5_;
01583        GList* _tmp6_;
01584        UnityScopeProxy* _tmp41_;
01585        gchar* _tmp42_ = NULL;
01586        gchar* _tmp43_;
01587        gchar* _tmp44_ = NULL;
01588        gchar* _tmp45_;
01589        gchar* prefix;
01590        GeeHashSet* _tmp46_;
01591        GeeHashSet* removed_ids;
01592        UnityOptionsFilter* _tmp47_;
01593        GList* _tmp48_;
01594        g_return_if_fail (self != NULL);
01595        g_return_if_fail (obj != NULL);
01596        g_return_if_fail (pspec != NULL);
01597        _tmp0_ = obj;
01598        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, UNITY_TYPE_SCOPE_PROXY) ? ((UnityScopeProxy*) _tmp0_) : NULL);
01599        scope = _tmp1_;
01600        _tmp2_ = gee_hash_set_new (UNITY_TYPE_FILTER_OPTION, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
01601        touched_filters = _tmp2_;
01602        _tmp3_ = scope;
01603        _tmp4_ = unity_scope_proxy_get_sources (_tmp3_);
01604        _tmp5_ = _tmp4_;
01605        _tmp6_ = _tmp5_->options;
01606        {
01607               GList* filter_collection = NULL;
01608               GList* filter_it = NULL;
01609               filter_collection = _tmp6_;
01610               for (filter_it = filter_collection; filter_it != NULL; filter_it = filter_it->next) {
01611                      UnityFilterOption* _tmp7_;
01612                      UnityFilterOption* filter = NULL;
01613                      _tmp7_ = _g_object_ref0 ((UnityFilterOption*) filter_it->data);
01614                      filter = _tmp7_;
01615                      {
01616                             UnityScopeProxy* _tmp8_;
01617                             gchar* _tmp9_ = NULL;
01618                             gchar* _tmp10_;
01619                             UnityFilterOption* _tmp11_;
01620                             const gchar* _tmp12_;
01621                             const gchar* _tmp13_;
01622                             gchar* _tmp14_ = NULL;
01623                             gchar* _tmp15_;
01624                             gchar* mangled_id;
01625                             UnityOptionsFilter* _tmp16_;
01626                             const gchar* _tmp17_;
01627                             UnityFilterOption* _tmp18_ = NULL;
01628                             UnityFilterOption* option;
01629                             UnityFilterOption* _tmp19_;
01630                             _tmp8_ = scope;
01631                             _tmp9_ = unity_lens_impl_uid_for_scope (self, _tmp8_);
01632                             _tmp10_ = _tmp9_;
01633                             _tmp11_ = filter;
01634                             _tmp12_ = unity_filter_option_get_id (_tmp11_);
01635                             _tmp13_ = _tmp12_;
01636                             _tmp14_ = g_strdup_printf ("%s:%s", _tmp10_, _tmp13_);
01637                             _tmp15_ = _tmp14_;
01638                             _g_free0 (_tmp10_);
01639                             mangled_id = _tmp15_;
01640                             _tmp16_ = self->priv->_sources;
01641                             _tmp17_ = mangled_id;
01642                             _tmp18_ = unity_options_filter_get_option (_tmp16_, _tmp17_);
01643                             option = _tmp18_;
01644                             _tmp19_ = option;
01645                             if (_tmp19_ == NULL) {
01646                                    UnityOptionsFilter* _tmp20_;
01647                                    const gchar* _tmp21_;
01648                                    UnityFilterOption* _tmp22_;
01649                                    const gchar* _tmp23_;
01650                                    const gchar* _tmp24_;
01651                                    UnityFilterOption* _tmp25_;
01652                                    GIcon* _tmp26_;
01653                                    GIcon* _tmp27_;
01654                                    UnityFilterOption* _tmp28_ = NULL;
01655                                    UnityFilterOption* new_option;
01656                                    UnityFilterOption* _tmp29_;
01657                                    UnityFilterOption* _tmp30_;
01658                                    gboolean _tmp31_;
01659                                    gboolean _tmp32_;
01660                                    GeeHashSet* _tmp33_;
01661                                    UnityFilterOption* _tmp34_;
01662                                    _tmp20_ = self->priv->_sources;
01663                                    _tmp21_ = mangled_id;
01664                                    _tmp22_ = filter;
01665                                    _tmp23_ = unity_filter_option_get_display_name (_tmp22_);
01666                                    _tmp24_ = _tmp23_;
01667                                    _tmp25_ = filter;
01668                                    _tmp26_ = unity_filter_option_get_icon_hint (_tmp25_);
01669                                    _tmp27_ = _tmp26_;
01670                                    _tmp28_ = unity_options_filter_add_option (_tmp20_, _tmp21_, _tmp24_, _tmp27_);
01671                                    new_option = _tmp28_;
01672                                    _tmp29_ = new_option;
01673                                    _tmp30_ = filter;
01674                                    _tmp31_ = unity_filter_option_get_active (_tmp30_);
01675                                    _tmp32_ = _tmp31_;
01676                                    unity_filter_option_set_active (_tmp29_, _tmp32_);
01677                                    _tmp33_ = touched_filters;
01678                                    _tmp34_ = new_option;
01679                                    gee_abstract_collection_add ((GeeAbstractCollection*) _tmp33_, _tmp34_);
01680                                    _g_object_unref0 (new_option);
01681                             } else {
01682                                    UnityFilterOption* _tmp35_;
01683                                    UnityFilterOption* _tmp36_;
01684                                    gboolean _tmp37_;
01685                                    gboolean _tmp38_;
01686                                    GeeHashSet* _tmp39_;
01687                                    UnityFilterOption* _tmp40_;
01688                                    _tmp35_ = option;
01689                                    _tmp36_ = filter;
01690                                    _tmp37_ = unity_filter_option_get_active (_tmp36_);
01691                                    _tmp38_ = _tmp37_;
01692                                    unity_filter_option_set_active (_tmp35_, _tmp38_);
01693                                    _tmp39_ = touched_filters;
01694                                    _tmp40_ = option;
01695                                    gee_abstract_collection_add ((GeeAbstractCollection*) _tmp39_, _tmp40_);
01696                             }
01697                             _g_object_unref0 (option);
01698                             _g_free0 (mangled_id);
01699                             _g_object_unref0 (filter);
01700                      }
01701               }
01702        }
01703        _tmp41_ = scope;
01704        _tmp42_ = unity_lens_impl_uid_for_scope (self, _tmp41_);
01705        _tmp43_ = _tmp42_;
01706        _tmp44_ = g_strdup_printf ("%s:", _tmp43_);
01707        _tmp45_ = _tmp44_;
01708        _g_free0 (_tmp43_);
01709        prefix = _tmp45_;
01710        _tmp46_ = gee_hash_set_new (G_TYPE_STRING, NULL, NULL, NULL, NULL);
01711        removed_ids = _tmp46_;
01712        _tmp47_ = self->priv->_sources;
01713        _tmp48_ = _tmp47_->options;
01714        {
01715               GList* filter_option_collection = NULL;
01716               GList* filter_option_it = NULL;
01717               filter_option_collection = _tmp48_;
01718               for (filter_option_it = filter_option_collection; filter_option_it != NULL; filter_option_it = filter_option_it->next) {
01719                      UnityFilterOption* _tmp49_;
01720                      UnityFilterOption* filter_option = NULL;
01721                      _tmp49_ = _g_object_ref0 ((UnityFilterOption*) filter_option_it->data);
01722                      filter_option = _tmp49_;
01723                      {
01724                             gboolean _tmp50_ = FALSE;
01725                             UnityFilterOption* _tmp51_;
01726                             const gchar* _tmp52_;
01727                             const gchar* _tmp53_;
01728                             const gchar* _tmp54_;
01729                             gboolean _tmp55_ = FALSE;
01730                             gboolean _tmp59_;
01731                             _tmp51_ = filter_option;
01732                             _tmp52_ = unity_filter_option_get_id (_tmp51_);
01733                             _tmp53_ = _tmp52_;
01734                             _tmp54_ = prefix;
01735                             _tmp55_ = g_str_has_prefix (_tmp53_, _tmp54_);
01736                             if (_tmp55_) {
01737                                    GeeHashSet* _tmp56_;
01738                                    UnityFilterOption* _tmp57_;
01739                                    gboolean _tmp58_ = FALSE;
01740                                    _tmp56_ = touched_filters;
01741                                    _tmp57_ = filter_option;
01742                                    _tmp58_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp56_, _tmp57_);
01743                                    _tmp50_ = !_tmp58_;
01744                             } else {
01745                                    _tmp50_ = FALSE;
01746                             }
01747                             _tmp59_ = _tmp50_;
01748                             if (_tmp59_) {
01749                                    GeeHashSet* _tmp60_;
01750                                    UnityFilterOption* _tmp61_;
01751                                    const gchar* _tmp62_;
01752                                    const gchar* _tmp63_;
01753                                    _tmp60_ = removed_ids;
01754                                    _tmp61_ = filter_option;
01755                                    _tmp62_ = unity_filter_option_get_id (_tmp61_);
01756                                    _tmp63_ = _tmp62_;
01757                                    gee_abstract_collection_add ((GeeAbstractCollection*) _tmp60_, _tmp63_);
01758                             }
01759                             _g_object_unref0 (filter_option);
01760                      }
01761               }
01762        }
01763        {
01764               GeeHashSet* _tmp64_;
01765               GeeIterator* _tmp65_ = NULL;
01766               GeeIterator* _id_it;
01767               _tmp64_ = removed_ids;
01768               _tmp65_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp64_);
01769               _id_it = _tmp65_;
01770               while (TRUE) {
01771                      GeeIterator* _tmp66_;
01772                      gboolean _tmp67_ = FALSE;
01773                      GeeIterator* _tmp68_;
01774                      gpointer _tmp69_ = NULL;
01775                      const gchar* id;
01776                      UnityOptionsFilter* _tmp70_;
01777                      const gchar* _tmp71_;
01778                      _tmp66_ = _id_it;
01779                      _tmp67_ = gee_iterator_next (_tmp66_);
01780                      if (!_tmp67_) {
01781                             break;
01782                      }
01783                      _tmp68_ = _id_it;
01784                      _tmp69_ = gee_iterator_get (_tmp68_);
01785                      id = (const gchar*) _tmp69_;
01786                      _tmp70_ = self->priv->_sources;
01787                      _tmp71_ = id;
01788                      unity_options_filter_remove_option (_tmp70_, _tmp71_);
01789               }
01790               _g_object_unref0 (_id_it);
01791        }
01792        unity_lens_impl_queue_sources_update (self);
01793        _g_object_unref0 (removed_ids);
01794        _g_free0 (prefix);
01795        _g_object_unref0 (touched_filters);
01796        _g_object_unref0 (scope);
01797 }
01798 
01799 
01800 static void unity_lens_impl_on_filter_changed (UnityLensImpl* self, UnityFilter* filter) {
01801        DeeSharedModel* _tmp0_;
01802        DeeModelIter* _tmp1_ = NULL;
01803        DeeModelIter* iter;
01804        g_return_if_fail (self != NULL);
01805        g_return_if_fail (filter != NULL);
01806        _tmp0_ = self->priv->_filters_model;
01807        _tmp1_ = dee_model_get_first_iter ((DeeModel*) _tmp0_);
01808        iter = _tmp1_;
01809        while (TRUE) {
01810               DeeModelIter* _tmp2_;
01811               DeeSharedModel* _tmp3_;
01812               DeeModelIter* _tmp4_ = NULL;
01813               DeeSharedModel* _tmp5_;
01814               DeeModelIter* _tmp6_;
01815               const gchar* _tmp7_ = NULL;
01816               UnityFilter* _tmp8_;
01817               const gchar* _tmp9_;
01818               const gchar* _tmp10_;
01819               _tmp2_ = iter;
01820               _tmp3_ = self->priv->_filters_model;
01821               _tmp4_ = dee_model_get_last_iter ((DeeModel*) _tmp3_);
01822               if (!(_tmp2_ != _tmp4_)) {
01823                      break;
01824               }
01825               _tmp5_ = self->priv->_filters_model;
01826               _tmp6_ = iter;
01827               _tmp7_ = dee_model_get_string ((DeeModel*) _tmp5_, _tmp6_, (guint) UNITY_FILTER_COLUMN_ID);
01828               _tmp8_ = filter;
01829               _tmp9_ = unity_filter_get_id (_tmp8_);
01830               _tmp10_ = _tmp9_;
01831               if (g_strcmp0 (_tmp7_, _tmp10_) == 0) {
01832                      gchar* _tmp11_ = NULL;
01833                      UnityFilter* _tmp12_;
01834                      GIcon* _tmp13_;
01835                      GIcon* _tmp14_;
01836                      const gchar* _tmp20_;
01837                      gchar* _tmp21_;
01838                      gchar* icon_hint_s;
01839                      DeeSharedModel* _tmp22_;
01840                      DeeModelIter* _tmp23_;
01841                      UnityFilter* _tmp24_;
01842                      const gchar* _tmp25_;
01843                      const gchar* _tmp26_;
01844                      UnityFilter* _tmp27_;
01845                      const gchar* _tmp28_;
01846                      const gchar* _tmp29_;
01847                      const gchar* _tmp30_;
01848                      UnityFilter* _tmp31_;
01849                      UnityFilterRenderer _tmp32_;
01850                      UnityFilterRenderer _tmp33_;
01851                      const gchar* _tmp34_ = NULL;
01852                      UnityFilter* _tmp35_;
01853                      GHashTable* _tmp36_ = NULL;
01854                      GHashTable* _tmp37_;
01855                      GVariant* _tmp38_ = NULL;
01856                      GVariant* _tmp39_;
01857                      UnityFilter* _tmp40_;
01858                      gboolean _tmp41_;
01859                      gboolean _tmp42_;
01860                      UnityFilter* _tmp43_;
01861                      gboolean _tmp44_;
01862                      gboolean _tmp45_;
01863                      UnityFilter* _tmp46_;
01864                      gboolean _tmp47_;
01865                      gboolean _tmp48_;
01866                      _tmp12_ = filter;
01867                      _tmp13_ = unity_filter_get_icon_hint (_tmp12_);
01868                      _tmp14_ = _tmp13_;
01869                      if (_tmp14_ != NULL) {
01870                             UnityFilter* _tmp15_;
01871                             GIcon* _tmp16_;
01872                             GIcon* _tmp17_;
01873                             gchar* _tmp18_ = NULL;
01874                             _tmp15_ = filter;
01875                             _tmp16_ = unity_filter_get_icon_hint (_tmp15_);
01876                             _tmp17_ = _tmp16_;
01877                             _tmp18_ = g_icon_to_string (_tmp17_);
01878                             _g_free0 (_tmp11_);
01879                             _tmp11_ = _tmp18_;
01880                      } else {
01881                             gchar* _tmp19_;
01882                             _tmp19_ = g_strdup ("");
01883                             _g_free0 (_tmp11_);
01884                             _tmp11_ = _tmp19_;
01885                      }
01886                      _tmp20_ = _tmp11_;
01887                      _tmp21_ = g_strdup (_tmp20_);
01888                      icon_hint_s = _tmp21_;
01889                      _tmp22_ = self->priv->_filters_model;
01890                      _tmp23_ = iter;
01891                      _tmp24_ = filter;
01892                      _tmp25_ = unity_filter_get_id (_tmp24_);
01893                      _tmp26_ = _tmp25_;
01894                      _tmp27_ = filter;
01895                      _tmp28_ = unity_filter_get_display_name (_tmp27_);
01896                      _tmp29_ = _tmp28_;
01897                      _tmp30_ = icon_hint_s;
01898                      _tmp31_ = filter;
01899                      _tmp32_ = unity_filter_get_renderer (_tmp31_);
01900                      _tmp33_ = _tmp32_;
01901                      _tmp34_ = unity_filter_get_renderer_name (_tmp33_);
01902                      _tmp35_ = filter;
01903                      _tmp36_ = unity_filter_get_hints (_tmp35_);
01904                      _tmp37_ = _tmp36_;
01905                      _tmp38_ = unity_tools_hash_table_to_asv (_tmp37_);
01906                      _tmp39_ = _tmp38_;
01907                      _tmp40_ = filter;
01908                      _tmp41_ = unity_filter_get_visible (_tmp40_);
01909                      _tmp42_ = _tmp41_;
01910                      _tmp43_ = filter;
01911                      _tmp44_ = unity_filter_get_collapsed (_tmp43_);
01912                      _tmp45_ = _tmp44_;
01913                      _tmp46_ = filter;
01914                      _tmp47_ = unity_filter_get_filtering (_tmp46_);
01915                      _tmp48_ = _tmp47_;
01916                      dee_model_set ((DeeModel*) _tmp22_, _tmp23_, _tmp26_, _tmp29_, _tmp30_, _tmp34_, _tmp39_, _tmp42_, _tmp45_, _tmp48_, NULL);
01917                      _g_variant_unref0 (_tmp39_);
01918                      _g_hash_table_unref0 (_tmp37_);
01919                      _g_free0 (icon_hint_s);
01920                      _g_free0 (_tmp11_);
01921                      break;
01922               }
01923        }
01924 }
01925 
01926 
01927 static void unity_lens_impl_sources_display_name_changed (UnityLensImpl* self, GObject* obj, GParamSpec* pspec) {
01928        UnityOptionsFilter* _tmp0_;
01929        UnityLens* _tmp1_;
01930        const gchar* _tmp2_;
01931        const gchar* _tmp3_;
01932        g_return_if_fail (self != NULL);
01933        g_return_if_fail (obj != NULL);
01934        g_return_if_fail (pspec != NULL);
01935        _tmp0_ = self->priv->_sources;
01936        _tmp1_ = self->priv->_owner;
01937        _tmp2_ = unity_lens_get_sources_display_name (_tmp1_);
01938        _tmp3_ = _tmp2_;
01939        unity_filter_set_display_name ((UnityFilter*) _tmp0_, _tmp3_);
01940        unity_lens_impl_queue_sources_update (self);
01941 }
01942 
01943 
01944 static gboolean ___lambda12_ (UnityLensImpl* self) {
01945        gboolean result = FALSE;
01946        DeeSharedModel* _tmp0_;
01947        DeeModelIter* _tmp1_ = NULL;
01948        DeeSharedModel* _tmp2_;
01949        DeeModelIter* _tmp3_ = NULL;
01950        gboolean empty_model;
01951        gboolean _tmp4_;
01952        UnityOptionsFilter* _tmp15_;
01953        GList* _tmp16_;
01954        guint _tmp17_ = 0U;
01955        _tmp0_ = self->priv->_filters_model;
01956        _tmp1_ = dee_model_get_first_iter ((DeeModel*) _tmp0_);
01957        _tmp2_ = self->priv->_filters_model;
01958        _tmp3_ = dee_model_get_last_iter ((DeeModel*) _tmp2_);
01959        empty_model = _tmp1_ == _tmp3_;
01960        _tmp4_ = empty_model;
01961        if (!_tmp4_) {
01962               DeeSharedModel* _tmp5_;
01963               DeeModelIter* _tmp6_ = NULL;
01964               DeeModelIter* iter;
01965               DeeSharedModel* _tmp7_;
01966               DeeModelIter* _tmp8_;
01967               DeeModelIter* _tmp9_ = NULL;
01968               DeeSharedModel* _tmp10_;
01969               DeeModelIter* _tmp11_;
01970               const gchar* _tmp12_ = NULL;
01971               _tmp5_ = self->priv->_filters_model;
01972               _tmp6_ = dee_model_get_last_iter ((DeeModel*) _tmp5_);
01973               iter = _tmp6_;
01974               _tmp7_ = self->priv->_filters_model;
01975               _tmp8_ = iter;
01976               _tmp9_ = dee_model_prev ((DeeModel*) _tmp7_, _tmp8_);
01977               iter = _tmp9_;
01978               _tmp10_ = self->priv->_filters_model;
01979               _tmp11_ = iter;
01980               _tmp12_ = dee_model_get_string ((DeeModel*) _tmp10_, _tmp11_, (guint) UNITY_FILTER_COLUMN_ID);
01981               if (g_strcmp0 (_tmp12_, UNITY_LENS_SOURCES_FILTER_ID) == 0) {
01982                      DeeSharedModel* _tmp13_;
01983                      DeeModelIter* _tmp14_;
01984                      _tmp13_ = self->priv->_filters_model;
01985                      _tmp14_ = iter;
01986                      dee_model_remove ((DeeModel*) _tmp13_, _tmp14_);
01987               }
01988        }
01989        _tmp15_ = self->priv->_sources;
01990        _tmp16_ = _tmp15_->options;
01991        _tmp17_ = g_list_length (_tmp16_);
01992        if (_tmp17_ > ((guint) 1)) {
01993               UnityOptionsFilter* _tmp18_;
01994               UnityOptionsFilter* _tmp19_;
01995               UnityOptionsFilter* filter;
01996               gchar* _tmp20_ = NULL;
01997               UnityOptionsFilter* _tmp21_;
01998               GIcon* _tmp22_;
01999               GIcon* _tmp23_;
02000               const gchar* _tmp29_;
02001               gchar* _tmp30_;
02002               gchar* icon_hint_s;
02003               DeeSharedModel* _tmp31_;
02004               UnityOptionsFilter* _tmp32_;
02005               const gchar* _tmp33_;
02006               const gchar* _tmp34_;
02007               UnityOptionsFilter* _tmp35_;
02008               const gchar* _tmp36_;
02009               const gchar* _tmp37_;
02010               const gchar* _tmp38_;
02011               UnityOptionsFilter* _tmp39_;
02012               UnityFilterRenderer _tmp40_;
02013               UnityFilterRenderer _tmp41_;
02014               const gchar* _tmp42_ = NULL;
02015               UnityOptionsFilter* _tmp43_;
02016               GHashTable* _tmp44_ = NULL;
02017               GHashTable* _tmp45_;
02018               GVariant* _tmp46_ = NULL;
02019               GVariant* _tmp47_;
02020               UnityOptionsFilter* _tmp48_;
02021               gboolean _tmp49_;
02022               gboolean _tmp50_;
02023               UnityOptionsFilter* _tmp51_;
02024               gboolean _tmp52_;
02025               gboolean _tmp53_;
02026               UnityOptionsFilter* _tmp54_;
02027               gboolean _tmp55_;
02028               gboolean _tmp56_;
02029               _tmp18_ = self->priv->_sources;
02030               _tmp19_ = _g_object_ref0 (_tmp18_);
02031               filter = _tmp19_;
02032               _tmp21_ = filter;
02033               _tmp22_ = unity_filter_get_icon_hint ((UnityFilter*) _tmp21_);
02034               _tmp23_ = _tmp22_;
02035               if (_tmp23_ != NULL) {
02036                      UnityOptionsFilter* _tmp24_;
02037                      GIcon* _tmp25_;
02038                      GIcon* _tmp26_;
02039                      gchar* _tmp27_ = NULL;
02040                      _tmp24_ = filter;
02041                      _tmp25_ = unity_filter_get_icon_hint ((UnityFilter*) _tmp24_);
02042                      _tmp26_ = _tmp25_;
02043                      _tmp27_ = g_icon_to_string (_tmp26_);
02044                      _g_free0 (_tmp20_);
02045                      _tmp20_ = _tmp27_;
02046               } else {
02047                      gchar* _tmp28_;
02048                      _tmp28_ = g_strdup ("");
02049                      _g_free0 (_tmp20_);
02050                      _tmp20_ = _tmp28_;
02051               }
02052               _tmp29_ = _tmp20_;
02053               _tmp30_ = g_strdup (_tmp29_);
02054               icon_hint_s = _tmp30_;
02055               _tmp31_ = self->priv->_filters_model;
02056               _tmp32_ = filter;
02057               _tmp33_ = unity_filter_get_id ((UnityFilter*) _tmp32_);
02058               _tmp34_ = _tmp33_;
02059               _tmp35_ = filter;
02060               _tmp36_ = unity_filter_get_display_name ((UnityFilter*) _tmp35_);
02061               _tmp37_ = _tmp36_;
02062               _tmp38_ = icon_hint_s;
02063               _tmp39_ = filter;
02064               _tmp40_ = unity_filter_get_renderer ((UnityFilter*) _tmp39_);
02065               _tmp41_ = _tmp40_;
02066               _tmp42_ = unity_filter_get_renderer_name (_tmp41_);
02067               _tmp43_ = filter;
02068               _tmp44_ = unity_filter_get_hints ((UnityFilter*) _tmp43_);
02069               _tmp45_ = _tmp44_;
02070               _tmp46_ = unity_tools_hash_table_to_asv (_tmp45_);
02071               _tmp47_ = _tmp46_;
02072               _tmp48_ = filter;
02073               _tmp49_ = unity_filter_get_visible ((UnityFilter*) _tmp48_);
02074               _tmp50_ = _tmp49_;
02075               _tmp51_ = filter;
02076               _tmp52_ = unity_filter_get_collapsed ((UnityFilter*) _tmp51_);
02077               _tmp53_ = _tmp52_;
02078               _tmp54_ = filter;
02079               _tmp55_ = unity_filter_get_filtering ((UnityFilter*) _tmp54_);
02080               _tmp56_ = _tmp55_;
02081               dee_model_append ((DeeModel*) _tmp31_, _tmp34_, _tmp37_, _tmp38_, _tmp42_, _tmp47_, _tmp50_, _tmp53_, _tmp56_, NULL);
02082               _g_variant_unref0 (_tmp47_);
02083               _g_hash_table_unref0 (_tmp45_);
02084               _g_free0 (icon_hint_s);
02085               _g_free0 (_tmp20_);
02086               _g_object_unref0 (filter);
02087        }
02088        self->priv->_sources_update_id = (guint) 0;
02089        result = FALSE;
02090        return result;
02091 }
02092 
02093 
02094 static gboolean ____lambda12__gsource_func (gpointer self) {
02095        gboolean result;
02096        result = ___lambda12_ (self);
02097        return result;
02098 }
02099 
02100 
02101 static void unity_lens_impl_queue_sources_update (UnityLensImpl* self) {
02102        guint _tmp0_;
02103        g_return_if_fail (self != NULL);
02104        _tmp0_ = self->priv->_sources_update_id;
02105        if (_tmp0_ == ((guint) 0)) {
02106               guint _tmp1_ = 0U;
02107               _tmp1_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda12__gsource_func, g_object_ref (self), g_object_unref);
02108               self->priv->_sources_update_id = _tmp1_;
02109        }
02110 }
02111 
02112 
02113 static void unity_lens_impl_sources_filter_changed (UnityLensImpl* self, DeeModel* model, DeeModelIter* iter) {
02114        UnityOptionsFilter* _tmp0_;
02115        const gchar* _tmp1_;
02116        const gchar* _tmp2_;
02117        UnityOptionsFilter* _tmp3_;
02118        const gchar* _tmp4_;
02119        const gchar* _tmp5_;
02120        UnityOptionsFilter* _tmp6_;
02121        GIcon* _tmp7_;
02122        GIcon* _tmp8_;
02123        UnityOptionsFilter* _tmp9_;
02124        gboolean _tmp10_;
02125        gboolean _tmp11_;
02126        UnityCheckOptionFilter* _tmp12_;
02127        UnityCheckOptionFilter* temp;
02128        UnityCheckOptionFilter* _tmp13_;
02129        DeeModel* _tmp14_;
02130        DeeModelIter* _tmp15_;
02131        gboolean _tmp16_ = FALSE;
02132        DeeModel* _tmp17_;
02133        DeeModelIter* _tmp18_;
02134        GVariant* _tmp19_ = NULL;
02135        GVariant* properties;
02136        UnityCheckOptionFilter* _tmp20_;
02137        GVariant* _tmp21_;
02138        GeeHashSet* _tmp22_;
02139        GeeHashSet* updated_scopes;
02140        gboolean force_update;
02141        UnityCheckOptionFilter* _tmp23_;
02142        gboolean _tmp24_;
02143        gboolean _tmp25_;
02144        UnityOptionsFilter* _tmp26_;
02145        gboolean _tmp27_;
02146        gboolean _tmp28_;
02147        UnityCheckOptionFilter* _tmp29_;
02148        GList* _tmp30_;
02149        UnityCheckOptionFilter* _tmp55_;
02150        UnityOptionsFilter* _tmp56_;
02151        GeeHashSet* _tmp57_;
02152        g_return_if_fail (self != NULL);
02153        g_return_if_fail (model != NULL);
02154        g_return_if_fail (iter != NULL);
02155        _tmp0_ = self->priv->_sources;
02156        _tmp1_ = unity_filter_get_id ((UnityFilter*) _tmp0_);
02157        _tmp2_ = _tmp1_;
02158        _tmp3_ = self->priv->_sources;
02159        _tmp4_ = unity_filter_get_display_name ((UnityFilter*) _tmp3_);
02160        _tmp5_ = _tmp4_;
02161        _tmp6_ = self->priv->_sources;
02162        _tmp7_ = unity_filter_get_icon_hint ((UnityFilter*) _tmp6_);
02163        _tmp8_ = _tmp7_;
02164        _tmp9_ = self->priv->_sources;
02165        _tmp10_ = unity_filter_get_collapsed ((UnityFilter*) _tmp9_);
02166        _tmp11_ = _tmp10_;
02167        _tmp12_ = unity_check_option_filter_new (_tmp2_, _tmp5_, _tmp8_, _tmp11_);
02168        temp = _tmp12_;
02169        _tmp13_ = temp;
02170        _tmp14_ = model;
02171        _tmp15_ = iter;
02172        _tmp16_ = dee_model_get_bool (_tmp14_, _tmp15_, (guint) UNITY_FILTER_COLUMN_FILTERING);
02173        unity_filter_set_filtering ((UnityFilter*) _tmp13_, _tmp16_);
02174        _tmp17_ = model;
02175        _tmp18_ = iter;
02176        _tmp19_ = dee_model_get_value (_tmp17_, _tmp18_, (guint) UNITY_FILTER_COLUMN_RENDERER_STATE);
02177        properties = _tmp19_;
02178        _tmp20_ = temp;
02179        _tmp21_ = properties;
02180        unity_filter_update ((UnityFilter*) _tmp20_, _tmp21_);
02181        _tmp22_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
02182        updated_scopes = _tmp22_;
02183        force_update = FALSE;
02184        _tmp23_ = temp;
02185        _tmp24_ = unity_filter_get_filtering ((UnityFilter*) _tmp23_);
02186        _tmp25_ = _tmp24_;
02187        _tmp26_ = self->priv->_sources;
02188        _tmp27_ = unity_filter_get_filtering ((UnityFilter*) _tmp26_);
02189        _tmp28_ = _tmp27_;
02190        if (_tmp25_ != _tmp28_) {
02191               force_update = TRUE;
02192        }
02193        _tmp29_ = temp;
02194        _tmp30_ = ((UnityOptionsFilter*) _tmp29_)->options;
02195        {
02196               GList* filter_option_collection = NULL;
02197               GList* filter_option_it = NULL;
02198               filter_option_collection = _tmp30_;
02199               for (filter_option_it = filter_option_collection; filter_option_it != NULL; filter_option_it = filter_option_it->next) {
02200                      UnityFilterOption* _tmp31_;
02201                      UnityFilterOption* filter_option = NULL;
02202                      _tmp31_ = _g_object_ref0 ((UnityFilterOption*) filter_option_it->data);
02203                      filter_option = _tmp31_;
02204                      {
02205                             UnityOptionsFilter* _tmp32_;
02206                             UnityFilterOption* _tmp33_;
02207                             const gchar* _tmp34_;
02208                             const gchar* _tmp35_;
02209                             UnityFilterOption* _tmp36_ = NULL;
02210                             UnityFilterOption* current_value;
02211                             UnityFilterOption* _tmp37_;
02212                             gboolean _tmp38_ = FALSE;
02213                             gboolean _tmp39_;
02214                             gboolean _tmp46_;
02215                             _tmp32_ = self->priv->_sources;
02216                             _tmp33_ = filter_option;
02217                             _tmp34_ = unity_filter_option_get_id (_tmp33_);
02218                             _tmp35_ = _tmp34_;
02219                             _tmp36_ = unity_options_filter_get_option (_tmp32_, _tmp35_);
02220                             current_value = _tmp36_;
02221                             _tmp37_ = current_value;
02222                             if (_tmp37_ == NULL) {
02223                                    _g_object_unref0 (current_value);
02224                                    _g_object_unref0 (filter_option);
02225                                    continue;
02226                             }
02227                             _tmp39_ = force_update;
02228                             if (_tmp39_) {
02229                                    _tmp38_ = TRUE;
02230                             } else {
02231                                    UnityFilterOption* _tmp40_;
02232                                    gboolean _tmp41_;
02233                                    gboolean _tmp42_;
02234                                    UnityFilterOption* _tmp43_;
02235                                    gboolean _tmp44_;
02236                                    gboolean _tmp45_;
02237                                    _tmp40_ = current_value;
02238                                    _tmp41_ = unity_filter_option_get_active (_tmp40_);
02239                                    _tmp42_ = _tmp41_;
02240                                    _tmp43_ = filter_option;
02241                                    _tmp44_ = unity_filter_option_get_active (_tmp43_);
02242                                    _tmp45_ = _tmp44_;
02243                                    _tmp38_ = _tmp42_ != _tmp45_;
02244                             }
02245                             _tmp46_ = _tmp38_;
02246                             if (_tmp46_) {
02247                                    UnityFilterOption* _tmp47_;
02248                                    const gchar* _tmp48_;
02249                                    const gchar* _tmp49_;
02250                                    gchar** _tmp50_;
02251                                    gchar** _tmp51_ = NULL;
02252                                    gchar** tokens;
02253                                    gint tokens_length1;
02254                                    gint _tokens_size_;
02255                                    GeeHashSet* _tmp52_;
02256                                    gchar** _tmp53_;
02257                                    gint _tmp53__length1;
02258                                    const gchar* _tmp54_;
02259                                    _tmp47_ = filter_option;
02260                                    _tmp48_ = unity_filter_option_get_id (_tmp47_);
02261                                    _tmp49_ = _tmp48_;
02262                                    _tmp51_ = _tmp50_ = g_strsplit (_tmp49_, ":", 2);
02263                                    tokens = _tmp51_;
02264                                    tokens_length1 = _vala_array_length (_tmp50_);
02265                                    _tokens_size_ = tokens_length1;
02266                                    _tmp52_ = updated_scopes;
02267                                    _tmp53_ = tokens;
02268                                    _tmp53__length1 = tokens_length1;
02269                                    _tmp54_ = _tmp53_[0];
02270                                    gee_abstract_collection_add ((GeeAbstractCollection*) _tmp52_, _tmp54_);
02271                                    tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
02272                             }
02273                             _g_object_unref0 (current_value);
02274                             _g_object_unref0 (filter_option);
02275                      }
02276               }
02277        }
02278        _tmp55_ = temp;
02279        _tmp56_ = _g_object_ref0 ((UnityOptionsFilter*) _tmp55_);
02280        _g_object_unref0 (self->priv->_sources);
02281        self->priv->_sources = _tmp56_;
02282        _tmp57_ = updated_scopes;
02283        unity_lens_impl_update_active_sources (self, (GeeSet*) _tmp57_, NULL, NULL);
02284        _g_object_unref0 (updated_scopes);
02285        _g_variant_unref0 (properties);
02286        _g_object_unref0 (temp);
02287 }
02288 
02289 
02290 void unity_lens_impl_add_local_scope (UnityLensImpl* self, UnityScope* scope) {
02291        UnityScopeFactory* _tmp0_;
02292        UnityScope* _tmp1_;
02293        g_return_if_fail (self != NULL);
02294        g_return_if_fail (scope != NULL);
02295        _tmp0_ = self->priv->_scope_factory;
02296        _tmp1_ = scope;
02297        unity_scope_factory_add_local_scope (_tmp0_, _tmp1_);
02298 }
02299 
02300 
02301 UnityOptionsFilter* unity_lens_impl_get_sources (UnityLensImpl* self) {
02302        UnityOptionsFilter* result = NULL;
02303        UnityOptionsFilter* _tmp0_;
02304        g_return_val_if_fail (self != NULL, NULL);
02305        _tmp0_ = self->priv->_sources;
02306        result = _tmp0_;
02307        return result;
02308 }
02309 
02310 
02311 DeeModel* unity_lens_impl_get_model (UnityLensImpl* self, gint index) {
02312        DeeModel* result = NULL;
02313        gint _tmp0_;
02314        gint _tmp1_;
02315        gint _tmp2_;
02316        g_return_val_if_fail (self != NULL, NULL);
02317        _tmp0_ = index;
02318        _tmp1_ = index;
02319        g_return_val_if_fail ((_tmp0_ >= 0) && (_tmp1_ <= 3), NULL);
02320        _tmp2_ = index;
02321        switch (_tmp2_) {
02322               case 0:
02323               {
02324                      DeeSharedModel* _tmp3_;
02325                      _tmp3_ = self->priv->_results_model;
02326                      result = (DeeModel*) _tmp3_;
02327                      return result;
02328               }
02329               case 1:
02330               {
02331                      DeeSharedModel* _tmp4_;
02332                      _tmp4_ = self->priv->_global_results_model;
02333                      result = (DeeModel*) _tmp4_;
02334                      return result;
02335               }
02336               case 2:
02337               {
02338                      DeeSharedModel* _tmp5_;
02339                      _tmp5_ = self->priv->_filters_model;
02340                      result = (DeeModel*) _tmp5_;
02341                      return result;
02342               }
02343               case 3:
02344               {
02345                      DeeSharedModel* _tmp6_;
02346                      _tmp6_ = self->priv->_categories_model;
02347                      result = (DeeModel*) _tmp6_;
02348                      return result;
02349               }
02350               default:
02351               break;
02352        }
02353        result = NULL;
02354        return result;
02355 }
02356 
02357 
02358 static void unity_lens_impl_real_info_request_data_free (gpointer _data) {
02359        UnityLensImplInfoRequestData* _data_;
02360        _data_ = _data;
02361        _g_object_unref0 (_data_->self);
02362        g_slice_free (UnityLensImplInfoRequestData, _data_);
02363 }
02364 
02365 
02366 static void unity_lens_impl_real_info_request (UnityProtocolLensService* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02367        UnityLensImpl * self;
02368        UnityLensImplInfoRequestData* _data_;
02369        UnityLensImpl* _tmp0_;
02370        self = (UnityLensImpl*) base;
02371        _data_ = g_slice_new0 (UnityLensImplInfoRequestData);
02372        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_lens_impl_real_info_request);
02373        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_lens_impl_real_info_request_data_free);
02374        _tmp0_ = _g_object_ref0 (self);
02375        _data_->self = _tmp0_;
02376        unity_lens_impl_real_info_request_co (_data_);
02377 }
02378 
02379 
02380 static void unity_lens_impl_real_info_request_finish (UnityProtocolLensService* base, GAsyncResult* _res_, GError** error) {
02381        UnityLensImplInfoRequestData* _data_;
02382        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
02383 }
02384 
02385 
02386 static gboolean unity_lens_impl_real_info_request_co (UnityLensImplInfoRequestData* _data_) {
02387        switch (_data_->_state_) {
02388               case 0:
02389               goto _state_0;
02390               default:
02391               g_assert_not_reached ();
02392        }
02393        _state_0:
02394        unity_lens_impl_queue_info_changed (_data_->self);
02395        if (_data_->_state_ == 0) {
02396               g_simple_async_result_complete_in_idle (_data_->_async_result);
02397        } else {
02398               g_simple_async_result_complete (_data_->_async_result);
02399        }
02400        g_object_unref (_data_->_async_result);
02401        return FALSE;
02402 }
02403 
02404 
02405 static void unity_lens_impl_real_activate_data_free (gpointer _data) {
02406        UnityLensImplActivateData* _data_;
02407        _data_ = _data;
02408        _g_free0 (_data_->uri);
02409        unity_protocol_activation_reply_raw_destroy (&_data_->result);
02410        _g_object_unref0 (_data_->self);
02411        g_slice_free (UnityLensImplActivateData, _data_);
02412 }
02413 
02414 
02415 static void unity_lens_impl_real_activate (UnityProtocolLensService* base, const gchar* uri, guint action_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02416        UnityLensImpl * self;
02417        UnityLensImplActivateData* _data_;
02418        UnityLensImpl* _tmp0_;
02419        const gchar* _tmp1_;
02420        gchar* _tmp2_;
02421        guint _tmp3_;
02422        self = (UnityLensImpl*) base;
02423        _data_ = g_slice_new0 (UnityLensImplActivateData);
02424        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_lens_impl_real_activate);
02425        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_lens_impl_real_activate_data_free);
02426        _tmp0_ = _g_object_ref0 (self);
02427        _data_->self = _tmp0_;
02428        _tmp1_ = uri;
02429        _tmp2_ = g_strdup (_tmp1_);
02430        _data_->uri = _tmp2_;
02431        _tmp3_ = action_type;
02432        _data_->action_type = _tmp3_;
02433        unity_lens_impl_real_activate_co (_data_);
02434 }
02435 
02436 
02437 static void unity_lens_impl_real_activate_finish (UnityProtocolLensService* base, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result, GError** error) {
02438        UnityLensImplActivateData* _data_;
02439        UnityProtocolActivationReplyRaw _tmp0_ = {0};
02440        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
02441               return;
02442        }
02443        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
02444        unity_protocol_activation_reply_raw_copy (&_data_->result, &_tmp0_);
02445        *result = _tmp0_;
02446 }
02447 
02448 
02449 static void unity_lens_impl_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
02450        UnityLensImplActivateData* _data_;
02451        _data_ = _user_data_;
02452        _data_->_source_object_ = source_object;
02453        _data_->_res_ = _res_;
02454        unity_lens_impl_real_activate_co (_data_);
02455 }
02456 
02457 
02458 static gboolean unity_lens_impl_real_activate_co (UnityLensImplActivateData* _data_) {
02459        switch (_data_->_state_) {
02460               case 0:
02461               goto _state_0;
02462               case 1:
02463               goto _state_1;
02464               default:
02465               g_assert_not_reached ();
02466        }
02467        _state_0:
02468        _data_->tokens_length1 = 0;
02469        _data_->_tokens_size_ = 0;
02470        _data_->scope = NULL;
02471        _data_->scope_uri = NULL;
02472        _data_->_tmp0_ = _data_->action_type;
02473        switch (_data_->_tmp0_) {
02474               case UNITY_PROTOCOL_ACTION_TYPE_PREVIEW_ACTION:
02475               {
02476                      _data_->_tmp1_ = _data_->uri;
02477                      _data_->_tmp3_ = NULL;
02478                      _data_->_tmp3_ = _data_->_tmp2_ = g_strsplit (_data_->_tmp1_, ":", 3);
02479                      _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
02480                      _data_->tokens = _data_->_tmp3_;
02481                      _data_->tokens_length1 = _vala_array_length (_data_->_tmp2_);
02482                      _data_->_tokens_size_ = _data_->tokens_length1;
02483                      _data_->_tmp4_ = _data_->tokens;
02484                      _data_->_tmp4__length1 = _data_->tokens_length1;
02485                      _data_->_tmp5_ = _data_->_tmp4_[1];
02486                      _data_->_tmp6_ = NULL;
02487                      _data_->_tmp6_ = unity_lens_impl_get_scope_for_uid (_data_->self, _data_->_tmp5_);
02488                      _g_object_unref0 (_data_->scope);
02489                      _data_->scope = _data_->_tmp6_;
02490                      _data_->_tmp7_ = _data_->tokens;
02491                      _data_->_tmp7__length1 = _data_->tokens_length1;
02492                      _data_->_tmp8_ = _data_->_tmp7_[0];
02493                      _data_->_tmp9_ = _data_->tokens;
02494                      _data_->_tmp9__length1 = _data_->tokens_length1;
02495                      _data_->_tmp10_ = _data_->_tmp9_[2];
02496                      _data_->_tmp11_ = NULL;
02497                      _data_->_tmp11_ = g_strdup_printf ("%s:%s", _data_->_tmp8_, _data_->_tmp10_);
02498                      _g_free0 (_data_->scope_uri);
02499                      _data_->scope_uri = _data_->_tmp11_;
02500                      break;
02501               }
02502               default:
02503               {
02504                      _data_->_tmp12_ = _data_->uri;
02505                      _data_->_tmp14_ = NULL;
02506                      _data_->_tmp14_ = _data_->_tmp13_ = g_strsplit (_data_->_tmp12_, ":", 2);
02507                      _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
02508                      _data_->tokens = _data_->_tmp14_;
02509                      _data_->tokens_length1 = _vala_array_length (_data_->_tmp13_);
02510                      _data_->_tokens_size_ = _data_->tokens_length1;
02511                      _data_->_tmp15_ = _data_->tokens;
02512                      _data_->_tmp15__length1 = _data_->tokens_length1;
02513                      _data_->_tmp16_ = _data_->_tmp15_[0];
02514                      _data_->_tmp17_ = NULL;
02515                      _data_->_tmp17_ = unity_lens_impl_get_scope_for_uid (_data_->self, _data_->_tmp16_);
02516                      _g_object_unref0 (_data_->scope);
02517                      _data_->scope = _data_->_tmp17_;
02518                      _data_->_tmp18_ = _data_->tokens;
02519                      _data_->_tmp18__length1 = _data_->tokens_length1;
02520                      _data_->_tmp19_ = _data_->_tmp18_[1];
02521                      _data_->_tmp20_ = g_strdup (_data_->_tmp19_);
02522                      _g_free0 (_data_->scope_uri);
02523                      _data_->scope_uri = _data_->_tmp20_;
02524                      break;
02525               }
02526        }
02527        memset (&_data_->raw, 0, sizeof (UnityProtocolActivationReplyRaw));
02528        _data_->raw.handled = (guint) UNITY_HANDLED_TYPE_NOT_HANDLED;
02529        _data_->_tmp21_ = g_hash_table_new_full (NULL, NULL, _g_free0_, _g_variant_unref0_);
02530        _g_hash_table_unref0 (_data_->raw.hints);
02531        _data_->raw.hints = _data_->_tmp21_;
02532        _data_->_tmp22_ = _data_->scope;
02533        if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp22_, UNITY_TYPE_SCOPE_PROXY)) {
02534               _data_->_tmp23_ = _data_->scope;
02535               _data_->_tmp24_ = _data_->scope_uri;
02536               _data_->_tmp25_ = _data_->action_type;
02537               memset (&_data_->_tmp26_, 0, sizeof (UnityProtocolActivationReplyRaw));
02538               _data_->_state_ = 1;
02539               unity_scope_proxy_activate (_data_->_tmp23_, _data_->_tmp24_, (UnityProtocolActionType) _data_->_tmp25_, unity_lens_impl_activate_ready, _data_);
02540               return FALSE;
02541               _state_1:
02542               unity_scope_proxy_activate_finish (_data_->_tmp23_, _data_->_res_, &_data_->_tmp26_);
02543               unity_protocol_activation_reply_raw_destroy (&_data_->raw);
02544               _data_->raw = _data_->_tmp26_;
02545               _data_->_tmp27_ = _data_->scope;
02546               _data_->_tmp28_ = NULL;
02547               _data_->_tmp28_ = unity_lens_impl_uid_for_scope (_data_->self, _data_->_tmp27_);
02548               _data_->_tmp29_ = _data_->_tmp28_;
02549               _data_->_tmp30_ = _data_->raw;
02550               _data_->_tmp31_ = _data_->_tmp30_.uri;
02551               _data_->_tmp32_ = NULL;
02552               _data_->_tmp32_ = g_strdup_printf ("%s:%s", _data_->_tmp29_, _data_->_tmp31_);
02553               _g_free0 (_data_->raw.uri);
02554               _data_->raw.uri = _data_->_tmp32_;
02555               _g_free0 (_data_->_tmp29_);
02556        } else {
02557               _data_->_tmp33_ = _data_->uri;
02558               g_warning ("unity-lens-private.vala:507: Unable to find scope for activation reque" \
02559 "st: %s", _data_->_tmp33_);
02560               _data_->_tmp34_ = _data_->uri;
02561               _data_->_tmp35_ = g_strdup (_data_->_tmp34_);
02562               _g_free0 (_data_->raw.uri);
02563               _data_->raw.uri = _data_->_tmp35_;
02564        }
02565        _data_->_tmp36_ = _data_->raw;
02566        _data_->_tmp37_ = _data_->_tmp36_.handled;
02567        if (_data_->_tmp37_ == ((guint) UNITY_HANDLED_TYPE_SHOW_PREVIEW)) {
02568        }
02569        _data_->result = _data_->raw;
02570        _g_free0 (_data_->scope_uri);
02571        _g_object_unref0 (_data_->scope);
02572        _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
02573        if (_data_->_state_ == 0) {
02574               g_simple_async_result_complete_in_idle (_data_->_async_result);
02575        } else {
02576               g_simple_async_result_complete (_data_->_async_result);
02577        }
02578        g_object_unref (_data_->_async_result);
02579        return FALSE;
02580        unity_protocol_activation_reply_raw_destroy (&_data_->raw);
02581        _g_free0 (_data_->scope_uri);
02582        _g_object_unref0 (_data_->scope);
02583        _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
02584        if (_data_->_state_ == 0) {
02585               g_simple_async_result_complete_in_idle (_data_->_async_result);
02586        } else {
02587               g_simple_async_result_complete (_data_->_async_result);
02588        }
02589        g_object_unref (_data_->_async_result);
02590        return FALSE;
02591 }
02592 
02593 
02594 static void unity_lens_impl_real_update_preview_property_data_free (gpointer _data) {
02595        UnityLensImplUpdatePreviewPropertyData* _data_;
02596        _data_ = _data;
02597        _g_free0 (_data_->uri);
02598        _g_hash_table_unref0 (_data_->values);
02599        _g_hash_table_unref0 (_data_->result);
02600        _g_object_unref0 (_data_->self);
02601        g_slice_free (UnityLensImplUpdatePreviewPropertyData, _data_);
02602 }
02603 
02604 
02605 static gpointer _g_hash_table_ref0 (gpointer self) {
02606        return self ? g_hash_table_ref (self) : NULL;
02607 }
02608 
02609 
02610 static void unity_lens_impl_real_update_preview_property (UnityProtocolLensService* base, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02611        UnityLensImpl * self;
02612        UnityLensImplUpdatePreviewPropertyData* _data_;
02613        UnityLensImpl* _tmp0_;
02614        const gchar* _tmp1_;
02615        gchar* _tmp2_;
02616        GHashTable* _tmp3_;
02617        GHashTable* _tmp4_;
02618        self = (UnityLensImpl*) base;
02619        _data_ = g_slice_new0 (UnityLensImplUpdatePreviewPropertyData);
02620        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_lens_impl_real_update_preview_property);
02621        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_lens_impl_real_update_preview_property_data_free);
02622        _tmp0_ = _g_object_ref0 (self);
02623        _data_->self = _tmp0_;
02624        _tmp1_ = uri;
02625        _tmp2_ = g_strdup (_tmp1_);
02626        _data_->uri = _tmp2_;
02627        _tmp3_ = values;
02628        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
02629        _data_->values = _tmp4_;
02630        unity_lens_impl_real_update_preview_property_co (_data_);
02631 }
02632 
02633 
02634 static GHashTable* unity_lens_impl_real_update_preview_property_finish (UnityProtocolLensService* base, GAsyncResult* _res_, GError** error) {
02635        GHashTable* result;
02636        UnityLensImplUpdatePreviewPropertyData* _data_;
02637        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
02638               return NULL;
02639        }
02640        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
02641        result = _data_->result;
02642        _data_->result = NULL;
02643        return result;
02644 }
02645 
02646 
02647 static void unity_lens_impl_update_preview_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
02648        UnityLensImplUpdatePreviewPropertyData* _data_;
02649        _data_ = _user_data_;
02650        _data_->_source_object_ = source_object;
02651        _data_->_res_ = _res_;
02652        unity_lens_impl_real_update_preview_property_co (_data_);
02653 }
02654 
02655 
02656 static gboolean unity_lens_impl_real_update_preview_property_co (UnityLensImplUpdatePreviewPropertyData* _data_) {
02657        switch (_data_->_state_) {
02658               case 0:
02659               goto _state_0;
02660               case 1:
02661               goto _state_1;
02662               default:
02663               g_assert_not_reached ();
02664        }
02665        _state_0:
02666        _data_->_tmp0_ = _data_->uri;
02667        _data_->_tmp2_ = NULL;
02668        _data_->_tmp2_ = _data_->_tmp1_ = g_strsplit (_data_->_tmp0_, ":", 2);
02669        _data_->tokens = _data_->_tmp2_;
02670        _data_->tokens_length1 = _vala_array_length (_data_->_tmp1_);
02671        _data_->_tokens_size_ = _data_->tokens_length1;
02672        _data_->_tmp3_ = _data_->tokens;
02673        _data_->_tmp3__length1 = _data_->tokens_length1;
02674        _data_->_tmp4_ = _data_->_tmp3_[1];
02675        _data_->_tmp5_ = g_strdup (_data_->_tmp4_);
02676        _data_->scope_uri = _data_->_tmp5_;
02677        _data_->_tmp6_ = _data_->tokens;
02678        _data_->_tmp6__length1 = _data_->tokens_length1;
02679        _data_->_tmp7_ = _data_->_tmp6_[0];
02680        _data_->_tmp8_ = NULL;
02681        _data_->_tmp8_ = unity_lens_impl_get_scope_for_uid (_data_->self, _data_->_tmp7_);
02682        _data_->scope = _data_->_tmp8_;
02683        _data_->_tmp9_ = _data_->scope;
02684        if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp9_, UNITY_TYPE_SCOPE_PROXY)) {
02685               _data_->_tmp10_ = _data_->scope;
02686               _data_->_tmp11_ = _data_->scope_uri;
02687               _data_->_tmp12_ = _data_->values;
02688               _data_->_state_ = 1;
02689               unity_scope_proxy_update_preview_property (_data_->_tmp10_, _data_->_tmp11_, _data_->_tmp12_, unity_lens_impl_update_preview_property_ready, _data_);
02690               return FALSE;
02691               _state_1:
02692               _data_->_tmp13_ = NULL;
02693               _data_->_tmp13_ = unity_scope_proxy_update_preview_property_finish (_data_->_tmp10_, _data_->_res_, &_data_->_inner_error_);
02694               _data_->reply = _data_->_tmp13_;
02695               if (_data_->_inner_error_ != NULL) {
02696                      if (_data_->_inner_error_->domain == G_IO_ERROR) {
02697                             g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
02698                             g_error_free (_data_->_inner_error_);
02699                             _g_object_unref0 (_data_->scope);
02700                             _g_free0 (_data_->scope_uri);
02701                             _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
02702                             if (_data_->_state_ == 0) {
02703                                    g_simple_async_result_complete_in_idle (_data_->_async_result);
02704                             } else {
02705                                    g_simple_async_result_complete (_data_->_async_result);
02706                             }
02707                             g_object_unref (_data_->_async_result);
02708                             return FALSE;
02709                      } else {
02710                             _g_object_unref0 (_data_->scope);
02711                             _g_free0 (_data_->scope_uri);
02712                             _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
02713                             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);
02714                             g_clear_error (&_data_->_inner_error_);
02715                             return FALSE;
02716                      }
02717               }
02718               _data_->result = _data_->reply;
02719               _g_object_unref0 (_data_->scope);
02720               _g_free0 (_data_->scope_uri);
02721               _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
02722               if (_data_->_state_ == 0) {
02723                      g_simple_async_result_complete_in_idle (_data_->_async_result);
02724               } else {
02725                      g_simple_async_result_complete (_data_->_async_result);
02726               }
02727               g_object_unref (_data_->_async_result);
02728               return FALSE;
02729        } else {
02730               _data_->_tmp14_ = _data_->uri;
02731               g_warning ("unity-lens-private.vala:533: Unable to find scope for activation reque" \
02732 "st: %s", _data_->_tmp14_);
02733        }
02734        _data_->_tmp15_ = g_str_hash;
02735        _data_->_tmp16_ = g_str_equal;
02736        _data_->_tmp17_ = g_hash_table_new_full (_data_->_tmp15_, _data_->_tmp16_, _g_free0_, _g_variant_unref0_);
02737        _data_->result = _data_->_tmp17_;
02738        _g_object_unref0 (_data_->scope);
02739        _g_free0 (_data_->scope_uri);
02740        _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
02741        if (_data_->_state_ == 0) {
02742               g_simple_async_result_complete_in_idle (_data_->_async_result);
02743        } else {
02744               g_simple_async_result_complete (_data_->_async_result);
02745        }
02746        g_object_unref (_data_->_async_result);
02747        return FALSE;
02748        _g_object_unref0 (_data_->scope);
02749        _g_free0 (_data_->scope_uri);
02750        _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
02751        if (_data_->_state_ == 0) {
02752               g_simple_async_result_complete_in_idle (_data_->_async_result);
02753        } else {
02754               g_simple_async_result_complete (_data_->_async_result);
02755        }
02756        g_object_unref (_data_->_async_result);
02757        return FALSE;
02758 }
02759 
02760 
02761 static void unity_lens_impl_real_search_data_free (gpointer _data) {
02762        UnityLensImplSearchData* _data_;
02763        _data_ = _data;
02764        _g_free0 (_data_->search_string);
02765        _g_hash_table_unref0 (_data_->hints);
02766        _g_hash_table_unref0 (_data_->result);
02767        _g_object_unref0 (_data_->self);
02768        g_slice_free (UnityLensImplSearchData, _data_);
02769 }
02770 
02771 
02772 static void unity_lens_impl_real_search (UnityProtocolLensService* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02773        UnityLensImpl * self;
02774        UnityLensImplSearchData* _data_;
02775        UnityLensImpl* _tmp0_;
02776        const gchar* _tmp1_;
02777        gchar* _tmp2_;
02778        GHashTable* _tmp3_;
02779        GHashTable* _tmp4_;
02780        self = (UnityLensImpl*) base;
02781        _data_ = g_slice_new0 (UnityLensImplSearchData);
02782        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_lens_impl_real_search);
02783        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_lens_impl_real_search_data_free);
02784        _tmp0_ = _g_object_ref0 (self);
02785        _data_->self = _tmp0_;
02786        _tmp1_ = search_string;
02787        _tmp2_ = g_strdup (_tmp1_);
02788        _data_->search_string = _tmp2_;
02789        _tmp3_ = hints;
02790        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
02791        _data_->hints = _tmp4_;
02792        unity_lens_impl_real_search_co (_data_);
02793 }
02794 
02795 
02796 static GHashTable* unity_lens_impl_real_search_finish (UnityProtocolLensService* base, GAsyncResult* _res_, GError** error) {
02797        GHashTable* result;
02798        UnityLensImplSearchData* _data_;
02799        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
02800               return NULL;
02801        }
02802        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
02803        result = _data_->result;
02804        _data_->result = NULL;
02805        return result;
02806 }
02807 
02808 
02809 static Block2Data* block2_data_ref (Block2Data* _data2_) {
02810        g_atomic_int_inc (&_data2_->_ref_count_);
02811        return _data2_;
02812 }
02813 
02814 
02815 static void block2_data_unref (void * _userdata_) {
02816        Block2Data* _data2_;
02817        _data2_ = (Block2Data*) _userdata_;
02818        if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
02819               UnityLensImpl * self;
02820               self = _data2_->self;
02821               _g_hash_table_unref0 (_data2_->_result_);
02822               _g_object_unref0 (self);
02823               g_slice_free (Block2Data, _data2_);
02824        }
02825 }
02826 
02827 
02828 static Block3Data* block3_data_ref (Block3Data* _data3_) {
02829        g_atomic_int_inc (&_data3_->_ref_count_);
02830        return _data3_;
02831 }
02832 
02833 
02834 static void block3_data_unref (void * _userdata_) {
02835        Block3Data* _data3_;
02836        _data3_ = (Block3Data*) _userdata_;
02837        if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
02838               UnityLensImpl * self;
02839               self = _data3_->_data2_->self;
02840               block2_data_unref (_data3_->_data2_);
02841               _data3_->_data2_ = NULL;
02842               g_slice_free (Block3Data, _data3_);
02843        }
02844 }
02845 
02846 
02847 static Block4Data* block4_data_ref (Block4Data* _data4_) {
02848        g_atomic_int_inc (&_data4_->_ref_count_);
02849        return _data4_;
02850 }
02851 
02852 
02853 static void block4_data_unref (void * _userdata_) {
02854        Block4Data* _data4_;
02855        _data4_ = (Block4Data*) _userdata_;
02856        if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
02857               UnityLensImpl * self;
02858               self = _data4_->_data3_->_data2_->self;
02859               block3_data_unref (_data4_->_data3_);
02860               _data4_->_data3_ = NULL;
02861               g_slice_free (Block4Data, _data4_);
02862        }
02863 }
02864 
02865 
02866 static void _____lambda16_ (Block4Data* _data4_, DeeSharedModel* m, guint64 begin_seqnum, guint64 end_seqnum) {
02867        Block3Data* _data3_;
02868        Block2Data* _data2_;
02869        UnityLensImpl * self;
02870        guint64 _tmp0_;
02871        guint64 _tmp1_;
02872        DeeSharedModel* _tmp2_;
02873        gulong _tmp3_;
02874        gint _tmp4_;
02875        gint _tmp5_;
02876        _data3_ = _data4_->_data3_;
02877        _data2_ = _data3_->_data2_;
02878        self = _data2_->self;
02879        g_return_if_fail (m != NULL);
02880        _tmp0_ = end_seqnum;
02881        _tmp1_ = _data3_->seqnum;
02882        if (_tmp0_ < _tmp1_) {
02883               return;
02884        }
02885        _tmp2_ = m;
02886        _tmp3_ = _data4_->update_sig_id;
02887        g_signal_handler_disconnect (_tmp2_, _tmp3_);
02888        _tmp4_ = _data2_->num_scopes;
02889        _data2_->num_scopes = _tmp4_ - 1;
02890        _tmp5_ = _data2_->num_scopes;
02891        if (_tmp5_ == 0) {
02892               unity_lens_impl_real_search_co (_data2_->_async_data_);
02893        }
02894 }
02895 
02896 
02897 static void ______lambda16__dee_shared_model_end_transaction (DeeSharedModel* _sender, guint64 begin_seqnum, guint64 end_seqnum, gpointer self) {
02898        _____lambda16_ (self, _sender, begin_seqnum, end_seqnum);
02899 }
02900 
02901 
02902 static gpointer _g_variant_ref0 (gpointer self) {
02903        return self ? g_variant_ref (self) : NULL;
02904 }
02905 
02906 
02907 static void __lambda15_ (Block2Data* _data2_, GObject* obj, GAsyncResult* res) {
02908        UnityLensImpl * self;
02909        GObject* _tmp0_;
02910        UnityScopeProxy* _tmp1_;
02911        UnityScopeProxy* scope;
02912        UnityScopeProxy* _tmp2_;
02913        GAsyncResult* _tmp3_;
02914        GHashTable* _tmp4_ = NULL;
02915        GHashTable* results;
02916        GHashTableIter iter = {0};
02917        GHashTable* _tmp5_;
02918        const gchar* key = NULL;
02919        GVariant* variant = NULL;
02920        gboolean models_updated;
02921        gboolean _tmp26_;
02922        gint _tmp27_;
02923        gint _tmp28_;
02924        self = _data2_->self;
02925        g_return_if_fail (res != NULL);
02926        _tmp0_ = obj;
02927        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, UNITY_TYPE_SCOPE_PROXY) ? ((UnityScopeProxy*) _tmp0_) : NULL);
02928        scope = _tmp1_;
02929        _tmp2_ = scope;
02930        _tmp3_ = res;
02931        _tmp4_ = unity_scope_proxy_search_finish (_tmp2_, _tmp3_);
02932        results = _tmp4_;
02933        _tmp5_ = results;
02934        g_hash_table_iter_init (&iter, _tmp5_);
02935        models_updated = TRUE;
02936        while (TRUE) {
02937               gconstpointer _tmp6_ = NULL;
02938               gconstpointer _tmp7_ = NULL;
02939               gboolean _tmp8_ = FALSE;
02940               const gchar* _tmp9_;
02941               _tmp8_ = g_hash_table_iter_next (&iter, &_tmp6_, &_tmp7_);
02942               key = _tmp6_;
02943               variant = _tmp7_;
02944               if (!_tmp8_) {
02945                      break;
02946               }
02947               _tmp9_ = key;
02948               if (g_strcmp0 (_tmp9_, "model-seqnum") == 0) {
02949                      Block3Data* _data3_;
02950                      GVariant* _tmp10_;
02951                      guint64 _tmp11_ = 0ULL;
02952                      UnityScopeProxy* _tmp12_;
02953                      DeeSerializableModel* _tmp13_;
02954                      DeeSerializableModel* _tmp14_;
02955                      DeeSerializableModel* model;
02956                      DeeSerializableModel* _tmp15_;
02957                      guint64 _tmp16_ = 0ULL;
02958                      guint64 _tmp17_;
02959                      _data3_ = g_slice_new0 (Block3Data);
02960                      _data3_->_ref_count_ = 1;
02961                      _data3_->_data2_ = block2_data_ref (_data2_);
02962                      _tmp10_ = variant;
02963                      _tmp11_ = g_variant_get_uint64 (_tmp10_);
02964                      _data3_->seqnum = _tmp11_;
02965                      _tmp12_ = scope;
02966                      _tmp13_ = unity_scope_proxy_get_results_model (_tmp12_);
02967                      _tmp14_ = _tmp13_;
02968                      model = _tmp14_;
02969                      _tmp15_ = model;
02970                      _tmp16_ = dee_serializable_model_get_seqnum (_tmp15_);
02971                      _tmp17_ = _data3_->seqnum;
02972                      if (_tmp16_ < _tmp17_) {
02973                             Block4Data* _data4_;
02974                             DeeSerializableModel* _tmp18_;
02975                             gulong _tmp19_ = 0UL;
02976                             gulong _tmp20_;
02977                             _data4_ = g_slice_new0 (Block4Data);
02978                             _data4_->_ref_count_ = 1;
02979                             _data4_->_data3_ = block3_data_ref (_data3_);
02980                             _data4_->update_sig_id = (gulong) 0;
02981                             _tmp18_ = model;
02982                             _tmp19_ = g_signal_connect_data (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, dee_shared_model_get_type ()) ? ((DeeSharedModel*) _tmp18_) : NULL, "end-transaction", (GCallback) ______lambda16__dee_shared_model_end_transaction, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0);
02983                             _data4_->update_sig_id = _tmp19_;
02984                             _tmp20_ = _data4_->update_sig_id;
02985                             models_updated = _tmp20_ == ((gulong) 0);
02986                             block4_data_unref (_data4_);
02987                             _data4_ = NULL;
02988                      }
02989                      block3_data_unref (_data3_);
02990                      _data3_ = NULL;
02991               } else {
02992                      GHashTable* _tmp21_;
02993                      const gchar* _tmp22_;
02994                      gchar* _tmp23_;
02995                      GVariant* _tmp24_;
02996                      GVariant* _tmp25_;
02997                      _tmp21_ = _data2_->_result_;
02998                      _tmp22_ = key;
02999                      _tmp23_ = g_strdup (_tmp22_);
03000                      _tmp24_ = variant;
03001                      _tmp25_ = _g_variant_ref0 (_tmp24_);
03002                      g_hash_table_insert (_tmp21_, _tmp23_, _tmp25_);
03003               }
03004        }
03005        _tmp26_ = models_updated;
03006        if (!_tmp26_) {
03007               _g_hash_table_unref0 (results);
03008               _g_object_unref0 (scope);
03009               return;
03010        }
03011        _tmp27_ = _data2_->num_scopes;
03012        _data2_->num_scopes = _tmp27_ - 1;
03013        _tmp28_ = _data2_->num_scopes;
03014        if (_tmp28_ == 0) {
03015               unity_lens_impl_real_search_co (_data2_->_async_data_);
03016        }
03017        _g_hash_table_unref0 (results);
03018        _g_object_unref0 (scope);
03019 }
03020 
03021 
03022 static void ___lambda15__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
03023        __lambda15_ (self, source_object, res);
03024 }
03025 
03026 
03027 static gboolean unity_lens_impl_real_search_co (UnityLensImplSearchData* _data_) {
03028        switch (_data_->_state_) {
03029               case 0:
03030               goto _state_0;
03031               case 1:
03032               goto _state_1;
03033               default:
03034               g_assert_not_reached ();
03035        }
03036        _state_0:
03037        _data_->_data2_ = g_slice_new0 (Block2Data);
03038        _data_->_data2_->_ref_count_ = 1;
03039        _data_->_data2_->self = g_object_ref (_data_->self);
03040        _data_->_data2_->_async_data_ = _data_;
03041        _data_->_tmp0_ = g_str_hash;
03042        _data_->_tmp1_ = g_str_equal;
03043        _data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, _g_variant_unref0_);
03044        _data_->_data2_->_result_ = _data_->_tmp2_;
03045        _data_->_data2_->num_scopes = 0;
03046        _data_->cb = ___lambda15__gasync_ready_callback;
03047        _data_->cb_target = block2_data_ref (_data_->_data2_);
03048        _data_->cb_target_destroy_notify = block2_data_unref;
03049        {
03050               _data_->_tmp3_ = _data_->self->priv->_scope_factory;
03051               _data_->_tmp4_ = _data_->_tmp3_->scopes;
03052               _data_->_tmp5_ = _g_object_ref0 (_data_->_tmp4_);
03053               _data_->_scope_list = _data_->_tmp5_;
03054               _data_->_tmp6_ = _data_->_scope_list;
03055               _data_->_tmp7_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp6_);
03056               _data_->_tmp8_ = _data_->_tmp7_;
03057               _data_->_scope_size = _data_->_tmp8_;
03058               _data_->_scope_index = -1;
03059               while (TRUE) {
03060                      _data_->_tmp9_ = _data_->_scope_index;
03061                      _data_->_scope_index = _data_->_tmp9_ + 1;
03062                      _data_->_tmp10_ = _data_->_scope_index;
03063                      _data_->_tmp11_ = _data_->_scope_size;
03064                      if (!(_data_->_tmp10_ < _data_->_tmp11_)) {
03065                             break;
03066                      }
03067                      _data_->_tmp12_ = _data_->_scope_list;
03068                      _data_->_tmp13_ = _data_->_scope_index;
03069                      _data_->_tmp14_ = NULL;
03070                      _data_->_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp12_, _data_->_tmp13_);
03071                      _data_->scope = (UnityScopeProxy*) _data_->_tmp14_;
03072                      _data_->_tmp15_ = _data_->_data2_->num_scopes;
03073                      _data_->_data2_->num_scopes = _data_->_tmp15_ + 1;
03074                      _data_->_tmp16_ = _data_->scope;
03075                      _data_->_tmp17_ = _data_->search_string;
03076                      _data_->_tmp18_ = _data_->hints;
03077                      _data_->_tmp19_ = _data_->cb;
03078                      _data_->_tmp19__target = _data_->cb_target;
03079                      unity_scope_proxy_search (_data_->_tmp16_, _data_->_tmp17_, _data_->_tmp18_, _data_->_tmp19_, _data_->_tmp19__target);
03080                      _g_object_unref0 (_data_->scope);
03081               }
03082               _g_object_unref0 (_data_->_scope_list);
03083        }
03084        _data_->_tmp20_ = _data_->_data2_->num_scopes;
03085        if (_data_->_tmp20_ > 0) {
03086               _data_->_state_ = 1;
03087               return FALSE;
03088               _state_1:
03089               ;
03090        }
03091        _data_->_tmp21_ = _data_->_data2_->_result_;
03092        _data_->_tmp22_ = g_strdup ("model-seqnum");
03093        _data_->_tmp23_ = _data_->self->priv->_results_model;
03094        _data_->_tmp24_ = 0ULL;
03095        _data_->_tmp24_ = dee_serializable_model_get_seqnum ((DeeSerializableModel*) _data_->_tmp23_);
03096        _data_->_tmp25_ = g_variant_new_uint64 (_data_->_tmp24_);
03097        g_variant_ref_sink (_data_->_tmp25_);
03098        g_hash_table_insert (_data_->_tmp21_, _data_->_tmp22_, _data_->_tmp25_);
03099        _data_->_tmp26_ = _data_->_data2_->_result_;
03100        _data_->_tmp27_ = _g_hash_table_ref0 (_data_->_tmp26_);
03101        _data_->result = _data_->_tmp27_;
03102        (_data_->cb_target_destroy_notify == NULL) ? NULL : (_data_->cb_target_destroy_notify (_data_->cb_target), NULL);
03103        _data_->cb = NULL;
03104        _data_->cb_target = NULL;
03105        _data_->cb_target_destroy_notify = NULL;
03106        block2_data_unref (_data_->_data2_);
03107        _data_->_data2_ = NULL;
03108        if (_data_->_state_ == 0) {
03109               g_simple_async_result_complete_in_idle (_data_->_async_result);
03110        } else {
03111               g_simple_async_result_complete (_data_->_async_result);
03112        }
03113        g_object_unref (_data_->_async_result);
03114        return FALSE;
03115        (_data_->cb_target_destroy_notify == NULL) ? NULL : (_data_->cb_target_destroy_notify (_data_->cb_target), NULL);
03116        _data_->cb = NULL;
03117        _data_->cb_target = NULL;
03118        _data_->cb_target_destroy_notify = NULL;
03119        block2_data_unref (_data_->_data2_);
03120        _data_->_data2_ = NULL;
03121        if (_data_->_state_ == 0) {
03122               g_simple_async_result_complete_in_idle (_data_->_async_result);
03123        } else {
03124               g_simple_async_result_complete (_data_->_async_result);
03125        }
03126        g_object_unref (_data_->_async_result);
03127        return FALSE;
03128 }
03129 
03130 
03131 static void unity_lens_impl_real_global_search_data_free (gpointer _data) {
03132        UnityLensImplGlobalSearchData* _data_;
03133        _data_ = _data;
03134        _g_free0 (_data_->search_string);
03135        _g_hash_table_unref0 (_data_->hints);
03136        _g_hash_table_unref0 (_data_->result);
03137        _g_object_unref0 (_data_->self);
03138        g_slice_free (UnityLensImplGlobalSearchData, _data_);
03139 }
03140 
03141 
03142 static void unity_lens_impl_real_global_search (UnityProtocolLensService* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
03143        UnityLensImpl * self;
03144        UnityLensImplGlobalSearchData* _data_;
03145        UnityLensImpl* _tmp0_;
03146        const gchar* _tmp1_;
03147        gchar* _tmp2_;
03148        GHashTable* _tmp3_;
03149        GHashTable* _tmp4_;
03150        self = (UnityLensImpl*) base;
03151        _data_ = g_slice_new0 (UnityLensImplGlobalSearchData);
03152        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_lens_impl_real_global_search);
03153        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_lens_impl_real_global_search_data_free);
03154        _tmp0_ = _g_object_ref0 (self);
03155        _data_->self = _tmp0_;
03156        _tmp1_ = search_string;
03157        _tmp2_ = g_strdup (_tmp1_);
03158        _data_->search_string = _tmp2_;
03159        _tmp3_ = hints;
03160        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
03161        _data_->hints = _tmp4_;
03162        unity_lens_impl_real_global_search_co (_data_);
03163 }
03164 
03165 
03166 static GHashTable* unity_lens_impl_real_global_search_finish (UnityProtocolLensService* base, GAsyncResult* _res_, GError** error) {
03167        GHashTable* result;
03168        UnityLensImplGlobalSearchData* _data_;
03169        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
03170               return NULL;
03171        }
03172        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
03173        result = _data_->result;
03174        _data_->result = NULL;
03175        return result;
03176 }
03177 
03178 
03179 static Block5Data* block5_data_ref (Block5Data* _data5_) {
03180        g_atomic_int_inc (&_data5_->_ref_count_);
03181        return _data5_;
03182 }
03183 
03184 
03185 static void block5_data_unref (void * _userdata_) {
03186        Block5Data* _data5_;
03187        _data5_ = (Block5Data*) _userdata_;
03188        if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
03189               UnityLensImpl * self;
03190               self = _data5_->self;
03191               _g_object_unref0 (self);
03192               g_slice_free (Block5Data, _data5_);
03193        }
03194 }
03195 
03196 
03197 static Block6Data* block6_data_ref (Block6Data* _data6_) {
03198        g_atomic_int_inc (&_data6_->_ref_count_);
03199        return _data6_;
03200 }
03201 
03202 
03203 static void block6_data_unref (void * _userdata_) {
03204        Block6Data* _data6_;
03205        _data6_ = (Block6Data*) _userdata_;
03206        if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
03207               UnityLensImpl * self;
03208               self = _data6_->_data5_->self;
03209               block5_data_unref (_data6_->_data5_);
03210               _data6_->_data5_ = NULL;
03211               g_slice_free (Block6Data, _data6_);
03212        }
03213 }
03214 
03215 
03216 static Block7Data* block7_data_ref (Block7Data* _data7_) {
03217        g_atomic_int_inc (&_data7_->_ref_count_);
03218        return _data7_;
03219 }
03220 
03221 
03222 static void block7_data_unref (void * _userdata_) {
03223        Block7Data* _data7_;
03224        _data7_ = (Block7Data*) _userdata_;
03225        if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
03226               UnityLensImpl * self;
03227               self = _data7_->_data6_->_data5_->self;
03228               block6_data_unref (_data7_->_data6_);
03229               _data7_->_data6_ = NULL;
03230               g_slice_free (Block7Data, _data7_);
03231        }
03232 }
03233 
03234 
03235 static void ____lambda18_ (Block7Data* _data7_, DeeSharedModel* m, guint64 begin_seqnum, guint64 end_seqnum) {
03236        Block6Data* _data6_;
03237        Block5Data* _data5_;
03238        UnityLensImpl * self;
03239        guint64 _tmp0_;
03240        guint64 _tmp1_;
03241        DeeSharedModel* _tmp2_;
03242        gulong _tmp3_;
03243        gint _tmp4_;
03244        gint _tmp5_;
03245        _data6_ = _data7_->_data6_;
03246        _data5_ = _data6_->_data5_;
03247        self = _data5_->self;
03248        g_return_if_fail (m != NULL);
03249        _tmp0_ = end_seqnum;
03250        _tmp1_ = _data6_->seqnum;
03251        if (_tmp0_ < _tmp1_) {
03252               return;
03253        }
03254        _tmp2_ = m;
03255        _tmp3_ = _data7_->update_sig_id;
03256        g_signal_handler_disconnect (_tmp2_, _tmp3_);
03257        _tmp4_ = _data5_->num_scopes;
03258        _data5_->num_scopes = _tmp4_ - 1;
03259        _tmp5_ = _data5_->num_scopes;
03260        if (_tmp5_ == 0) {
03261               unity_lens_impl_real_global_search_co (_data5_->_async_data_);
03262        }
03263 }
03264 
03265 
03266 static void _____lambda18__dee_shared_model_end_transaction (DeeSharedModel* _sender, guint64 begin_seqnum, guint64 end_seqnum, gpointer self) {
03267        ____lambda18_ (self, _sender, begin_seqnum, end_seqnum);
03268 }
03269 
03270 
03271 static void __lambda17_ (Block5Data* _data5_, GObject* obj, GAsyncResult* _result_) {
03272        UnityLensImpl * self;
03273        GObject* _tmp0_;
03274        UnityScopeProxy* _tmp1_;
03275        UnityScopeProxy* scope;
03276        UnityScopeProxy* _tmp2_;
03277        GAsyncResult* _tmp3_;
03278        GHashTable* _tmp4_ = NULL;
03279        GHashTable* results;
03280        gboolean models_updated;
03281        GHashTable* _tmp5_;
03282        gconstpointer _tmp6_ = NULL;
03283        GVariant* seqnum_v;
03284        GVariant* _tmp7_;
03285        gboolean _tmp19_;
03286        gint _tmp20_;
03287        gint _tmp21_;
03288        self = _data5_->self;
03289        g_return_if_fail (_result_ != NULL);
03290        _tmp0_ = obj;
03291        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, UNITY_TYPE_SCOPE_PROXY) ? ((UnityScopeProxy*) _tmp0_) : NULL);
03292        scope = _tmp1_;
03293        _tmp2_ = scope;
03294        _tmp3_ = _result_;
03295        _tmp4_ = unity_scope_proxy_global_search_finish (_tmp2_, _tmp3_);
03296        results = _tmp4_;
03297        models_updated = TRUE;
03298        _tmp5_ = results;
03299        _tmp6_ = g_hash_table_lookup (_tmp5_, "model-seqnum");
03300        seqnum_v = (GVariant*) _tmp6_;
03301        _tmp7_ = seqnum_v;
03302        if (_tmp7_ != NULL) {
03303               Block6Data* _data6_;
03304               GVariant* _tmp8_;
03305               guint64 _tmp9_ = 0ULL;
03306               UnityScopeProxy* _tmp10_;
03307               DeeSerializableModel* _tmp11_;
03308               DeeSerializableModel* _tmp12_;
03309               DeeSerializableModel* model;
03310               DeeSerializableModel* _tmp13_;
03311               guint64 _tmp14_ = 0ULL;
03312               guint64 _tmp15_;
03313               _data6_ = g_slice_new0 (Block6Data);
03314               _data6_->_ref_count_ = 1;
03315               _data6_->_data5_ = block5_data_ref (_data5_);
03316               _tmp8_ = seqnum_v;
03317               _tmp9_ = g_variant_get_uint64 (_tmp8_);
03318               _data6_->seqnum = _tmp9_;
03319               _tmp10_ = scope;
03320               _tmp11_ = unity_scope_proxy_get_global_results_model (_tmp10_);
03321               _tmp12_ = _tmp11_;
03322               model = _tmp12_;
03323               _tmp13_ = model;
03324               _tmp14_ = dee_serializable_model_get_seqnum (_tmp13_);
03325               _tmp15_ = _data6_->seqnum;
03326               if (_tmp14_ < _tmp15_) {
03327                      Block7Data* _data7_;
03328                      DeeSerializableModel* _tmp16_;
03329                      gulong _tmp17_ = 0UL;
03330                      gulong _tmp18_;
03331                      _data7_ = g_slice_new0 (Block7Data);
03332                      _data7_->_ref_count_ = 1;
03333                      _data7_->_data6_ = block6_data_ref (_data6_);
03334                      _data7_->update_sig_id = (gulong) 0;
03335                      _tmp16_ = model;
03336                      _tmp17_ = g_signal_connect_data (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, dee_shared_model_get_type ()) ? ((DeeSharedModel*) _tmp16_) : NULL, "end-transaction", (GCallback) _____lambda18__dee_shared_model_end_transaction, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
03337                      _data7_->update_sig_id = _tmp17_;
03338                      _tmp18_ = _data7_->update_sig_id;
03339                      models_updated = _tmp18_ == ((gulong) 0);
03340                      block7_data_unref (_data7_);
03341                      _data7_ = NULL;
03342               }
03343               block6_data_unref (_data6_);
03344               _data6_ = NULL;
03345        }
03346        _tmp19_ = models_updated;
03347        if (!_tmp19_) {
03348               _g_hash_table_unref0 (results);
03349               _g_object_unref0 (scope);
03350               return;
03351        }
03352        _tmp20_ = _data5_->num_scopes;
03353        _data5_->num_scopes = _tmp20_ - 1;
03354        _tmp21_ = _data5_->num_scopes;
03355        if (_tmp21_ == 0) {
03356               unity_lens_impl_real_global_search_co (_data5_->_async_data_);
03357        }
03358        _g_hash_table_unref0 (results);
03359        _g_object_unref0 (scope);
03360 }
03361 
03362 
03363 static void ___lambda17__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
03364        __lambda17_ (self, source_object, res);
03365 }
03366 
03367 
03368 static gboolean unity_lens_impl_real_global_search_co (UnityLensImplGlobalSearchData* _data_) {
03369        switch (_data_->_state_) {
03370               case 0:
03371               goto _state_0;
03372               case 1:
03373               goto _state_1;
03374               default:
03375               g_assert_not_reached ();
03376        }
03377        _state_0:
03378        _data_->_data5_ = g_slice_new0 (Block5Data);
03379        _data_->_data5_->_ref_count_ = 1;
03380        _data_->_data5_->self = g_object_ref (_data_->self);
03381        _data_->_data5_->_async_data_ = _data_;
03382        _data_->_data5_->num_scopes = 0;
03383        _data_->cb = ___lambda17__gasync_ready_callback;
03384        _data_->cb_target = block5_data_ref (_data_->_data5_);
03385        _data_->cb_target_destroy_notify = block5_data_unref;
03386        {
03387               _data_->_tmp0_ = _data_->self->priv->_scope_factory;
03388               _data_->_tmp1_ = _data_->_tmp0_->scopes;
03389               _data_->_tmp2_ = _g_object_ref0 (_data_->_tmp1_);
03390               _data_->_scope_list = _data_->_tmp2_;
03391               _data_->_tmp3_ = _data_->_scope_list;
03392               _data_->_tmp4_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp3_);
03393               _data_->_tmp5_ = _data_->_tmp4_;
03394               _data_->_scope_size = _data_->_tmp5_;
03395               _data_->_scope_index = -1;
03396               while (TRUE) {
03397                      _data_->_tmp6_ = _data_->_scope_index;
03398                      _data_->_scope_index = _data_->_tmp6_ + 1;
03399                      _data_->_tmp7_ = _data_->_scope_index;
03400                      _data_->_tmp8_ = _data_->_scope_size;
03401                      if (!(_data_->_tmp7_ < _data_->_tmp8_)) {
03402                             break;
03403                      }
03404                      _data_->_tmp9_ = _data_->_scope_list;
03405                      _data_->_tmp10_ = _data_->_scope_index;
03406                      _data_->_tmp11_ = NULL;
03407                      _data_->_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp9_, _data_->_tmp10_);
03408                      _data_->scope = (UnityScopeProxy*) _data_->_tmp11_;
03409                      _data_->_tmp12_ = _data_->scope;
03410                      _data_->_tmp13_ = unity_scope_proxy_get_search_in_global (_data_->_tmp12_);
03411                      _data_->_tmp14_ = _data_->_tmp13_;
03412                      if (_data_->_tmp14_) {
03413                             _data_->_tmp15_ = _data_->_data5_->num_scopes;
03414                             _data_->_data5_->num_scopes = _data_->_tmp15_ + 1;
03415                             _data_->_tmp16_ = _data_->scope;
03416                             _data_->_tmp17_ = _data_->search_string;
03417                             _data_->_tmp18_ = _data_->hints;
03418                             _data_->_tmp19_ = _data_->cb;
03419                             _data_->_tmp19__target = _data_->cb_target;
03420                             unity_scope_proxy_global_search (_data_->_tmp16_, _data_->_tmp17_, _data_->_tmp18_, _data_->_tmp19_, _data_->_tmp19__target);
03421                      }
03422                      _g_object_unref0 (_data_->scope);
03423               }
03424               _g_object_unref0 (_data_->_scope_list);
03425        }
03426        _data_->_tmp20_ = _data_->_data5_->num_scopes;
03427        if (_data_->_tmp20_ > 0) {
03428               _data_->_state_ = 1;
03429               return FALSE;
03430               _state_1:
03431               ;
03432        }
03433        _data_->_tmp21_ = g_str_hash;
03434        _data_->_tmp22_ = g_str_equal;
03435        _data_->_tmp23_ = g_hash_table_new_full (_data_->_tmp21_, _data_->_tmp22_, _g_free0_, _g_variant_unref0_);
03436        _data_->_result_ = _data_->_tmp23_;
03437        _data_->_tmp24_ = g_strdup ("model-seqnum");
03438        _data_->_tmp25_ = _data_->self->priv->_global_results_model;
03439        _data_->_tmp26_ = 0ULL;
03440        _data_->_tmp26_ = dee_serializable_model_get_seqnum ((DeeSerializableModel*) _data_->_tmp25_);
03441        _data_->_tmp27_ = g_variant_new_uint64 (_data_->_tmp26_);
03442        g_variant_ref_sink (_data_->_tmp27_);
03443        g_hash_table_insert (_data_->_result_, _data_->_tmp24_, _data_->_tmp27_);
03444        _data_->result = _data_->_result_;
03445        (_data_->cb_target_destroy_notify == NULL) ? NULL : (_data_->cb_target_destroy_notify (_data_->cb_target), NULL);
03446        _data_->cb = NULL;
03447        _data_->cb_target = NULL;
03448        _data_->cb_target_destroy_notify = NULL;
03449        block5_data_unref (_data_->_data5_);
03450        _data_->_data5_ = NULL;
03451        if (_data_->_state_ == 0) {
03452               g_simple_async_result_complete_in_idle (_data_->_async_result);
03453        } else {
03454               g_simple_async_result_complete (_data_->_async_result);
03455        }
03456        g_object_unref (_data_->_async_result);
03457        return FALSE;
03458        _g_hash_table_unref0 (_data_->_result_);
03459        (_data_->cb_target_destroy_notify == NULL) ? NULL : (_data_->cb_target_destroy_notify (_data_->cb_target), NULL);
03460        _data_->cb = NULL;
03461        _data_->cb_target = NULL;
03462        _data_->cb_target_destroy_notify = NULL;
03463        block5_data_unref (_data_->_data5_);
03464        _data_->_data5_ = NULL;
03465        if (_data_->_state_ == 0) {
03466               g_simple_async_result_complete_in_idle (_data_->_async_result);
03467        } else {
03468               g_simple_async_result_complete (_data_->_async_result);
03469        }
03470        g_object_unref (_data_->_async_result);
03471        return FALSE;
03472 }
03473 
03474 
03475 static void unity_lens_impl_real_update_filter_data_free (gpointer _data) {
03476        UnityLensImplUpdateFilterData* _data_;
03477        _data_ = _data;
03478        _g_free0 (_data_->filter_name);
03479        _g_hash_table_unref0 (_data_->properties);
03480        _g_object_unref0 (_data_->self);
03481        g_slice_free (UnityLensImplUpdateFilterData, _data_);
03482 }
03483 
03484 
03485 static void unity_lens_impl_real_update_filter (UnityProtocolLensService* base, const gchar* filter_name, GHashTable* properties, GAsyncReadyCallback _callback_, gpointer _user_data_) {
03486        UnityLensImpl * self;
03487        UnityLensImplUpdateFilterData* _data_;
03488        UnityLensImpl* _tmp0_;
03489        const gchar* _tmp1_;
03490        gchar* _tmp2_;
03491        GHashTable* _tmp3_;
03492        GHashTable* _tmp4_;
03493        self = (UnityLensImpl*) base;
03494        _data_ = g_slice_new0 (UnityLensImplUpdateFilterData);
03495        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_lens_impl_real_update_filter);
03496        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_lens_impl_real_update_filter_data_free);
03497        _tmp0_ = _g_object_ref0 (self);
03498        _data_->self = _tmp0_;
03499        _tmp1_ = filter_name;
03500        _tmp2_ = g_strdup (_tmp1_);
03501        _data_->filter_name = _tmp2_;
03502        _tmp3_ = properties;
03503        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
03504        _data_->properties = _tmp4_;
03505        unity_lens_impl_real_update_filter_co (_data_);
03506 }
03507 
03508 
03509 static void unity_lens_impl_real_update_filter_finish (UnityProtocolLensService* base, GAsyncResult* _res_, GError** error) {
03510        UnityLensImplUpdateFilterData* _data_;
03511        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
03512               return;
03513        }
03514        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
03515 }
03516 
03517 
03518 static gboolean unity_lens_impl_real_update_filter_co (UnityLensImplUpdateFilterData* _data_) {
03519        switch (_data_->_state_) {
03520               case 0:
03521               goto _state_0;
03522               default:
03523               g_assert_not_reached ();
03524        }
03525        _state_0:
03526        _data_->_tmp0_ = _data_->filter_name;
03527        unity_trace_log_object ((GObject*) _data_->self, "Update file '%s'", _data_->_tmp0_);
03528        if (_data_->_state_ == 0) {
03529               g_simple_async_result_complete_in_idle (_data_->_async_result);
03530        } else {
03531               g_simple_async_result_complete (_data_->_async_result);
03532        }
03533        g_object_unref (_data_->_async_result);
03534        return FALSE;
03535 }
03536 
03537 
03538 static void unity_lens_impl_update_active_sources_data_free (gpointer _data) {
03539        UnityLensImplUpdateActiveSourcesData* _data_;
03540        _data_ = _data;
03541        _g_object_unref0 (_data_->updated_scope_uids);
03542        _g_object_unref0 (_data_->self);
03543        g_slice_free (UnityLensImplUpdateActiveSourcesData, _data_);
03544 }
03545 
03546 
03547 void unity_lens_impl_update_active_sources (UnityLensImpl* self, GeeSet* updated_scope_uids, GAsyncReadyCallback _callback_, gpointer _user_data_) {
03548        UnityLensImplUpdateActiveSourcesData* _data_;
03549        UnityLensImpl* _tmp0_;
03550        GeeSet* _tmp1_;
03551        GeeSet* _tmp2_;
03552        _data_ = g_slice_new0 (UnityLensImplUpdateActiveSourcesData);
03553        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_lens_impl_update_active_sources);
03554        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_lens_impl_update_active_sources_data_free);
03555        _tmp0_ = _g_object_ref0 (self);
03556        _data_->self = _tmp0_;
03557        _tmp1_ = updated_scope_uids;
03558        _tmp2_ = _g_object_ref0 (_tmp1_);
03559        _data_->updated_scope_uids = _tmp2_;
03560        unity_lens_impl_update_active_sources_co (_data_);
03561 }
03562 
03563 
03564 void unity_lens_impl_update_active_sources_finish (UnityLensImpl* self, GAsyncResult* _res_) {
03565        UnityLensImplUpdateActiveSourcesData* _data_;
03566        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
03567 }
03568 
03569 
03570 static glong string_strnlen (gchar* str, glong maxlen) {
03571        glong result = 0L;
03572        gchar* _tmp0_;
03573        glong _tmp1_;
03574        gchar* _tmp2_ = NULL;
03575        gchar* end;
03576        gchar* _tmp3_;
03577        _tmp0_ = str;
03578        _tmp1_ = maxlen;
03579        _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
03580        end = _tmp2_;
03581        _tmp3_ = end;
03582        if (_tmp3_ == NULL) {
03583               glong _tmp4_;
03584               _tmp4_ = maxlen;
03585               result = _tmp4_;
03586               return result;
03587        } else {
03588               gchar* _tmp5_;
03589               gchar* _tmp6_;
03590               _tmp5_ = end;
03591               _tmp6_ = str;
03592               result = (glong) (_tmp5_ - _tmp6_);
03593               return result;
03594        }
03595 }
03596 
03597 
03598 static gchar* string_substring (const gchar* self, glong offset, glong len) {
03599        gchar* result = NULL;
03600        glong string_length = 0L;
03601        gboolean _tmp0_ = FALSE;
03602        glong _tmp1_;
03603        gboolean _tmp3_;
03604        glong _tmp9_;
03605        glong _tmp15_;
03606        glong _tmp18_;
03607        glong _tmp19_;
03608        glong _tmp20_;
03609        glong _tmp21_;
03610        glong _tmp22_;
03611        gchar* _tmp23_ = NULL;
03612        g_return_val_if_fail (self != NULL, NULL);
03613        _tmp1_ = offset;
03614        if (_tmp1_ >= ((glong) 0)) {
03615               glong _tmp2_;
03616               _tmp2_ = len;
03617               _tmp0_ = _tmp2_ >= ((glong) 0);
03618        } else {
03619               _tmp0_ = FALSE;
03620        }
03621        _tmp3_ = _tmp0_;
03622        if (_tmp3_) {
03623               glong _tmp4_;
03624               glong _tmp5_;
03625               glong _tmp6_ = 0L;
03626               _tmp4_ = offset;
03627               _tmp5_ = len;
03628               _tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_);
03629               string_length = _tmp6_;
03630        } else {
03631               gint _tmp7_;
03632               gint _tmp8_;
03633               _tmp7_ = strlen (self);
03634               _tmp8_ = _tmp7_;
03635               string_length = (glong) _tmp8_;
03636        }
03637        _tmp9_ = offset;
03638        if (_tmp9_ < ((glong) 0)) {
03639               glong _tmp10_;
03640               glong _tmp11_;
03641               glong _tmp12_;
03642               _tmp10_ = string_length;
03643               _tmp11_ = offset;
03644               offset = _tmp10_ + _tmp11_;
03645               _tmp12_ = offset;
03646               g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL);
03647        } else {
03648               glong _tmp13_;
03649               glong _tmp14_;
03650               _tmp13_ = offset;
03651               _tmp14_ = string_length;
03652               g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL);
03653        }
03654        _tmp15_ = len;
03655        if (_tmp15_ < ((glong) 0)) {
03656               glong _tmp16_;
03657               glong _tmp17_;
03658               _tmp16_ = string_length;
03659               _tmp17_ = offset;
03660               len = _tmp16_ - _tmp17_;
03661        }
03662        _tmp18_ = offset;
03663        _tmp19_ = len;
03664        _tmp20_ = string_length;
03665        g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL);
03666        _tmp21_ = offset;
03667        _tmp22_ = len;
03668        _tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_);
03669        result = _tmp23_;
03670        return result;
03671 }
03672 
03673 
03674 static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) {
03675        if ((*length) == (*size)) {
03676               *size = (*size) ? (2 * (*size)) : 4;
03677               *array = g_renew (gchar*, *array, (*size) + 1);
03678        }
03679        (*array)[(*length)++] = value;
03680        (*array)[*length] = NULL;
03681 }
03682 
03683 
03684 static gboolean unity_lens_impl_update_active_sources_co (UnityLensImplUpdateActiveSourcesData* _data_) {
03685        switch (_data_->_state_) {
03686               case 0:
03687               goto _state_0;
03688               default:
03689               g_assert_not_reached ();
03690        }
03691        _state_0:
03692        {
03693               _data_->_tmp0_ = _data_->updated_scope_uids;
03694               _data_->_tmp1_ = NULL;
03695               _data_->_tmp1_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp0_);
03696               _data_->_scope_uid_it = _data_->_tmp1_;
03697               while (TRUE) {
03698                      _data_->_tmp2_ = _data_->_scope_uid_it;
03699                      _data_->_tmp3_ = FALSE;
03700                      _data_->_tmp3_ = gee_iterator_next (_data_->_tmp2_);
03701                      if (!_data_->_tmp3_) {
03702                             break;
03703                      }
03704                      _data_->_tmp4_ = _data_->_scope_uid_it;
03705                      _data_->_tmp5_ = NULL;
03706                      _data_->_tmp5_ = gee_iterator_get (_data_->_tmp4_);
03707                      _data_->scope_uid = (gchar*) _data_->_tmp5_;
03708                      _data_->_tmp6_ = _data_->scope_uid;
03709                      _data_->_tmp7_ = NULL;
03710                      _data_->_tmp7_ = unity_lens_impl_get_scope_for_uid (_data_->self, _data_->_tmp6_);
03711                      _data_->scope = _data_->_tmp7_;
03712                      _data_->_tmp8_ = _data_->scope;
03713                      if (_data_->_tmp8_ == NULL) {
03714                             _g_object_unref0 (_data_->scope);
03715                             _g_free0 (_data_->scope_uid);
03716                             continue;
03717                      }
03718                      _data_->_tmp9_ = NULL;
03719                      _data_->_tmp9_ = g_new0 (gchar*, 0 + 1);
03720                      _data_->active_sources = _data_->_tmp9_;
03721                      _data_->active_sources_length1 = 0;
03722                      _data_->_active_sources_size_ = _data_->active_sources_length1;
03723                      _data_->_tmp10_ = _data_->self->priv->_sources;
03724                      _data_->_tmp11_ = _data_->_tmp10_->options;
03725                      {
03726                             _data_->filter_option_collection = _data_->_tmp11_;
03727                             for (_data_->filter_option_it = _data_->filter_option_collection; _data_->filter_option_it != NULL; _data_->filter_option_it = _data_->filter_option_it->next) {
03728                                    _data_->_tmp12_ = _g_object_ref0 ((UnityFilterOption*) _data_->filter_option_it->data);
03729                                    _data_->filter_option = _data_->_tmp12_;
03730                                    {
03731                                           _data_->_tmp14_ = _data_->filter_option;
03732                                           _data_->_tmp15_ = unity_filter_option_get_id (_data_->_tmp14_);
03733                                           _data_->_tmp16_ = _data_->_tmp15_;
03734                                           _data_->_tmp17_ = _data_->scope_uid;
03735                                           _data_->_tmp18_ = FALSE;
03736                                           _data_->_tmp18_ = g_str_has_prefix (_data_->_tmp16_, _data_->_tmp17_);
03737                                           if (_data_->_tmp18_) {
03738                                                  _data_->_tmp19_ = _data_->filter_option;
03739                                                  _data_->_tmp20_ = unity_filter_option_get_active (_data_->_tmp19_);
03740                                                  _data_->_tmp21_ = _data_->_tmp20_;
03741                                                  _data_->_tmp13_ = _data_->_tmp21_;
03742                                           } else {
03743                                                  _data_->_tmp13_ = FALSE;
03744                                           }
03745                                           _data_->_tmp22_ = _data_->_tmp13_;
03746                                           if (_data_->_tmp22_) {
03747                                                  _data_->_tmp23_ = _data_->active_sources;
03748                                                  _data_->_tmp23__length1 = _data_->active_sources_length1;
03749                                                  _data_->_tmp24_ = _data_->filter_option;
03750                                                  _data_->_tmp25_ = unity_filter_option_get_id (_data_->_tmp24_);
03751                                                  _data_->_tmp26_ = _data_->_tmp25_;
03752                                                  _data_->_tmp27_ = _data_->scope_uid;
03753                                                  _data_->_tmp28_ = strlen (_data_->_tmp27_);
03754                                                  _data_->_tmp29_ = _data_->_tmp28_;
03755                                                  _data_->_tmp30_ = NULL;
03756                                                  _data_->_tmp30_ = string_substring (_data_->_tmp26_, (glong) (_data_->_tmp29_ + 1), (glong) (-1));
03757                                                  _vala_array_add2 (&_data_->active_sources, &_data_->active_sources_length1, &_data_->_active_sources_size_, _data_->_tmp30_);
03758                                           }
03759                                           _g_object_unref0 (_data_->filter_option);
03760                                    }
03761                             }
03762                      }
03763                      _data_->_tmp31_ = _data_->scope;
03764                      _data_->_tmp32_ = _data_->active_sources;
03765                      _data_->_tmp32__length1 = _data_->active_sources_length1;
03766                      unity_scope_proxy_set_active_sources (_data_->_tmp31_, _data_->_tmp32_, _data_->_tmp32__length1, NULL, NULL);
03767                      _data_->active_sources = (_vala_array_free (_data_->active_sources, _data_->active_sources_length1, (GDestroyNotify) g_free), NULL);
03768                      _g_object_unref0 (_data_->scope);
03769                      _g_free0 (_data_->scope_uid);
03770               }
03771               _g_object_unref0 (_data_->_scope_uid_it);
03772        }
03773        if (_data_->_state_ == 0) {
03774               g_simple_async_result_complete_in_idle (_data_->_async_result);
03775        } else {
03776               g_simple_async_result_complete (_data_->_async_result);
03777        }
03778        g_object_unref (_data_->_async_result);
03779        return FALSE;
03780 }
03781 
03782 
03783 static void unity_lens_impl_real_set_view_type_data_free (gpointer _data) {
03784        UnityLensImplSetViewTypeData* _data_;
03785        _data_ = _data;
03786        _g_object_unref0 (_data_->self);
03787        g_slice_free (UnityLensImplSetViewTypeData, _data_);
03788 }
03789 
03790 
03791 static void unity_lens_impl_real_set_view_type (UnityProtocolLensService* base, guint view_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
03792        UnityLensImpl * self;
03793        UnityLensImplSetViewTypeData* _data_;
03794        UnityLensImpl* _tmp0_;
03795        guint _tmp1_;
03796        self = (UnityLensImpl*) base;
03797        _data_ = g_slice_new0 (UnityLensImplSetViewTypeData);
03798        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_lens_impl_real_set_view_type);
03799        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_lens_impl_real_set_view_type_data_free);
03800        _tmp0_ = _g_object_ref0 (self);
03801        _data_->self = _tmp0_;
03802        _tmp1_ = view_type;
03803        _data_->view_type = _tmp1_;
03804        unity_lens_impl_real_set_view_type_co (_data_);
03805 }
03806 
03807 
03808 static void unity_lens_impl_real_set_view_type_finish (UnityProtocolLensService* base, GAsyncResult* _res_, GError** error) {
03809        UnityLensImplSetViewTypeData* _data_;
03810        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
03811               return;
03812        }
03813        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
03814 }
03815 
03816 
03817 static gboolean unity_lens_impl_real_set_view_type_co (UnityLensImplSetViewTypeData* _data_) {
03818        switch (_data_->_state_) {
03819               case 0:
03820               goto _state_0;
03821               default:
03822               g_assert_not_reached ();
03823        }
03824        _state_0:
03825        {
03826               _data_->_tmp0_ = _data_->self->priv->_scope_factory;
03827               _data_->_tmp1_ = _data_->_tmp0_->scopes;
03828               _data_->_tmp2_ = _g_object_ref0 (_data_->_tmp1_);
03829               _data_->_scope_list = _data_->_tmp2_;
03830               _data_->_tmp3_ = _data_->_scope_list;
03831               _data_->_tmp4_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp3_);
03832               _data_->_tmp5_ = _data_->_tmp4_;
03833               _data_->_scope_size = _data_->_tmp5_;
03834               _data_->_scope_index = -1;
03835               while (TRUE) {
03836                      _data_->_tmp6_ = _data_->_scope_index;
03837                      _data_->_scope_index = _data_->_tmp6_ + 1;
03838                      _data_->_tmp7_ = _data_->_scope_index;
03839                      _data_->_tmp8_ = _data_->_scope_size;
03840                      if (!(_data_->_tmp7_ < _data_->_tmp8_)) {
03841                             break;
03842                      }
03843                      _data_->_tmp9_ = _data_->_scope_list;
03844                      _data_->_tmp10_ = _data_->_scope_index;
03845                      _data_->_tmp11_ = NULL;
03846                      _data_->_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp9_, _data_->_tmp10_);
03847                      _data_->scope = (UnityScopeProxy*) _data_->_tmp11_;
03848                      _data_->_tmp12_ = _data_->scope;
03849                      _data_->_tmp13_ = _data_->view_type;
03850                      unity_scope_proxy_set_view_type (_data_->_tmp12_, (UnityProtocolViewType) _data_->_tmp13_);
03851                      _g_object_unref0 (_data_->scope);
03852               }
03853               _g_object_unref0 (_data_->_scope_list);
03854        }
03855        _data_->_tmp14_ = _data_->self->priv->_owner;
03856        _data_->_tmp15_ = _data_->view_type;
03857        unity_lens_set_active_internal (_data_->_tmp14_, _data_->_tmp15_ != ((guint) UNITY_PROTOCOL_VIEW_TYPE_HIDDEN));
03858        if (_data_->_state_ == 0) {
03859               g_simple_async_result_complete_in_idle (_data_->_async_result);
03860        } else {
03861               g_simple_async_result_complete (_data_->_async_result);
03862        }
03863        g_object_unref (_data_->_async_result);
03864        return FALSE;
03865 }
03866 
03867 
03868 static UnityScopeProxy* unity_lens_impl_get_scope_for_uid (UnityLensImpl* self, const gchar* uid) {
03869        UnityScopeProxy* result = NULL;
03870        g_return_val_if_fail (self != NULL, NULL);
03871        g_return_val_if_fail (uid != NULL, NULL);
03872        {
03873               UnityScopeFactory* _tmp0_;
03874               GeeArrayList* _tmp1_;
03875               GeeArrayList* _tmp2_;
03876               GeeArrayList* _scope_list;
03877               GeeArrayList* _tmp3_;
03878               gint _tmp4_;
03879               gint _tmp5_;
03880               gint _scope_size;
03881               gint _scope_index;
03882               _tmp0_ = self->priv->_scope_factory;
03883               _tmp1_ = _tmp0_->scopes;
03884               _tmp2_ = _g_object_ref0 (_tmp1_);
03885               _scope_list = _tmp2_;
03886               _tmp3_ = _scope_list;
03887               _tmp4_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp3_);
03888               _tmp5_ = _tmp4_;
03889               _scope_size = _tmp5_;
03890               _scope_index = -1;
03891               while (TRUE) {
03892                      gint _tmp6_;
03893                      gint _tmp7_;
03894                      gint _tmp8_;
03895                      GeeArrayList* _tmp9_;
03896                      gint _tmp10_;
03897                      gpointer _tmp11_ = NULL;
03898                      UnityScopeProxy* scope;
03899                      const gchar* _tmp12_;
03900                      UnityScopeProxy* _tmp13_;
03901                      gchar* _tmp14_ = NULL;
03902                      gchar* _tmp15_;
03903                      gboolean _tmp16_;
03904                      _tmp6_ = _scope_index;
03905                      _scope_index = _tmp6_ + 1;
03906                      _tmp7_ = _scope_index;
03907                      _tmp8_ = _scope_size;
03908                      if (!(_tmp7_ < _tmp8_)) {
03909                             break;
03910                      }
03911                      _tmp9_ = _scope_list;
03912                      _tmp10_ = _scope_index;
03913                      _tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _tmp10_);
03914                      scope = (UnityScopeProxy*) _tmp11_;
03915                      _tmp12_ = uid;
03916                      _tmp13_ = scope;
03917                      _tmp14_ = unity_lens_impl_uid_for_scope (self, _tmp13_);
03918                      _tmp15_ = _tmp14_;
03919                      _tmp16_ = g_strcmp0 (_tmp12_, _tmp15_) == 0;
03920                      _g_free0 (_tmp15_);
03921                      if (_tmp16_) {
03922                             result = scope;
03923                             _g_object_unref0 (_scope_list);
03924                             return result;
03925                      }
03926                      _g_object_unref0 (scope);
03927               }
03928               _g_object_unref0 (_scope_list);
03929        }
03930        result = NULL;
03931        return result;
03932 }
03933 
03934 
03935 static gchar* unity_lens_impl_uid_for_scope (UnityLensImpl* self, UnityScopeProxy* scope) {
03936        gchar* result = NULL;
03937        UnityScopeProxy* _tmp0_;
03938        gchar* _tmp1_ = NULL;
03939        g_return_val_if_fail (self != NULL, NULL);
03940        g_return_val_if_fail (scope != NULL, NULL);
03941        _tmp0_ = scope;
03942        _tmp1_ = g_strdup_printf ("%p", _tmp0_);
03943        result = _tmp1_;
03944        return result;
03945 }
03946 
03947 
03948 UnityResultsSynchronizer* unity_lens_impl_get_results_sync (UnityLensImpl* self) {
03949        UnityResultsSynchronizer* result;
03950        UnityResultsSynchronizer* _tmp0_;
03951        g_return_val_if_fail (self != NULL, NULL);
03952        _tmp0_ = self->priv->_results_sync;
03953        result = _tmp0_;
03954        return result;
03955 }
03956 
03957 
03958 UnityResultsSynchronizer* unity_lens_impl_get_global_results_sync (UnityLensImpl* self) {
03959        UnityResultsSynchronizer* result;
03960        UnityResultsSynchronizer* _tmp0_;
03961        g_return_val_if_fail (self != NULL, NULL);
03962        _tmp0_ = self->priv->_global_results_sync;
03963        result = _tmp0_;
03964        return result;
03965 }
03966 
03967 
03968 static void unity_lens_impl_class_init (UnityLensImplClass * klass) {
03969        const gchar* _tmp0_ = NULL;
03970        const gchar* _tmp1_;
03971        unity_lens_impl_parent_class = g_type_class_peek_parent (klass);
03972        g_type_class_add_private (klass, sizeof (UnityLensImplPrivate));
03973        G_OBJECT_CLASS (klass)->get_property = _vala_unity_lens_impl_get_property;
03974        G_OBJECT_CLASS (klass)->finalize = unity_lens_impl_finalize;
03975        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LENS_IMPL_RESULTS_SYNC, g_param_spec_object ("results-sync", "results-sync", "results-sync", UNITY_TYPE_RESULTS_SYNCHRONIZER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
03976        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LENS_IMPL_GLOBAL_RESULTS_SYNC, g_param_spec_object ("global-results-sync", "global-results-sync", "global-results-sync", UNITY_TYPE_RESULTS_SYNCHRONIZER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
03977        _tmp0_ = g_getenv ("LIBUNITY_LENS_DIRECTORY");
03978        unity_lens_impl_LENS_DIRECTORY = _tmp0_;
03979        _tmp1_ = unity_lens_impl_LENS_DIRECTORY;
03980        if (_tmp1_ == NULL) {
03981               unity_lens_impl_LENS_DIRECTORY = "";
03982        }
03983 }
03984 
03985 
03986 static void unity_lens_impl_unity_protocol_lens_service_interface_init (UnityProtocolLensServiceIface * iface) {
03987        unity_lens_impl_unity_protocol_lens_service_parent_iface = g_type_interface_peek_parent (iface);
03988        iface->info_request = (void (*)(UnityProtocolLensService*, GError**)) unity_lens_impl_real_info_request;
03989        iface->info_request_finish = unity_lens_impl_real_info_request_finish;
03990        iface->activate = (void (*)(UnityProtocolLensService*, const gchar*, guint, UnityProtocolActivationReplyRaw*, GError**)) unity_lens_impl_real_activate;
03991        iface->activate_finish = unity_lens_impl_real_activate_finish;
03992        iface->update_preview_property = (GHashTable* (*)(UnityProtocolLensService*, const gchar*, GHashTable*, GError**)) unity_lens_impl_real_update_preview_property;
03993        iface->update_preview_property_finish = unity_lens_impl_real_update_preview_property_finish;
03994        iface->search = (GHashTable* (*)(UnityProtocolLensService*, const gchar*, GHashTable*, GError**)) unity_lens_impl_real_search;
03995        iface->search_finish = unity_lens_impl_real_search_finish;
03996        iface->global_search = (GHashTable* (*)(UnityProtocolLensService*, const gchar*, GHashTable*, GError**)) unity_lens_impl_real_global_search;
03997        iface->global_search_finish = unity_lens_impl_real_global_search_finish;
03998        iface->update_filter = (void (*)(UnityProtocolLensService*, const gchar*, GHashTable*, GError**)) unity_lens_impl_real_update_filter;
03999        iface->update_filter_finish = unity_lens_impl_real_update_filter_finish;
04000        iface->set_view_type = (void (*)(UnityProtocolLensService*, guint, GError**)) unity_lens_impl_real_set_view_type;
04001        iface->set_view_type_finish = unity_lens_impl_real_set_view_type_finish;
04002 }
04003 
04004 
04005 static void unity_lens_impl_instance_init (UnityLensImpl * self) {
04006        self->priv = UNITY_LENS_IMPL_GET_PRIVATE (self);
04007 }
04008 
04009 
04010 static void unity_lens_impl_finalize (GObject* obj) {
04011        UnityLensImpl * self;
04012        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_LENS_IMPL, UnityLensImpl);
04013        _g_object_unref0 (self->priv->_results_model);
04014        _g_object_unref0 (self->priv->_global_results_model);
04015        _g_object_unref0 (self->priv->_categories_model);
04016        _g_object_unref0 (self->priv->_filters_model);
04017        _g_object_unref0 (self->priv->_sources);
04018        _g_object_unref0 (self->priv->_scope_factory);
04019        _g_object_unref0 (self->priv->_filters_sync);
04020        _g_object_unref0 (self->priv->_results_sync);
04021        _g_object_unref0 (self->priv->_global_results_sync);
04022        G_OBJECT_CLASS (unity_lens_impl_parent_class)->finalize (obj);
04023 }
04024 
04025 
04026 GType unity_lens_impl_get_type (void) {
04027        static volatile gsize unity_lens_impl_type_id__volatile = 0;
04028        if (g_once_init_enter (&unity_lens_impl_type_id__volatile)) {
04029               static const GTypeInfo g_define_type_info = { sizeof (UnityLensImplClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_lens_impl_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityLensImpl), 0, (GInstanceInitFunc) unity_lens_impl_instance_init, NULL };
04030               static const GInterfaceInfo unity_protocol_lens_service_info = { (GInterfaceInitFunc) unity_lens_impl_unity_protocol_lens_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
04031               GType unity_lens_impl_type_id;
04032               unity_lens_impl_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityLensImpl", &g_define_type_info, 0);
04033               g_type_add_interface_static (unity_lens_impl_type_id, UNITY_PROTOCOL_TYPE_LENS_SERVICE, &unity_protocol_lens_service_info);
04034               g_once_init_leave (&unity_lens_impl_type_id__volatile, unity_lens_impl_type_id);
04035        }
04036        return unity_lens_impl_type_id__volatile;
04037 }
04038 
04039 
04040 static void _vala_unity_lens_impl_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
04041        UnityLensImpl * self;
04042        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_LENS_IMPL, UnityLensImpl);
04043        switch (property_id) {
04044               case UNITY_LENS_IMPL_RESULTS_SYNC:
04045               g_value_set_object (value, unity_lens_impl_get_results_sync (self));
04046               break;
04047               case UNITY_LENS_IMPL_GLOBAL_RESULTS_SYNC:
04048               g_value_set_object (value, unity_lens_impl_get_global_results_sync (self));
04049               break;
04050               default:
04051               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
04052               break;
04053        }
04054 }
04055 
04056 
04057 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
04058        if ((array != NULL) && (destroy_func != NULL)) {
04059               int i;
04060               for (i = 0; i < array_length; i = i + 1) {
04061                      if (((gpointer*) array)[i] != NULL) {
04062                             destroy_func (((gpointer*) array)[i]);
04063                      }
04064               }
04065        }
04066 }
04067 
04068 
04069 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
04070        _vala_array_destroy (array, array_length, destroy_func);
04071        g_free (array);
04072 }
04073 
04074 
04075 static gint _vala_array_length (gpointer array) {
04076        int length;
04077        length = 0;
04078        if (array) {
04079               while (((gpointer*) array)[length]) {
04080                      length++;
04081               }
04082        }
04083        return length;
04084 }
04085 
04086 
04087