Back to index

libunity  5.92.0
unity-launcher.c
Go to the documentation of this file.
00001 /* unity-launcher.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-launcher.vala, do not modify */
00003 
00004 /*
00005  * Copyright (C) 2011 Canonical, Ltd.
00006  *
00007  * This library is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU Lesser General Public License
00009  * version 3.0 as published by the Free Software Foundation.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License version 3.0 for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library. If not, see
00018  * <http://www.gnu.org/licenses/>.
00019  *
00020  * Authored by Mikkel Kamstrup Erlandsen <mikkel.kamstrup@canonical.com>
00021  *
00022  */
00023 /*
00024  * IMPLEMENTATION NOTE:
00025  * We want the generated C API to be nice and not too Vala-ish. We must
00026  * anticipate that libunity consumers will be written in both Vala , C,
00027  * and through GObject Introspection
00028  *
00029  */
00030 
00031 #include <glib.h>
00032 #include <glib-object.h>
00033 #include <gio/gio.h>
00034 #include "unity.h"
00035 #include <stdlib.h>
00036 #include <string.h>
00037 #include <float.h>
00038 #include <math.h>
00039 #include <libdbusmenu-glib/client.h>
00040 #include <libdbusmenu-glib/dbusmenu-glib.h>
00041 #include <libdbusmenu-glib/enum-types.h>
00042 #include <libdbusmenu-glib/menuitem-proxy.h>
00043 #include <libdbusmenu-glib/menuitem.h>
00044 #include <libdbusmenu-glib/server.h>
00045 #include <libdbusmenu-glib/types.h>
00046 #include <dee.h>
00047 
00048 
00049 #define UNITY_TYPE_LAUNCHER_ENTRY_DBUS_IMPL (unity_launcher_entry_dbus_impl_get_type ())
00050 #define UNITY_LAUNCHER_ENTRY_DBUS_IMPL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_LAUNCHER_ENTRY_DBUS_IMPL, UnityLauncherEntryDBusImpl))
00051 #define UNITY_LAUNCHER_ENTRY_DBUS_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_LAUNCHER_ENTRY_DBUS_IMPL, UnityLauncherEntryDBusImplClass))
00052 #define UNITY_IS_LAUNCHER_ENTRY_DBUS_IMPL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_LAUNCHER_ENTRY_DBUS_IMPL))
00053 #define UNITY_IS_LAUNCHER_ENTRY_DBUS_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_LAUNCHER_ENTRY_DBUS_IMPL))
00054 #define UNITY_LAUNCHER_ENTRY_DBUS_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_LAUNCHER_ENTRY_DBUS_IMPL, UnityLauncherEntryDBusImplClass))
00055 
00056 typedef struct _UnityLauncherEntryDBusImpl UnityLauncherEntryDBusImpl;
00057 typedef struct _UnityLauncherEntryDBusImplClass UnityLauncherEntryDBusImplClass;
00058 typedef struct _UnityLauncherEntryDBusImplPrivate UnityLauncherEntryDBusImplPrivate;
00059 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00060 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
00061 #define _g_free0(var) (var = (g_free (var), NULL))
00062 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00063 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
00064 #define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
00065 
00066 struct _UnityLauncherEntryDBusImpl {
00067        GObject parent_instance;
00068        UnityLauncherEntryDBusImplPrivate * priv;
00069        UnityLauncherEntry* owner;
00070 };
00071 
00072 struct _UnityLauncherEntryDBusImplClass {
00073        GObjectClass parent_class;
00074 };
00075 
00076 struct _UnityLauncherEntryPrivate {
00077        gchar* _app_uri;
00078        gint64 _count;
00079        gboolean _count_visible;
00080        gdouble _progress;
00081        gboolean _progress_visible;
00082        gboolean _urgent;
00083        DbusmenuMenuitem* _quicklist;
00084        GHashTable* _queued_properties;
00085        DbusmenuServer* _quicklist_server;
00086        guint _property_source_id;
00087        GDBusConnection* _bus;
00088        UnityLauncherEntryDBusImpl* _dbus_impl;
00089 };
00090 
00091 struct _UnityLauncherFavoritesPrivate {
00092        GSettings* settings;
00093        GHashTable* fav_cache;
00094        gchar** fav_list;
00095        gint fav_list_length1;
00096        gint _fav_list_size_;
00097 };
00098 
00099 
00100 static gpointer unity_launcher_entry_dbus_impl_parent_class = NULL;
00101 static gpointer unity_launcher_entry_parent_class = NULL;
00102 static GHashTable* unity_launcher_entry_global_entries_map;
00103 static GHashTable* unity_launcher_entry_global_entries_map = NULL;
00104 static DeeSerializableIface* unity_launcher_entry_dee_serializable_parent_iface = NULL;
00105 static gpointer unity_launcher_favorites_parent_class = NULL;
00106 static UnityLauncherFavorites* unity_launcher_favorites_singleton;
00107 static UnityLauncherFavorites* unity_launcher_favorites_singleton = NULL;
00108 
00109 GType unity_launcher_entry_dbus_impl_get_type (void) G_GNUC_CONST;
00110 guint unity_launcher_entry_dbus_impl_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
00111 enum  {
00112        UNITY_LAUNCHER_ENTRY_DBUS_IMPL_DUMMY_PROPERTY
00113 };
00114 UnityLauncherEntryDBusImpl* unity_launcher_entry_dbus_impl_new (GDBusConnection* conn, const char* object_path, UnityLauncherEntry* owner);
00115 UnityLauncherEntryDBusImpl* unity_launcher_entry_dbus_impl_construct (GType object_type, GDBusConnection* conn, const char* object_path, UnityLauncherEntry* owner);
00116 GHashTable* unity_launcher_entry_dbus_impl_query (UnityLauncherEntryDBusImpl* self);
00117 static void _g_free0_ (gpointer var);
00118 static void _g_variant_unref0_ (gpointer var);
00119 GHashTable* unity_collect_launcher_entry_properties (UnityLauncherEntry* l);
00120 static void g_cclosure_user_marshal_VOID__STRING_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
00121 static void unity_launcher_entry_dbus_impl_finalize (GObject* obj);
00122 static void _dbus_unity_launcher_entry_dbus_impl_query (UnityLauncherEntryDBusImpl* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00123 static void unity_launcher_entry_dbus_impl_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
00124 static GVariant* unity_launcher_entry_dbus_impl_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
00125 static gboolean unity_launcher_entry_dbus_impl_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
00126 static void _dbus_unity_launcher_entry_dbus_impl_update (GObject* _sender, const gchar* app_uri, GHashTable* properties, gpointer* _data);
00127 static void _unity_launcher_entry_dbus_impl_unregister_object (gpointer user_data);
00128 #define UNITY_LAUNCHER_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_LAUNCHER_ENTRY, UnityLauncherEntryPrivate))
00129 enum  {
00130        UNITY_LAUNCHER_ENTRY_DUMMY_PROPERTY,
00131        UNITY_LAUNCHER_ENTRY_APP_URI,
00132        UNITY_LAUNCHER_ENTRY_COUNT,
00133        UNITY_LAUNCHER_ENTRY_COUNT_VISIBLE,
00134        UNITY_LAUNCHER_ENTRY_PROGRESS,
00135        UNITY_LAUNCHER_ENTRY_PROGRESS_VISIBLE,
00136        UNITY_LAUNCHER_ENTRY_URGENT,
00137        UNITY_LAUNCHER_ENTRY_QUICKLIST
00138 };
00139 static UnityLauncherEntry* unity_launcher_entry_new (const gchar* app_uri);
00140 static UnityLauncherEntry* unity_launcher_entry_construct (GType object_type, const gchar* app_uri);
00141 static void _g_object_unref0_ (gpointer var);
00142 static GVariant* unity_launcher_entry_real_serialize (DeeSerializable* base);
00143 static GVariant* _variant_new1 (GHashTable* value);
00144 static GObject* unity_launcher_entry_parse_serializable (GVariant* data);
00145 static void unity_launcher_entry_queue_property_notification (UnityLauncherEntry* self, GObject* _self_, GParamSpec* pspec);
00146 static GVariant* _variant_new2 (gint64 value);
00147 static GVariant* _variant_new3 (gboolean value);
00148 static GVariant* _variant_new4 (gdouble value);
00149 static GVariant* _variant_new5 (gboolean value);
00150 static GVariant* _variant_new6 (gboolean value);
00151 static GVariant* _variant_new7 (const gchar* value);
00152 static GVariant* _variant_new8 (const gchar* value);
00153 static gboolean unity_launcher_entry_dispatch_property_notification (UnityLauncherEntry* self);
00154 static gboolean _unity_launcher_entry_dispatch_property_notification_gsource_func (gpointer self);
00155 static void unity_launcher_entry_on_unity_running_changed (UnityLauncherEntry* self, GObject* _inspector, GParamSpec* pspec);
00156 static GObject * unity_launcher_entry_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00157 static void _unity_launcher_entry_on_unity_running_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00158 static void _unity_launcher_entry_queue_property_notification_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00159 static GObject* _unity_launcher_entry_parse_serializable_dee_serializable_parse_func (GVariant* data);
00160 static void unity_launcher_entry_finalize (GObject* obj);
00161 static void _vala_unity_launcher_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00162 static void _vala_unity_launcher_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00163 static GVariant* _variant_new9 (gint64 value);
00164 static GVariant* _variant_new10 (gboolean value);
00165 static GVariant* _variant_new11 (gdouble value);
00166 static GVariant* _variant_new12 (gboolean value);
00167 static GVariant* _variant_new13 (gboolean value);
00168 static GVariant* _variant_new14 (const char* value);
00169 #define UNITY_LAUNCHER_FAVORITES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_LAUNCHER_FAVORITES, UnityLauncherFavoritesPrivate))
00170 enum  {
00171        UNITY_LAUNCHER_FAVORITES_DUMMY_PROPERTY
00172 };
00173 static UnityLauncherFavorites* unity_launcher_favorites_new (void);
00174 static UnityLauncherFavorites* unity_launcher_favorites_construct (GType object_type);
00175 static void unity_launcher_favorites_reset_fav_cache (UnityLauncherFavorites* self);
00176 static void _unity_launcher_favorites_reset_fav_cache_g_settings_changed (GSettings* _sender, const gchar* key, gpointer self);
00177 static gchar** _vala_array_dup2 (gchar** self, int length);
00178 static void unity_launcher_favorites_finalize (GObject* obj);
00179 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00180 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00181 static gint _vala_array_length (gpointer array);
00182 
00183 static const GDBusArgInfo _unity_launcher_entry_dbus_impl_dbus_arg_info_query_result = {-1, "result", "a{sv}"};
00184 static const GDBusArgInfo * const _unity_launcher_entry_dbus_impl_dbus_arg_info_query_in[] = {NULL};
00185 static const GDBusArgInfo * const _unity_launcher_entry_dbus_impl_dbus_arg_info_query_out[] = {&_unity_launcher_entry_dbus_impl_dbus_arg_info_query_result, NULL};
00186 static const GDBusMethodInfo _unity_launcher_entry_dbus_impl_dbus_method_info_query = {-1, "Query", (GDBusArgInfo **) (&_unity_launcher_entry_dbus_impl_dbus_arg_info_query_in), (GDBusArgInfo **) (&_unity_launcher_entry_dbus_impl_dbus_arg_info_query_out)};
00187 static const GDBusMethodInfo * const _unity_launcher_entry_dbus_impl_dbus_method_info[] = {&_unity_launcher_entry_dbus_impl_dbus_method_info_query, NULL};
00188 static const GDBusArgInfo _unity_launcher_entry_dbus_impl_dbus_arg_info_update_app_uri = {-1, "app_uri", "s"};
00189 static const GDBusArgInfo _unity_launcher_entry_dbus_impl_dbus_arg_info_update_properties = {-1, "properties", "a{sv}"};
00190 static const GDBusArgInfo * const _unity_launcher_entry_dbus_impl_dbus_arg_info_update[] = {&_unity_launcher_entry_dbus_impl_dbus_arg_info_update_app_uri, &_unity_launcher_entry_dbus_impl_dbus_arg_info_update_properties, NULL};
00191 static const GDBusSignalInfo _unity_launcher_entry_dbus_impl_dbus_signal_info_update = {-1, "Update", (GDBusArgInfo **) (&_unity_launcher_entry_dbus_impl_dbus_arg_info_update)};
00192 static const GDBusSignalInfo * const _unity_launcher_entry_dbus_impl_dbus_signal_info[] = {&_unity_launcher_entry_dbus_impl_dbus_signal_info_update, NULL};
00193 static const GDBusPropertyInfo * const _unity_launcher_entry_dbus_impl_dbus_property_info[] = {NULL};
00194 static const GDBusInterfaceInfo _unity_launcher_entry_dbus_impl_dbus_interface_info = {-1, "com.canonical.Unity.LauncherEntry", (GDBusMethodInfo **) (&_unity_launcher_entry_dbus_impl_dbus_method_info), (GDBusSignalInfo **) (&_unity_launcher_entry_dbus_impl_dbus_signal_info), (GDBusPropertyInfo **) (&_unity_launcher_entry_dbus_impl_dbus_property_info)};
00195 static const GDBusInterfaceVTable _unity_launcher_entry_dbus_impl_dbus_interface_vtable = {unity_launcher_entry_dbus_impl_dbus_interface_method_call, unity_launcher_entry_dbus_impl_dbus_interface_get_property, unity_launcher_entry_dbus_impl_dbus_interface_set_property};
00196 
00197 UnityLauncherEntryDBusImpl* unity_launcher_entry_dbus_impl_construct (GType object_type, GDBusConnection* conn, const char* object_path, UnityLauncherEntry* owner) {
00198        UnityLauncherEntryDBusImpl * self = NULL;
00199        UnityLauncherEntry* _tmp3_;
00200        GError * _inner_error_ = NULL;
00201        g_return_val_if_fail (conn != NULL, NULL);
00202        g_return_val_if_fail (object_path != NULL, NULL);
00203        g_return_val_if_fail (owner != NULL, NULL);
00204        self = (UnityLauncherEntryDBusImpl*) g_object_new (object_type, NULL);
00205        {
00206               GDBusConnection* _tmp0_;
00207               const char* _tmp1_;
00208               _tmp0_ = conn;
00209               _tmp1_ = object_path;
00210               unity_launcher_entry_dbus_impl_register_object (self, _tmp0_, (const gchar*) _tmp1_, &_inner_error_);
00211               if (_inner_error_ != NULL) {
00212                      if (_inner_error_->domain == G_IO_ERROR) {
00213                             goto __catch14_g_io_error;
00214                      }
00215                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
00216                      g_clear_error (&_inner_error_);
00217                      return NULL;
00218               }
00219        }
00220        goto __finally14;
00221        __catch14_g_io_error:
00222        {
00223               GError* e = NULL;
00224               const char* _tmp2_;
00225               e = _inner_error_;
00226               _inner_error_ = NULL;
00227               _tmp2_ = object_path;
00228               g_warning ("Unable to connecto to session bus. Unable to control " "LauncherEntry for %s", _tmp2_);
00229               _g_error_free0 (e);
00230        }
00231        __finally14:
00232        if (_inner_error_ != NULL) {
00233               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);
00234               g_clear_error (&_inner_error_);
00235               return NULL;
00236        }
00237        _tmp3_ = owner;
00238        self->owner = _tmp3_;
00239        return self;
00240 }
00241 
00242 
00243 UnityLauncherEntryDBusImpl* unity_launcher_entry_dbus_impl_new (GDBusConnection* conn, const char* object_path, UnityLauncherEntry* owner) {
00244        return unity_launcher_entry_dbus_impl_construct (UNITY_TYPE_LAUNCHER_ENTRY_DBUS_IMPL, conn, object_path, owner);
00245 }
00246 
00247 
00248 static void _g_free0_ (gpointer var) {
00249        var = (g_free (var), NULL);
00250 }
00251 
00252 
00253 static void _g_variant_unref0_ (gpointer var) {
00254        (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
00255 }
00256 
00257 
00258 GHashTable* unity_launcher_entry_dbus_impl_query (UnityLauncherEntryDBusImpl* self) {
00259        GHashTable* result = NULL;
00260        UnityLauncherEntry* _tmp0_;
00261        UnityLauncherEntry* _tmp4_;
00262        GHashTable* _tmp5_ = NULL;
00263        g_return_val_if_fail (self != NULL, NULL);
00264        _tmp0_ = self->owner;
00265        if (_tmp0_ == NULL) {
00266               GHashFunc _tmp1_;
00267               GEqualFunc _tmp2_;
00268               GHashTable* _tmp3_;
00269               _tmp1_ = g_str_hash;
00270               _tmp2_ = g_str_equal;
00271               _tmp3_ = g_hash_table_new_full (_tmp1_, _tmp2_, _g_free0_, _g_variant_unref0_);
00272               result = _tmp3_;
00273               return result;
00274        }
00275        _tmp4_ = self->owner;
00276        _tmp5_ = unity_collect_launcher_entry_properties (_tmp4_);
00277        result = _tmp5_;
00278        return result;
00279 }
00280 
00281 
00282 static void g_cclosure_user_marshal_VOID__STRING_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
00283        typedef void (*GMarshalFunc_VOID__STRING_BOXED) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2);
00284        register GMarshalFunc_VOID__STRING_BOXED callback;
00285        register GCClosure * cc;
00286        register gpointer data1;
00287        register gpointer data2;
00288        cc = (GCClosure *) closure;
00289        g_return_if_fail (n_param_values == 3);
00290        if (G_CCLOSURE_SWAP_DATA (closure)) {
00291               data1 = closure->data;
00292               data2 = param_values->data[0].v_pointer;
00293        } else {
00294               data1 = param_values->data[0].v_pointer;
00295               data2 = closure->data;
00296        }
00297        callback = (GMarshalFunc_VOID__STRING_BOXED) (marshal_data ? marshal_data : cc->callback);
00298        callback (data1, g_value_get_string (param_values + 1), g_value_get_boxed (param_values + 2), data2);
00299 }
00300 
00301 
00302 static void unity_launcher_entry_dbus_impl_class_init (UnityLauncherEntryDBusImplClass * klass) {
00303        unity_launcher_entry_dbus_impl_parent_class = g_type_class_peek_parent (klass);
00304        G_OBJECT_CLASS (klass)->finalize = unity_launcher_entry_dbus_impl_finalize;
00305        g_signal_new ("update", UNITY_TYPE_LAUNCHER_ENTRY_DBUS_IMPL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOXED, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_HASH_TABLE);
00306 }
00307 
00308 
00309 static void unity_launcher_entry_dbus_impl_instance_init (UnityLauncherEntryDBusImpl * self) {
00310 }
00311 
00312 
00313 static void unity_launcher_entry_dbus_impl_finalize (GObject* obj) {
00314        UnityLauncherEntryDBusImpl * self;
00315        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_LAUNCHER_ENTRY_DBUS_IMPL, UnityLauncherEntryDBusImpl);
00316        G_OBJECT_CLASS (unity_launcher_entry_dbus_impl_parent_class)->finalize (obj);
00317 }
00318 
00319 
00320 GType unity_launcher_entry_dbus_impl_get_type (void) {
00321        static volatile gsize unity_launcher_entry_dbus_impl_type_id__volatile = 0;
00322        if (g_once_init_enter (&unity_launcher_entry_dbus_impl_type_id__volatile)) {
00323               static const GTypeInfo g_define_type_info = { sizeof (UnityLauncherEntryDBusImplClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_launcher_entry_dbus_impl_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityLauncherEntryDBusImpl), 0, (GInstanceInitFunc) unity_launcher_entry_dbus_impl_instance_init, NULL };
00324               GType unity_launcher_entry_dbus_impl_type_id;
00325               unity_launcher_entry_dbus_impl_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityLauncherEntryDBusImpl", &g_define_type_info, 0);
00326               g_type_set_qdata (unity_launcher_entry_dbus_impl_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) unity_launcher_entry_dbus_impl_register_object);
00327               g_once_init_leave (&unity_launcher_entry_dbus_impl_type_id__volatile, unity_launcher_entry_dbus_impl_type_id);
00328        }
00329        return unity_launcher_entry_dbus_impl_type_id__volatile;
00330 }
00331 
00332 
00333 static void _dbus_unity_launcher_entry_dbus_impl_query (UnityLauncherEntryDBusImpl* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
00334        GError* error = NULL;
00335        GVariantIter _arguments_iter;
00336        GDBusMessage* _reply_message;
00337        GVariant* _reply;
00338        GVariantBuilder _reply_builder;
00339        GHashTable* result;
00340        GVariantBuilder _tmp0_;
00341        GHashTableIter _tmp1_;
00342        gpointer _tmp2_;
00343        gpointer _tmp3_;
00344        g_variant_iter_init (&_arguments_iter, parameters);
00345        result = unity_launcher_entry_dbus_impl_query (self);
00346        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
00347        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
00348        g_hash_table_iter_init (&_tmp1_, result);
00349        g_variant_builder_init (&_tmp0_, G_VARIANT_TYPE ("a{sv}"));
00350        while (g_hash_table_iter_next (&_tmp1_, &_tmp2_, &_tmp3_)) {
00351               gchar* _key;
00352               GVariant* _value;
00353               _key = (gchar*) _tmp2_;
00354               _value = (GVariant*) _tmp3_;
00355               g_variant_builder_add (&_tmp0_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
00356        }
00357        g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp0_));
00358        _g_hash_table_unref0 (result);
00359        _reply = g_variant_builder_end (&_reply_builder);
00360        g_dbus_message_set_body (_reply_message, _reply);
00361        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
00362        g_object_unref (invocation);
00363        g_object_unref (_reply_message);
00364 }
00365 
00366 
00367 static void unity_launcher_entry_dbus_impl_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) {
00368        gpointer* data;
00369        gpointer object;
00370        data = user_data;
00371        object = data[0];
00372        if (strcmp (method_name, "Query") == 0) {
00373               _dbus_unity_launcher_entry_dbus_impl_query (object, parameters, invocation);
00374        } else {
00375               g_object_unref (invocation);
00376        }
00377 }
00378 
00379 
00380 static GVariant* unity_launcher_entry_dbus_impl_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) {
00381        gpointer* data;
00382        gpointer object;
00383        data = user_data;
00384        object = data[0];
00385        return NULL;
00386 }
00387 
00388 
00389 static gboolean unity_launcher_entry_dbus_impl_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) {
00390        gpointer* data;
00391        gpointer object;
00392        data = user_data;
00393        object = data[0];
00394        return FALSE;
00395 }
00396 
00397 
00398 static void _dbus_unity_launcher_entry_dbus_impl_update (GObject* _sender, const gchar* app_uri, GHashTable* properties, gpointer* _data) {
00399        GDBusConnection * _connection;
00400        const gchar * _path;
00401        GVariant *_arguments;
00402        GVariantBuilder _arguments_builder;
00403        GVariantBuilder _tmp4_;
00404        GHashTableIter _tmp5_;
00405        gpointer _tmp6_;
00406        gpointer _tmp7_;
00407        _connection = _data[1];
00408        _path = _data[2];
00409        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
00410        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (app_uri));
00411        g_hash_table_iter_init (&_tmp5_, properties);
00412        g_variant_builder_init (&_tmp4_, G_VARIANT_TYPE ("a{sv}"));
00413        while (g_hash_table_iter_next (&_tmp5_, &_tmp6_, &_tmp7_)) {
00414               gchar* _key;
00415               GVariant* _value;
00416               _key = (gchar*) _tmp6_;
00417               _value = (GVariant*) _tmp7_;
00418               g_variant_builder_add (&_tmp4_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
00419        }
00420        g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp4_));
00421        _arguments = g_variant_builder_end (&_arguments_builder);
00422        g_dbus_connection_emit_signal (_connection, NULL, _path, "com.canonical.Unity.LauncherEntry", "Update", _arguments, NULL);
00423 }
00424 
00425 
00426 guint unity_launcher_entry_dbus_impl_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
00427        guint result;
00428        gpointer *data;
00429        data = g_new (gpointer, 3);
00430        data[0] = g_object_ref (object);
00431        data[1] = g_object_ref (connection);
00432        data[2] = g_strdup (path);
00433        result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_unity_launcher_entry_dbus_impl_dbus_interface_info), &_unity_launcher_entry_dbus_impl_dbus_interface_vtable, data, _unity_launcher_entry_dbus_impl_unregister_object, error);
00434        if (!result) {
00435               return 0;
00436        }
00437        g_signal_connect (object, "update", (GCallback) _dbus_unity_launcher_entry_dbus_impl_update, data);
00438        return result;
00439 }
00440 
00441 
00442 static void _unity_launcher_entry_dbus_impl_unregister_object (gpointer user_data) {
00443        gpointer* data;
00444        data = user_data;
00445        g_signal_handlers_disconnect_by_func (data[0], _dbus_unity_launcher_entry_dbus_impl_update, data);
00446        g_object_unref (data[0]);
00447        g_object_unref (data[1]);
00448        g_free (data[2]);
00449        g_free (data);
00450 }
00451 
00452 
00463 static UnityLauncherEntry* unity_launcher_entry_construct (GType object_type, const gchar* app_uri) {
00464        UnityLauncherEntry * self = NULL;
00465        const gchar* _tmp0_;
00466        g_return_val_if_fail (app_uri != NULL, NULL);
00467        _tmp0_ = app_uri;
00468        self = (UnityLauncherEntry*) g_object_new (object_type, "app-uri", _tmp0_, NULL);
00469        return self;
00470 }
00471 
00472 
00473 static UnityLauncherEntry* unity_launcher_entry_new (const gchar* app_uri) {
00474        return unity_launcher_entry_construct (UNITY_TYPE_LAUNCHER_ENTRY, app_uri);
00475 }
00476 
00477 
00478 static void _g_object_unref0_ (gpointer var) {
00479        (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
00480 }
00481 
00482 
00483 static gpointer _g_object_ref0 (gpointer self) {
00484        return self ? g_object_ref (self) : NULL;
00485 }
00486 
00487 
00488 UnityLauncherEntry* unity_launcher_entry_get_for_app_uri (const gchar* app_uri) {
00489        UnityLauncherEntry* result = NULL;
00490        GHashTable* _tmp0_;
00491        GHashTable* _tmp4_;
00492        const gchar* _tmp5_;
00493        gconstpointer _tmp6_ = NULL;
00494        UnityLauncherEntry* _tmp7_;
00495        UnityLauncherEntry* entry;
00496        UnityLauncherEntry* _tmp8_;
00497        const gchar* _tmp9_;
00498        UnityLauncherEntry* _tmp10_;
00499        GHashTable* _tmp11_;
00500        const gchar* _tmp12_;
00501        gchar* _tmp13_;
00502        UnityLauncherEntry* _tmp14_;
00503        UnityLauncherEntry* _tmp15_;
00504        g_return_val_if_fail (app_uri != NULL, NULL);
00505        _tmp0_ = unity_launcher_entry_global_entries_map;
00506        if (_tmp0_ == NULL) {
00507               GHashFunc _tmp1_;
00508               GEqualFunc _tmp2_;
00509               GHashTable* _tmp3_;
00510               _tmp1_ = g_str_hash;
00511               _tmp2_ = g_str_equal;
00512               _tmp3_ = g_hash_table_new_full (_tmp1_, _tmp2_, _g_free0_, _g_object_unref0_);
00513               _g_hash_table_unref0 (unity_launcher_entry_global_entries_map);
00514               unity_launcher_entry_global_entries_map = _tmp3_;
00515        }
00516        _tmp4_ = unity_launcher_entry_global_entries_map;
00517        _tmp5_ = app_uri;
00518        _tmp6_ = g_hash_table_lookup (_tmp4_, _tmp5_);
00519        _tmp7_ = _g_object_ref0 ((UnityLauncherEntry*) _tmp6_);
00520        entry = _tmp7_;
00521        _tmp8_ = entry;
00522        if (_tmp8_ != NULL) {
00523               result = entry;
00524               return result;
00525        }
00526        _tmp9_ = app_uri;
00527        _tmp10_ = unity_launcher_entry_new (_tmp9_);
00528        _g_object_unref0 (entry);
00529        entry = _tmp10_;
00530        _tmp11_ = unity_launcher_entry_global_entries_map;
00531        _tmp12_ = app_uri;
00532        _tmp13_ = g_strdup (_tmp12_);
00533        _tmp14_ = entry;
00534        _tmp15_ = _g_object_ref0 (_tmp14_);
00535        g_hash_table_insert (_tmp11_, _tmp13_, _tmp15_);
00536        result = entry;
00537        return result;
00538 }
00539 
00540 
00541 UnityLauncherEntry* unity_launcher_entry_get_for_desktop_id (const gchar* desktop_id) {
00542        UnityLauncherEntry* result = NULL;
00543        const gchar* _tmp0_;
00544        gchar* _tmp1_;
00545        gchar* _tmp2_;
00546        UnityLauncherEntry* _tmp3_ = NULL;
00547        UnityLauncherEntry* _tmp4_;
00548        g_return_val_if_fail (desktop_id != NULL, NULL);
00549        _tmp0_ = desktop_id;
00550        _tmp1_ = g_strconcat ("application://", _tmp0_, NULL);
00551        _tmp2_ = _tmp1_;
00552        _tmp3_ = unity_launcher_entry_get_for_app_uri (_tmp2_);
00553        _tmp4_ = _tmp3_;
00554        _g_free0 (_tmp2_);
00555        result = _tmp4_;
00556        return result;
00557 }
00558 
00559 
00560 UnityLauncherEntry* unity_launcher_entry_get_for_desktop_file (const gchar* desktop_file) {
00561        UnityLauncherEntry* result = NULL;
00562        const gchar* _tmp0_;
00563        gchar* _tmp1_ = NULL;
00564        gchar* _tmp2_;
00565        UnityLauncherEntry* _tmp3_ = NULL;
00566        UnityLauncherEntry* _tmp4_;
00567        g_return_val_if_fail (desktop_file != NULL, NULL);
00568        _tmp0_ = desktop_file;
00569        _tmp1_ = g_path_get_basename (_tmp0_);
00570        _tmp2_ = _tmp1_;
00571        _tmp3_ = unity_launcher_entry_get_for_desktop_id (_tmp2_);
00572        _tmp4_ = _tmp3_;
00573        _g_free0 (_tmp2_);
00574        result = _tmp4_;
00575        return result;
00576 }
00577 
00578 
00579 static GVariant* _variant_new1 (GHashTable* value) {
00580        GVariantBuilder _tmp1_;
00581        GHashTableIter _tmp2_;
00582        gpointer _tmp3_;
00583        gpointer _tmp4_;
00584        g_hash_table_iter_init (&_tmp2_, value);
00585        g_variant_builder_init (&_tmp1_, G_VARIANT_TYPE ("a{sv}"));
00586        while (g_hash_table_iter_next (&_tmp2_, &_tmp3_, &_tmp4_)) {
00587               gchar* _key;
00588               GVariant* _value;
00589               _key = (gchar*) _tmp3_;
00590               _value = (GVariant*) _tmp4_;
00591               g_variant_builder_add (&_tmp1_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
00592        }
00593        return g_variant_ref_sink (g_variant_builder_end (&_tmp1_));
00594 }
00595 
00596 
00597 static gpointer _g_variant_ref0 (gpointer self) {
00598        return self ? g_variant_ref (self) : NULL;
00599 }
00600 
00601 
00602 static GVariant* unity_launcher_entry_real_serialize (DeeSerializable* base) {
00603        UnityLauncherEntry * self;
00604        GVariant* result = NULL;
00605        GHashTable* _tmp0_ = NULL;
00606        GHashTable* hash;
00607        GVariant* _tmp5_;
00608        GVariant* props;
00609        const gchar* _tmp6_;
00610        GVariant* _tmp7_;
00611        GVariant* _app_uri;
00612        GVariant* _tmp8_;
00613        GVariant* _tmp9_;
00614        GVariant** _tmp10_ = NULL;
00615        GVariant** _tmp11_;
00616        gint _tmp11__length1;
00617        GVariant* _tmp12_;
00618        GVariant* _tmp13_;
00619        self = (UnityLauncherEntry*) base;
00620        _tmp0_ = unity_collect_launcher_entry_properties (self);
00621        hash = _tmp0_;
00622        _tmp5_ = _variant_new1 (hash);
00623        props = _tmp5_;
00624        _tmp6_ = self->priv->_app_uri;
00625        _tmp7_ = g_variant_new_string (_tmp6_);
00626        g_variant_ref_sink (_tmp7_);
00627        _app_uri = _tmp7_;
00628        _tmp8_ = _g_variant_ref0 (_app_uri);
00629        _tmp9_ = _g_variant_ref0 (props);
00630        _tmp10_ = g_new0 (GVariant*, 2 + 1);
00631        _tmp10_[0] = _tmp8_;
00632        _tmp10_[1] = _tmp9_;
00633        _tmp11_ = _tmp10_;
00634        _tmp11__length1 = 2;
00635        _tmp12_ = g_variant_new_tuple (_tmp11_, 2);
00636        g_variant_ref_sink (_tmp12_);
00637        _tmp13_ = _tmp12_;
00638        _tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_variant_unref), NULL);
00639        result = _tmp13_;
00640        _g_variant_unref0 (_app_uri);
00641        _g_variant_unref0 (props);
00642        _g_hash_table_unref0 (hash);
00643        return result;
00644 }
00645 
00646 
00647 static GObject* unity_launcher_entry_parse_serializable (GVariant* data) {
00648        GObject* result = NULL;
00649        GVariant* _tmp0_;
00650        GVariant* _tmp1_ = NULL;
00651        GVariant* _tmp2_;
00652        const gchar* _tmp3_ = NULL;
00653        gchar* _tmp4_;
00654        gchar* _tmp5_;
00655        gchar* app_uri;
00656        GVariant* _tmp6_;
00657        GVariant* _tmp7_ = NULL;
00658        GVariant* props;
00659        const gchar* _tmp8_;
00660        UnityLauncherEntry* _tmp9_ = NULL;
00661        UnityLauncherEntry* _self_;
00662        gint64 count = 0LL;
00663        GVariant* _tmp10_;
00664        gboolean _tmp11_ = FALSE;
00665        gboolean visible = FALSE;
00666        GVariant* _tmp14_;
00667        gboolean _tmp15_ = FALSE;
00668        gdouble progress = 0.0;
00669        GVariant* _tmp18_;
00670        gboolean _tmp19_ = FALSE;
00671        GVariant* _tmp22_;
00672        gboolean _tmp23_ = FALSE;
00673        gboolean urgent = FALSE;
00674        GVariant* _tmp26_;
00675        gboolean _tmp27_ = FALSE;
00676        gchar* quicklist_path = NULL;
00677        GVariant* _tmp30_;
00678        gboolean _tmp31_ = FALSE;
00679        g_return_val_if_fail (data != NULL, NULL);
00680        _tmp0_ = data;
00681        _tmp1_ = g_variant_get_child_value (_tmp0_, (gsize) 0);
00682        _tmp2_ = _tmp1_;
00683        _tmp3_ = g_variant_get_string (_tmp2_, NULL);
00684        _tmp4_ = g_strdup (_tmp3_);
00685        _tmp5_ = _tmp4_;
00686        _g_variant_unref0 (_tmp2_);
00687        app_uri = _tmp5_;
00688        _tmp6_ = data;
00689        _tmp7_ = g_variant_get_child_value (_tmp6_, (gsize) 1);
00690        props = _tmp7_;
00691        _tmp8_ = app_uri;
00692        _tmp9_ = unity_launcher_entry_get_for_app_uri (_tmp8_);
00693        _self_ = _tmp9_;
00694        _tmp10_ = props;
00695        _tmp11_ = g_variant_lookup (_tmp10_, "count", "x", &count, NULL);
00696        if (_tmp11_) {
00697               UnityLauncherEntry* _tmp12_;
00698               gint64 _tmp13_;
00699               _tmp12_ = _self_;
00700               _tmp13_ = count;
00701               unity_launcher_entry_set_count (_tmp12_, _tmp13_);
00702        }
00703        _tmp14_ = props;
00704        _tmp15_ = g_variant_lookup (_tmp14_, "count-visible", "b", &visible, NULL);
00705        if (_tmp15_) {
00706               UnityLauncherEntry* _tmp16_;
00707               gboolean _tmp17_;
00708               _tmp16_ = _self_;
00709               _tmp17_ = visible;
00710               unity_launcher_entry_set_count_visible (_tmp16_, _tmp17_);
00711        }
00712        _tmp18_ = props;
00713        _tmp19_ = g_variant_lookup (_tmp18_, "count-visible", "d", &progress, NULL);
00714        if (_tmp19_) {
00715               UnityLauncherEntry* _tmp20_;
00716               gdouble _tmp21_;
00717               _tmp20_ = _self_;
00718               _tmp21_ = progress;
00719               unity_launcher_entry_set_progress (_tmp20_, _tmp21_);
00720        }
00721        _tmp22_ = props;
00722        _tmp23_ = g_variant_lookup (_tmp22_, "progress-visible", "b", &visible, NULL);
00723        if (_tmp23_) {
00724               UnityLauncherEntry* _tmp24_;
00725               gboolean _tmp25_;
00726               _tmp24_ = _self_;
00727               _tmp25_ = visible;
00728               unity_launcher_entry_set_progress_visible (_tmp24_, _tmp25_);
00729        }
00730        _tmp26_ = props;
00731        _tmp27_ = g_variant_lookup (_tmp26_, "urgent", "b", &urgent, NULL);
00732        if (_tmp27_) {
00733               UnityLauncherEntry* _tmp28_;
00734               gboolean _tmp29_;
00735               _tmp28_ = _self_;
00736               _tmp29_ = urgent;
00737               unity_launcher_entry_set_urgent (_tmp28_, _tmp29_);
00738        }
00739        _tmp30_ = props;
00740        _tmp31_ = g_variant_lookup (_tmp30_, "quicklist", "s", &quicklist_path, NULL);
00741        if (_tmp31_) {
00742               const gchar* _tmp32_;
00743               _tmp32_ = quicklist_path;
00744               if (g_strcmp0 (_tmp32_, "") != 0) {
00745                      UnityLauncherEntry* _tmp33_;
00746                      const gchar* _tmp34_;
00747                      char* _tmp35_;
00748                      _tmp33_ = _self_;
00749                      _tmp34_ = quicklist_path;
00750                      _tmp35_ = g_strdup (_tmp34_);
00751                      _g_free0 (_tmp33_->_object_path);
00752                      _tmp33_->_object_path = _tmp35_;
00753               }
00754        }
00755        result = (GObject*) _self_;
00756        _g_free0 (quicklist_path);
00757        _g_variant_unref0 (props);
00758        _g_free0 (app_uri);
00759        return result;
00760 }
00761 
00762 
00763 static GVariant* _variant_new2 (gint64 value) {
00764        return g_variant_ref_sink (g_variant_new_int64 (value));
00765 }
00766 
00767 
00768 static GVariant* _variant_new3 (gboolean value) {
00769        return g_variant_ref_sink (g_variant_new_boolean (value));
00770 }
00771 
00772 
00773 static GVariant* _variant_new4 (gdouble value) {
00774        return g_variant_ref_sink (g_variant_new_double (value));
00775 }
00776 
00777 
00778 static GVariant* _variant_new5 (gboolean value) {
00779        return g_variant_ref_sink (g_variant_new_boolean (value));
00780 }
00781 
00782 
00783 static GVariant* _variant_new6 (gboolean value) {
00784        return g_variant_ref_sink (g_variant_new_boolean (value));
00785 }
00786 
00787 
00788 static GVariant* _variant_new7 (const gchar* value) {
00789        return g_variant_ref_sink (g_variant_new_string (value));
00790 }
00791 
00792 
00793 static GVariant* _variant_new8 (const gchar* value) {
00794        return g_variant_ref_sink (g_variant_new_string (value));
00795 }
00796 
00797 
00798 static gboolean _unity_launcher_entry_dispatch_property_notification_gsource_func (gpointer self) {
00799        gboolean result;
00800        result = unity_launcher_entry_dispatch_property_notification (self);
00801        return result;
00802 }
00803 
00804 
00805 static void unity_launcher_entry_queue_property_notification (UnityLauncherEntry* self, GObject* _self_, GParamSpec* pspec) {
00806        GVariant* v = NULL;
00807        gchar* object_path = NULL;
00808        GParamSpec* _tmp0_;
00809        const gchar* _tmp1_;
00810        const gchar* _tmp2_;
00811        GQuark _tmp4_ = 0U;
00812        static GQuark _tmp3_label0 = 0;
00813        static GQuark _tmp3_label1 = 0;
00814        static GQuark _tmp3_label2 = 0;
00815        static GQuark _tmp3_label3 = 0;
00816        static GQuark _tmp3_label4 = 0;
00817        static GQuark _tmp3_label5 = 0;
00818        GVariant* _tmp20_;
00819        guint _tmp27_;
00820        g_return_if_fail (self != NULL);
00821        g_return_if_fail (_self_ != NULL);
00822        g_return_if_fail (pspec != NULL);
00823        _tmp0_ = pspec;
00824        _tmp1_ = _tmp0_->name;
00825        _tmp2_ = _tmp1_;
00826        _tmp4_ = (NULL == _tmp2_) ? 0 : g_quark_from_string (_tmp2_);
00827        if (_tmp4_ == ((0 != _tmp3_label0) ? _tmp3_label0 : (_tmp3_label0 = g_quark_from_static_string ("count")))) {
00828               switch (0) {
00829                      default:
00830                      {
00831                             gint64 _tmp5_;
00832                             GVariant* _tmp6_;
00833                             _tmp5_ = self->priv->_count;
00834                             _tmp6_ = _variant_new2 (_tmp5_);
00835                             _g_variant_unref0 (v);
00836                             v = _tmp6_;
00837                             break;
00838                      }
00839               }
00840        } else if (_tmp4_ == ((0 != _tmp3_label1) ? _tmp3_label1 : (_tmp3_label1 = g_quark_from_static_string ("count-visible")))) {
00841               switch (0) {
00842                      default:
00843                      {
00844                             gboolean _tmp7_;
00845                             GVariant* _tmp8_;
00846                             _tmp7_ = self->priv->_count_visible;
00847                             _tmp8_ = _variant_new3 (_tmp7_);
00848                             _g_variant_unref0 (v);
00849                             v = _tmp8_;
00850                             break;
00851                      }
00852               }
00853        } else if (_tmp4_ == ((0 != _tmp3_label2) ? _tmp3_label2 : (_tmp3_label2 = g_quark_from_static_string ("progress")))) {
00854               switch (0) {
00855                      default:
00856                      {
00857                             gdouble _tmp9_;
00858                             GVariant* _tmp10_;
00859                             _tmp9_ = self->priv->_progress;
00860                             _tmp10_ = _variant_new4 (_tmp9_);
00861                             _g_variant_unref0 (v);
00862                             v = _tmp10_;
00863                             break;
00864                      }
00865               }
00866        } else if (_tmp4_ == ((0 != _tmp3_label3) ? _tmp3_label3 : (_tmp3_label3 = g_quark_from_static_string ("progress-visible")))) {
00867               switch (0) {
00868                      default:
00869                      {
00870                             gboolean _tmp11_;
00871                             GVariant* _tmp12_;
00872                             _tmp11_ = self->priv->_progress_visible;
00873                             _tmp12_ = _variant_new5 (_tmp11_);
00874                             _g_variant_unref0 (v);
00875                             v = _tmp12_;
00876                             break;
00877                      }
00878               }
00879        } else if (_tmp4_ == ((0 != _tmp3_label4) ? _tmp3_label4 : (_tmp3_label4 = g_quark_from_static_string ("urgent")))) {
00880               switch (0) {
00881                      default:
00882                      {
00883                             gboolean _tmp13_;
00884                             GVariant* _tmp14_;
00885                             _tmp13_ = self->priv->_urgent;
00886                             _tmp14_ = _variant_new6 (_tmp13_);
00887                             _g_variant_unref0 (v);
00888                             v = _tmp14_;
00889                             break;
00890                      }
00891               }
00892        } else if (_tmp4_ == ((0 != _tmp3_label5) ? _tmp3_label5 : (_tmp3_label5 = g_quark_from_static_string ("quicklist")))) {
00893               switch (0) {
00894                      default:
00895                      {
00896                             DbusmenuServer* _tmp15_;
00897                             _tmp15_ = self->priv->_quicklist_server;
00898                             if (_tmp15_ != NULL) {
00899                                    DbusmenuServer* _tmp16_;
00900                                    const gchar* _tmp17_;
00901                                    GVariant* _tmp18_;
00902                                    _tmp16_ = self->priv->_quicklist_server;
00903                                    g_object_get ((GObject*) _tmp16_, "dbus-object", &object_path, NULL);
00904                                    _tmp17_ = object_path;
00905                                    _tmp18_ = _variant_new7 (_tmp17_);
00906                                    _g_variant_unref0 (v);
00907                                    v = _tmp18_;
00908                             } else {
00909                                    GVariant* _tmp19_;
00910                                    _tmp19_ = _variant_new8 ("");
00911                                    _g_variant_unref0 (v);
00912                                    v = _tmp19_;
00913                             }
00914                             break;
00915                      }
00916               }
00917        } else {
00918               switch (0) {
00919                      default:
00920                      {
00921                             _g_variant_unref0 (v);
00922                             v = NULL;
00923                             break;
00924                      }
00925               }
00926        }
00927        _tmp20_ = v;
00928        if (_tmp20_ != NULL) {
00929               GHashTable* _tmp21_;
00930               GParamSpec* _tmp22_;
00931               const gchar* _tmp23_;
00932               gchar* _tmp24_;
00933               GVariant* _tmp25_;
00934               GVariant* _tmp26_;
00935               _tmp21_ = self->priv->_queued_properties;
00936               _tmp22_ = pspec;
00937               _tmp23_ = _tmp22_->name;
00938               _tmp24_ = g_strdup (_tmp23_);
00939               _tmp25_ = v;
00940               _tmp26_ = _g_variant_ref0 (_tmp25_);
00941               g_hash_table_insert (_tmp21_, _tmp24_, _tmp26_);
00942        }
00943        _tmp27_ = self->priv->_property_source_id;
00944        if (_tmp27_ == ((guint) 0)) {
00945               guint _tmp28_ = 0U;
00946               _tmp28_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _unity_launcher_entry_dispatch_property_notification_gsource_func, g_object_ref (self), g_object_unref);
00947               self->priv->_property_source_id = _tmp28_;
00948        }
00949        _g_free0 (object_path);
00950        _g_variant_unref0 (v);
00951 }
00952 
00953 
00954 static gboolean unity_launcher_entry_dispatch_property_notification (UnityLauncherEntry* self) {
00955        gboolean result = FALSE;
00956        UnityInspector* _tmp0_ = NULL;
00957        gboolean _tmp1_;
00958        gboolean _tmp2_;
00959        GHashTable* _tmp6_;
00960        g_return_val_if_fail (self != NULL, FALSE);
00961        _tmp0_ = unity_inspector_get_default ();
00962        _tmp1_ = unity_inspector_get_unity_running (_tmp0_);
00963        _tmp2_ = _tmp1_;
00964        if (_tmp2_) {
00965               UnityLauncherEntryDBusImpl* _tmp3_;
00966               const gchar* _tmp4_;
00967               GHashTable* _tmp5_;
00968               _tmp3_ = self->priv->_dbus_impl;
00969               _tmp4_ = self->priv->_app_uri;
00970               _tmp5_ = self->priv->_queued_properties;
00971               g_signal_emit_by_name (_tmp3_, "update", _tmp4_, _tmp5_);
00972        }
00973        self->priv->_property_source_id = (guint) 0;
00974        _tmp6_ = self->priv->_queued_properties;
00975        g_hash_table_remove_all (_tmp6_);
00976        result = FALSE;
00977        return result;
00978 }
00979 
00980 
00981 static void unity_launcher_entry_on_unity_running_changed (UnityLauncherEntry* self, GObject* _inspector, GParamSpec* pspec) {
00982        GObject* _tmp0_;
00983        UnityInspector* _tmp1_;
00984        UnityInspector* inspector;
00985        UnityInspector* _tmp2_;
00986        gboolean _tmp3_;
00987        gboolean _tmp4_;
00988        GError * _inner_error_ = NULL;
00989        g_return_if_fail (self != NULL);
00990        g_return_if_fail (_inspector != NULL);
00991        g_return_if_fail (pspec != NULL);
00992        _tmp0_ = _inspector;
00993        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, UNITY_TYPE_INSPECTOR) ? ((UnityInspector*) _tmp0_) : NULL);
00994        inspector = _tmp1_;
00995        _tmp2_ = inspector;
00996        _tmp3_ = unity_inspector_get_unity_running (_tmp2_);
00997        _tmp4_ = _tmp3_;
00998        if (_tmp4_) {
00999               {
01000                      GDBusConnection* _tmp5_;
01001                      const char* _tmp6_;
01002                      GVariant* _tmp7_ = NULL;
01003                      GVariant* _tmp8_;
01004                      _tmp5_ = self->priv->_bus;
01005                      _tmp6_ = self->_object_path;
01006                      _tmp7_ = dee_serializable_serialize ((DeeSerializable*) self);
01007                      _tmp8_ = _tmp7_;
01008                      g_dbus_connection_emit_signal (_tmp5_, NULL, (const gchar*) _tmp6_, "com.canonical.Unity.LauncherEntry", "Update", _tmp8_, &_inner_error_);
01009                      _g_variant_unref0 (_tmp8_);
01010                      if (_inner_error_ != NULL) {
01011                             goto __catch15_g_error;
01012                      }
01013               }
01014               goto __finally15;
01015               __catch15_g_error:
01016               {
01017                      GError* e = NULL;
01018                      GError* _tmp9_;
01019                      const gchar* _tmp10_;
01020                      e = _inner_error_;
01021                      _inner_error_ = NULL;
01022                      _tmp9_ = e;
01023                      _tmp10_ = _tmp9_->message;
01024                      g_warning ("unity-launcher.vala:326: Failed to emit com.canonical.Unity.LauncherEn" \
01025 "try.Update on the session bus: %s", _tmp10_);
01026                      _g_error_free0 (e);
01027               }
01028               __finally15:
01029               if (_inner_error_ != NULL) {
01030                      _g_object_unref0 (inspector);
01031                      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);
01032                      g_clear_error (&_inner_error_);
01033                      return;
01034               }
01035        }
01036        _g_object_unref0 (inspector);
01037 }
01038 
01039 
01040 const gchar* unity_launcher_entry_get_app_uri (UnityLauncherEntry* self) {
01041        const gchar* result;
01042        const gchar* _tmp0_;
01043        g_return_val_if_fail (self != NULL, NULL);
01044        _tmp0_ = self->priv->_app_uri;
01045        result = _tmp0_;
01046        return result;
01047 }
01048 
01049 
01050 void unity_launcher_entry_set_app_uri (UnityLauncherEntry* self, const gchar* value) {
01051        const gchar* _tmp0_;
01052        gchar* _tmp1_;
01053        g_return_if_fail (self != NULL);
01054        _tmp0_ = value;
01055        _tmp1_ = g_strdup (_tmp0_);
01056        _g_free0 (self->priv->_app_uri);
01057        self->priv->_app_uri = _tmp1_;
01058        g_object_notify ((GObject *) self, "app-uri");
01059 }
01060 
01061 
01062 gint64 unity_launcher_entry_get_count (UnityLauncherEntry* self) {
01063        gint64 result;
01064        gint64 _tmp0_;
01065        g_return_val_if_fail (self != NULL, 0LL);
01066        _tmp0_ = self->priv->_count;
01067        result = _tmp0_;
01068        return result;
01069 }
01070 
01071 
01072 void unity_launcher_entry_set_count (UnityLauncherEntry* self, gint64 value) {
01073        gint64 _tmp0_;
01074        g_return_if_fail (self != NULL);
01075        _tmp0_ = value;
01076        self->priv->_count = _tmp0_;
01077        g_object_notify ((GObject *) self, "count");
01078 }
01079 
01080 
01081 gboolean unity_launcher_entry_get_count_visible (UnityLauncherEntry* self) {
01082        gboolean result;
01083        gboolean _tmp0_;
01084        g_return_val_if_fail (self != NULL, FALSE);
01085        _tmp0_ = self->priv->_count_visible;
01086        result = _tmp0_;
01087        return result;
01088 }
01089 
01090 
01091 void unity_launcher_entry_set_count_visible (UnityLauncherEntry* self, gboolean value) {
01092        gboolean _tmp0_;
01093        g_return_if_fail (self != NULL);
01094        _tmp0_ = value;
01095        self->priv->_count_visible = _tmp0_;
01096        g_object_notify ((GObject *) self, "count-visible");
01097 }
01098 
01099 
01100 gdouble unity_launcher_entry_get_progress (UnityLauncherEntry* self) {
01101        gdouble result;
01102        gdouble _tmp0_;
01103        g_return_val_if_fail (self != NULL, 0.0);
01104        _tmp0_ = self->priv->_progress;
01105        result = _tmp0_;
01106        return result;
01107 }
01108 
01109 
01110 void unity_launcher_entry_set_progress (UnityLauncherEntry* self, gdouble value) {
01111        gdouble _tmp0_;
01112        g_return_if_fail (self != NULL);
01113        _tmp0_ = value;
01114        self->priv->_progress = _tmp0_;
01115        g_object_notify ((GObject *) self, "progress");
01116 }
01117 
01118 
01119 gboolean unity_launcher_entry_get_progress_visible (UnityLauncherEntry* self) {
01120        gboolean result;
01121        gboolean _tmp0_;
01122        g_return_val_if_fail (self != NULL, FALSE);
01123        _tmp0_ = self->priv->_progress_visible;
01124        result = _tmp0_;
01125        return result;
01126 }
01127 
01128 
01129 void unity_launcher_entry_set_progress_visible (UnityLauncherEntry* self, gboolean value) {
01130        gboolean _tmp0_;
01131        g_return_if_fail (self != NULL);
01132        _tmp0_ = value;
01133        self->priv->_progress_visible = _tmp0_;
01134        g_object_notify ((GObject *) self, "progress-visible");
01135 }
01136 
01137 
01138 gboolean unity_launcher_entry_get_urgent (UnityLauncherEntry* self) {
01139        gboolean result;
01140        gboolean _tmp0_;
01141        g_return_val_if_fail (self != NULL, FALSE);
01142        _tmp0_ = self->priv->_urgent;
01143        result = _tmp0_;
01144        return result;
01145 }
01146 
01147 
01148 void unity_launcher_entry_set_urgent (UnityLauncherEntry* self, gboolean value) {
01149        gboolean _tmp0_;
01150        g_return_if_fail (self != NULL);
01151        _tmp0_ = value;
01152        self->priv->_urgent = _tmp0_;
01153        g_object_notify ((GObject *) self, "urgent");
01154 }
01155 
01156 
01157 DbusmenuMenuitem* unity_launcher_entry_get_quicklist (UnityLauncherEntry* self) {
01158        DbusmenuMenuitem* result;
01159        DbusmenuMenuitem* _tmp0_;
01160        g_return_val_if_fail (self != NULL, NULL);
01161        _tmp0_ = self->priv->_quicklist;
01162        result = _tmp0_;
01163        return result;
01164 }
01165 
01166 
01167 void unity_launcher_entry_set_quicklist (UnityLauncherEntry* self, DbusmenuMenuitem* value) {
01168        DbusmenuMenuitem* _tmp0_;
01169        DbusmenuMenuitem* _tmp1_;
01170        DbusmenuMenuitem* _tmp2_;
01171        g_return_if_fail (self != NULL);
01172        _tmp0_ = value;
01173        _tmp1_ = _g_object_ref0 (_tmp0_);
01174        _g_object_unref0 (self->priv->_quicklist);
01175        self->priv->_quicklist = _tmp1_;
01176        _tmp2_ = self->priv->_quicklist;
01177        if (_tmp2_ != NULL) {
01178               const char* _tmp3_;
01179               DbusmenuServer* _tmp4_;
01180               DbusmenuServer* _tmp5_;
01181               DbusmenuMenuitem* _tmp6_;
01182               _tmp3_ = self->_object_path;
01183               _tmp4_ = dbusmenu_server_new ((const gchar*) _tmp3_);
01184               _g_object_unref0 (self->priv->_quicklist_server);
01185               self->priv->_quicklist_server = _tmp4_;
01186               _tmp5_ = self->priv->_quicklist_server;
01187               _tmp6_ = self->priv->_quicklist;
01188               g_object_set (_tmp5_, "root-node", _tmp6_, NULL);
01189        }
01190        g_object_notify ((GObject *) self, "quicklist");
01191 }
01192 
01193 
01194 static void _unity_launcher_entry_on_unity_running_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01195        unity_launcher_entry_on_unity_running_changed (self, _sender, pspec);
01196 }
01197 
01198 
01199 static void _unity_launcher_entry_queue_property_notification_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01200        unity_launcher_entry_queue_property_notification (self, _sender, pspec);
01201 }
01202 
01203 
01204 static GObject * unity_launcher_entry_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
01205        GObject * obj;
01206        GObjectClass * parent_class;
01207        UnityLauncherEntry * self;
01208        GHashFunc _tmp0_;
01209        GEqualFunc _tmp1_;
01210        GHashTable* _tmp2_;
01211        GError * _inner_error_ = NULL;
01212        parent_class = G_OBJECT_CLASS (unity_launcher_entry_parent_class);
01213        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
01214        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_LAUNCHER_ENTRY, UnityLauncherEntry);
01215        _tmp0_ = g_str_hash;
01216        _tmp1_ = g_str_equal;
01217        _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_variant_unref0_);
01218        _g_hash_table_unref0 (self->priv->_queued_properties);
01219        self->priv->_queued_properties = _tmp2_;
01220        _g_object_unref0 (self->priv->_quicklist_server);
01221        self->priv->_quicklist_server = NULL;
01222        self->priv->_property_source_id = (guint) 0;
01223        {
01224               GDBusConnection* _tmp3_ = NULL;
01225               GDBusConnection* _tmp4_;
01226               const gchar* _tmp5_;
01227               guint _tmp6_ = 0U;
01228               gchar* _tmp7_ = NULL;
01229               gchar* _tmp8_;
01230               gchar* _tmp9_ = NULL;
01231               gchar* _tmp10_;
01232               char* _tmp11_;
01233               GDBusConnection* _tmp12_;
01234               const char* _tmp13_;
01235               UnityLauncherEntryDBusImpl* _tmp14_;
01236               UnityInspector* _tmp15_ = NULL;
01237               UnityInspector* _tmp16_;
01238               UnityInspector* inspector;
01239               UnityInspector* _tmp17_;
01240               _tmp3_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
01241               _tmp4_ = _tmp3_;
01242               if (_inner_error_ != NULL) {
01243                      if (_inner_error_->domain == G_IO_ERROR) {
01244                             goto __catch16_g_io_error;
01245                      }
01246                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
01247                      g_clear_error (&_inner_error_);
01248               }
01249               _g_object_unref0 (self->priv->_bus);
01250               self->priv->_bus = _tmp4_;
01251               _tmp5_ = self->priv->_app_uri;
01252               _tmp6_ = g_str_hash (_tmp5_);
01253               _tmp7_ = g_strdup_printf ("%u", _tmp6_);
01254               _tmp8_ = _tmp7_;
01255               _tmp9_ = g_strconcat ("/com/canonical/unity/launcherentry/", _tmp8_, NULL);
01256               _tmp10_ = _tmp9_;
01257               _tmp11_ = g_strdup (_tmp10_);
01258               _g_free0 (self->_object_path);
01259               self->_object_path = _tmp11_;
01260               _g_free0 (_tmp10_);
01261               _g_free0 (_tmp8_);
01262               _tmp12_ = self->priv->_bus;
01263               _tmp13_ = self->_object_path;
01264               _tmp14_ = unity_launcher_entry_dbus_impl_new (_tmp12_, _tmp13_, self);
01265               _g_object_unref0 (self->priv->_dbus_impl);
01266               self->priv->_dbus_impl = _tmp14_;
01267               _tmp15_ = unity_inspector_get_default ();
01268               _tmp16_ = _g_object_ref0 (_tmp15_);
01269               inspector = _tmp16_;
01270               _tmp17_ = inspector;
01271               g_signal_connect_object ((GObject*) _tmp17_, "notify::unity-running", (GCallback) _unity_launcher_entry_on_unity_running_changed_g_object_notify, self, 0);
01272               g_signal_connect_object ((GObject*) self, "notify", (GCallback) _unity_launcher_entry_queue_property_notification_g_object_notify, self, 0);
01273               _g_object_unref0 (inspector);
01274        }
01275        goto __finally16;
01276        __catch16_g_io_error:
01277        {
01278               GError* e = NULL;
01279               GError* _tmp18_;
01280               const gchar* _tmp19_;
01281               e = _inner_error_;
01282               _inner_error_ = NULL;
01283               _tmp18_ = e;
01284               _tmp19_ = _tmp18_->message;
01285               g_critical ("unity-launcher.vala:154: Unable to connect to session bus: %s", _tmp19_);
01286               _g_error_free0 (e);
01287        }
01288        __finally16:
01289        if (_inner_error_ != NULL) {
01290               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);
01291               g_clear_error (&_inner_error_);
01292        }
01293        return obj;
01294 }
01295 
01296 
01297 static GObject* _unity_launcher_entry_parse_serializable_dee_serializable_parse_func (GVariant* data) {
01298        GObject* result;
01299        result = unity_launcher_entry_parse_serializable (data);
01300        return result;
01301 }
01302 
01303 
01304 static void unity_launcher_entry_class_init (UnityLauncherEntryClass * klass) {
01305        GVariantType* _tmp0_;
01306        GVariantType* _tmp1_;
01307        unity_launcher_entry_parent_class = g_type_class_peek_parent (klass);
01308        g_type_class_add_private (klass, sizeof (UnityLauncherEntryPrivate));
01309        G_OBJECT_CLASS (klass)->get_property = _vala_unity_launcher_entry_get_property;
01310        G_OBJECT_CLASS (klass)->set_property = _vala_unity_launcher_entry_set_property;
01311        G_OBJECT_CLASS (klass)->constructor = unity_launcher_entry_constructor;
01312        G_OBJECT_CLASS (klass)->finalize = unity_launcher_entry_finalize;
01313        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_ENTRY_APP_URI, g_param_spec_string ("app-uri", "app-uri", "app-uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
01314        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_ENTRY_COUNT, g_param_spec_int64 ("count", "count", "count", G_MININT64, G_MAXINT64, (gint64) 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01315        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_ENTRY_COUNT_VISIBLE, g_param_spec_boolean ("count-visible", "count-visible", "count-visible", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01316        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_ENTRY_PROGRESS, g_param_spec_double ("progress", "progress", "progress", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01317        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_ENTRY_PROGRESS_VISIBLE, g_param_spec_boolean ("progress-visible", "progress-visible", "progress-visible", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01318        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_ENTRY_URGENT, g_param_spec_boolean ("urgent", "urgent", "urgent", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01319        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_ENTRY_QUICKLIST, g_param_spec_object ("quicklist", "quicklist", "quicklist", dbusmenu_menuitem_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01320        _tmp0_ = g_variant_type_new ("(sa{sv})");
01321        _tmp1_ = _tmp0_;
01322        dee_serializable_register_parser (UNITY_TYPE_LAUNCHER_ENTRY, _tmp1_, _unity_launcher_entry_parse_serializable_dee_serializable_parse_func);
01323        _g_variant_type_free0 (_tmp1_);
01324 }
01325 
01326 
01327 static void unity_launcher_entry_dee_serializable_interface_init (DeeSerializableIface * iface) {
01328        unity_launcher_entry_dee_serializable_parent_iface = g_type_interface_peek_parent (iface);
01329        iface->serialize = (GVariant* (*)(DeeSerializable*)) unity_launcher_entry_real_serialize;
01330 }
01331 
01332 
01333 static void unity_launcher_entry_instance_init (UnityLauncherEntry * self) {
01334        self->priv = UNITY_LAUNCHER_ENTRY_GET_PRIVATE (self);
01335        self->priv->_count = (gint64) 0;
01336        self->priv->_count_visible = FALSE;
01337        self->priv->_progress = 0.0;
01338        self->priv->_progress_visible = FALSE;
01339        self->priv->_urgent = FALSE;
01340 }
01341 
01342 
01343 static void unity_launcher_entry_finalize (GObject* obj) {
01344        UnityLauncherEntry * self;
01345        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_LAUNCHER_ENTRY, UnityLauncherEntry);
01346        _g_free0 (self->priv->_app_uri);
01347        _g_object_unref0 (self->priv->_quicklist);
01348        _g_hash_table_unref0 (self->priv->_queued_properties);
01349        _g_object_unref0 (self->priv->_quicklist_server);
01350        _g_object_unref0 (self->priv->_bus);
01351        _g_object_unref0 (self->priv->_dbus_impl);
01352        _g_free0 (self->_object_path);
01353        G_OBJECT_CLASS (unity_launcher_entry_parent_class)->finalize (obj);
01354 }
01355 
01356 
01368 GType unity_launcher_entry_get_type (void) {
01369        static volatile gsize unity_launcher_entry_type_id__volatile = 0;
01370        if (g_once_init_enter (&unity_launcher_entry_type_id__volatile)) {
01371               static const GTypeInfo g_define_type_info = { sizeof (UnityLauncherEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_launcher_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityLauncherEntry), 0, (GInstanceInitFunc) unity_launcher_entry_instance_init, NULL };
01372               static const GInterfaceInfo dee_serializable_info = { (GInterfaceInitFunc) unity_launcher_entry_dee_serializable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
01373               GType unity_launcher_entry_type_id;
01374               unity_launcher_entry_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityLauncherEntry", &g_define_type_info, 0);
01375               g_type_add_interface_static (unity_launcher_entry_type_id, dee_serializable_get_type (), &dee_serializable_info);
01376               g_once_init_leave (&unity_launcher_entry_type_id__volatile, unity_launcher_entry_type_id);
01377        }
01378        return unity_launcher_entry_type_id__volatile;
01379 }
01380 
01381 
01382 static void _vala_unity_launcher_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
01383        UnityLauncherEntry * self;
01384        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_LAUNCHER_ENTRY, UnityLauncherEntry);
01385        switch (property_id) {
01386               case UNITY_LAUNCHER_ENTRY_APP_URI:
01387               g_value_set_string (value, unity_launcher_entry_get_app_uri (self));
01388               break;
01389               case UNITY_LAUNCHER_ENTRY_COUNT:
01390               g_value_set_int64 (value, unity_launcher_entry_get_count (self));
01391               break;
01392               case UNITY_LAUNCHER_ENTRY_COUNT_VISIBLE:
01393               g_value_set_boolean (value, unity_launcher_entry_get_count_visible (self));
01394               break;
01395               case UNITY_LAUNCHER_ENTRY_PROGRESS:
01396               g_value_set_double (value, unity_launcher_entry_get_progress (self));
01397               break;
01398               case UNITY_LAUNCHER_ENTRY_PROGRESS_VISIBLE:
01399               g_value_set_boolean (value, unity_launcher_entry_get_progress_visible (self));
01400               break;
01401               case UNITY_LAUNCHER_ENTRY_URGENT:
01402               g_value_set_boolean (value, unity_launcher_entry_get_urgent (self));
01403               break;
01404               case UNITY_LAUNCHER_ENTRY_QUICKLIST:
01405               g_value_set_object (value, unity_launcher_entry_get_quicklist (self));
01406               break;
01407               default:
01408               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01409               break;
01410        }
01411 }
01412 
01413 
01414 static void _vala_unity_launcher_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
01415        UnityLauncherEntry * self;
01416        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_LAUNCHER_ENTRY, UnityLauncherEntry);
01417        switch (property_id) {
01418               case UNITY_LAUNCHER_ENTRY_APP_URI:
01419               unity_launcher_entry_set_app_uri (self, g_value_get_string (value));
01420               break;
01421               case UNITY_LAUNCHER_ENTRY_COUNT:
01422               unity_launcher_entry_set_count (self, g_value_get_int64 (value));
01423               break;
01424               case UNITY_LAUNCHER_ENTRY_COUNT_VISIBLE:
01425               unity_launcher_entry_set_count_visible (self, g_value_get_boolean (value));
01426               break;
01427               case UNITY_LAUNCHER_ENTRY_PROGRESS:
01428               unity_launcher_entry_set_progress (self, g_value_get_double (value));
01429               break;
01430               case UNITY_LAUNCHER_ENTRY_PROGRESS_VISIBLE:
01431               unity_launcher_entry_set_progress_visible (self, g_value_get_boolean (value));
01432               break;
01433               case UNITY_LAUNCHER_ENTRY_URGENT:
01434               unity_launcher_entry_set_urgent (self, g_value_get_boolean (value));
01435               break;
01436               case UNITY_LAUNCHER_ENTRY_QUICKLIST:
01437               unity_launcher_entry_set_quicklist (self, g_value_get_object (value));
01438               break;
01439               default:
01440               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01441               break;
01442        }
01443 }
01444 
01445 
01446 static GVariant* _variant_new9 (gint64 value) {
01447        return g_variant_ref_sink (g_variant_new_int64 (value));
01448 }
01449 
01450 
01451 static GVariant* _variant_new10 (gboolean value) {
01452        return g_variant_ref_sink (g_variant_new_boolean (value));
01453 }
01454 
01455 
01456 static GVariant* _variant_new11 (gdouble value) {
01457        return g_variant_ref_sink (g_variant_new_double (value));
01458 }
01459 
01460 
01461 static GVariant* _variant_new12 (gboolean value) {
01462        return g_variant_ref_sink (g_variant_new_boolean (value));
01463 }
01464 
01465 
01466 static GVariant* _variant_new13 (gboolean value) {
01467        return g_variant_ref_sink (g_variant_new_boolean (value));
01468 }
01469 
01470 
01471 static GVariant* _variant_new14 (const char* value) {
01472        return g_variant_ref_sink (g_variant_new_object_path (value));
01473 }
01474 
01475 
01476 GHashTable* unity_collect_launcher_entry_properties (UnityLauncherEntry* l) {
01477        GHashTable* result = NULL;
01478        GHashFunc _tmp0_;
01479        GEqualFunc _tmp1_;
01480        GHashTable* _tmp2_;
01481        GHashTable* props;
01482        GHashTable* _tmp3_;
01483        gchar* _tmp4_;
01484        UnityLauncherEntry* _tmp5_;
01485        gint64 _tmp6_;
01486        gint64 _tmp7_;
01487        GVariant* _tmp8_;
01488        GHashTable* _tmp9_;
01489        gchar* _tmp10_;
01490        UnityLauncherEntry* _tmp11_;
01491        gboolean _tmp12_;
01492        gboolean _tmp13_;
01493        GVariant* _tmp14_;
01494        GHashTable* _tmp15_;
01495        gchar* _tmp16_;
01496        UnityLauncherEntry* _tmp17_;
01497        gdouble _tmp18_;
01498        gdouble _tmp19_;
01499        GVariant* _tmp20_;
01500        GHashTable* _tmp21_;
01501        gchar* _tmp22_;
01502        UnityLauncherEntry* _tmp23_;
01503        gboolean _tmp24_;
01504        gboolean _tmp25_;
01505        GVariant* _tmp26_;
01506        GHashTable* _tmp27_;
01507        gchar* _tmp28_;
01508        UnityLauncherEntry* _tmp29_;
01509        gboolean _tmp30_;
01510        gboolean _tmp31_;
01511        GVariant* _tmp32_;
01512        UnityLauncherEntry* _tmp33_;
01513        DbusmenuMenuitem* _tmp34_;
01514        DbusmenuMenuitem* _tmp35_;
01515        g_return_val_if_fail (l != NULL, NULL);
01516        _tmp0_ = g_str_hash;
01517        _tmp1_ = g_str_equal;
01518        _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_variant_unref0_);
01519        props = _tmp2_;
01520        _tmp3_ = props;
01521        _tmp4_ = g_strdup ("count");
01522        _tmp5_ = l;
01523        _tmp6_ = unity_launcher_entry_get_count (_tmp5_);
01524        _tmp7_ = _tmp6_;
01525        _tmp8_ = _variant_new9 (_tmp7_);
01526        g_hash_table_insert (_tmp3_, _tmp4_, _tmp8_);
01527        _tmp9_ = props;
01528        _tmp10_ = g_strdup ("count-visible");
01529        _tmp11_ = l;
01530        _tmp12_ = unity_launcher_entry_get_count_visible (_tmp11_);
01531        _tmp13_ = _tmp12_;
01532        _tmp14_ = _variant_new10 (_tmp13_);
01533        g_hash_table_insert (_tmp9_, _tmp10_, _tmp14_);
01534        _tmp15_ = props;
01535        _tmp16_ = g_strdup ("progress");
01536        _tmp17_ = l;
01537        _tmp18_ = unity_launcher_entry_get_progress (_tmp17_);
01538        _tmp19_ = _tmp18_;
01539        _tmp20_ = _variant_new11 (_tmp19_);
01540        g_hash_table_insert (_tmp15_, _tmp16_, _tmp20_);
01541        _tmp21_ = props;
01542        _tmp22_ = g_strdup ("progress-visible");
01543        _tmp23_ = l;
01544        _tmp24_ = unity_launcher_entry_get_progress_visible (_tmp23_);
01545        _tmp25_ = _tmp24_;
01546        _tmp26_ = _variant_new12 (_tmp25_);
01547        g_hash_table_insert (_tmp21_, _tmp22_, _tmp26_);
01548        _tmp27_ = props;
01549        _tmp28_ = g_strdup ("urgent");
01550        _tmp29_ = l;
01551        _tmp30_ = unity_launcher_entry_get_urgent (_tmp29_);
01552        _tmp31_ = _tmp30_;
01553        _tmp32_ = _variant_new13 (_tmp31_);
01554        g_hash_table_insert (_tmp27_, _tmp28_, _tmp32_);
01555        _tmp33_ = l;
01556        _tmp34_ = unity_launcher_entry_get_quicklist (_tmp33_);
01557        _tmp35_ = _tmp34_;
01558        if (_tmp35_ != NULL) {
01559               GHashTable* _tmp36_;
01560               gchar* _tmp37_;
01561               UnityLauncherEntry* _tmp38_;
01562               const char* _tmp39_;
01563               GVariant* _tmp40_;
01564               _tmp36_ = props;
01565               _tmp37_ = g_strdup ("quicklist");
01566               _tmp38_ = l;
01567               _tmp39_ = _tmp38_->_object_path;
01568               _tmp40_ = _variant_new14 (_tmp39_);
01569               g_hash_table_insert (_tmp36_, _tmp37_, _tmp40_);
01570        }
01571        result = props;
01572        return result;
01573 }
01574 
01575 
01576 static void _unity_launcher_favorites_reset_fav_cache_g_settings_changed (GSettings* _sender, const gchar* key, gpointer self) {
01577        unity_launcher_favorites_reset_fav_cache (self);
01578 }
01579 
01580 
01581 static UnityLauncherFavorites* unity_launcher_favorites_construct (GType object_type) {
01582        UnityLauncherFavorites * self = NULL;
01583        GSettings* _tmp0_;
01584        GHashFunc _tmp1_;
01585        GEqualFunc _tmp2_;
01586        GHashTable* _tmp3_;
01587        GSettings* _tmp4_;
01588        self = (UnityLauncherFavorites*) g_object_new (object_type, NULL);
01589        _tmp0_ = g_settings_new ("com.canonical.Unity.Launcher");
01590        _g_object_unref0 (self->priv->settings);
01591        self->priv->settings = _tmp0_;
01592        _tmp1_ = g_str_hash;
01593        _tmp2_ = g_str_equal;
01594        _tmp3_ = g_hash_table_new_full (_tmp1_, _tmp2_, _g_free0_, _g_object_unref0_);
01595        _g_hash_table_unref0 (self->priv->fav_cache);
01596        self->priv->fav_cache = _tmp3_;
01597        unity_launcher_favorites_reset_fav_cache (self);
01598        _tmp4_ = self->priv->settings;
01599        g_signal_connect_object (_tmp4_, "changed::favorites", (GCallback) _unity_launcher_favorites_reset_fav_cache_g_settings_changed, self, 0);
01600        return self;
01601 }
01602 
01603 
01604 static UnityLauncherFavorites* unity_launcher_favorites_new (void) {
01605        return unity_launcher_favorites_construct (UNITY_TYPE_LAUNCHER_FAVORITES);
01606 }
01607 
01608 
01609 static void unity_launcher_favorites_reset_fav_cache (UnityLauncherFavorites* self) {
01610        GHashTable* _tmp0_;
01611        GSettings* _tmp1_;
01612        gchar** _tmp2_;
01613        gchar** _tmp3_ = NULL;
01614        gchar** _tmp4_;
01615        gint _tmp4__length1;
01616        g_return_if_fail (self != NULL);
01617        _tmp0_ = self->priv->fav_cache;
01618        g_hash_table_remove_all (_tmp0_);
01619        _tmp1_ = self->priv->settings;
01620        _tmp3_ = _tmp2_ = g_settings_get_strv (_tmp1_, "favorites");
01621        self->priv->fav_list = (_vala_array_free (self->priv->fav_list, self->priv->fav_list_length1, (GDestroyNotify) g_free), NULL);
01622        self->priv->fav_list = _tmp3_;
01623        self->priv->fav_list_length1 = _vala_array_length (_tmp2_);
01624        self->priv->_fav_list_size_ = self->priv->fav_list_length1;
01625        _tmp4_ = self->priv->fav_list;
01626        _tmp4__length1 = self->priv->fav_list_length1;
01627        {
01628               gchar** id_collection = NULL;
01629               gint id_collection_length1 = 0;
01630               gint _id_collection_size_ = 0;
01631               gint id_it = 0;
01632               id_collection = _tmp4_;
01633               id_collection_length1 = _tmp4__length1;
01634               for (id_it = 0; id_it < _tmp4__length1; id_it = id_it + 1) {
01635                      gchar* _tmp5_;
01636                      gchar* id = NULL;
01637                      _tmp5_ = g_strdup (id_collection[id_it]);
01638                      id = _tmp5_;
01639                      {
01640                             GHashTable* _tmp6_;
01641                             const gchar* _tmp7_;
01642                             gchar* _tmp8_;
01643                             _tmp6_ = self->priv->fav_cache;
01644                             _tmp7_ = id;
01645                             _tmp8_ = g_strdup (_tmp7_);
01646                             g_hash_table_insert (_tmp6_, _tmp8_, NULL);
01647                             _g_free0 (id);
01648                      }
01649               }
01650        }
01651        g_signal_emit_by_name (self, "changed");
01652 }
01653 
01654 
01663 UnityLauncherFavorites* unity_launcher_favorites_get_default (void) {
01664        UnityLauncherFavorites* result = NULL;
01665        UnityLauncherFavorites* _tmp0_;
01666        UnityLauncherFavorites* _tmp2_;
01667        _tmp0_ = unity_launcher_favorites_singleton;
01668        if (_tmp0_ == NULL) {
01669               UnityLauncherFavorites* _tmp1_;
01670               _tmp1_ = unity_launcher_favorites_new ();
01671               _g_object_unref0 (unity_launcher_favorites_singleton);
01672               unity_launcher_favorites_singleton = _tmp1_;
01673        }
01674        _tmp2_ = unity_launcher_favorites_singleton;
01675        result = _tmp2_;
01676        return result;
01677 }
01678 
01679 
01680 gboolean unity_launcher_favorites_has_app_info (UnityLauncherFavorites* self, GAppInfo* appinfo) {
01681        gboolean result = FALSE;
01682        GAppInfo* _tmp0_;
01683        const gchar* _tmp1_ = NULL;
01684        GAppInfo* _tmp2_;
01685        const gchar* _tmp3_ = NULL;
01686        gboolean _tmp4_ = FALSE;
01687        g_return_val_if_fail (self != NULL, FALSE);
01688        g_return_val_if_fail (appinfo != NULL, FALSE);
01689        _tmp0_ = appinfo;
01690        _tmp1_ = g_app_info_get_id (_tmp0_);
01691        if (_tmp1_ == NULL) {
01692               g_critical ("unity-launcher.vala:400: Can not look up favorite for AppInfo with NUL" \
01693 "L id");
01694               result = FALSE;
01695               return result;
01696        }
01697        _tmp2_ = appinfo;
01698        _tmp3_ = g_app_info_get_id (_tmp2_);
01699        _tmp4_ = unity_launcher_favorites_has_app_id (self, _tmp3_);
01700        result = _tmp4_;
01701        return result;
01702 }
01703 
01704 
01705 gboolean unity_launcher_favorites_has_app_id (UnityLauncherFavorites* self, const gchar* app_id) {
01706        gboolean result = FALSE;
01707        GHashTable* _tmp0_;
01708        const gchar* _tmp1_;
01709        gboolean _tmp2_ = FALSE;
01710        g_return_val_if_fail (self != NULL, FALSE);
01711        g_return_val_if_fail (app_id != NULL, FALSE);
01712        _tmp0_ = self->priv->fav_cache;
01713        _tmp1_ = app_id;
01714        _tmp2_ = g_hash_table_lookup_extended (_tmp0_, _tmp1_, NULL, NULL);
01715        result = _tmp2_;
01716        return result;
01717 }
01718 
01719 
01720 GAppInfo* unity_launcher_favorites_lookup (UnityLauncherFavorites* self, const gchar* app_id) {
01721        GAppInfo* result = NULL;
01722        GAppInfo* appinfo = NULL;
01723        GHashTable* _tmp0_;
01724        const gchar* _tmp1_;
01725        gconstpointer _tmp2_ = NULL;
01726        gboolean _tmp3_ = FALSE;
01727        GAppInfo* _tmp4_;
01728        gboolean has_id;
01729        gboolean _tmp5_;
01730        g_return_val_if_fail (self != NULL, NULL);
01731        g_return_val_if_fail (app_id != NULL, NULL);
01732        _tmp0_ = self->priv->fav_cache;
01733        _tmp1_ = app_id;
01734        _tmp3_ = g_hash_table_lookup_extended (_tmp0_, _tmp1_, NULL, &_tmp2_);
01735        _g_object_unref0 (appinfo);
01736        _tmp4_ = _g_object_ref0 (_tmp2_);
01737        appinfo = _tmp4_;
01738        has_id = _tmp3_;
01739        _tmp5_ = has_id;
01740        if (_tmp5_) {
01741               GAppInfo* _tmp6_;
01742               UnityAppInfoManager* _tmp7_ = NULL;
01743               UnityAppInfoManager* appman;
01744               UnityAppInfoManager* _tmp8_;
01745               const gchar* _tmp9_;
01746               GAppInfo* _tmp10_ = NULL;
01747               GHashTable* _tmp11_;
01748               const gchar* _tmp12_;
01749               gchar* _tmp13_;
01750               GAppInfo* _tmp14_;
01751               GAppInfo* _tmp15_;
01752               GAppInfo* _tmp16_;
01753               _tmp6_ = appinfo;
01754               if (_tmp6_ != NULL) {
01755                      result = appinfo;
01756                      return result;
01757               }
01758               _tmp7_ = unity_app_info_manager_get_default ();
01759               appman = _tmp7_;
01760               _tmp8_ = appman;
01761               _tmp9_ = app_id;
01762               _tmp10_ = unity_app_info_manager_lookup (_tmp8_, _tmp9_);
01763               _g_object_unref0 (appinfo);
01764               appinfo = _tmp10_;
01765               _tmp11_ = self->priv->fav_cache;
01766               _tmp12_ = app_id;
01767               _tmp13_ = g_strdup (_tmp12_);
01768               _tmp14_ = appinfo;
01769               _tmp15_ = _g_object_ref0 (_tmp14_);
01770               g_hash_table_insert (_tmp11_, _tmp13_, _tmp15_);
01771               _tmp16_ = appinfo;
01772               if (_tmp16_ == NULL) {
01773                      const gchar* _tmp17_;
01774                      _tmp17_ = app_id;
01775                      g_critical ("unity-launcher.vala:432: Can't find AppInfo for favorite '%s'", _tmp17_);
01776                      result = NULL;
01777                      _g_object_unref0 (appman);
01778                      _g_object_unref0 (appinfo);
01779                      return result;
01780               }
01781               result = appinfo;
01782               _g_object_unref0 (appman);
01783               return result;
01784        }
01785        result = NULL;
01786        _g_object_unref0 (appinfo);
01787        return result;
01788 }
01789 
01790 
01791 static gchar** _vala_array_dup2 (gchar** self, int length) {
01792        gchar** result;
01793        int i;
01794        result = g_new0 (gchar*, length + 1);
01795        for (i = 0; i < length; i++) {
01796               gchar* _tmp0_;
01797               _tmp0_ = g_strdup (self[i]);
01798               result[i] = _tmp0_;
01799        }
01800        return result;
01801 }
01802 
01803 
01804 gchar** unity_launcher_favorites_enumerate_ids (UnityLauncherFavorites* self, int* result_length1) {
01805        gchar** result = NULL;
01806        gchar** _tmp0_;
01807        gint _tmp0__length1;
01808        gchar** _tmp1_;
01809        gint _tmp1__length1;
01810        gchar** _tmp2_;
01811        gint _tmp2__length1;
01812        g_return_val_if_fail (self != NULL, NULL);
01813        _tmp0_ = self->priv->fav_list;
01814        _tmp0__length1 = self->priv->fav_list_length1;
01815        _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup2 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
01816        _tmp1__length1 = _tmp0__length1;
01817        _tmp2_ = _tmp1_;
01818        _tmp2__length1 = _tmp1__length1;
01819        if (result_length1) {
01820               *result_length1 = _tmp2__length1;
01821        }
01822        result = _tmp2_;
01823        return result;
01824 }
01825 
01826 
01827 GAppInfo** unity_launcher_favorites_enumerate_app_infos (UnityLauncherFavorites* self, int* result_length1) {
01828        GAppInfo** result = NULL;
01829        gint i;
01830        GHashTable* _tmp0_;
01831        guint _tmp1_ = 0U;
01832        GAppInfo** _tmp2_ = NULL;
01833        GAppInfo** infos;
01834        gint infos_length1;
01835        gint _infos_size_;
01836        gchar** _tmp3_;
01837        gint _tmp3__length1;
01838        GAppInfo** _tmp13_;
01839        gint _tmp13__length1;
01840        g_return_val_if_fail (self != NULL, NULL);
01841        i = 0;
01842        _tmp0_ = self->priv->fav_cache;
01843        _tmp1_ = g_hash_table_size (_tmp0_);
01844        _tmp2_ = g_new0 (GAppInfo*, _tmp1_ + 1);
01845        infos = _tmp2_;
01846        infos_length1 = _tmp1_;
01847        _infos_size_ = infos_length1;
01848        _tmp3_ = self->priv->fav_list;
01849        _tmp3__length1 = self->priv->fav_list_length1;
01850        {
01851               gchar** id_collection = NULL;
01852               gint id_collection_length1 = 0;
01853               gint _id_collection_size_ = 0;
01854               gint id_it = 0;
01855               id_collection = _tmp3_;
01856               id_collection_length1 = _tmp3__length1;
01857               for (id_it = 0; id_it < _tmp3__length1; id_it = id_it + 1) {
01858                      gchar* _tmp4_;
01859                      gchar* id = NULL;
01860                      _tmp4_ = g_strdup (id_collection[id_it]);
01861                      id = _tmp4_;
01862                      {
01863                             const gchar* _tmp5_;
01864                             GAppInfo* _tmp6_ = NULL;
01865                             GAppInfo* appinfo;
01866                             GAppInfo** _tmp7_;
01867                             gint _tmp7__length1;
01868                             gint _tmp8_;
01869                             GAppInfo* _tmp9_;
01870                             GAppInfo* _tmp10_;
01871                             GAppInfo* _tmp11_;
01872                             gint _tmp12_;
01873                             _tmp5_ = id;
01874                             _tmp6_ = unity_launcher_favorites_lookup (self, _tmp5_);
01875                             appinfo = _tmp6_;
01876                             _tmp7_ = infos;
01877                             _tmp7__length1 = infos_length1;
01878                             _tmp8_ = i;
01879                             _tmp9_ = appinfo;
01880                             _tmp10_ = _g_object_ref0 (_tmp9_);
01881                             _g_object_unref0 (_tmp7_[_tmp8_]);
01882                             _tmp7_[_tmp8_] = _tmp10_;
01883                             _tmp11_ = _tmp7_[_tmp8_];
01884                             _tmp12_ = i;
01885                             i = _tmp12_ + 1;
01886                             _g_object_unref0 (appinfo);
01887                             _g_free0 (id);
01888                      }
01889               }
01890        }
01891        _tmp13_ = infos;
01892        _tmp13__length1 = infos_length1;
01893        if (result_length1) {
01894               *result_length1 = _tmp13__length1;
01895        }
01896        result = _tmp13_;
01897        return result;
01898 }
01899 
01900 
01901 static void unity_launcher_favorites_class_init (UnityLauncherFavoritesClass * klass) {
01902        unity_launcher_favorites_parent_class = g_type_class_peek_parent (klass);
01903        g_type_class_add_private (klass, sizeof (UnityLauncherFavoritesPrivate));
01904        G_OBJECT_CLASS (klass)->finalize = unity_launcher_favorites_finalize;
01905        g_signal_new ("changed", UNITY_TYPE_LAUNCHER_FAVORITES, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
01906 }
01907 
01908 
01909 static void unity_launcher_favorites_instance_init (UnityLauncherFavorites * self) {
01910        self->priv = UNITY_LAUNCHER_FAVORITES_GET_PRIVATE (self);
01911 }
01912 
01913 
01914 static void unity_launcher_favorites_finalize (GObject* obj) {
01915        UnityLauncherFavorites * self;
01916        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_LAUNCHER_FAVORITES, UnityLauncherFavorites);
01917        _g_object_unref0 (self->priv->settings);
01918        _g_hash_table_unref0 (self->priv->fav_cache);
01919        self->priv->fav_list = (_vala_array_free (self->priv->fav_list, self->priv->fav_list_length1, (GDestroyNotify) g_free), NULL);
01920        G_OBJECT_CLASS (unity_launcher_favorites_parent_class)->finalize (obj);
01921 }
01922 
01923 
01924 GType unity_launcher_favorites_get_type (void) {
01925        static volatile gsize unity_launcher_favorites_type_id__volatile = 0;
01926        if (g_once_init_enter (&unity_launcher_favorites_type_id__volatile)) {
01927               static const GTypeInfo g_define_type_info = { sizeof (UnityLauncherFavoritesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_launcher_favorites_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityLauncherFavorites), 0, (GInstanceInitFunc) unity_launcher_favorites_instance_init, NULL };
01928               GType unity_launcher_favorites_type_id;
01929               unity_launcher_favorites_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityLauncherFavorites", &g_define_type_info, 0);
01930               g_once_init_leave (&unity_launcher_favorites_type_id__volatile, unity_launcher_favorites_type_id);
01931        }
01932        return unity_launcher_favorites_type_id__volatile;
01933 }
01934 
01935 
01936 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
01937        if ((array != NULL) && (destroy_func != NULL)) {
01938               int i;
01939               for (i = 0; i < array_length; i = i + 1) {
01940                      if (((gpointer*) array)[i] != NULL) {
01941                             destroy_func (((gpointer*) array)[i]);
01942                      }
01943               }
01944        }
01945 }
01946 
01947 
01948 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
01949        _vala_array_destroy (array, array_length, destroy_func);
01950        g_free (array);
01951 }
01952 
01953 
01954 static gint _vala_array_length (gpointer array) {
01955        int length;
01956        length = 0;
01957        if (array) {
01958               while (((gpointer*) array)[length]) {
01959                      length++;
01960               }
01961        }
01962        return length;
01963 }
01964 
01965 
01966