Back to index

libunity  5.92.0
unity-scope-private.c
Go to the documentation of this file.
00001 /* unity-scope-private.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-scope-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 <dee.h>
00028 #include "unity.h"
00029 #include <stdlib.h>
00030 #include <string.h>
00031 #include <gio/gio.h>
00032 #include <time.h>
00033 
00034 
00035 #define UNITY_TYPE_SCOPE_IMPL (unity_scope_impl_get_type ())
00036 #define UNITY_SCOPE_IMPL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_IMPL, UnityScopeImpl))
00037 #define UNITY_SCOPE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_IMPL, UnityScopeImplClass))
00038 #define UNITY_IS_SCOPE_IMPL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_IMPL))
00039 #define UNITY_IS_SCOPE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_IMPL))
00040 #define UNITY_SCOPE_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_IMPL, UnityScopeImplClass))
00041 
00042 typedef struct _UnityScopeImpl UnityScopeImpl;
00043 typedef struct _UnityScopeImplClass UnityScopeImplClass;
00044 typedef struct _UnityScopeImplPrivate UnityScopeImplPrivate;
00045 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00046 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
00047 #define _g_free0(var) (var = (g_free (var), NULL))
00048 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
00049 
00050 #define UNITY_TYPE_FILTER_COLUMN (unity_filter_column_get_type ())
00051 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00052 typedef struct _UnityScopeImplInfoRequestData UnityScopeImplInfoRequestData;
00053 typedef struct _UnityScopeImplActivateData UnityScopeImplActivateData;
00054 typedef struct _UnityScopeImplUpdatePreviewPropertyData UnityScopeImplUpdatePreviewPropertyData;
00055 typedef struct _Block8Data Block8Data;
00056 typedef struct _UnityScopeImplScheduleSearchChangedData UnityScopeImplScheduleSearchChangedData;
00057 typedef struct _Block9Data Block9Data;
00058 typedef struct _UnityScopeImplSearchInternalData UnityScopeImplSearchInternalData;
00059 typedef struct _UnityScopeImplSearchData UnityScopeImplSearchData;
00060 typedef struct _UnityScopeImplGlobalSearchData UnityScopeImplGlobalSearchData;
00061 #define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
00062 typedef struct _UnityScopeImplSetViewTypeData UnityScopeImplSetViewTypeData;
00063 typedef struct _UnityScopeImplSetActiveSourcesData UnityScopeImplSetActiveSourcesData;
00064 
00065 struct _UnityScopeImpl {
00066        GObject parent_instance;
00067        UnityScopeImplPrivate * priv;
00068        DeeSerializableModel* _results_model;
00069        DeeSerializableModel* _global_results_model;
00070        DeeSerializableModel* _filters_model;
00071 };
00072 
00073 struct _UnityScopeImplClass {
00074        GObjectClass parent_class;
00075 };
00076 
00077 struct _UnityScopeImplPrivate {
00078        UnityScope* _owner;
00079        guint _dbus_id;
00080        guint _info_changed_id;
00081        guint _filters_changed_id;
00082        GHashTable* _action_map;
00083        UnityPreview* _last_preview;
00084        UnityProtocolViewType _view_type;
00085        GCancellable** cancellable_arr;
00086        gint cancellable_arr_length1;
00087        gint _cancellable_arr_size_;
00088        gchar** search_keys;
00089        gint search_keys_length1;
00090        gint _search_keys_size_;
00091 };
00092 
00093 typedef enum  {
00094        UNITY_FILTER_COLUMN_ID = 0,
00095        UNITY_FILTER_COLUMN_NAME,
00096        UNITY_FILTER_COLUMN_ICON_HINT,
00097        UNITY_FILTER_COLUMN_RENDERER_NAME,
00098        UNITY_FILTER_COLUMN_RENDERER_STATE,
00099        UNITY_FILTER_COLUMN_VISIBLE,
00100        UNITY_FILTER_COLUMN_COLLAPSED,
00101        UNITY_FILTER_COLUMN_FILTERING
00102 } UnityFilterColumn;
00103 
00104 struct _UnityScopeImplInfoRequestData {
00105        int _state_;
00106        GObject* _source_object_;
00107        GAsyncResult* _res_;
00108        GSimpleAsyncResult* _async_result;
00109        UnityScopeImpl* self;
00110 };
00111 
00112 struct _UnityScopeImplActivateData {
00113        int _state_;
00114        GObject* _source_object_;
00115        GAsyncResult* _res_;
00116        GSimpleAsyncResult* _async_result;
00117        UnityScopeImpl* self;
00118        gchar* uri;
00119        guint action_type;
00120        UnityProtocolActivationReplyRaw result;
00121        UnityProtocolActivationReplyRaw reply;
00122        UnityActivationResponse* response;
00123        UnityPreview* preview;
00124        gchar* stripped_uri;
00125        guint _tmp0_;
00126        UnityProtocolActionType action;
00127        UnityProtocolActionType _tmp1_;
00128        UnityScope* _tmp2_;
00129        const gchar* _tmp3_;
00130        UnityActivationResponse* _tmp4_;
00131        const gchar* _tmp5_;
00132        UnityPreview* _tmp6_;
00133        const gchar* _tmp7_;
00134        gchar** _tmp8_;
00135        gchar** _tmp9_;
00136        gchar** tokens;
00137        gint tokens_length1;
00138        gint _tokens_size_;
00139        gchar** _tmp10_;
00140        gint _tmp10__length1;
00141        const gchar* _tmp11_;
00142        gchar* _tmp12_;
00143        gchar** _tmp13_;
00144        gint _tmp13__length1;
00145        const gchar* _tmp14_;
00146        const gchar* _tmp15_;
00147        UnityActivationResponse* _tmp16_;
00148        guint _tmp17_;
00149        gboolean _tmp18_;
00150        UnityActivationResponse* _tmp19_;
00151        UnityActivationResponse* _tmp20_;
00152        UnityHandledType _tmp21_;
00153        UnityHandledType _tmp22_;
00154        gboolean _tmp23_;
00155        UnityActivationResponse* _tmp24_;
00156        UnityPreview* _tmp25_;
00157        UnityActivationResponse* _tmp26_;
00158        const gchar* _tmp27_;
00159        const gchar* _tmp28_;
00160        gchar* _tmp29_;
00161        gchar* new_uri;
00162        gboolean _tmp30_;
00163        const gchar* _tmp31_;
00164        const gchar* _tmp32_;
00165        gchar _tmp33_;
00166        gboolean _tmp34_;
00167        const gchar* _tmp35_;
00168        gchar* _tmp36_;
00169        gchar* _tmp37_;
00170        const gchar* _tmp38_;
00171        const gchar* _tmp39_;
00172        gchar* _tmp40_;
00173        const gchar* _tmp41_;
00174        gchar* _tmp42_;
00175        const gchar* _tmp43_;
00176        UnityProtocolActivationReplyRaw _tmp44_;
00177        UnityProtocolActivationReplyRaw _tmp45_;
00178        UnityPreview* _tmp46_;
00179        UnityPreview* _tmp47_;
00180        UnityPreview* _tmp48_;
00181        UnityActivationResponse* _tmp49_;
00182        UnityActivationResponse* _tmp50_;
00183        UnityPreview* _tmp51_;
00184        UnityActivationResponse* _tmp52_;
00185        UnityActivationResponse* _tmp53_;
00186        const gchar* _tmp54_;
00187        gchar* _tmp55_;
00188        gchar* _tmp56_;
00189        const gchar* _tmp57_;
00190        const gchar* _tmp58_;
00191        gchar* _tmp59_;
00192        const gchar* _tmp60_;
00193        gchar* _tmp61_;
00194        UnityActivationResponse* _tmp62_;
00195        UnityHandledType _tmp63_;
00196        UnityHandledType _tmp64_;
00197        UnityActivationResponse* _tmp65_;
00198        GHashTable* _tmp66_;
00199        GError * _inner_error_;
00200 };
00201 
00202 struct _UnityScopeImplUpdatePreviewPropertyData {
00203        int _state_;
00204        GObject* _source_object_;
00205        GAsyncResult* _res_;
00206        GSimpleAsyncResult* _async_result;
00207        UnityScopeImpl* self;
00208        gchar* uri;
00209        GHashTable* values;
00210        GHashTable* result;
00211        GHashTable* response;
00212        UnityPreview* _tmp0_;
00213        UnityPreview* _tmp1_;
00214        GHashTable* _tmp2_;
00215        GHashTable* _tmp3_;
00216        GHashFunc _tmp4_;
00217        GEqualFunc _tmp5_;
00218        GHashTable* _tmp6_;
00219 };
00220 
00221 struct _Block8Data {
00222        int _ref_count_;
00223        UnityScopeImpl * self;
00224        UnitySearchType search_type;
00225        gpointer _async_data_;
00226 };
00227 
00228 struct _UnityScopeImplScheduleSearchChangedData {
00229        int _state_;
00230        GObject* _source_object_;
00231        GAsyncResult* _res_;
00232        GSimpleAsyncResult* _async_result;
00233        UnityScopeImpl* self;
00234        UnityLensSearch* search;
00235        UnitySearchType search_type;
00236        gboolean wait_for_view;
00237        Block8Data* _data8_;
00238        UnitySearchType _tmp0_;
00239        UnitySearchType _tmp1_;
00240        gboolean _tmp2_;
00241        gboolean _tmp3_;
00242        gboolean _tmp4_;
00243        gboolean _tmp5_;
00244        UnitySearchType _tmp6_;
00245        UnityProtocolViewType _tmp7_;
00246        gboolean _tmp8_;
00247        gboolean _tmp9_;
00248        UnitySearchType _tmp10_;
00249        UnityProtocolViewType _tmp11_;
00250        gboolean _tmp12_;
00251        gboolean _tmp13_;
00252        gboolean _tmp14_;
00253        gboolean waiting_needed;
00254        GCancellable** _tmp15_;
00255        gint _tmp15__length1;
00256        UnitySearchType _tmp16_;
00257        GCancellable* _tmp17_;
00258        GCancellable** _tmp18_;
00259        gint _tmp18__length1;
00260        UnitySearchType _tmp19_;
00261        GCancellable* _tmp20_;
00262        GCancellable* _tmp21_;
00263        GCancellable* cancellable;
00264        GCancellable** _tmp22_;
00265        gint _tmp22__length1;
00266        UnitySearchType _tmp23_;
00267        GCancellable* _tmp24_;
00268        GCancellable* _tmp25_;
00269        GCancellable* _tmp26_;
00270        gboolean _tmp27_;
00271        gulong _tmp28_;
00272        gulong view_sig_id;
00273        gulong _tmp29_;
00274        GCancellable* _tmp30_;
00275        gboolean _tmp31_;
00276        UnityScope* _tmp32_;
00277        UnityLensSearch* _tmp33_;
00278        UnitySearchType _tmp34_;
00279        GCancellable* _tmp35_;
00280 };
00281 
00282 struct _Block9Data {
00283        int _ref_count_;
00284        UnityScopeImpl * self;
00285        GHashTable* _result_;
00286        UnityLensSearch* s;
00287        gulong sig_id;
00288        gpointer _async_data_;
00289 };
00290 
00291 struct _UnityScopeImplSearchInternalData {
00292        int _state_;
00293        GObject* _source_object_;
00294        GAsyncResult* _res_;
00295        GSimpleAsyncResult* _async_result;
00296        UnityScopeImpl* self;
00297        gchar* search_string;
00298        GHashTable* hints;
00299        UnitySearchType search_type;
00300        GHashTable* result;
00301        Block9Data* _data9_;
00302        GHashFunc _tmp0_;
00303        GEqualFunc _tmp1_;
00304        GHashTable* _tmp2_;
00305        UnitySearchType _tmp3_;
00306        gboolean is_global_search;
00307        DeeSerializableModel* _tmp4_;
00308        gboolean _tmp5_;
00309        DeeSerializableModel* _tmp6_;
00310        DeeSerializableModel* _tmp7_;
00311        const gchar* _tmp8_;
00312        GHashTable* _tmp9_;
00313        DeeSerializableModel* _tmp10_;
00314        UnityLensSearch* _tmp11_;
00315        UnityLensSearch* _tmp12_;
00316        gulong _tmp13_;
00317        UnityLensSearch* last_search;
00318        gulong ls_sig_id;
00319        UnityLensSearch* _tmp14_;
00320        UnitySearchType _tmp15_;
00321        gchar* _tmp16_;
00322        gchar* search_key;
00323        gboolean _tmp17_;
00324        gboolean _tmp18_;
00325        const gchar* _tmp19_;
00326        const gchar* _tmp20_;
00327        gchar** _tmp21_;
00328        gint _tmp21__length1;
00329        UnitySearchType _tmp22_;
00330        const gchar* _tmp23_;
00331        gboolean _tmp24_;
00332        gboolean _tmp25_;
00333        const gchar* _tmp26_;
00334        UnityLensSearch* _tmp27_;
00335        UnityScope* _tmp28_;
00336        UnitySearchType _tmp29_;
00337        UnityLensSearch* _tmp30_;
00338        gboolean _tmp31_;
00339        gboolean _tmp32_;
00340        gboolean _tmp33_;
00341        UnityLensSearch* _tmp34_;
00342        UnitySearchType _tmp35_;
00343        gchar** _tmp36_;
00344        gint _tmp36__length1;
00345        UnitySearchType _tmp37_;
00346        const gchar* _tmp38_;
00347        gchar* _tmp39_;
00348        gchar* _tmp40_;
00349        UnityScope* _tmp41_;
00350        UnityLensSearch* _tmp42_;
00351        UnitySearchType _tmp43_;
00352        UnityScope* _tmp44_;
00353        UnitySearchType _tmp45_;
00354        UnityLensSearch* _tmp46_;
00355        UnityLensSearch* _tmp47_;
00356        gboolean _tmp48_;
00357        UnityLensSearch* _tmp49_;
00358        UnityLensSearch* _tmp50_;
00359        gboolean _tmp51_;
00360        gboolean _tmp52_;
00361        UnityLensSearch* _tmp53_;
00362        gulong _tmp54_;
00363        UnityProtocolViewType _tmp55_;
00364        gboolean _tmp56_;
00365        UnityProtocolViewType _tmp57_;
00366        UnityProtocolViewType current_view;
00367        UnityProtocolViewType _tmp58_;
00368        UnityProtocolViewType _tmp59_;
00369        UnityProtocolViewType _tmp60_;
00370        UnityProtocolViewType old_view;
00371        UnityProtocolViewType _tmp61_;
00372        UnityProtocolViewType _tmp62_;
00373        GHashTable* _tmp63_;
00374        GHashTable* _tmp64_;
00375        GCancellable** _tmp65_;
00376        gint _tmp65__length1;
00377        UnitySearchType _tmp66_;
00378        GCancellable* _tmp67_;
00379        GCancellable* _tmp68_;
00380        GCancellable* cancellable;
00381        GCancellable* _tmp69_;
00382        gulong _tmp70_;
00383        gulong canc_id;
00384        gulong _tmp71_;
00385        UnityLensSearch* _tmp72_;
00386        gulong _tmp73_;
00387        UnityLensSearch* _tmp74_;
00388        gulong _tmp75_;
00389        GCancellable* _tmp76_;
00390        gulong _tmp77_;
00391        GCancellable* _tmp78_;
00392        gboolean _tmp79_;
00393        const gchar* _tmp80_;
00394        GError* _tmp81_;
00395        GHashTable* _tmp82_;
00396        GHashTable* _tmp83_;
00397        GError * _inner_error_;
00398 };
00399 
00400 struct _UnityScopeImplSearchData {
00401        int _state_;
00402        GObject* _source_object_;
00403        GAsyncResult* _res_;
00404        GSimpleAsyncResult* _async_result;
00405        UnityScopeImpl* self;
00406        gchar* search_string;
00407        GHashTable* hints;
00408        GHashTable* result;
00409        GHashTable* _result_;
00410        const gchar* _tmp0_;
00411        GHashTable* _tmp1_;
00412        GHashTable* _tmp2_;
00413        GHashTable* _tmp3_;
00414        GError * _inner_error_;
00415 };
00416 
00417 struct _UnityScopeImplGlobalSearchData {
00418        int _state_;
00419        GObject* _source_object_;
00420        GAsyncResult* _res_;
00421        GSimpleAsyncResult* _async_result;
00422        UnityScopeImpl* self;
00423        gchar* search_string;
00424        GHashTable* hints;
00425        GHashTable* result;
00426        GHashTable* _result_;
00427        const gchar* _tmp0_;
00428        GHashTable* _tmp1_;
00429        GHashTable* _tmp2_;
00430        GHashTable* _tmp3_;
00431        GError * _inner_error_;
00432 };
00433 
00434 struct _UnityScopeImplSetViewTypeData {
00435        int _state_;
00436        GObject* _source_object_;
00437        GAsyncResult* _res_;
00438        GSimpleAsyncResult* _async_result;
00439        UnityScopeImpl* self;
00440        guint view_type_id;
00441        guint _tmp0_;
00442        UnityProtocolViewType view_type;
00443        UnityProtocolViewType _tmp1_;
00444        gboolean _tmp2_;
00445        UnityProtocolViewType _tmp3_;
00446        gboolean _tmp4_;
00447        UnityProtocolViewType _tmp5_;
00448        UnityScope* _tmp6_;
00449        gboolean _tmp7_;
00450        gboolean _tmp8_;
00451        gboolean _tmp9_;
00452        UnityScope* _tmp10_;
00453        gboolean _tmp11_;
00454 };
00455 
00456 struct _UnityScopeImplSetActiveSourcesData {
00457        int _state_;
00458        GObject* _source_object_;
00459        GAsyncResult* _res_;
00460        GSimpleAsyncResult* _async_result;
00461        UnityScopeImpl* self;
00462        gchar** sources;
00463        gint sources_length1;
00464        UnityScope* _tmp0_;
00465        gchar** _tmp1_;
00466        gint _tmp1__length1;
00467 };
00468 
00469 
00470 static gpointer unity_scope_impl_parent_class = NULL;
00471 static UnityProtocolScopeServiceIface* unity_scope_impl_unity_protocol_scope_service_parent_iface = NULL;
00472 
00473 GType unity_scope_impl_get_type (void) G_GNUC_CONST;
00474 #define UNITY_SCOPE_IMPL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_SCOPE_IMPL, UnityScopeImplPrivate))
00475 enum  {
00476        UNITY_SCOPE_IMPL_DUMMY_PROPERTY,
00477        UNITY_SCOPE_IMPL_OWNER,
00478        UNITY_SCOPE_IMPL_VIEW_TYPE
00479 };
00480 UnityScopeImpl* unity_scope_impl_new (UnityScope* owner);
00481 UnityScopeImpl* unity_scope_impl_construct (GType object_type, UnityScope* owner);
00482 static gchar* unity_scope_impl_create_dbus_name (UnityScopeImpl* self);
00483 static UnityScope* unity_scope_impl_get_owner (UnityScopeImpl* self);
00484 static void unity_scope_impl_create_models (UnityScopeImpl* self);
00485 static void unity_scope_impl_on_filter_added (UnityScopeImpl* self, DeeModel* model, DeeModelIter* iter);
00486 static void _unity_scope_impl_on_filter_added_dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00487 static void unity_scope_impl_on_filter_changed (UnityScopeImpl* self, DeeModel* model, DeeModelIter* iter);
00488 static void _unity_scope_impl_on_filter_changed_dee_model_row_changed (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00489 static void unity_scope_impl_on_filter_removed (UnityScopeImpl* self, DeeModel* model, DeeModelIter* iter);
00490 static void _unity_scope_impl_on_filter_removed_dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self);
00491 static void unity_scope_impl_create_shared_models (UnityScopeImpl* self, const gchar* dbus_name);
00492 void unity_scope_impl_export (UnityScopeImpl* self, GError** error);
00493 static void unity_scope_impl_queue_info_changed (UnityScopeImpl* self);
00494 static gboolean unity_scope_impl_emit_info_changed (UnityScopeImpl* self);
00495 static gboolean _unity_scope_impl_emit_info_changed_gsource_func (gpointer self);
00496 static void unity_scope_impl_queue_filters_changed (UnityScopeImpl* self);
00497 static gboolean unity_scope_impl_emit_filters_changed (UnityScopeImpl* self);
00498 static gboolean _unity_scope_impl_emit_filters_changed_gsource_func (gpointer self);
00499 static gchar* unity_scope_impl_get_model_name (UnityScopeImpl* self, DeeSerializableModel* model);
00500 GHashTable* unity_filter_get_hints (UnityFilter* self);
00501 static GVariant* _variant_new25 (GHashTable* value);
00502 static void _g_free0_ (gpointer var);
00503 static void _g_variant_unref0_ (gpointer var);
00504 GType unity_filter_column_get_type (void) G_GNUC_CONST;
00505 #define UNITY_LENS_SOURCES_FILTER_ID "unity-sources"
00506 void unity_filter_set_filtering (UnityFilter* self, gboolean value);
00507 UnityFilterRenderer unity_filter_renderer_for_name (const gchar* renderer_name);
00508 void unity_filter_set_model_and_iter (UnityFilter* self, DeeModel* model, DeeModelIter* iter);
00509 static void unity_scope_impl_real_info_request_data_free (gpointer _data);
00510 static void unity_scope_impl_real_info_request (UnityProtocolScopeService* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
00511 static gboolean unity_scope_impl_real_info_request_co (UnityScopeImplInfoRequestData* _data_);
00512 static void unity_scope_impl_real_activate_data_free (gpointer _data);
00513 static void unity_scope_impl_real_activate (UnityProtocolScopeService* base, const gchar* uri, guint action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00514 static gboolean unity_scope_impl_real_activate_co (UnityScopeImplActivateData* _data_);
00515 UnityPreview* unity_scope_impl_preview_internal (UnityScopeImpl* self, const gchar* uri);
00516 UnityActivationResponse* unity_scope_impl_activate_action (UnityScopeImpl* self, const gchar* action_id, const gchar* uri);
00517 UnityPreview* unity_activation_response_get_preview (UnityActivationResponse* self);
00518 static void unity_scope_impl_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00519 void unity_activation_response_set_preview (UnityActivationResponse* self, UnityPreview* preview);
00520 GHashTable* unity_activation_response_get_hints (UnityActivationResponse* self);
00521 static void unity_scope_impl_real_update_preview_property_data_free (gpointer _data);
00522 static void unity_scope_impl_real_update_preview_property (UnityProtocolScopeService* base, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00523 static gboolean unity_scope_impl_real_update_preview_property_co (UnityScopeImplUpdatePreviewPropertyData* _data_);
00524 GHashTable* unity_preview_update_property (UnityPreview* self, GHashTable* values);
00525 static void unity_scope_impl_schedule_search_changed_data_free (gpointer _data);
00526 void unity_scope_impl_schedule_search_changed (UnityScopeImpl* self, UnityLensSearch* search, UnitySearchType search_type, gboolean wait_for_view, GAsyncReadyCallback _callback_, gpointer _user_data_);
00527 void unity_scope_impl_schedule_search_changed_finish (UnityScopeImpl* self, GAsyncResult* _res_);
00528 static gboolean unity_scope_impl_schedule_search_changed_co (UnityScopeImplScheduleSearchChangedData* _data_);
00529 static Block8Data* block8_data_ref (Block8Data* _data8_);
00530 static void block8_data_unref (void * _userdata_);
00531 UnityProtocolViewType unity_scope_impl_get_view_type (UnityScopeImpl* self);
00532 static void ___lambda5_ (Block8Data* _data8_);
00533 static void ____lambda5__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00534 static gboolean _unity_scope_impl_schedule_search_changed_co_gsource_func (gpointer self);
00535 void unity_scope_impl_update_search_key (UnityScopeImpl* self, UnityLensSearch* ls, UnitySearchType search_type);
00536 static gchar* unity_scope_impl_get_search_key (UnityScopeImpl* self, UnityLensSearch* ls, UnitySearchType search_type);
00537 void unity_scope_set_last_search (UnityScope* self, UnityLensSearch* search, UnitySearchType search_type);
00538 void unity_scope_impl_invalidate_search (UnityScopeImpl* self, UnitySearchType search_type);
00539 static void unity_scope_impl_search_internal_data_free (gpointer _data);
00540 static void unity_scope_impl_search_internal (UnityScopeImpl* self, const gchar* search_string, GHashTable* hints, UnitySearchType search_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00541 static GHashTable* unity_scope_impl_search_internal_finish (UnityScopeImpl* self, GAsyncResult* _res_, GError** error);
00542 static gboolean unity_scope_impl_search_internal_co (UnityScopeImplSearchInternalData* _data_);
00543 static Block9Data* block9_data_ref (Block9Data* _data9_);
00544 static void block9_data_unref (void * _userdata_);
00545 static void __lambda6_ (Block9Data* _data9_, UnityLensSearch* lens_search);
00546 GHashTable* unity_lens_search_get_reply_hints (UnityLensSearch* self);
00547 static void ___lambda6__unity_lens_search_finished (UnityLensSearch* _sender, gpointer self);
00548 UnityLensSearch* unity_scope_get_last_search (UnityScope* self, UnitySearchType search_type);
00549 gboolean unity_lens_search_was_finished (UnityLensSearch* self);
00550 static void ____lambda7_ (Block9Data* _data9_);
00551 static void _____lambda7__unity_lens_search_finished (UnityLensSearch* _sender, gpointer self);
00552 static void __lambda8_ (Block9Data* _data9_);
00553 static gboolean _unity_scope_impl_search_internal_co_gsource_func (gpointer self);
00554 static void ___lambda8__gfunc (gconstpointer data, gpointer self);
00555 static void unity_scope_impl_real_search_data_free (gpointer _data);
00556 static void unity_scope_impl_real_search (UnityProtocolScopeService* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00557 static gboolean unity_scope_impl_real_search_co (UnityScopeImplSearchData* _data_);
00558 static void unity_scope_impl_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00559 static void unity_scope_impl_real_global_search_data_free (gpointer _data);
00560 static void unity_scope_impl_real_global_search (UnityProtocolScopeService* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00561 static gboolean unity_scope_impl_real_global_search_co (UnityScopeImplGlobalSearchData* _data_);
00562 static void unity_scope_impl_global_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00563 GPtrArray* unity_preview_get_actions (UnityPreview* self);
00564 static void unity_scope_impl_real_set_view_type_data_free (gpointer _data);
00565 static void unity_scope_impl_real_set_view_type (UnityProtocolScopeService* base, guint view_type_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
00566 static gboolean unity_scope_impl_real_set_view_type_co (UnityScopeImplSetViewTypeData* _data_);
00567 void unity_scope_impl_set_view_type (UnityScopeImpl* self, UnityProtocolViewType value);
00568 static void unity_scope_impl_real_set_active_sources_data_free (gpointer _data);
00569 static void unity_scope_impl_real_set_active_sources (UnityProtocolScopeService* base, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
00570 static gboolean unity_scope_impl_real_set_active_sources_co (UnityScopeImplSetActiveSourcesData* _data_);
00571 void unity_scope_set_active_sources_internal (UnityScope* self, gchar** active_sources_, int active_sources__length1);
00572 static void unity_scope_impl_set_owner (UnityScopeImpl* self, UnityScope* value);
00573 static GObject * unity_scope_impl_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00574 static void _unity_scope_impl_queue_info_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00575 static void _unity_scope_impl_queue_info_changed_unity_filter_changed (UnityFilter* _sender, gpointer self);
00576 static void _g_object_unref0_ (gpointer var);
00577 static void unity_scope_impl_finalize (GObject* obj);
00578 static void _vala_unity_scope_impl_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00579 static void _vala_unity_scope_impl_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00580 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00581 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00582 static gint _vala_array_length (gpointer array);
00583 
00584 
00585 UnityScopeImpl* unity_scope_impl_construct (GType object_type, UnityScope* owner) {
00586        UnityScopeImpl * self = NULL;
00587        UnityScope* _tmp0_;
00588        g_return_val_if_fail (owner != NULL, NULL);
00589        _tmp0_ = owner;
00590        self = (UnityScopeImpl*) g_object_new (object_type, "owner", _tmp0_, NULL);
00591        return self;
00592 }
00593 
00594 
00595 UnityScopeImpl* unity_scope_impl_new (UnityScope* owner) {
00596        return unity_scope_impl_construct (UNITY_TYPE_SCOPE_IMPL, owner);
00597 }
00598 
00599 
00600 static gchar* unity_scope_impl_create_dbus_name (UnityScopeImpl* self) {
00601        gchar* result = NULL;
00602        time_t _tmp0_;
00603        guint t;
00604        UnityScope* _tmp1_;
00605        const gchar* _tmp2_;
00606        const gchar* _tmp3_;
00607        gchar* _tmp4_;
00608        gchar* dbus_path;
00609        gchar* _tmp5_;
00610        gchar* dbus_name;
00611        const gchar* _tmp6_;
00612        gchar* _tmp7_ = NULL;
00613        gchar* _tmp8_;
00614        gchar* _tmp9_;
00615        gchar* _tmp10_;
00616        gchar* _tmp11_;
00617        const gchar* _tmp12_;
00618        gchar* _tmp13_ = NULL;
00619        gchar* _tmp14_;
00620        gchar* _tmp15_;
00621        g_return_val_if_fail (self != NULL, NULL);
00622        _tmp0_ = time (NULL);
00623        t = (guint) _tmp0_;
00624        _tmp1_ = self->priv->_owner;
00625        _tmp2_ = unity_scope_get_dbus_path (_tmp1_);
00626        _tmp3_ = _tmp2_;
00627        _tmp4_ = g_strdup (_tmp3_);
00628        dbus_path = _tmp4_;
00629        _tmp5_ = g_strdup ("com.canonical.Unity.Scope");
00630        dbus_name = _tmp5_;
00631        _tmp6_ = dbus_name;
00632        _tmp7_ = g_path_get_basename (dbus_path);
00633        _tmp8_ = _tmp7_;
00634        _tmp9_ = g_strconcat (".", _tmp8_, NULL);
00635        _tmp10_ = _tmp9_;
00636        _tmp11_ = g_strconcat (_tmp6_, _tmp10_, NULL);
00637        _g_free0 (dbus_name);
00638        dbus_name = _tmp11_;
00639        _g_free0 (_tmp10_);
00640        _g_free0 (_tmp8_);
00641        _tmp12_ = dbus_name;
00642        _tmp13_ = g_strdup_printf (".T%u", t);
00643        _tmp14_ = _tmp13_;
00644        _tmp15_ = g_strconcat (_tmp12_, _tmp14_, NULL);
00645        _g_free0 (dbus_name);
00646        dbus_name = _tmp15_;
00647        _g_free0 (_tmp14_);
00648        result = dbus_name;
00649        _g_free0 (dbus_path);
00650        return result;
00651 }
00652 
00653 
00654 static void _unity_scope_impl_on_filter_added_dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
00655        unity_scope_impl_on_filter_added (self, _sender, iter);
00656 }
00657 
00658 
00659 static void _unity_scope_impl_on_filter_changed_dee_model_row_changed (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
00660        unity_scope_impl_on_filter_changed (self, _sender, iter);
00661 }
00662 
00663 
00664 static void _unity_scope_impl_on_filter_removed_dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self) {
00665        unity_scope_impl_on_filter_removed (self, _sender, iter);
00666 }
00667 
00668 
00669 static void unity_scope_impl_create_models (UnityScopeImpl* self) {
00670        DeeSequenceModel* _tmp0_;
00671        DeeSerializableModel* _tmp1_;
00672        DeeSequenceModel* _tmp2_;
00673        DeeSerializableModel* _tmp3_;
00674        DeeSequenceModel* _tmp4_;
00675        DeeSerializableModel* _tmp5_;
00676        DeeSerializableModel* _tmp6_;
00677        DeeSerializableModel* _tmp7_;
00678        DeeSerializableModel* _tmp8_;
00679        g_return_if_fail (self != NULL);
00680        _tmp0_ = (DeeSequenceModel*) dee_sequence_model_new ();
00681        _g_object_unref0 (self->_results_model);
00682        self->_results_model = (DeeSerializableModel*) _tmp0_;
00683        _tmp1_ = self->_results_model;
00684        dee_model_set_schema ((DeeModel*) _tmp1_, "s", "s", "u", "s", "s", "s", "s", NULL);
00685        _tmp2_ = (DeeSequenceModel*) dee_sequence_model_new ();
00686        _g_object_unref0 (self->_global_results_model);
00687        self->_global_results_model = (DeeSerializableModel*) _tmp2_;
00688        _tmp3_ = self->_global_results_model;
00689        dee_model_set_schema ((DeeModel*) _tmp3_, "s", "s", "u", "s", "s", "s", "s", NULL);
00690        _tmp4_ = (DeeSequenceModel*) dee_sequence_model_new ();
00691        _g_object_unref0 (self->_filters_model);
00692        self->_filters_model = (DeeSerializableModel*) _tmp4_;
00693        _tmp5_ = self->_filters_model;
00694        dee_model_set_schema ((DeeModel*) _tmp5_, "s", "s", "s", "s", "a{sv}", "b", "b", "b", NULL);
00695        _tmp6_ = self->_filters_model;
00696        g_signal_connect_object ((DeeModel*) _tmp6_, "row-added", (GCallback) _unity_scope_impl_on_filter_added_dee_model_row_added, self, 0);
00697        _tmp7_ = self->_filters_model;
00698        g_signal_connect_object ((DeeModel*) _tmp7_, "row-changed", (GCallback) _unity_scope_impl_on_filter_changed_dee_model_row_changed, self, 0);
00699        _tmp8_ = self->_filters_model;
00700        g_signal_connect_object ((DeeModel*) _tmp8_, "row-removed", (GCallback) _unity_scope_impl_on_filter_removed_dee_model_row_removed, self, 0);
00701 }
00702 
00703 
00704 static gpointer _g_object_ref0 (gpointer self) {
00705        return self ? g_object_ref (self) : NULL;
00706 }
00707 
00708 
00709 static void unity_scope_impl_create_shared_models (UnityScopeImpl* self, const gchar* dbus_name) {
00710        DeeSerializableModel* _tmp0_;
00711        DeeSerializableModel* _tmp1_;
00712        DeeSerializableModel* backend;
00713        const gchar* _tmp2_;
00714        gchar* _tmp3_;
00715        gchar* _tmp4_;
00716        DeeSerializableModel* _tmp5_;
00717        DeeModel* _tmp6_;
00718        DeeSharedModel* _tmp7_;
00719        DeeSerializableModel* _tmp8_;
00720        DeeSerializableModel* _tmp9_;
00721        const gchar* _tmp10_;
00722        gchar* _tmp11_;
00723        gchar* _tmp12_;
00724        DeeSerializableModel* _tmp13_;
00725        DeeModel* _tmp14_;
00726        DeeSharedModel* _tmp15_;
00727        DeeSerializableModel* _tmp16_;
00728        DeeSerializableModel* _tmp17_;
00729        DeeSerializableModel* _tmp18_;
00730        guint _tmp19_ = 0U;
00731        DeeSerializableModel* _tmp20_;
00732        guint _tmp21_ = 0U;
00733        DeeSerializableModel* _tmp22_;
00734        guint _tmp23_ = 0U;
00735        const gchar* _tmp24_;
00736        gchar* _tmp25_;
00737        gchar* _tmp26_;
00738        DeeSerializableModel* _tmp27_;
00739        DeeModel* _tmp28_;
00740        DeeSharedModel* _tmp29_;
00741        DeeSerializableModel* _tmp30_;
00742        DeeSerializableModel* _tmp31_;
00743        DeeSerializableModel* _tmp32_;
00744        g_return_if_fail (self != NULL);
00745        g_return_if_fail (dbus_name != NULL);
00746        _tmp0_ = self->_results_model;
00747        _tmp1_ = _g_object_ref0 (_tmp0_);
00748        backend = _tmp1_;
00749        _tmp2_ = dbus_name;
00750        _tmp3_ = g_strconcat (_tmp2_, ".Results", NULL);
00751        _tmp4_ = _tmp3_;
00752        _tmp5_ = backend;
00753        _tmp6_ = _g_object_ref0 ((DeeModel*) _tmp5_);
00754        _tmp7_ = (DeeSharedModel*) dee_shared_model_new_with_back_end (_tmp4_, _tmp6_);
00755        _g_object_unref0 (self->_results_model);
00756        self->_results_model = (DeeSerializableModel*) _tmp7_;
00757        _g_free0 (_tmp4_);
00758        _tmp8_ = self->_global_results_model;
00759        _tmp9_ = _g_object_ref0 (_tmp8_);
00760        _g_object_unref0 (backend);
00761        backend = _tmp9_;
00762        _tmp10_ = dbus_name;
00763        _tmp11_ = g_strconcat (_tmp10_, ".GlobalResults", NULL);
00764        _tmp12_ = _tmp11_;
00765        _tmp13_ = backend;
00766        _tmp14_ = _g_object_ref0 ((DeeModel*) _tmp13_);
00767        _tmp15_ = (DeeSharedModel*) dee_shared_model_new_with_back_end (_tmp12_, _tmp14_);
00768        _g_object_unref0 (self->_global_results_model);
00769        self->_global_results_model = (DeeSerializableModel*) _tmp15_;
00770        _g_free0 (_tmp12_);
00771        _tmp16_ = self->_filters_model;
00772        _tmp17_ = _g_object_ref0 (_tmp16_);
00773        _g_object_unref0 (backend);
00774        backend = _tmp17_;
00775        _tmp18_ = backend;
00776        g_signal_parse_name ("row-added", dee_model_get_type (), &_tmp19_, NULL, FALSE);
00777        g_signal_handlers_disconnect_matched ((DeeModel*) _tmp18_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp19_, 0, NULL, (GCallback) _unity_scope_impl_on_filter_added_dee_model_row_added, self);
00778        _tmp20_ = backend;
00779        g_signal_parse_name ("row-changed", dee_model_get_type (), &_tmp21_, NULL, FALSE);
00780        g_signal_handlers_disconnect_matched ((DeeModel*) _tmp20_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp21_, 0, NULL, (GCallback) _unity_scope_impl_on_filter_changed_dee_model_row_changed, self);
00781        _tmp22_ = backend;
00782        g_signal_parse_name ("row-removed", dee_model_get_type (), &_tmp23_, NULL, FALSE);
00783        g_signal_handlers_disconnect_matched ((DeeModel*) _tmp22_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp23_, 0, NULL, (GCallback) _unity_scope_impl_on_filter_removed_dee_model_row_removed, self);
00784        _tmp24_ = dbus_name;
00785        _tmp25_ = g_strconcat (_tmp24_, ".Filters", NULL);
00786        _tmp26_ = _tmp25_;
00787        _tmp27_ = backend;
00788        _tmp28_ = _g_object_ref0 ((DeeModel*) _tmp27_);
00789        _tmp29_ = (DeeSharedModel*) dee_shared_model_new_with_back_end (_tmp26_, _tmp28_);
00790        _g_object_unref0 (self->_filters_model);
00791        self->_filters_model = (DeeSerializableModel*) _tmp29_;
00792        _g_free0 (_tmp26_);
00793        _tmp30_ = self->_filters_model;
00794        g_signal_connect_object ((DeeModel*) _tmp30_, "row-added", (GCallback) _unity_scope_impl_on_filter_added_dee_model_row_added, self, 0);
00795        _tmp31_ = self->_filters_model;
00796        g_signal_connect_object ((DeeModel*) _tmp31_, "row-changed", (GCallback) _unity_scope_impl_on_filter_changed_dee_model_row_changed, self, 0);
00797        _tmp32_ = self->_filters_model;
00798        g_signal_connect_object ((DeeModel*) _tmp32_, "row-removed", (GCallback) _unity_scope_impl_on_filter_removed_dee_model_row_removed, self, 0);
00799        _g_object_unref0 (backend);
00800 }
00801 
00802 
00803 void unity_scope_impl_export (UnityScopeImpl* self, GError** error) {
00804        gchar* _tmp0_ = NULL;
00805        gchar* _tmp1_;
00806        GDBusConnection* _tmp2_ = NULL;
00807        GDBusConnection* conn;
00808        GDBusConnection* _tmp3_;
00809        UnityScope* _tmp4_;
00810        const gchar* _tmp5_;
00811        const gchar* _tmp6_;
00812        guint _tmp7_ = 0U;
00813        guint _tmp8_;
00814        GError * _inner_error_ = NULL;
00815        g_return_if_fail (self != NULL);
00816        _tmp0_ = unity_scope_impl_create_dbus_name (self);
00817        _tmp1_ = _tmp0_;
00818        unity_scope_impl_create_shared_models (self, _tmp1_);
00819        _g_free0 (_tmp1_);
00820        _tmp2_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
00821        conn = _tmp2_;
00822        if (_inner_error_ != NULL) {
00823               if (_inner_error_->domain == G_IO_ERROR) {
00824                      g_propagate_error (error, _inner_error_);
00825                      return;
00826               } else {
00827                      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);
00828                      g_clear_error (&_inner_error_);
00829                      return;
00830               }
00831        }
00832        _tmp3_ = conn;
00833        _tmp4_ = self->priv->_owner;
00834        _tmp5_ = unity_scope_get_dbus_path (_tmp4_);
00835        _tmp6_ = _tmp5_;
00836        _tmp7_ = unity_protocol_scope_service_register_object (G_TYPE_CHECK_INSTANCE_TYPE (self, UNITY_PROTOCOL_TYPE_SCOPE_SERVICE) ? ((UnityProtocolScopeService*) self) : NULL, _tmp3_, _tmp6_, &_inner_error_);
00837        _tmp8_ = _tmp7_;
00838        if (_inner_error_ != NULL) {
00839               if (_inner_error_->domain == G_IO_ERROR) {
00840                      g_propagate_error (error, _inner_error_);
00841                      _g_object_unref0 (conn);
00842                      return;
00843               } else {
00844                      _g_object_unref0 (conn);
00845                      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);
00846                      g_clear_error (&_inner_error_);
00847                      return;
00848               }
00849        }
00850        self->priv->_dbus_id = _tmp8_;
00851        unity_scope_impl_queue_info_changed (self);
00852        _g_object_unref0 (conn);
00853 }
00854 
00855 
00856 static gboolean _unity_scope_impl_emit_info_changed_gsource_func (gpointer self) {
00857        gboolean result;
00858        result = unity_scope_impl_emit_info_changed (self);
00859        return result;
00860 }
00861 
00862 
00863 static void unity_scope_impl_queue_info_changed (UnityScopeImpl* self) {
00864        guint _tmp0_;
00865        g_return_if_fail (self != NULL);
00866        _tmp0_ = self->priv->_info_changed_id;
00867        if (_tmp0_ == ((guint) 0)) {
00868               guint _tmp1_ = 0U;
00869               _tmp1_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _unity_scope_impl_emit_info_changed_gsource_func, g_object_ref (self), g_object_unref);
00870               self->priv->_info_changed_id = _tmp1_;
00871        }
00872 }
00873 
00874 
00875 static gboolean _unity_scope_impl_emit_filters_changed_gsource_func (gpointer self) {
00876        gboolean result;
00877        result = unity_scope_impl_emit_filters_changed (self);
00878        return result;
00879 }
00880 
00881 
00882 static void unity_scope_impl_queue_filters_changed (UnityScopeImpl* self) {
00883        guint _tmp0_;
00884        g_return_if_fail (self != NULL);
00885        _tmp0_ = self->priv->_filters_changed_id;
00886        if (_tmp0_ == ((guint) 0)) {
00887               guint _tmp1_ = 0U;
00888               _tmp1_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, _unity_scope_impl_emit_filters_changed_gsource_func, g_object_ref (self), g_object_unref);
00889               self->priv->_filters_changed_id = _tmp1_;
00890        }
00891 }
00892 
00893 
00894 static gboolean unity_scope_impl_emit_filters_changed (UnityScopeImpl* self) {
00895        gboolean result = FALSE;
00896        UnityScope* _tmp0_;
00897        g_return_val_if_fail (self != NULL, FALSE);
00898        _tmp0_ = self->priv->_owner;
00899        g_signal_emit_by_name (_tmp0_, "filters-changed");
00900        self->priv->_filters_changed_id = (guint) 0;
00901        result = FALSE;
00902        return result;
00903 }
00904 
00905 
00906 static gchar* unity_scope_impl_get_model_name (UnityScopeImpl* self, DeeSerializableModel* model) {
00907        gchar* result = NULL;
00908        DeeSerializableModel* _tmp0_;
00909        g_return_val_if_fail (self != NULL, NULL);
00910        g_return_val_if_fail (model != NULL, NULL);
00911        _tmp0_ = model;
00912        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, dee_shared_model_get_type ())) {
00913               DeeSerializableModel* _tmp1_;
00914               DeeSharedModel* _tmp2_;
00915               DeeSharedModel* shared_model;
00916               DeeSharedModel* _tmp3_;
00917               const gchar* _tmp4_ = NULL;
00918               gchar* _tmp5_;
00919               _tmp1_ = model;
00920               _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, dee_shared_model_get_type ()) ? ((DeeSharedModel*) _tmp1_) : NULL);
00921               shared_model = _tmp2_;
00922               _tmp3_ = shared_model;
00923               _tmp4_ = dee_shared_model_get_swarm_name (_tmp3_);
00924               _tmp5_ = g_strdup (_tmp4_);
00925               result = _tmp5_;
00926               _g_object_unref0 (shared_model);
00927               return result;
00928        } else {
00929               gchar* _tmp6_;
00930               _tmp6_ = g_strdup ("<local>");
00931               result = _tmp6_;
00932               return result;
00933        }
00934 }
00935 
00936 
00937 static GVariant* _variant_new25 (GHashTable* value) {
00938        GVariantBuilder _tmp9_;
00939        GHashTableIter _tmp10_;
00940        gpointer _tmp11_;
00941        gpointer _tmp12_;
00942        g_hash_table_iter_init (&_tmp10_, value);
00943        g_variant_builder_init (&_tmp9_, G_VARIANT_TYPE ("a{sv}"));
00944        while (g_hash_table_iter_next (&_tmp10_, &_tmp11_, &_tmp12_)) {
00945               gchar* _key;
00946               GVariant* _value;
00947               _key = (gchar*) _tmp11_;
00948               _value = (GVariant*) _tmp12_;
00949               g_variant_builder_add (&_tmp9_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
00950        }
00951        return g_variant_ref_sink (g_variant_builder_end (&_tmp9_));
00952 }
00953 
00954 
00955 static void _g_free0_ (gpointer var) {
00956        var = (g_free (var), NULL);
00957 }
00958 
00959 
00960 static void _g_variant_unref0_ (gpointer var) {
00961        (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
00962 }
00963 
00964 
00965 static gboolean unity_scope_impl_emit_info_changed (UnityScopeImpl* self) {
00966        gboolean result = FALSE;
00967        UnityProtocolScopeInfo info = {0};
00968        UnityScope* _tmp0_;
00969        const gchar* _tmp1_;
00970        const gchar* _tmp2_;
00971        gchar* _tmp3_;
00972        UnityScope* _tmp4_;
00973        UnityOptionsFilter* _tmp5_;
00974        UnityOptionsFilter* _tmp6_;
00975        GHashTable* _tmp7_ = NULL;
00976        GHashTable* _tmp8_;
00977        GVariant* _tmp13_;
00978        UnityScope* _tmp14_;
00979        gboolean _tmp15_;
00980        gboolean _tmp16_;
00981        gchar* _tmp17_;
00982        DeeSerializableModel* _tmp18_;
00983        gchar* _tmp19_ = NULL;
00984        DeeSerializableModel* _tmp20_;
00985        gchar* _tmp21_ = NULL;
00986        DeeSerializableModel* _tmp22_;
00987        gchar* _tmp23_ = NULL;
00988        GHashFunc _tmp24_;
00989        GEqualFunc _tmp25_;
00990        GHashTable* _tmp26_;
00991        UnityProtocolScopeInfo _tmp27_;
00992        g_return_val_if_fail (self != NULL, FALSE);
00993        memset (&info, 0, sizeof (UnityProtocolScopeInfo));
00994        _tmp0_ = self->priv->_owner;
00995        _tmp1_ = unity_scope_get_dbus_path (_tmp0_);
00996        _tmp2_ = _tmp1_;
00997        _tmp3_ = g_strdup (_tmp2_);
00998        _g_free0 (info.dbus_path);
00999        info.dbus_path = _tmp3_;
01000        _tmp4_ = self->priv->_owner;
01001        _tmp5_ = unity_scope_get_sources (_tmp4_);
01002        _tmp6_ = _tmp5_;
01003        _tmp7_ = unity_filter_get_hints ((UnityFilter*) _tmp6_);
01004        _tmp8_ = _tmp7_;
01005        _tmp13_ = _variant_new25 (_tmp8_);
01006        _g_variant_unref0 (info.sources);
01007        info.sources = _tmp13_;
01008        _g_hash_table_unref0 (_tmp8_);
01009        _tmp14_ = self->priv->_owner;
01010        _tmp15_ = unity_scope_get_search_in_global (_tmp14_);
01011        _tmp16_ = _tmp15_;
01012        info.search_in_global = _tmp16_;
01013        _tmp17_ = g_strdup ("<not implemented>");
01014        _g_free0 (info.private_connection_name);
01015        info.private_connection_name = _tmp17_;
01016        _tmp18_ = self->_results_model;
01017        _tmp19_ = unity_scope_impl_get_model_name (self, _tmp18_);
01018        _g_free0 (info.results_model_name);
01019        info.results_model_name = _tmp19_;
01020        _tmp20_ = self->_global_results_model;
01021        _tmp21_ = unity_scope_impl_get_model_name (self, _tmp20_);
01022        _g_free0 (info.global_results_model_name);
01023        info.global_results_model_name = _tmp21_;
01024        _tmp22_ = self->_filters_model;
01025        _tmp23_ = unity_scope_impl_get_model_name (self, _tmp22_);
01026        _g_free0 (info.filters_model_name);
01027        info.filters_model_name = _tmp23_;
01028        _tmp24_ = g_str_hash;
01029        _tmp25_ = g_str_equal;
01030        _tmp26_ = g_hash_table_new_full (_tmp24_, _tmp25_, _g_free0_, _g_variant_unref0_);
01031        _g_hash_table_unref0 (info.hints);
01032        info.hints = _tmp26_;
01033        _tmp27_ = info;
01034        g_signal_emit_by_name ((UnityProtocolScopeService*) self, "changed", &_tmp27_);
01035        self->priv->_info_changed_id = (guint) 0;
01036        result = FALSE;
01037        unity_protocol_scope_info_destroy (&info);
01038        return result;
01039 }
01040 
01041 
01042 static void unity_scope_impl_on_filter_added (UnityScopeImpl* self, DeeModel* model, DeeModelIter* iter) {
01043        DeeModel* _tmp0_;
01044        DeeModelIter* _tmp1_;
01045        const gchar* _tmp2_ = NULL;
01046        DeeModel* _tmp9_;
01047        DeeModelIter* _tmp10_;
01048        const gchar* _tmp11_ = NULL;
01049        gchar* _tmp12_;
01050        gchar* icon_hint_s;
01051        GIcon* icon_hint;
01052        UnityFilter* filter;
01053        DeeModel* _tmp20_;
01054        DeeModelIter* _tmp21_;
01055        const gchar* _tmp22_ = NULL;
01056        UnityFilterRenderer _tmp23_ = 0;
01057        UnityFilterRenderer renderer;
01058        UnityFilterRenderer _tmp24_;
01059        UnityFilter* _tmp65_;
01060        GError * _inner_error_ = NULL;
01061        g_return_if_fail (self != NULL);
01062        g_return_if_fail (model != NULL);
01063        g_return_if_fail (iter != NULL);
01064        _tmp0_ = model;
01065        _tmp1_ = iter;
01066        _tmp2_ = dee_model_get_string (_tmp0_, _tmp1_, (guint) UNITY_FILTER_COLUMN_ID);
01067        if (g_strcmp0 (_tmp2_, UNITY_LENS_SOURCES_FILTER_ID) == 0) {
01068               UnityScope* _tmp3_;
01069               UnityOptionsFilter* _tmp4_;
01070               UnityOptionsFilter* _tmp5_;
01071               DeeModel* _tmp6_;
01072               DeeModelIter* _tmp7_;
01073               gboolean _tmp8_ = FALSE;
01074               _tmp3_ = self->priv->_owner;
01075               _tmp4_ = unity_scope_get_sources (_tmp3_);
01076               _tmp5_ = _tmp4_;
01077               _tmp6_ = model;
01078               _tmp7_ = iter;
01079               _tmp8_ = dee_model_get_bool (_tmp6_, _tmp7_, (guint) UNITY_FILTER_COLUMN_FILTERING);
01080               unity_filter_set_filtering ((UnityFilter*) _tmp5_, _tmp8_);
01081               return;
01082        }
01083        _tmp9_ = model;
01084        _tmp10_ = iter;
01085        _tmp11_ = dee_model_get_string (_tmp9_, _tmp10_, (guint) UNITY_FILTER_COLUMN_ICON_HINT);
01086        _tmp12_ = g_strdup (_tmp11_);
01087        icon_hint_s = _tmp12_;
01088        icon_hint = NULL;
01089        {
01090               const gchar* _tmp13_;
01091               _tmp13_ = icon_hint_s;
01092               if (g_strcmp0 (_tmp13_, "") != 0) {
01093                      const gchar* _tmp14_;
01094                      GIcon* _tmp15_ = NULL;
01095                      GIcon* _tmp16_;
01096                      _tmp14_ = icon_hint_s;
01097                      _tmp15_ = g_icon_new_for_string (_tmp14_, &_inner_error_);
01098                      _tmp16_ = _tmp15_;
01099                      if (_inner_error_ != NULL) {
01100                             goto __catch23_g_error;
01101                      }
01102                      _g_object_unref0 (icon_hint);
01103                      icon_hint = _tmp16_;
01104               }
01105        }
01106        goto __finally23;
01107        __catch23_g_error:
01108        {
01109               GError* e = NULL;
01110               const gchar* _tmp17_;
01111               GError* _tmp18_;
01112               const gchar* _tmp19_;
01113               e = _inner_error_;
01114               _inner_error_ = NULL;
01115               _tmp17_ = icon_hint_s;
01116               _tmp18_ = e;
01117               _tmp19_ = _tmp18_->message;
01118               g_warning ("unity-scope-private.vala:199: Error parsing GIcon data '%s': %s", _tmp17_, _tmp19_);
01119               _g_error_free0 (e);
01120        }
01121        __finally23:
01122        if (_inner_error_ != NULL) {
01123               _g_object_unref0 (icon_hint);
01124               _g_free0 (icon_hint_s);
01125               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);
01126               g_clear_error (&_inner_error_);
01127               return;
01128        }
01129        filter = NULL;
01130        _tmp20_ = model;
01131        _tmp21_ = iter;
01132        _tmp22_ = dee_model_get_string (_tmp20_, _tmp21_, (guint) UNITY_FILTER_COLUMN_RENDERER_NAME);
01133        _tmp23_ = unity_filter_renderer_for_name (_tmp22_);
01134        renderer = _tmp23_;
01135        _tmp24_ = renderer;
01136        switch (_tmp24_) {
01137               case UNITY_FILTER_RENDERER_RATINGS:
01138               {
01139                      DeeModel* _tmp25_;
01140                      DeeModelIter* _tmp26_;
01141                      const gchar* _tmp27_ = NULL;
01142                      DeeModel* _tmp28_;
01143                      DeeModelIter* _tmp29_;
01144                      const gchar* _tmp30_ = NULL;
01145                      GIcon* _tmp31_;
01146                      UnityRatingsFilter* _tmp32_;
01147                      _tmp25_ = model;
01148                      _tmp26_ = iter;
01149                      _tmp27_ = dee_model_get_string (_tmp25_, _tmp26_, (guint) UNITY_FILTER_COLUMN_ID);
01150                      _tmp28_ = model;
01151                      _tmp29_ = iter;
01152                      _tmp30_ = dee_model_get_string (_tmp28_, _tmp29_, (guint) UNITY_FILTER_COLUMN_NAME);
01153                      _tmp31_ = icon_hint;
01154                      _tmp32_ = unity_ratings_filter_new (_tmp27_, _tmp30_, _tmp31_, FALSE);
01155                      _g_object_unref0 (filter);
01156                      filter = (UnityFilter*) _tmp32_;
01157                      break;
01158               }
01159               case UNITY_FILTER_RENDERER_RADIO_OPTIONS:
01160               {
01161                      DeeModel* _tmp33_;
01162                      DeeModelIter* _tmp34_;
01163                      const gchar* _tmp35_ = NULL;
01164                      DeeModel* _tmp36_;
01165                      DeeModelIter* _tmp37_;
01166                      const gchar* _tmp38_ = NULL;
01167                      GIcon* _tmp39_;
01168                      UnityRadioOptionFilter* _tmp40_;
01169                      _tmp33_ = model;
01170                      _tmp34_ = iter;
01171                      _tmp35_ = dee_model_get_string (_tmp33_, _tmp34_, (guint) UNITY_FILTER_COLUMN_ID);
01172                      _tmp36_ = model;
01173                      _tmp37_ = iter;
01174                      _tmp38_ = dee_model_get_string (_tmp36_, _tmp37_, (guint) UNITY_FILTER_COLUMN_NAME);
01175                      _tmp39_ = icon_hint;
01176                      _tmp40_ = unity_radio_option_filter_new (_tmp35_, _tmp38_, _tmp39_, FALSE);
01177                      _g_object_unref0 (filter);
01178                      filter = (UnityFilter*) _tmp40_;
01179                      break;
01180               }
01181               case UNITY_FILTER_RENDERER_CHECK_OPTIONS:
01182               {
01183                      DeeModel* _tmp41_;
01184                      DeeModelIter* _tmp42_;
01185                      const gchar* _tmp43_ = NULL;
01186                      DeeModel* _tmp44_;
01187                      DeeModelIter* _tmp45_;
01188                      const gchar* _tmp46_ = NULL;
01189                      GIcon* _tmp47_;
01190                      UnityCheckOptionFilter* _tmp48_;
01191                      _tmp41_ = model;
01192                      _tmp42_ = iter;
01193                      _tmp43_ = dee_model_get_string (_tmp41_, _tmp42_, (guint) UNITY_FILTER_COLUMN_ID);
01194                      _tmp44_ = model;
01195                      _tmp45_ = iter;
01196                      _tmp46_ = dee_model_get_string (_tmp44_, _tmp45_, (guint) UNITY_FILTER_COLUMN_NAME);
01197                      _tmp47_ = icon_hint;
01198                      _tmp48_ = unity_check_option_filter_new (_tmp43_, _tmp46_, _tmp47_, FALSE);
01199                      _g_object_unref0 (filter);
01200                      filter = (UnityFilter*) _tmp48_;
01201                      break;
01202               }
01203               case UNITY_FILTER_RENDERER_CHECK_OPTIONS_COMPACT:
01204               {
01205                      DeeModel* _tmp49_;
01206                      DeeModelIter* _tmp50_;
01207                      const gchar* _tmp51_ = NULL;
01208                      DeeModel* _tmp52_;
01209                      DeeModelIter* _tmp53_;
01210                      const gchar* _tmp54_ = NULL;
01211                      GIcon* _tmp55_;
01212                      UnityCheckOptionFilterCompact* _tmp56_;
01213                      _tmp49_ = model;
01214                      _tmp50_ = iter;
01215                      _tmp51_ = dee_model_get_string (_tmp49_, _tmp50_, (guint) UNITY_FILTER_COLUMN_ID);
01216                      _tmp52_ = model;
01217                      _tmp53_ = iter;
01218                      _tmp54_ = dee_model_get_string (_tmp52_, _tmp53_, (guint) UNITY_FILTER_COLUMN_NAME);
01219                      _tmp55_ = icon_hint;
01220                      _tmp56_ = unity_check_option_filter_compact_new (_tmp51_, _tmp54_, _tmp55_, FALSE);
01221                      _g_object_unref0 (filter);
01222                      filter = (UnityFilter*) _tmp56_;
01223                      break;
01224               }
01225               case UNITY_FILTER_RENDERER_MULTIRANGE:
01226               {
01227                      DeeModel* _tmp57_;
01228                      DeeModelIter* _tmp58_;
01229                      const gchar* _tmp59_ = NULL;
01230                      DeeModel* _tmp60_;
01231                      DeeModelIter* _tmp61_;
01232                      const gchar* _tmp62_ = NULL;
01233                      GIcon* _tmp63_;
01234                      UnityMultiRangeFilter* _tmp64_;
01235                      _tmp57_ = model;
01236                      _tmp58_ = iter;
01237                      _tmp59_ = dee_model_get_string (_tmp57_, _tmp58_, (guint) UNITY_FILTER_COLUMN_ID);
01238                      _tmp60_ = model;
01239                      _tmp61_ = iter;
01240                      _tmp62_ = dee_model_get_string (_tmp60_, _tmp61_, (guint) UNITY_FILTER_COLUMN_NAME);
01241                      _tmp63_ = icon_hint;
01242                      _tmp64_ = unity_multi_range_filter_new (_tmp59_, _tmp62_, _tmp63_, FALSE);
01243                      _g_object_unref0 (filter);
01244                      filter = (UnityFilter*) _tmp64_;
01245                      break;
01246               }
01247               default:
01248               break;
01249        }
01250        _tmp65_ = filter;
01251        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp65_, UNITY_TYPE_FILTER)) {
01252               UnityFilter* _tmp66_;
01253               DeeModel* _tmp67_;
01254               DeeModelIter* _tmp68_;
01255               UnityScope* _tmp69_;
01256               UnityFilter* _tmp70_;
01257               UnityFilter* _tmp71_;
01258               _tmp66_ = filter;
01259               _tmp67_ = model;
01260               _tmp68_ = iter;
01261               unity_filter_set_model_and_iter (_tmp66_, _tmp67_, _tmp68_);
01262               _tmp69_ = self->priv->_owner;
01263               _tmp70_ = filter;
01264               _tmp71_ = _g_object_ref0 (_tmp70_);
01265               _tmp69_->_filters = g_list_append (_tmp69_->_filters, _tmp71_);
01266               unity_scope_impl_queue_filters_changed (self);
01267        }
01268        _g_object_unref0 (filter);
01269        _g_object_unref0 (icon_hint);
01270        _g_free0 (icon_hint_s);
01271 }
01272 
01273 
01274 static void unity_scope_impl_on_filter_changed (UnityScopeImpl* self, DeeModel* model, DeeModelIter* iter) {
01275        DeeModel* _tmp0_;
01276        DeeModelIter* _tmp1_;
01277        const gchar* _tmp2_ = NULL;
01278        g_return_if_fail (self != NULL);
01279        g_return_if_fail (model != NULL);
01280        g_return_if_fail (iter != NULL);
01281        _tmp0_ = model;
01282        _tmp1_ = iter;
01283        _tmp2_ = dee_model_get_string (_tmp0_, _tmp1_, (guint) UNITY_FILTER_COLUMN_ID);
01284        if (g_strcmp0 (_tmp2_, UNITY_LENS_SOURCES_FILTER_ID) == 0) {
01285               UnityScope* _tmp3_;
01286               UnityOptionsFilter* _tmp4_;
01287               UnityOptionsFilter* _tmp5_;
01288               DeeModel* _tmp6_;
01289               DeeModelIter* _tmp7_;
01290               gboolean _tmp8_ = FALSE;
01291               _tmp3_ = self->priv->_owner;
01292               _tmp4_ = unity_scope_get_sources (_tmp3_);
01293               _tmp5_ = _tmp4_;
01294               _tmp6_ = model;
01295               _tmp7_ = iter;
01296               _tmp8_ = dee_model_get_bool (_tmp6_, _tmp7_, (guint) UNITY_FILTER_COLUMN_FILTERING);
01297               unity_filter_set_filtering ((UnityFilter*) _tmp5_, _tmp8_);
01298               return;
01299        }
01300        unity_scope_impl_queue_filters_changed (self);
01301 }
01302 
01303 
01304 static void unity_scope_impl_on_filter_removed (UnityScopeImpl* self, DeeModel* model, DeeModelIter* iter) {
01305        gboolean dirty;
01306        UnityScope* _tmp0_;
01307        GList* _tmp1_;
01308        gboolean _tmp11_;
01309        g_return_if_fail (self != NULL);
01310        g_return_if_fail (model != NULL);
01311        g_return_if_fail (iter != NULL);
01312        dirty = FALSE;
01313        _tmp0_ = self->priv->_owner;
01314        _tmp1_ = _tmp0_->_filters;
01315        {
01316               GList* filter_collection = NULL;
01317               GList* filter_it = NULL;
01318               filter_collection = _tmp1_;
01319               for (filter_it = filter_collection; filter_it != NULL; filter_it = filter_it->next) {
01320                      UnityFilter* _tmp2_;
01321                      UnityFilter* filter = NULL;
01322                      _tmp2_ = _g_object_ref0 ((UnityFilter*) filter_it->data);
01323                      filter = _tmp2_;
01324                      {
01325                             UnityFilter* _tmp3_;
01326                             const gchar* _tmp4_;
01327                             const gchar* _tmp5_;
01328                             DeeModel* _tmp6_;
01329                             DeeModelIter* _tmp7_;
01330                             const gchar* _tmp8_ = NULL;
01331                             _tmp3_ = filter;
01332                             _tmp4_ = unity_filter_get_id (_tmp3_);
01333                             _tmp5_ = _tmp4_;
01334                             _tmp6_ = model;
01335                             _tmp7_ = iter;
01336                             _tmp8_ = dee_model_get_string (_tmp6_, _tmp7_, (guint) UNITY_FILTER_COLUMN_ID);
01337                             if (g_strcmp0 (_tmp5_, _tmp8_) == 0) {
01338                                    UnityScope* _tmp9_;
01339                                    UnityFilter* _tmp10_;
01340                                    dirty = TRUE;
01341                                    _tmp9_ = self->priv->_owner;
01342                                    _tmp10_ = filter;
01343                                    _tmp9_->_filters = g_list_remove (_tmp9_->_filters, _tmp10_);
01344                                    _g_object_unref0 (filter);
01345                                    break;
01346                             }
01347                             _g_object_unref0 (filter);
01348                      }
01349               }
01350        }
01351        _tmp11_ = dirty;
01352        if (_tmp11_) {
01353               unity_scope_impl_queue_filters_changed (self);
01354        }
01355 }
01356 
01357 
01358 static void unity_scope_impl_real_info_request_data_free (gpointer _data) {
01359        UnityScopeImplInfoRequestData* _data_;
01360        _data_ = _data;
01361        _g_object_unref0 (_data_->self);
01362        g_slice_free (UnityScopeImplInfoRequestData, _data_);
01363 }
01364 
01365 
01366 static void unity_scope_impl_real_info_request (UnityProtocolScopeService* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01367        UnityScopeImpl * self;
01368        UnityScopeImplInfoRequestData* _data_;
01369        UnityScopeImpl* _tmp0_;
01370        self = (UnityScopeImpl*) base;
01371        _data_ = g_slice_new0 (UnityScopeImplInfoRequestData);
01372        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_impl_real_info_request);
01373        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_impl_real_info_request_data_free);
01374        _tmp0_ = _g_object_ref0 (self);
01375        _data_->self = _tmp0_;
01376        unity_scope_impl_real_info_request_co (_data_);
01377 }
01378 
01379 
01380 static void unity_scope_impl_real_info_request_finish (UnityProtocolScopeService* base, GAsyncResult* _res_, GError** error) {
01381        UnityScopeImplInfoRequestData* _data_;
01382        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
01383 }
01384 
01385 
01386 static gboolean unity_scope_impl_real_info_request_co (UnityScopeImplInfoRequestData* _data_) {
01387        switch (_data_->_state_) {
01388               case 0:
01389               goto _state_0;
01390               default:
01391               g_assert_not_reached ();
01392        }
01393        _state_0:
01394        unity_scope_impl_queue_info_changed (_data_->self);
01395        if (_data_->_state_ == 0) {
01396               g_simple_async_result_complete_in_idle (_data_->_async_result);
01397        } else {
01398               g_simple_async_result_complete (_data_->_async_result);
01399        }
01400        g_object_unref (_data_->_async_result);
01401        return FALSE;
01402 }
01403 
01404 
01405 static void unity_scope_impl_real_activate_data_free (gpointer _data) {
01406        UnityScopeImplActivateData* _data_;
01407        _data_ = _data;
01408        _g_free0 (_data_->uri);
01409        unity_protocol_activation_reply_raw_destroy (&_data_->result);
01410        _g_object_unref0 (_data_->self);
01411        g_slice_free (UnityScopeImplActivateData, _data_);
01412 }
01413 
01414 
01415 static void unity_scope_impl_real_activate (UnityProtocolScopeService* base, const gchar* uri, guint action_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01416        UnityScopeImpl * self;
01417        UnityScopeImplActivateData* _data_;
01418        UnityScopeImpl* _tmp0_;
01419        const gchar* _tmp1_;
01420        gchar* _tmp2_;
01421        guint _tmp3_;
01422        self = (UnityScopeImpl*) base;
01423        _data_ = g_slice_new0 (UnityScopeImplActivateData);
01424        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_impl_real_activate);
01425        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_impl_real_activate_data_free);
01426        _tmp0_ = _g_object_ref0 (self);
01427        _data_->self = _tmp0_;
01428        _tmp1_ = uri;
01429        _tmp2_ = g_strdup (_tmp1_);
01430        _data_->uri = _tmp2_;
01431        _tmp3_ = action_type;
01432        _data_->action_type = _tmp3_;
01433        unity_scope_impl_real_activate_co (_data_);
01434 }
01435 
01436 
01437 static void unity_scope_impl_real_activate_finish (UnityProtocolScopeService* base, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result, GError** error) {
01438        UnityScopeImplActivateData* _data_;
01439        UnityProtocolActivationReplyRaw _tmp0_ = {0};
01440        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
01441               return;
01442        }
01443        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
01444        unity_protocol_activation_reply_raw_copy (&_data_->result, &_tmp0_);
01445        *result = _tmp0_;
01446 }
01447 
01448 
01449 static gchar string_get (const gchar* self, glong index) {
01450        gchar result = '\0';
01451        glong _tmp0_;
01452        gchar _tmp1_;
01453        g_return_val_if_fail (self != NULL, '\0');
01454        _tmp0_ = index;
01455        _tmp1_ = ((gchar*) self)[_tmp0_];
01456        result = _tmp1_;
01457        return result;
01458 }
01459 
01460 
01461 static void unity_scope_impl_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
01462        UnityScopeImplActivateData* _data_;
01463        _data_ = _user_data_;
01464        _data_->_source_object_ = source_object;
01465        _data_->_res_ = _res_;
01466        unity_scope_impl_real_activate_co (_data_);
01467 }
01468 
01469 
01470 static gboolean unity_scope_impl_real_activate_co (UnityScopeImplActivateData* _data_) {
01471        switch (_data_->_state_) {
01472               case 0:
01473               goto _state_0;
01474               case 1:
01475               goto _state_1;
01476               default:
01477               g_assert_not_reached ();
01478        }
01479        _state_0:
01480        memset (&_data_->reply, 0, sizeof (UnityProtocolActivationReplyRaw));
01481        _data_->response = NULL;
01482        _data_->preview = NULL;
01483        _data_->stripped_uri = NULL;
01484        _data_->_tmp0_ = _data_->action_type;
01485        _data_->action = (UnityProtocolActionType) _data_->_tmp0_;
01486        _data_->_tmp1_ = _data_->action;
01487        switch (_data_->_tmp1_) {
01488               case UNITY_PROTOCOL_ACTION_TYPE_ACTIVATE_RESULT:
01489               {
01490                      _data_->_tmp2_ = _data_->self->priv->_owner;
01491                      _data_->_tmp3_ = _data_->uri;
01492                      _data_->_tmp4_ = NULL;
01493                      g_signal_emit_by_name (_data_->_tmp2_, "activate-uri", _data_->_tmp3_, &_data_->_tmp4_);
01494                      _g_object_unref0 (_data_->response);
01495                      _data_->response = _data_->_tmp4_;
01496                      break;
01497               }
01498               case UNITY_PROTOCOL_ACTION_TYPE_PREVIEW_RESULT:
01499               {
01500                      _data_->_tmp5_ = _data_->uri;
01501                      _data_->_tmp6_ = NULL;
01502                      _data_->_tmp6_ = unity_scope_impl_preview_internal (_data_->self, _data_->_tmp5_);
01503                      _g_object_unref0 (_data_->preview);
01504                      _data_->preview = _data_->_tmp6_;
01505                      break;
01506               }
01507               case UNITY_PROTOCOL_ACTION_TYPE_PREVIEW_ACTION:
01508               {
01509                      _data_->_tmp7_ = _data_->uri;
01510                      _data_->_tmp9_ = NULL;
01511                      _data_->_tmp9_ = _data_->_tmp8_ = g_strsplit (_data_->_tmp7_, ":", 2);
01512                      _data_->tokens = _data_->_tmp9_;
01513                      _data_->tokens_length1 = _vala_array_length (_data_->_tmp8_);
01514                      _data_->_tokens_size_ = _data_->tokens_length1;
01515                      _data_->_tmp10_ = _data_->tokens;
01516                      _data_->_tmp10__length1 = _data_->tokens_length1;
01517                      _data_->_tmp11_ = _data_->_tmp10_[1];
01518                      _data_->_tmp12_ = g_strdup (_data_->_tmp11_);
01519                      _g_free0 (_data_->stripped_uri);
01520                      _data_->stripped_uri = _data_->_tmp12_;
01521                      _data_->_tmp13_ = _data_->tokens;
01522                      _data_->_tmp13__length1 = _data_->tokens_length1;
01523                      _data_->_tmp14_ = _data_->_tmp13_[0];
01524                      _data_->_tmp15_ = _data_->stripped_uri;
01525                      _data_->_tmp16_ = NULL;
01526                      _data_->_tmp16_ = unity_scope_impl_activate_action (_data_->self, _data_->_tmp14_, _data_->_tmp15_);
01527                      _g_object_unref0 (_data_->response);
01528                      _data_->response = _data_->_tmp16_;
01529                      _data_->tokens = (_vala_array_free (_data_->tokens, _data_->tokens_length1, (GDestroyNotify) g_free), NULL);
01530                      break;
01531               }
01532               case UNITY_PROTOCOL_ACTION_TYPE_PREVIEW_BUILTIN_ACTION:
01533               {
01534                      break;
01535               }
01536               default:
01537               {
01538                      _data_->_tmp17_ = _data_->action_type;
01539                      g_warning ("unity-scope-private.vala:309: Unknown activation ActionType: %u", _data_->_tmp17_);
01540                      break;
01541               }
01542        }
01543        _data_->_tmp19_ = _data_->response;
01544        if (_data_->_tmp19_ != NULL) {
01545               _data_->_tmp20_ = _data_->response;
01546               _data_->_tmp21_ = unity_activation_response_get_handled (_data_->_tmp20_);
01547               _data_->_tmp22_ = _data_->_tmp21_;
01548               _data_->_tmp18_ = _data_->_tmp22_ == UNITY_HANDLED_TYPE_SHOW_PREVIEW;
01549        } else {
01550               _data_->_tmp18_ = FALSE;
01551        }
01552        _data_->_tmp23_ = _data_->_tmp18_;
01553        if (_data_->_tmp23_) {
01554               _data_->_tmp24_ = _data_->response;
01555               _data_->_tmp25_ = NULL;
01556               _data_->_tmp25_ = unity_activation_response_get_preview (_data_->_tmp24_);
01557               if (_data_->_tmp25_ == NULL) {
01558                      _data_->_tmp26_ = _data_->response;
01559                      _data_->_tmp27_ = unity_activation_response_get_goto_uri (_data_->_tmp26_);
01560                      _data_->_tmp28_ = _data_->_tmp27_;
01561                      _data_->_tmp29_ = g_strdup (_data_->_tmp28_);
01562                      _data_->new_uri = _data_->_tmp29_;
01563                      _data_->_tmp31_ = _data_->new_uri;
01564                      if (_data_->_tmp31_ == NULL) {
01565                             _data_->_tmp30_ = TRUE;
01566                      } else {
01567                             _data_->_tmp32_ = _data_->new_uri;
01568                             _data_->_tmp33_ = '\0';
01569                             _data_->_tmp33_ = string_get (_data_->_tmp32_, (glong) 0);
01570                             _data_->_tmp30_ = _data_->_tmp33_ == '\0';
01571                      }
01572                      _data_->_tmp34_ = _data_->_tmp30_;
01573                      if (_data_->_tmp34_) {
01574                             _data_->_tmp35_ = _data_->stripped_uri;
01575                             _data_->_tmp36_ = g_strdup (_data_->_tmp35_);
01576                             _data_->_tmp37_ = _data_->_tmp36_;
01577                             _data_->_tmp38_ = _data_->_tmp37_;
01578                             if (_data_->_tmp38_ == NULL) {
01579                                    _data_->_tmp39_ = _data_->uri;
01580                                    _data_->_tmp40_ = g_strdup (_data_->_tmp39_);
01581                                    _g_free0 (_data_->_tmp37_);
01582                                    _data_->_tmp37_ = _data_->_tmp40_;
01583                             }
01584                             _data_->_tmp41_ = _data_->_tmp37_;
01585                             _data_->_tmp42_ = g_strdup (_data_->_tmp41_);
01586                             _g_free0 (_data_->new_uri);
01587                             _data_->new_uri = _data_->_tmp42_;
01588                             _g_free0 (_data_->_tmp37_);
01589                      }
01590                      _data_->_tmp43_ = _data_->new_uri;
01591                      memset (&_data_->_tmp44_, 0, sizeof (UnityProtocolActivationReplyRaw));
01592                      _data_->_state_ = 1;
01593                      unity_protocol_scope_service_activate ((UnityProtocolScopeService*) _data_->self, _data_->_tmp43_, (guint) UNITY_PROTOCOL_ACTION_TYPE_PREVIEW_RESULT, unity_scope_impl_activate_ready, _data_);
01594                      return FALSE;
01595                      _state_1:
01596                      unity_protocol_scope_service_activate_finish ((UnityProtocolScopeService*) _data_->self, _data_->_res_, &_data_->_tmp44_, &_data_->_inner_error_);
01597                      _data_->_tmp45_ = _data_->_tmp44_;
01598                      if (_data_->_inner_error_ != NULL) {
01599                             if (_data_->_inner_error_->domain == G_IO_ERROR) {
01600                                    g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
01601                                    g_error_free (_data_->_inner_error_);
01602                                    _g_free0 (_data_->new_uri);
01603                                    _g_free0 (_data_->stripped_uri);
01604                                    _g_object_unref0 (_data_->preview);
01605                                    _g_object_unref0 (_data_->response);
01606                                    unity_protocol_activation_reply_raw_destroy (&_data_->reply);
01607                                    if (_data_->_state_ == 0) {
01608                                           g_simple_async_result_complete_in_idle (_data_->_async_result);
01609                                    } else {
01610                                           g_simple_async_result_complete (_data_->_async_result);
01611                                    }
01612                                    g_object_unref (_data_->_async_result);
01613                                    return FALSE;
01614                             } else {
01615                                    _g_free0 (_data_->new_uri);
01616                                    _g_free0 (_data_->stripped_uri);
01617                                    _g_object_unref0 (_data_->preview);
01618                                    _g_object_unref0 (_data_->response);
01619                                    unity_protocol_activation_reply_raw_destroy (&_data_->reply);
01620                                    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);
01621                                    g_clear_error (&_data_->_inner_error_);
01622                                    return FALSE;
01623                             }
01624                      }
01625                      unity_protocol_activation_reply_raw_destroy (&_data_->reply);
01626                      _data_->reply = _data_->_tmp45_;
01627                      _data_->result = _data_->reply;
01628                      _g_free0 (_data_->new_uri);
01629                      _g_free0 (_data_->stripped_uri);
01630                      _g_object_unref0 (_data_->preview);
01631                      _g_object_unref0 (_data_->response);
01632                      if (_data_->_state_ == 0) {
01633                             g_simple_async_result_complete_in_idle (_data_->_async_result);
01634                      } else {
01635                             g_simple_async_result_complete (_data_->_async_result);
01636                      }
01637                      g_object_unref (_data_->_async_result);
01638                      return FALSE;
01639               }
01640        }
01641        _data_->_tmp46_ = _data_->preview;
01642        if (_data_->_tmp46_ != NULL) {
01643               _data_->_tmp47_ = _data_->preview;
01644               _data_->_tmp48_ = _g_object_ref0 (_data_->_tmp47_);
01645               _g_object_unref0 (_data_->self->priv->_last_preview);
01646               _data_->self->priv->_last_preview = _data_->_tmp48_;
01647               _data_->_tmp49_ = unity_activation_response_new (UNITY_HANDLED_TYPE_SHOW_PREVIEW, "");
01648               g_object_ref_sink (_data_->_tmp49_);
01649               _g_object_unref0 (_data_->response);
01650               _data_->response = _data_->_tmp49_;
01651               _data_->_tmp50_ = _data_->response;
01652               _data_->_tmp51_ = _data_->preview;
01653               unity_activation_response_set_preview (_data_->_tmp50_, _data_->_tmp51_);
01654        }
01655        _data_->_tmp52_ = _data_->response;
01656        if (_data_->_tmp52_ == NULL) {
01657               _data_->_tmp53_ = unity_activation_response_new (UNITY_HANDLED_TYPE_NOT_HANDLED, "");
01658               g_object_ref_sink (_data_->_tmp53_);
01659               _g_object_unref0 (_data_->response);
01660               _data_->response = _data_->_tmp53_;
01661        }
01662        _data_->_tmp54_ = _data_->stripped_uri;
01663        _data_->_tmp55_ = g_strdup (_data_->_tmp54_);
01664        _data_->_tmp56_ = _data_->_tmp55_;
01665        _data_->_tmp57_ = _data_->_tmp56_;
01666        if (_data_->_tmp57_ == NULL) {
01667               _data_->_tmp58_ = _data_->uri;
01668               _data_->_tmp59_ = g_strdup (_data_->_tmp58_);
01669               _g_free0 (_data_->_tmp56_);
01670               _data_->_tmp56_ = _data_->_tmp59_;
01671        }
01672        _data_->_tmp60_ = _data_->_tmp56_;
01673        _data_->_tmp61_ = g_strdup (_data_->_tmp60_);
01674        _g_free0 (_data_->reply.uri);
01675        _data_->reply.uri = _data_->_tmp61_;
01676        _data_->_tmp62_ = _data_->response;
01677        _data_->_tmp63_ = unity_activation_response_get_handled (_data_->_tmp62_);
01678        _data_->_tmp64_ = _data_->_tmp63_;
01679        _data_->reply.handled = (guint) _data_->_tmp64_;
01680        _data_->_tmp65_ = _data_->response;
01681        _data_->_tmp66_ = NULL;
01682        _data_->_tmp66_ = unity_activation_response_get_hints (_data_->_tmp65_);
01683        _g_hash_table_unref0 (_data_->reply.hints);
01684        _data_->reply.hints = _data_->_tmp66_;
01685        _data_->result = _data_->reply;
01686        _g_free0 (_data_->_tmp56_);
01687        _g_free0 (_data_->stripped_uri);
01688        _g_object_unref0 (_data_->preview);
01689        _g_object_unref0 (_data_->response);
01690        if (_data_->_state_ == 0) {
01691               g_simple_async_result_complete_in_idle (_data_->_async_result);
01692        } else {
01693               g_simple_async_result_complete (_data_->_async_result);
01694        }
01695        g_object_unref (_data_->_async_result);
01696        return FALSE;
01697        _g_free0 (_data_->_tmp56_);
01698        _g_free0 (_data_->stripped_uri);
01699        _g_object_unref0 (_data_->preview);
01700        _g_object_unref0 (_data_->response);
01701        unity_protocol_activation_reply_raw_destroy (&_data_->reply);
01702        if (_data_->_state_ == 0) {
01703               g_simple_async_result_complete_in_idle (_data_->_async_result);
01704        } else {
01705               g_simple_async_result_complete (_data_->_async_result);
01706        }
01707        g_object_unref (_data_->_async_result);
01708        return FALSE;
01709 }
01710 
01711 
01712 static void unity_scope_impl_real_update_preview_property_data_free (gpointer _data) {
01713        UnityScopeImplUpdatePreviewPropertyData* _data_;
01714        _data_ = _data;
01715        _g_free0 (_data_->uri);
01716        _g_hash_table_unref0 (_data_->values);
01717        _g_hash_table_unref0 (_data_->result);
01718        _g_object_unref0 (_data_->self);
01719        g_slice_free (UnityScopeImplUpdatePreviewPropertyData, _data_);
01720 }
01721 
01722 
01723 static gpointer _g_hash_table_ref0 (gpointer self) {
01724        return self ? g_hash_table_ref (self) : NULL;
01725 }
01726 
01727 
01728 static void unity_scope_impl_real_update_preview_property (UnityProtocolScopeService* base, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01729        UnityScopeImpl * self;
01730        UnityScopeImplUpdatePreviewPropertyData* _data_;
01731        UnityScopeImpl* _tmp0_;
01732        const gchar* _tmp1_;
01733        gchar* _tmp2_;
01734        GHashTable* _tmp3_;
01735        GHashTable* _tmp4_;
01736        self = (UnityScopeImpl*) base;
01737        _data_ = g_slice_new0 (UnityScopeImplUpdatePreviewPropertyData);
01738        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_impl_real_update_preview_property);
01739        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_impl_real_update_preview_property_data_free);
01740        _tmp0_ = _g_object_ref0 (self);
01741        _data_->self = _tmp0_;
01742        _tmp1_ = uri;
01743        _tmp2_ = g_strdup (_tmp1_);
01744        _data_->uri = _tmp2_;
01745        _tmp3_ = values;
01746        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
01747        _data_->values = _tmp4_;
01748        unity_scope_impl_real_update_preview_property_co (_data_);
01749 }
01750 
01751 
01752 static GHashTable* unity_scope_impl_real_update_preview_property_finish (UnityProtocolScopeService* base, GAsyncResult* _res_, GError** error) {
01753        GHashTable* result;
01754        UnityScopeImplUpdatePreviewPropertyData* _data_;
01755        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
01756               return NULL;
01757        }
01758        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
01759        result = _data_->result;
01760        _data_->result = NULL;
01761        return result;
01762 }
01763 
01764 
01765 static gboolean unity_scope_impl_real_update_preview_property_co (UnityScopeImplUpdatePreviewPropertyData* _data_) {
01766        switch (_data_->_state_) {
01767               case 0:
01768               goto _state_0;
01769               default:
01770               g_assert_not_reached ();
01771        }
01772        _state_0:
01773        _data_->_tmp0_ = _data_->self->priv->_last_preview;
01774        if (_data_->_tmp0_ != NULL) {
01775               _data_->_tmp1_ = _data_->self->priv->_last_preview;
01776               _data_->_tmp2_ = _data_->values;
01777               _data_->_tmp3_ = NULL;
01778               _data_->_tmp3_ = unity_preview_update_property (_data_->_tmp1_, _data_->_tmp2_);
01779               _g_hash_table_unref0 (_data_->response);
01780               _data_->response = _data_->_tmp3_;
01781        } else {
01782               g_warning ("unity-scope-private.vala:357: can't update preview property");
01783               _data_->_tmp4_ = g_str_hash;
01784               _data_->_tmp5_ = g_str_equal;
01785               _data_->_tmp6_ = g_hash_table_new_full (_data_->_tmp4_, _data_->_tmp5_, _g_free0_, _g_variant_unref0_);
01786               _g_hash_table_unref0 (_data_->response);
01787               _data_->response = _data_->_tmp6_;
01788        }
01789        _data_->result = _data_->response;
01790        if (_data_->_state_ == 0) {
01791               g_simple_async_result_complete_in_idle (_data_->_async_result);
01792        } else {
01793               g_simple_async_result_complete (_data_->_async_result);
01794        }
01795        g_object_unref (_data_->_async_result);
01796        return FALSE;
01797        _g_hash_table_unref0 (_data_->response);
01798        if (_data_->_state_ == 0) {
01799               g_simple_async_result_complete_in_idle (_data_->_async_result);
01800        } else {
01801               g_simple_async_result_complete (_data_->_async_result);
01802        }
01803        g_object_unref (_data_->_async_result);
01804        return FALSE;
01805 }
01806 
01807 
01808 static void unity_scope_impl_schedule_search_changed_data_free (gpointer _data) {
01809        UnityScopeImplScheduleSearchChangedData* _data_;
01810        _data_ = _data;
01811        _g_object_unref0 (_data_->search);
01812        _g_object_unref0 (_data_->self);
01813        g_slice_free (UnityScopeImplScheduleSearchChangedData, _data_);
01814 }
01815 
01816 
01817 void unity_scope_impl_schedule_search_changed (UnityScopeImpl* self, UnityLensSearch* search, UnitySearchType search_type, gboolean wait_for_view, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01818        UnityScopeImplScheduleSearchChangedData* _data_;
01819        UnityScopeImpl* _tmp0_;
01820        UnityLensSearch* _tmp1_;
01821        UnityLensSearch* _tmp2_;
01822        UnitySearchType _tmp3_;
01823        gboolean _tmp4_;
01824        _data_ = g_slice_new0 (UnityScopeImplScheduleSearchChangedData);
01825        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_impl_schedule_search_changed);
01826        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_impl_schedule_search_changed_data_free);
01827        _tmp0_ = _g_object_ref0 (self);
01828        _data_->self = _tmp0_;
01829        _tmp1_ = search;
01830        _tmp2_ = _g_object_ref0 (_tmp1_);
01831        _data_->search = _tmp2_;
01832        _tmp3_ = search_type;
01833        _data_->search_type = _tmp3_;
01834        _tmp4_ = wait_for_view;
01835        _data_->wait_for_view = _tmp4_;
01836        unity_scope_impl_schedule_search_changed_co (_data_);
01837 }
01838 
01839 
01840 void unity_scope_impl_schedule_search_changed_finish (UnityScopeImpl* self, GAsyncResult* _res_) {
01841        UnityScopeImplScheduleSearchChangedData* _data_;
01842        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
01843 }
01844 
01845 
01846 static Block8Data* block8_data_ref (Block8Data* _data8_) {
01847        g_atomic_int_inc (&_data8_->_ref_count_);
01848        return _data8_;
01849 }
01850 
01851 
01852 static void block8_data_unref (void * _userdata_) {
01853        Block8Data* _data8_;
01854        _data8_ = (Block8Data*) _userdata_;
01855        if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
01856               UnityScopeImpl * self;
01857               self = _data8_->self;
01858               _g_object_unref0 (self);
01859               g_slice_free (Block8Data, _data8_);
01860        }
01861 }
01862 
01863 
01864 static void ___lambda5_ (Block8Data* _data8_) {
01865        UnityScopeImpl * self;
01866        gboolean _tmp0_ = FALSE;
01867        gboolean _tmp1_ = FALSE;
01868        UnitySearchType _tmp2_;
01869        gboolean _tmp4_;
01870        gboolean _tmp9_;
01871        gboolean resume;
01872        gboolean _tmp10_;
01873        self = _data8_->self;
01874        _tmp2_ = _data8_->search_type;
01875        if (_tmp2_ == UNITY_SEARCH_TYPE_DEFAULT) {
01876               UnityProtocolViewType _tmp3_;
01877               _tmp3_ = self->priv->_view_type;
01878               _tmp1_ = _tmp3_ == UNITY_PROTOCOL_VIEW_TYPE_LENS_VIEW;
01879        } else {
01880               _tmp1_ = FALSE;
01881        }
01882        _tmp4_ = _tmp1_;
01883        if (_tmp4_) {
01884               _tmp0_ = TRUE;
01885        } else {
01886               gboolean _tmp5_ = FALSE;
01887               UnitySearchType _tmp6_;
01888               gboolean _tmp8_;
01889               _tmp6_ = _data8_->search_type;
01890               if (_tmp6_ == UNITY_SEARCH_TYPE_GLOBAL) {
01891                      UnityProtocolViewType _tmp7_;
01892                      _tmp7_ = self->priv->_view_type;
01893                      _tmp5_ = _tmp7_ == UNITY_PROTOCOL_VIEW_TYPE_HOME_VIEW;
01894               } else {
01895                      _tmp5_ = FALSE;
01896               }
01897               _tmp8_ = _tmp5_;
01898               _tmp0_ = _tmp8_;
01899        }
01900        _tmp9_ = _tmp0_;
01901        resume = _tmp9_;
01902        _tmp10_ = resume;
01903        if (_tmp10_) {
01904               unity_scope_impl_schedule_search_changed_co (_data8_->_async_data_);
01905        }
01906 }
01907 
01908 
01909 static void ____lambda5__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01910        ___lambda5_ (self);
01911 }
01912 
01913 
01914 static gboolean _unity_scope_impl_schedule_search_changed_co_gsource_func (gpointer self) {
01915        gboolean result;
01916        result = unity_scope_impl_schedule_search_changed_co (self);
01917        return result;
01918 }
01919 
01920 
01921 static gboolean unity_scope_impl_schedule_search_changed_co (UnityScopeImplScheduleSearchChangedData* _data_) {
01922        switch (_data_->_state_) {
01923               case 0:
01924               goto _state_0;
01925               case 1:
01926               goto _state_1;
01927               case 2:
01928               goto _state_2;
01929               default:
01930               g_assert_not_reached ();
01931        }
01932        _state_0:
01933        _data_->_data8_ = g_slice_new0 (Block8Data);
01934        _data_->_data8_->_ref_count_ = 1;
01935        _data_->_data8_->self = g_object_ref (_data_->self);
01936        _data_->_tmp0_ = _data_->search_type;
01937        _data_->_data8_->search_type = _data_->_tmp0_;
01938        _data_->_data8_->_async_data_ = _data_;
01939        _data_->_tmp1_ = _data_->_data8_->search_type;
01940        if (_data_->_tmp1_ >= UNITY_SEARCH_TYPE_N_TYPES) {
01941               block8_data_unref (_data_->_data8_);
01942               _data_->_data8_ = NULL;
01943               if (_data_->_state_ == 0) {
01944                      g_simple_async_result_complete_in_idle (_data_->_async_result);
01945               } else {
01946                      g_simple_async_result_complete (_data_->_async_result);
01947               }
01948               g_object_unref (_data_->_async_result);
01949               return FALSE;
01950        }
01951        _data_->_tmp3_ = _data_->wait_for_view;
01952        if (_data_->_tmp3_) {
01953               _data_->_tmp6_ = _data_->_data8_->search_type;
01954               if (_data_->_tmp6_ == UNITY_SEARCH_TYPE_GLOBAL) {
01955                      _data_->_tmp7_ = _data_->self->priv->_view_type;
01956                      _data_->_tmp5_ = _data_->_tmp7_ != UNITY_PROTOCOL_VIEW_TYPE_HOME_VIEW;
01957               } else {
01958                      _data_->_tmp5_ = FALSE;
01959               }
01960               _data_->_tmp8_ = _data_->_tmp5_;
01961               if (_data_->_tmp8_) {
01962                      _data_->_tmp4_ = TRUE;
01963               } else {
01964                      _data_->_tmp10_ = _data_->_data8_->search_type;
01965                      if (_data_->_tmp10_ == UNITY_SEARCH_TYPE_DEFAULT) {
01966                             _data_->_tmp11_ = _data_->self->priv->_view_type;
01967                             _data_->_tmp9_ = _data_->_tmp11_ != UNITY_PROTOCOL_VIEW_TYPE_LENS_VIEW;
01968                      } else {
01969                             _data_->_tmp9_ = FALSE;
01970                      }
01971                      _data_->_tmp12_ = _data_->_tmp9_;
01972                      _data_->_tmp4_ = _data_->_tmp12_;
01973               }
01974               _data_->_tmp13_ = _data_->_tmp4_;
01975               _data_->_tmp2_ = _data_->_tmp13_;
01976        } else {
01977               _data_->_tmp2_ = FALSE;
01978        }
01979        _data_->_tmp14_ = _data_->_tmp2_;
01980        _data_->waiting_needed = _data_->_tmp14_;
01981        _data_->_tmp15_ = _data_->self->priv->cancellable_arr;
01982        _data_->_tmp15__length1 = _data_->self->priv->cancellable_arr_length1;
01983        _data_->_tmp16_ = _data_->_data8_->search_type;
01984        _data_->_tmp17_ = _data_->_tmp15_[_data_->_tmp16_];
01985        if (_data_->_tmp17_ != NULL) {
01986               _data_->_tmp18_ = _data_->self->priv->cancellable_arr;
01987               _data_->_tmp18__length1 = _data_->self->priv->cancellable_arr_length1;
01988               _data_->_tmp19_ = _data_->_data8_->search_type;
01989               _data_->_tmp20_ = _data_->_tmp18_[_data_->_tmp19_];
01990               g_cancellable_cancel (_data_->_tmp20_);
01991        }
01992        _data_->_tmp21_ = g_cancellable_new ();
01993        _data_->cancellable = _data_->_tmp21_;
01994        _data_->_tmp22_ = _data_->self->priv->cancellable_arr;
01995        _data_->_tmp22__length1 = _data_->self->priv->cancellable_arr_length1;
01996        _data_->_tmp23_ = _data_->_data8_->search_type;
01997        _data_->_tmp24_ = _data_->cancellable;
01998        _data_->_tmp25_ = _g_object_ref0 (_data_->_tmp24_);
01999        _g_object_unref0 (_data_->_tmp22_[_data_->_tmp23_]);
02000        _data_->_tmp22_[_data_->_tmp23_] = _data_->_tmp25_;
02001        _data_->_tmp26_ = _data_->_tmp22_[_data_->_tmp23_];
02002        _data_->_tmp27_ = _data_->waiting_needed;
02003        if (_data_->_tmp27_) {
02004               _data_->_tmp28_ = 0UL;
02005               _data_->_tmp28_ = g_signal_connect_data ((GObject*) _data_->self, "notify::view-type", (GCallback) ____lambda5__g_object_notify, block8_data_ref (_data_->_data8_), (GClosureNotify) block8_data_unref, 0);
02006               _data_->view_sig_id = _data_->_tmp28_;
02007               _data_->_state_ = 1;
02008               return FALSE;
02009               _state_1:
02010               ;
02011               _data_->_tmp29_ = _data_->view_sig_id;
02012               g_signal_handler_disconnect (_data_->self, _data_->_tmp29_);
02013        }
02014        g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _unity_scope_impl_schedule_search_changed_co_gsource_func, _data_, NULL);
02015        _data_->_state_ = 2;
02016        return FALSE;
02017        _state_2:
02018        ;
02019        _data_->_tmp30_ = _data_->cancellable;
02020        _data_->_tmp31_ = FALSE;
02021        _data_->_tmp31_ = g_cancellable_is_cancelled (_data_->_tmp30_);
02022        if (_data_->_tmp31_) {
02023               _g_object_unref0 (_data_->cancellable);
02024               block8_data_unref (_data_->_data8_);
02025               _data_->_data8_ = NULL;
02026               if (_data_->_state_ == 0) {
02027                      g_simple_async_result_complete_in_idle (_data_->_async_result);
02028               } else {
02029                      g_simple_async_result_complete (_data_->_async_result);
02030               }
02031               g_object_unref (_data_->_async_result);
02032               return FALSE;
02033        }
02034        _data_->_tmp32_ = _data_->self->priv->_owner;
02035        _data_->_tmp33_ = _data_->search;
02036        _data_->_tmp34_ = _data_->_data8_->search_type;
02037        _data_->_tmp35_ = _data_->cancellable;
02038        g_signal_emit_by_name (_data_->_tmp32_, "search-changed", _data_->_tmp33_, _data_->_tmp34_, _data_->_tmp35_);
02039        _g_object_unref0 (_data_->cancellable);
02040        block8_data_unref (_data_->_data8_);
02041        _data_->_data8_ = NULL;
02042        if (_data_->_state_ == 0) {
02043               g_simple_async_result_complete_in_idle (_data_->_async_result);
02044        } else {
02045               g_simple_async_result_complete (_data_->_async_result);
02046        }
02047        g_object_unref (_data_->_async_result);
02048        return FALSE;
02049 }
02050 
02051 
02052 void unity_scope_impl_update_search_key (UnityScopeImpl* self, UnityLensSearch* ls, UnitySearchType search_type) {
02053        UnitySearchType _tmp0_;
02054        UnityLensSearch* _tmp1_;
02055        UnitySearchType _tmp2_;
02056        gchar* _tmp3_ = NULL;
02057        gchar* search_key;
02058        gchar** _tmp4_;
02059        gint _tmp4__length1;
02060        UnitySearchType _tmp5_;
02061        gchar* _tmp6_;
02062        gchar* _tmp7_;
02063        UnityScope* _tmp8_;
02064        UnityLensSearch* _tmp9_;
02065        UnitySearchType _tmp10_;
02066        g_return_if_fail (self != NULL);
02067        g_return_if_fail (ls != NULL);
02068        _tmp0_ = search_type;
02069        g_return_if_fail (_tmp0_ < UNITY_SEARCH_TYPE_N_TYPES);
02070        _tmp1_ = ls;
02071        _tmp2_ = search_type;
02072        _tmp3_ = unity_scope_impl_get_search_key (self, _tmp1_, _tmp2_);
02073        search_key = _tmp3_;
02074        _tmp4_ = self->priv->search_keys;
02075        _tmp4__length1 = self->priv->search_keys_length1;
02076        _tmp5_ = search_type;
02077        _tmp6_ = g_strdup (search_key);
02078        _g_free0 (_tmp4_[_tmp5_]);
02079        _tmp4_[_tmp5_] = _tmp6_;
02080        _tmp7_ = _tmp4_[_tmp5_];
02081        _tmp8_ = self->priv->_owner;
02082        _tmp9_ = ls;
02083        _tmp10_ = search_type;
02084        unity_scope_set_last_search (_tmp8_, _tmp9_, _tmp10_);
02085        _g_free0 (search_key);
02086 }
02087 
02088 
02089 static gchar* unity_scope_impl_get_search_key (UnityScopeImpl* self, UnityLensSearch* ls, UnitySearchType search_type) {
02090        gchar* result = NULL;
02091        gchar* _tmp0_ = NULL;
02092        UnitySearchType _tmp1_;
02093        const gchar* _tmp8_;
02094        gchar* _tmp9_;
02095        gchar* search_key;
02096        g_return_val_if_fail (self != NULL, NULL);
02097        g_return_val_if_fail (ls != NULL, NULL);
02098        _tmp1_ = search_type;
02099        if (_tmp1_ == UNITY_SEARCH_TYPE_DEFAULT) {
02100               UnityScope* _tmp2_;
02101               UnityLensSearch* _tmp3_;
02102               gchar* _tmp4_ = NULL;
02103               _tmp2_ = self->priv->_owner;
02104               _tmp3_ = ls;
02105               g_signal_emit_by_name (_tmp2_, "generate-search-key::default", _tmp3_, &_tmp4_);
02106               _g_free0 (_tmp0_);
02107               _tmp0_ = _tmp4_;
02108        } else {
02109               UnityScope* _tmp5_;
02110               UnityLensSearch* _tmp6_;
02111               gchar* _tmp7_ = NULL;
02112               _tmp5_ = self->priv->_owner;
02113               _tmp6_ = ls;
02114               g_signal_emit_by_name (_tmp5_, "generate-search-key::global", _tmp6_, &_tmp7_);
02115               _g_free0 (_tmp0_);
02116               _tmp0_ = _tmp7_;
02117        }
02118        _tmp8_ = _tmp0_;
02119        _tmp9_ = g_strdup (_tmp8_);
02120        search_key = _tmp9_;
02121        result = search_key;
02122        _g_free0 (_tmp0_);
02123        return result;
02124 }
02125 
02126 
02127 void unity_scope_impl_invalidate_search (UnityScopeImpl* self, UnitySearchType search_type) {
02128        UnitySearchType _tmp0_;
02129        gchar** _tmp1_;
02130        gint _tmp1__length1;
02131        UnitySearchType _tmp2_;
02132        gchar* _tmp3_;
02133        g_return_if_fail (self != NULL);
02134        _tmp0_ = search_type;
02135        g_return_if_fail (_tmp0_ < UNITY_SEARCH_TYPE_N_TYPES);
02136        _tmp1_ = self->priv->search_keys;
02137        _tmp1__length1 = self->priv->search_keys_length1;
02138        _tmp2_ = search_type;
02139        _g_free0 (_tmp1_[_tmp2_]);
02140        _tmp1_[_tmp2_] = NULL;
02141        _tmp3_ = _tmp1_[_tmp2_];
02142 }
02143 
02144 
02145 static void unity_scope_impl_search_internal_data_free (gpointer _data) {
02146        UnityScopeImplSearchInternalData* _data_;
02147        _data_ = _data;
02148        _g_free0 (_data_->search_string);
02149        _g_hash_table_unref0 (_data_->hints);
02150        _g_hash_table_unref0 (_data_->result);
02151        _g_object_unref0 (_data_->self);
02152        g_slice_free (UnityScopeImplSearchInternalData, _data_);
02153 }
02154 
02155 
02156 static void unity_scope_impl_search_internal (UnityScopeImpl* self, const gchar* search_string, GHashTable* hints, UnitySearchType search_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02157        UnityScopeImplSearchInternalData* _data_;
02158        UnityScopeImpl* _tmp0_;
02159        const gchar* _tmp1_;
02160        gchar* _tmp2_;
02161        GHashTable* _tmp3_;
02162        GHashTable* _tmp4_;
02163        UnitySearchType _tmp5_;
02164        _data_ = g_slice_new0 (UnityScopeImplSearchInternalData);
02165        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_impl_search_internal);
02166        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_impl_search_internal_data_free);
02167        _tmp0_ = _g_object_ref0 (self);
02168        _data_->self = _tmp0_;
02169        _tmp1_ = search_string;
02170        _tmp2_ = g_strdup (_tmp1_);
02171        _data_->search_string = _tmp2_;
02172        _tmp3_ = hints;
02173        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
02174        _data_->hints = _tmp4_;
02175        _tmp5_ = search_type;
02176        _data_->search_type = _tmp5_;
02177        unity_scope_impl_search_internal_co (_data_);
02178 }
02179 
02180 
02181 static GHashTable* unity_scope_impl_search_internal_finish (UnityScopeImpl* self, GAsyncResult* _res_, GError** error) {
02182        GHashTable* result;
02183        UnityScopeImplSearchInternalData* _data_;
02184        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
02185               return NULL;
02186        }
02187        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
02188        result = _data_->result;
02189        _data_->result = NULL;
02190        return result;
02191 }
02192 
02193 
02194 static Block9Data* block9_data_ref (Block9Data* _data9_) {
02195        g_atomic_int_inc (&_data9_->_ref_count_);
02196        return _data9_;
02197 }
02198 
02199 
02200 static void block9_data_unref (void * _userdata_) {
02201        Block9Data* _data9_;
02202        _data9_ = (Block9Data*) _userdata_;
02203        if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
02204               UnityScopeImpl * self;
02205               self = _data9_->self;
02206               _g_object_unref0 (_data9_->s);
02207               _g_hash_table_unref0 (_data9_->_result_);
02208               _g_object_unref0 (self);
02209               g_slice_free (Block9Data, _data9_);
02210        }
02211 }
02212 
02213 
02214 static gpointer _g_variant_ref0 (gpointer self) {
02215        return self ? g_variant_ref (self) : NULL;
02216 }
02217 
02218 
02219 static void __lambda6_ (Block9Data* _data9_, UnityLensSearch* lens_search) {
02220        UnityScopeImpl * self;
02221        UnityLensSearch* _tmp0_;
02222        GHashTable* _tmp1_ = NULL;
02223        GHashTable* reply_hints;
02224        GHashTable* _tmp2_;
02225        GHashTable* _tmp12_;
02226        gchar* _tmp13_;
02227        UnityLensSearch* _tmp14_;
02228        DeeSerializableModel* _tmp15_;
02229        DeeSerializableModel* _tmp16_;
02230        guint64 _tmp17_ = 0ULL;
02231        GVariant* _tmp18_;
02232        self = _data9_->self;
02233        g_return_if_fail (lens_search != NULL);
02234        _tmp0_ = lens_search;
02235        _tmp1_ = unity_lens_search_get_reply_hints (_tmp0_);
02236        reply_hints = _tmp1_;
02237        _tmp2_ = reply_hints;
02238        if (_tmp2_ != NULL) {
02239               GHashTable* _tmp3_;
02240               GHashTableIter iter = {0};
02241               const gchar* key = NULL;
02242               GVariant* variant = NULL;
02243               _tmp3_ = reply_hints;
02244               g_hash_table_iter_init (&iter, _tmp3_);
02245               while (TRUE) {
02246                      gconstpointer _tmp4_ = NULL;
02247                      gconstpointer _tmp5_ = NULL;
02248                      gboolean _tmp6_ = FALSE;
02249                      GHashTable* _tmp7_;
02250                      const gchar* _tmp8_;
02251                      gchar* _tmp9_;
02252                      GVariant* _tmp10_;
02253                      GVariant* _tmp11_;
02254                      _tmp6_ = g_hash_table_iter_next (&iter, &_tmp4_, &_tmp5_);
02255                      key = _tmp4_;
02256                      variant = _tmp5_;
02257                      if (!_tmp6_) {
02258                             break;
02259                      }
02260                      _tmp7_ = _data9_->_result_;
02261                      _tmp8_ = key;
02262                      _tmp9_ = g_strdup (_tmp8_);
02263                      _tmp10_ = variant;
02264                      _tmp11_ = _g_variant_ref0 (_tmp10_);
02265                      g_hash_table_insert (_tmp7_, _tmp9_, _tmp11_);
02266               }
02267        }
02268        _tmp12_ = _data9_->_result_;
02269        _tmp13_ = g_strdup ("model-seqnum");
02270        _tmp14_ = lens_search;
02271        _tmp15_ = unity_lens_search_get_results_model (_tmp14_);
02272        _tmp16_ = _tmp15_;
02273        _tmp17_ = dee_serializable_model_get_seqnum (_tmp16_);
02274        _tmp18_ = g_variant_new_uint64 (_tmp17_);
02275        g_variant_ref_sink (_tmp18_);
02276        g_hash_table_insert (_tmp12_, _tmp13_, _tmp18_);
02277        unity_scope_impl_search_internal_co (_data9_->_async_data_);
02278        _g_hash_table_unref0 (reply_hints);
02279 }
02280 
02281 
02282 static void ___lambda6__unity_lens_search_finished (UnityLensSearch* _sender, gpointer self) {
02283        __lambda6_ (self, _sender);
02284 }
02285 
02286 
02287 static void ____lambda7_ (Block9Data* _data9_) {
02288        UnityScopeImpl * self;
02289        UnityLensSearch* _tmp0_;
02290        self = _data9_->self;
02291        _tmp0_ = _data9_->s;
02292        g_signal_emit_by_name (_tmp0_, "finished");
02293 }
02294 
02295 
02296 static void _____lambda7__unity_lens_search_finished (UnityLensSearch* _sender, gpointer self) {
02297        ____lambda7_ (self);
02298 }
02299 
02300 
02301 static gboolean _unity_scope_impl_search_internal_co_gsource_func (gpointer self) {
02302        gboolean result;
02303        result = unity_scope_impl_search_internal_co (self);
02304        return result;
02305 }
02306 
02307 
02308 static void __lambda8_ (Block9Data* _data9_) {
02309        UnityScopeImpl * self;
02310        UnityLensSearch* _tmp0_;
02311        gulong _tmp1_;
02312        self = _data9_->self;
02313        _tmp0_ = _data9_->s;
02314        _tmp1_ = _data9_->sig_id;
02315        g_signal_handler_block (_tmp0_, _tmp1_);
02316        g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _unity_scope_impl_search_internal_co_gsource_func, _data9_->_async_data_, NULL);
02317 }
02318 
02319 
02320 static void ___lambda8__gfunc (gconstpointer data, gpointer self) {
02321        __lambda8_ (self);
02322 }
02323 
02324 
02325 static gboolean unity_scope_impl_search_internal_co (UnityScopeImplSearchInternalData* _data_) {
02326        switch (_data_->_state_) {
02327               case 0:
02328               goto _state_0;
02329               case 1:
02330               goto _state_1;
02331               default:
02332               g_assert_not_reached ();
02333        }
02334        _state_0:
02335        _data_->_data9_ = g_slice_new0 (Block9Data);
02336        _data_->_data9_->_ref_count_ = 1;
02337        _data_->_data9_->self = g_object_ref (_data_->self);
02338        _data_->_data9_->_async_data_ = _data_;
02339        _data_->_tmp0_ = g_str_hash;
02340        _data_->_tmp1_ = g_str_equal;
02341        _data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, _g_variant_unref0_);
02342        _data_->_data9_->_result_ = _data_->_tmp2_;
02343        _data_->_tmp3_ = _data_->search_type;
02344        _data_->is_global_search = _data_->_tmp3_ == UNITY_SEARCH_TYPE_GLOBAL;
02345        _data_->_tmp5_ = _data_->is_global_search;
02346        if (_data_->_tmp5_) {
02347               _data_->_tmp6_ = _data_->self->_global_results_model;
02348               _data_->_tmp4_ = _data_->_tmp6_;
02349        } else {
02350               _data_->_tmp7_ = _data_->self->_results_model;
02351               _data_->_tmp4_ = _data_->_tmp7_;
02352        }
02353        _data_->_tmp8_ = _data_->search_string;
02354        _data_->_tmp9_ = _data_->hints;
02355        _data_->_tmp10_ = _data_->_tmp4_;
02356        _data_->_tmp11_ = unity_lens_search_new (_data_->_tmp8_, _data_->_tmp9_, _data_->_tmp10_);
02357        g_object_ref_sink (_data_->_tmp11_);
02358        _data_->_data9_->s = _data_->_tmp11_;
02359        _data_->_tmp12_ = _data_->_data9_->s;
02360        _data_->_tmp13_ = 0UL;
02361        _data_->_tmp13_ = g_signal_connect_data (_data_->_tmp12_, "finished", (GCallback) ___lambda6__unity_lens_search_finished, block9_data_ref (_data_->_data9_), (GClosureNotify) block9_data_unref, 0);
02362        _data_->_data9_->sig_id = _data_->_tmp13_;
02363        _data_->last_search = NULL;
02364        _data_->ls_sig_id = (gulong) 0;
02365        _data_->_tmp14_ = _data_->_data9_->s;
02366        _data_->_tmp15_ = _data_->search_type;
02367        _data_->_tmp16_ = NULL;
02368        _data_->_tmp16_ = unity_scope_impl_get_search_key (_data_->self, _data_->_tmp14_, _data_->_tmp15_);
02369        _data_->search_key = _data_->_tmp16_;
02370        _data_->_tmp19_ = _data_->search_key;
02371        if (_data_->_tmp19_ != NULL) {
02372               _data_->_tmp20_ = _data_->search_key;
02373               _data_->_tmp21_ = _data_->self->priv->search_keys;
02374               _data_->_tmp21__length1 = _data_->self->priv->search_keys_length1;
02375               _data_->_tmp22_ = _data_->search_type;
02376               _data_->_tmp23_ = _data_->_tmp21_[_data_->_tmp22_];
02377               _data_->_tmp18_ = g_strcmp0 (_data_->_tmp20_, _data_->_tmp23_) != 0;
02378        } else {
02379               _data_->_tmp18_ = FALSE;
02380        }
02381        _data_->_tmp24_ = _data_->_tmp18_;
02382        if (_data_->_tmp24_) {
02383               _data_->_tmp17_ = TRUE;
02384        } else {
02385               _data_->_tmp26_ = _data_->search_key;
02386               if (_data_->_tmp26_ == NULL) {
02387                      _data_->_tmp27_ = _data_->_data9_->s;
02388                      _data_->_tmp28_ = _data_->self->priv->_owner;
02389                      _data_->_tmp29_ = _data_->search_type;
02390                      _data_->_tmp30_ = NULL;
02391                      _data_->_tmp30_ = unity_scope_get_last_search (_data_->_tmp28_, _data_->_tmp29_);
02392                      _data_->_tmp31_ = FALSE;
02393                      _data_->_tmp31_ = unity_lens_search_equals (_data_->_tmp27_, _data_->_tmp30_);
02394                      _data_->_tmp25_ = !_data_->_tmp31_;
02395               } else {
02396                      _data_->_tmp25_ = FALSE;
02397               }
02398               _data_->_tmp32_ = _data_->_tmp25_;
02399               _data_->_tmp17_ = _data_->_tmp32_;
02400        }
02401        _data_->_tmp33_ = _data_->_tmp17_;
02402        if (_data_->_tmp33_) {
02403               _data_->_tmp34_ = _data_->_data9_->s;
02404               _data_->_tmp35_ = _data_->search_type;
02405               unity_scope_impl_schedule_search_changed (_data_->self, _data_->_tmp34_, _data_->_tmp35_, FALSE, NULL, NULL);
02406               _data_->_tmp36_ = _data_->self->priv->search_keys;
02407               _data_->_tmp36__length1 = _data_->self->priv->search_keys_length1;
02408               _data_->_tmp37_ = _data_->search_type;
02409               _data_->_tmp38_ = _data_->search_key;
02410               _data_->_tmp39_ = g_strdup (_data_->_tmp38_);
02411               _g_free0 (_data_->_tmp36_[_data_->_tmp37_]);
02412               _data_->_tmp36_[_data_->_tmp37_] = _data_->_tmp39_;
02413               _data_->_tmp40_ = _data_->_tmp36_[_data_->_tmp37_];
02414               _data_->_tmp41_ = _data_->self->priv->_owner;
02415               _data_->_tmp42_ = _data_->_data9_->s;
02416               _data_->_tmp43_ = _data_->search_type;
02417               unity_scope_set_last_search (_data_->_tmp41_, _data_->_tmp42_, _data_->_tmp43_);
02418        } else {
02419               _data_->_tmp44_ = _data_->self->priv->_owner;
02420               _data_->_tmp45_ = _data_->search_type;
02421               _data_->_tmp46_ = NULL;
02422               _data_->_tmp46_ = unity_scope_get_last_search (_data_->_tmp44_, _data_->_tmp45_);
02423               _data_->_tmp47_ = _g_object_ref0 (_data_->_tmp46_);
02424               _g_object_unref0 (_data_->last_search);
02425               _data_->last_search = _data_->_tmp47_;
02426               _data_->_tmp49_ = _data_->last_search;
02427               if (_data_->_tmp49_ != NULL) {
02428                      _data_->_tmp50_ = _data_->last_search;
02429                      _data_->_tmp51_ = FALSE;
02430                      _data_->_tmp51_ = unity_lens_search_was_finished (_data_->_tmp50_);
02431                      _data_->_tmp48_ = !_data_->_tmp51_;
02432               } else {
02433                      _data_->_tmp48_ = FALSE;
02434               }
02435               _data_->_tmp52_ = _data_->_tmp48_;
02436               if (_data_->_tmp52_) {
02437                      _data_->_tmp53_ = _data_->last_search;
02438                      _data_->_tmp54_ = 0UL;
02439                      _data_->_tmp54_ = g_signal_connect_data (_data_->_tmp53_, "finished", (GCallback) _____lambda7__unity_lens_search_finished, block9_data_ref (_data_->_data9_), (GClosureNotify) block9_data_unref, 0);
02440                      _data_->ls_sig_id = _data_->_tmp54_;
02441                      _data_->_tmp56_ = _data_->is_global_search;
02442                      if (_data_->_tmp56_) {
02443                             _data_->_tmp55_ = UNITY_PROTOCOL_VIEW_TYPE_HOME_VIEW;
02444                      } else {
02445                             _data_->_tmp55_ = UNITY_PROTOCOL_VIEW_TYPE_LENS_VIEW;
02446                      }
02447                      _data_->_tmp57_ = _data_->_tmp55_;
02448                      _data_->current_view = _data_->_tmp57_;
02449                      _data_->_tmp58_ = _data_->self->priv->_view_type;
02450                      _data_->_tmp59_ = _data_->current_view;
02451                      if (_data_->_tmp58_ != _data_->_tmp59_) {
02452                             _data_->_tmp60_ = _data_->self->priv->_view_type;
02453                             _data_->old_view = _data_->_tmp60_;
02454                             _data_->_tmp61_ = _data_->current_view;
02455                             unity_protocol_scope_service_set_view_type ((UnityProtocolScopeService*) _data_->self, (guint) _data_->_tmp61_, NULL, NULL);
02456                             _data_->_tmp62_ = _data_->old_view;
02457                             unity_protocol_scope_service_set_view_type ((UnityProtocolScopeService*) _data_->self, (guint) _data_->_tmp62_, NULL, NULL);
02458                      }
02459               } else {
02460                      _data_->_tmp63_ = _data_->_data9_->_result_;
02461                      _data_->_tmp64_ = _g_hash_table_ref0 (_data_->_tmp63_);
02462                      _data_->result = _data_->_tmp64_;
02463                      _g_free0 (_data_->search_key);
02464                      _g_object_unref0 (_data_->last_search);
02465                      block9_data_unref (_data_->_data9_);
02466                      _data_->_data9_ = NULL;
02467                      if (_data_->_state_ == 0) {
02468                             g_simple_async_result_complete_in_idle (_data_->_async_result);
02469                      } else {
02470                             g_simple_async_result_complete (_data_->_async_result);
02471                      }
02472                      g_object_unref (_data_->_async_result);
02473                      return FALSE;
02474               }
02475        }
02476        _data_->_tmp65_ = _data_->self->priv->cancellable_arr;
02477        _data_->_tmp65__length1 = _data_->self->priv->cancellable_arr_length1;
02478        _data_->_tmp66_ = _data_->search_type;
02479        _data_->_tmp67_ = _data_->_tmp65_[_data_->_tmp66_];
02480        _data_->_tmp68_ = _g_object_ref0 (_data_->_tmp67_);
02481        _data_->cancellable = _data_->_tmp68_;
02482        _data_->_tmp69_ = _data_->cancellable;
02483        _data_->_tmp70_ = 0UL;
02484        _data_->_tmp70_ = g_cancellable_connect (_data_->_tmp69_, (GCallback) ___lambda8__gfunc, block9_data_ref (_data_->_data9_), block9_data_unref);
02485        _data_->canc_id = _data_->_tmp70_;
02486        _data_->_state_ = 1;
02487        return FALSE;
02488        _state_1:
02489        ;
02490        _data_->_tmp71_ = _data_->ls_sig_id;
02491        if (_data_->_tmp71_ != ((gulong) 0)) {
02492               _data_->_tmp72_ = _data_->last_search;
02493               _data_->_tmp73_ = _data_->ls_sig_id;
02494               g_signal_handler_disconnect (_data_->_tmp72_, _data_->_tmp73_);
02495        }
02496        _data_->_tmp74_ = _data_->_data9_->s;
02497        _data_->_tmp75_ = _data_->_data9_->sig_id;
02498        g_signal_handler_disconnect (_data_->_tmp74_, _data_->_tmp75_);
02499        _data_->_tmp76_ = _data_->cancellable;
02500        _data_->_tmp77_ = _data_->canc_id;
02501        g_cancellable_disconnect (_data_->_tmp76_, _data_->_tmp77_);
02502        _data_->_tmp78_ = _data_->cancellable;
02503        _data_->_tmp79_ = FALSE;
02504        _data_->_tmp79_ = g_cancellable_is_cancelled (_data_->_tmp78_);
02505        if (_data_->_tmp79_) {
02506               _data_->_tmp80_ = _data_->search_string;
02507               _data_->_tmp81_ = g_error_new (UNITY_PROTOCOL_SCOPE_ERROR, UNITY_PROTOCOL_SCOPE_ERROR_SEARCH_CANCELLED, "Search '%s' was cancelled", _data_->_tmp80_);
02508               _data_->_inner_error_ = _data_->_tmp81_;
02509               if (_data_->_inner_error_->domain == UNITY_PROTOCOL_SCOPE_ERROR) {
02510                      g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
02511                      g_error_free (_data_->_inner_error_);
02512                      _g_object_unref0 (_data_->cancellable);
02513                      _g_free0 (_data_->search_key);
02514                      _g_object_unref0 (_data_->last_search);
02515                      block9_data_unref (_data_->_data9_);
02516                      _data_->_data9_ = NULL;
02517                      if (_data_->_state_ == 0) {
02518                             g_simple_async_result_complete_in_idle (_data_->_async_result);
02519                      } else {
02520                             g_simple_async_result_complete (_data_->_async_result);
02521                      }
02522                      g_object_unref (_data_->_async_result);
02523                      return FALSE;
02524               } else {
02525                      _g_object_unref0 (_data_->cancellable);
02526                      _g_free0 (_data_->search_key);
02527                      _g_object_unref0 (_data_->last_search);
02528                      block9_data_unref (_data_->_data9_);
02529                      _data_->_data9_ = NULL;
02530                      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);
02531                      g_clear_error (&_data_->_inner_error_);
02532                      return FALSE;
02533               }
02534        }
02535        _data_->_tmp82_ = _data_->_data9_->_result_;
02536        _data_->_tmp83_ = _g_hash_table_ref0 (_data_->_tmp82_);
02537        _data_->result = _data_->_tmp83_;
02538        _g_object_unref0 (_data_->cancellable);
02539        _g_free0 (_data_->search_key);
02540        _g_object_unref0 (_data_->last_search);
02541        block9_data_unref (_data_->_data9_);
02542        _data_->_data9_ = NULL;
02543        if (_data_->_state_ == 0) {
02544               g_simple_async_result_complete_in_idle (_data_->_async_result);
02545        } else {
02546               g_simple_async_result_complete (_data_->_async_result);
02547        }
02548        g_object_unref (_data_->_async_result);
02549        return FALSE;
02550        _g_object_unref0 (_data_->cancellable);
02551        _g_free0 (_data_->search_key);
02552        _g_object_unref0 (_data_->last_search);
02553        block9_data_unref (_data_->_data9_);
02554        _data_->_data9_ = NULL;
02555        if (_data_->_state_ == 0) {
02556               g_simple_async_result_complete_in_idle (_data_->_async_result);
02557        } else {
02558               g_simple_async_result_complete (_data_->_async_result);
02559        }
02560        g_object_unref (_data_->_async_result);
02561        return FALSE;
02562 }
02563 
02564 
02565 static void unity_scope_impl_real_search_data_free (gpointer _data) {
02566        UnityScopeImplSearchData* _data_;
02567        _data_ = _data;
02568        _g_free0 (_data_->search_string);
02569        _g_hash_table_unref0 (_data_->hints);
02570        _g_hash_table_unref0 (_data_->result);
02571        _g_object_unref0 (_data_->self);
02572        g_slice_free (UnityScopeImplSearchData, _data_);
02573 }
02574 
02575 
02576 static void unity_scope_impl_real_search (UnityProtocolScopeService* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02577        UnityScopeImpl * self;
02578        UnityScopeImplSearchData* _data_;
02579        UnityScopeImpl* _tmp0_;
02580        const gchar* _tmp1_;
02581        gchar* _tmp2_;
02582        GHashTable* _tmp3_;
02583        GHashTable* _tmp4_;
02584        self = (UnityScopeImpl*) base;
02585        _data_ = g_slice_new0 (UnityScopeImplSearchData);
02586        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_impl_real_search);
02587        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_impl_real_search_data_free);
02588        _tmp0_ = _g_object_ref0 (self);
02589        _data_->self = _tmp0_;
02590        _tmp1_ = search_string;
02591        _tmp2_ = g_strdup (_tmp1_);
02592        _data_->search_string = _tmp2_;
02593        _tmp3_ = hints;
02594        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
02595        _data_->hints = _tmp4_;
02596        unity_scope_impl_real_search_co (_data_);
02597 }
02598 
02599 
02600 static GHashTable* unity_scope_impl_real_search_finish (UnityProtocolScopeService* base, GAsyncResult* _res_, GError** error) {
02601        GHashTable* result;
02602        UnityScopeImplSearchData* _data_;
02603        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
02604               return NULL;
02605        }
02606        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
02607        result = _data_->result;
02608        _data_->result = NULL;
02609        return result;
02610 }
02611 
02612 
02613 static void unity_scope_impl_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
02614        UnityScopeImplSearchData* _data_;
02615        _data_ = _user_data_;
02616        _data_->_source_object_ = source_object;
02617        _data_->_res_ = _res_;
02618        unity_scope_impl_real_search_co (_data_);
02619 }
02620 
02621 
02622 static gboolean unity_scope_impl_real_search_co (UnityScopeImplSearchData* _data_) {
02623        switch (_data_->_state_) {
02624               case 0:
02625               goto _state_0;
02626               case 1:
02627               goto _state_1;
02628               default:
02629               g_assert_not_reached ();
02630        }
02631        _state_0:
02632        _data_->_tmp0_ = _data_->search_string;
02633        _data_->_tmp1_ = _data_->hints;
02634        _data_->_state_ = 1;
02635        unity_scope_impl_search_internal (_data_->self, _data_->_tmp0_, _data_->_tmp1_, UNITY_SEARCH_TYPE_DEFAULT, unity_scope_impl_search_ready, _data_);
02636        return FALSE;
02637        _state_1:
02638        _data_->_tmp2_ = NULL;
02639        _data_->_tmp2_ = unity_scope_impl_search_internal_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
02640        _data_->_tmp3_ = _data_->_tmp2_;
02641        if (_data_->_inner_error_ != NULL) {
02642               if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == UNITY_PROTOCOL_SCOPE_ERROR)) {
02643                      g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
02644                      g_error_free (_data_->_inner_error_);
02645                      _g_hash_table_unref0 (_data_->_result_);
02646                      if (_data_->_state_ == 0) {
02647                             g_simple_async_result_complete_in_idle (_data_->_async_result);
02648                      } else {
02649                             g_simple_async_result_complete (_data_->_async_result);
02650                      }
02651                      g_object_unref (_data_->_async_result);
02652                      return FALSE;
02653               } else {
02654                      _g_hash_table_unref0 (_data_->_result_);
02655                      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);
02656                      g_clear_error (&_data_->_inner_error_);
02657                      return FALSE;
02658               }
02659        }
02660        _g_hash_table_unref0 (_data_->_result_);
02661        _data_->_result_ = _data_->_tmp3_;
02662        _data_->result = _data_->_result_;
02663        if (_data_->_state_ == 0) {
02664               g_simple_async_result_complete_in_idle (_data_->_async_result);
02665        } else {
02666               g_simple_async_result_complete (_data_->_async_result);
02667        }
02668        g_object_unref (_data_->_async_result);
02669        return FALSE;
02670        _g_hash_table_unref0 (_data_->_result_);
02671        if (_data_->_state_ == 0) {
02672               g_simple_async_result_complete_in_idle (_data_->_async_result);
02673        } else {
02674               g_simple_async_result_complete (_data_->_async_result);
02675        }
02676        g_object_unref (_data_->_async_result);
02677        return FALSE;
02678 }
02679 
02680 
02681 static void unity_scope_impl_real_global_search_data_free (gpointer _data) {
02682        UnityScopeImplGlobalSearchData* _data_;
02683        _data_ = _data;
02684        _g_free0 (_data_->search_string);
02685        _g_hash_table_unref0 (_data_->hints);
02686        _g_hash_table_unref0 (_data_->result);
02687        _g_object_unref0 (_data_->self);
02688        g_slice_free (UnityScopeImplGlobalSearchData, _data_);
02689 }
02690 
02691 
02692 static void unity_scope_impl_real_global_search (UnityProtocolScopeService* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02693        UnityScopeImpl * self;
02694        UnityScopeImplGlobalSearchData* _data_;
02695        UnityScopeImpl* _tmp0_;
02696        const gchar* _tmp1_;
02697        gchar* _tmp2_;
02698        GHashTable* _tmp3_;
02699        GHashTable* _tmp4_;
02700        self = (UnityScopeImpl*) base;
02701        _data_ = g_slice_new0 (UnityScopeImplGlobalSearchData);
02702        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_impl_real_global_search);
02703        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_impl_real_global_search_data_free);
02704        _tmp0_ = _g_object_ref0 (self);
02705        _data_->self = _tmp0_;
02706        _tmp1_ = search_string;
02707        _tmp2_ = g_strdup (_tmp1_);
02708        _data_->search_string = _tmp2_;
02709        _tmp3_ = hints;
02710        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
02711        _data_->hints = _tmp4_;
02712        unity_scope_impl_real_global_search_co (_data_);
02713 }
02714 
02715 
02716 static GHashTable* unity_scope_impl_real_global_search_finish (UnityProtocolScopeService* base, GAsyncResult* _res_, GError** error) {
02717        GHashTable* result;
02718        UnityScopeImplGlobalSearchData* _data_;
02719        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
02720               return NULL;
02721        }
02722        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
02723        result = _data_->result;
02724        _data_->result = NULL;
02725        return result;
02726 }
02727 
02728 
02729 static void unity_scope_impl_global_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
02730        UnityScopeImplGlobalSearchData* _data_;
02731        _data_ = _user_data_;
02732        _data_->_source_object_ = source_object;
02733        _data_->_res_ = _res_;
02734        unity_scope_impl_real_global_search_co (_data_);
02735 }
02736 
02737 
02738 static gboolean unity_scope_impl_real_global_search_co (UnityScopeImplGlobalSearchData* _data_) {
02739        switch (_data_->_state_) {
02740               case 0:
02741               goto _state_0;
02742               case 1:
02743               goto _state_1;
02744               default:
02745               g_assert_not_reached ();
02746        }
02747        _state_0:
02748        _data_->_tmp0_ = _data_->search_string;
02749        _data_->_tmp1_ = _data_->hints;
02750        _data_->_state_ = 1;
02751        unity_scope_impl_search_internal (_data_->self, _data_->_tmp0_, _data_->_tmp1_, UNITY_SEARCH_TYPE_GLOBAL, unity_scope_impl_global_search_ready, _data_);
02752        return FALSE;
02753        _state_1:
02754        _data_->_tmp2_ = NULL;
02755        _data_->_tmp2_ = unity_scope_impl_search_internal_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
02756        _data_->_tmp3_ = _data_->_tmp2_;
02757        if (_data_->_inner_error_ != NULL) {
02758               if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == UNITY_PROTOCOL_SCOPE_ERROR)) {
02759                      g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
02760                      g_error_free (_data_->_inner_error_);
02761                      _g_hash_table_unref0 (_data_->_result_);
02762                      if (_data_->_state_ == 0) {
02763                             g_simple_async_result_complete_in_idle (_data_->_async_result);
02764                      } else {
02765                             g_simple_async_result_complete (_data_->_async_result);
02766                      }
02767                      g_object_unref (_data_->_async_result);
02768                      return FALSE;
02769               } else {
02770                      _g_hash_table_unref0 (_data_->_result_);
02771                      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);
02772                      g_clear_error (&_data_->_inner_error_);
02773                      return FALSE;
02774               }
02775        }
02776        _g_hash_table_unref0 (_data_->_result_);
02777        _data_->_result_ = _data_->_tmp3_;
02778        _data_->result = _data_->_result_;
02779        if (_data_->_state_ == 0) {
02780               g_simple_async_result_complete_in_idle (_data_->_async_result);
02781        } else {
02782               g_simple_async_result_complete (_data_->_async_result);
02783        }
02784        g_object_unref (_data_->_async_result);
02785        return FALSE;
02786        _g_hash_table_unref0 (_data_->_result_);
02787        if (_data_->_state_ == 0) {
02788               g_simple_async_result_complete_in_idle (_data_->_async_result);
02789        } else {
02790               g_simple_async_result_complete (_data_->_async_result);
02791        }
02792        g_object_unref (_data_->_async_result);
02793        return FALSE;
02794 }
02795 
02796 
02797 static gpointer _g_ptr_array_ref0 (gpointer self) {
02798        return self ? g_ptr_array_ref (self) : NULL;
02799 }
02800 
02801 
02802 static gint g_ptr_array_get_length (GPtrArray* self) {
02803        gint result;
02804        guint _tmp0_;
02805        g_return_val_if_fail (self != NULL, 0);
02806        _tmp0_ = self->len;
02807        result = (gint) _tmp0_;
02808        return result;
02809 }
02810 
02811 
02812 static void g_ptr_array_set_length (GPtrArray* self, gint value) {
02813        gint _tmp0_;
02814        g_return_if_fail (self != NULL);
02815        _tmp0_ = value;
02816        g_ptr_array_set_size (self, _tmp0_);
02817 }
02818 
02819 
02820 UnityPreview* unity_scope_impl_preview_internal (UnityScopeImpl* self, const gchar* uri) {
02821        UnityPreview* result = NULL;
02822        UnityScope* _tmp0_;
02823        const gchar* _tmp1_;
02824        UnityPreview* _tmp2_ = NULL;
02825        UnityPreview* response;
02826        UnityPreview* _tmp3_;
02827        UnityPreview* _tmp6_;
02828        GPtrArray* _tmp7_ = NULL;
02829        GPtrArray* _tmp8_;
02830        GPtrArray* actions;
02831        g_return_val_if_fail (self != NULL, NULL);
02832        g_return_val_if_fail (uri != NULL, NULL);
02833        _tmp0_ = self->priv->_owner;
02834        _tmp1_ = uri;
02835        g_signal_emit_by_name (_tmp0_, "preview-uri", _tmp1_, &_tmp2_);
02836        response = _tmp2_;
02837        _tmp3_ = response;
02838        if (_tmp3_ == NULL) {
02839               const gchar* _tmp4_;
02840               UnityGenericPreview* _tmp5_;
02841               _tmp4_ = uri;
02842               _tmp5_ = unity_generic_preview_new (_tmp4_, "", NULL);
02843               _g_object_unref0 (response);
02844               response = (UnityPreview*) _tmp5_;
02845        }
02846        _tmp6_ = response;
02847        _tmp7_ = unity_preview_get_actions (_tmp6_);
02848        _tmp8_ = _g_ptr_array_ref0 (_tmp7_);
02849        actions = _tmp8_;
02850        {
02851               guint i;
02852               i = (guint) 0;
02853               {
02854                      gboolean _tmp9_;
02855                      _tmp9_ = TRUE;
02856                      while (TRUE) {
02857                             gboolean _tmp10_;
02858                             guint _tmp12_;
02859                             GPtrArray* _tmp13_;
02860                             gint _tmp14_;
02861                             gint _tmp15_;
02862                             GPtrArray* _tmp16_;
02863                             guint _tmp17_;
02864                             gconstpointer _tmp18_ = NULL;
02865                             UnityPreviewAction* action;
02866                             GHashTable* _tmp19_;
02867                             UnityPreviewAction* _tmp20_;
02868                             const gchar* _tmp21_;
02869                             const gchar* _tmp22_;
02870                             gchar* _tmp23_;
02871                             UnityPreviewAction* _tmp24_;
02872                             UnityPreviewAction* _tmp25_;
02873                             _tmp10_ = _tmp9_;
02874                             if (!_tmp10_) {
02875                                    guint _tmp11_;
02876                                    _tmp11_ = i;
02877                                    i = _tmp11_ + 1;
02878                             }
02879                             _tmp9_ = FALSE;
02880                             _tmp12_ = i;
02881                             _tmp13_ = actions;
02882                             _tmp14_ = g_ptr_array_get_length (_tmp13_);
02883                             _tmp15_ = _tmp14_;
02884                             if (!(_tmp12_ < ((guint) _tmp15_))) {
02885                                    break;
02886                             }
02887                             _tmp16_ = actions;
02888                             _tmp17_ = i;
02889                             _tmp18_ = g_ptr_array_index (_tmp16_, _tmp17_);
02890                             action = (UnityPreviewAction*) _tmp18_;
02891                             _tmp19_ = self->priv->_action_map;
02892                             _tmp20_ = action;
02893                             _tmp21_ = unity_preview_action_get_id (_tmp20_);
02894                             _tmp22_ = _tmp21_;
02895                             _tmp23_ = g_strdup (_tmp22_);
02896                             _tmp24_ = action;
02897                             _tmp25_ = _g_object_ref0 (_tmp24_);
02898                             g_hash_table_insert (_tmp19_, _tmp23_, _tmp25_);
02899                      }
02900               }
02901        }
02902        result = response;
02903        _g_ptr_array_unref0 (actions);
02904        return result;
02905 }
02906 
02907 
02908 UnityActivationResponse* unity_scope_impl_activate_action (UnityScopeImpl* self, const gchar* action_id, const gchar* uri) {
02909        UnityActivationResponse* result = NULL;
02910        UnityActivationResponse* response;
02911        GHashTable* _tmp0_;
02912        const gchar* _tmp1_;
02913        gconstpointer _tmp2_ = NULL;
02914        UnityPreviewAction* _tmp3_;
02915        UnityPreviewAction* action;
02916        UnityPreviewAction* _tmp4_;
02917        g_return_val_if_fail (self != NULL, NULL);
02918        g_return_val_if_fail (action_id != NULL, NULL);
02919        g_return_val_if_fail (uri != NULL, NULL);
02920        response = NULL;
02921        _tmp0_ = self->priv->_action_map;
02922        _tmp1_ = action_id;
02923        _tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
02924        _tmp3_ = _g_object_ref0 ((UnityPreviewAction*) _tmp2_);
02925        action = _tmp3_;
02926        _tmp4_ = action;
02927        if (_tmp4_ != NULL) {
02928               UnityPreviewAction* _tmp5_;
02929               const gchar* _tmp6_;
02930               UnityActivationResponse* _tmp7_ = NULL;
02931               _tmp5_ = action;
02932               _tmp6_ = uri;
02933               g_signal_emit_by_name (_tmp5_, "activated", _tmp6_, &_tmp7_);
02934               _g_object_unref0 (response);
02935               response = _tmp7_;
02936        } else {
02937               const gchar* _tmp8_;
02938               _tmp8_ = action_id;
02939               g_warning ("unity-scope-private.vala:584: Cannot find PreviewAction with id: %s", _tmp8_);
02940        }
02941        result = response;
02942        _g_object_unref0 (action);
02943        return result;
02944 }
02945 
02946 
02947 static void unity_scope_impl_real_set_view_type_data_free (gpointer _data) {
02948        UnityScopeImplSetViewTypeData* _data_;
02949        _data_ = _data;
02950        _g_object_unref0 (_data_->self);
02951        g_slice_free (UnityScopeImplSetViewTypeData, _data_);
02952 }
02953 
02954 
02955 static void unity_scope_impl_real_set_view_type (UnityProtocolScopeService* base, guint view_type_id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02956        UnityScopeImpl * self;
02957        UnityScopeImplSetViewTypeData* _data_;
02958        UnityScopeImpl* _tmp0_;
02959        guint _tmp1_;
02960        self = (UnityScopeImpl*) base;
02961        _data_ = g_slice_new0 (UnityScopeImplSetViewTypeData);
02962        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_impl_real_set_view_type);
02963        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_impl_real_set_view_type_data_free);
02964        _tmp0_ = _g_object_ref0 (self);
02965        _data_->self = _tmp0_;
02966        _tmp1_ = view_type_id;
02967        _data_->view_type_id = _tmp1_;
02968        unity_scope_impl_real_set_view_type_co (_data_);
02969 }
02970 
02971 
02972 static void unity_scope_impl_real_set_view_type_finish (UnityProtocolScopeService* base, GAsyncResult* _res_, GError** error) {
02973        UnityScopeImplSetViewTypeData* _data_;
02974        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
02975               return;
02976        }
02977        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
02978 }
02979 
02980 
02981 static gboolean unity_scope_impl_real_set_view_type_co (UnityScopeImplSetViewTypeData* _data_) {
02982        switch (_data_->_state_) {
02983               case 0:
02984               goto _state_0;
02985               default:
02986               g_assert_not_reached ();
02987        }
02988        _state_0:
02989        _data_->_tmp0_ = _data_->view_type_id;
02990        _data_->view_type = (UnityProtocolViewType) _data_->_tmp0_;
02991        _data_->_tmp1_ = _data_->view_type;
02992        unity_scope_impl_set_view_type (_data_->self, _data_->_tmp1_);
02993        _data_->_tmp3_ = _data_->view_type;
02994        if (_data_->_tmp3_ == UNITY_PROTOCOL_VIEW_TYPE_LENS_VIEW) {
02995               _data_->_tmp2_ = TRUE;
02996        } else {
02997               _data_->_tmp5_ = _data_->view_type;
02998               if (_data_->_tmp5_ == UNITY_PROTOCOL_VIEW_TYPE_HOME_VIEW) {
02999                      _data_->_tmp6_ = _data_->self->priv->_owner;
03000                      _data_->_tmp7_ = unity_scope_get_search_in_global (_data_->_tmp6_);
03001                      _data_->_tmp8_ = _data_->_tmp7_;
03002                      _data_->_tmp4_ = _data_->_tmp8_;
03003               } else {
03004                      _data_->_tmp4_ = FALSE;
03005               }
03006               _data_->_tmp9_ = _data_->_tmp4_;
03007               _data_->_tmp2_ = _data_->_tmp9_;
03008        }
03009        _data_->_tmp10_ = _data_->self->priv->_owner;
03010        _data_->_tmp11_ = _data_->_tmp2_;
03011        unity_scope_set_active (_data_->_tmp10_, _data_->_tmp11_);
03012        if (_data_->_state_ == 0) {
03013               g_simple_async_result_complete_in_idle (_data_->_async_result);
03014        } else {
03015               g_simple_async_result_complete (_data_->_async_result);
03016        }
03017        g_object_unref (_data_->_async_result);
03018        return FALSE;
03019 }
03020 
03021 
03022 static void unity_scope_impl_real_set_active_sources_data_free (gpointer _data) {
03023        UnityScopeImplSetActiveSourcesData* _data_;
03024        _data_ = _data;
03025        _g_object_unref0 (_data_->self);
03026        g_slice_free (UnityScopeImplSetActiveSourcesData, _data_);
03027 }
03028 
03029 
03030 static void unity_scope_impl_real_set_active_sources (UnityProtocolScopeService* base, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_) {
03031        UnityScopeImpl * self;
03032        UnityScopeImplSetActiveSourcesData* _data_;
03033        UnityScopeImpl* _tmp0_;
03034        gchar** _tmp1_;
03035        gint _tmp1__length1;
03036        self = (UnityScopeImpl*) base;
03037        _data_ = g_slice_new0 (UnityScopeImplSetActiveSourcesData);
03038        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_impl_real_set_active_sources);
03039        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_impl_real_set_active_sources_data_free);
03040        _tmp0_ = _g_object_ref0 (self);
03041        _data_->self = _tmp0_;
03042        _tmp1_ = sources;
03043        _tmp1__length1 = sources_length1;
03044        _data_->sources = _tmp1_;
03045        _data_->sources_length1 = _tmp1__length1;
03046        unity_scope_impl_real_set_active_sources_co (_data_);
03047 }
03048 
03049 
03050 static void unity_scope_impl_real_set_active_sources_finish (UnityProtocolScopeService* base, GAsyncResult* _res_, GError** error) {
03051        UnityScopeImplSetActiveSourcesData* _data_;
03052        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
03053               return;
03054        }
03055        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
03056 }
03057 
03058 
03059 static gboolean unity_scope_impl_real_set_active_sources_co (UnityScopeImplSetActiveSourcesData* _data_) {
03060        switch (_data_->_state_) {
03061               case 0:
03062               goto _state_0;
03063               default:
03064               g_assert_not_reached ();
03065        }
03066        _state_0:
03067        _data_->_tmp0_ = _data_->self->priv->_owner;
03068        _data_->_tmp1_ = _data_->sources;
03069        _data_->_tmp1__length1 = _data_->sources_length1;
03070        unity_scope_set_active_sources_internal (_data_->_tmp0_, _data_->_tmp1_, _data_->_tmp1__length1);
03071        if (_data_->_state_ == 0) {
03072               g_simple_async_result_complete_in_idle (_data_->_async_result);
03073        } else {
03074               g_simple_async_result_complete (_data_->_async_result);
03075        }
03076        g_object_unref (_data_->_async_result);
03077        return FALSE;
03078 }
03079 
03080 
03081 static UnityScope* unity_scope_impl_get_owner (UnityScopeImpl* self) {
03082        UnityScope* result;
03083        UnityScope* _tmp0_;
03084        g_return_val_if_fail (self != NULL, NULL);
03085        _tmp0_ = self->priv->_owner;
03086        result = _tmp0_;
03087        return result;
03088 }
03089 
03090 
03091 static void unity_scope_impl_set_owner (UnityScopeImpl* self, UnityScope* value) {
03092        UnityScope* _tmp0_;
03093        UnityScope* _tmp1_;
03094        g_return_if_fail (self != NULL);
03095        _tmp0_ = value;
03096        _tmp1_ = _g_object_ref0 (_tmp0_);
03097        _g_object_unref0 (self->priv->_owner);
03098        self->priv->_owner = _tmp1_;
03099        g_object_notify ((GObject *) self, "owner");
03100 }
03101 
03102 
03103 UnityProtocolViewType unity_scope_impl_get_view_type (UnityScopeImpl* self) {
03104        UnityProtocolViewType result;
03105        UnityProtocolViewType _tmp0_;
03106        g_return_val_if_fail (self != NULL, 0);
03107        _tmp0_ = self->priv->_view_type;
03108        result = _tmp0_;
03109        return result;
03110 }
03111 
03112 
03113 void unity_scope_impl_set_view_type (UnityScopeImpl* self, UnityProtocolViewType value) {
03114        UnityProtocolViewType _tmp0_;
03115        g_return_if_fail (self != NULL);
03116        _tmp0_ = value;
03117        self->priv->_view_type = _tmp0_;
03118        g_object_notify ((GObject *) self, "view-type");
03119 }
03120 
03121 
03122 static void _unity_scope_impl_queue_info_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
03123        unity_scope_impl_queue_info_changed (self);
03124 }
03125 
03126 
03127 static void _unity_scope_impl_queue_info_changed_unity_filter_changed (UnityFilter* _sender, gpointer self) {
03128        unity_scope_impl_queue_info_changed (self);
03129 }
03130 
03131 
03132 static void _g_object_unref0_ (gpointer var) {
03133        (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
03134 }
03135 
03136 
03137 static GObject * unity_scope_impl_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
03138        GObject * obj;
03139        GObjectClass * parent_class;
03140        UnityScopeImpl * self;
03141        UnityScope* _tmp0_;
03142        UnityScope* _tmp1_;
03143        UnityScope* _tmp2_;
03144        UnityOptionsFilter* _tmp3_;
03145        UnityOptionsFilter* _tmp4_;
03146        GHashFunc _tmp5_;
03147        GEqualFunc _tmp6_;
03148        GHashTable* _tmp7_;
03149        parent_class = G_OBJECT_CLASS (unity_scope_impl_parent_class);
03150        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
03151        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SCOPE_IMPL, UnityScopeImpl);
03152        _tmp0_ = self->priv->_owner;
03153        g_signal_connect_object ((GObject*) _tmp0_, "notify::search-in-global", (GCallback) _unity_scope_impl_queue_info_changed_g_object_notify, self, 0);
03154        _tmp1_ = self->priv->_owner;
03155        g_signal_connect_object ((GObject*) _tmp1_, "notify::visible", (GCallback) _unity_scope_impl_queue_info_changed_g_object_notify, self, 0);
03156        _tmp2_ = self->priv->_owner;
03157        _tmp3_ = unity_scope_get_sources (_tmp2_);
03158        _tmp4_ = _tmp3_;
03159        g_signal_connect_object ((UnityFilter*) _tmp4_, "changed", (GCallback) _unity_scope_impl_queue_info_changed_unity_filter_changed, self, 0);
03160        _tmp5_ = g_str_hash;
03161        _tmp6_ = g_str_equal;
03162        _tmp7_ = g_hash_table_new_full (_tmp5_, _tmp6_, _g_free0_, _g_object_unref0_);
03163        _g_hash_table_unref0 (self->priv->_action_map);
03164        self->priv->_action_map = _tmp7_;
03165        unity_scope_impl_create_models (self);
03166        return obj;
03167 }
03168 
03169 
03170 static void unity_scope_impl_class_init (UnityScopeImplClass * klass) {
03171        unity_scope_impl_parent_class = g_type_class_peek_parent (klass);
03172        g_type_class_add_private (klass, sizeof (UnityScopeImplPrivate));
03173        G_OBJECT_CLASS (klass)->get_property = _vala_unity_scope_impl_get_property;
03174        G_OBJECT_CLASS (klass)->set_property = _vala_unity_scope_impl_set_property;
03175        G_OBJECT_CLASS (klass)->constructor = unity_scope_impl_constructor;
03176        G_OBJECT_CLASS (klass)->finalize = unity_scope_impl_finalize;
03177        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_IMPL_OWNER, g_param_spec_object ("owner", "owner", "owner", UNITY_TYPE_SCOPE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
03178        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_IMPL_VIEW_TYPE, g_param_spec_enum ("view-type", "view-type", "view-type", UNITY_PROTOCOL_TYPE_VIEW_TYPE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
03179 }
03180 
03181 
03182 static void unity_scope_impl_unity_protocol_scope_service_interface_init (UnityProtocolScopeServiceIface * iface) {
03183        unity_scope_impl_unity_protocol_scope_service_parent_iface = g_type_interface_peek_parent (iface);
03184        iface->info_request = (void (*)(UnityProtocolScopeService*, GError**)) unity_scope_impl_real_info_request;
03185        iface->info_request_finish = unity_scope_impl_real_info_request_finish;
03186        iface->activate = (void (*)(UnityProtocolScopeService*, const gchar*, guint, UnityProtocolActivationReplyRaw*, GError**)) unity_scope_impl_real_activate;
03187        iface->activate_finish = unity_scope_impl_real_activate_finish;
03188        iface->update_preview_property = (GHashTable* (*)(UnityProtocolScopeService*, const gchar*, GHashTable*, GError**)) unity_scope_impl_real_update_preview_property;
03189        iface->update_preview_property_finish = unity_scope_impl_real_update_preview_property_finish;
03190        iface->search = (GHashTable* (*)(UnityProtocolScopeService*, const gchar*, GHashTable*, GError**)) unity_scope_impl_real_search;
03191        iface->search_finish = unity_scope_impl_real_search_finish;
03192        iface->global_search = (GHashTable* (*)(UnityProtocolScopeService*, const gchar*, GHashTable*, GError**)) unity_scope_impl_real_global_search;
03193        iface->global_search_finish = unity_scope_impl_real_global_search_finish;
03194        iface->set_view_type = (void (*)(UnityProtocolScopeService*, guint, GError**)) unity_scope_impl_real_set_view_type;
03195        iface->set_view_type_finish = unity_scope_impl_real_set_view_type_finish;
03196        iface->set_active_sources = (void (*)(UnityProtocolScopeService*, gchar**, int, GError**)) unity_scope_impl_real_set_active_sources;
03197        iface->set_active_sources_finish = unity_scope_impl_real_set_active_sources_finish;
03198 }
03199 
03200 
03201 static void unity_scope_impl_instance_init (UnityScopeImpl * self) {
03202        GCancellable** _tmp0_ = NULL;
03203        gchar** _tmp1_ = NULL;
03204        self->priv = UNITY_SCOPE_IMPL_GET_PRIVATE (self);
03205        _tmp0_ = g_new0 (GCancellable*, UNITY_SEARCH_TYPE_N_TYPES + 1);
03206        self->priv->cancellable_arr = _tmp0_;
03207        self->priv->cancellable_arr_length1 = UNITY_SEARCH_TYPE_N_TYPES;
03208        self->priv->_cancellable_arr_size_ = self->priv->cancellable_arr_length1;
03209        _tmp1_ = g_new0 (gchar*, UNITY_SEARCH_TYPE_N_TYPES + 1);
03210        self->priv->search_keys = _tmp1_;
03211        self->priv->search_keys_length1 = UNITY_SEARCH_TYPE_N_TYPES;
03212        self->priv->_search_keys_size_ = self->priv->search_keys_length1;
03213 }
03214 
03215 
03216 static void unity_scope_impl_finalize (GObject* obj) {
03217        UnityScopeImpl * self;
03218        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SCOPE_IMPL, UnityScopeImpl);
03219        _g_object_unref0 (self->priv->_owner);
03220        _g_hash_table_unref0 (self->priv->_action_map);
03221        _g_object_unref0 (self->priv->_last_preview);
03222        _g_object_unref0 (self->_results_model);
03223        _g_object_unref0 (self->_global_results_model);
03224        _g_object_unref0 (self->_filters_model);
03225        self->priv->cancellable_arr = (_vala_array_free (self->priv->cancellable_arr, self->priv->cancellable_arr_length1, (GDestroyNotify) g_object_unref), NULL);
03226        self->priv->search_keys = (_vala_array_free (self->priv->search_keys, self->priv->search_keys_length1, (GDestroyNotify) g_free), NULL);
03227        G_OBJECT_CLASS (unity_scope_impl_parent_class)->finalize (obj);
03228 }
03229 
03230 
03231 GType unity_scope_impl_get_type (void) {
03232        static volatile gsize unity_scope_impl_type_id__volatile = 0;
03233        if (g_once_init_enter (&unity_scope_impl_type_id__volatile)) {
03234               static const GTypeInfo g_define_type_info = { sizeof (UnityScopeImplClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_scope_impl_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityScopeImpl), 0, (GInstanceInitFunc) unity_scope_impl_instance_init, NULL };
03235               static const GInterfaceInfo unity_protocol_scope_service_info = { (GInterfaceInitFunc) unity_scope_impl_unity_protocol_scope_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
03236               GType unity_scope_impl_type_id;
03237               unity_scope_impl_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityScopeImpl", &g_define_type_info, 0);
03238               g_type_add_interface_static (unity_scope_impl_type_id, UNITY_PROTOCOL_TYPE_SCOPE_SERVICE, &unity_protocol_scope_service_info);
03239               g_once_init_leave (&unity_scope_impl_type_id__volatile, unity_scope_impl_type_id);
03240        }
03241        return unity_scope_impl_type_id__volatile;
03242 }
03243 
03244 
03245 static void _vala_unity_scope_impl_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
03246        UnityScopeImpl * self;
03247        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SCOPE_IMPL, UnityScopeImpl);
03248        switch (property_id) {
03249               case UNITY_SCOPE_IMPL_OWNER:
03250               g_value_set_object (value, unity_scope_impl_get_owner (self));
03251               break;
03252               case UNITY_SCOPE_IMPL_VIEW_TYPE:
03253               g_value_set_enum (value, unity_scope_impl_get_view_type (self));
03254               break;
03255               default:
03256               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
03257               break;
03258        }
03259 }
03260 
03261 
03262 static void _vala_unity_scope_impl_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
03263        UnityScopeImpl * self;
03264        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SCOPE_IMPL, UnityScopeImpl);
03265        switch (property_id) {
03266               case UNITY_SCOPE_IMPL_OWNER:
03267               unity_scope_impl_set_owner (self, g_value_get_object (value));
03268               break;
03269               case UNITY_SCOPE_IMPL_VIEW_TYPE:
03270               unity_scope_impl_set_view_type (self, g_value_get_enum (value));
03271               break;
03272               default:
03273               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
03274               break;
03275        }
03276 }
03277 
03278 
03279 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
03280        if ((array != NULL) && (destroy_func != NULL)) {
03281               int i;
03282               for (i = 0; i < array_length; i = i + 1) {
03283                      if (((gpointer*) array)[i] != NULL) {
03284                             destroy_func (((gpointer*) array)[i]);
03285                      }
03286               }
03287        }
03288 }
03289 
03290 
03291 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
03292        _vala_array_destroy (array, array_length, destroy_func);
03293        g_free (array);
03294 }
03295 
03296 
03297 static gint _vala_array_length (gpointer array) {
03298        int length;
03299        length = 0;
03300        if (array) {
03301               while (((gpointer*) array)[length]) {
03302                      length++;
03303               }
03304        }
03305        return length;
03306 }
03307 
03308 
03309