Back to index

libunity  5.92.0
unity-scope-proxy-local.c
Go to the documentation of this file.
00001 /* unity-scope-proxy-local.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-scope-proxy-local.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 
00033 
00034 #define UNITY_TYPE_SCOPE_PROXY (unity_scope_proxy_get_type ())
00035 #define UNITY_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxy))
00036 #define UNITY_IS_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY))
00037 #define UNITY_SCOPE_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxyIface))
00038 
00039 typedef struct _UnityScopeProxy UnityScopeProxy;
00040 typedef struct _UnityScopeProxyIface UnityScopeProxyIface;
00041 
00042 #define UNITY_TYPE_SCOPE_PROXY_LOCAL (unity_scope_proxy_local_get_type ())
00043 #define UNITY_SCOPE_PROXY_LOCAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocal))
00044 #define UNITY_SCOPE_PROXY_LOCAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocalClass))
00045 #define UNITY_IS_SCOPE_PROXY_LOCAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY_LOCAL))
00046 #define UNITY_IS_SCOPE_PROXY_LOCAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_PROXY_LOCAL))
00047 #define UNITY_SCOPE_PROXY_LOCAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocalClass))
00048 
00049 typedef struct _UnityScopeProxyLocal UnityScopeProxyLocal;
00050 typedef struct _UnityScopeProxyLocalClass UnityScopeProxyLocalClass;
00051 typedef struct _UnityScopeProxyLocalPrivate UnityScopeProxyLocalPrivate;
00052 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00053 #define _g_free0(var) (var = (g_free (var), NULL))
00054 typedef struct _UnityScopeProxyLocalActivateData UnityScopeProxyLocalActivateData;
00055 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
00056 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00057 typedef struct _UnityScopeProxyLocalSearchData UnityScopeProxyLocalSearchData;
00058 typedef struct _UnityScopeProxyLocalUpdatePreviewPropertyData UnityScopeProxyLocalUpdatePreviewPropertyData;
00059 typedef struct _UnityScopeProxyLocalGlobalSearchData UnityScopeProxyLocalGlobalSearchData;
00060 typedef struct _UnityScopeProxyLocalSetActiveSourcesData UnityScopeProxyLocalSetActiveSourcesData;
00061 
00062 struct _UnityScopeProxyIface {
00063        GTypeInterface parent_iface;
00064        void (*activate) (UnityScopeProxy* self, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00065        void (*activate_finish) (UnityScopeProxy* self, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result);
00066        void (*update_preview_property) (UnityScopeProxy* self, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00067        GHashTable* (*update_preview_property_finish) (UnityScopeProxy* self, GAsyncResult* _res_, GError** error);
00068        void (*search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00069        GHashTable* (*search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00070        void (*global_search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00071        GHashTable* (*global_search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00072        void (*set_active_sources) (UnityScopeProxy* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
00073        void (*set_active_sources_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00074        UnityOptionsFilter* (*get_sources) (UnityScopeProxy* self);
00075        void (*set_sources) (UnityScopeProxy* self, UnityOptionsFilter* value);
00076        gboolean (*get_search_in_global) (UnityScopeProxy* self);
00077        void (*set_search_in_global) (UnityScopeProxy* self, gboolean value);
00078        UnityProtocolViewType (*get_view_type) (UnityScopeProxy* self);
00079        void (*set_view_type) (UnityScopeProxy* self, UnityProtocolViewType value);
00080        DeeSerializableModel* (*get_results_model) (UnityScopeProxy* self);
00081        void (*set_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00082        DeeSerializableModel* (*get_global_results_model) (UnityScopeProxy* self);
00083        void (*set_global_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00084        DeeSerializableModel* (*get_filters_model) (UnityScopeProxy* self);
00085        void (*set_filters_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00086 };
00087 
00088 struct _UnityScopeProxyLocal {
00089        GObject parent_instance;
00090        UnityScopeProxyLocalPrivate * priv;
00091 };
00092 
00093 struct _UnityScopeProxyLocalClass {
00094        GObjectClass parent_class;
00095 };
00096 
00097 struct _UnityScopeProxyLocalPrivate {
00098        UnityScope* _scope;
00099        UnityProtocolViewType _view_type;
00100 };
00101 
00102 struct _UnityScopeProxyLocalActivateData {
00103        int _state_;
00104        GObject* _source_object_;
00105        GAsyncResult* _res_;
00106        GSimpleAsyncResult* _async_result;
00107        UnityScopeProxyLocal* self;
00108        gchar* uri;
00109        UnityProtocolActionType action_type;
00110        UnityProtocolActivationReplyRaw result;
00111        UnityScope* _tmp0_;
00112        const gchar* _tmp1_;
00113        UnityProtocolActionType _tmp2_;
00114        UnityProtocolActivationReplyRaw _tmp3_;
00115        UnityProtocolActivationReplyRaw reply;
00116 };
00117 
00118 struct _UnityScopeProxyLocalSearchData {
00119        int _state_;
00120        GObject* _source_object_;
00121        GAsyncResult* _res_;
00122        GSimpleAsyncResult* _async_result;
00123        UnityScopeProxyLocal* self;
00124        gchar* search_string;
00125        GHashTable* hints;
00126        GHashTable* result;
00127        UnityScope* _tmp0_;
00128        const gchar* _tmp1_;
00129        GHashTable* _tmp2_;
00130        GHashTable* _tmp3_;
00131        GHashTable* _result_;
00132        GError* scope_error;
00133        GError* e;
00134        const gchar* _tmp4_;
00135        const gchar* _tmp5_;
00136        GError* _tmp6_;
00137        const gchar* _tmp7_;
00138        const gchar* _tmp8_;
00139        gchar* _tmp9_;
00140        gchar* _tmp10_;
00141        GHashFunc _tmp11_;
00142        GEqualFunc _tmp12_;
00143        GHashTable* _tmp13_;
00144        GError * _inner_error_;
00145 };
00146 
00147 struct _UnityScopeProxyLocalUpdatePreviewPropertyData {
00148        int _state_;
00149        GObject* _source_object_;
00150        GAsyncResult* _res_;
00151        GSimpleAsyncResult* _async_result;
00152        UnityScopeProxyLocal* self;
00153        gchar* uri;
00154        GHashTable* values;
00155        GHashTable* result;
00156        UnityScope* _tmp0_;
00157        const gchar* _tmp1_;
00158        GHashTable* _tmp2_;
00159        GHashTable* _tmp3_;
00160        GHashTable* reply;
00161 };
00162 
00163 struct _UnityScopeProxyLocalGlobalSearchData {
00164        int _state_;
00165        GObject* _source_object_;
00166        GAsyncResult* _res_;
00167        GSimpleAsyncResult* _async_result;
00168        UnityScopeProxyLocal* self;
00169        gchar* search_string;
00170        GHashTable* hints;
00171        GHashTable* result;
00172        UnityScope* _tmp0_;
00173        const gchar* _tmp1_;
00174        GHashTable* _tmp2_;
00175        GHashTable* _tmp3_;
00176        GHashTable* _result_;
00177        GError* scope_error;
00178        GError* e;
00179        const gchar* _tmp4_;
00180        const gchar* _tmp5_;
00181        GError* _tmp6_;
00182        const gchar* _tmp7_;
00183        const gchar* _tmp8_;
00184        gchar* _tmp9_;
00185        gchar* _tmp10_;
00186        GHashFunc _tmp11_;
00187        GEqualFunc _tmp12_;
00188        GHashTable* _tmp13_;
00189        GError * _inner_error_;
00190 };
00191 
00192 struct _UnityScopeProxyLocalSetActiveSourcesData {
00193        int _state_;
00194        GObject* _source_object_;
00195        GAsyncResult* _res_;
00196        GSimpleAsyncResult* _async_result;
00197        UnityScopeProxyLocal* self;
00198        gchar** sources;
00199        gint sources_length1;
00200        UnityScope* _tmp0_;
00201        gchar** _tmp1_;
00202        gint _tmp1__length1;
00203 };
00204 
00205 
00206 static gpointer unity_scope_proxy_local_parent_class = NULL;
00207 static UnityScopeProxyIface* unity_scope_proxy_local_unity_scope_proxy_parent_iface = NULL;
00208 
00209 GType unity_scope_proxy_get_type (void) G_GNUC_CONST;
00210 GType unity_scope_proxy_local_get_type (void) G_GNUC_CONST;
00211 #define UNITY_SCOPE_PROXY_LOCAL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocalPrivate))
00212 enum  {
00213        UNITY_SCOPE_PROXY_LOCAL_DUMMY_PROPERTY,
00214        UNITY_SCOPE_PROXY_LOCAL_SCOPE,
00215        UNITY_SCOPE_PROXY_LOCAL_SOURCES,
00216        UNITY_SCOPE_PROXY_LOCAL_SEARCH_IN_GLOBAL,
00217        UNITY_SCOPE_PROXY_LOCAL_RESULTS_MODEL,
00218        UNITY_SCOPE_PROXY_LOCAL_GLOBAL_RESULTS_MODEL,
00219        UNITY_SCOPE_PROXY_LOCAL_FILTERS_MODEL,
00220        UNITY_SCOPE_PROXY_LOCAL_VIEW_TYPE
00221 };
00222 UnityScopeProxyLocal* unity_scope_proxy_local_new (UnityScope* scope);
00223 UnityScopeProxyLocal* unity_scope_proxy_local_construct (GType object_type, UnityScope* scope);
00224 static void unity_scope_proxy_local_real_activate_data_free (gpointer _data);
00225 static void unity_scope_proxy_local_real_activate (UnityScopeProxy* base, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00226 static gboolean unity_scope_proxy_local_real_activate_co (UnityScopeProxyLocalActivateData* _data_);
00227 UnityScope* unity_scope_proxy_local_get_scope (UnityScopeProxyLocal* self);
00228 void unity_scope_activate (UnityScope* self, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00229 void unity_scope_activate_finish (UnityScope* self, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result);
00230 static void unity_scope_proxy_local_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00231 static void unity_scope_proxy_local_real_search_data_free (gpointer _data);
00232 static void unity_scope_proxy_local_real_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00233 static gboolean unity_scope_proxy_local_real_search_co (UnityScopeProxyLocalSearchData* _data_);
00234 void unity_scope_search (UnityScope* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00235 GHashTable* unity_scope_search_finish (UnityScope* self, GAsyncResult* _res_, GError** error);
00236 static void unity_scope_proxy_local_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00237 static void _g_free0_ (gpointer var);
00238 static void _g_variant_unref0_ (gpointer var);
00239 static void unity_scope_proxy_local_real_update_preview_property_data_free (gpointer _data);
00240 static void unity_scope_proxy_local_real_update_preview_property (UnityScopeProxy* base, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00241 static gboolean unity_scope_proxy_local_real_update_preview_property_co (UnityScopeProxyLocalUpdatePreviewPropertyData* _data_);
00242 void unity_scope_update_preview_property (UnityScope* self, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00243 GHashTable* unity_scope_update_preview_property_finish (UnityScope* self, GAsyncResult* _res_);
00244 static void unity_scope_proxy_local_update_preview_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00245 static void unity_scope_proxy_local_real_global_search_data_free (gpointer _data);
00246 static void unity_scope_proxy_local_real_global_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00247 static gboolean unity_scope_proxy_local_real_global_search_co (UnityScopeProxyLocalGlobalSearchData* _data_);
00248 void unity_scope_global_search (UnityScope* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00249 GHashTable* unity_scope_global_search_finish (UnityScope* self, GAsyncResult* _res_, GError** error);
00250 static void unity_scope_proxy_local_global_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00251 static void unity_scope_proxy_local_real_set_active_sources_data_free (gpointer _data);
00252 static void unity_scope_proxy_local_real_set_active_sources (UnityScopeProxy* base, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
00253 static gboolean unity_scope_proxy_local_real_set_active_sources_co (UnityScopeProxyLocalSetActiveSourcesData* _data_);
00254 void unity_scope_set_active_sources_internal (UnityScope* self, gchar** active_sources_, int active_sources__length1);
00255 static void unity_scope_proxy_local_set_scope (UnityScopeProxyLocal* self, UnityScope* value);
00256 DeeSerializableModel* unity_scope_get_filter_model (UnityScope* self);
00257 static GObject * unity_scope_proxy_local_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00258 static void _unity_scope_proxy_local___lambda9_ (UnityScopeProxyLocal* self);
00259 static void __unity_scope_proxy_local___lambda9__unity_filter_changed (UnityFilter* _sender, gpointer self);
00260 static void _unity_scope_proxy_local___lambda10_ (UnityScopeProxyLocal* self);
00261 void unity_scope_set_view_type_internal (UnityScope* self, UnityProtocolViewType view_type);
00262 UnityProtocolViewType unity_scope_proxy_get_view_type (UnityScopeProxy* self);
00263 static void __unity_scope_proxy_local___lambda10__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00264 static gboolean _unity_scope_proxy_local___lambda11_ (UnityScopeProxyLocal* self);
00265 static gboolean __unity_scope_proxy_local___lambda11__gsource_func (gpointer self);
00266 static void unity_scope_proxy_local_finalize (GObject* obj);
00267 UnityOptionsFilter* unity_scope_proxy_get_sources (UnityScopeProxy* self);
00268 gboolean unity_scope_proxy_get_search_in_global (UnityScopeProxy* self);
00269 DeeSerializableModel* unity_scope_proxy_get_results_model (UnityScopeProxy* self);
00270 DeeSerializableModel* unity_scope_proxy_get_global_results_model (UnityScopeProxy* self);
00271 DeeSerializableModel* unity_scope_proxy_get_filters_model (UnityScopeProxy* self);
00272 static void _vala_unity_scope_proxy_local_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00273 void unity_scope_proxy_set_sources (UnityScopeProxy* self, UnityOptionsFilter* value);
00274 void unity_scope_proxy_set_search_in_global (UnityScopeProxy* self, gboolean value);
00275 void unity_scope_proxy_set_results_model (UnityScopeProxy* self, DeeSerializableModel* value);
00276 void unity_scope_proxy_set_global_results_model (UnityScopeProxy* self, DeeSerializableModel* value);
00277 void unity_scope_proxy_set_filters_model (UnityScopeProxy* self, DeeSerializableModel* value);
00278 void unity_scope_proxy_set_view_type (UnityScopeProxy* self, UnityProtocolViewType value);
00279 static void _vala_unity_scope_proxy_local_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00280 
00281 
00282 UnityScopeProxyLocal* unity_scope_proxy_local_construct (GType object_type, UnityScope* scope) {
00283        UnityScopeProxyLocal * self = NULL;
00284        UnityScope* _tmp0_;
00285        g_return_val_if_fail (scope != NULL, NULL);
00286        _tmp0_ = scope;
00287        self = (UnityScopeProxyLocal*) g_object_new (object_type, "scope", _tmp0_, NULL);
00288        return self;
00289 }
00290 
00291 
00292 UnityScopeProxyLocal* unity_scope_proxy_local_new (UnityScope* scope) {
00293        return unity_scope_proxy_local_construct (UNITY_TYPE_SCOPE_PROXY_LOCAL, scope);
00294 }
00295 
00296 
00297 static void unity_scope_proxy_local_real_activate_data_free (gpointer _data) {
00298        UnityScopeProxyLocalActivateData* _data_;
00299        _data_ = _data;
00300        _g_free0 (_data_->uri);
00301        unity_protocol_activation_reply_raw_destroy (&_data_->result);
00302        _g_object_unref0 (_data_->self);
00303        g_slice_free (UnityScopeProxyLocalActivateData, _data_);
00304 }
00305 
00306 
00307 static gpointer _g_object_ref0 (gpointer self) {
00308        return self ? g_object_ref (self) : NULL;
00309 }
00310 
00311 
00312 static void unity_scope_proxy_local_real_activate (UnityScopeProxy* base, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00313        UnityScopeProxyLocal * self;
00314        UnityScopeProxyLocalActivateData* _data_;
00315        UnityScopeProxyLocal* _tmp0_;
00316        const gchar* _tmp1_;
00317        gchar* _tmp2_;
00318        UnityProtocolActionType _tmp3_;
00319        self = (UnityScopeProxyLocal*) base;
00320        _data_ = g_slice_new0 (UnityScopeProxyLocalActivateData);
00321        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_local_real_activate);
00322        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_local_real_activate_data_free);
00323        _tmp0_ = _g_object_ref0 (self);
00324        _data_->self = _tmp0_;
00325        _tmp1_ = uri;
00326        _tmp2_ = g_strdup (_tmp1_);
00327        _data_->uri = _tmp2_;
00328        _tmp3_ = action_type;
00329        _data_->action_type = _tmp3_;
00330        unity_scope_proxy_local_real_activate_co (_data_);
00331 }
00332 
00333 
00334 static void unity_scope_proxy_local_real_activate_finish (UnityScopeProxy* base, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result) {
00335        UnityScopeProxyLocalActivateData* _data_;
00336        UnityProtocolActivationReplyRaw _tmp0_ = {0};
00337        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00338        unity_protocol_activation_reply_raw_copy (&_data_->result, &_tmp0_);
00339        *result = _tmp0_;
00340 }
00341 
00342 
00343 static void unity_scope_proxy_local_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00344        UnityScopeProxyLocalActivateData* _data_;
00345        _data_ = _user_data_;
00346        _data_->_source_object_ = source_object;
00347        _data_->_res_ = _res_;
00348        unity_scope_proxy_local_real_activate_co (_data_);
00349 }
00350 
00351 
00352 static gboolean unity_scope_proxy_local_real_activate_co (UnityScopeProxyLocalActivateData* _data_) {
00353        switch (_data_->_state_) {
00354               case 0:
00355               goto _state_0;
00356               case 1:
00357               goto _state_1;
00358               default:
00359               g_assert_not_reached ();
00360        }
00361        _state_0:
00362        _data_->_tmp0_ = _data_->self->priv->_scope;
00363        _data_->_tmp1_ = _data_->uri;
00364        _data_->_tmp2_ = _data_->action_type;
00365        memset (&_data_->_tmp3_, 0, sizeof (UnityProtocolActivationReplyRaw));
00366        _data_->_state_ = 1;
00367        unity_scope_activate (_data_->_tmp0_, _data_->_tmp1_, _data_->_tmp2_, unity_scope_proxy_local_activate_ready, _data_);
00368        return FALSE;
00369        _state_1:
00370        unity_scope_activate_finish (_data_->_tmp0_, _data_->_res_, &_data_->_tmp3_);
00371        _data_->reply = _data_->_tmp3_;
00372        _data_->result = _data_->reply;
00373        if (_data_->_state_ == 0) {
00374               g_simple_async_result_complete_in_idle (_data_->_async_result);
00375        } else {
00376               g_simple_async_result_complete (_data_->_async_result);
00377        }
00378        g_object_unref (_data_->_async_result);
00379        return FALSE;
00380        unity_protocol_activation_reply_raw_destroy (&_data_->reply);
00381        if (_data_->_state_ == 0) {
00382               g_simple_async_result_complete_in_idle (_data_->_async_result);
00383        } else {
00384               g_simple_async_result_complete (_data_->_async_result);
00385        }
00386        g_object_unref (_data_->_async_result);
00387        return FALSE;
00388 }
00389 
00390 
00391 static void unity_scope_proxy_local_real_search_data_free (gpointer _data) {
00392        UnityScopeProxyLocalSearchData* _data_;
00393        _data_ = _data;
00394        _g_free0 (_data_->search_string);
00395        _g_hash_table_unref0 (_data_->hints);
00396        _g_hash_table_unref0 (_data_->result);
00397        _g_object_unref0 (_data_->self);
00398        g_slice_free (UnityScopeProxyLocalSearchData, _data_);
00399 }
00400 
00401 
00402 static gpointer _g_hash_table_ref0 (gpointer self) {
00403        return self ? g_hash_table_ref (self) : NULL;
00404 }
00405 
00406 
00407 static void unity_scope_proxy_local_real_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00408        UnityScopeProxyLocal * self;
00409        UnityScopeProxyLocalSearchData* _data_;
00410        UnityScopeProxyLocal* _tmp0_;
00411        const gchar* _tmp1_;
00412        gchar* _tmp2_;
00413        GHashTable* _tmp3_;
00414        GHashTable* _tmp4_;
00415        self = (UnityScopeProxyLocal*) base;
00416        _data_ = g_slice_new0 (UnityScopeProxyLocalSearchData);
00417        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_local_real_search);
00418        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_local_real_search_data_free);
00419        _tmp0_ = _g_object_ref0 (self);
00420        _data_->self = _tmp0_;
00421        _tmp1_ = search_string;
00422        _tmp2_ = g_strdup (_tmp1_);
00423        _data_->search_string = _tmp2_;
00424        _tmp3_ = hints;
00425        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
00426        _data_->hints = _tmp4_;
00427        unity_scope_proxy_local_real_search_co (_data_);
00428 }
00429 
00430 
00431 static GHashTable* unity_scope_proxy_local_real_search_finish (UnityScopeProxy* base, GAsyncResult* _res_) {
00432        GHashTable* result;
00433        UnityScopeProxyLocalSearchData* _data_;
00434        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00435        result = _data_->result;
00436        _data_->result = NULL;
00437        return result;
00438 }
00439 
00440 
00441 static void unity_scope_proxy_local_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00442        UnityScopeProxyLocalSearchData* _data_;
00443        _data_ = _user_data_;
00444        _data_->_source_object_ = source_object;
00445        _data_->_res_ = _res_;
00446        unity_scope_proxy_local_real_search_co (_data_);
00447 }
00448 
00449 
00450 static const gchar* string_to_string (const gchar* self) {
00451        const gchar* result = NULL;
00452        g_return_val_if_fail (self != NULL, NULL);
00453        result = self;
00454        return result;
00455 }
00456 
00457 
00458 static void _g_free0_ (gpointer var) {
00459        var = (g_free (var), NULL);
00460 }
00461 
00462 
00463 static void _g_variant_unref0_ (gpointer var) {
00464        (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
00465 }
00466 
00467 
00468 static gboolean unity_scope_proxy_local_real_search_co (UnityScopeProxyLocalSearchData* _data_) {
00469        switch (_data_->_state_) {
00470               case 0:
00471               goto _state_0;
00472               case 1:
00473               goto _state_1;
00474               default:
00475               g_assert_not_reached ();
00476        }
00477        _state_0:
00478        {
00479               _data_->_tmp0_ = _data_->self->priv->_scope;
00480               _data_->_tmp1_ = _data_->search_string;
00481               _data_->_tmp2_ = _data_->hints;
00482               _data_->_state_ = 1;
00483               unity_scope_search (_data_->_tmp0_, _data_->_tmp1_, _data_->_tmp2_, unity_scope_proxy_local_search_ready, _data_);
00484               return FALSE;
00485               _state_1:
00486               _data_->_tmp3_ = NULL;
00487               _data_->_tmp3_ = unity_scope_search_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
00488               _data_->_result_ = _data_->_tmp3_;
00489               if (_data_->_inner_error_ != NULL) {
00490                      if (g_error_matches (_data_->_inner_error_, UNITY_PROTOCOL_SCOPE_ERROR, UNITY_PROTOCOL_SCOPE_ERROR_SEARCH_CANCELLED)) {
00491                             goto __catch24_unity_protocol_scope_error_search_cancelled;
00492                      }
00493                      goto __catch24_g_error;
00494               }
00495               _data_->result = _data_->_result_;
00496               if (_data_->_state_ == 0) {
00497                      g_simple_async_result_complete_in_idle (_data_->_async_result);
00498               } else {
00499                      g_simple_async_result_complete (_data_->_async_result);
00500               }
00501               g_object_unref (_data_->_async_result);
00502               return FALSE;
00503        }
00504        goto __finally24;
00505        __catch24_unity_protocol_scope_error_search_cancelled:
00506        {
00507               _data_->scope_error = _data_->_inner_error_;
00508               _data_->_inner_error_ = NULL;
00509               _g_error_free0 (_data_->scope_error);
00510        }
00511        goto __finally24;
00512        __catch24_g_error:
00513        {
00514               _data_->e = _data_->_inner_error_;
00515               _data_->_inner_error_ = NULL;
00516               _data_->_tmp4_ = _data_->search_string;
00517               _data_->_tmp5_ = NULL;
00518               _data_->_tmp5_ = string_to_string (_data_->_tmp4_);
00519               _data_->_tmp6_ = _data_->e;
00520               _data_->_tmp7_ = _data_->_tmp6_->message;
00521               _data_->_tmp8_ = NULL;
00522               _data_->_tmp8_ = string_to_string (_data_->_tmp7_);
00523               _data_->_tmp9_ = NULL;
00524               _data_->_tmp9_ = g_strconcat ("Unable to search scope ('", _data_->_tmp5_, "'): ", _data_->_tmp8_, NULL);
00525               _data_->_tmp10_ = _data_->_tmp9_;
00526               g_warning ("unity-scope-proxy-local.vala:98: %s", _data_->_tmp10_);
00527               _g_free0 (_data_->_tmp10_);
00528               _g_error_free0 (_data_->e);
00529        }
00530        __finally24:
00531        if (_data_->_inner_error_ != NULL) {
00532               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);
00533               g_clear_error (&_data_->_inner_error_);
00534               return FALSE;
00535        }
00536        _data_->_tmp11_ = g_str_hash;
00537        _data_->_tmp12_ = g_str_equal;
00538        _data_->_tmp13_ = g_hash_table_new_full (_data_->_tmp11_, _data_->_tmp12_, _g_free0_, _g_variant_unref0_);
00539        _data_->result = _data_->_tmp13_;
00540        if (_data_->_state_ == 0) {
00541               g_simple_async_result_complete_in_idle (_data_->_async_result);
00542        } else {
00543               g_simple_async_result_complete (_data_->_async_result);
00544        }
00545        g_object_unref (_data_->_async_result);
00546        return FALSE;
00547        if (_data_->_state_ == 0) {
00548               g_simple_async_result_complete_in_idle (_data_->_async_result);
00549        } else {
00550               g_simple_async_result_complete (_data_->_async_result);
00551        }
00552        g_object_unref (_data_->_async_result);
00553        return FALSE;
00554 }
00555 
00556 
00557 static void unity_scope_proxy_local_real_update_preview_property_data_free (gpointer _data) {
00558        UnityScopeProxyLocalUpdatePreviewPropertyData* _data_;
00559        _data_ = _data;
00560        _g_free0 (_data_->uri);
00561        _g_hash_table_unref0 (_data_->values);
00562        _g_hash_table_unref0 (_data_->result);
00563        _g_object_unref0 (_data_->self);
00564        g_slice_free (UnityScopeProxyLocalUpdatePreviewPropertyData, _data_);
00565 }
00566 
00567 
00568 static void unity_scope_proxy_local_real_update_preview_property (UnityScopeProxy* base, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00569        UnityScopeProxyLocal * self;
00570        UnityScopeProxyLocalUpdatePreviewPropertyData* _data_;
00571        UnityScopeProxyLocal* _tmp0_;
00572        const gchar* _tmp1_;
00573        gchar* _tmp2_;
00574        GHashTable* _tmp3_;
00575        GHashTable* _tmp4_;
00576        self = (UnityScopeProxyLocal*) base;
00577        _data_ = g_slice_new0 (UnityScopeProxyLocalUpdatePreviewPropertyData);
00578        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_local_real_update_preview_property);
00579        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_local_real_update_preview_property_data_free);
00580        _tmp0_ = _g_object_ref0 (self);
00581        _data_->self = _tmp0_;
00582        _tmp1_ = uri;
00583        _tmp2_ = g_strdup (_tmp1_);
00584        _data_->uri = _tmp2_;
00585        _tmp3_ = values;
00586        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
00587        _data_->values = _tmp4_;
00588        unity_scope_proxy_local_real_update_preview_property_co (_data_);
00589 }
00590 
00591 
00592 static GHashTable* unity_scope_proxy_local_real_update_preview_property_finish (UnityScopeProxy* base, GAsyncResult* _res_, GError** error) {
00593        GHashTable* result;
00594        UnityScopeProxyLocalUpdatePreviewPropertyData* _data_;
00595        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
00596               return NULL;
00597        }
00598        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00599        result = _data_->result;
00600        _data_->result = NULL;
00601        return result;
00602 }
00603 
00604 
00605 static void unity_scope_proxy_local_update_preview_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00606        UnityScopeProxyLocalUpdatePreviewPropertyData* _data_;
00607        _data_ = _user_data_;
00608        _data_->_source_object_ = source_object;
00609        _data_->_res_ = _res_;
00610        unity_scope_proxy_local_real_update_preview_property_co (_data_);
00611 }
00612 
00613 
00614 static gboolean unity_scope_proxy_local_real_update_preview_property_co (UnityScopeProxyLocalUpdatePreviewPropertyData* _data_) {
00615        switch (_data_->_state_) {
00616               case 0:
00617               goto _state_0;
00618               case 1:
00619               goto _state_1;
00620               default:
00621               g_assert_not_reached ();
00622        }
00623        _state_0:
00624        _data_->_tmp0_ = _data_->self->priv->_scope;
00625        _data_->_tmp1_ = _data_->uri;
00626        _data_->_tmp2_ = _data_->values;
00627        _data_->_state_ = 1;
00628        unity_scope_update_preview_property (_data_->_tmp0_, _data_->_tmp1_, _data_->_tmp2_, unity_scope_proxy_local_update_preview_property_ready, _data_);
00629        return FALSE;
00630        _state_1:
00631        _data_->_tmp3_ = NULL;
00632        _data_->_tmp3_ = unity_scope_update_preview_property_finish (_data_->_tmp0_, _data_->_res_);
00633        _data_->reply = _data_->_tmp3_;
00634        _data_->result = _data_->reply;
00635        if (_data_->_state_ == 0) {
00636               g_simple_async_result_complete_in_idle (_data_->_async_result);
00637        } else {
00638               g_simple_async_result_complete (_data_->_async_result);
00639        }
00640        g_object_unref (_data_->_async_result);
00641        return FALSE;
00642        _g_hash_table_unref0 (_data_->reply);
00643        if (_data_->_state_ == 0) {
00644               g_simple_async_result_complete_in_idle (_data_->_async_result);
00645        } else {
00646               g_simple_async_result_complete (_data_->_async_result);
00647        }
00648        g_object_unref (_data_->_async_result);
00649        return FALSE;
00650 }
00651 
00652 
00653 static void unity_scope_proxy_local_real_global_search_data_free (gpointer _data) {
00654        UnityScopeProxyLocalGlobalSearchData* _data_;
00655        _data_ = _data;
00656        _g_free0 (_data_->search_string);
00657        _g_hash_table_unref0 (_data_->hints);
00658        _g_hash_table_unref0 (_data_->result);
00659        _g_object_unref0 (_data_->self);
00660        g_slice_free (UnityScopeProxyLocalGlobalSearchData, _data_);
00661 }
00662 
00663 
00664 static void unity_scope_proxy_local_real_global_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00665        UnityScopeProxyLocal * self;
00666        UnityScopeProxyLocalGlobalSearchData* _data_;
00667        UnityScopeProxyLocal* _tmp0_;
00668        const gchar* _tmp1_;
00669        gchar* _tmp2_;
00670        GHashTable* _tmp3_;
00671        GHashTable* _tmp4_;
00672        self = (UnityScopeProxyLocal*) base;
00673        _data_ = g_slice_new0 (UnityScopeProxyLocalGlobalSearchData);
00674        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_local_real_global_search);
00675        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_local_real_global_search_data_free);
00676        _tmp0_ = _g_object_ref0 (self);
00677        _data_->self = _tmp0_;
00678        _tmp1_ = search_string;
00679        _tmp2_ = g_strdup (_tmp1_);
00680        _data_->search_string = _tmp2_;
00681        _tmp3_ = hints;
00682        _tmp4_ = _g_hash_table_ref0 (_tmp3_);
00683        _data_->hints = _tmp4_;
00684        unity_scope_proxy_local_real_global_search_co (_data_);
00685 }
00686 
00687 
00688 static GHashTable* unity_scope_proxy_local_real_global_search_finish (UnityScopeProxy* base, GAsyncResult* _res_) {
00689        GHashTable* result;
00690        UnityScopeProxyLocalGlobalSearchData* _data_;
00691        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00692        result = _data_->result;
00693        _data_->result = NULL;
00694        return result;
00695 }
00696 
00697 
00698 static void unity_scope_proxy_local_global_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00699        UnityScopeProxyLocalGlobalSearchData* _data_;
00700        _data_ = _user_data_;
00701        _data_->_source_object_ = source_object;
00702        _data_->_res_ = _res_;
00703        unity_scope_proxy_local_real_global_search_co (_data_);
00704 }
00705 
00706 
00707 static gboolean unity_scope_proxy_local_real_global_search_co (UnityScopeProxyLocalGlobalSearchData* _data_) {
00708        switch (_data_->_state_) {
00709               case 0:
00710               goto _state_0;
00711               case 1:
00712               goto _state_1;
00713               default:
00714               g_assert_not_reached ();
00715        }
00716        _state_0:
00717        {
00718               _data_->_tmp0_ = _data_->self->priv->_scope;
00719               _data_->_tmp1_ = _data_->search_string;
00720               _data_->_tmp2_ = _data_->hints;
00721               _data_->_state_ = 1;
00722               unity_scope_global_search (_data_->_tmp0_, _data_->_tmp1_, _data_->_tmp2_, unity_scope_proxy_local_global_search_ready, _data_);
00723               return FALSE;
00724               _state_1:
00725               _data_->_tmp3_ = NULL;
00726               _data_->_tmp3_ = unity_scope_global_search_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
00727               _data_->_result_ = _data_->_tmp3_;
00728               if (_data_->_inner_error_ != NULL) {
00729                      if (g_error_matches (_data_->_inner_error_, UNITY_PROTOCOL_SCOPE_ERROR, UNITY_PROTOCOL_SCOPE_ERROR_SEARCH_CANCELLED)) {
00730                             goto __catch25_unity_protocol_scope_error_search_cancelled;
00731                      }
00732                      goto __catch25_g_error;
00733               }
00734               _data_->result = _data_->_result_;
00735               if (_data_->_state_ == 0) {
00736                      g_simple_async_result_complete_in_idle (_data_->_async_result);
00737               } else {
00738                      g_simple_async_result_complete (_data_->_async_result);
00739               }
00740               g_object_unref (_data_->_async_result);
00741               return FALSE;
00742        }
00743        goto __finally25;
00744        __catch25_unity_protocol_scope_error_search_cancelled:
00745        {
00746               _data_->scope_error = _data_->_inner_error_;
00747               _data_->_inner_error_ = NULL;
00748               _g_error_free0 (_data_->scope_error);
00749        }
00750        goto __finally25;
00751        __catch25_g_error:
00752        {
00753               _data_->e = _data_->_inner_error_;
00754               _data_->_inner_error_ = NULL;
00755               _data_->_tmp4_ = _data_->search_string;
00756               _data_->_tmp5_ = NULL;
00757               _data_->_tmp5_ = string_to_string (_data_->_tmp4_);
00758               _data_->_tmp6_ = _data_->e;
00759               _data_->_tmp7_ = _data_->_tmp6_->message;
00760               _data_->_tmp8_ = NULL;
00761               _data_->_tmp8_ = string_to_string (_data_->_tmp7_);
00762               _data_->_tmp9_ = NULL;
00763               _data_->_tmp9_ = g_strconcat ("Unable to global_search scope ('", _data_->_tmp5_, "'): ", _data_->_tmp8_, NULL);
00764               _data_->_tmp10_ = _data_->_tmp9_;
00765               g_warning ("unity-scope-proxy-local.vala:120: %s", _data_->_tmp10_);
00766               _g_free0 (_data_->_tmp10_);
00767               _g_error_free0 (_data_->e);
00768        }
00769        __finally25:
00770        if (_data_->_inner_error_ != NULL) {
00771               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);
00772               g_clear_error (&_data_->_inner_error_);
00773               return FALSE;
00774        }
00775        _data_->_tmp11_ = g_str_hash;
00776        _data_->_tmp12_ = g_str_equal;
00777        _data_->_tmp13_ = g_hash_table_new_full (_data_->_tmp11_, _data_->_tmp12_, _g_free0_, _g_variant_unref0_);
00778        _data_->result = _data_->_tmp13_;
00779        if (_data_->_state_ == 0) {
00780               g_simple_async_result_complete_in_idle (_data_->_async_result);
00781        } else {
00782               g_simple_async_result_complete (_data_->_async_result);
00783        }
00784        g_object_unref (_data_->_async_result);
00785        return FALSE;
00786        if (_data_->_state_ == 0) {
00787               g_simple_async_result_complete_in_idle (_data_->_async_result);
00788        } else {
00789               g_simple_async_result_complete (_data_->_async_result);
00790        }
00791        g_object_unref (_data_->_async_result);
00792        return FALSE;
00793 }
00794 
00795 
00796 static void unity_scope_proxy_local_real_set_active_sources_data_free (gpointer _data) {
00797        UnityScopeProxyLocalSetActiveSourcesData* _data_;
00798        _data_ = _data;
00799        _g_object_unref0 (_data_->self);
00800        g_slice_free (UnityScopeProxyLocalSetActiveSourcesData, _data_);
00801 }
00802 
00803 
00804 static void unity_scope_proxy_local_real_set_active_sources (UnityScopeProxy* base, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00805        UnityScopeProxyLocal * self;
00806        UnityScopeProxyLocalSetActiveSourcesData* _data_;
00807        UnityScopeProxyLocal* _tmp0_;
00808        gchar** _tmp1_;
00809        gint _tmp1__length1;
00810        self = (UnityScopeProxyLocal*) base;
00811        _data_ = g_slice_new0 (UnityScopeProxyLocalSetActiveSourcesData);
00812        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_local_real_set_active_sources);
00813        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_local_real_set_active_sources_data_free);
00814        _tmp0_ = _g_object_ref0 (self);
00815        _data_->self = _tmp0_;
00816        _tmp1_ = sources;
00817        _tmp1__length1 = sources_length1;
00818        _data_->sources = _tmp1_;
00819        _data_->sources_length1 = _tmp1__length1;
00820        unity_scope_proxy_local_real_set_active_sources_co (_data_);
00821 }
00822 
00823 
00824 static void unity_scope_proxy_local_real_set_active_sources_finish (UnityScopeProxy* base, GAsyncResult* _res_) {
00825        UnityScopeProxyLocalSetActiveSourcesData* _data_;
00826        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00827 }
00828 
00829 
00830 static gboolean unity_scope_proxy_local_real_set_active_sources_co (UnityScopeProxyLocalSetActiveSourcesData* _data_) {
00831        switch (_data_->_state_) {
00832               case 0:
00833               goto _state_0;
00834               default:
00835               g_assert_not_reached ();
00836        }
00837        _state_0:
00838        _data_->_tmp0_ = _data_->self->priv->_scope;
00839        _data_->_tmp1_ = _data_->sources;
00840        _data_->_tmp1__length1 = _data_->sources_length1;
00841        unity_scope_set_active_sources_internal (_data_->_tmp0_, _data_->_tmp1_, _data_->_tmp1__length1);
00842        if (_data_->_state_ == 0) {
00843               g_simple_async_result_complete_in_idle (_data_->_async_result);
00844        } else {
00845               g_simple_async_result_complete (_data_->_async_result);
00846        }
00847        g_object_unref (_data_->_async_result);
00848        return FALSE;
00849 }
00850 
00851 
00852 UnityScope* unity_scope_proxy_local_get_scope (UnityScopeProxyLocal* self) {
00853        UnityScope* result;
00854        UnityScope* _tmp0_;
00855        g_return_val_if_fail (self != NULL, NULL);
00856        _tmp0_ = self->priv->_scope;
00857        result = _tmp0_;
00858        return result;
00859 }
00860 
00861 
00862 static void unity_scope_proxy_local_set_scope (UnityScopeProxyLocal* self, UnityScope* value) {
00863        UnityScope* _tmp0_;
00864        UnityScope* _tmp1_;
00865        g_return_if_fail (self != NULL);
00866        _tmp0_ = value;
00867        _tmp1_ = _g_object_ref0 (_tmp0_);
00868        _g_object_unref0 (self->priv->_scope);
00869        self->priv->_scope = _tmp1_;
00870        g_object_notify ((GObject *) self, "scope");
00871 }
00872 
00873 
00874 static UnityOptionsFilter* unity_scope_proxy_local_real_get_sources (UnityScopeProxy* base) {
00875        UnityOptionsFilter* result;
00876        UnityScopeProxyLocal* self;
00877        UnityScope* _tmp0_;
00878        UnityOptionsFilter* _tmp1_;
00879        UnityOptionsFilter* _tmp2_;
00880        self = (UnityScopeProxyLocal*) base;
00881        _tmp0_ = self->priv->_scope;
00882        _tmp1_ = unity_scope_get_sources (_tmp0_);
00883        _tmp2_ = _tmp1_;
00884        result = _tmp2_;
00885        return result;
00886 }
00887 
00888 
00889 static void unity_scope_proxy_local_real_set_sources (UnityScopeProxy* base, UnityOptionsFilter* value) {
00890        UnityScopeProxyLocal* self;
00891        self = (UnityScopeProxyLocal*) base;
00892        g_object_notify ((GObject *) self, "sources");
00893 }
00894 
00895 
00896 static gboolean unity_scope_proxy_local_real_get_search_in_global (UnityScopeProxy* base) {
00897        gboolean result;
00898        UnityScopeProxyLocal* self;
00899        UnityScope* _tmp0_;
00900        gboolean _tmp1_;
00901        gboolean _tmp2_;
00902        self = (UnityScopeProxyLocal*) base;
00903        _tmp0_ = self->priv->_scope;
00904        _tmp1_ = unity_scope_get_search_in_global (_tmp0_);
00905        _tmp2_ = _tmp1_;
00906        result = _tmp2_;
00907        return result;
00908 }
00909 
00910 
00911 static void unity_scope_proxy_local_real_set_search_in_global (UnityScopeProxy* base, gboolean value) {
00912        UnityScopeProxyLocal* self;
00913        self = (UnityScopeProxyLocal*) base;
00914        g_object_notify ((GObject *) self, "search-in-global");
00915 }
00916 
00917 
00918 static DeeSerializableModel* unity_scope_proxy_local_real_get_results_model (UnityScopeProxy* base) {
00919        DeeSerializableModel* result;
00920        UnityScopeProxyLocal* self;
00921        UnityScope* _tmp0_;
00922        DeeSerializableModel* _tmp1_;
00923        DeeSerializableModel* _tmp2_;
00924        self = (UnityScopeProxyLocal*) base;
00925        _tmp0_ = self->priv->_scope;
00926        _tmp1_ = unity_scope_get_results_model (_tmp0_);
00927        _tmp2_ = _tmp1_;
00928        result = _tmp2_;
00929        return result;
00930 }
00931 
00932 
00933 static void unity_scope_proxy_local_real_set_results_model (UnityScopeProxy* base, DeeSerializableModel* value) {
00934        UnityScopeProxyLocal* self;
00935        self = (UnityScopeProxyLocal*) base;
00936        g_object_notify ((GObject *) self, "results-model");
00937 }
00938 
00939 
00940 static DeeSerializableModel* unity_scope_proxy_local_real_get_global_results_model (UnityScopeProxy* base) {
00941        DeeSerializableModel* result;
00942        UnityScopeProxyLocal* self;
00943        UnityScope* _tmp0_;
00944        DeeSerializableModel* _tmp1_;
00945        DeeSerializableModel* _tmp2_;
00946        self = (UnityScopeProxyLocal*) base;
00947        _tmp0_ = self->priv->_scope;
00948        _tmp1_ = unity_scope_get_global_results_model (_tmp0_);
00949        _tmp2_ = _tmp1_;
00950        result = _tmp2_;
00951        return result;
00952 }
00953 
00954 
00955 static void unity_scope_proxy_local_real_set_global_results_model (UnityScopeProxy* base, DeeSerializableModel* value) {
00956        UnityScopeProxyLocal* self;
00957        self = (UnityScopeProxyLocal*) base;
00958        g_object_notify ((GObject *) self, "global-results-model");
00959 }
00960 
00961 
00962 static DeeSerializableModel* unity_scope_proxy_local_real_get_filters_model (UnityScopeProxy* base) {
00963        DeeSerializableModel* result;
00964        UnityScopeProxyLocal* self;
00965        UnityScope* _tmp0_;
00966        DeeSerializableModel* _tmp1_ = NULL;
00967        self = (UnityScopeProxyLocal*) base;
00968        _tmp0_ = self->priv->_scope;
00969        _tmp1_ = unity_scope_get_filter_model (_tmp0_);
00970        result = _tmp1_;
00971        return result;
00972 }
00973 
00974 
00975 static void unity_scope_proxy_local_real_set_filters_model (UnityScopeProxy* base, DeeSerializableModel* value) {
00976        UnityScopeProxyLocal* self;
00977        self = (UnityScopeProxyLocal*) base;
00978        g_object_notify ((GObject *) self, "filters-model");
00979 }
00980 
00981 
00982 static UnityProtocolViewType unity_scope_proxy_local_real_get_view_type (UnityScopeProxy* base) {
00983        UnityProtocolViewType result;
00984        UnityScopeProxyLocal* self;
00985        UnityProtocolViewType _tmp0_;
00986        self = (UnityScopeProxyLocal*) base;
00987        _tmp0_ = self->priv->_view_type;
00988        result = _tmp0_;
00989        return result;
00990 }
00991 
00992 
00993 static void unity_scope_proxy_local_real_set_view_type (UnityScopeProxy* base, UnityProtocolViewType value) {
00994        UnityScopeProxyLocal* self;
00995        UnityProtocolViewType _tmp0_;
00996        self = (UnityScopeProxyLocal*) base;
00997        _tmp0_ = value;
00998        self->priv->_view_type = _tmp0_;
00999        g_object_notify ((GObject *) self, "view-type");
01000 }
01001 
01002 
01003 static void _unity_scope_proxy_local___lambda9_ (UnityScopeProxyLocal* self) {
01004        g_object_notify ((GObject*) self, "sources");
01005 }
01006 
01007 
01008 static void __unity_scope_proxy_local___lambda9__unity_filter_changed (UnityFilter* _sender, gpointer self) {
01009        _unity_scope_proxy_local___lambda9_ (self);
01010 }
01011 
01012 
01013 static void _unity_scope_proxy_local___lambda10_ (UnityScopeProxyLocal* self) {
01014        UnityScope* _tmp0_;
01015        UnityProtocolViewType _tmp1_;
01016        UnityProtocolViewType _tmp2_;
01017        _tmp0_ = self->priv->_scope;
01018        _tmp1_ = unity_scope_proxy_get_view_type ((UnityScopeProxy*) self);
01019        _tmp2_ = _tmp1_;
01020        unity_scope_set_view_type_internal (_tmp0_, _tmp2_);
01021 }
01022 
01023 
01024 static void __unity_scope_proxy_local___lambda10__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01025        _unity_scope_proxy_local___lambda10_ (self);
01026 }
01027 
01028 
01029 static gboolean _unity_scope_proxy_local___lambda11_ (UnityScopeProxyLocal* self) {
01030        gboolean result = FALSE;
01031        g_object_notify ((GObject*) self, "search-in-global");
01032        g_object_notify ((GObject*) self, "sources");
01033        result = FALSE;
01034        return result;
01035 }
01036 
01037 
01038 static gboolean __unity_scope_proxy_local___lambda11__gsource_func (gpointer self) {
01039        gboolean result;
01040        result = _unity_scope_proxy_local___lambda11_ (self);
01041        return result;
01042 }
01043 
01044 
01045 static GObject * unity_scope_proxy_local_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
01046        GObject * obj;
01047        GObjectClass * parent_class;
01048        UnityScopeProxyLocal * self;
01049        UnityScope* _tmp0_;
01050        UnityScope* _tmp1_;
01051        UnityOptionsFilter* _tmp2_;
01052        UnityOptionsFilter* _tmp3_;
01053        parent_class = G_OBJECT_CLASS (unity_scope_proxy_local_parent_class);
01054        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
01055        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocal);
01056        _tmp0_ = self->priv->_scope;
01057        g_object_bind_property_with_closures ((GObject*) _tmp0_, "search-in-global", (GObject*) self, "search-in-global", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
01058        _tmp1_ = self->priv->_scope;
01059        _tmp2_ = unity_scope_get_sources (_tmp1_);
01060        _tmp3_ = _tmp2_;
01061        g_signal_connect_object ((UnityFilter*) _tmp3_, "changed", (GCallback) __unity_scope_proxy_local___lambda9__unity_filter_changed, self, 0);
01062        g_signal_connect_object ((GObject*) self, "notify::view-type", (GCallback) __unity_scope_proxy_local___lambda10__g_object_notify, self, 0);
01063        g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __unity_scope_proxy_local___lambda11__gsource_func, g_object_ref (self), g_object_unref);
01064        return obj;
01065 }
01066 
01067 
01068 static void unity_scope_proxy_local_class_init (UnityScopeProxyLocalClass * klass) {
01069        unity_scope_proxy_local_parent_class = g_type_class_peek_parent (klass);
01070        g_type_class_add_private (klass, sizeof (UnityScopeProxyLocalPrivate));
01071        G_OBJECT_CLASS (klass)->get_property = _vala_unity_scope_proxy_local_get_property;
01072        G_OBJECT_CLASS (klass)->set_property = _vala_unity_scope_proxy_local_set_property;
01073        G_OBJECT_CLASS (klass)->constructor = unity_scope_proxy_local_constructor;
01074        G_OBJECT_CLASS (klass)->finalize = unity_scope_proxy_local_finalize;
01075        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_LOCAL_SCOPE, g_param_spec_object ("scope", "scope", "scope", UNITY_TYPE_SCOPE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01076        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_LOCAL_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));
01077        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_LOCAL_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));
01078        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_LOCAL_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));
01079        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_LOCAL_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));
01080        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_LOCAL_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));
01081        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_PROXY_LOCAL_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));
01082 }
01083 
01084 
01085 static void unity_scope_proxy_local_unity_scope_proxy_interface_init (UnityScopeProxyIface * iface) {
01086        unity_scope_proxy_local_unity_scope_proxy_parent_iface = g_type_interface_peek_parent (iface);
01087        iface->activate = (void (*)(UnityScopeProxy*, const gchar*, UnityProtocolActionType, UnityProtocolActivationReplyRaw*)) unity_scope_proxy_local_real_activate;
01088        iface->activate_finish = unity_scope_proxy_local_real_activate_finish;
01089        iface->search = (GHashTable* (*)(UnityScopeProxy*, const gchar*, GHashTable*)) unity_scope_proxy_local_real_search;
01090        iface->search_finish = unity_scope_proxy_local_real_search_finish;
01091        iface->update_preview_property = (GHashTable* (*)(UnityScopeProxy*, const gchar*, GHashTable*, GError**)) unity_scope_proxy_local_real_update_preview_property;
01092        iface->update_preview_property_finish = unity_scope_proxy_local_real_update_preview_property_finish;
01093        iface->global_search = (GHashTable* (*)(UnityScopeProxy*, const gchar*, GHashTable*)) unity_scope_proxy_local_real_global_search;
01094        iface->global_search_finish = unity_scope_proxy_local_real_global_search_finish;
01095        iface->set_active_sources = (void (*)(UnityScopeProxy*, gchar**, int)) unity_scope_proxy_local_real_set_active_sources;
01096        iface->set_active_sources_finish = unity_scope_proxy_local_real_set_active_sources_finish;
01097        iface->get_sources = unity_scope_proxy_local_real_get_sources;
01098        iface->set_sources = unity_scope_proxy_local_real_set_sources;
01099        iface->get_search_in_global = unity_scope_proxy_local_real_get_search_in_global;
01100        iface->set_search_in_global = unity_scope_proxy_local_real_set_search_in_global;
01101        iface->get_results_model = unity_scope_proxy_local_real_get_results_model;
01102        iface->set_results_model = unity_scope_proxy_local_real_set_results_model;
01103        iface->get_global_results_model = unity_scope_proxy_local_real_get_global_results_model;
01104        iface->set_global_results_model = unity_scope_proxy_local_real_set_global_results_model;
01105        iface->get_filters_model = unity_scope_proxy_local_real_get_filters_model;
01106        iface->set_filters_model = unity_scope_proxy_local_real_set_filters_model;
01107        iface->get_view_type = unity_scope_proxy_local_real_get_view_type;
01108        iface->set_view_type = unity_scope_proxy_local_real_set_view_type;
01109 }
01110 
01111 
01112 static void unity_scope_proxy_local_instance_init (UnityScopeProxyLocal * self) {
01113        self->priv = UNITY_SCOPE_PROXY_LOCAL_GET_PRIVATE (self);
01114 }
01115 
01116 
01117 static void unity_scope_proxy_local_finalize (GObject* obj) {
01118        UnityScopeProxyLocal * self;
01119        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocal);
01120        _g_object_unref0 (self->priv->_scope);
01121        G_OBJECT_CLASS (unity_scope_proxy_local_parent_class)->finalize (obj);
01122 }
01123 
01124 
01125 GType unity_scope_proxy_local_get_type (void) {
01126        static volatile gsize unity_scope_proxy_local_type_id__volatile = 0;
01127        if (g_once_init_enter (&unity_scope_proxy_local_type_id__volatile)) {
01128               static const GTypeInfo g_define_type_info = { sizeof (UnityScopeProxyLocalClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_scope_proxy_local_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityScopeProxyLocal), 0, (GInstanceInitFunc) unity_scope_proxy_local_instance_init, NULL };
01129               static const GInterfaceInfo unity_scope_proxy_info = { (GInterfaceInitFunc) unity_scope_proxy_local_unity_scope_proxy_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
01130               GType unity_scope_proxy_local_type_id;
01131               unity_scope_proxy_local_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityScopeProxyLocal", &g_define_type_info, 0);
01132               g_type_add_interface_static (unity_scope_proxy_local_type_id, UNITY_TYPE_SCOPE_PROXY, &unity_scope_proxy_info);
01133               g_once_init_leave (&unity_scope_proxy_local_type_id__volatile, unity_scope_proxy_local_type_id);
01134        }
01135        return unity_scope_proxy_local_type_id__volatile;
01136 }
01137 
01138 
01139 static void _vala_unity_scope_proxy_local_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
01140        UnityScopeProxyLocal * self;
01141        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocal);
01142        switch (property_id) {
01143               case UNITY_SCOPE_PROXY_LOCAL_SCOPE:
01144               g_value_set_object (value, unity_scope_proxy_local_get_scope (self));
01145               break;
01146               case UNITY_SCOPE_PROXY_LOCAL_SOURCES:
01147               g_value_set_object (value, unity_scope_proxy_get_sources ((UnityScopeProxy*) self));
01148               break;
01149               case UNITY_SCOPE_PROXY_LOCAL_SEARCH_IN_GLOBAL:
01150               g_value_set_boolean (value, unity_scope_proxy_get_search_in_global ((UnityScopeProxy*) self));
01151               break;
01152               case UNITY_SCOPE_PROXY_LOCAL_RESULTS_MODEL:
01153               g_value_set_object (value, unity_scope_proxy_get_results_model ((UnityScopeProxy*) self));
01154               break;
01155               case UNITY_SCOPE_PROXY_LOCAL_GLOBAL_RESULTS_MODEL:
01156               g_value_set_object (value, unity_scope_proxy_get_global_results_model ((UnityScopeProxy*) self));
01157               break;
01158               case UNITY_SCOPE_PROXY_LOCAL_FILTERS_MODEL:
01159               g_value_set_object (value, unity_scope_proxy_get_filters_model ((UnityScopeProxy*) self));
01160               break;
01161               case UNITY_SCOPE_PROXY_LOCAL_VIEW_TYPE:
01162               g_value_set_enum (value, unity_scope_proxy_get_view_type ((UnityScopeProxy*) self));
01163               break;
01164               default:
01165               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01166               break;
01167        }
01168 }
01169 
01170 
01171 static void _vala_unity_scope_proxy_local_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
01172        UnityScopeProxyLocal * self;
01173        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocal);
01174        switch (property_id) {
01175               case UNITY_SCOPE_PROXY_LOCAL_SCOPE:
01176               unity_scope_proxy_local_set_scope (self, g_value_get_object (value));
01177               break;
01178               case UNITY_SCOPE_PROXY_LOCAL_SOURCES:
01179               unity_scope_proxy_set_sources ((UnityScopeProxy*) self, g_value_get_object (value));
01180               break;
01181               case UNITY_SCOPE_PROXY_LOCAL_SEARCH_IN_GLOBAL:
01182               unity_scope_proxy_set_search_in_global ((UnityScopeProxy*) self, g_value_get_boolean (value));
01183               break;
01184               case UNITY_SCOPE_PROXY_LOCAL_RESULTS_MODEL:
01185               unity_scope_proxy_set_results_model ((UnityScopeProxy*) self, g_value_get_object (value));
01186               break;
01187               case UNITY_SCOPE_PROXY_LOCAL_GLOBAL_RESULTS_MODEL:
01188               unity_scope_proxy_set_global_results_model ((UnityScopeProxy*) self, g_value_get_object (value));
01189               break;
01190               case UNITY_SCOPE_PROXY_LOCAL_FILTERS_MODEL:
01191               unity_scope_proxy_set_filters_model ((UnityScopeProxy*) self, g_value_get_object (value));
01192               break;
01193               case UNITY_SCOPE_PROXY_LOCAL_VIEW_TYPE:
01194               unity_scope_proxy_set_view_type ((UnityScopeProxy*) self, g_value_get_enum (value));
01195               break;
01196               default:
01197               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01198               break;
01199        }
01200 }
01201 
01202 
01203