Back to index

libunity  5.92.0
unity-scope-proxy-remote.c
Go to the documentation of this file.
00001 /* unity-scope-proxy-remote.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-scope-proxy-remote.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 <gio/gio.h>
00027 #include <stdlib.h>
00028 #include <string.h>
00029 #include <unity-protocol.h>
00030 #include "unity.h"
00031 #include <dee.h>
00032 #include <unity-trace.h>
00033 
00034 
00035 #define UNITY_TYPE_SCOPE_PROXY (unity_scope_proxy_get_type ())
00036 #define UNITY_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxy))
00037 #define UNITY_IS_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY))
00038 #define UNITY_SCOPE_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxyIface))
00039 
00040 typedef struct _UnityScopeProxy UnityScopeProxy;
00041 typedef struct _UnityScopeProxyIface UnityScopeProxyIface;
00042 
00043 #define UNITY_TYPE_SCOPE_PROXY_REMOTE (unity_scope_proxy_remote_get_type ())
00044 #define UNITY_SCOPE_PROXY_REMOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemote))
00045 #define UNITY_SCOPE_PROXY_REMOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))
00046 #define UNITY_IS_SCOPE_PROXY_REMOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE))
00047 #define UNITY_IS_SCOPE_PROXY_REMOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE))
00048 #define UNITY_SCOPE_PROXY_REMOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))
00049 
00050 typedef struct _UnityScopeProxyRemote UnityScopeProxyRemote;
00051 typedef struct _UnityScopeProxyRemoteClass UnityScopeProxyRemoteClass;
00052 typedef struct _UnityScopeProxyRemotePrivate UnityScopeProxyRemotePrivate;
00053 #define _g_free0(var) (var = (g_free (var), NULL))
00054 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00055 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00056 typedef struct _UnityScopeProxyRemoteConnectToScopeData UnityScopeProxyRemoteConnectToScopeData;
00057 typedef struct _UnityScopeProxyRemoteActivateData UnityScopeProxyRemoteActivateData;
00058 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
00059 typedef struct _UnityScopeProxyRemoteUpdatePreviewPropertyData UnityScopeProxyRemoteUpdatePreviewPropertyData;
00060 typedef struct _UnityScopeProxyRemoteSearchData UnityScopeProxyRemoteSearchData;
00061 typedef struct _UnityScopeProxyRemoteGlobalSearchData UnityScopeProxyRemoteGlobalSearchData;
00062 typedef struct _UnityScopeProxyRemoteSetViewTypeData UnityScopeProxyRemoteSetViewTypeData;
00063 typedef struct _UnityScopeProxyRemoteSetActiveSourcesData UnityScopeProxyRemoteSetActiveSourcesData;
00064 
00065 struct _UnityScopeProxyIface {
00066        GTypeInterface parent_iface;
00067        void (*activate) (UnityScopeProxy* self, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00068        void (*activate_finish) (UnityScopeProxy* self, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result);
00069        void (*update_preview_property) (UnityScopeProxy* self, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00070        GHashTable* (*update_preview_property_finish) (UnityScopeProxy* self, GAsyncResult* _res_, GError** error);
00071        void (*search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00072        GHashTable* (*search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00073        void (*global_search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00074        GHashTable* (*global_search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00075        void (*set_active_sources) (UnityScopeProxy* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
00076        void (*set_active_sources_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00077        UnityOptionsFilter* (*get_sources) (UnityScopeProxy* self);
00078        void (*set_sources) (UnityScopeProxy* self, UnityOptionsFilter* value);
00079        gboolean (*get_search_in_global) (UnityScopeProxy* self);
00080        void (*set_search_in_global) (UnityScopeProxy* self, gboolean value);
00081        UnityProtocolViewType (*get_view_type) (UnityScopeProxy* self);
00082        void (*set_view_type) (UnityScopeProxy* self, UnityProtocolViewType value);
00083        DeeSerializableModel* (*get_results_model) (UnityScopeProxy* self);
00084        void (*set_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00085        DeeSerializableModel* (*get_global_results_model) (UnityScopeProxy* self);
00086        void (*set_global_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00087        DeeSerializableModel* (*get_filters_model) (UnityScopeProxy* self);
00088        void (*set_filters_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00089 };
00090 
00091 struct _UnityScopeProxyRemote {
00092        GObject parent_instance;
00093        UnityScopeProxyRemotePrivate * priv;
00094 };
00095 
00096 struct _UnityScopeProxyRemoteClass {
00097        GObjectClass parent_class;
00098 };
00099 
00100 struct _UnityScopeProxyRemotePrivate {
00101        gchar* _dbus_name;
00102        gchar* _dbus_path;
00103        UnityOptionsFilter* _sources;
00104        gboolean _search_in_global;
00105        UnityProtocolViewType _view_type;
00106        GDBusConnection* _bus;
00107        guint _watcher;
00108        UnityProtocolScopeService* _service;
00109        DeeSharedModel* _results_model;
00110        DeeSharedModel* _global_results_model;
00111        DeeSharedModel* _filters_model;
00112        guint _reconnection_id;
00113        gboolean synchronized;
00114        gint64 _last_scope_crash;
00115        guint _scope_crashes;
00116 };
00117 
00118 struct _UnityScopeProxyRemoteConnectToScopeData {
00119        int _state_;
00120        GObject* _source_object_;
00121        GAsyncResult* _res_;
00122        GSimpleAsyncResult* _async_result;
00123        UnityScopeProxyRemote* self;
00124        GDBusConnection* _tmp0_;
00125        const gchar* _tmp1_;
00126        const gchar* _tmp2_;
00127        UnityProtocolScopeService* _tmp3_;
00128        UnityProtocolScopeService* _tmp4_;
00129        UnityProtocolScopeService* _tmp5_;
00130        UnityProtocolScopeService* _tmp6_;
00131        GError* e;
00132        const gchar* _tmp7_;
00133        const gchar* _tmp8_;
00134        const gchar* _tmp9_;
00135        const gchar* _tmp10_;
00136        GError* _tmp11_;
00137        const gchar* _tmp12_;
00138        const gchar* _tmp13_;
00139        gchar* _tmp14_;
00140        gchar* _tmp15_;
00141        GError * _inner_error_;
00142 };
00143 
00144 struct _UnityScopeProxyRemoteActivateData {
00145        int _state_;
00146        GObject* _source_object_;
00147        GAsyncResult* _res_;
00148        GSimpleAsyncResult* _async_result;
00149        UnityScopeProxyRemote* self;
00150        gchar* uri;
00151        UnityProtocolActionType action_type;
00152        UnityProtocolActivationReplyRaw result;
00153        gboolean _tmp0_;
00154        UnityProtocolScopeService* _tmp1_;
00155        const gchar* _tmp2_;
00156        UnityProtocolActionType _tmp3_;
00157        UnityProtocolActivationReplyRaw _tmp4_;
00158        UnityProtocolActivationReplyRaw raw;
00159        GError* e;
00160        const gchar* _tmp5_;
00161        const gchar* _tmp6_;
00162        GError* _tmp7_;
00163        const gchar* _tmp8_;
00164        const gchar* _tmp9_;
00165        gchar* _tmp10_;
00166        gchar* _tmp11_;
00167        UnityProtocolActivationReplyRaw _tmp12_;
00168        GError * _inner_error_;
00169 };
00170 
00171 struct _UnityScopeProxyRemoteUpdatePreviewPropertyData {
00172        int _state_;
00173        GObject* _source_object_;
00174        GAsyncResult* _res_;
00175        GSimpleAsyncResult* _async_result;
00176        UnityScopeProxyRemote* self;
00177        gchar* uri;
00178        GHashTable* values;
00179        GHashTable* result;
00180        gboolean _tmp0_;
00181        UnityProtocolScopeService* _tmp1_;
00182        const gchar* _tmp2_;
00183        GHashTable* _tmp3_;
00184        GHashTable* _tmp4_;
00185        GHashTable* raw;
00186        GError* e;
00187        const gchar* _tmp5_;
00188        const gchar* _tmp6_;
00189        GError* _tmp7_;
00190        const gchar* _tmp8_;
00191        const gchar* _tmp9_;
00192        gchar* _tmp10_;
00193        gchar* _tmp11_;
00194        GHashFunc _tmp12_;
00195        GEqualFunc _tmp13_;
00196        GHashTable* _tmp14_;
00197        GError * _inner_error_;
00198 };
00199 
00200 struct _UnityScopeProxyRemoteSearchData {
00201        int _state_;
00202        GObject* _source_object_;
00203        GAsyncResult* _res_;
00204        GSimpleAsyncResult* _async_result;
00205        UnityScopeProxyRemote* self;
00206        gchar* search_string;
00207        GHashTable* hints;
00208        GHashTable* result;
00209        gboolean _tmp0_;
00210        UnityProtocolScopeService* _tmp1_;
00211        const gchar* _tmp2_;
00212        GHashTable* _tmp3_;
00213        GHashTable* _tmp4_;
00214        GHashTable* ht;
00215        GError* scope_error;
00216        GError* e;
00217        const gchar* _tmp5_;
00218        const gchar* _tmp6_;
00219        const gchar* _tmp7_;
00220        const gchar* _tmp8_;
00221        GError* _tmp9_;
00222        const gchar* _tmp10_;
00223        const gchar* _tmp11_;
00224        gchar* _tmp12_;
00225        gchar* _tmp13_;
00226        GHashFunc _tmp14_;
00227        GEqualFunc _tmp15_;
00228        GHashTable* _tmp16_;
00229        GError * _inner_error_;
00230 };
00231 
00232 struct _UnityScopeProxyRemoteGlobalSearchData {
00233        int _state_;
00234        GObject* _source_object_;
00235        GAsyncResult* _res_;
00236        GSimpleAsyncResult* _async_result;
00237        UnityScopeProxyRemote* self;
00238        gchar* search_string;
00239        GHashTable* hints;
00240        GHashTable* result;
00241        gboolean _tmp0_;
00242        UnityProtocolScopeService* _tmp1_;
00243        const gchar* _tmp2_;
00244        GHashTable* _tmp3_;
00245        GHashTable* _tmp4_;
00246        GHashTable* _result_;
00247        GError* scope_error;
00248        GError* e;
00249        const gchar* _tmp5_;
00250        const gchar* _tmp6_;
00251        const gchar* _tmp7_;
00252        const gchar* _tmp8_;
00253        GError* _tmp9_;
00254        const gchar* _tmp10_;
00255        const gchar* _tmp11_;
00256        gchar* _tmp12_;
00257        gchar* _tmp13_;
00258        GHashFunc _tmp14_;
00259        GEqualFunc _tmp15_;
00260        GHashTable* _tmp16_;
00261        GError * _inner_error_;
00262 };
00263 
00264 struct _UnityScopeProxyRemoteSetViewTypeData {
00265        int _state_;
00266        GObject* _source_object_;
00267        GAsyncResult* _res_;
00268        GSimpleAsyncResult* _async_result;
00269        UnityScopeProxyRemote* self;
00270        UnityProtocolViewType view_type;
00271        UnityProtocolViewType _tmp0_;
00272        gboolean _tmp1_;
00273        UnityProtocolScopeService* _tmp2_;
00274        UnityProtocolViewType _tmp3_;
00275        GError* e;
00276        const gchar* _tmp4_;
00277        const gchar* _tmp5_;
00278        GError* _tmp6_;
00279        const gchar* _tmp7_;
00280        const gchar* _tmp8_;
00281        gchar* _tmp9_;
00282        gchar* _tmp10_;
00283        GError * _inner_error_;
00284 };
00285 
00286 struct _UnityScopeProxyRemoteSetActiveSourcesData {
00287        int _state_;
00288        GObject* _source_object_;
00289        GAsyncResult* _res_;
00290        GSimpleAsyncResult* _async_result;
00291        UnityScopeProxyRemote* self;
00292        gchar** sources;
00293        gint sources_length1;
00294        gboolean _tmp0_;
00295        UnityProtocolScopeService* _tmp1_;
00296        gchar** _tmp2_;
00297        gint _tmp2__length1;
00298        GError* e;
00299        const gchar* _tmp3_;
00300        const gchar* _tmp4_;
00301        GError* _tmp5_;
00302        const gchar* _tmp6_;
00303        const gchar* _tmp7_;
00304        gchar* _tmp8_;
00305        gchar* _tmp9_;
00306        GError * _inner_error_;
00307 };
00308 
00309 
00310 static gpointer unity_scope_proxy_remote_parent_class = NULL;
00311 static UnityScopeProxyIface* unity_scope_proxy_remote_unity_scope_proxy_parent_iface = NULL;
00312 
00313 GType unity_scope_proxy_get_type (void) G_GNUC_CONST;
00314 GType unity_scope_proxy_remote_get_type (void) G_GNUC_CONST;
00315 #define UNITY_SCOPE_PROXY_REMOTE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemotePrivate))
00316 enum  {
00317        UNITY_SCOPE_PROXY_REMOTE_DUMMY_PROPERTY,
00318        UNITY_SCOPE_PROXY_REMOTE_DBUS_NAME,
00319        UNITY_SCOPE_PROXY_REMOTE_DBUS_PATH,
00320        UNITY_SCOPE_PROXY_REMOTE_SOURCES,
00321        UNITY_SCOPE_PROXY_REMOTE_SEARCH_IN_GLOBAL,
00322        UNITY_SCOPE_PROXY_REMOTE_RESULTS_MODEL,
00323        UNITY_SCOPE_PROXY_REMOTE_GLOBAL_RESULTS_MODEL,
00324        UNITY_SCOPE_PROXY_REMOTE_FILTERS_MODEL,
00325        UNITY_SCOPE_PROXY_REMOTE_VIEW_TYPE
00326 };
00327 UnityScopeProxyRemote* unity_scope_proxy_remote_new (const gchar* dbus_name_, const gchar* dbus_path_);
00328 UnityScopeProxyRemote* unity_scope_proxy_remote_construct (GType object_type, const gchar* dbus_name_, const gchar* dbus_path_);
00329 static void unity_scope_proxy_remote_connect_to_scope_data_free (gpointer _data);
00330 static void unity_scope_proxy_remote_connect_to_scope (UnityScopeProxyRemote* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00331 static void unity_scope_proxy_remote_connect_to_scope_finish (UnityScopeProxyRemote* self, GAsyncResult* _res_);
00332 static gboolean unity_scope_proxy_remote_connect_to_scope_co (UnityScopeProxyRemoteConnectToScopeData* _data_);
00333 const gchar* unity_scope_proxy_remote_get_dbus_name (UnityScopeProxyRemote* self);
00334 const gchar* unity_scope_proxy_remote_get_dbus_path (UnityScopeProxyRemote* self);
00335 static void unity_scope_proxy_remote_connect_to_scope_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00336 void unity_scope_proxy_remote_on_changed (UnityScopeProxyRemote* self, UnityProtocolScopeInfo* scope_info);
00337 static void _unity_scope_proxy_remote_on_changed_unity_protocol_scope_service_changed (UnityProtocolScopeService* _sender, UnityProtocolScopeInfo* lens_info, gpointer self);
00338 static void unity_scope_proxy_remote_on_scope_appeared (UnityScopeProxyRemote* self, GDBusConnection* conn, const gchar* name, const gchar* name_owner);
00339 static void unity_scope_proxy_remote_on_scope_vanished (UnityScopeProxyRemote* self, GDBusConnection* conn, const gchar* name);
00340 void unity_scope_proxy_set_search_in_global (UnityScopeProxy* self, gboolean value);
00341 void unity_scope_proxy_set_sources (UnityScopeProxy* self, UnityOptionsFilter* value);
00342 static void unity_scope_proxy_remote_start_reconnection_timeout (UnityScopeProxyRemote* self);
00343 static gboolean __lambda2_ (UnityScopeProxyRemote* self);
00344 static gboolean ___lambda2__gsource_func (gpointer self);
00345 static void unity_scope_proxy_remote_real_activate_data_free (gpointer _data);
00346 static void unity_scope_proxy_remote_real_activate (UnityScopeProxy* base, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00347 static gboolean unity_scope_proxy_remote_real_activate_co (UnityScopeProxyRemoteActivateData* _data_);
00348 static void unity_scope_proxy_remote_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00349 static void unity_scope_proxy_remote_real_update_preview_property_data_free (gpointer _data);
00350 static void unity_scope_proxy_remote_real_update_preview_property (UnityScopeProxy* base, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00351 static gboolean unity_scope_proxy_remote_real_update_preview_property_co (UnityScopeProxyRemoteUpdatePreviewPropertyData* _data_);
00352 static void unity_scope_proxy_remote_update_preview_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00353 static void _g_free0_ (gpointer var);
00354 static void _g_variant_unref0_ (gpointer var);
00355 static void unity_scope_proxy_remote_real_search_data_free (gpointer _data);
00356 static void unity_scope_proxy_remote_real_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00357 static gboolean unity_scope_proxy_remote_real_search_co (UnityScopeProxyRemoteSearchData* _data_);
00358 static void unity_scope_proxy_remote_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00359 static void unity_scope_proxy_remote_real_global_search_data_free (gpointer _data);
00360 static void unity_scope_proxy_remote_real_global_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00361 static gboolean unity_scope_proxy_remote_real_global_search_co (UnityScopeProxyRemoteGlobalSearchData* _data_);
00362 static void unity_scope_proxy_remote_global_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00363 static void unity_scope_proxy_remote_set_view_type_data_free (gpointer _data);
00364 void unity_scope_proxy_remote_set_view_type (UnityScopeProxyRemote* self, UnityProtocolViewType view_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00365 void unity_scope_proxy_remote_set_view_type_finish (UnityScopeProxyRemote* self, GAsyncResult* _res_);
00366 static gboolean unity_scope_proxy_remote_set_view_type_co (UnityScopeProxyRemoteSetViewTypeData* _data_);
00367 static void unity_scope_proxy_remote_set_view_type_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00368 static void unity_scope_proxy_remote_real_set_active_sources_data_free (gpointer _data);
00369 static void unity_scope_proxy_remote_real_set_active_sources (UnityScopeProxy* base, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
00370 static gboolean unity_scope_proxy_remote_real_set_active_sources_co (UnityScopeProxyRemoteSetActiveSourcesData* _data_);
00371 static void unity_scope_proxy_remote_set_active_sources_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00372 DeeSerializableModel* unity_scope_proxy_get_results_model (UnityScopeProxy* self);
00373 void unity_scope_proxy_set_results_model (UnityScopeProxy* self, DeeSerializableModel* value);
00374 DeeSerializableModel* unity_scope_proxy_get_global_results_model (UnityScopeProxy* self);
00375 void unity_scope_proxy_set_global_results_model (UnityScopeProxy* self, DeeSerializableModel* value);
00376 DeeSerializableModel* unity_scope_proxy_get_filters_model (UnityScopeProxy* self);
00377 void unity_scope_proxy_set_filters_model (UnityScopeProxy* self, DeeSerializableModel* value);
00378 UnityOptionsFilter* unity_scope_proxy_get_sources (UnityScopeProxy* self);
00379 void unity_filter_update (UnityFilter* self, GVariant* properties);
00380 static void unity_scope_proxy_remote_set_dbus_name (UnityScopeProxyRemote* self, const gchar* value);
00381 static void unity_scope_proxy_remote_set_dbus_path (UnityScopeProxyRemote* self, const gchar* value);
00382 static GObject * unity_scope_proxy_remote_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00383 static void _unity_scope_proxy_remote_on_scope_appeared_gbus_name_appeared_callback (GDBusConnection* connection, const gchar* name, const gchar* name_owner, gpointer self);
00384 static void _unity_scope_proxy_remote_on_scope_vanished_gbus_name_vanished_callback (GDBusConnection* connection, const gchar* name, gpointer self);
00385 static void unity_scope_proxy_remote_finalize (GObject* obj);
00386 gboolean unity_scope_proxy_get_search_in_global (UnityScopeProxy* self);
00387 UnityProtocolViewType unity_scope_proxy_get_view_type (UnityScopeProxy* self);
00388 static void _vala_unity_scope_proxy_remote_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00389 void unity_scope_proxy_set_view_type (UnityScopeProxy* self, UnityProtocolViewType value);
00390 static void _vala_unity_scope_proxy_remote_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00391 
00392 
00393 UnityScopeProxyRemote* unity_scope_proxy_remote_construct (GType object_type, const gchar* dbus_name_, const gchar* dbus_path_) {
00394        UnityScopeProxyRemote * self = NULL;
00395        const gchar* _tmp0_;
00396        const gchar* _tmp1_;
00397        g_return_val_if_fail (dbus_name_ != NULL, NULL);
00398        g_return_val_if_fail (dbus_path_ != NULL, NULL);
00399        _tmp0_ = dbus_name_;
00400        _tmp1_ = dbus_path_;
00401        self = (UnityScopeProxyRemote*) g_object_new (object_type, "dbus-name", _tmp0_, "dbus-path", _tmp1_, NULL);
00402        return self;
00403 }
00404 
00405 
00406 UnityScopeProxyRemote* unity_scope_proxy_remote_new (const gchar* dbus_name_, const gchar* dbus_path_) {
00407        return unity_scope_proxy_remote_construct (UNITY_TYPE_SCOPE_PROXY_REMOTE, dbus_name_, dbus_path_);
00408 }
00409 
00410 
00411 static void unity_scope_proxy_remote_connect_to_scope_data_free (gpointer _data) {
00412        UnityScopeProxyRemoteConnectToScopeData* _data_;
00413        _data_ = _data;
00414        _g_object_unref0 (_data_->self);
00415        g_slice_free (UnityScopeProxyRemoteConnectToScopeData, _data_);
00416 }
00417 
00418 
00419 static gpointer _g_object_ref0 (gpointer self) {
00420        return self ? g_object_ref (self) : NULL;
00421 }
00422 
00423 
00424 static void unity_scope_proxy_remote_connect_to_scope (UnityScopeProxyRemote* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00425        UnityScopeProxyRemoteConnectToScopeData* _data_;
00426        UnityScopeProxyRemote* _tmp0_;
00427        _data_ = g_slice_new0 (UnityScopeProxyRemoteConnectToScopeData);
00428        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_connect_to_scope);
00429        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_connect_to_scope_data_free);
00430        _tmp0_ = _g_object_ref0 (self);
00431        _data_->self = _tmp0_;
00432        unity_scope_proxy_remote_connect_to_scope_co (_data_);
00433 }
00434 
00435 
00436 static void unity_scope_proxy_remote_connect_to_scope_finish (UnityScopeProxyRemote* self, GAsyncResult* _res_) {
00437        UnityScopeProxyRemoteConnectToScopeData* _data_;
00438        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00439 }
00440 
00441 
00442 static void unity_scope_proxy_remote_connect_to_scope_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00443        UnityScopeProxyRemoteConnectToScopeData* _data_;
00444        _data_ = _user_data_;
00445        _data_->_source_object_ = source_object;
00446        _data_->_res_ = _res_;
00447        unity_scope_proxy_remote_connect_to_scope_co (_data_);
00448 }
00449 
00450 
00451 static void _unity_scope_proxy_remote_on_changed_unity_protocol_scope_service_changed (UnityProtocolScopeService* _sender, UnityProtocolScopeInfo* lens_info, gpointer self) {
00452        unity_scope_proxy_remote_on_changed (self, lens_info);
00453 }
00454 
00455 
00456 static const gchar* string_to_string (const gchar* self) {
00457        const gchar* result = NULL;
00458        g_return_val_if_fail (self != NULL, NULL);
00459        result = self;
00460        return result;
00461 }
00462 
00463 
00464 static gboolean unity_scope_proxy_remote_connect_to_scope_co (UnityScopeProxyRemoteConnectToScopeData* _data_) {
00465        switch (_data_->_state_) {
00466               case 0:
00467               goto _state_0;
00468               case 1:
00469               goto _state_1;
00470               case 2:
00471               goto _state_2;
00472               default:
00473               g_assert_not_reached ();
00474        }
00475        _state_0:
00476        {
00477               _data_->_tmp0_ = _data_->self->priv->_bus;
00478               _data_->_tmp1_ = _data_->self->priv->_dbus_name;
00479               _data_->_tmp2_ = _data_->self->priv->_dbus_path;
00480               _data_->_state_ = 1;
00481               g_async_initable_new_async (UNITY_PROTOCOL_TYPE_SCOPE_SERVICE_PROXY, 0, NULL, unity_scope_proxy_remote_connect_to_scope_ready, _data_, "g-flags", 0, "g-name", _data_->_tmp1_, "g-connection", _data_->_tmp0_, "g-object-path", _data_->_tmp2_, "g-interface-name", "com.canonical.Unity.Scope", NULL);
00482               return FALSE;
00483               _state_1:
00484               _data_->_tmp3_ = NULL;
00485               _data_->_tmp3_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
00486               _data_->_tmp4_ = (UnityProtocolScopeService*) _data_->_tmp3_;
00487               if (_data_->_inner_error_ != NULL) {
00488                      goto __catch26_g_error;
00489               }
00490               _g_object_unref0 (_data_->self->priv->_service);
00491               _data_->self->priv->_service = _data_->_tmp4_;
00492               _data_->_tmp5_ = _data_->self->priv->_service;
00493               g_signal_connect_object (_data_->_tmp5_, "changed", (GCallback) _unity_scope_proxy_remote_on_changed_unity_protocol_scope_service_changed, _data_->self, 0);
00494               _data_->_tmp6_ = _data_->self->priv->_service;
00495               _data_->_state_ = 2;
00496               unity_protocol_scope_service_info_request (_data_->_tmp6_, unity_scope_proxy_remote_connect_to_scope_ready, _data_);
00497               return FALSE;
00498               _state_2:
00499               unity_protocol_scope_service_info_request_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
00500               if (_data_->_inner_error_ != NULL) {
00501                      goto __catch26_g_error;
00502               }
00503        }
00504        goto __finally26;
00505        __catch26_g_error:
00506        {
00507               _data_->e = _data_->_inner_error_;
00508               _data_->_inner_error_ = NULL;
00509               _data_->_tmp7_ = _data_->self->priv->_dbus_path;
00510               _data_->_tmp8_ = NULL;
00511               _data_->_tmp8_ = string_to_string (_data_->_tmp7_);
00512               _data_->_tmp9_ = _data_->self->priv->_dbus_name;
00513               _data_->_tmp10_ = NULL;
00514               _data_->_tmp10_ = string_to_string (_data_->_tmp9_);
00515               _data_->_tmp11_ = _data_->e;
00516               _data_->_tmp12_ = _data_->_tmp11_->message;
00517               _data_->_tmp13_ = NULL;
00518               _data_->_tmp13_ = string_to_string (_data_->_tmp12_);
00519               _data_->_tmp14_ = NULL;
00520               _data_->_tmp14_ = g_strconcat ("Unable to connect to Scope (", _data_->_tmp8_, " @ ", _data_->_tmp10_, "): ", _data_->_tmp13_, NULL);
00521               _data_->_tmp15_ = _data_->_tmp14_;
00522               g_warning ("unity-scope-proxy-remote.vala:107: %s", _data_->_tmp15_);
00523               _g_free0 (_data_->_tmp15_);
00524               _g_error_free0 (_data_->e);
00525        }
00526        __finally26:
00527        if (_data_->_inner_error_ != NULL) {
00528               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);
00529               g_clear_error (&_data_->_inner_error_);
00530               return FALSE;
00531        }
00532        if (_data_->_state_ == 0) {
00533               g_simple_async_result_complete_in_idle (_data_->_async_result);
00534        } else {
00535               g_simple_async_result_complete (_data_->_async_result);
00536        }
00537        g_object_unref (_data_->_async_result);
00538        return FALSE;
00539 }
00540 
00541 
00542 static void unity_scope_proxy_remote_on_scope_appeared (UnityScopeProxyRemote* self, GDBusConnection* conn, const gchar* name, const gchar* name_owner) {
00543        const gchar* _tmp0_;
00544        guint _tmp1_;
00545        g_return_if_fail (self != NULL);
00546        g_return_if_fail (conn != NULL);
00547        g_return_if_fail (name != NULL);
00548        g_return_if_fail (name_owner != NULL);
00549        _tmp0_ = self->priv->_dbus_name;
00550        unity_trace_log_object ((GObject*) self, "Scope appeared: %s", _tmp0_);
00551        _tmp1_ = self->priv->_reconnection_id;
00552        if (_tmp1_ != ((guint) 0)) {
00553               guint _tmp2_;
00554               _tmp2_ = self->priv->_reconnection_id;
00555               g_source_remove (_tmp2_);
00556        }
00557        unity_scope_proxy_remote_connect_to_scope (self, NULL, NULL);
00558 }
00559 
00560 
00561 static void unity_scope_proxy_remote_on_scope_vanished (UnityScopeProxyRemote* self, GDBusConnection* conn, const gchar* name) {
00562        const gchar* _tmp0_;
00563        UnityCheckOptionFilter* _tmp1_;
00564        UnityCheckOptionFilter* _tmp2_;
00565        DeeSharedModel* _tmp3_;
00566        DeeSharedModel* _tmp5_;
00567        UnityProtocolScopeService* _tmp7_;
00568        g_return_if_fail (self != NULL);
00569        g_return_if_fail (conn != NULL);
00570        g_return_if_fail (name != NULL);
00571        _tmp0_ = self->priv->_dbus_name;
00572        unity_trace_log_object ((GObject*) self, "Scope vanished: %s", _tmp0_);
00573        self->priv->synchronized = FALSE;
00574        unity_scope_proxy_set_search_in_global ((UnityScopeProxy*) self, FALSE);
00575        _tmp1_ = unity_check_option_filter_new ("sources", "Sources", NULL, TRUE);
00576        _tmp2_ = _tmp1_;
00577        unity_scope_proxy_set_sources ((UnityScopeProxy*) self, (UnityOptionsFilter*) _tmp2_);
00578        _g_object_unref0 (_tmp2_);
00579        _tmp3_ = self->priv->_results_model;
00580        if (_tmp3_ != NULL) {
00581               DeeSharedModel* _tmp4_;
00582               _tmp4_ = self->priv->_results_model;
00583               dee_model_clear ((DeeModel*) _tmp4_);
00584        }
00585        _tmp5_ = self->priv->_global_results_model;
00586        if (_tmp5_ != NULL) {
00587               DeeSharedModel* _tmp6_;
00588               _tmp6_ = self->priv->_global_results_model;
00589               dee_model_clear ((DeeModel*) _tmp6_);
00590        }
00591        _g_object_unref0 (self->priv->_filters_model);
00592        self->priv->_filters_model = NULL;
00593        _tmp7_ = self->priv->_service;
00594        if (_tmp7_ != NULL) {
00595               guint _tmp8_;
00596               gint64 _tmp9_ = 0LL;
00597               gint64 cur_time;
00598               gint64 _tmp10_;
00599               gint64 _tmp11_;
00600               gint64 time_since_last_crash;
00601               gint64 _tmp12_;
00602               _tmp8_ = self->priv->_scope_crashes;
00603               self->priv->_scope_crashes = _tmp8_ + 1;
00604               _tmp9_ = g_get_monotonic_time ();
00605               cur_time = _tmp9_;
00606               _tmp10_ = cur_time;
00607               _tmp11_ = self->priv->_last_scope_crash;
00608               time_since_last_crash = _tmp10_ - _tmp11_;
00609               _tmp12_ = time_since_last_crash;
00610               if (_tmp12_ >= ((gint64) (15 * 60000000))) {
00611                      gint64 _tmp13_;
00612                      _tmp13_ = cur_time;
00613                      self->priv->_last_scope_crash = _tmp13_;
00614                      self->priv->_scope_crashes = (guint) 1;
00615               } else {
00616                      guint _tmp14_;
00617                      _tmp14_ = self->priv->_scope_crashes;
00618                      if (_tmp14_ >= ((guint) 10)) {
00619                             const gchar* _tmp15_;
00620                             _tmp15_ = self->priv->_dbus_name;
00621                             g_warning ("unity-scope-proxy-remote.vala:157: Scope %s is crashing too often, dis" \
00622 "abling it", _tmp15_);
00623                             return;
00624                      }
00625               }
00626               unity_scope_proxy_remote_start_reconnection_timeout (self);
00627        } else {
00628               unity_scope_proxy_remote_start_reconnection_timeout (self);
00629        }
00630 }
00631 
00632 
00633 static gboolean __lambda2_ (UnityScopeProxyRemote* self) {
00634        gboolean result = FALSE;
00635        UnityProtocolScopeService* _tmp0_;
00636        _tmp0_ = self->priv->_service;
00637        if (_tmp0_ == NULL) {
00638               unity_scope_proxy_remote_connect_to_scope (self, NULL, NULL);
00639        } else {
00640               UnityProtocolScopeService* _tmp1_;
00641               gchar* _tmp2_ = NULL;
00642               gchar* _tmp3_;
00643               gchar* _tmp4_;
00644               gboolean _tmp5_;
00645               _tmp1_ = self->priv->_service;
00646               g_object_get (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, G_TYPE_DBUS_PROXY) ? ((GDBusProxy*) _tmp1_) : NULL, "g-name-owner", &_tmp2_, NULL);
00647               _tmp3_ = _tmp2_;
00648               _tmp4_ = _tmp3_;
00649               _tmp5_ = _tmp4_ == NULL;
00650               _g_free0 (_tmp4_);
00651               if (_tmp5_) {
00652                      UnityProtocolScopeService* _tmp6_;
00653                      _tmp6_ = self->priv->_service;
00654                      unity_protocol_scope_service_info_request (_tmp6_, NULL, NULL);
00655               }
00656        }
00657        self->priv->_reconnection_id = (guint) 0;
00658        result = FALSE;
00659        return result;
00660 }
00661 
00662 
00663 static gboolean ___lambda2__gsource_func (gpointer self) {
00664        gboolean result;
00665        result = __lambda2_ (self);
00666        return result;
00667 }
00668 
00669 
00670 static void unity_scope_proxy_remote_start_reconnection_timeout (UnityScopeProxyRemote* self) {
00671        guint _tmp0_;
00672        guint _tmp2_ = 0U;
00673        g_return_if_fail (self != NULL);
00674        _tmp0_ = self->priv->_reconnection_id;
00675        if (_tmp0_ != ((guint) 0)) {
00676               guint _tmp1_;
00677               _tmp1_ = self->priv->_reconnection_id;
00678               g_source_remove (_tmp1_);
00679        }
00680        _tmp2_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 2, ___lambda2__gsource_func, g_object_ref (self), g_object_unref);
00681        self->priv->_reconnection_id = _tmp2_;
00682 }
00683 
00684 
00685 static void unity_scope_proxy_remote_real_activate_data_free (gpointer _data) {
00686        UnityScopeProxyRemoteActivateData* _data_;
00687        _data_ = _data;
00688        _g_free0 (_data_->uri);
00689        unity_protocol_activation_reply_raw_destroy (&_data_->result);
00690        _g_object_unref0 (_data_->self);
00691        g_slice_free (UnityScopeProxyRemoteActivateData, _data_);
00692 }
00693 
00694 
00695 static void unity_scope_proxy_remote_real_activate (UnityScopeProxy* base, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00696        UnityScopeProxyRemote * self;
00697        UnityScopeProxyRemoteActivateData* _data_;
00698        UnityScopeProxyRemote* _tmp0_;
00699        const gchar* _tmp1_;
00700        gchar* _tmp2_;
00701        UnityProtocolActionType _tmp3_;
00702        self = (UnityScopeProxyRemote*) base;
00703        _data_ = g_slice_new0 (UnityScopeProxyRemoteActivateData);
00704        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_activate);
00705        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_activate_data_free);
00706        _tmp0_ = _g_object_ref0 (self);
00707        _data_->self = _tmp0_;
00708        _tmp1_ = uri;
00709        _tmp2_ = g_strdup (_tmp1_);
00710        _data_->uri = _tmp2_;
00711        _tmp3_ = action_type;
00712        _data_->action_type = _tmp3_;
00713        unity_scope_proxy_remote_real_activate_co (_data_);
00714 }
00715 
00716 
00717 static void unity_scope_proxy_remote_real_activate_finish (UnityScopeProxy* base, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result) {
00718        UnityScopeProxyRemoteActivateData* _data_;
00719        UnityProtocolActivationReplyRaw _tmp0_ = {0};
00720        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00721        unity_protocol_activation_reply_raw_copy (&_data_->result, &_tmp0_);
00722        *result = _tmp0_;
00723 }
00724 
00725 
00726 static void unity_scope_proxy_remote_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00727        UnityScopeProxyRemoteActivateData* _data_;
00728        _data_ = _user_data_;
00729        _data_->_source_object_ = source_object;
00730        _data_->_res_ = _res_;
00731        unity_scope_proxy_remote_real_activate_co (_data_);
00732 }
00733 
00734 
00735 static gboolean unity_scope_proxy_remote_real_activate_co (UnityScopeProxyRemoteActivateData* _data_) {
00736        switch (_data_->_state_) {
00737               case 0:
00738               goto _state_0;
00739               case 1:
00740               goto _state_1;
00741               default:
00742               g_assert_not_reached ();
00743        }
00744        _state_0:
00745        _data_->_tmp0_ = _data_->self->priv->synchronized;
00746        if (_data_->_tmp0_) {
00747               {
00748                      _data_->_tmp1_ = _data_->self->priv->_service;
00749                      _data_->_tmp2_ = _data_->uri;
00750                      _data_->_tmp3_ = _data_->action_type;
00751                      memset (&_data_->_tmp4_, 0, sizeof (UnityProtocolActivationReplyRaw));
00752                      _data_->_state_ = 1;
00753                      unity_protocol_scope_service_activate (_data_->_tmp1_, _data_->_tmp2_, (guint) _data_->_tmp3_, unity_scope_proxy_remote_activate_ready, _data_);
00754                      return FALSE;
00755                      _state_1:
00756                      unity_protocol_scope_service_activate_finish (_data_->_tmp1_, _data_->_res_, &_data_->_tmp4_, &_data_->_inner_error_);
00757                      _data_->raw = _data_->_tmp4_;
00758                      if (_data_->_inner_error_ != NULL) {
00759                             goto __catch27_g_error;
00760                      }
00761                      _data_->result = _data_->raw;
00762                      if (_data_->_state_ == 0) {
00763                             g_simple_async_result_complete_in_idle (_data_->_async_result);
00764                      } else {
00765                             g_simple_async_result_complete (_data_->_async_result);
00766                      }
00767                      g_object_unref (_data_->_async_result);
00768                      return FALSE;
00769               }
00770               goto __finally27;
00771               __catch27_g_error:
00772               {
00773                      _data_->e = _data_->_inner_error_;
00774                      _data_->_inner_error_ = NULL;
00775                      _data_->_tmp5_ = _data_->self->priv->_dbus_path;
00776                      _data_->_tmp6_ = NULL;
00777                      _data_->_tmp6_ = string_to_string (_data_->_tmp5_);
00778                      _data_->_tmp7_ = _data_->e;
00779                      _data_->_tmp8_ = _data_->_tmp7_->message;
00780                      _data_->_tmp9_ = NULL;
00781                      _data_->_tmp9_ = string_to_string (_data_->_tmp8_);
00782                      _data_->_tmp10_ = NULL;
00783                      _data_->_tmp10_ = g_strconcat ("Unable to search scope (", _data_->_tmp6_, "): ", _data_->_tmp9_, NULL);
00784                      _data_->_tmp11_ = _data_->_tmp10_;
00785                      g_warning ("unity-scope-proxy-remote.vala:197: %s", _data_->_tmp11_);
00786                      _g_free0 (_data_->_tmp11_);
00787                      _g_error_free0 (_data_->e);
00788               }
00789               __finally27:
00790               if (_data_->_inner_error_ != NULL) {
00791                      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);
00792                      g_clear_error (&_data_->_inner_error_);
00793                      return FALSE;
00794               }
00795        }
00796        memset (&_data_->_tmp12_, 0, sizeof (UnityProtocolActivationReplyRaw));
00797        memset (&_data_->_tmp12_, 0, sizeof (UnityProtocolActivationReplyRaw));
00798        _data_->result = _data_->_tmp12_;
00799        if (_data_->_state_ == 0) {
00800               g_simple_async_result_complete_in_idle (_data_->_async_result);
00801        } else {
00802               g_simple_async_result_complete (_data_->_async_result);
00803        }
00804        g_object_unref (_data_->_async_result);
00805        return FALSE;
00806        if (_data_->_state_ == 0) {
00807               g_simple_async_result_complete_in_idle (_data_->_async_result);
00808        } else {
00809               g_simple_async_result_complete (_data_->_async_result);
00810        }
00811        g_object_unref (_data_->_async_result);
00812        return FALSE;
00813 }
00814 
00815 
00816 static void unity_scope_proxy_remote_real_update_preview_property_data_free (gpointer _data) {
00817        UnityScopeProxyRemoteUpdatePreviewPropertyData* _data_;
00818        _data_ = _data;
00819        _g_free0 (_data_->uri);
00820        _g_hash_table_unref0 (_data_->values);
00821        _g_hash_table_unref0 (_data_->result);
00822        _g_object_unref0 (_data_->self);
00823        g_slice_free (UnityScopeProxyRemoteUpdatePreviewPropertyData, _data_);
00824 }
00825 
00826 
00827 static gpointer _g_hash_table_ref0 (gpointer self) {
00828        return self ? g_hash_table_ref (self) : NULL;
00829 }
00830 
00831 
00832 static void unity_scope_proxy_remote_real_update_preview_property (UnityScopeProxy* base, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00833        UnityScopeProxyRemote * self;
00834        UnityScopeProxyRemoteUpdatePreviewPropertyData* _data_;
00835        UnityScopeProxyRemote* _tmp0_;
00836        const gchar* _tmp1_;
00837        gchar* _tmp2_;
00838        GHashTable* _tmp3_;
00839        GHashTable* _tmp4_;
00840        self = (UnityScopeProxyRemote*) base;
00841        _data_ = g_slice_new0 (UnityScopeProxyRemoteUpdatePreviewPropertyData);
00842        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_update_preview_property);
00843        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_update_preview_property_data_free);
00844        _tmp0_ = _g_object_ref0 (self);
00845        _data_->self = _tmp0_;
00846        _tmp1_ = uri;
00847        _tmp2_ = g_strdup (_tmp1_);
00848        _data_->uri = _tmp2_;
00849        _tmp3_ = values;
00850        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
00851        _data_->values = _tmp4_;
00852        unity_scope_proxy_remote_real_update_preview_property_co (_data_);
00853 }
00854 
00855 
00856 static GHashTable* unity_scope_proxy_remote_real_update_preview_property_finish (UnityScopeProxy* base, GAsyncResult* _res_, GError** error) {
00857        GHashTable* result;
00858        UnityScopeProxyRemoteUpdatePreviewPropertyData* _data_;
00859        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
00860               return NULL;
00861        }
00862        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00863        result = _data_->result;
00864        _data_->result = NULL;
00865        return result;
00866 }
00867 
00868 
00869 static void unity_scope_proxy_remote_update_preview_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00870        UnityScopeProxyRemoteUpdatePreviewPropertyData* _data_;
00871        _data_ = _user_data_;
00872        _data_->_source_object_ = source_object;
00873        _data_->_res_ = _res_;
00874        unity_scope_proxy_remote_real_update_preview_property_co (_data_);
00875 }
00876 
00877 
00878 static void _g_free0_ (gpointer var) {
00879        var = (g_free (var), NULL);
00880 }
00881 
00882 
00883 static void _g_variant_unref0_ (gpointer var) {
00884        (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
00885 }
00886 
00887 
00888 static gboolean unity_scope_proxy_remote_real_update_preview_property_co (UnityScopeProxyRemoteUpdatePreviewPropertyData* _data_) {
00889        switch (_data_->_state_) {
00890               case 0:
00891               goto _state_0;
00892               case 1:
00893               goto _state_1;
00894               default:
00895               g_assert_not_reached ();
00896        }
00897        _state_0:
00898        _data_->_tmp0_ = _data_->self->priv->synchronized;
00899        if (_data_->_tmp0_) {
00900               {
00901                      _data_->_tmp1_ = _data_->self->priv->_service;
00902                      _data_->_tmp2_ = _data_->uri;
00903                      _data_->_tmp3_ = _data_->values;
00904                      _data_->_state_ = 1;
00905                      unity_protocol_scope_service_update_preview_property (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, unity_scope_proxy_remote_update_preview_property_ready, _data_);
00906                      return FALSE;
00907                      _state_1:
00908                      _data_->_tmp4_ = NULL;
00909                      _data_->_tmp4_ = unity_protocol_scope_service_update_preview_property_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
00910                      _data_->raw = _data_->_tmp4_;
00911                      if (_data_->_inner_error_ != NULL) {
00912                             goto __catch28_g_error;
00913                      }
00914                      _data_->result = _data_->raw;
00915                      if (_data_->_state_ == 0) {
00916                             g_simple_async_result_complete_in_idle (_data_->_async_result);
00917                      } else {
00918                             g_simple_async_result_complete (_data_->_async_result);
00919                      }
00920                      g_object_unref (_data_->_async_result);
00921                      return FALSE;
00922               }
00923               goto __finally28;
00924               __catch28_g_error:
00925               {
00926                      _data_->e = _data_->_inner_error_;
00927                      _data_->_inner_error_ = NULL;
00928                      _data_->_tmp5_ = _data_->self->priv->_dbus_path;
00929                      _data_->_tmp6_ = NULL;
00930                      _data_->_tmp6_ = string_to_string (_data_->_tmp5_);
00931                      _data_->_tmp7_ = _data_->e;
00932                      _data_->_tmp8_ = _data_->_tmp7_->message;
00933                      _data_->_tmp9_ = NULL;
00934                      _data_->_tmp9_ = string_to_string (_data_->_tmp8_);
00935                      _data_->_tmp10_ = NULL;
00936                      _data_->_tmp10_ = g_strconcat ("Unable to update_preview_property (", _data_->_tmp6_, "): ", _data_->_tmp9_, NULL);
00937                      _data_->_tmp11_ = _data_->_tmp10_;
00938                      g_warning ("unity-scope-proxy-remote.vala:212: %s", _data_->_tmp11_);
00939                      _g_free0 (_data_->_tmp11_);
00940                      _g_error_free0 (_data_->e);
00941               }
00942               __finally28:
00943               if (_data_->_inner_error_ != NULL) {
00944                      if (_data_->_inner_error_->domain == G_IO_ERROR) {
00945                             g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
00946                             g_error_free (_data_->_inner_error_);
00947                             if (_data_->_state_ == 0) {
00948                                    g_simple_async_result_complete_in_idle (_data_->_async_result);
00949                             } else {
00950                                    g_simple_async_result_complete (_data_->_async_result);
00951                             }
00952                             g_object_unref (_data_->_async_result);
00953                             return FALSE;
00954                      } else {
00955                             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);
00956                             g_clear_error (&_data_->_inner_error_);
00957                             return FALSE;
00958                      }
00959               }
00960        }
00961        _data_->_tmp12_ = g_str_hash;
00962        _data_->_tmp13_ = g_str_equal;
00963        _data_->_tmp14_ = g_hash_table_new_full (_data_->_tmp12_, _data_->_tmp13_, _g_free0_, _g_variant_unref0_);
00964        _data_->result = _data_->_tmp14_;
00965        if (_data_->_state_ == 0) {
00966               g_simple_async_result_complete_in_idle (_data_->_async_result);
00967        } else {
00968               g_simple_async_result_complete (_data_->_async_result);
00969        }
00970        g_object_unref (_data_->_async_result);
00971        return FALSE;
00972        if (_data_->_state_ == 0) {
00973               g_simple_async_result_complete_in_idle (_data_->_async_result);
00974        } else {
00975               g_simple_async_result_complete (_data_->_async_result);
00976        }
00977        g_object_unref (_data_->_async_result);
00978        return FALSE;
00979 }
00980 
00981 
00982 static void unity_scope_proxy_remote_real_search_data_free (gpointer _data) {
00983        UnityScopeProxyRemoteSearchData* _data_;
00984        _data_ = _data;
00985        _g_free0 (_data_->search_string);
00986        _g_hash_table_unref0 (_data_->hints);
00987        _g_hash_table_unref0 (_data_->result);
00988        _g_object_unref0 (_data_->self);
00989        g_slice_free (UnityScopeProxyRemoteSearchData, _data_);
00990 }
00991 
00992 
00993 static void unity_scope_proxy_remote_real_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00994        UnityScopeProxyRemote * self;
00995        UnityScopeProxyRemoteSearchData* _data_;
00996        UnityScopeProxyRemote* _tmp0_;
00997        const gchar* _tmp1_;
00998        gchar* _tmp2_;
00999        GHashTable* _tmp3_;
01000        GHashTable* _tmp4_;
01001        self = (UnityScopeProxyRemote*) base;
01002        _data_ = g_slice_new0 (UnityScopeProxyRemoteSearchData);
01003        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_search);
01004        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_search_data_free);
01005        _tmp0_ = _g_object_ref0 (self);
01006        _data_->self = _tmp0_;
01007        _tmp1_ = search_string;
01008        _tmp2_ = g_strdup (_tmp1_);
01009        _data_->search_string = _tmp2_;
01010        _tmp3_ = hints;
01011        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
01012        _data_->hints = _tmp4_;
01013        unity_scope_proxy_remote_real_search_co (_data_);
01014 }
01015 
01016 
01017 static GHashTable* unity_scope_proxy_remote_real_search_finish (UnityScopeProxy* base, GAsyncResult* _res_) {
01018        GHashTable* result;
01019        UnityScopeProxyRemoteSearchData* _data_;
01020        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
01021        result = _data_->result;
01022        _data_->result = NULL;
01023        return result;
01024 }
01025 
01026 
01027 static void unity_scope_proxy_remote_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
01028        UnityScopeProxyRemoteSearchData* _data_;
01029        _data_ = _user_data_;
01030        _data_->_source_object_ = source_object;
01031        _data_->_res_ = _res_;
01032        unity_scope_proxy_remote_real_search_co (_data_);
01033 }
01034 
01035 
01036 static gboolean unity_scope_proxy_remote_real_search_co (UnityScopeProxyRemoteSearchData* _data_) {
01037        switch (_data_->_state_) {
01038               case 0:
01039               goto _state_0;
01040               case 1:
01041               goto _state_1;
01042               default:
01043               g_assert_not_reached ();
01044        }
01045        _state_0:
01046        _data_->_tmp0_ = _data_->self->priv->synchronized;
01047        if (_data_->_tmp0_) {
01048               {
01049                      _data_->_tmp1_ = _data_->self->priv->_service;
01050                      _data_->_tmp2_ = _data_->search_string;
01051                      _data_->_tmp3_ = _data_->hints;
01052                      _data_->_state_ = 1;
01053                      unity_protocol_scope_service_search (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, unity_scope_proxy_remote_search_ready, _data_);
01054                      return FALSE;
01055                      _state_1:
01056                      _data_->_tmp4_ = NULL;
01057                      _data_->_tmp4_ = unity_protocol_scope_service_search_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
01058                      _data_->ht = _data_->_tmp4_;
01059                      if (_data_->_inner_error_ != NULL) {
01060                             if (g_error_matches (_data_->_inner_error_, UNITY_PROTOCOL_SCOPE_ERROR, UNITY_PROTOCOL_SCOPE_ERROR_SEARCH_CANCELLED)) {
01061                                    goto __catch29_unity_protocol_scope_error_search_cancelled;
01062                             }
01063                             goto __catch29_g_error;
01064                      }
01065                      _data_->result = _data_->ht;
01066                      if (_data_->_state_ == 0) {
01067                             g_simple_async_result_complete_in_idle (_data_->_async_result);
01068                      } else {
01069                             g_simple_async_result_complete (_data_->_async_result);
01070                      }
01071                      g_object_unref (_data_->_async_result);
01072                      return FALSE;
01073               }
01074               goto __finally29;
01075               __catch29_unity_protocol_scope_error_search_cancelled:
01076               {
01077                      _data_->scope_error = _data_->_inner_error_;
01078                      _data_->_inner_error_ = NULL;
01079                      _g_error_free0 (_data_->scope_error);
01080               }
01081               goto __finally29;
01082               __catch29_g_error:
01083               {
01084                      _data_->e = _data_->_inner_error_;
01085                      _data_->_inner_error_ = NULL;
01086                      _data_->_tmp5_ = _data_->self->priv->_dbus_path;
01087                      _data_->_tmp6_ = NULL;
01088                      _data_->_tmp6_ = string_to_string (_data_->_tmp5_);
01089                      _data_->_tmp7_ = _data_->search_string;
01090                      _data_->_tmp8_ = NULL;
01091                      _data_->_tmp8_ = string_to_string (_data_->_tmp7_);
01092                      _data_->_tmp9_ = _data_->e;
01093                      _data_->_tmp10_ = _data_->_tmp9_->message;
01094                      _data_->_tmp11_ = NULL;
01095                      _data_->_tmp11_ = string_to_string (_data_->_tmp10_);
01096                      _data_->_tmp12_ = NULL;
01097                      _data_->_tmp12_ = g_strconcat ("Unable to search scope (", _data_->_tmp6_, " - '", _data_->_tmp8_, "'): ", _data_->_tmp11_, NULL);
01098                      _data_->_tmp13_ = _data_->_tmp12_;
01099                      g_warning ("unity-scope-proxy-remote.vala:230: %s", _data_->_tmp13_);
01100                      _g_free0 (_data_->_tmp13_);
01101                      _g_error_free0 (_data_->e);
01102               }
01103               __finally29:
01104               if (_data_->_inner_error_ != NULL) {
01105                      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);
01106                      g_clear_error (&_data_->_inner_error_);
01107                      return FALSE;
01108               }
01109        }
01110        _data_->_tmp14_ = g_str_hash;
01111        _data_->_tmp15_ = g_str_equal;
01112        _data_->_tmp16_ = g_hash_table_new_full (_data_->_tmp14_, _data_->_tmp15_, _g_free0_, _g_variant_unref0_);
01113        _data_->result = _data_->_tmp16_;
01114        if (_data_->_state_ == 0) {
01115               g_simple_async_result_complete_in_idle (_data_->_async_result);
01116        } else {
01117               g_simple_async_result_complete (_data_->_async_result);
01118        }
01119        g_object_unref (_data_->_async_result);
01120        return FALSE;
01121        if (_data_->_state_ == 0) {
01122               g_simple_async_result_complete_in_idle (_data_->_async_result);
01123        } else {
01124               g_simple_async_result_complete (_data_->_async_result);
01125        }
01126        g_object_unref (_data_->_async_result);
01127        return FALSE;
01128 }
01129 
01130 
01131 static void unity_scope_proxy_remote_real_global_search_data_free (gpointer _data) {
01132        UnityScopeProxyRemoteGlobalSearchData* _data_;
01133        _data_ = _data;
01134        _g_free0 (_data_->search_string);
01135        _g_hash_table_unref0 (_data_->hints);
01136        _g_hash_table_unref0 (_data_->result);
01137        _g_object_unref0 (_data_->self);
01138        g_slice_free (UnityScopeProxyRemoteGlobalSearchData, _data_);
01139 }
01140 
01141 
01142 static void unity_scope_proxy_remote_real_global_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01143        UnityScopeProxyRemote * self;
01144        UnityScopeProxyRemoteGlobalSearchData* _data_;
01145        UnityScopeProxyRemote* _tmp0_;
01146        const gchar* _tmp1_;
01147        gchar* _tmp2_;
01148        GHashTable* _tmp3_;
01149        GHashTable* _tmp4_;
01150        self = (UnityScopeProxyRemote*) base;
01151        _data_ = g_slice_new0 (UnityScopeProxyRemoteGlobalSearchData);
01152        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_global_search);
01153        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_global_search_data_free);
01154        _tmp0_ = _g_object_ref0 (self);
01155        _data_->self = _tmp0_;
01156        _tmp1_ = search_string;
01157        _tmp2_ = g_strdup (_tmp1_);
01158        _data_->search_string = _tmp2_;
01159        _tmp3_ = hints;
01160        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
01161        _data_->hints = _tmp4_;
01162        unity_scope_proxy_remote_real_global_search_co (_data_);
01163 }
01164 
01165 
01166 static GHashTable* unity_scope_proxy_remote_real_global_search_finish (UnityScopeProxy* base, GAsyncResult* _res_) {
01167        GHashTable* result;
01168        UnityScopeProxyRemoteGlobalSearchData* _data_;
01169        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
01170        result = _data_->result;
01171        _data_->result = NULL;
01172        return result;
01173 }
01174 
01175 
01176 static void unity_scope_proxy_remote_global_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
01177        UnityScopeProxyRemoteGlobalSearchData* _data_;
01178        _data_ = _user_data_;
01179        _data_->_source_object_ = source_object;
01180        _data_->_res_ = _res_;
01181        unity_scope_proxy_remote_real_global_search_co (_data_);
01182 }
01183 
01184 
01185 static gboolean unity_scope_proxy_remote_real_global_search_co (UnityScopeProxyRemoteGlobalSearchData* _data_) {
01186        switch (_data_->_state_) {
01187               case 0:
01188               goto _state_0;
01189               case 1:
01190               goto _state_1;
01191               default:
01192               g_assert_not_reached ();
01193        }
01194        _state_0:
01195        _data_->_tmp0_ = _data_->self->priv->synchronized;
01196        if (_data_->_tmp0_) {
01197               {
01198                      _data_->_tmp1_ = _data_->self->priv->_service;
01199                      _data_->_tmp2_ = _data_->search_string;
01200                      _data_->_tmp3_ = _data_->hints;
01201                      _data_->_state_ = 1;
01202                      unity_protocol_scope_service_global_search (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, unity_scope_proxy_remote_global_search_ready, _data_);
01203                      return FALSE;
01204                      _state_1:
01205                      _data_->_tmp4_ = NULL;
01206                      _data_->_tmp4_ = unity_protocol_scope_service_global_search_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
01207                      _data_->_result_ = _data_->_tmp4_;
01208                      if (_data_->_inner_error_ != NULL) {
01209                             if (g_error_matches (_data_->_inner_error_, UNITY_PROTOCOL_SCOPE_ERROR, UNITY_PROTOCOL_SCOPE_ERROR_SEARCH_CANCELLED)) {
01210                                    goto __catch30_unity_protocol_scope_error_search_cancelled;
01211                             }
01212                             goto __catch30_g_error;
01213                      }
01214                      _data_->result = _data_->_result_;
01215                      if (_data_->_state_ == 0) {
01216                             g_simple_async_result_complete_in_idle (_data_->_async_result);
01217                      } else {
01218                             g_simple_async_result_complete (_data_->_async_result);
01219                      }
01220                      g_object_unref (_data_->_async_result);
01221                      return FALSE;
01222               }
01223               goto __finally30;
01224               __catch30_unity_protocol_scope_error_search_cancelled:
01225               {
01226                      _data_->scope_error = _data_->_inner_error_;
01227                      _data_->_inner_error_ = NULL;
01228                      _g_error_free0 (_data_->scope_error);
01229               }
01230               goto __finally30;
01231               __catch30_g_error:
01232               {
01233                      _data_->e = _data_->_inner_error_;
01234                      _data_->_inner_error_ = NULL;
01235                      _data_->_tmp5_ = _data_->self->priv->_dbus_path;
01236                      _data_->_tmp6_ = NULL;
01237                      _data_->_tmp6_ = string_to_string (_data_->_tmp5_);
01238                      _data_->_tmp7_ = _data_->search_string;
01239                      _data_->_tmp8_ = NULL;
01240                      _data_->_tmp8_ = string_to_string (_data_->_tmp7_);
01241                      _data_->_tmp9_ = _data_->e;
01242                      _data_->_tmp10_ = _data_->_tmp9_->message;
01243                      _data_->_tmp11_ = NULL;
01244                      _data_->_tmp11_ = string_to_string (_data_->_tmp10_);
01245                      _data_->_tmp12_ = NULL;
01246                      _data_->_tmp12_ = g_strconcat ("Unable to global_search scope (", _data_->_tmp6_, " - '", _data_->_tmp8_, "'): ", _data_->_tmp11_, NULL);
01247                      _data_->_tmp13_ = _data_->_tmp12_;
01248                      g_warning ("unity-scope-proxy-remote.vala:248: %s", _data_->_tmp13_);
01249                      _g_free0 (_data_->_tmp13_);
01250                      _g_error_free0 (_data_->e);
01251               }
01252               __finally30:
01253               if (_data_->_inner_error_ != NULL) {
01254                      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);
01255                      g_clear_error (&_data_->_inner_error_);
01256                      return FALSE;
01257               }
01258        }
01259        _data_->_tmp14_ = g_str_hash;
01260        _data_->_tmp15_ = g_str_equal;
01261        _data_->_tmp16_ = g_hash_table_new_full (_data_->_tmp14_, _data_->_tmp15_, _g_free0_, _g_variant_unref0_);
01262        _data_->result = _data_->_tmp16_;
01263        if (_data_->_state_ == 0) {
01264               g_simple_async_result_complete_in_idle (_data_->_async_result);
01265        } else {
01266               g_simple_async_result_complete (_data_->_async_result);
01267        }
01268        g_object_unref (_data_->_async_result);
01269        return FALSE;
01270        if (_data_->_state_ == 0) {
01271               g_simple_async_result_complete_in_idle (_data_->_async_result);
01272        } else {
01273               g_simple_async_result_complete (_data_->_async_result);
01274        }
01275        g_object_unref (_data_->_async_result);
01276        return FALSE;
01277 }
01278 
01279 
01280 static void unity_scope_proxy_remote_set_view_type_data_free (gpointer _data) {
01281        UnityScopeProxyRemoteSetViewTypeData* _data_;
01282        _data_ = _data;
01283        _g_object_unref0 (_data_->self);
01284        g_slice_free (UnityScopeProxyRemoteSetViewTypeData, _data_);
01285 }
01286 
01287 
01288 void unity_scope_proxy_remote_set_view_type (UnityScopeProxyRemote* self, UnityProtocolViewType view_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01289        UnityScopeProxyRemoteSetViewTypeData* _data_;
01290        UnityScopeProxyRemote* _tmp0_;
01291        UnityProtocolViewType _tmp1_;
01292        _data_ = g_slice_new0 (UnityScopeProxyRemoteSetViewTypeData);
01293        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_set_view_type);
01294        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_set_view_type_data_free);
01295        _tmp0_ = _g_object_ref0 (self);
01296        _data_->self = _tmp0_;
01297        _tmp1_ = view_type;
01298        _data_->view_type = _tmp1_;
01299        unity_scope_proxy_remote_set_view_type_co (_data_);
01300 }
01301 
01302 
01303 void unity_scope_proxy_remote_set_view_type_finish (UnityScopeProxyRemote* self, GAsyncResult* _res_) {
01304        UnityScopeProxyRemoteSetViewTypeData* _data_;
01305        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
01306 }
01307 
01308 
01309 static void unity_scope_proxy_remote_set_view_type_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
01310        UnityScopeProxyRemoteSetViewTypeData* _data_;
01311        _data_ = _user_data_;
01312        _data_->_source_object_ = source_object;
01313        _data_->_res_ = _res_;
01314        unity_scope_proxy_remote_set_view_type_co (_data_);
01315 }
01316 
01317 
01318 static gboolean unity_scope_proxy_remote_set_view_type_co (UnityScopeProxyRemoteSetViewTypeData* _data_) {
01319        switch (_data_->_state_) {
01320               case 0:
01321               goto _state_0;
01322               case 1:
01323               goto _state_1;
01324               default:
01325               g_assert_not_reached ();
01326        }
01327        _state_0:
01328        _data_->_tmp0_ = _data_->view_type;
01329        _data_->self->priv->_view_type = _data_->_tmp0_;
01330        _data_->_tmp1_ = _data_->self->priv->synchronized;
01331        if (_data_->_tmp1_) {
01332               {
01333                      _data_->_tmp2_ = _data_->self->priv->_service;
01334                      _data_->_tmp3_ = _data_->view_type;
01335                      _data_->_state_ = 1;
01336                      unity_protocol_scope_service_set_view_type (_data_->_tmp2_, (guint) _data_->_tmp3_, unity_scope_proxy_remote_set_view_type_ready, _data_);
01337                      return FALSE;
01338                      _state_1:
01339                      unity_protocol_scope_service_set_view_type_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
01340                      if (_data_->_inner_error_ != NULL) {
01341                             goto __catch31_g_error;
01342                      }
01343               }
01344               goto __finally31;
01345               __catch31_g_error:
01346               {
01347                      _data_->e = _data_->_inner_error_;
01348                      _data_->_inner_error_ = NULL;
01349                      _data_->_tmp4_ = _data_->self->priv->_dbus_path;
01350                      _data_->_tmp5_ = NULL;
01351                      _data_->_tmp5_ = string_to_string (_data_->_tmp4_);
01352                      _data_->_tmp6_ = _data_->e;
01353                      _data_->_tmp7_ = _data_->_tmp6_->message;
01354                      _data_->_tmp8_ = NULL;
01355                      _data_->_tmp8_ = string_to_string (_data_->_tmp7_);
01356                      _data_->_tmp9_ = NULL;
01357                      _data_->_tmp9_ = g_strconcat ("Unable to set_active (", _data_->_tmp5_, "): ", _data_->_tmp8_, NULL);
01358                      _data_->_tmp10_ = _data_->_tmp9_;
01359                      g_warning ("unity-scope-proxy-remote.vala:264: %s", _data_->_tmp10_);
01360                      _g_free0 (_data_->_tmp10_);
01361                      _g_error_free0 (_data_->e);
01362               }
01363               __finally31:
01364               if (_data_->_inner_error_ != NULL) {
01365                      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);
01366                      g_clear_error (&_data_->_inner_error_);
01367                      return FALSE;
01368               }
01369        }
01370        if (_data_->_state_ == 0) {
01371               g_simple_async_result_complete_in_idle (_data_->_async_result);
01372        } else {
01373               g_simple_async_result_complete (_data_->_async_result);
01374        }
01375        g_object_unref (_data_->_async_result);
01376        return FALSE;
01377 }
01378 
01379 
01380 static void unity_scope_proxy_remote_real_set_active_sources_data_free (gpointer _data) {
01381        UnityScopeProxyRemoteSetActiveSourcesData* _data_;
01382        _data_ = _data;
01383        _g_object_unref0 (_data_->self);
01384        g_slice_free (UnityScopeProxyRemoteSetActiveSourcesData, _data_);
01385 }
01386 
01387 
01388 static void unity_scope_proxy_remote_real_set_active_sources (UnityScopeProxy* base, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01389        UnityScopeProxyRemote * self;
01390        UnityScopeProxyRemoteSetActiveSourcesData* _data_;
01391        UnityScopeProxyRemote* _tmp0_;
01392        gchar** _tmp1_;
01393        gint _tmp1__length1;
01394        self = (UnityScopeProxyRemote*) base;
01395        _data_ = g_slice_new0 (UnityScopeProxyRemoteSetActiveSourcesData);
01396        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_set_active_sources);
01397        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_set_active_sources_data_free);
01398        _tmp0_ = _g_object_ref0 (self);
01399        _data_->self = _tmp0_;
01400        _tmp1_ = sources;
01401        _tmp1__length1 = sources_length1;
01402        _data_->sources = _tmp1_;
01403        _data_->sources_length1 = _tmp1__length1;
01404        unity_scope_proxy_remote_real_set_active_sources_co (_data_);
01405 }
01406 
01407 
01408 static void unity_scope_proxy_remote_real_set_active_sources_finish (UnityScopeProxy* base, GAsyncResult* _res_) {
01409        UnityScopeProxyRemoteSetActiveSourcesData* _data_;
01410        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
01411 }
01412 
01413 
01414 static void unity_scope_proxy_remote_set_active_sources_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
01415        UnityScopeProxyRemoteSetActiveSourcesData* _data_;
01416        _data_ = _user_data_;
01417        _data_->_source_object_ = source_object;
01418        _data_->_res_ = _res_;
01419        unity_scope_proxy_remote_real_set_active_sources_co (_data_);
01420 }
01421 
01422 
01423 static gboolean unity_scope_proxy_remote_real_set_active_sources_co (UnityScopeProxyRemoteSetActiveSourcesData* _data_) {
01424        switch (_data_->_state_) {
01425               case 0:
01426               goto _state_0;
01427               case 1:
01428               goto _state_1;
01429               default:
01430               g_assert_not_reached ();
01431        }
01432        _state_0:
01433        _data_->_tmp0_ = _data_->self->priv->synchronized;
01434        if (_data_->_tmp0_) {
01435               {
01436                      _data_->_tmp1_ = _data_->self->priv->_service;
01437                      _data_->_tmp2_ = _data_->sources;
01438                      _data_->_tmp2__length1 = _data_->sources_length1;
01439                      _data_->_state_ = 1;
01440                      unity_protocol_scope_service_set_active_sources (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp2__length1, unity_scope_proxy_remote_set_active_sources_ready, _data_);
01441                      return FALSE;
01442                      _state_1:
01443                      unity_protocol_scope_service_set_active_sources_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
01444                      if (_data_->_inner_error_ != NULL) {
01445                             goto __catch32_g_error;
01446                      }
01447               }
01448               goto __finally32;
01449               __catch32_g_error:
01450               {
01451                      _data_->e = _data_->_inner_error_;
01452                      _data_->_inner_error_ = NULL;
01453                      _data_->_tmp3_ = _data_->self->priv->_dbus_path;
01454                      _data_->_tmp4_ = NULL;
01455                      _data_->_tmp4_ = string_to_string (_data_->_tmp3_);
01456                      _data_->_tmp5_ = _data_->e;
01457                      _data_->_tmp6_ = _data_->_tmp5_->message;
01458                      _data_->_tmp7_ = NULL;
01459                      _data_->_tmp7_ = string_to_string (_data_->_tmp6_);
01460                      _data_->_tmp8_ = NULL;
01461                      _data_->_tmp8_ = g_strconcat ("Unable to set_sources (", _data_->_tmp4_, "): ", _data_->_tmp7_, NULL);
01462                      _data_->_tmp9_ = _data_->_tmp8_;
01463                      g_warning ("unity-scope-proxy-remote.vala:276: %s", _data_->_tmp9_);
01464                      _g_free0 (_data_->_tmp9_);
01465                      _g_error_free0 (_data_->e);
01466               }
01467               __finally32:
01468               if (_data_->_inner_error_ != NULL) {
01469                      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);
01470                      g_clear_error (&_data_->_inner_error_);
01471                      return FALSE;
01472               }
01473        }
01474        if (_data_->_state_ == 0) {
01475               g_simple_async_result_complete_in_idle (_data_->_async_result);
01476        } else {
01477               g_simple_async_result_complete (_data_->_async_result);
01478        }
01479        g_object_unref (_data_->_async_result);
01480        return FALSE;
01481 }
01482 
01483 
01484 void unity_scope_proxy_remote_on_changed (UnityScopeProxyRemote* self, UnityProtocolScopeInfo* scope_info) {
01485        const gchar* _tmp0_;
01486        UnityProtocolScopeInfo _tmp1_;
01487        const gchar* _tmp2_;
01488        const gchar* _tmp10_;
01489        UnityProtocolScopeInfo _tmp11_;
01490        gboolean _tmp12_;
01491        gboolean _tmp13_ = FALSE;
01492        DeeSerializableModel* _tmp14_;
01493        DeeSerializableModel* _tmp15_;
01494        gboolean _tmp20_;
01495        gboolean _tmp27_ = FALSE;
01496        DeeSerializableModel* _tmp28_;
01497        DeeSerializableModel* _tmp29_;
01498        gboolean _tmp34_;
01499        gboolean _tmp41_ = FALSE;
01500        DeeSerializableModel* _tmp42_;
01501        DeeSerializableModel* _tmp43_;
01502        gboolean _tmp48_;
01503        UnityOptionsFilter* _tmp55_;
01504        UnityOptionsFilter* _tmp56_;
01505        UnityProtocolScopeInfo _tmp57_;
01506        GVariant* _tmp58_;
01507        gboolean _tmp59_;
01508        g_return_if_fail (self != NULL);
01509        g_return_if_fail (scope_info != NULL);
01510        _tmp0_ = self->priv->_dbus_path;
01511        _tmp1_ = *scope_info;
01512        _tmp2_ = _tmp1_.dbus_path;
01513        if (g_strcmp0 (_tmp0_, _tmp2_) != 0) {
01514               const gchar* _tmp3_;
01515               const gchar* _tmp4_ = NULL;
01516               UnityProtocolScopeInfo _tmp5_;
01517               const gchar* _tmp6_;
01518               const gchar* _tmp7_ = NULL;
01519               gchar* _tmp8_ = NULL;
01520               gchar* _tmp9_;
01521               _tmp3_ = self->priv->_dbus_path;
01522               _tmp4_ = string_to_string (_tmp3_);
01523               _tmp5_ = *scope_info;
01524               _tmp6_ = _tmp5_.dbus_path;
01525               _tmp7_ = string_to_string (_tmp6_);
01526               _tmp8_ = g_strconcat ("Unable to handle Scope changed signal: dbus_path mismatch. Expected ", _tmp4_, " got ", _tmp7_, NULL);
01527               _tmp9_ = _tmp8_;
01528               g_warning ("unity-scope-proxy-remote.vala:286: %s", _tmp9_);
01529               _g_free0 (_tmp9_);
01530               return;
01531        }
01532        _tmp10_ = self->priv->_dbus_path;
01533        unity_trace_log_object ((GObject*) self, "Processing changed signal for %s", _tmp10_);
01534        _tmp11_ = *scope_info;
01535        _tmp12_ = _tmp11_.search_in_global;
01536        unity_scope_proxy_set_search_in_global ((UnityScopeProxy*) self, _tmp12_);
01537        _tmp14_ = unity_scope_proxy_get_results_model ((UnityScopeProxy*) self);
01538        _tmp15_ = _tmp14_;
01539        if (_tmp15_ == NULL) {
01540               _tmp13_ = TRUE;
01541        } else {
01542               DeeSharedModel* _tmp16_;
01543               const gchar* _tmp17_ = NULL;
01544               UnityProtocolScopeInfo _tmp18_;
01545               const gchar* _tmp19_;
01546               _tmp16_ = self->priv->_results_model;
01547               _tmp17_ = dee_shared_model_get_swarm_name (_tmp16_);
01548               _tmp18_ = *scope_info;
01549               _tmp19_ = _tmp18_.results_model_name;
01550               _tmp13_ = g_strcmp0 (_tmp17_, _tmp19_) != 0;
01551        }
01552        _tmp20_ = _tmp13_;
01553        if (_tmp20_) {
01554               UnityProtocolScopeInfo _tmp21_;
01555               const gchar* _tmp22_;
01556               DeeSharedModel* _tmp23_;
01557               DeeSharedModel* _tmp24_;
01558               DeeSerializableModel* _tmp25_;
01559               DeeSerializableModel* _tmp26_;
01560               _tmp21_ = *scope_info;
01561               _tmp22_ = _tmp21_.results_model_name;
01562               _tmp23_ = (DeeSharedModel*) dee_shared_model_new (_tmp22_);
01563               _tmp24_ = _tmp23_;
01564               unity_scope_proxy_set_results_model ((UnityScopeProxy*) self, (DeeSerializableModel*) _tmp24_);
01565               _g_object_unref0 (_tmp24_);
01566               _tmp25_ = unity_scope_proxy_get_results_model ((UnityScopeProxy*) self);
01567               _tmp26_ = _tmp25_;
01568               dee_model_set_schema ((DeeModel*) _tmp26_, "s", "s", "u", "s", "s", "s", "s", NULL);
01569        }
01570        _tmp28_ = unity_scope_proxy_get_global_results_model ((UnityScopeProxy*) self);
01571        _tmp29_ = _tmp28_;
01572        if (_tmp29_ == NULL) {
01573               _tmp27_ = TRUE;
01574        } else {
01575               DeeSharedModel* _tmp30_;
01576               const gchar* _tmp31_ = NULL;
01577               UnityProtocolScopeInfo _tmp32_;
01578               const gchar* _tmp33_;
01579               _tmp30_ = self->priv->_global_results_model;
01580               _tmp31_ = dee_shared_model_get_swarm_name (_tmp30_);
01581               _tmp32_ = *scope_info;
01582               _tmp33_ = _tmp32_.global_results_model_name;
01583               _tmp27_ = g_strcmp0 (_tmp31_, _tmp33_) != 0;
01584        }
01585        _tmp34_ = _tmp27_;
01586        if (_tmp34_) {
01587               UnityProtocolScopeInfo _tmp35_;
01588               const gchar* _tmp36_;
01589               DeeSharedModel* _tmp37_;
01590               DeeSharedModel* _tmp38_;
01591               DeeSerializableModel* _tmp39_;
01592               DeeSerializableModel* _tmp40_;
01593               _tmp35_ = *scope_info;
01594               _tmp36_ = _tmp35_.global_results_model_name;
01595               _tmp37_ = (DeeSharedModel*) dee_shared_model_new (_tmp36_);
01596               _tmp38_ = _tmp37_;
01597               unity_scope_proxy_set_global_results_model ((UnityScopeProxy*) self, (DeeSerializableModel*) _tmp38_);
01598               _g_object_unref0 (_tmp38_);
01599               _tmp39_ = unity_scope_proxy_get_global_results_model ((UnityScopeProxy*) self);
01600               _tmp40_ = _tmp39_;
01601               dee_model_set_schema ((DeeModel*) _tmp40_, "s", "s", "u", "s", "s", "s", "s", NULL);
01602        }
01603        _tmp42_ = unity_scope_proxy_get_filters_model ((UnityScopeProxy*) self);
01604        _tmp43_ = _tmp42_;
01605        if (_tmp43_ == NULL) {
01606               _tmp41_ = TRUE;
01607        } else {
01608               DeeSharedModel* _tmp44_;
01609               const gchar* _tmp45_ = NULL;
01610               UnityProtocolScopeInfo _tmp46_;
01611               const gchar* _tmp47_;
01612               _tmp44_ = self->priv->_filters_model;
01613               _tmp45_ = dee_shared_model_get_swarm_name (_tmp44_);
01614               _tmp46_ = *scope_info;
01615               _tmp47_ = _tmp46_.filters_model_name;
01616               _tmp41_ = g_strcmp0 (_tmp45_, _tmp47_) != 0;
01617        }
01618        _tmp48_ = _tmp41_;
01619        if (_tmp48_) {
01620               UnityProtocolScopeInfo _tmp49_;
01621               const gchar* _tmp50_;
01622               DeeSharedModel* _tmp51_;
01623               DeeSharedModel* _tmp52_;
01624               DeeSerializableModel* _tmp53_;
01625               DeeSerializableModel* _tmp54_;
01626               _tmp49_ = *scope_info;
01627               _tmp50_ = _tmp49_.filters_model_name;
01628               _tmp51_ = (DeeSharedModel*) dee_shared_model_new (_tmp50_);
01629               _tmp52_ = _tmp51_;
01630               unity_scope_proxy_set_filters_model ((UnityScopeProxy*) self, (DeeSerializableModel*) _tmp52_);
01631               _g_object_unref0 (_tmp52_);
01632               _tmp53_ = unity_scope_proxy_get_filters_model ((UnityScopeProxy*) self);
01633               _tmp54_ = _tmp53_;
01634               dee_model_set_schema ((DeeModel*) _tmp54_, "s", "s", "s", "s", "a{sv}", "b", "b", "b", NULL);
01635        }
01636        _tmp55_ = unity_scope_proxy_get_sources ((UnityScopeProxy*) self);
01637        _tmp56_ = _tmp55_;
01638        _tmp57_ = *scope_info;
01639        _tmp58_ = _tmp57_.sources;
01640        unity_filter_update ((UnityFilter*) _tmp56_, _tmp58_);
01641        g_object_notify ((GObject*) self, "sources");
01642        _tmp59_ = self->priv->synchronized;
01643        if (!_tmp59_) {
01644               UnityProtocolViewType _tmp60_;
01645               self->priv->synchronized = TRUE;
01646               _tmp60_ = self->priv->_view_type;
01647               unity_scope_proxy_remote_set_view_type (self, _tmp60_, NULL, NULL);
01648        }
01649 }
01650 
01651 
01652 const gchar* unity_scope_proxy_remote_get_dbus_name (UnityScopeProxyRemote* self) {
01653        const gchar* result;
01654        const gchar* _tmp0_;
01655        g_return_val_if_fail (self != NULL, NULL);
01656        _tmp0_ = self->priv->_dbus_name;
01657        result = _tmp0_;
01658        return result;
01659 }
01660 
01661 
01662 static void unity_scope_proxy_remote_set_dbus_name (UnityScopeProxyRemote* self, const gchar* value) {
01663        const gchar* _tmp0_;
01664        gchar* _tmp1_;
01665        g_return_if_fail (self != NULL);
01666        _tmp0_ = value;
01667        _tmp1_ = g_strdup (_tmp0_);
01668        _g_free0 (self->priv->_dbus_name);
01669        self->priv->_dbus_name = _tmp1_;
01670        g_object_notify ((GObject *) self, "dbus-name");
01671 }
01672 
01673 
01674 const gchar* unity_scope_proxy_remote_get_dbus_path (UnityScopeProxyRemote* self) {
01675        const gchar* result;
01676        const gchar* _tmp0_;
01677        g_return_val_if_fail (self != NULL, NULL);
01678        _tmp0_ = self->priv->_dbus_path;
01679        result = _tmp0_;
01680        return result;
01681 }
01682 
01683 
01684 static void unity_scope_proxy_remote_set_dbus_path (UnityScopeProxyRemote* self, const gchar* value) {
01685        const gchar* _tmp0_;
01686        gchar* _tmp1_;
01687        g_return_if_fail (self != NULL);
01688        _tmp0_ = value;
01689        _tmp1_ = g_strdup (_tmp0_);
01690        _g_free0 (self->priv->_dbus_path);
01691        self->priv->_dbus_path = _tmp1_;
01692        g_object_notify ((GObject *) self, "dbus-path");
01693 }
01694 
01695 
01696 static UnityOptionsFilter* unity_scope_proxy_remote_real_get_sources (UnityScopeProxy* base) {
01697        UnityOptionsFilter* result;
01698        UnityScopeProxyRemote* self;
01699        UnityOptionsFilter* _tmp0_;
01700        self = (UnityScopeProxyRemote*) base;
01701        _tmp0_ = self->priv->_sources;
01702        result = _tmp0_;
01703        return result;
01704 }
01705 
01706 
01707 static void unity_scope_proxy_remote_real_set_sources (UnityScopeProxy* base, UnityOptionsFilter* value) {
01708        UnityScopeProxyRemote* self;
01709        UnityOptionsFilter* _tmp0_;
01710        UnityOptionsFilter* _tmp1_;
01711        self = (UnityScopeProxyRemote*) base;
01712        _tmp0_ = value;
01713        _tmp1_ = _g_object_ref0 (_tmp0_);
01714        _g_object_unref0 (self->priv->_sources);
01715        self->priv->_sources = _tmp1_;
01716        g_object_notify ((GObject *) self, "sources");
01717 }
01718 
01719 
01720 static gboolean unity_scope_proxy_remote_real_get_search_in_global (UnityScopeProxy* base) {
01721        gboolean result;
01722        UnityScopeProxyRemote* self;
01723        gboolean _tmp0_;
01724        self = (UnityScopeProxyRemote*) base;
01725        _tmp0_ = self->priv->_search_in_global;
01726        result = _tmp0_;
01727        return result;
01728 }
01729 
01730 
01731 static void unity_scope_proxy_remote_real_set_search_in_global (UnityScopeProxy* base, gboolean value) {
01732        UnityScopeProxyRemote* self;
01733        gboolean _tmp0_;
01734        self = (UnityScopeProxyRemote*) base;
01735        _tmp0_ = value;
01736        self->priv->_search_in_global = _tmp0_;
01737        g_object_notify ((GObject *) self, "search-in-global");
01738 }
01739 
01740 
01741 static DeeSerializableModel* unity_scope_proxy_remote_real_get_results_model (UnityScopeProxy* base) {
01742        DeeSerializableModel* result;
01743        UnityScopeProxyRemote* self;
01744        DeeSharedModel* _tmp0_;
01745        self = (UnityScopeProxyRemote*) base;
01746        _tmp0_ = self->priv->_results_model;
01747        result = (DeeSerializableModel*) _tmp0_;
01748        return result;
01749 }
01750 
01751 
01752 static void unity_scope_proxy_remote_real_set_results_model (UnityScopeProxy* base, DeeSerializableModel* value) {
01753        UnityScopeProxyRemote* self;
01754        DeeSerializableModel* _tmp0_;
01755        DeeSharedModel* _tmp1_;
01756        self = (UnityScopeProxyRemote*) base;
01757        _tmp0_ = value;
01758        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, dee_shared_model_get_type ()) ? ((DeeSharedModel*) _tmp0_) : NULL);
01759        _g_object_unref0 (self->priv->_results_model);
01760        self->priv->_results_model = _tmp1_;
01761        g_object_notify ((GObject *) self, "results-model");
01762 }
01763 
01764 
01765 static DeeSerializableModel* unity_scope_proxy_remote_real_get_global_results_model (UnityScopeProxy* base) {
01766        DeeSerializableModel* result;
01767        UnityScopeProxyRemote* self;
01768        DeeSharedModel* _tmp0_;
01769        self = (UnityScopeProxyRemote*) base;
01770        _tmp0_ = self->priv->_global_results_model;
01771        result = (DeeSerializableModel*) _tmp0_;
01772        return result;
01773 }
01774 
01775 
01776 static void unity_scope_proxy_remote_real_set_global_results_model (UnityScopeProxy* base, DeeSerializableModel* value) {
01777        UnityScopeProxyRemote* self;
01778        DeeSerializableModel* _tmp0_;
01779        DeeSharedModel* _tmp1_;
01780        self = (UnityScopeProxyRemote*) base;
01781        _tmp0_ = value;
01782        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, dee_shared_model_get_type ()) ? ((DeeSharedModel*) _tmp0_) : NULL);
01783        _g_object_unref0 (self->priv->_global_results_model);
01784        self->priv->_global_results_model = _tmp1_;
01785        g_object_notify ((GObject *) self, "global-results-model");
01786 }
01787 
01788 
01789 static DeeSerializableModel* unity_scope_proxy_remote_real_get_filters_model (UnityScopeProxy* base) {
01790        DeeSerializableModel* result;
01791        UnityScopeProxyRemote* self;
01792        DeeSharedModel* _tmp0_;
01793        self = (UnityScopeProxyRemote*) base;
01794        _tmp0_ = self->priv->_filters_model;
01795        result = (DeeSerializableModel*) _tmp0_;
01796        return result;
01797 }
01798 
01799 
01800 static void unity_scope_proxy_remote_real_set_filters_model (UnityScopeProxy* base, DeeSerializableModel* value) {
01801        UnityScopeProxyRemote* self;
01802        DeeSerializableModel* _tmp0_;
01803        DeeSharedModel* _tmp1_;
01804        self = (UnityScopeProxyRemote*) base;
01805        _tmp0_ = value;
01806        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, dee_shared_model_get_type ()) ? ((DeeSharedModel*) _tmp0_) : NULL);
01807        _g_object_unref0 (self->priv->_filters_model);
01808        self->priv->_filters_model = _tmp1_;
01809        g_object_notify ((GObject *) self, "filters-model");
01810 }
01811 
01812 
01813 static UnityProtocolViewType unity_scope_proxy_remote_real_get_view_type (UnityScopeProxy* base) {
01814        UnityProtocolViewType result;
01815        UnityScopeProxyRemote* self;
01816        UnityProtocolViewType _tmp0_;
01817        self = (UnityScopeProxyRemote*) base;
01818        _tmp0_ = self->priv->_view_type;
01819        result = _tmp0_;
01820        return result;
01821 }
01822 
01823 
01824 static void unity_scope_proxy_remote_real_set_view_type (UnityScopeProxy* base, UnityProtocolViewType value) {
01825        UnityScopeProxyRemote* self;
01826        UnityProtocolViewType _tmp0_;
01827        UnityProtocolViewType _tmp1_;
01828        self = (UnityScopeProxyRemote*) base;
01829        _tmp0_ = self->priv->_view_type;
01830        _tmp1_ = value;
01831        if (_tmp0_ != _tmp1_) {
01832               UnityProtocolViewType _tmp2_;
01833               _tmp2_ = value;
01834               unity_scope_proxy_remote_set_view_type (self, _tmp2_, NULL, NULL);
01835        }
01836        g_object_notify ((GObject *) self, "view-type");
01837 }
01838 
01839 
01840 static void _unity_scope_proxy_remote_on_scope_appeared_gbus_name_appeared_callback (GDBusConnection* connection, const gchar* name, const gchar* name_owner, gpointer self) {
01841        unity_scope_proxy_remote_on_scope_appeared (self, connection, name, name_owner);
01842 }
01843 
01844 
01845 static void _unity_scope_proxy_remote_on_scope_vanished_gbus_name_vanished_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
01846        unity_scope_proxy_remote_on_scope_vanished (self, connection, name);
01847 }
01848 
01849 
01850 static GObject * unity_scope_proxy_remote_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
01851        GObject * obj;
01852        GObjectClass * parent_class;
01853        UnityScopeProxyRemote * self;
01854        UnityCheckOptionFilter* _tmp0_;
01855        UnityCheckOptionFilter* _tmp1_;
01856        GError * _inner_error_ = NULL;
01857        parent_class = G_OBJECT_CLASS (unity_scope_proxy_remote_parent_class);
01858        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
01859        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemote);
01860        _tmp0_ = unity_check_option_filter_new ("sources", "Sources", NULL, TRUE);
01861        _tmp1_ = _tmp0_;
01862        unity_scope_proxy_set_sources ((UnityScopeProxy*) self, (UnityOptionsFilter*) _tmp1_);
01863        _g_object_unref0 (_tmp1_);
01864        {
01865               GDBusConnection* _tmp2_ = NULL;
01866               GDBusConnection* _tmp3_;
01867               GDBusConnection* _tmp4_;
01868               const gchar* _tmp5_;
01869               guint _tmp6_ = 0U;
01870               _tmp2_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
01871               _tmp3_ = _tmp2_;
01872               if (_inner_error_ != NULL) {
01873                      goto __catch33_g_error;
01874               }
01875               _g_object_unref0 (self->priv->_bus);
01876               self->priv->_bus = _tmp3_;
01877               _tmp4_ = self->priv->_bus;
01878               _tmp5_ = self->priv->_dbus_name;
01879               _tmp6_ = g_bus_watch_name_on_connection_with_closures (_tmp4_, _tmp5_, G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((_unity_scope_proxy_remote_on_scope_appeared_gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _unity_scope_proxy_remote_on_scope_appeared_gbus_name_appeared_callback, g_object_ref (self), g_object_unref)), (GClosure*) ((_unity_scope_proxy_remote_on_scope_vanished_gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _unity_scope_proxy_remote_on_scope_vanished_gbus_name_vanished_callback, g_object_ref (self), g_object_unref)));
01880               self->priv->_watcher = _tmp6_;
01881               unity_scope_proxy_remote_start_reconnection_timeout (self);
01882        }
01883        goto __finally33;
01884        __catch33_g_error:
01885        {
01886               GError* e = NULL;
01887               GError* _tmp7_;
01888               const gchar* _tmp8_;
01889               const gchar* _tmp9_ = NULL;
01890               gchar* _tmp10_ = NULL;
01891               gchar* _tmp11_;
01892               e = _inner_error_;
01893               _inner_error_ = NULL;
01894               _tmp7_ = e;
01895               _tmp8_ = _tmp7_->message;
01896               _tmp9_ = string_to_string (_tmp8_);
01897               _tmp10_ = g_strconcat ("Unable to connect to session bus: ", _tmp9_, NULL);
01898               _tmp11_ = _tmp10_;
01899               g_critical ("unity-scope-proxy-remote.vala:95: %s", _tmp11_);
01900               _g_free0 (_tmp11_);
01901               _g_error_free0 (e);
01902        }
01903        __finally33:
01904        if (_inner_error_ != NULL) {
01905               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);
01906               g_clear_error (&_inner_error_);
01907        }
01908        return obj;
01909 }
01910 
01911 
01912 static void unity_scope_proxy_remote_class_init (UnityScopeProxyRemoteClass * klass) {
01913        unity_scope_proxy_remote_parent_class = g_type_class_peek_parent (klass);
01914        g_type_class_add_private (klass, sizeof (UnityScopeProxyRemotePrivate));
01915        G_OBJECT_CLASS (klass)->get_property = _vala_unity_scope_proxy_remote_get_property;
01916        G_OBJECT_CLASS (klass)->set_property = _vala_unity_scope_proxy_remote_set_property;
01917        G_OBJECT_CLASS (klass)->constructor = unity_scope_proxy_remote_constructor;
01918        G_OBJECT_CLASS (klass)->finalize = unity_scope_proxy_remote_finalize;
01919        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_REMOTE_DBUS_NAME, g_param_spec_string ("dbus-name", "dbus-name", "dbus-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01920        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_REMOTE_DBUS_PATH, g_param_spec_string ("dbus-path", "dbus-path", "dbus-path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01921        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_REMOTE_SOURCES, g_param_spec_object ("sources", "sources", "sources", UNITY_TYPE_OPTIONS_FILTER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01922        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_REMOTE_SEARCH_IN_GLOBAL, g_param_spec_boolean ("search-in-global", "search-in-global", "search-in-global", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01923        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_REMOTE_RESULTS_MODEL, g_param_spec_object ("results-model", "results-model", "results-model", dee_serializable_model_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01924        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_REMOTE_GLOBAL_RESULTS_MODEL, g_param_spec_object ("global-results-model", "global-results-model", "global-results-model", dee_serializable_model_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01925        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_REMOTE_FILTERS_MODEL, g_param_spec_object ("filters-model", "filters-model", "filters-model", dee_serializable_model_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01926        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_REMOTE_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));
01927 }
01928 
01929 
01930 static void unity_scope_proxy_remote_unity_scope_proxy_interface_init (UnityScopeProxyIface * iface) {
01931        unity_scope_proxy_remote_unity_scope_proxy_parent_iface = g_type_interface_peek_parent (iface);
01932        iface->activate = (void (*)(UnityScopeProxy*, const gchar*, UnityProtocolActionType, UnityProtocolActivationReplyRaw*)) unity_scope_proxy_remote_real_activate;
01933        iface->activate_finish = unity_scope_proxy_remote_real_activate_finish;
01934        iface->update_preview_property = (GHashTable* (*)(UnityScopeProxy*, const gchar*, GHashTable*, GError**)) unity_scope_proxy_remote_real_update_preview_property;
01935        iface->update_preview_property_finish = unity_scope_proxy_remote_real_update_preview_property_finish;
01936        iface->search = (GHashTable* (*)(UnityScopeProxy*, const gchar*, GHashTable*)) unity_scope_proxy_remote_real_search;
01937        iface->search_finish = unity_scope_proxy_remote_real_search_finish;
01938        iface->global_search = (GHashTable* (*)(UnityScopeProxy*, const gchar*, GHashTable*)) unity_scope_proxy_remote_real_global_search;
01939        iface->global_search_finish = unity_scope_proxy_remote_real_global_search_finish;
01940        iface->set_active_sources = (void (*)(UnityScopeProxy*, gchar**, int)) unity_scope_proxy_remote_real_set_active_sources;
01941        iface->set_active_sources_finish = unity_scope_proxy_remote_real_set_active_sources_finish;
01942        iface->get_sources = unity_scope_proxy_remote_real_get_sources;
01943        iface->set_sources = unity_scope_proxy_remote_real_set_sources;
01944        iface->get_search_in_global = unity_scope_proxy_remote_real_get_search_in_global;
01945        iface->set_search_in_global = unity_scope_proxy_remote_real_set_search_in_global;
01946        iface->get_results_model = unity_scope_proxy_remote_real_get_results_model;
01947        iface->set_results_model = unity_scope_proxy_remote_real_set_results_model;
01948        iface->get_global_results_model = unity_scope_proxy_remote_real_get_global_results_model;
01949        iface->set_global_results_model = unity_scope_proxy_remote_real_set_global_results_model;
01950        iface->get_filters_model = unity_scope_proxy_remote_real_get_filters_model;
01951        iface->set_filters_model = unity_scope_proxy_remote_real_set_filters_model;
01952        iface->get_view_type = unity_scope_proxy_remote_real_get_view_type;
01953        iface->set_view_type = unity_scope_proxy_remote_real_set_view_type;
01954 }
01955 
01956 
01957 static void unity_scope_proxy_remote_instance_init (UnityScopeProxyRemote * self) {
01958        self->priv = UNITY_SCOPE_PROXY_REMOTE_GET_PRIVATE (self);
01959        self->priv->_reconnection_id = (guint) 0;
01960        self->priv->synchronized = FALSE;
01961        self->priv->_last_scope_crash = (gint64) 0;
01962        self->priv->_scope_crashes = (guint) 0;
01963 }
01964 
01965 
01966 static void unity_scope_proxy_remote_finalize (GObject* obj) {
01967        UnityScopeProxyRemote * self;
01968        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemote);
01969        _g_free0 (self->priv->_dbus_name);
01970        _g_free0 (self->priv->_dbus_path);
01971        _g_object_unref0 (self->priv->_sources);
01972        _g_object_unref0 (self->priv->_bus);
01973        _g_object_unref0 (self->priv->_service);
01974        _g_object_unref0 (self->priv->_results_model);
01975        _g_object_unref0 (self->priv->_global_results_model);
01976        _g_object_unref0 (self->priv->_filters_model);
01977        G_OBJECT_CLASS (unity_scope_proxy_remote_parent_class)->finalize (obj);
01978 }
01979 
01980 
01981 GType unity_scope_proxy_remote_get_type (void) {
01982        static volatile gsize unity_scope_proxy_remote_type_id__volatile = 0;
01983        if (g_once_init_enter (&unity_scope_proxy_remote_type_id__volatile)) {
01984               static const GTypeInfo g_define_type_info = { sizeof (UnityScopeProxyRemoteClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_scope_proxy_remote_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityScopeProxyRemote), 0, (GInstanceInitFunc) unity_scope_proxy_remote_instance_init, NULL };
01985               static const GInterfaceInfo unity_scope_proxy_info = { (GInterfaceInitFunc) unity_scope_proxy_remote_unity_scope_proxy_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
01986               GType unity_scope_proxy_remote_type_id;
01987               unity_scope_proxy_remote_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityScopeProxyRemote", &g_define_type_info, 0);
01988               g_type_add_interface_static (unity_scope_proxy_remote_type_id, UNITY_TYPE_SCOPE_PROXY, &unity_scope_proxy_info);
01989               g_once_init_leave (&unity_scope_proxy_remote_type_id__volatile, unity_scope_proxy_remote_type_id);
01990        }
01991        return unity_scope_proxy_remote_type_id__volatile;
01992 }
01993 
01994 
01995 static void _vala_unity_scope_proxy_remote_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
01996        UnityScopeProxyRemote * self;
01997        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemote);
01998        switch (property_id) {
01999               case UNITY_SCOPE_PROXY_REMOTE_DBUS_NAME:
02000               g_value_set_string (value, unity_scope_proxy_remote_get_dbus_name (self));
02001               break;
02002               case UNITY_SCOPE_PROXY_REMOTE_DBUS_PATH:
02003               g_value_set_string (value, unity_scope_proxy_remote_get_dbus_path (self));
02004               break;
02005               case UNITY_SCOPE_PROXY_REMOTE_SOURCES:
02006               g_value_set_object (value, unity_scope_proxy_get_sources ((UnityScopeProxy*) self));
02007               break;
02008               case UNITY_SCOPE_PROXY_REMOTE_SEARCH_IN_GLOBAL:
02009               g_value_set_boolean (value, unity_scope_proxy_get_search_in_global ((UnityScopeProxy*) self));
02010               break;
02011               case UNITY_SCOPE_PROXY_REMOTE_RESULTS_MODEL:
02012               g_value_set_object (value, unity_scope_proxy_get_results_model ((UnityScopeProxy*) self));
02013               break;
02014               case UNITY_SCOPE_PROXY_REMOTE_GLOBAL_RESULTS_MODEL:
02015               g_value_set_object (value, unity_scope_proxy_get_global_results_model ((UnityScopeProxy*) self));
02016               break;
02017               case UNITY_SCOPE_PROXY_REMOTE_FILTERS_MODEL:
02018               g_value_set_object (value, unity_scope_proxy_get_filters_model ((UnityScopeProxy*) self));
02019               break;
02020               case UNITY_SCOPE_PROXY_REMOTE_VIEW_TYPE:
02021               g_value_set_enum (value, unity_scope_proxy_get_view_type ((UnityScopeProxy*) self));
02022               break;
02023               default:
02024               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
02025               break;
02026        }
02027 }
02028 
02029 
02030 static void _vala_unity_scope_proxy_remote_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
02031        UnityScopeProxyRemote * self;
02032        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemote);
02033        switch (property_id) {
02034               case UNITY_SCOPE_PROXY_REMOTE_DBUS_NAME:
02035               unity_scope_proxy_remote_set_dbus_name (self, g_value_get_string (value));
02036               break;
02037               case UNITY_SCOPE_PROXY_REMOTE_DBUS_PATH:
02038               unity_scope_proxy_remote_set_dbus_path (self, g_value_get_string (value));
02039               break;
02040               case UNITY_SCOPE_PROXY_REMOTE_SOURCES:
02041               unity_scope_proxy_set_sources ((UnityScopeProxy*) self, g_value_get_object (value));
02042               break;
02043               case UNITY_SCOPE_PROXY_REMOTE_SEARCH_IN_GLOBAL:
02044               unity_scope_proxy_set_search_in_global ((UnityScopeProxy*) self, g_value_get_boolean (value));
02045               break;
02046               case UNITY_SCOPE_PROXY_REMOTE_RESULTS_MODEL:
02047               unity_scope_proxy_set_results_model ((UnityScopeProxy*) self, g_value_get_object (value));
02048               break;
02049               case UNITY_SCOPE_PROXY_REMOTE_GLOBAL_RESULTS_MODEL:
02050               unity_scope_proxy_set_global_results_model ((UnityScopeProxy*) self, g_value_get_object (value));
02051               break;
02052               case UNITY_SCOPE_PROXY_REMOTE_FILTERS_MODEL:
02053               unity_scope_proxy_set_filters_model ((UnityScopeProxy*) self, g_value_get_object (value));
02054               break;
02055               case UNITY_SCOPE_PROXY_REMOTE_VIEW_TYPE:
02056               unity_scope_proxy_set_view_type ((UnityScopeProxy*) self, g_value_get_enum (value));
02057               break;
02058               default:
02059               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
02060               break;
02061        }
02062 }
02063 
02064 
02065