1 /* unity-scope-proxy-remote.c generated by valac 0.14.2, the Vala compiler
   2  * generated from unity-scope-proxy-remote.vala, do not modify */
   3 
   4 /*
   5  * Copyright (C) 2011 Canonical, Ltd.
   6  *
   7  * This library is free software; you can redistribute it and/or modify
   8  * it under the terms of the GNU Lesser General Public License
   9  * version 3.0 as published by the Free Software Foundation.
  10  *
  11  * This library is distributed in the hope that it will be useful,
  12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14  * GNU Lesser General Public License version 3.0 for more details.
  15  *
  16  * You should have received a copy of the GNU Lesser General Public
  17  * License along with this library. If not, see
  18  * <http://www.gnu.org/licenses/>.
  19  *
  20  * Authored by Neil Jagdish Patel <neil.patel@canonical.com>
  21  *
  22  */
  23 
  24 #include <glib.h>
  25 #include <glib-object.h>
  26 #include <gio/gio.h>
  27 #include <stdlib.h>
  28 #include <string.h>
  29 #include "unity.h"
  30 #include <dee.h>
  31 #include <unity-trace.h>
  32 
  33 
  34 #define UNITY_TYPE_SCOPE_PROXY (unity_scope_proxy_get_type ())
  35 #define UNITY_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxy))
  36 #define UNITY_IS_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY))
  37 #define UNITY_SCOPE_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxyIface))
  38 
  39 typedef struct _UnityScopeProxy UnityScopeProxy;
  40 typedef struct _UnityScopeProxyIface UnityScopeProxyIface;
  41 
  42 #define UNITY_TYPE_ACTIVATION_REPLY_RAW (unity_activation_reply_raw_get_type ())
  43 typedef struct _UnityActivationReplyRaw UnityActivationReplyRaw;
  44 
  45 #define UNITY_TYPE_PREVIEW_REPLY_RAW (unity_preview_reply_raw_get_type ())
  46 typedef struct _UnityPreviewReplyRaw UnityPreviewReplyRaw;
  47 
  48 #define UNITY_TYPE_VIEW_TYPE (unity_view_type_get_type ())
  49 
  50 #define UNITY_TYPE_SCOPE_PROXY_REMOTE (unity_scope_proxy_remote_get_type ())
  51 #define UNITY_SCOPE_PROXY_REMOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemote))
  52 #define UNITY_SCOPE_PROXY_REMOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))
  53 #define UNITY_IS_SCOPE_PROXY_REMOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE))
  54 #define UNITY_IS_SCOPE_PROXY_REMOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE))
  55 #define UNITY_SCOPE_PROXY_REMOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))
  56 
  57 typedef struct _UnityScopeProxyRemote UnityScopeProxyRemote;
  58 typedef struct _UnityScopeProxyRemoteClass UnityScopeProxyRemoteClass;
  59 typedef struct _UnityScopeProxyRemotePrivate UnityScopeProxyRemotePrivate;
  60 
  61 #define UNITY_TYPE_SCOPE_SERVICE (unity_scope_service_get_type ())
  62 #define UNITY_SCOPE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_SERVICE, UnityScopeService))
  63 #define UNITY_IS_SCOPE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_SERVICE))
  64 #define UNITY_SCOPE_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), UNITY_TYPE_SCOPE_SERVICE, UnityScopeServiceIface))
  65 
  66 typedef struct _UnityScopeService UnityScopeService;
  67 typedef struct _UnityScopeServiceIface UnityScopeServiceIface;
  68 
  69 #define UNITY_TYPE_SCOPE_SERVICE_PROXY (unity_scope_service_proxy_get_type ())
  70 #define _g_free0(var) (var = (g_free (var), NULL))
  71 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
  72 
  73 #define UNITY_TYPE_SCOPE_INFO (unity_scope_info_get_type ())
  74 typedef struct _UnityScopeInfo UnityScopeInfo;
  75 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
  76 typedef struct _UnityScopeProxyRemoteConnectToScopeData UnityScopeProxyRemoteConnectToScopeData;
  77 typedef struct _UnityScopeProxyRemoteActivateData UnityScopeProxyRemoteActivateData;
  78 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
  79 typedef struct _UnityScopeProxyRemoteSearchData UnityScopeProxyRemoteSearchData;
  80 typedef struct _UnityScopeProxyRemoteGlobalSearchData UnityScopeProxyRemoteGlobalSearchData;
  81 typedef struct _UnityScopeProxyRemotePreviewData UnityScopeProxyRemotePreviewData;
  82 typedef struct _UnityScopeProxyRemoteSetViewTypeData UnityScopeProxyRemoteSetViewTypeData;
  83 typedef struct _UnityScopeProxyRemoteSetActiveSourcesData UnityScopeProxyRemoteSetActiveSourcesData;
  84 
  85 struct _UnityActivationReplyRaw {
  86 	gchar* uri;
  87 	guint handled;
  88 	GHashTable* hints;
  89 };
  90 
  91 struct _UnityPreviewReplyRaw {
  92 	gchar* uri;
  93 	gchar* renderer_name;
  94 	GHashTable* properties;
  95 };
  96 
  97 typedef enum  {
  98 	UNITY_VIEW_TYPE_HIDDEN,
  99 	UNITY_VIEW_TYPE_HOME_VIEW,
 100 	UNITY_VIEW_TYPE_LENS_VIEW
 101 } UnityViewType;
 102 
 103 struct _UnityScopeProxyIface {
 104 	GTypeInterface parent_iface;
 105 	void (*activate) (UnityScopeProxy* self, const gchar* uri, guint action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
 106 	void (*activate_finish) (UnityScopeProxy* self, GAsyncResult* _res_, UnityActivationReplyRaw* result);
 107 	void (*search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
 108 	GHashTable* (*search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
 109 	void (*global_search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
 110 	GHashTable* (*global_search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
 111 	void (*preview) (UnityScopeProxy* self, const gchar* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
 112 	void (*preview_finish) (UnityScopeProxy* self, GAsyncResult* _res_, UnityPreviewReplyRaw* result);
 113 	void (*set_active_sources) (UnityScopeProxy* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
 114 	void (*set_active_sources_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
 115 	UnityOptionsFilter* (*get_sources) (UnityScopeProxy* self);
 116 	void (*set_sources) (UnityScopeProxy* self, UnityOptionsFilter* value);
 117 	gboolean (*get_search_in_global) (UnityScopeProxy* self);
 118 	void (*set_search_in_global) (UnityScopeProxy* self, gboolean value);
 119 	UnityViewType (*get_view_type) (UnityScopeProxy* self);
 120 	void (*set_view_type) (UnityScopeProxy* self, UnityViewType value);
 121 	DeeSerializableModel* (*get_results_model) (UnityScopeProxy* self);
 122 	void (*set_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
 123 	DeeSerializableModel* (*get_global_results_model) (UnityScopeProxy* self);
 124 	void (*set_global_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
 125 	DeeSerializableModel* (*get_filters_model) (UnityScopeProxy* self);
 126 	void (*set_filters_model) (UnityScopeProxy* self, DeeSerializableModel* value);
 127 };
 128 
 129 struct _UnityScopeProxyRemote {
 130 	GObject parent_instance;
 131 	UnityScopeProxyRemotePrivate * priv;
 132 };
 133 
 134 struct _UnityScopeProxyRemoteClass {
 135 	GObjectClass parent_class;
 136 };
 137 
 138 struct _UnityScopeServiceIface {
 139 	GTypeInterface parent_iface;
 140 	void (*info_request) (UnityScopeService* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
 141 	void (*info_request_finish) (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 142 	void (*activate) (UnityScopeService* self, const gchar* uri, guint action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
 143 	void (*activate_finish) (UnityScopeService* self, GAsyncResult* _res_, UnityActivationReplyRaw* result, GError** error);
 144 	void (*search) (UnityScopeService* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
 145 	GHashTable* (*search_finish) (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 146 	void (*global_search) (UnityScopeService* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
 147 	GHashTable* (*global_search_finish) (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 148 	void (*preview) (UnityScopeService* self, const gchar* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
 149 	void (*preview_finish) (UnityScopeService* self, GAsyncResult* _res_, UnityPreviewReplyRaw* result, GError** error);
 150 	void (*set_view_type) (UnityScopeService* self, guint view_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
 151 	void (*set_view_type_finish) (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 152 	void (*set_active_sources) (UnityScopeService* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
 153 	void (*set_active_sources_finish) (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 154 };
 155 
 156 struct _UnityScopeProxyRemotePrivate {
 157 	gchar* _dbus_name;
 158 	gchar* _dbus_path;
 159 	UnityOptionsFilter* _sources;
 160 	gboolean _search_in_global;
 161 	UnityViewType _view_type;
 162 	GDBusConnection* _bus;
 163 	guint _watcher;
 164 	UnityScopeService* _service;
 165 	DeeSharedModel* _results_model;
 166 	DeeSharedModel* _global_results_model;
 167 	DeeSharedModel* _filters_model;
 168 	guint _reconnection_id;
 169 	gboolean synchronized;
 170 };
 171 
 172 struct _UnityScopeInfo {
 173 	gchar* dbus_path;
 174 	GVariant* sources;
 175 	gboolean search_in_global;
 176 	gchar* private_connection_name;
 177 	gchar* results_model_name;
 178 	gchar* global_results_model_name;
 179 	gchar* filters_model_name;
 180 	GHashTable* hints;
 181 };
 182 
 183 struct _UnityScopeProxyRemoteConnectToScopeData {
 184 	int _state_;
 185 	GObject* _source_object_;
 186 	GAsyncResult* _res_;
 187 	GSimpleAsyncResult* _async_result;
 188 	UnityScopeProxyRemote* self;
 189 	GDBusConnection* _tmp0_;
 190 	const gchar* _tmp1_;
 191 	const gchar* _tmp2_;
 192 	UnityScopeService* _tmp3_;
 193 	UnityScopeService* _tmp4_;
 194 	UnityScopeService* _tmp5_;
 195 	UnityScopeService* _tmp6_;
 196 	GError* e;
 197 	const gchar* _tmp7_;
 198 	const gchar* _tmp8_;
 199 	const gchar* _tmp9_;
 200 	const gchar* _tmp10_;
 201 	GError* _tmp11_;
 202 	const gchar* _tmp12_;
 203 	const gchar* _tmp13_;
 204 	gchar* _tmp14_;
 205 	gchar* _tmp15_;
 206 	GError * _inner_error_;
 207 };
 208 
 209 struct _UnityScopeProxyRemoteActivateData {
 210 	int _state_;
 211 	GObject* _source_object_;
 212 	GAsyncResult* _res_;
 213 	GSimpleAsyncResult* _async_result;
 214 	UnityScopeProxyRemote* self;
 215 	gchar* uri;
 216 	guint action_type;
 217 	UnityActivationReplyRaw result;
 218 	gboolean _tmp0_;
 219 	UnityScopeService* _tmp1_;
 220 	const gchar* _tmp2_;
 221 	guint _tmp3_;
 222 	UnityActivationReplyRaw _tmp4_;
 223 	UnityActivationReplyRaw raw;
 224 	GError* e;
 225 	const gchar* _tmp5_;
 226 	const gchar* _tmp6_;
 227 	GError* _tmp7_;
 228 	const gchar* _tmp8_;
 229 	const gchar* _tmp9_;
 230 	gchar* _tmp10_;
 231 	gchar* _tmp11_;
 232 	UnityActivationReplyRaw _tmp12_;
 233 	GError * _inner_error_;
 234 };
 235 
 236 struct _UnityScopeProxyRemoteSearchData {
 237 	int _state_;
 238 	GObject* _source_object_;
 239 	GAsyncResult* _res_;
 240 	GSimpleAsyncResult* _async_result;
 241 	UnityScopeProxyRemote* self;
 242 	gchar* search_string;
 243 	GHashTable* hints;
 244 	GHashTable* result;
 245 	gboolean _tmp0_;
 246 	UnityScopeService* _tmp1_;
 247 	const gchar* _tmp2_;
 248 	GHashTable* _tmp3_;
 249 	GHashTable* _tmp4_;
 250 	GHashTable* ht;
 251 	GError* scope_error;
 252 	GError* e;
 253 	const gchar* _tmp5_;
 254 	const gchar* _tmp6_;
 255 	const gchar* _tmp7_;
 256 	const gchar* _tmp8_;
 257 	GError* _tmp9_;
 258 	const gchar* _tmp10_;
 259 	const gchar* _tmp11_;
 260 	gchar* _tmp12_;
 261 	gchar* _tmp13_;
 262 	GHashFunc _tmp14_;
 263 	GEqualFunc _tmp15_;
 264 	GHashTable* _tmp16_;
 265 	GError * _inner_error_;
 266 };
 267 
 268 struct _UnityScopeProxyRemoteGlobalSearchData {
 269 	int _state_;
 270 	GObject* _source_object_;
 271 	GAsyncResult* _res_;
 272 	GSimpleAsyncResult* _async_result;
 273 	UnityScopeProxyRemote* self;
 274 	gchar* search_string;
 275 	GHashTable* hints;
 276 	GHashTable* result;
 277 	gboolean _tmp0_;
 278 	UnityScopeService* _tmp1_;
 279 	const gchar* _tmp2_;
 280 	GHashTable* _tmp3_;
 281 	GHashTable* _tmp4_;
 282 	GHashTable* _result_;
 283 	GError* scope_error;
 284 	GError* e;
 285 	const gchar* _tmp5_;
 286 	const gchar* _tmp6_;
 287 	const gchar* _tmp7_;
 288 	const gchar* _tmp8_;
 289 	GError* _tmp9_;
 290 	const gchar* _tmp10_;
 291 	const gchar* _tmp11_;
 292 	gchar* _tmp12_;
 293 	gchar* _tmp13_;
 294 	GHashFunc _tmp14_;
 295 	GEqualFunc _tmp15_;
 296 	GHashTable* _tmp16_;
 297 	GError * _inner_error_;
 298 };
 299 
 300 struct _UnityScopeProxyRemotePreviewData {
 301 	int _state_;
 302 	GObject* _source_object_;
 303 	GAsyncResult* _res_;
 304 	GSimpleAsyncResult* _async_result;
 305 	UnityScopeProxyRemote* self;
 306 	gchar* uri;
 307 	UnityPreviewReplyRaw result;
 308 	gboolean _tmp0_;
 309 	UnityScopeService* _tmp1_;
 310 	const gchar* _tmp2_;
 311 	UnityPreviewReplyRaw _tmp3_;
 312 	UnityPreviewReplyRaw raw;
 313 	GError* e;
 314 	const gchar* _tmp4_;
 315 	const gchar* _tmp5_;
 316 	GError* _tmp6_;
 317 	const gchar* _tmp7_;
 318 	const gchar* _tmp8_;
 319 	gchar* _tmp9_;
 320 	gchar* _tmp10_;
 321 	UnityPreviewReplyRaw _tmp11_;
 322 	GError * _inner_error_;
 323 };
 324 
 325 struct _UnityScopeProxyRemoteSetViewTypeData {
 326 	int _state_;
 327 	GObject* _source_object_;
 328 	GAsyncResult* _res_;
 329 	GSimpleAsyncResult* _async_result;
 330 	UnityScopeProxyRemote* self;
 331 	UnityViewType view_type;
 332 	UnityViewType _tmp0_;
 333 	gboolean _tmp1_;
 334 	UnityScopeService* _tmp2_;
 335 	UnityViewType _tmp3_;
 336 	GError* e;
 337 	const gchar* _tmp4_;
 338 	const gchar* _tmp5_;
 339 	GError* _tmp6_;
 340 	const gchar* _tmp7_;
 341 	const gchar* _tmp8_;
 342 	gchar* _tmp9_;
 343 	gchar* _tmp10_;
 344 	GError * _inner_error_;
 345 };
 346 
 347 struct _UnityScopeProxyRemoteSetActiveSourcesData {
 348 	int _state_;
 349 	GObject* _source_object_;
 350 	GAsyncResult* _res_;
 351 	GSimpleAsyncResult* _async_result;
 352 	UnityScopeProxyRemote* self;
 353 	gchar** sources;
 354 	gint sources_length1;
 355 	gboolean _tmp0_;
 356 	UnityScopeService* _tmp1_;
 357 	gchar** _tmp2_;
 358 	gint _tmp2__length1;
 359 	GError* e;
 360 	const gchar* _tmp3_;
 361 	const gchar* _tmp4_;
 362 	GError* _tmp5_;
 363 	const gchar* _tmp6_;
 364 	const gchar* _tmp7_;
 365 	gchar* _tmp8_;
 366 	gchar* _tmp9_;
 367 	GError * _inner_error_;
 368 };
 369 
 370 
 371 static gpointer unity_scope_proxy_remote_parent_class = NULL;
 372 static UnityScopeProxyIface* unity_scope_proxy_remote_unity_scope_proxy_parent_iface = NULL;
 373 
 374 GType unity_activation_reply_raw_get_type (void) G_GNUC_CONST;
 375 UnityActivationReplyRaw* unity_activation_reply_raw_dup (const UnityActivationReplyRaw* self);
 376 void unity_activation_reply_raw_free (UnityActivationReplyRaw* self);
 377 void unity_activation_reply_raw_copy (const UnityActivationReplyRaw* self, UnityActivationReplyRaw* dest);
 378 void unity_activation_reply_raw_destroy (UnityActivationReplyRaw* self);
 379 GType unity_preview_reply_raw_get_type (void) G_GNUC_CONST;
 380 UnityPreviewReplyRaw* unity_preview_reply_raw_dup (const UnityPreviewReplyRaw* self);
 381 void unity_preview_reply_raw_free (UnityPreviewReplyRaw* self);
 382 void unity_preview_reply_raw_copy (const UnityPreviewReplyRaw* self, UnityPreviewReplyRaw* dest);
 383 void unity_preview_reply_raw_destroy (UnityPreviewReplyRaw* self);
 384 GType unity_view_type_get_type (void) G_GNUC_CONST;
 385 GType unity_scope_proxy_get_type (void) G_GNUC_CONST;
 386 GType unity_scope_proxy_remote_get_type (void) G_GNUC_CONST;
 387 GType unity_scope_service_proxy_get_type (void) G_GNUC_CONST;
 388 guint unity_scope_service_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 389 GType unity_scope_service_get_type (void) G_GNUC_CONST;
 390 #define UNITY_SCOPE_PROXY_REMOTE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemotePrivate))
 391 enum  {
 392 	UNITY_SCOPE_PROXY_REMOTE_DUMMY_PROPERTY,
 393 	UNITY_SCOPE_PROXY_REMOTE_DBUS_NAME,
 394 	UNITY_SCOPE_PROXY_REMOTE_DBUS_PATH,
 395 	UNITY_SCOPE_PROXY_REMOTE_SOURCES,
 396 	UNITY_SCOPE_PROXY_REMOTE_SEARCH_IN_GLOBAL,
 397 	UNITY_SCOPE_PROXY_REMOTE_RESULTS_MODEL,
 398 	UNITY_SCOPE_PROXY_REMOTE_GLOBAL_RESULTS_MODEL,
 399 	UNITY_SCOPE_PROXY_REMOTE_FILTERS_MODEL,
 400 	UNITY_SCOPE_PROXY_REMOTE_VIEW_TYPE
 401 };
 402 UnityScopeProxyRemote* unity_scope_proxy_remote_new (const gchar* dbus_name_, const gchar* dbus_path_);
 403 UnityScopeProxyRemote* unity_scope_proxy_remote_construct (GType object_type, const gchar* dbus_name_, const gchar* dbus_path_);
 404 static void unity_scope_proxy_remote_connect_to_scope_data_free (gpointer _data);
 405 static void unity_scope_proxy_remote_connect_to_scope (UnityScopeProxyRemote* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
 406 static void unity_scope_proxy_remote_connect_to_scope_finish (UnityScopeProxyRemote* self, GAsyncResult* _res_);
 407 static gboolean unity_scope_proxy_remote_connect_to_scope_co (UnityScopeProxyRemoteConnectToScopeData* _data_);
 408 const gchar* unity_scope_proxy_remote_get_dbus_name (UnityScopeProxyRemote* self);
 409 const gchar* unity_scope_proxy_remote_get_dbus_path (UnityScopeProxyRemote* self);
 410 static void unity_scope_proxy_remote_connect_to_scope_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 411 GType unity_scope_info_get_type (void) G_GNUC_CONST;
 412 UnityScopeInfo* unity_scope_info_dup (const UnityScopeInfo* self);
 413 void unity_scope_info_free (UnityScopeInfo* self);
 414 void unity_scope_info_copy (const UnityScopeInfo* self, UnityScopeInfo* dest);
 415 void unity_scope_info_destroy (UnityScopeInfo* self);
 416 void unity_scope_proxy_remote_on_changed (UnityScopeProxyRemote* self, UnityScopeInfo* scope_info);
 417 static void _unity_scope_proxy_remote_on_changed_unity_scope_service_changed (UnityScopeService* _sender, UnityScopeInfo* lens_info, gpointer self);
 418 void unity_scope_service_info_request (UnityScopeService* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
 419 void unity_scope_service_info_request_finish (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 420 static void unity_scope_proxy_remote_on_scope_appeared (UnityScopeProxyRemote* self, GDBusConnection* conn, const gchar* name, const gchar* name_owner);
 421 static void unity_scope_proxy_remote_on_scope_vanished (UnityScopeProxyRemote* self, GDBusConnection* conn, const gchar* name);
 422 void unity_scope_proxy_set_search_in_global (UnityScopeProxy* self, gboolean value);
 423 void unity_scope_proxy_set_sources (UnityScopeProxy* self, UnityOptionsFilter* value);
 424 static void unity_scope_proxy_remote_start_reconnection_timeout (UnityScopeProxyRemote* self);
 425 static gboolean __lambda0_ (UnityScopeProxyRemote* self);
 426 static gboolean ___lambda0__gsource_func (gpointer self);
 427 static void unity_scope_proxy_remote_real_activate_data_free (gpointer _data);
 428 static void unity_scope_proxy_remote_real_activate (UnityScopeProxy* base, const gchar* uri, guint action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
 429 static gboolean unity_scope_proxy_remote_real_activate_co (UnityScopeProxyRemoteActivateData* _data_);
 430 void unity_scope_service_activate (UnityScopeService* self, const gchar* uri, guint action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
 431 void unity_scope_service_activate_finish (UnityScopeService* self, GAsyncResult* _res_, UnityActivationReplyRaw* result, GError** error);
 432 static void unity_scope_proxy_remote_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 433 static void unity_scope_proxy_remote_real_search_data_free (gpointer _data);
 434 static void unity_scope_proxy_remote_real_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
 435 static gboolean unity_scope_proxy_remote_real_search_co (UnityScopeProxyRemoteSearchData* _data_);
 436 void unity_scope_service_search (UnityScopeService* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
 437 GHashTable* unity_scope_service_search_finish (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 438 static void unity_scope_proxy_remote_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 439 static void _g_free0_ (gpointer var);
 440 static void _g_variant_unref0_ (gpointer var);
 441 static void unity_scope_proxy_remote_real_global_search_data_free (gpointer _data);
 442 static void unity_scope_proxy_remote_real_global_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
 443 static gboolean unity_scope_proxy_remote_real_global_search_co (UnityScopeProxyRemoteGlobalSearchData* _data_);
 444 void unity_scope_service_global_search (UnityScopeService* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
 445 GHashTable* unity_scope_service_global_search_finish (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 446 static void unity_scope_proxy_remote_global_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 447 static void unity_scope_proxy_remote_real_preview_data_free (gpointer _data);
 448 static void unity_scope_proxy_remote_real_preview (UnityScopeProxy* base, const gchar* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
 449 static gboolean unity_scope_proxy_remote_real_preview_co (UnityScopeProxyRemotePreviewData* _data_);
 450 void unity_scope_service_preview (UnityScopeService* self, const gchar* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
 451 void unity_scope_service_preview_finish (UnityScopeService* self, GAsyncResult* _res_, UnityPreviewReplyRaw* result, GError** error);
 452 static void unity_scope_proxy_remote_preview_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 453 static void unity_scope_proxy_remote_set_view_type_data_free (gpointer _data);
 454 void unity_scope_proxy_remote_set_view_type (UnityScopeProxyRemote* self, UnityViewType view_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
 455 void unity_scope_proxy_remote_set_view_type_finish (UnityScopeProxyRemote* self, GAsyncResult* _res_);
 456 static gboolean unity_scope_proxy_remote_set_view_type_co (UnityScopeProxyRemoteSetViewTypeData* _data_);
 457 void unity_scope_service_set_view_type (UnityScopeService* self, guint view_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
 458 void unity_scope_service_set_view_type_finish (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 459 static void unity_scope_proxy_remote_set_view_type_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 460 static void unity_scope_proxy_remote_real_set_active_sources_data_free (gpointer _data);
 461 static void unity_scope_proxy_remote_real_set_active_sources (UnityScopeProxy* base, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
 462 static gchar** _vala_array_dup6 (gchar** self, int length);
 463 static gboolean unity_scope_proxy_remote_real_set_active_sources_co (UnityScopeProxyRemoteSetActiveSourcesData* _data_);
 464 void unity_scope_service_set_active_sources (UnityScopeService* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
 465 void unity_scope_service_set_active_sources_finish (UnityScopeService* self, GAsyncResult* _res_, GError** error);
 466 static void unity_scope_proxy_remote_set_active_sources_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 467 DeeSerializableModel* unity_scope_proxy_get_results_model (UnityScopeProxy* self);
 468 void unity_scope_proxy_set_results_model (UnityScopeProxy* self, DeeSerializableModel* value);
 469 DeeSerializableModel* unity_scope_proxy_get_global_results_model (UnityScopeProxy* self);
 470 void unity_scope_proxy_set_global_results_model (UnityScopeProxy* self, DeeSerializableModel* value);
 471 DeeSerializableModel* unity_scope_proxy_get_filters_model (UnityScopeProxy* self);
 472 void unity_scope_proxy_set_filters_model (UnityScopeProxy* self, DeeSerializableModel* value);
 473 UnityOptionsFilter* unity_scope_proxy_get_sources (UnityScopeProxy* self);
 474 void unity_filter_update (UnityFilter* self, GVariant* properties);
 475 static void unity_scope_proxy_remote_set_dbus_name (UnityScopeProxyRemote* self, const gchar* value);
 476 static void unity_scope_proxy_remote_set_dbus_path (UnityScopeProxyRemote* self, const gchar* value);
 477 static GObject * unity_scope_proxy_remote_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
 478 static void _unity_scope_proxy_remote_on_scope_appeared_gbus_name_appeared_callback (GDBusConnection* connection, const gchar* name, const gchar* name_owner, gpointer self);
 479 static void _unity_scope_proxy_remote_on_scope_vanished_gbus_name_vanished_callback (GDBusConnection* connection, const gchar* name, gpointer self);
 480 static void unity_scope_proxy_remote_finalize (GObject* obj);
 481 gboolean unity_scope_proxy_get_search_in_global (UnityScopeProxy* self);
 482 UnityViewType unity_scope_proxy_get_view_type (UnityScopeProxy* self);
 483 static void _vala_unity_scope_proxy_remote_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
 484 void unity_scope_proxy_set_view_type (UnityScopeProxy* self, UnityViewType value);
 485 static void _vala_unity_scope_proxy_remote_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
 486 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
 487 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
 488 
 489 
 490 UnityScopeProxyRemote* unity_scope_proxy_remote_construct (GType object_type, const gchar* dbus_name_, const gchar* dbus_path_) {
 491 	UnityScopeProxyRemote * self = NULL;
 492 	const gchar* _tmp0_;
 493 	const gchar* _tmp1_;
 494 	g_return_val_if_fail (dbus_name_ != NULL, NULL);
 495 	g_return_val_if_fail (dbus_path_ != NULL, NULL);
 496 	_tmp0_ = dbus_name_;
 497 	_tmp1_ = dbus_path_;
 498 	self = (UnityScopeProxyRemote*) g_object_new (object_type, "dbus-name", _tmp0_, "dbus-path", _tmp1_, NULL);
 499 	return self;
 500 }
 501 
 502 
 503 UnityScopeProxyRemote* unity_scope_proxy_remote_new (const gchar* dbus_name_, const gchar* dbus_path_) {
 504 	return unity_scope_proxy_remote_construct (UNITY_TYPE_SCOPE_PROXY_REMOTE, dbus_name_, dbus_path_);
 505 }
 506 
 507 
 508 static void unity_scope_proxy_remote_connect_to_scope_data_free (gpointer _data) {
 509 	UnityScopeProxyRemoteConnectToScopeData* _data_;
 510 	_data_ = _data;
 511 	_g_object_unref0 (_data_->self);
 512 	g_slice_free (UnityScopeProxyRemoteConnectToScopeData, _data_);
 513 }
 514 
 515 
 516 static gpointer _g_object_ref0 (gpointer self) {
 517 	return self ? g_object_ref (self) : NULL;
 518 }
 519 
 520 
 521 static void unity_scope_proxy_remote_connect_to_scope (UnityScopeProxyRemote* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
 522 	UnityScopeProxyRemoteConnectToScopeData* _data_;
 523 	UnityScopeProxyRemote* _tmp0_;
 524 	_data_ = g_slice_new0 (UnityScopeProxyRemoteConnectToScopeData);
 525 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_connect_to_scope);
 526 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_connect_to_scope_data_free);
 527 	_tmp0_ = _g_object_ref0 (self);
 528 	_data_->self = _tmp0_;
 529 	unity_scope_proxy_remote_connect_to_scope_co (_data_);
 530 }
 531 
 532 
 533 static void unity_scope_proxy_remote_connect_to_scope_finish (UnityScopeProxyRemote* self, GAsyncResult* _res_) {
 534 	UnityScopeProxyRemoteConnectToScopeData* _data_;
 535 	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
 536 }
 537 
 538 
 539 static void unity_scope_proxy_remote_connect_to_scope_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
 540 	UnityScopeProxyRemoteConnectToScopeData* _data_;
 541 	_data_ = _user_data_;
 542 	_data_->_source_object_ = source_object;
 543 	_data_->_res_ = _res_;
 544 	unity_scope_proxy_remote_connect_to_scope_co (_data_);
 545 }
 546 
 547 
 548 static void _unity_scope_proxy_remote_on_changed_unity_scope_service_changed (UnityScopeService* _sender, UnityScopeInfo* lens_info, gpointer self) {
 549 	unity_scope_proxy_remote_on_changed (self, lens_info);
 550 }
 551 
 552 
 553 static const gchar* string_to_string (const gchar* self) {
 554 	const gchar* result = NULL;
 555 	g_return_val_if_fail (self != NULL, NULL);
 556 	result = self;
 557 	return result;
 558 }
 559 
 560 
 561 static gboolean unity_scope_proxy_remote_connect_to_scope_co (UnityScopeProxyRemoteConnectToScopeData* _data_) {
 562 	switch (_data_->_state_) {
 563 		case 0:
 564 		goto _state_0;
 565 		case 1:
 566 		goto _state_1;
 567 		case 2:
 568 		goto _state_2;
 569 		default:
 570 		g_assert_not_reached ();
 571 	}
 572 	_state_0:
 573 	{
 574 		_data_->_tmp0_ = _data_->self->priv->_bus;
 575 		_data_->_tmp1_ = _data_->self->priv->_dbus_name;
 576 		_data_->_tmp2_ = _data_->self->priv->_dbus_path;
 577 		_data_->_state_ = 1;
 578 		g_async_initable_new_async (UNITY_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);
 579 		return FALSE;
 580 		_state_1:
 581 		_data_->_tmp3_ = NULL;
 582 		_data_->_tmp3_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
 583 		_data_->_tmp4_ = (UnityScopeService*) _data_->_tmp3_;
 584 		if (_data_->_inner_error_ != NULL) {
 585 			goto __catch24_g_error;
 586 		}
 587 		_g_object_unref0 (_data_->self->priv->_service);
 588 		_data_->self->priv->_service = _data_->_tmp4_;
 589 		_data_->_tmp5_ = _data_->self->priv->_service;
 590 		g_signal_connect_object (_data_->_tmp5_, "changed", (GCallback) _unity_scope_proxy_remote_on_changed_unity_scope_service_changed, _data_->self, 0);
 591 		_data_->_tmp6_ = _data_->self->priv->_service;
 592 		_data_->_state_ = 2;
 593 		unity_scope_service_info_request (_data_->_tmp6_, unity_scope_proxy_remote_connect_to_scope_ready, _data_);
 594 		return FALSE;
 595 		_state_2:
 596 		unity_scope_service_info_request_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
 597 		if (_data_->_inner_error_ != NULL) {
 598 			goto __catch24_g_error;
 599 		}
 600 	}
 601 	goto __finally24;
 602 	__catch24_g_error:
 603 	{
 604 		_data_->e = _data_->_inner_error_;
 605 		_data_->_inner_error_ = NULL;
 606 		_data_->_tmp7_ = _data_->self->priv->_dbus_path;
 607 		_data_->_tmp8_ = NULL;
 608 		_data_->_tmp8_ = string_to_string (_data_->_tmp7_);
 609 		_data_->_tmp9_ = _data_->self->priv->_dbus_name;
 610 		_data_->_tmp10_ = NULL;
 611 		_data_->_tmp10_ = string_to_string (_data_->_tmp9_);
 612 		_data_->_tmp11_ = _data_->e;
 613 		_data_->_tmp12_ = _data_->_tmp11_->message;
 614 		_data_->_tmp13_ = NULL;
 615 		_data_->_tmp13_ = string_to_string (_data_->_tmp12_);
 616 		_data_->_tmp14_ = NULL;
 617 		_data_->_tmp14_ = g_strconcat ("Unable to connect to Scope (", _data_->_tmp8_, " @ ", _data_->_tmp10_, "): ", _data_->_tmp13_, NULL);
 618 		_data_->_tmp15_ = _data_->_tmp14_;
 619 		g_warning ("unity-scope-proxy-remote.vala:104: %s", _data_->_tmp15_);
 620 		_g_free0 (_data_->_tmp15_);
 621 		_g_error_free0 (_data_->e);
 622 	}
 623 	__finally24:
 624 	if (_data_->_inner_error_ != NULL) {
 625 		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);
 626 		g_clear_error (&_data_->_inner_error_);
 627 		return FALSE;
 628 	}
 629 	if (_data_->_state_ == 0) {
 630 		g_simple_async_result_complete_in_idle (_data_->_async_result);
 631 	} else {
 632 		g_simple_async_result_complete (_data_->_async_result);
 633 	}
 634 	g_object_unref (_data_->_async_result);
 635 	return FALSE;
 636 }
 637 
 638 
 639 static void unity_scope_proxy_remote_on_scope_appeared (UnityScopeProxyRemote* self, GDBusConnection* conn, const gchar* name, const gchar* name_owner) {
 640 	const gchar* _tmp0_;
 641 	guint _tmp1_;
 642 	g_return_if_fail (self != NULL);
 643 	g_return_if_fail (conn != NULL);
 644 	g_return_if_fail (name != NULL);
 645 	g_return_if_fail (name_owner != NULL);
 646 	_tmp0_ = self->priv->_dbus_name;
 647 	unity_trace_log_object ((GObject*) self, "Scope appeared: %s", _tmp0_);
 648 	_tmp1_ = self->priv->_reconnection_id;
 649 	if (_tmp1_ != ((guint) 0)) {
 650 		guint _tmp2_;
 651 		_tmp2_ = self->priv->_reconnection_id;
 652 		g_source_remove (_tmp2_);
 653 	}
 654 	unity_scope_proxy_remote_connect_to_scope (self, NULL, NULL);
 655 }
 656 
 657 
 658 static void unity_scope_proxy_remote_on_scope_vanished (UnityScopeProxyRemote* self, GDBusConnection* conn, const gchar* name) {
 659 	const gchar* _tmp0_;
 660 	UnityCheckOptionFilter* _tmp1_;
 661 	UnityCheckOptionFilter* _tmp2_;
 662 	DeeSharedModel* _tmp3_;
 663 	DeeSharedModel* _tmp5_;
 664 	DeeSharedModel* _tmp7_;
 665 	g_return_if_fail (self != NULL);
 666 	g_return_if_fail (conn != NULL);
 667 	g_return_if_fail (name != NULL);
 668 	_tmp0_ = self->priv->_dbus_name;
 669 	unity_trace_log_object ((GObject*) self, "Scope vanished: %s", _tmp0_);
 670 	self->priv->synchronized = FALSE;
 671 	unity_scope_proxy_set_search_in_global ((UnityScopeProxy*) self, FALSE);
 672 	_tmp1_ = unity_check_option_filter_new ("sources", "Sources", NULL, TRUE);
 673 	_tmp2_ = _tmp1_;
 674 	unity_scope_proxy_set_sources ((UnityScopeProxy*) self, (UnityOptionsFilter*) _tmp2_);
 675 	_g_object_unref0 (_tmp2_);
 676 	_tmp3_ = self->priv->_results_model;
 677 	if (_tmp3_ != NULL) {
 678 		DeeSharedModel* _tmp4_;
 679 		_tmp4_ = self->priv->_results_model;
 680 		dee_model_clear ((DeeModel*) _tmp4_);
 681 	}
 682 	_tmp5_ = self->priv->_global_results_model;
 683 	if (_tmp5_ != NULL) {
 684 		DeeSharedModel* _tmp6_;
 685 		_tmp6_ = self->priv->_global_results_model;
 686 		dee_model_clear ((DeeModel*) _tmp6_);
 687 	}
 688 	_tmp7_ = self->priv->_filters_model;
 689 	if (_tmp7_ != NULL) {
 690 		DeeSharedModel* _tmp8_;
 691 		_tmp8_ = self->priv->_filters_model;
 692 		dee_model_clear ((DeeModel*) _tmp8_);
 693 	}
 694 	unity_scope_proxy_remote_start_reconnection_timeout (self);
 695 }
 696 
 697 
 698 static gboolean __lambda0_ (UnityScopeProxyRemote* self) {
 699 	gboolean result = FALSE;
 700 	UnityScopeService* _tmp0_;
 701 	_tmp0_ = self->priv->_service;
 702 	if (_tmp0_ == NULL) {
 703 		unity_scope_proxy_remote_connect_to_scope (self, NULL, NULL);
 704 	}
 705 	self->priv->_reconnection_id = (guint) 0;
 706 	result = FALSE;
 707 	return result;
 708 }
 709 
 710 
 711 static gboolean ___lambda0__gsource_func (gpointer self) {
 712 	gboolean result;
 713 	result = __lambda0_ (self);
 714 	return result;
 715 }
 716 
 717 
 718 static void unity_scope_proxy_remote_start_reconnection_timeout (UnityScopeProxyRemote* self) {
 719 	guint _tmp0_;
 720 	guint _tmp2_ = 0U;
 721 	g_return_if_fail (self != NULL);
 722 	_tmp0_ = self->priv->_reconnection_id;
 723 	if (_tmp0_ != ((guint) 0)) {
 724 		guint _tmp1_;
 725 		_tmp1_ = self->priv->_reconnection_id;
 726 		g_source_remove (_tmp1_);
 727 	}
 728 	_tmp2_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda0__gsource_func, g_object_ref (self), g_object_unref);
 729 	self->priv->_reconnection_id = _tmp2_;
 730 }
 731 
 732 
 733 static void unity_scope_proxy_remote_real_activate_data_free (gpointer _data) {
 734 	UnityScopeProxyRemoteActivateData* _data_;
 735 	_data_ = _data;
 736 	_g_free0 (_data_->uri);
 737 	unity_activation_reply_raw_destroy (&_data_->result);
 738 	_g_object_unref0 (_data_->self);
 739 	g_slice_free (UnityScopeProxyRemoteActivateData, _data_);
 740 }
 741 
 742 
 743 static void unity_scope_proxy_remote_real_activate (UnityScopeProxy* base, const gchar* uri, guint action_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
 744 	UnityScopeProxyRemote * self;
 745 	UnityScopeProxyRemoteActivateData* _data_;
 746 	UnityScopeProxyRemote* _tmp0_;
 747 	const gchar* _tmp1_;
 748 	gchar* _tmp2_;
 749 	guint _tmp3_;
 750 	self = (UnityScopeProxyRemote*) base;
 751 	_data_ = g_slice_new0 (UnityScopeProxyRemoteActivateData);
 752 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_activate);
 753 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_activate_data_free);
 754 	_tmp0_ = _g_object_ref0 (self);
 755 	_data_->self = _tmp0_;
 756 	_tmp1_ = uri;
 757 	_tmp2_ = g_strdup (_tmp1_);
 758 	_data_->uri = _tmp2_;
 759 	_tmp3_ = action_type;
 760 	_data_->action_type = _tmp3_;
 761 	unity_scope_proxy_remote_real_activate_co (_data_);
 762 }
 763 
 764 
 765 static void unity_scope_proxy_remote_real_activate_finish (UnityScopeProxy* base, GAsyncResult* _res_, UnityActivationReplyRaw* result) {
 766 	UnityScopeProxyRemoteActivateData* _data_;
 767 	UnityActivationReplyRaw _tmp0_ = {0};
 768 	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
 769 	unity_activation_reply_raw_copy (&_data_->result, &_tmp0_);
 770 	*result = _tmp0_;
 771 }
 772 
 773 
 774 static void unity_scope_proxy_remote_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
 775 	UnityScopeProxyRemoteActivateData* _data_;
 776 	_data_ = _user_data_;
 777 	_data_->_source_object_ = source_object;
 778 	_data_->_res_ = _res_;
 779 	unity_scope_proxy_remote_real_activate_co (_data_);
 780 }
 781 
 782 
 783 static gboolean unity_scope_proxy_remote_real_activate_co (UnityScopeProxyRemoteActivateData* _data_) {
 784 	switch (_data_->_state_) {
 785 		case 0:
 786 		goto _state_0;
 787 		case 1:
 788 		goto _state_1;
 789 		default:
 790 		g_assert_not_reached ();
 791 	}
 792 	_state_0:
 793 	_data_->_tmp0_ = _data_->self->priv->synchronized;
 794 	if (_data_->_tmp0_) {
 795 		{
 796 			_data_->_tmp1_ = _data_->self->priv->_service;
 797 			_data_->_tmp2_ = _data_->uri;
 798 			_data_->_tmp3_ = _data_->action_type;
 799 			memset (&_data_->_tmp4_, 0, sizeof (UnityActivationReplyRaw));
 800 			_data_->_state_ = 1;
 801 			unity_scope_service_activate (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, unity_scope_proxy_remote_activate_ready, _data_);
 802 			return FALSE;
 803 			_state_1:
 804 			unity_scope_service_activate_finish (_data_->_tmp1_, _data_->_res_, &_data_->_tmp4_, &_data_->_inner_error_);
 805 			_data_->raw = _data_->_tmp4_;
 806 			if (_data_->_inner_error_ != NULL) {
 807 				goto __catch25_g_error;
 808 			}
 809 			_data_->result = _data_->raw;
 810 			if (_data_->_state_ == 0) {
 811 				g_simple_async_result_complete_in_idle (_data_->_async_result);
 812 			} else {
 813 				g_simple_async_result_complete (_data_->_async_result);
 814 			}
 815 			g_object_unref (_data_->_async_result);
 816 			return FALSE;
 817 		}
CID 10581 - UNREACHABLE
This code cannot be reached: "goto __finally25;".
 818 		goto __finally25;
 819 		__catch25_g_error:
 820 		{
 821 			_data_->e = _data_->_inner_error_;
 822 			_data_->_inner_error_ = NULL;
 823 			_data_->_tmp5_ = _data_->self->priv->_dbus_path;
 824 			_data_->_tmp6_ = NULL;
 825 			_data_->_tmp6_ = string_to_string (_data_->_tmp5_);
 826 			_data_->_tmp7_ = _data_->e;
 827 			_data_->_tmp8_ = _data_->_tmp7_->message;
 828 			_data_->_tmp9_ = NULL;
 829 			_data_->_tmp9_ = string_to_string (_data_->_tmp8_);
 830 			_data_->_tmp10_ = NULL;
 831 			_data_->_tmp10_ = g_strconcat ("Unable to search scope (", _data_->_tmp6_, "): ", _data_->_tmp9_, NULL);
 832 			_data_->_tmp11_ = _data_->_tmp10_;
 833 			g_warning ("unity-scope-proxy-remote.vala:165: %s", _data_->_tmp11_);
 834 			_g_free0 (_data_->_tmp11_);
 835 			_g_error_free0 (_data_->e);
 836 		}
 837 		__finally25:
 838 		if (_data_->_inner_error_ != NULL) {
 839 			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);
 840 			g_clear_error (&_data_->_inner_error_);
 841 			return FALSE;
 842 		}
 843 	}
 844 	memset (&_data_->_tmp12_, 0, sizeof (UnityActivationReplyRaw));
 845 	memset (&_data_->_tmp12_, 0, sizeof (UnityActivationReplyRaw));
 846 	_data_->result = _data_->_tmp12_;
 847 	if (_data_->_state_ == 0) {
 848 		g_simple_async_result_complete_in_idle (_data_->_async_result);
 849 	} else {
 850 		g_simple_async_result_complete (_data_->_async_result);
 851 	}
 852 	g_object_unref (_data_->_async_result);
 853 	return FALSE;
CID 10581 - UNREACHABLE
This code cannot be reached: "if (_data_->_state_ == 0){
...".
 854 	if (_data_->_state_ == 0) {
 855 		g_simple_async_result_complete_in_idle (_data_->_async_result);
 856 	} else {
 857 		g_simple_async_result_complete (_data_->_async_result);
 858 	}
 859 	g_object_unref (_data_->_async_result);
 860 	return FALSE;
 861 }
 862 
 863 
 864 static void unity_scope_proxy_remote_real_search_data_free (gpointer _data) {
 865 	UnityScopeProxyRemoteSearchData* _data_;
 866 	_data_ = _data;
 867 	_g_free0 (_data_->search_string);
 868 	_g_hash_table_unref0 (_data_->hints);
 869 	_g_hash_table_unref0 (_data_->result);
 870 	_g_object_unref0 (_data_->self);
 871 	g_slice_free (UnityScopeProxyRemoteSearchData, _data_);
 872 }
 873 
 874 
 875 static gpointer _g_hash_table_ref0 (gpointer self) {
 876 	return self ? g_hash_table_ref (self) : NULL;
 877 }
 878 
 879 
 880 static void unity_scope_proxy_remote_real_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
 881 	UnityScopeProxyRemote * self;
 882 	UnityScopeProxyRemoteSearchData* _data_;
 883 	UnityScopeProxyRemote* _tmp0_;
 884 	const gchar* _tmp1_;
 885 	gchar* _tmp2_;
 886 	GHashTable* _tmp3_;
 887 	GHashTable* _tmp4_;
 888 	self = (UnityScopeProxyRemote*) base;
 889 	_data_ = g_slice_new0 (UnityScopeProxyRemoteSearchData);
 890 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_search);
 891 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_search_data_free);
 892 	_tmp0_ = _g_object_ref0 (self);
 893 	_data_->self = _tmp0_;
 894 	_tmp1_ = search_string;
 895 	_tmp2_ = g_strdup (_tmp1_);
 896 	_data_->search_string = _tmp2_;
 897 	_tmp3_ = hints;
 898 	_tmp4_ = _g_hash_table_ref0 (_tmp3_);
 899 	_data_->hints = _tmp4_;
 900 	unity_scope_proxy_remote_real_search_co (_data_);
 901 }
 902 
 903 
 904 static GHashTable* unity_scope_proxy_remote_real_search_finish (UnityScopeProxy* base, GAsyncResult* _res_) {
 905 	GHashTable* result;
 906 	UnityScopeProxyRemoteSearchData* _data_;
 907 	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
 908 	result = _data_->result;
 909 	_data_->result = NULL;
 910 	return result;
 911 }
 912 
 913 
 914 static void unity_scope_proxy_remote_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
 915 	UnityScopeProxyRemoteSearchData* _data_;
 916 	_data_ = _user_data_;
 917 	_data_->_source_object_ = source_object;
 918 	_data_->_res_ = _res_;
 919 	unity_scope_proxy_remote_real_search_co (_data_);
 920 }
 921 
 922 
 923 static void _g_free0_ (gpointer var) {
 924 	var = (g_free (var), NULL);
 925 }
 926 
 927 
 928 static void _g_variant_unref0_ (gpointer var) {
 929 	(var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
 930 }
 931 
 932 
 933 static gboolean unity_scope_proxy_remote_real_search_co (UnityScopeProxyRemoteSearchData* _data_) {
 934 	switch (_data_->_state_) {
 935 		case 0:
 936 		goto _state_0;
 937 		case 1:
 938 		goto _state_1;
 939 		default:
 940 		g_assert_not_reached ();
 941 	}
 942 	_state_0:
 943 	_data_->_tmp0_ = _data_->self->priv->synchronized;
 944 	if (_data_->_tmp0_) {
 945 		{
 946 			_data_->_tmp1_ = _data_->self->priv->_service;
 947 			_data_->_tmp2_ = _data_->search_string;
 948 			_data_->_tmp3_ = _data_->hints;
 949 			_data_->_state_ = 1;
 950 			unity_scope_service_search (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, unity_scope_proxy_remote_search_ready, _data_);
 951 			return FALSE;
 952 			_state_1:
 953 			_data_->_tmp4_ = NULL;
 954 			_data_->_tmp4_ = unity_scope_service_search_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
 955 			_data_->ht = _data_->_tmp4_;
 956 			if (_data_->_inner_error_ != NULL) {
 957 				if (g_error_matches (_data_->_inner_error_, UNITY_SCOPE_ERROR, UNITY_SCOPE_ERROR_SEARCH_CANCELLED)) {
 958 					goto __catch26_unity_scope_error_search_cancelled;
 959 				}
 960 				goto __catch26_g_error;
 961 			}
 962 			_data_->result = _data_->ht;
 963 			if (_data_->_state_ == 0) {
 964 				g_simple_async_result_complete_in_idle (_data_->_async_result);
 965 			} else {
 966 				g_simple_async_result_complete (_data_->_async_result);
 967 			}
 968 			g_object_unref (_data_->_async_result);
 969 			return FALSE;
 970 		}
 971 		goto __finally26;
 972 		__catch26_unity_scope_error_search_cancelled:
 973 		{
 974 			_data_->scope_error = _data_->_inner_error_;
 975 			_data_->_inner_error_ = NULL;
 976 			_g_error_free0 (_data_->scope_error);
 977 		}
 978 		goto __finally26;
 979 		__catch26_g_error:
 980 		{
 981 			_data_->e = _data_->_inner_error_;
 982 			_data_->_inner_error_ = NULL;
 983 			_data_->_tmp5_ = _data_->self->priv->_dbus_path;
 984 			_data_->_tmp6_ = NULL;
 985 			_data_->_tmp6_ = string_to_string (_data_->_tmp5_);
 986 			_data_->_tmp7_ = _data_->search_string;
 987 			_data_->_tmp8_ = NULL;
 988 			_data_->_tmp8_ = string_to_string (_data_->_tmp7_);
 989 			_data_->_tmp9_ = _data_->e;
 990 			_data_->_tmp10_ = _data_->_tmp9_->message;
 991 			_data_->_tmp11_ = NULL;
 992 			_data_->_tmp11_ = string_to_string (_data_->_tmp10_);
 993 			_data_->_tmp12_ = NULL;
 994 			_data_->_tmp12_ = g_strconcat ("Unable to search scope (", _data_->_tmp6_, " - '", _data_->_tmp8_, "'): ", _data_->_tmp11_, NULL);
 995 			_data_->_tmp13_ = _data_->_tmp12_;
 996 			g_warning ("unity-scope-proxy-remote.vala:182: %s", _data_->_tmp13_);
 997 			_g_free0 (_data_->_tmp13_);
 998 			_g_error_free0 (_data_->e);
 999 		}
1000 		__finally26:
1001 		if (_data_->_inner_error_ != NULL) {
1002 			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);
1003 			g_clear_error (&_data_->_inner_error_);
1004 			return FALSE;
1005 		}
1006 	}
1007 	_data_->_tmp14_ = g_str_hash;
1008 	_data_->_tmp15_ = g_str_equal;
1009 	_data_->_tmp16_ = g_hash_table_new_full (_data_->_tmp14_, _data_->_tmp15_, _g_free0_, _g_variant_unref0_);
1010 	_data_->result = _data_->_tmp16_;
1011 	if (_data_->_state_ == 0) {
1012 		g_simple_async_result_complete_in_idle (_data_->_async_result);
1013 	} else {
1014 		g_simple_async_result_complete (_data_->_async_result);
1015 	}
1016 	g_object_unref (_data_->_async_result);
1017 	return FALSE;
1018 	if (_data_->_state_ == 0) {
1019 		g_simple_async_result_complete_in_idle (_data_->_async_result);
1020 	} else {
1021 		g_simple_async_result_complete (_data_->_async_result);
1022 	}
1023 	g_object_unref (_data_->_async_result);
1024 	return FALSE;
1025 }
1026 
1027 
1028 static void unity_scope_proxy_remote_real_global_search_data_free (gpointer _data) {
1029 	UnityScopeProxyRemoteGlobalSearchData* _data_;
1030 	_data_ = _data;
1031 	_g_free0 (_data_->search_string);
1032 	_g_hash_table_unref0 (_data_->hints);
1033 	_g_hash_table_unref0 (_data_->result);
1034 	_g_object_unref0 (_data_->self);
1035 	g_slice_free (UnityScopeProxyRemoteGlobalSearchData, _data_);
1036 }
1037 
1038 
1039 static void unity_scope_proxy_remote_real_global_search (UnityScopeProxy* base, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
1040 	UnityScopeProxyRemote * self;
1041 	UnityScopeProxyRemoteGlobalSearchData* _data_;
1042 	UnityScopeProxyRemote* _tmp0_;
1043 	const gchar* _tmp1_;
1044 	gchar* _tmp2_;
1045 	GHashTable* _tmp3_;
1046 	GHashTable* _tmp4_;
1047 	self = (UnityScopeProxyRemote*) base;
1048 	_data_ = g_slice_new0 (UnityScopeProxyRemoteGlobalSearchData);
1049 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_global_search);
1050 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_global_search_data_free);
1051 	_tmp0_ = _g_object_ref0 (self);
1052 	_data_->self = _tmp0_;
1053 	_tmp1_ = search_string;
1054 	_tmp2_ = g_strdup (_tmp1_);
1055 	_data_->search_string = _tmp2_;
1056 	_tmp3_ = hints;
1057 	_tmp4_ = _g_hash_table_ref0 (_tmp3_);
1058 	_data_->hints = _tmp4_;
1059 	unity_scope_proxy_remote_real_global_search_co (_data_);
1060 }
1061 
1062 
1063 static GHashTable* unity_scope_proxy_remote_real_global_search_finish (UnityScopeProxy* base, GAsyncResult* _res_) {
1064 	GHashTable* result;
1065 	UnityScopeProxyRemoteGlobalSearchData* _data_;
1066 	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
1067 	result = _data_->result;
1068 	_data_->result = NULL;
1069 	return result;
1070 }
1071 
1072 
1073 static void unity_scope_proxy_remote_global_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
1074 	UnityScopeProxyRemoteGlobalSearchData* _data_;
1075 	_data_ = _user_data_;
1076 	_data_->_source_object_ = source_object;
1077 	_data_->_res_ = _res_;
1078 	unity_scope_proxy_remote_real_global_search_co (_data_);
1079 }
1080 
1081 
1082 static gboolean unity_scope_proxy_remote_real_global_search_co (UnityScopeProxyRemoteGlobalSearchData* _data_) {
1083 	switch (_data_->_state_) {
1084 		case 0:
1085 		goto _state_0;
1086 		case 1:
1087 		goto _state_1;
1088 		default:
1089 		g_assert_not_reached ();
1090 	}
1091 	_state_0:
1092 	_data_->_tmp0_ = _data_->self->priv->synchronized;
1093 	if (_data_->_tmp0_) {
1094 		{
1095 			_data_->_tmp1_ = _data_->self->priv->_service;
1096 			_data_->_tmp2_ = _data_->search_string;
1097 			_data_->_tmp3_ = _data_->hints;
1098 			_data_->_state_ = 1;
1099 			unity_scope_service_global_search (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, unity_scope_proxy_remote_global_search_ready, _data_);
1100 			return FALSE;
1101 			_state_1:
1102 			_data_->_tmp4_ = NULL;
1103 			_data_->_tmp4_ = unity_scope_service_global_search_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
1104 			_data_->_result_ = _data_->_tmp4_;
1105 			if (_data_->_inner_error_ != NULL) {
1106 				if (g_error_matches (_data_->_inner_error_, UNITY_SCOPE_ERROR, UNITY_SCOPE_ERROR_SEARCH_CANCELLED)) {
1107 					goto __catch27_unity_scope_error_search_cancelled;
1108 				}
1109 				goto __catch27_g_error;
1110 			}
1111 			_data_->result = _data_->_result_;
1112 			if (_data_->_state_ == 0) {
1113 				g_simple_async_result_complete_in_idle (_data_->_async_result);
1114 			} else {
1115 				g_simple_async_result_complete (_data_->_async_result);
1116 			}
1117 			g_object_unref (_data_->_async_result);
1118 			return FALSE;
1119 		}
1120 		goto __finally27;
1121 		__catch27_unity_scope_error_search_cancelled:
1122 		{
1123 			_data_->scope_error = _data_->_inner_error_;
1124 			_data_->_inner_error_ = NULL;
1125 			_g_error_free0 (_data_->scope_error);
1126 		}
1127 		goto __finally27;
1128 		__catch27_g_error:
1129 		{
1130 			_data_->e = _data_->_inner_error_;
1131 			_data_->_inner_error_ = NULL;
1132 			_data_->_tmp5_ = _data_->self->priv->_dbus_path;
1133 			_data_->_tmp6_ = NULL;
1134 			_data_->_tmp6_ = string_to_string (_data_->_tmp5_);
1135 			_data_->_tmp7_ = _data_->search_string;
1136 			_data_->_tmp8_ = NULL;
1137 			_data_->_tmp8_ = string_to_string (_data_->_tmp7_);
1138 			_data_->_tmp9_ = _data_->e;
1139 			_data_->_tmp10_ = _data_->_tmp9_->message;
1140 			_data_->_tmp11_ = NULL;
1141 			_data_->_tmp11_ = string_to_string (_data_->_tmp10_);
1142 			_data_->_tmp12_ = NULL;
1143 			_data_->_tmp12_ = g_strconcat ("Unable to global_search scope (", _data_->_tmp6_, " - '", _data_->_tmp8_, "'): ", _data_->_tmp11_, NULL);
1144 			_data_->_tmp13_ = _data_->_tmp12_;
1145 			g_warning ("unity-scope-proxy-remote.vala:200: %s", _data_->_tmp13_);
1146 			_g_free0 (_data_->_tmp13_);
1147 			_g_error_free0 (_data_->e);
1148 		}
1149 		__finally27:
1150 		if (_data_->_inner_error_ != NULL) {
1151 			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);
1152 			g_clear_error (&_data_->_inner_error_);
1153 			return FALSE;
1154 		}
1155 	}
1156 	_data_->_tmp14_ = g_str_hash;
1157 	_data_->_tmp15_ = g_str_equal;
1158 	_data_->_tmp16_ = g_hash_table_new_full (_data_->_tmp14_, _data_->_tmp15_, _g_free0_, _g_variant_unref0_);
1159 	_data_->result = _data_->_tmp16_;
1160 	if (_data_->_state_ == 0) {
1161 		g_simple_async_result_complete_in_idle (_data_->_async_result);
1162 	} else {
1163 		g_simple_async_result_complete (_data_->_async_result);
1164 	}
1165 	g_object_unref (_data_->_async_result);
1166 	return FALSE;
1167 	if (_data_->_state_ == 0) {
1168 		g_simple_async_result_complete_in_idle (_data_->_async_result);
1169 	} else {
1170 		g_simple_async_result_complete (_data_->_async_result);
1171 	}
1172 	g_object_unref (_data_->_async_result);
1173 	return FALSE;
1174 }
1175 
1176 
1177 static void unity_scope_proxy_remote_real_preview_data_free (gpointer _data) {
1178 	UnityScopeProxyRemotePreviewData* _data_;
1179 	_data_ = _data;
1180 	_g_free0 (_data_->uri);
1181 	unity_preview_reply_raw_destroy (&_data_->result);
1182 	_g_object_unref0 (_data_->self);
1183 	g_slice_free (UnityScopeProxyRemotePreviewData, _data_);
1184 }
1185 
1186 
1187 static void unity_scope_proxy_remote_real_preview (UnityScopeProxy* base, const gchar* uri, GAsyncReadyCallback _callback_, gpointer _user_data_) {
1188 	UnityScopeProxyRemote * self;
1189 	UnityScopeProxyRemotePreviewData* _data_;
1190 	UnityScopeProxyRemote* _tmp0_;
1191 	const gchar* _tmp1_;
1192 	gchar* _tmp2_;
1193 	self = (UnityScopeProxyRemote*) base;
1194 	_data_ = g_slice_new0 (UnityScopeProxyRemotePreviewData);
1195 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_preview);
1196 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_preview_data_free);
1197 	_tmp0_ = _g_object_ref0 (self);
1198 	_data_->self = _tmp0_;
1199 	_tmp1_ = uri;
1200 	_tmp2_ = g_strdup (_tmp1_);
1201 	_data_->uri = _tmp2_;
1202 	unity_scope_proxy_remote_real_preview_co (_data_);
1203 }
1204 
1205 
1206 static void unity_scope_proxy_remote_real_preview_finish (UnityScopeProxy* base, GAsyncResult* _res_, UnityPreviewReplyRaw* result) {
1207 	UnityScopeProxyRemotePreviewData* _data_;
1208 	UnityPreviewReplyRaw _tmp0_ = {0};
1209 	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
1210 	unity_preview_reply_raw_copy (&_data_->result, &_tmp0_);
1211 	*result = _tmp0_;
1212 }
1213 
1214 
1215 static void unity_scope_proxy_remote_preview_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
1216 	UnityScopeProxyRemotePreviewData* _data_;
1217 	_data_ = _user_data_;
1218 	_data_->_source_object_ = source_object;
1219 	_data_->_res_ = _res_;
1220 	unity_scope_proxy_remote_real_preview_co (_data_);
1221 }
1222 
1223 
1224 static gboolean unity_scope_proxy_remote_real_preview_co (UnityScopeProxyRemotePreviewData* _data_) {
1225 	switch (_data_->_state_) {
1226 		case 0:
1227 		goto _state_0;
1228 		case 1:
1229 		goto _state_1;
1230 		default:
1231 		g_assert_not_reached ();
1232 	}
1233 	_state_0:
1234 	_data_->_tmp0_ = _data_->self->priv->synchronized;
1235 	if (_data_->_tmp0_) {
1236 		{
1237 			_data_->_tmp1_ = _data_->self->priv->_service;
1238 			_data_->_tmp2_ = _data_->uri;
1239 			memset (&_data_->_tmp3_, 0, sizeof (UnityPreviewReplyRaw));
1240 			_data_->_state_ = 1;
1241 			unity_scope_service_preview (_data_->_tmp1_, _data_->_tmp2_, unity_scope_proxy_remote_preview_ready, _data_);
1242 			return FALSE;
1243 			_state_1:
1244 			unity_scope_service_preview_finish (_data_->_tmp1_, _data_->_res_, &_data_->_tmp3_, &_data_->_inner_error_);
1245 			_data_->raw = _data_->_tmp3_;
1246 			if (_data_->_inner_error_ != NULL) {
1247 				goto __catch28_g_error;
1248 			}
1249 			_data_->result = _data_->raw;
1250 			if (_data_->_state_ == 0) {
1251 				g_simple_async_result_complete_in_idle (_data_->_async_result);
1252 			} else {
1253 				g_simple_async_result_complete (_data_->_async_result);
1254 			}
1255 			g_object_unref (_data_->_async_result);
1256 			return FALSE;
1257 		}
1258 		goto __finally28;
1259 		__catch28_g_error:
1260 		{
1261 			_data_->e = _data_->_inner_error_;
1262 			_data_->_inner_error_ = NULL;
1263 			_data_->_tmp4_ = _data_->self->priv->_dbus_path;
1264 			_data_->_tmp5_ = NULL;
1265 			_data_->_tmp5_ = string_to_string (_data_->_tmp4_);
1266 			_data_->_tmp6_ = _data_->e;
1267 			_data_->_tmp7_ = _data_->_tmp6_->message;
1268 			_data_->_tmp8_ = NULL;
1269 			_data_->_tmp8_ = string_to_string (_data_->_tmp7_);
1270 			_data_->_tmp9_ = NULL;
1271 			_data_->_tmp9_ = g_strconcat ("Unable to search scope (", _data_->_tmp5_, "): ", _data_->_tmp8_, NULL);
1272 			_data_->_tmp10_ = _data_->_tmp9_;
1273 			g_warning ("unity-scope-proxy-remote.vala:215: %s", _data_->_tmp10_);
1274 			_g_free0 (_data_->_tmp10_);
1275 			_g_error_free0 (_data_->e);
1276 		}
1277 		__finally28:
1278 		if (_data_->_inner_error_ != NULL) {
1279 			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);
1280 			g_clear_error (&_data_->_inner_error_);
1281 			return FALSE;
1282 		}
1283 	}
1284 	memset (&_data_->_tmp11_, 0, sizeof (UnityPreviewReplyRaw));
1285 	memset (&_data_->_tmp11_, 0, sizeof (UnityPreviewReplyRaw));
1286 	_data_->result = _data_->_tmp11_;
1287 	if (_data_->_state_ == 0) {
1288 		g_simple_async_result_complete_in_idle (_data_->_async_result);
1289 	} else {
1290 		g_simple_async_result_complete (_data_->_async_result);
1291 	}
1292 	g_object_unref (_data_->_async_result);
1293 	return FALSE;
1294 	if (_data_->_state_ == 0) {
1295 		g_simple_async_result_complete_in_idle (_data_->_async_result);
1296 	} else {
1297 		g_simple_async_result_complete (_data_->_async_result);
1298 	}
1299 	g_object_unref (_data_->_async_result);
1300 	return FALSE;
1301 }
1302 
1303 
1304 static void unity_scope_proxy_remote_set_view_type_data_free (gpointer _data) {
1305 	UnityScopeProxyRemoteSetViewTypeData* _data_;
1306 	_data_ = _data;
1307 	_g_object_unref0 (_data_->self);
1308 	g_slice_free (UnityScopeProxyRemoteSetViewTypeData, _data_);
1309 }
1310 
1311 
1312 void unity_scope_proxy_remote_set_view_type (UnityScopeProxyRemote* self, UnityViewType view_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
1313 	UnityScopeProxyRemoteSetViewTypeData* _data_;
1314 	UnityScopeProxyRemote* _tmp0_;
1315 	UnityViewType _tmp1_;
1316 	_data_ = g_slice_new0 (UnityScopeProxyRemoteSetViewTypeData);
1317 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_set_view_type);
1318 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_set_view_type_data_free);
1319 	_tmp0_ = _g_object_ref0 (self);
1320 	_data_->self = _tmp0_;
1321 	_tmp1_ = view_type;
1322 	_data_->view_type = _tmp1_;
1323 	unity_scope_proxy_remote_set_view_type_co (_data_);
1324 }
1325 
1326 
1327 void unity_scope_proxy_remote_set_view_type_finish (UnityScopeProxyRemote* self, GAsyncResult* _res_) {
1328 	UnityScopeProxyRemoteSetViewTypeData* _data_;
1329 	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
1330 }
1331 
1332 
1333 static void unity_scope_proxy_remote_set_view_type_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
1334 	UnityScopeProxyRemoteSetViewTypeData* _data_;
1335 	_data_ = _user_data_;
1336 	_data_->_source_object_ = source_object;
1337 	_data_->_res_ = _res_;
1338 	unity_scope_proxy_remote_set_view_type_co (_data_);
1339 }
1340 
1341 
1342 static gboolean unity_scope_proxy_remote_set_view_type_co (UnityScopeProxyRemoteSetViewTypeData* _data_) {
1343 	switch (_data_->_state_) {
1344 		case 0:
1345 		goto _state_0;
1346 		case 1:
1347 		goto _state_1;
1348 		default:
1349 		g_assert_not_reached ();
1350 	}
1351 	_state_0:
1352 	_data_->_tmp0_ = _data_->view_type;
1353 	_data_->self->priv->_view_type = _data_->_tmp0_;
1354 	_data_->_tmp1_ = _data_->self->priv->synchronized;
1355 	if (_data_->_tmp1_) {
1356 		{
1357 			_data_->_tmp2_ = _data_->self->priv->_service;
1358 			_data_->_tmp3_ = _data_->view_type;
1359 			_data_->_state_ = 1;
1360 			unity_scope_service_set_view_type (_data_->_tmp2_, (guint) _data_->_tmp3_, unity_scope_proxy_remote_set_view_type_ready, _data_);
1361 			return FALSE;
1362 			_state_1:
1363 			unity_scope_service_set_view_type_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
1364 			if (_data_->_inner_error_ != NULL) {
1365 				goto __catch29_g_error;
1366 			}
1367 		}
1368 		goto __finally29;
1369 		__catch29_g_error:
1370 		{
1371 			_data_->e = _data_->_inner_error_;
1372 			_data_->_inner_error_ = NULL;
1373 			_data_->_tmp4_ = _data_->self->priv->_dbus_path;
1374 			_data_->_tmp5_ = NULL;
1375 			_data_->_tmp5_ = string_to_string (_data_->_tmp4_);
1376 			_data_->_tmp6_ = _data_->e;
1377 			_data_->_tmp7_ = _data_->_tmp6_->message;
1378 			_data_->_tmp8_ = NULL;
1379 			_data_->_tmp8_ = string_to_string (_data_->_tmp7_);
1380 			_data_->_tmp9_ = NULL;
1381 			_data_->_tmp9_ = g_strconcat ("Unable to set_active (", _data_->_tmp5_, "): ", _data_->_tmp8_, NULL);
1382 			_data_->_tmp10_ = _data_->_tmp9_;
1383 			g_warning ("unity-scope-proxy-remote.vala:230: %s", _data_->_tmp10_);
1384 			_g_free0 (_data_->_tmp10_);
1385 			_g_error_free0 (_data_->e);
1386 		}
1387 		__finally29:
1388 		if (_data_->_inner_error_ != NULL) {
1389 			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);
1390 			g_clear_error (&_data_->_inner_error_);
1391 			return FALSE;
1392 		}
1393 	}
1394 	if (_data_->_state_ == 0) {
1395 		g_simple_async_result_complete_in_idle (_data_->_async_result);
1396 	} else {
1397 		g_simple_async_result_complete (_data_->_async_result);
1398 	}
1399 	g_object_unref (_data_->_async_result);
1400 	return FALSE;
1401 }
1402 
1403 
1404 static void unity_scope_proxy_remote_real_set_active_sources_data_free (gpointer _data) {
1405 	UnityScopeProxyRemoteSetActiveSourcesData* _data_;
1406 	_data_ = _data;
1407 	_data_->sources = (_vala_array_free (_data_->sources, _data_->sources_length1, (GDestroyNotify) g_free), NULL);
1408 	_g_object_unref0 (_data_->self);
1409 	g_slice_free (UnityScopeProxyRemoteSetActiveSourcesData, _data_);
1410 }
1411 
1412 
1413 static gchar** _vala_array_dup6 (gchar** self, int length) {
1414 	gchar** result;
1415 	int i;
1416 	result = g_new0 (gchar*, length + 1);
1417 	for (i = 0; i < length; i++) {
1418 		gchar* _tmp0_;
1419 		_tmp0_ = g_strdup (self[i]);
1420 		result[i] = _tmp0_;
1421 	}
1422 	return result;
1423 }
1424 
1425 
1426 static void unity_scope_proxy_remote_real_set_active_sources (UnityScopeProxy* base, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_) {
1427 	UnityScopeProxyRemote * self;
1428 	UnityScopeProxyRemoteSetActiveSourcesData* _data_;
1429 	UnityScopeProxyRemote* _tmp0_;
1430 	gchar** _tmp1_;
1431 	gint _tmp1__length1;
1432 	gchar** _tmp2_;
1433 	gint _tmp2__length1;
1434 	self = (UnityScopeProxyRemote*) base;
1435 	_data_ = g_slice_new0 (UnityScopeProxyRemoteSetActiveSourcesData);
1436 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_proxy_remote_real_set_active_sources);
1437 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_proxy_remote_real_set_active_sources_data_free);
1438 	_tmp0_ = _g_object_ref0 (self);
1439 	_data_->self = _tmp0_;
1440 	_tmp1_ = sources;
1441 	_tmp1__length1 = sources_length1;
1442 	_tmp2_ = (_tmp1_ != NULL) ? _vala_array_dup6 (_tmp1_, _tmp1__length1) : ((gpointer) _tmp1_);
1443 	_tmp2__length1 = _tmp1__length1;
1444 	_data_->sources = _tmp2_;
1445 	_data_->sources_length1 = _tmp2__length1;
1446 	unity_scope_proxy_remote_real_set_active_sources_co (_data_);
1447 }
1448 
1449 
1450 static void unity_scope_proxy_remote_real_set_active_sources_finish (UnityScopeProxy* base, GAsyncResult* _res_) {
1451 	UnityScopeProxyRemoteSetActiveSourcesData* _data_;
1452 	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
1453 }
1454 
1455 
1456 static void unity_scope_proxy_remote_set_active_sources_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
1457 	UnityScopeProxyRemoteSetActiveSourcesData* _data_;
1458 	_data_ = _user_data_;
1459 	_data_->_source_object_ = source_object;
1460 	_data_->_res_ = _res_;
1461 	unity_scope_proxy_remote_real_set_active_sources_co (_data_);
1462 }
1463 
1464 
1465 static gboolean unity_scope_proxy_remote_real_set_active_sources_co (UnityScopeProxyRemoteSetActiveSourcesData* _data_) {
1466 	switch (_data_->_state_) {
1467 		case 0:
1468 		goto _state_0;
1469 		case 1:
1470 		goto _state_1;
1471 		default:
1472 		g_assert_not_reached ();
1473 	}
1474 	_state_0:
1475 	_data_->_tmp0_ = _data_->self->priv->synchronized;
1476 	if (_data_->_tmp0_) {
1477 		{
1478 			_data_->_tmp1_ = _data_->self->priv->_service;
1479 			_data_->_tmp2_ = _data_->sources;
1480 			_data_->_tmp2__length1 = _data_->sources_length1;
1481 			_data_->_state_ = 1;
1482 			unity_scope_service_set_active_sources (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp2__length1, unity_scope_proxy_remote_set_active_sources_ready, _data_);
1483 			return FALSE;
1484 			_state_1:
1485 			unity_scope_service_set_active_sources_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
1486 			if (_data_->_inner_error_ != NULL) {
1487 				goto __catch30_g_error;
1488 			}
1489 		}
1490 		goto __finally30;
1491 		__catch30_g_error:
1492 		{
1493 			_data_->e = _data_->_inner_error_;
1494 			_data_->_inner_error_ = NULL;
1495 			_data_->_tmp3_ = _data_->self->priv->_dbus_path;
1496 			_data_->_tmp4_ = NULL;
1497 			_data_->_tmp4_ = string_to_string (_data_->_tmp3_);
1498 			_data_->_tmp5_ = _data_->e;
1499 			_data_->_tmp6_ = _data_->_tmp5_->message;
1500 			_data_->_tmp7_ = NULL;
1501 			_data_->_tmp7_ = string_to_string (_data_->_tmp6_);
1502 			_data_->_tmp8_ = NULL;
1503 			_data_->_tmp8_ = g_strconcat ("Unable to set_sources (", _data_->_tmp4_, "): ", _data_->_tmp7_, NULL);
1504 			_data_->_tmp9_ = _data_->_tmp8_;
1505 			g_warning ("unity-scope-proxy-remote.vala:242: %s", _data_->_tmp9_);
1506 			_g_free0 (_data_->_tmp9_);
1507 			_g_error_free0 (_data_->e);
1508 		}
1509 		__finally30:
1510 		if (_data_->_inner_error_ != NULL) {
1511 			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);
1512 			g_clear_error (&_data_->_inner_error_);
1513 			return FALSE;
1514 		}
1515 	}
1516 	if (_data_->_state_ == 0) {
1517 		g_simple_async_result_complete_in_idle (_data_->_async_result);
1518 	} else {
1519 		g_simple_async_result_complete (_data_->_async_result);
1520 	}
1521 	g_object_unref (_data_->_async_result);
1522 	return FALSE;
1523 }
1524 
1525 
1526 void unity_scope_proxy_remote_on_changed (UnityScopeProxyRemote* self, UnityScopeInfo* scope_info) {
1527 	const gchar* _tmp0_;
1528 	UnityScopeInfo _tmp1_;
1529 	const gchar* _tmp2_;
1530 	const gchar* _tmp10_;
1531 	UnityScopeInfo _tmp11_;
1532 	gboolean _tmp12_;
1533 	gboolean _tmp13_ = FALSE;
1534 	DeeSerializableModel* _tmp14_;
1535 	DeeSerializableModel* _tmp15_;
1536 	gboolean _tmp20_;
1537 	gboolean _tmp27_ = FALSE;
1538 	DeeSerializableModel* _tmp28_;
1539 	DeeSerializableModel* _tmp29_;
1540 	gboolean _tmp34_;
1541 	gboolean _tmp41_ = FALSE;
1542 	DeeSerializableModel* _tmp42_;
1543 	DeeSerializableModel* _tmp43_;
1544 	gboolean _tmp48_;
1545 	UnityOptionsFilter* _tmp55_;
1546 	UnityOptionsFilter* _tmp56_;
1547 	UnityScopeInfo _tmp57_;
1548 	GVariant* _tmp58_;
1549 	gboolean _tmp59_;
1550 	g_return_if_fail (self != NULL);
1551 	g_return_if_fail (scope_info != NULL);
1552 	_tmp0_ = self->priv->_dbus_path;
1553 	_tmp1_ = *scope_info;
1554 	_tmp2_ = _tmp1_.dbus_path;
1555 	if (g_strcmp0 (_tmp0_, _tmp2_) != 0) {
1556 		const gchar* _tmp3_;
1557 		const gchar* _tmp4_ = NULL;
1558 		UnityScopeInfo _tmp5_;
1559 		const gchar* _tmp6_;
1560 		const gchar* _tmp7_ = NULL;
1561 		gchar* _tmp8_ = NULL;
1562 		gchar* _tmp9_;
1563 		_tmp3_ = self->priv->_dbus_path;
1564 		_tmp4_ = string_to_string (_tmp3_);
1565 		_tmp5_ = *scope_info;
1566 		_tmp6_ = _tmp5_.dbus_path;
1567 		_tmp7_ = string_to_string (_tmp6_);
1568 		_tmp8_ = g_strconcat ("Unable to handle Scope changed signal: dbus_path mismatch. Expected ", _tmp4_, " got ", _tmp7_, NULL);
1569 		_tmp9_ = _tmp8_;
1570 		g_warning ("unity-scope-proxy-remote.vala:252: %s", _tmp9_);
1571 		_g_free0 (_tmp9_);
1572 		return;
1573 	}
1574 	_tmp10_ = self->priv->_dbus_path;
1575 	unity_trace_log_object ((GObject*) self, "Processing changed signal for %s", _tmp10_);
1576 	_tmp11_ = *scope_info;
1577 	_tmp12_ = _tmp11_.search_in_global;
1578 	unity_scope_proxy_set_search_in_global ((UnityScopeProxy*) self, _tmp12_);
1579 	_tmp14_ = unity_scope_proxy_get_results_model ((UnityScopeProxy*) self);
1580 	_tmp15_ = _tmp14_;
1581 	if (_tmp15_ == NULL) {
1582 		_tmp13_ = TRUE;
1583 	} else {
1584 		DeeSharedModel* _tmp16_;
1585 		const gchar* _tmp17_ = NULL;
1586 		UnityScopeInfo _tmp18_;
1587 		const gchar* _tmp19_;
1588 		_tmp16_ = self->priv->_results_model;
1589 		_tmp17_ = dee_shared_model_get_swarm_name (_tmp16_);
1590 		_tmp18_ = *scope_info;
1591 		_tmp19_ = _tmp18_.results_model_name;
1592 		_tmp13_ = g_strcmp0 (_tmp17_, _tmp19_) != 0;
1593 	}
1594 	_tmp20_ = _tmp13_;
1595 	if (_tmp20_) {
1596 		UnityScopeInfo _tmp21_;
1597 		const gchar* _tmp22_;
1598 		DeeSharedModel* _tmp23_;
1599 		DeeSharedModel* _tmp24_;
1600 		DeeSerializableModel* _tmp25_;
1601 		DeeSerializableModel* _tmp26_;
1602 		_tmp21_ = *scope_info;
1603 		_tmp22_ = _tmp21_.results_model_name;
1604 		_tmp23_ = (DeeSharedModel*) dee_shared_model_new (_tmp22_);
1605 		_tmp24_ = _tmp23_;
1606 		unity_scope_proxy_set_results_model ((UnityScopeProxy*) self, (DeeSerializableModel*) _tmp24_);
1607 		_g_object_unref0 (_tmp24_);
1608 		_tmp25_ = unity_scope_proxy_get_results_model ((UnityScopeProxy*) self);
1609 		_tmp26_ = _tmp25_;
1610 		dee_model_set_schema ((DeeModel*) _tmp26_, "s", "s", "u", "s", "s", "s", "s", NULL);
1611 	}
1612 	_tmp28_ = unity_scope_proxy_get_global_results_model ((UnityScopeProxy*) self);
1613 	_tmp29_ = _tmp28_;
1614 	if (_tmp29_ == NULL) {
1615 		_tmp27_ = TRUE;
1616 	} else {
1617 		DeeSharedModel* _tmp30_;
1618 		const gchar* _tmp31_ = NULL;
1619 		UnityScopeInfo _tmp32_;
1620 		const gchar* _tmp33_;
1621 		_tmp30_ = self->priv->_global_results_model;
1622 		_tmp31_ = dee_shared_model_get_swarm_name (_tmp30_);
1623 		_tmp32_ = *scope_info;
1624 		_tmp33_ = _tmp32_.global_results_model_name;
1625 		_tmp27_ = g_strcmp0 (_tmp31_, _tmp33_) != 0;
1626 	}
1627 	_tmp34_ = _tmp27_;
1628 	if (_tmp34_) {
1629 		UnityScopeInfo _tmp35_;
1630 		const gchar* _tmp36_;
1631 		DeeSharedModel* _tmp37_;
1632 		DeeSharedModel* _tmp38_;
1633 		DeeSerializableModel* _tmp39_;
1634 		DeeSerializableModel* _tmp40_;
1635 		_tmp35_ = *scope_info;
1636 		_tmp36_ = _tmp35_.global_results_model_name;
1637 		_tmp37_ = (DeeSharedModel*) dee_shared_model_new (_tmp36_);
1638 		_tmp38_ = _tmp37_;
1639 		unity_scope_proxy_set_global_results_model ((UnityScopeProxy*) self, (DeeSerializableModel*) _tmp38_);
1640 		_g_object_unref0 (_tmp38_);
1641 		_tmp39_ = unity_scope_proxy_get_global_results_model ((UnityScopeProxy*) self);
1642 		_tmp40_ = _tmp39_;
1643 		dee_model_set_schema ((DeeModel*) _tmp40_, "s", "s", "u", "s", "s", "s", "s", NULL);
1644 	}
1645 	_tmp42_ = unity_scope_proxy_get_filters_model ((UnityScopeProxy*) self);
1646 	_tmp43_ = _tmp42_;
1647 	if (_tmp43_ == NULL) {
1648 		_tmp41_ = TRUE;
1649 	} else {
1650 		DeeSharedModel* _tmp44_;
1651 		const gchar* _tmp45_ = NULL;
1652 		UnityScopeInfo _tmp46_;
1653 		const gchar* _tmp47_;
1654 		_tmp44_ = self->priv->_filters_model;
1655 		_tmp45_ = dee_shared_model_get_swarm_name (_tmp44_);
1656 		_tmp46_ = *scope_info;
1657 		_tmp47_ = _tmp46_.filters_model_name;
1658 		_tmp41_ = g_strcmp0 (_tmp45_, _tmp47_) != 0;
1659 	}
1660 	_tmp48_ = _tmp41_;
1661 	if (_tmp48_) {
1662 		UnityScopeInfo _tmp49_;
1663 		const gchar* _tmp50_;
1664 		DeeSharedModel* _tmp51_;
1665 		DeeSharedModel* _tmp52_;
1666 		DeeSerializableModel* _tmp53_;
1667 		DeeSerializableModel* _tmp54_;
1668 		_tmp49_ = *scope_info;
1669 		_tmp50_ = _tmp49_.filters_model_name;
1670 		_tmp51_ = (DeeSharedModel*) dee_shared_model_new (_tmp50_);
1671 		_tmp52_ = _tmp51_;
1672 		unity_scope_proxy_set_filters_model ((UnityScopeProxy*) self, (DeeSerializableModel*) _tmp52_);
1673 		_g_object_unref0 (_tmp52_);
1674 		_tmp53_ = unity_scope_proxy_get_filters_model ((UnityScopeProxy*) self);
1675 		_tmp54_ = _tmp53_;
1676 		dee_model_set_schema ((DeeModel*) _tmp54_, "s", "s", "s", "s", "a{sv}", "b", "b", "b", NULL);
1677 	}
1678 	_tmp55_ = unity_scope_proxy_get_sources ((UnityScopeProxy*) self);
1679 	_tmp56_ = _tmp55_;
1680 	_tmp57_ = *scope_info;
1681 	_tmp58_ = _tmp57_.sources;
1682 	unity_filter_update ((UnityFilter*) _tmp56_, _tmp58_);
1683 	g_object_notify ((GObject*) self, "sources");
1684 	_tmp59_ = self->priv->synchronized;
1685 	if (!_tmp59_) {
1686 		UnityViewType _tmp60_;
1687 		self->priv->synchronized = TRUE;
1688 		_tmp60_ = self->priv->_view_type;
1689 		unity_scope_proxy_remote_set_view_type (self, _tmp60_, NULL, NULL);
1690 	}
1691 }
1692 
1693 
1694 const gchar* unity_scope_proxy_remote_get_dbus_name (UnityScopeProxyRemote* self) {
1695 	const gchar* result;
1696 	const gchar* _tmp0_;
1697 	g_return_val_if_fail (self != NULL, NULL);
1698 	_tmp0_ = self->priv->_dbus_name;
1699 	result = _tmp0_;
1700 	return result;
1701 }
1702 
1703 
1704 static void unity_scope_proxy_remote_set_dbus_name (UnityScopeProxyRemote* self, const gchar* value) {
1705 	const gchar* _tmp0_;
1706 	gchar* _tmp1_;
1707 	g_return_if_fail (self != NULL);
1708 	_tmp0_ = value;
1709 	_tmp1_ = g_strdup (_tmp0_);
1710 	_g_free0 (self->priv->_dbus_name);
1711 	self->priv->_dbus_name = _tmp1_;
1712 	g_object_notify ((GObject *) self, "dbus-name");
1713 }
1714 
1715 
1716 const gchar* unity_scope_proxy_remote_get_dbus_path (UnityScopeProxyRemote* self) {
1717 	const gchar* result;
1718 	const gchar* _tmp0_;
1719 	g_return_val_if_fail (self != NULL, NULL);
1720 	_tmp0_ = self->priv->_dbus_path;
1721 	result = _tmp0_;
1722 	return result;
1723 }
1724 
1725 
1726 static void unity_scope_proxy_remote_set_dbus_path (UnityScopeProxyRemote* self, const gchar* value) {
1727 	const gchar* _tmp0_;
1728 	gchar* _tmp1_;
1729 	g_return_if_fail (self != NULL);
1730 	_tmp0_ = value;
1731 	_tmp1_ = g_strdup (_tmp0_);
1732 	_g_free0 (self->priv->_dbus_path);
1733 	self->priv->_dbus_path = _tmp1_;
1734 	g_object_notify ((GObject *) self, "dbus-path");
1735 }
1736 
1737 
1738 static UnityOptionsFilter* unity_scope_proxy_remote_real_get_sources (UnityScopeProxy* base) {
1739 	UnityOptionsFilter* result;
1740 	UnityScopeProxyRemote* self;
1741 	UnityOptionsFilter* _tmp0_;
1742 	self = (UnityScopeProxyRemote*) base;
1743 	_tmp0_ = self->priv->_sources;
1744 	result = _tmp0_;
1745 	return result;
1746 }
1747 
1748 
1749 static void unity_scope_proxy_remote_real_set_sources (UnityScopeProxy* base, UnityOptionsFilter* value) {
1750 	UnityScopeProxyRemote* self;
1751 	UnityOptionsFilter* _tmp0_;
1752 	UnityOptionsFilter* _tmp1_;
1753 	self = (UnityScopeProxyRemote*) base;
1754 	_tmp0_ = value;
1755 	_tmp1_ = _g_object_ref0 (_tmp0_);
1756 	_g_object_unref0 (self->priv->_sources);
1757 	self->priv->_sources = _tmp1_;
1758 	g_object_notify ((GObject *) self, "sources");
1759 }
1760 
1761 
1762 static gboolean unity_scope_proxy_remote_real_get_search_in_global (UnityScopeProxy* base) {
1763 	gboolean result;
1764 	UnityScopeProxyRemote* self;
1765 	gboolean _tmp0_;
1766 	self = (UnityScopeProxyRemote*) base;
1767 	_tmp0_ = self->priv->_search_in_global;
1768 	result = _tmp0_;
1769 	return result;
1770 }
1771 
1772 
1773 static void unity_scope_proxy_remote_real_set_search_in_global (UnityScopeProxy* base, gboolean value) {
1774 	UnityScopeProxyRemote* self;
1775 	gboolean _tmp0_;
1776 	self = (UnityScopeProxyRemote*) base;
1777 	_tmp0_ = value;
1778 	self->priv->_search_in_global = _tmp0_;
1779 	g_object_notify ((GObject *) self, "search-in-global");
1780 }
1781 
1782 
1783 static DeeSerializableModel* unity_scope_proxy_remote_real_get_results_model (UnityScopeProxy* base) {
1784 	DeeSerializableModel* result;
1785 	UnityScopeProxyRemote* self;
1786 	DeeSharedModel* _tmp0_;
1787 	self = (UnityScopeProxyRemote*) base;
1788 	_tmp0_ = self->priv->_results_model;
1789 	result = (DeeSerializableModel*) _tmp0_;
1790 	return result;
1791 }
1792 
1793 
1794 static void unity_scope_proxy_remote_real_set_results_model (UnityScopeProxy* base, DeeSerializableModel* value) {
1795 	UnityScopeProxyRemote* self;
1796 	DeeSerializableModel* _tmp0_;
1797 	DeeSharedModel* _tmp1_;
1798 	self = (UnityScopeProxyRemote*) base;
1799 	_tmp0_ = value;
1800 	_tmp1_ = _g_object_ref0 (DEE_IS_SHARED_MODEL (_tmp0_) ? ((DeeSharedModel*) _tmp0_) : NULL);
1801 	_g_object_unref0 (self->priv->_results_model);
1802 	self->priv->_results_model = _tmp1_;
1803 	g_object_notify ((GObject *) self, "results-model");
1804 }
1805 
1806 
1807 static DeeSerializableModel* unity_scope_proxy_remote_real_get_global_results_model (UnityScopeProxy* base) {
1808 	DeeSerializableModel* result;
1809 	UnityScopeProxyRemote* self;
1810 	DeeSharedModel* _tmp0_;
1811 	self = (UnityScopeProxyRemote*) base;
1812 	_tmp0_ = self->priv->_global_results_model;
1813 	result = (DeeSerializableModel*) _tmp0_;
1814 	return result;
1815 }
1816 
1817 
1818 static void unity_scope_proxy_remote_real_set_global_results_model (UnityScopeProxy* base, DeeSerializableModel* value) {
1819 	UnityScopeProxyRemote* self;
1820 	DeeSerializableModel* _tmp0_;
1821 	DeeSharedModel* _tmp1_;
1822 	self = (UnityScopeProxyRemote*) base;
1823 	_tmp0_ = value;
1824 	_tmp1_ = _g_object_ref0 (DEE_IS_SHARED_MODEL (_tmp0_) ? ((DeeSharedModel*) _tmp0_) : NULL);
1825 	_g_object_unref0 (self->priv->_global_results_model);
1826 	self->priv->_global_results_model = _tmp1_;
1827 	g_object_notify ((GObject *) self, "global-results-model");
1828 }
1829 
1830 
1831 static DeeSerializableModel* unity_scope_proxy_remote_real_get_filters_model (UnityScopeProxy* base) {
1832 	DeeSerializableModel* result;
1833 	UnityScopeProxyRemote* self;
1834 	DeeSharedModel* _tmp0_;
1835 	self = (UnityScopeProxyRemote*) base;
1836 	_tmp0_ = self->priv->_filters_model;
1837 	result = (DeeSerializableModel*) _tmp0_;
1838 	return result;
1839 }
1840 
1841 
1842 static void unity_scope_proxy_remote_real_set_filters_model (UnityScopeProxy* base, DeeSerializableModel* value) {
1843 	UnityScopeProxyRemote* self;
1844 	DeeSerializableModel* _tmp0_;
1845 	DeeSharedModel* _tmp1_;
1846 	self = (UnityScopeProxyRemote*) base;
1847 	_tmp0_ = value;
1848 	_tmp1_ = _g_object_ref0 (DEE_IS_SHARED_MODEL (_tmp0_) ? ((DeeSharedModel*) _tmp0_) : NULL);
1849 	_g_object_unref0 (self->priv->_filters_model);
1850 	self->priv->_filters_model = _tmp1_;
1851 	g_object_notify ((GObject *) self, "filters-model");
1852 }
1853 
1854 
1855 static UnityViewType unity_scope_proxy_remote_real_get_view_type (UnityScopeProxy* base) {
1856 	UnityViewType result;
1857 	UnityScopeProxyRemote* self;
1858 	UnityViewType _tmp0_;
1859 	self = (UnityScopeProxyRemote*) base;
1860 	_tmp0_ = self->priv->_view_type;
1861 	result = _tmp0_;
1862 	return result;
1863 }
1864 
1865 
1866 static void unity_scope_proxy_remote_real_set_view_type (UnityScopeProxy* base, UnityViewType value) {
1867 	UnityScopeProxyRemote* self;
1868 	UnityViewType _tmp0_;
1869 	UnityViewType _tmp1_;
1870 	self = (UnityScopeProxyRemote*) base;
1871 	_tmp0_ = self->priv->_view_type;
1872 	_tmp1_ = value;
1873 	if (_tmp0_ != _tmp1_) {
1874 		UnityViewType _tmp2_;
1875 		_tmp2_ = value;
1876 		unity_scope_proxy_remote_set_view_type (self, _tmp2_, NULL, NULL);
1877 	}
1878 	g_object_notify ((GObject *) self, "view-type");
1879 }
1880 
1881 
1882 static void _unity_scope_proxy_remote_on_scope_appeared_gbus_name_appeared_callback (GDBusConnection* connection, const gchar* name, const gchar* name_owner, gpointer self) {
1883 	unity_scope_proxy_remote_on_scope_appeared (self, connection, name, name_owner);
1884 }
1885 
1886 
1887 static void _unity_scope_proxy_remote_on_scope_vanished_gbus_name_vanished_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
1888 	unity_scope_proxy_remote_on_scope_vanished (self, connection, name);
1889 }
1890 
1891 
1892 static GObject * unity_scope_proxy_remote_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
1893 	GObject * obj;
1894 	GObjectClass * parent_class;
1895 	UnityScopeProxyRemote * self;
1896 	UnityCheckOptionFilter* _tmp0_;
1897 	UnityCheckOptionFilter* _tmp1_;
1898 	GError * _inner_error_ = NULL;
1899 	parent_class = G_OBJECT_CLASS (unity_scope_proxy_remote_parent_class);
1900 	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
1901 	self = UNITY_SCOPE_PROXY_REMOTE (obj);
1902 	_tmp0_ = unity_check_option_filter_new ("sources", "Sources", NULL, TRUE);
1903 	_tmp1_ = _tmp0_;
1904 	unity_scope_proxy_set_sources ((UnityScopeProxy*) self, (UnityOptionsFilter*) _tmp1_);
1905 	_g_object_unref0 (_tmp1_);
1906 	{
1907 		GDBusConnection* _tmp2_ = NULL;
1908 		GDBusConnection* _tmp3_;
1909 		GDBusConnection* _tmp4_;
1910 		const gchar* _tmp5_;
1911 		guint _tmp6_ = 0U;
1912 		_tmp2_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
1913 		_tmp3_ = _tmp2_;
1914 		if (_inner_error_ != NULL) {
1915 			goto __catch31_g_error;
1916 		}
1917 		_g_object_unref0 (self->priv->_bus);
1918 		self->priv->_bus = _tmp3_;
1919 		_tmp4_ = self->priv->_bus;
1920 		_tmp5_ = self->priv->_dbus_name;
1921 		_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)));
1922 		self->priv->_watcher = _tmp6_;
1923 		unity_scope_proxy_remote_start_reconnection_timeout (self);
1924 	}
1925 	goto __finally31;
1926 	__catch31_g_error:
1927 	{
1928 		GError* e = NULL;
1929 		GError* _tmp7_;
1930 		const gchar* _tmp8_;
1931 		const gchar* _tmp9_ = NULL;
1932 		gchar* _tmp10_ = NULL;
1933 		gchar* _tmp11_;
1934 		e = _inner_error_;
1935 		_inner_error_ = NULL;
1936 		_tmp7_ = e;
1937 		_tmp8_ = _tmp7_->message;
1938 		_tmp9_ = string_to_string (_tmp8_);
1939 		_tmp10_ = g_strconcat ("Unable to connect to session bus: ", _tmp9_, NULL);
1940 		_tmp11_ = _tmp10_;
1941 		g_critical ("unity-scope-proxy-remote.vala:92: %s", _tmp11_);
1942 		_g_free0 (_tmp11_);
1943 		_g_error_free0 (e);
1944 	}
1945 	__finally31:
1946 	if (_inner_error_ != NULL) {
1947 		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);
1948 		g_clear_error (&_inner_error_);
1949 	}
1950 	return obj;
1951 }
1952 
1953 
1954 static void unity_scope_proxy_remote_class_init (UnityScopeProxyRemoteClass * klass) {
1955 	unity_scope_proxy_remote_parent_class = g_type_class_peek_parent (klass);
1956 	g_type_class_add_private (klass, sizeof (UnityScopeProxyRemotePrivate));
1957 	G_OBJECT_CLASS (klass)->get_property = _vala_unity_scope_proxy_remote_get_property;
1958 	G_OBJECT_CLASS (klass)->set_property = _vala_unity_scope_proxy_remote_set_property;
1959 	G_OBJECT_CLASS (klass)->constructor = unity_scope_proxy_remote_constructor;
1960 	G_OBJECT_CLASS (klass)->finalize = unity_scope_proxy_remote_finalize;
1961 	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));
1962 	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));
1963 	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));
1964 	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));
1965 	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));
1966 	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));
1967 	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));
1968 	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_TYPE_VIEW_TYPE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
1969 }
1970 
1971 
1972 static void unity_scope_proxy_remote_unity_scope_proxy_interface_init (UnityScopeProxyIface * iface) {
1973 	unity_scope_proxy_remote_unity_scope_proxy_parent_iface = g_type_interface_peek_parent (iface);
1974 	iface->activate = (void (*)(UnityScopeProxy*, const gchar*, guint, UnityActivationReplyRaw*)) unity_scope_proxy_remote_real_activate;
1975 	iface->activate_finish = unity_scope_proxy_remote_real_activate_finish;
1976 	iface->search = (GHashTable* (*)(UnityScopeProxy*, const gchar*, GHashTable*)) unity_scope_proxy_remote_real_search;
1977 	iface->search_finish = unity_scope_proxy_remote_real_search_finish;
1978 	iface->global_search = (GHashTable* (*)(UnityScopeProxy*, const gchar*, GHashTable*)) unity_scope_proxy_remote_real_global_search;
1979 	iface->global_search_finish = unity_scope_proxy_remote_real_global_search_finish;
1980 	iface->preview = (void (*)(UnityScopeProxy*, const gchar*, UnityPreviewReplyRaw*)) unity_scope_proxy_remote_real_preview;
1981 	iface->preview_finish = unity_scope_proxy_remote_real_preview_finish;
1982 	iface->set_active_sources = (void (*)(UnityScopeProxy*, gchar**, int)) unity_scope_proxy_remote_real_set_active_sources;
1983 	iface->set_active_sources_finish = unity_scope_proxy_remote_real_set_active_sources_finish;
1984 	iface->get_sources = unity_scope_proxy_remote_real_get_sources;
1985 	iface->set_sources = unity_scope_proxy_remote_real_set_sources;
1986 	iface->get_search_in_global = unity_scope_proxy_remote_real_get_search_in_global;
1987 	iface->set_search_in_global = unity_scope_proxy_remote_real_set_search_in_global;
1988 	iface->get_results_model = unity_scope_proxy_remote_real_get_results_model;
1989 	iface->set_results_model = unity_scope_proxy_remote_real_set_results_model;
1990 	iface->get_global_results_model = unity_scope_proxy_remote_real_get_global_results_model;
1991 	iface->set_global_results_model = unity_scope_proxy_remote_real_set_global_results_model;
1992 	iface->get_filters_model = unity_scope_proxy_remote_real_get_filters_model;
1993 	iface->set_filters_model = unity_scope_proxy_remote_real_set_filters_model;
1994 	iface->get_view_type = unity_scope_proxy_remote_real_get_view_type;
1995 	iface->set_view_type = unity_scope_proxy_remote_real_set_view_type;
1996 }
1997 
1998 
1999 static void unity_scope_proxy_remote_instance_init (UnityScopeProxyRemote * self) {
2000 	self->priv = UNITY_SCOPE_PROXY_REMOTE_GET_PRIVATE (self);
2001 	self->priv->_reconnection_id = (guint) 0;
2002 	self->priv->synchronized = FALSE;
2003 }
2004 
2005 
2006 static void unity_scope_proxy_remote_finalize (GObject* obj) {
2007 	UnityScopeProxyRemote * self;
2008 	self = UNITY_SCOPE_PROXY_REMOTE (obj);
2009 	_g_free0 (self->priv->_dbus_name);
2010 	_g_free0 (self->priv->_dbus_path);
2011 	_g_object_unref0 (self->priv->_sources);
2012 	_g_object_unref0 (self->priv->_bus);
2013 	_g_object_unref0 (self->priv->_service);
2014 	_g_object_unref0 (self->priv->_results_model);
2015 	_g_object_unref0 (self->priv->_global_results_model);
2016 	_g_object_unref0 (self->priv->_filters_model);
2017 	G_OBJECT_CLASS (unity_scope_proxy_remote_parent_class)->finalize (obj);
2018 }
2019 
2020 
2021 GType unity_scope_proxy_remote_get_type (void) {
2022 	static volatile gsize unity_scope_proxy_remote_type_id__volatile = 0;
2023 	if (g_once_init_enter (&unity_scope_proxy_remote_type_id__volatile)) {
2024 		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 };
2025 		static const GInterfaceInfo unity_scope_proxy_info = { (GInterfaceInitFunc) unity_scope_proxy_remote_unity_scope_proxy_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
2026 		GType unity_scope_proxy_remote_type_id;
2027 		unity_scope_proxy_remote_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityScopeProxyRemote", &g_define_type_info, 0);
2028 		g_type_add_interface_static (unity_scope_proxy_remote_type_id, UNITY_TYPE_SCOPE_PROXY, &unity_scope_proxy_info);
2029 		g_once_init_leave (&unity_scope_proxy_remote_type_id__volatile, unity_scope_proxy_remote_type_id);
2030 	}
2031 	return unity_scope_proxy_remote_type_id__volatile;
2032 }
2033 
2034 
2035 static void _vala_unity_scope_proxy_remote_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
2036 	UnityScopeProxyRemote * self;
2037 	self = UNITY_SCOPE_PROXY_REMOTE (object);
2038 	switch (property_id) {
2039 		case UNITY_SCOPE_PROXY_REMOTE_DBUS_NAME:
2040 		g_value_set_string (value, unity_scope_proxy_remote_get_dbus_name (self));
2041 		break;
2042 		case UNITY_SCOPE_PROXY_REMOTE_DBUS_PATH:
2043 		g_value_set_string (value, unity_scope_proxy_remote_get_dbus_path (self));
2044 		break;
2045 		case UNITY_SCOPE_PROXY_REMOTE_SOURCES:
2046 		g_value_set_object (value, unity_scope_proxy_get_sources ((UnityScopeProxy*) self));
2047 		break;
2048 		case UNITY_SCOPE_PROXY_REMOTE_SEARCH_IN_GLOBAL:
2049 		g_value_set_boolean (value, unity_scope_proxy_get_search_in_global ((UnityScopeProxy*) self));
2050 		break;
2051 		case UNITY_SCOPE_PROXY_REMOTE_RESULTS_MODEL:
2052 		g_value_set_object (value, unity_scope_proxy_get_results_model ((UnityScopeProxy*) self));
2053 		break;
2054 		case UNITY_SCOPE_PROXY_REMOTE_GLOBAL_RESULTS_MODEL:
2055 		g_value_set_object (value, unity_scope_proxy_get_global_results_model ((UnityScopeProxy*) self));
2056 		break;
2057 		case UNITY_SCOPE_PROXY_REMOTE_FILTERS_MODEL:
2058 		g_value_set_object (value, unity_scope_proxy_get_filters_model ((UnityScopeProxy*) self));
2059 		break;
2060 		case UNITY_SCOPE_PROXY_REMOTE_VIEW_TYPE:
2061 		g_value_set_enum (value, unity_scope_proxy_get_view_type ((UnityScopeProxy*) self));
2062 		break;
2063 		default:
2064 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
2065 		break;
2066 	}
2067 }
2068 
2069 
2070 static void _vala_unity_scope_proxy_remote_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
2071 	UnityScopeProxyRemote * self;
2072 	self = UNITY_SCOPE_PROXY_REMOTE (object);
2073 	switch (property_id) {
2074 		case UNITY_SCOPE_PROXY_REMOTE_DBUS_NAME:
2075 		unity_scope_proxy_remote_set_dbus_name (self, g_value_get_string (value));
2076 		break;
2077 		case UNITY_SCOPE_PROXY_REMOTE_DBUS_PATH:
2078 		unity_scope_proxy_remote_set_dbus_path (self, g_value_get_string (value));
2079 		break;
2080 		case UNITY_SCOPE_PROXY_REMOTE_SOURCES:
2081 		unity_scope_proxy_set_sources ((UnityScopeProxy*) self, g_value_get_object (value));
2082 		break;
2083 		case UNITY_SCOPE_PROXY_REMOTE_SEARCH_IN_GLOBAL:
2084 		unity_scope_proxy_set_search_in_global ((UnityScopeProxy*) self, g_value_get_boolean (value));
2085 		break;
2086 		case UNITY_SCOPE_PROXY_REMOTE_RESULTS_MODEL:
2087 		unity_scope_proxy_set_results_model ((UnityScopeProxy*) self, g_value_get_object (value));
2088 		break;
2089 		case UNITY_SCOPE_PROXY_REMOTE_GLOBAL_RESULTS_MODEL:
2090 		unity_scope_proxy_set_global_results_model ((UnityScopeProxy*) self, g_value_get_object (value));
2091 		break;
2092 		case UNITY_SCOPE_PROXY_REMOTE_FILTERS_MODEL:
2093 		unity_scope_proxy_set_filters_model ((UnityScopeProxy*) self, g_value_get_object (value));
2094 		break;
2095 		case UNITY_SCOPE_PROXY_REMOTE_VIEW_TYPE:
2096 		unity_scope_proxy_set_view_type ((UnityScopeProxy*) self, g_value_get_enum (value));
2097 		break;
2098 		default:
2099 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
2100 		break;
2101 	}
2102 }
2103 
2104 
2105 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
2106 	if ((array != NULL) && (destroy_func != NULL)) {
2107 		int i;
2108 		for (i = 0; i < array_length; i = i + 1) {
2109 			if (((gpointer*) array)[i] != NULL) {
2110 				destroy_func (((gpointer*) array)[i]);
2111 			}
2112 		}
2113 	}
2114 }
2115 
2116 
2117 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
2118 	_vala_array_destroy (array, array_length, destroy_func);
2119 	g_free (array);
2120 }