Back to index

libunity  5.92.0
unity-previews.c
Go to the documentation of this file.
00001 /* unity-previews.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-previews.vala, do not modify */
00003 
00004 /*
00005  * Copyright (C) 2011 Canonical, Ltd.
00006  *
00007  * This library is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU Lesser General Public License
00009  * version 3.0 as published by the Free Software Foundation.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License version 3.0 for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library. If not, see
00018  * <http://www.gnu.org/licenses/>.
00019  *
00020  * Authored by Neil Jagdish Patel <neil.patel@canonical.com>
00021  *
00022  */
00023 
00024 #include <glib.h>
00025 #include <glib-object.h>
00026 #include "unity.h"
00027 #include <unity-protocol.h>
00028 #include <stdlib.h>
00029 #include <string.h>
00030 #include <dee.h>
00031 #include <gio/gio.h>
00032 #include <float.h>
00033 #include <math.h>
00034 
00035 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00036 #define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
00037 #define _g_free0(var) (var = (g_free (var), NULL))
00038 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
00039 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
00040 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00041 #define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
00042 
00043 #define UNITY_MUSIC_PREVIEW_TYPE_TRACK_DATA_COLUMNS (unity_music_preview_track_data_columns_get_type ())
00044 
00045 #define UNITY_TYPE_ASYNC_PREVIEW (unity_async_preview_get_type ())
00046 #define UNITY_ASYNC_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_ASYNC_PREVIEW, UnityAsyncPreview))
00047 #define UNITY_ASYNC_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_ASYNC_PREVIEW, UnityAsyncPreviewClass))
00048 #define UNITY_IS_ASYNC_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_ASYNC_PREVIEW))
00049 #define UNITY_IS_ASYNC_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_ASYNC_PREVIEW))
00050 #define UNITY_ASYNC_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_ASYNC_PREVIEW, UnityAsyncPreviewClass))
00051 
00052 typedef struct _UnityAsyncPreview UnityAsyncPreview;
00053 typedef struct _UnityAsyncPreviewClass UnityAsyncPreviewClass;
00054 typedef struct _UnityAsyncPreviewPrivate UnityAsyncPreviewPrivate;
00055 
00056 struct _UnityPreviewPrivate {
00057        UnityProtocolPreview* _raw;
00058        GPtrArray* _actions;
00059 };
00060 
00061 struct _UnityPreviewActionPrivate {
00062        gchar* _id;
00063        gchar* _display_name;
00064        GIcon* _icon_hint;
00065        UnityLayoutHint _layout_hint;
00066 };
00067 
00068 struct _UnityInfoHintPrivate {
00069        gchar* _id;
00070        gchar* _display_name;
00071        GIcon* _icon_hint;
00072        GVariant* _data;
00073 };
00074 
00075 struct _UnityApplicationPreviewPrivate {
00076        UnityProtocolApplicationPreview* _raw;
00077 };
00078 
00079 struct _UnityMusicPreviewPrivate {
00080        DeeSharedModel* _track_data;
00081        gfloat _current_progress;
00082        gchar* _current_track_uri;
00083        UnityMusicPreviewTrackState _current_track_state;
00084        UnityProtocolMusicPreview* _raw;
00085 };
00086 
00087 typedef enum  {
00088        UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_URI,
00089        UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_TRACK_NO,
00090        UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_TITLE,
00091        UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_LENGTH,
00092        UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING,
00093        UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PROGRESS
00094 } UnityMusicPreviewTrackDataColumns;
00095 
00096 struct _UnityMoviePreviewPrivate {
00097        UnityProtocolMoviePreview* _raw;
00098 };
00099 
00100 struct _UnitySeriesItemPrivate {
00101        gchar* _uri;
00102        gchar* _title;
00103        GIcon* _icon_hint;
00104 };
00105 
00106 struct _UnitySeriesPreviewPrivate {
00107        gchar* _current_item_uri;
00108        gint _selected_item;
00109        UnityPreview* _child_preview;
00110        UnityProtocolSeriesPreview* _raw;
00111 };
00112 
00113 struct _UnityAsyncPreview {
00114        UnityPreview parent_instance;
00115        UnityAsyncPreviewPrivate * priv;
00116 };
00117 
00118 struct _UnityAsyncPreviewClass {
00119        UnityPreviewClass parent_class;
00120 };
00121 
00122 struct _UnityAsyncPreviewPrivate {
00123        GCancellable* _cancellable;
00124 };
00125 
00126 
00127 static gpointer unity_preview_parent_class = NULL;
00128 static DeeSerializableIface* unity_preview_dee_serializable_parent_iface = NULL;
00129 static gpointer unity_preview_action_parent_class = NULL;
00130 static DeeSerializableIface* unity_preview_action_dee_serializable_parent_iface = NULL;
00131 static gpointer unity_info_hint_parent_class = NULL;
00132 static gpointer unity_generic_preview_parent_class = NULL;
00133 static gpointer unity_application_preview_parent_class = NULL;
00134 static gpointer unity_music_preview_parent_class = NULL;
00135 static gpointer unity_movie_preview_parent_class = NULL;
00136 static gpointer unity_series_item_parent_class = NULL;
00137 static gpointer unity_series_preview_parent_class = NULL;
00138 static DeeSerializableIface* unity_series_preview_dee_serializable_parent_iface = NULL;
00139 static gpointer unity_async_preview_parent_class = NULL;
00140 
00141 #define UNITY_PREVIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_PREVIEW, UnityPreviewPrivate))
00142 enum  {
00143        UNITY_PREVIEW_DUMMY_PROPERTY,
00144        UNITY_PREVIEW_TITLE,
00145        UNITY_PREVIEW_SUBTITLE,
00146        UNITY_PREVIEW_DESCRIPTION_MARKUP,
00147        UNITY_PREVIEW_THUMBNAIL
00148 };
00149 static void _g_object_unref0_ (gpointer var);
00150 UnityProtocolPreview* unity_preview_get_raw (UnityPreview* self);
00151 GObject* unity_preview_create_raw (UnityPreview* self);
00152 static GObject* unity_preview_real_create_raw (UnityPreview* self);
00153 GHashTable* unity_preview_update_property (UnityPreview* self, GHashTable* values);
00154 static GHashTable* unity_preview_real_update_property (UnityPreview* self, GHashTable* values);
00155 static void _g_free0_ (gpointer var);
00156 static void _g_variant_unref0_ (gpointer var);
00157 GPtrArray* unity_preview_get_actions (UnityPreview* self);
00158 static GVariant* unity_preview_real_serialize (DeeSerializable* base);
00159 void unity_preview_dummy1 (UnityPreview* self);
00160 static void unity_preview_real_dummy1 (UnityPreview* self);
00161 void unity_preview_dummy2 (UnityPreview* self);
00162 static void unity_preview_real_dummy2 (UnityPreview* self);
00163 void unity_preview_dummy3 (UnityPreview* self);
00164 static void unity_preview_real_dummy3 (UnityPreview* self);
00165 void unity_preview_dummy4 (UnityPreview* self);
00166 static void unity_preview_real_dummy4 (UnityPreview* self);
00167 static GObject * unity_preview_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00168 static void unity_preview_finalize (GObject* obj);
00169 static void _vala_unity_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00170 static void _vala_unity_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00171 #define UNITY_PREVIEW_ACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_PREVIEW_ACTION, UnityPreviewActionPrivate))
00172 enum  {
00173        UNITY_PREVIEW_ACTION_DUMMY_PROPERTY,
00174        UNITY_PREVIEW_ACTION_ID,
00175        UNITY_PREVIEW_ACTION_DISPLAY_NAME,
00176        UNITY_PREVIEW_ACTION_ICON_HINT,
00177        UNITY_PREVIEW_ACTION_LAYOUT_HINT
00178 };
00179 static GVariant* unity_preview_action_real_serialize (DeeSerializable* base);
00180 static GVariant* _variant_new17 (const gchar* value);
00181 static GVariant* _variant_new18 (const gchar* value);
00182 static GVariant* _variant_new19 (guint value);
00183 static GVariant* _variant_new20 (GHashTable* value);
00184 void unity_preview_action_dummy1 (UnityPreviewAction* self);
00185 static void unity_preview_action_real_dummy1 (UnityPreviewAction* self);
00186 void unity_preview_action_dummy2 (UnityPreviewAction* self);
00187 static void unity_preview_action_real_dummy2 (UnityPreviewAction* self);
00188 void unity_preview_action_dummy3 (UnityPreviewAction* self);
00189 static void unity_preview_action_real_dummy3 (UnityPreviewAction* self);
00190 void unity_preview_action_dummy4 (UnityPreviewAction* self);
00191 static void unity_preview_action_real_dummy4 (UnityPreviewAction* self);
00192 static void g_cclosure_user_marshal_OBJECT__STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
00193 static GObject* _unity_preview_action___lambda4_ (GVariant* data);
00194 static GObject* __unity_preview_action___lambda4__dee_serializable_parse_func (GVariant* data);
00195 static void unity_preview_action_finalize (GObject* obj);
00196 static void _vala_unity_preview_action_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00197 static void _vala_unity_preview_action_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00198 #define UNITY_INFO_HINT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_INFO_HINT, UnityInfoHintPrivate))
00199 enum  {
00200        UNITY_INFO_HINT_DUMMY_PROPERTY,
00201        UNITY_INFO_HINT_ID,
00202        UNITY_INFO_HINT_DISPLAY_NAME,
00203        UNITY_INFO_HINT_ICON_HINT,
00204        UNITY_INFO_HINT_DATA
00205 };
00206 static void unity_info_hint_finalize (GObject* obj);
00207 static void _vala_unity_info_hint_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00208 static void _vala_unity_info_hint_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00209 enum  {
00210        UNITY_GENERIC_PREVIEW_DUMMY_PROPERTY
00211 };
00212 static GObject* unity_generic_preview_real_create_raw (UnityPreview* base);
00213 #define UNITY_APPLICATION_PREVIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_APPLICATION_PREVIEW, UnityApplicationPreviewPrivate))
00214 enum  {
00215        UNITY_APPLICATION_PREVIEW_DUMMY_PROPERTY,
00216        UNITY_APPLICATION_PREVIEW_APP_ICON,
00217        UNITY_APPLICATION_PREVIEW_LICENSE,
00218        UNITY_APPLICATION_PREVIEW_COPYRIGHT,
00219        UNITY_APPLICATION_PREVIEW_LAST_UPDATE
00220 };
00221 static GObject* unity_application_preview_real_create_raw (UnityPreview* base);
00222 static void unity_application_preview_finalize (GObject* obj);
00223 static void _vala_unity_application_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00224 static void _vala_unity_application_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00225 #define UNITY_MUSIC_PREVIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_MUSIC_PREVIEW, UnityMusicPreviewPrivate))
00226 enum  {
00227        UNITY_MUSIC_PREVIEW_DUMMY_PROPERTY,
00228        UNITY_MUSIC_PREVIEW_CURRENT_TRACK_URI,
00229        UNITY_MUSIC_PREVIEW_CURRENT_PROGRESS,
00230        UNITY_MUSIC_PREVIEW_CURRENT_TRACK_STATE
00231 };
00232 static GType unity_music_preview_track_data_columns_get_type (void) G_GNUC_UNUSED;
00233 static GObject* unity_music_preview_real_create_raw (UnityPreview* base);
00234 static void unity_music_preview_init_model (UnityMusicPreview* self);
00235 static void unity_music_preview_update_track_state (UnityMusicPreview* self);
00236 static GVariant* _variant_new21 (gboolean value);
00237 static GVariant* _variant_new22 (gdouble value);
00238 static GVariant* _variant_new23 (gboolean value);
00239 static GVariant* _variant_new24 (gdouble value);
00240 static GHashTable* unity_music_preview_real_update_property (UnityPreview* base, GHashTable* values);
00241 static void unity_music_preview_finalize (GObject* obj);
00242 static void _vala_unity_music_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00243 static void _vala_unity_music_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00244 #define UNITY_MOVIE_PREVIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_MOVIE_PREVIEW, UnityMoviePreviewPrivate))
00245 enum  {
00246        UNITY_MOVIE_PREVIEW_DUMMY_PROPERTY,
00247        UNITY_MOVIE_PREVIEW_YEAR
00248 };
00249 static GObject* unity_movie_preview_real_create_raw (UnityPreview* base);
00250 static void unity_movie_preview_finalize (GObject* obj);
00251 static void _vala_unity_movie_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00252 static void _vala_unity_movie_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00253 #define UNITY_SERIES_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_SERIES_ITEM, UnitySeriesItemPrivate))
00254 enum  {
00255        UNITY_SERIES_ITEM_DUMMY_PROPERTY,
00256        UNITY_SERIES_ITEM_URI,
00257        UNITY_SERIES_ITEM_TITLE,
00258        UNITY_SERIES_ITEM_ICON_HINT
00259 };
00260 static void unity_series_item_finalize (GObject* obj);
00261 static void _vala_unity_series_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00262 static void _vala_unity_series_item_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00263 #define UNITY_SERIES_PREVIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_SERIES_PREVIEW, UnitySeriesPreviewPrivate))
00264 enum  {
00265        UNITY_SERIES_PREVIEW_DUMMY_PROPERTY,
00266        UNITY_SERIES_PREVIEW_CURRENT_ITEM_URI
00267 };
00268 static void unity_series_preview_add_item (UnitySeriesPreview* self, UnitySeriesItem* item);
00269 static void unity_series_preview_update_child_preview (UnitySeriesPreview* self, const gchar* uri, gint item_index);
00270 static GHashTable* unity_series_preview_real_update_property (UnityPreview* base, GHashTable* values);
00271 UnityPreview* unity_series_preview_get_active_preview (UnitySeriesPreview* self);
00272 static GVariant* unity_series_preview_real_serialize (DeeSerializable* base);
00273 static GObject* unity_series_preview_real_create_raw (UnityPreview* base);
00274 static void unity_series_preview_finalize (GObject* obj);
00275 static void _vala_unity_series_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00276 static void _vala_unity_series_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00277 GType unity_async_preview_get_type (void) G_GNUC_CONST;
00278 #define UNITY_ASYNC_PREVIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_ASYNC_PREVIEW, UnityAsyncPreviewPrivate))
00279 enum  {
00280        UNITY_ASYNC_PREVIEW_DUMMY_PROPERTY,
00281        UNITY_ASYNC_PREVIEW_CANCELLABLE
00282 };
00283 UnityAsyncPreview* unity_async_preview_new (void);
00284 UnityAsyncPreview* unity_async_preview_construct (GType object_type);
00285 static GObject* unity_async_preview_real_create_raw (UnityPreview* base);
00286 GCancellable* unity_async_preview_get_cancellable (UnityAsyncPreview* self);
00287 static void unity_async_preview_set_cancellable (UnityAsyncPreview* self, GCancellable* value);
00288 static void unity_async_preview_finalize (GObject* obj);
00289 static void _vala_unity_async_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00290 static void _vala_unity_async_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00291 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00292 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00293 static gint _vala_array_length (gpointer array);
00294 
00295 
00296 static void _g_object_unref0_ (gpointer var) {
00297        (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
00298 }
00299 
00300 
00301 UnityProtocolPreview* unity_preview_get_raw (UnityPreview* self) {
00302        UnityProtocolPreview* result = NULL;
00303        UnityProtocolPreview* _tmp0_;
00304        g_return_val_if_fail (self != NULL, NULL);
00305        _tmp0_ = self->priv->_raw;
00306        result = _tmp0_;
00307        return result;
00308 }
00309 
00310 
00311 static GObject* unity_preview_real_create_raw (UnityPreview* self) {
00312        g_critical ("Type `%s' does not implement abstract method `unity_preview_create_raw'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
00313        return NULL;
00314 }
00315 
00316 
00317 GObject* unity_preview_create_raw (UnityPreview* self) {
00318        g_return_val_if_fail (self != NULL, NULL);
00319        return UNITY_PREVIEW_GET_CLASS (self)->create_raw (self);
00320 }
00321 
00322 
00323 static gpointer _g_object_ref0 (gpointer self) {
00324        return self ? g_object_ref (self) : NULL;
00325 }
00326 
00327 
00328 void unity_preview_add_action (UnityPreview* self, UnityPreviewAction* action) {
00329        GPtrArray* _tmp0_;
00330        UnityPreviewAction* _tmp1_;
00331        UnityPreviewAction* _tmp2_;
00332        UnityProtocolPreview* _tmp3_;
00333        UnityPreviewAction* _tmp4_;
00334        const gchar* _tmp5_;
00335        const gchar* _tmp6_;
00336        UnityPreviewAction* _tmp7_;
00337        const gchar* _tmp8_;
00338        const gchar* _tmp9_;
00339        UnityPreviewAction* _tmp10_;
00340        GIcon* _tmp11_;
00341        GIcon* _tmp12_;
00342        UnityPreviewAction* _tmp13_;
00343        UnityLayoutHint _tmp14_;
00344        UnityLayoutHint _tmp15_;
00345        g_return_if_fail (self != NULL);
00346        g_return_if_fail (action != NULL);
00347        _tmp0_ = self->priv->_actions;
00348        _tmp1_ = action;
00349        _tmp2_ = _g_object_ref0 (_tmp1_);
00350        g_ptr_array_add (_tmp0_, _tmp2_);
00351        _tmp3_ = self->priv->_raw;
00352        _tmp4_ = action;
00353        _tmp5_ = unity_preview_action_get_id (_tmp4_);
00354        _tmp6_ = _tmp5_;
00355        _tmp7_ = action;
00356        _tmp8_ = unity_preview_action_get_display_name (_tmp7_);
00357        _tmp9_ = _tmp8_;
00358        _tmp10_ = action;
00359        _tmp11_ = unity_preview_action_get_icon_hint (_tmp10_);
00360        _tmp12_ = _tmp11_;
00361        _tmp13_ = action;
00362        _tmp14_ = unity_preview_action_get_layout_hint (_tmp13_);
00363        _tmp15_ = _tmp14_;
00364        unity_protocol_preview_add_action (_tmp3_, _tmp6_, _tmp9_, _tmp12_, (guint) _tmp15_);
00365 }
00366 
00367 
00368 void unity_preview_add_info (UnityPreview* self, UnityInfoHint* info_hint) {
00369        UnityInfoHint* _tmp0_;
00370        GObject* _tmp1_ = NULL;
00371        GObject* _tmp2_;
00372        UnityProtocolPreview* _tmp3_;
00373        UnityInfoHint* _tmp4_;
00374        const gchar* _tmp5_;
00375        const gchar* _tmp6_;
00376        UnityInfoHint* _tmp7_;
00377        const gchar* _tmp8_;
00378        const gchar* _tmp9_;
00379        UnityInfoHint* _tmp10_;
00380        GIcon* _tmp11_;
00381        GIcon* _tmp12_;
00382        UnityInfoHint* _tmp13_;
00383        GVariant* _tmp14_;
00384        GVariant* _tmp15_;
00385        g_return_if_fail (self != NULL);
00386        g_return_if_fail (info_hint != NULL);
00387        _tmp0_ = info_hint;
00388        _tmp1_ = g_object_ref_sink ((GObject*) _tmp0_);
00389        _tmp2_ = _tmp1_;
00390        _g_object_unref0 (_tmp2_);
00391        _tmp3_ = self->priv->_raw;
00392        _tmp4_ = info_hint;
00393        _tmp5_ = unity_info_hint_get_id (_tmp4_);
00394        _tmp6_ = _tmp5_;
00395        _tmp7_ = info_hint;
00396        _tmp8_ = unity_info_hint_get_display_name (_tmp7_);
00397        _tmp9_ = _tmp8_;
00398        _tmp10_ = info_hint;
00399        _tmp11_ = unity_info_hint_get_icon_hint (_tmp10_);
00400        _tmp12_ = _tmp11_;
00401        _tmp13_ = info_hint;
00402        _tmp14_ = unity_info_hint_get_data (_tmp13_);
00403        _tmp15_ = _tmp14_;
00404        unity_protocol_preview_add_info_hint (_tmp3_, _tmp6_, _tmp9_, _tmp12_, _tmp15_);
00405 }
00406 
00407 
00408 static void _g_free0_ (gpointer var) {
00409        var = (g_free (var), NULL);
00410 }
00411 
00412 
00413 static void _g_variant_unref0_ (gpointer var) {
00414        (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
00415 }
00416 
00417 
00418 static GHashTable* unity_preview_real_update_property (UnityPreview* self, GHashTable* values) {
00419        GHashTable* result = NULL;
00420        UnityProtocolPreview* _tmp0_;
00421        GHashTable* _tmp1_;
00422        GHashFunc _tmp2_;
00423        GEqualFunc _tmp3_;
00424        GHashTable* _tmp4_;
00425        g_return_val_if_fail (values != NULL, NULL);
00426        _tmp0_ = self->priv->_raw;
00427        _tmp1_ = values;
00428        unity_protocol_preview_update_property (_tmp0_, _tmp1_);
00429        _tmp2_ = g_str_hash;
00430        _tmp3_ = g_str_equal;
00431        _tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _g_free0_, _g_variant_unref0_);
00432        result = _tmp4_;
00433        return result;
00434 }
00435 
00436 
00437 GHashTable* unity_preview_update_property (UnityPreview* self, GHashTable* values) {
00438        g_return_val_if_fail (self != NULL, NULL);
00439        return UNITY_PREVIEW_GET_CLASS (self)->update_property (self, values);
00440 }
00441 
00442 
00443 GPtrArray* unity_preview_get_actions (UnityPreview* self) {
00444        GPtrArray* result = NULL;
00445        GPtrArray* _tmp0_;
00446        g_return_val_if_fail (self != NULL, NULL);
00447        _tmp0_ = self->priv->_actions;
00448        result = _tmp0_;
00449        return result;
00450 }
00451 
00452 
00453 static GVariant* unity_preview_real_serialize (DeeSerializable* base) {
00454        UnityPreview * self;
00455        GVariant* result = NULL;
00456        UnityProtocolPreview* _tmp0_;
00457        GVariant* _tmp1_ = NULL;
00458        self = (UnityPreview*) base;
00459        _tmp0_ = self->priv->_raw;
00460        _tmp1_ = dee_serializable_serialize ((DeeSerializable*) _tmp0_);
00461        result = _tmp1_;
00462        return result;
00463 }
00464 
00465 
00466 static void unity_preview_real_dummy1 (UnityPreview* self) {
00467 }
00468 
00469 
00470 void unity_preview_dummy1 (UnityPreview* self) {
00471        g_return_if_fail (self != NULL);
00472        UNITY_PREVIEW_GET_CLASS (self)->dummy1 (self);
00473 }
00474 
00475 
00476 static void unity_preview_real_dummy2 (UnityPreview* self) {
00477 }
00478 
00479 
00480 void unity_preview_dummy2 (UnityPreview* self) {
00481        g_return_if_fail (self != NULL);
00482        UNITY_PREVIEW_GET_CLASS (self)->dummy2 (self);
00483 }
00484 
00485 
00486 static void unity_preview_real_dummy3 (UnityPreview* self) {
00487 }
00488 
00489 
00490 void unity_preview_dummy3 (UnityPreview* self) {
00491        g_return_if_fail (self != NULL);
00492        UNITY_PREVIEW_GET_CLASS (self)->dummy3 (self);
00493 }
00494 
00495 
00496 static void unity_preview_real_dummy4 (UnityPreview* self) {
00497 }
00498 
00499 
00500 void unity_preview_dummy4 (UnityPreview* self) {
00501        g_return_if_fail (self != NULL);
00502        UNITY_PREVIEW_GET_CLASS (self)->dummy4 (self);
00503 }
00504 
00505 
00506 UnityPreview* unity_preview_construct (GType object_type) {
00507        UnityPreview * self = NULL;
00508        self = (UnityPreview*) g_object_new (object_type, NULL);
00509        return self;
00510 }
00511 
00512 
00513 const gchar* unity_preview_get_title (UnityPreview* self) {
00514        const gchar* result;
00515        UnityProtocolPreview* _tmp0_;
00516        const gchar* _tmp1_;
00517        const gchar* _tmp2_;
00518        g_return_val_if_fail (self != NULL, NULL);
00519        _tmp0_ = self->priv->_raw;
00520        _tmp1_ = unity_protocol_preview_get_title (_tmp0_);
00521        _tmp2_ = _tmp1_;
00522        result = _tmp2_;
00523        return result;
00524 }
00525 
00526 
00527 void unity_preview_set_title (UnityPreview* self, const gchar* value) {
00528        UnityProtocolPreview* _tmp0_;
00529        const gchar* _tmp1_;
00530        g_return_if_fail (self != NULL);
00531        _tmp0_ = self->priv->_raw;
00532        _tmp1_ = value;
00533        unity_protocol_preview_set_title (_tmp0_, _tmp1_);
00534        g_object_notify ((GObject *) self, "title");
00535 }
00536 
00537 
00538 const gchar* unity_preview_get_subtitle (UnityPreview* self) {
00539        const gchar* result;
00540        UnityProtocolPreview* _tmp0_;
00541        const gchar* _tmp1_;
00542        const gchar* _tmp2_;
00543        g_return_val_if_fail (self != NULL, NULL);
00544        _tmp0_ = self->priv->_raw;
00545        _tmp1_ = unity_protocol_preview_get_subtitle (_tmp0_);
00546        _tmp2_ = _tmp1_;
00547        result = _tmp2_;
00548        return result;
00549 }
00550 
00551 
00552 void unity_preview_set_subtitle (UnityPreview* self, const gchar* value) {
00553        UnityProtocolPreview* _tmp0_;
00554        const gchar* _tmp1_;
00555        g_return_if_fail (self != NULL);
00556        _tmp0_ = self->priv->_raw;
00557        _tmp1_ = value;
00558        unity_protocol_preview_set_subtitle (_tmp0_, _tmp1_);
00559        g_object_notify ((GObject *) self, "subtitle");
00560 }
00561 
00562 
00563 const gchar* unity_preview_get_description_markup (UnityPreview* self) {
00564        const gchar* result;
00565        UnityProtocolPreview* _tmp0_;
00566        const gchar* _tmp1_;
00567        const gchar* _tmp2_;
00568        g_return_val_if_fail (self != NULL, NULL);
00569        _tmp0_ = self->priv->_raw;
00570        _tmp1_ = unity_protocol_preview_get_description (_tmp0_);
00571        _tmp2_ = _tmp1_;
00572        result = _tmp2_;
00573        return result;
00574 }
00575 
00576 
00577 void unity_preview_set_description_markup (UnityPreview* self, const gchar* value) {
00578        UnityProtocolPreview* _tmp0_;
00579        const gchar* _tmp1_;
00580        g_return_if_fail (self != NULL);
00581        _tmp0_ = self->priv->_raw;
00582        _tmp1_ = value;
00583        unity_protocol_preview_set_description (_tmp0_, _tmp1_);
00584        g_object_notify ((GObject *) self, "description-markup");
00585 }
00586 
00587 
00588 GIcon* unity_preview_get_thumbnail (UnityPreview* self) {
00589        GIcon* result;
00590        UnityProtocolPreview* _tmp0_;
00591        GIcon* _tmp1_;
00592        GIcon* _tmp2_;
00593        g_return_val_if_fail (self != NULL, NULL);
00594        _tmp0_ = self->priv->_raw;
00595        _tmp1_ = unity_protocol_preview_get_thumbnail (_tmp0_);
00596        _tmp2_ = _tmp1_;
00597        result = _tmp2_;
00598        return result;
00599 }
00600 
00601 
00602 void unity_preview_set_thumbnail (UnityPreview* self, GIcon* value) {
00603        UnityProtocolPreview* _tmp0_;
00604        GIcon* _tmp1_;
00605        g_return_if_fail (self != NULL);
00606        _tmp0_ = self->priv->_raw;
00607        _tmp1_ = value;
00608        unity_protocol_preview_set_thumbnail (_tmp0_, _tmp1_);
00609        g_object_notify ((GObject *) self, "thumbnail");
00610 }
00611 
00612 
00613 static GObject * unity_preview_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
00614        GObject * obj;
00615        GObjectClass * parent_class;
00616        UnityPreview * self;
00617        GObject* _tmp0_ = NULL;
00618        UnityProtocolPreview* _tmp1_;
00619        parent_class = G_OBJECT_CLASS (unity_preview_parent_class);
00620        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
00621        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_PREVIEW, UnityPreview);
00622        _tmp0_ = unity_preview_create_raw (self);
00623        _g_object_unref0 (self->priv->_raw);
00624        self->priv->_raw = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, UNITY_PROTOCOL_TYPE_PREVIEW) ? ((UnityProtocolPreview*) _tmp0_) : NULL;
00625        _tmp1_ = self->priv->_raw;
00626        g_warn_if_fail (_tmp1_ != NULL);
00627        return obj;
00628 }
00629 
00630 
00631 static void unity_preview_class_init (UnityPreviewClass * klass) {
00632        unity_preview_parent_class = g_type_class_peek_parent (klass);
00633        g_type_class_add_private (klass, sizeof (UnityPreviewPrivate));
00634        UNITY_PREVIEW_CLASS (klass)->create_raw = unity_preview_real_create_raw;
00635        UNITY_PREVIEW_CLASS (klass)->update_property = unity_preview_real_update_property;
00636        UNITY_PREVIEW_CLASS (klass)->dummy1 = unity_preview_real_dummy1;
00637        UNITY_PREVIEW_CLASS (klass)->dummy2 = unity_preview_real_dummy2;
00638        UNITY_PREVIEW_CLASS (klass)->dummy3 = unity_preview_real_dummy3;
00639        UNITY_PREVIEW_CLASS (klass)->dummy4 = unity_preview_real_dummy4;
00640        G_OBJECT_CLASS (klass)->get_property = _vala_unity_preview_get_property;
00641        G_OBJECT_CLASS (klass)->set_property = _vala_unity_preview_set_property;
00642        G_OBJECT_CLASS (klass)->constructor = unity_preview_constructor;
00643        G_OBJECT_CLASS (klass)->finalize = unity_preview_finalize;
00644        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PREVIEW_TITLE, g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00645        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PREVIEW_SUBTITLE, g_param_spec_string ("subtitle", "subtitle", "subtitle", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00646        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PREVIEW_DESCRIPTION_MARKUP, g_param_spec_string ("description-markup", "description-markup", "description-markup", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00647        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PREVIEW_THUMBNAIL, g_param_spec_object ("thumbnail", "thumbnail", "thumbnail", G_TYPE_ICON, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00648 }
00649 
00650 
00651 static void unity_preview_dee_serializable_interface_init (DeeSerializableIface * iface) {
00652        unity_preview_dee_serializable_parent_iface = g_type_interface_peek_parent (iface);
00653        iface->serialize = (GVariant* (*)(DeeSerializable*)) unity_preview_real_serialize;
00654 }
00655 
00656 
00657 static void unity_preview_instance_init (UnityPreview * self) {
00658        GPtrArray* _tmp0_;
00659        self->priv = UNITY_PREVIEW_GET_PRIVATE (self);
00660        _tmp0_ = g_ptr_array_new_with_free_func (_g_object_unref0_);
00661        self->priv->_actions = _tmp0_;
00662 }
00663 
00664 
00665 static void unity_preview_finalize (GObject* obj) {
00666        UnityPreview * self;
00667        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_PREVIEW, UnityPreview);
00668        _g_object_unref0 (self->priv->_raw);
00669        _g_ptr_array_unref0 (self->priv->_actions);
00670        G_OBJECT_CLASS (unity_preview_parent_class)->finalize (obj);
00671 }
00672 
00673 
00674 GType unity_preview_get_type (void) {
00675        static volatile gsize unity_preview_type_id__volatile = 0;
00676        if (g_once_init_enter (&unity_preview_type_id__volatile)) {
00677               static const GTypeInfo g_define_type_info = { sizeof (UnityPreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPreview), 0, (GInstanceInitFunc) unity_preview_instance_init, NULL };
00678               static const GInterfaceInfo dee_serializable_info = { (GInterfaceInitFunc) unity_preview_dee_serializable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
00679               GType unity_preview_type_id;
00680               unity_preview_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityPreview", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
00681               g_type_add_interface_static (unity_preview_type_id, dee_serializable_get_type (), &dee_serializable_info);
00682               g_once_init_leave (&unity_preview_type_id__volatile, unity_preview_type_id);
00683        }
00684        return unity_preview_type_id__volatile;
00685 }
00686 
00687 
00688 static void _vala_unity_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
00689        UnityPreview * self;
00690        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_PREVIEW, UnityPreview);
00691        switch (property_id) {
00692               case UNITY_PREVIEW_TITLE:
00693               g_value_set_string (value, unity_preview_get_title (self));
00694               break;
00695               case UNITY_PREVIEW_SUBTITLE:
00696               g_value_set_string (value, unity_preview_get_subtitle (self));
00697               break;
00698               case UNITY_PREVIEW_DESCRIPTION_MARKUP:
00699               g_value_set_string (value, unity_preview_get_description_markup (self));
00700               break;
00701               case UNITY_PREVIEW_THUMBNAIL:
00702               g_value_set_object (value, unity_preview_get_thumbnail (self));
00703               break;
00704               default:
00705               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00706               break;
00707        }
00708 }
00709 
00710 
00711 static void _vala_unity_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
00712        UnityPreview * self;
00713        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_PREVIEW, UnityPreview);
00714        switch (property_id) {
00715               case UNITY_PREVIEW_TITLE:
00716               unity_preview_set_title (self, g_value_get_string (value));
00717               break;
00718               case UNITY_PREVIEW_SUBTITLE:
00719               unity_preview_set_subtitle (self, g_value_get_string (value));
00720               break;
00721               case UNITY_PREVIEW_DESCRIPTION_MARKUP:
00722               unity_preview_set_description_markup (self, g_value_get_string (value));
00723               break;
00724               case UNITY_PREVIEW_THUMBNAIL:
00725               unity_preview_set_thumbnail (self, g_value_get_object (value));
00726               break;
00727               default:
00728               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00729               break;
00730        }
00731 }
00732 
00733 
00734 GType unity_layout_hint_get_type (void) {
00735        static volatile gsize unity_layout_hint_type_id__volatile = 0;
00736        if (g_once_init_enter (&unity_layout_hint_type_id__volatile)) {
00737               static const GEnumValue values[] = {{UNITY_LAYOUT_HINT_NONE, "UNITY_LAYOUT_HINT_NONE", "none"}, {UNITY_LAYOUT_HINT_LEFT, "UNITY_LAYOUT_HINT_LEFT", "left"}, {UNITY_LAYOUT_HINT_RIGHT, "UNITY_LAYOUT_HINT_RIGHT", "right"}, {UNITY_LAYOUT_HINT_TOP, "UNITY_LAYOUT_HINT_TOP", "top"}, {UNITY_LAYOUT_HINT_BOTTOM, "UNITY_LAYOUT_HINT_BOTTOM", "bottom"}, {0, NULL, NULL}};
00738               GType unity_layout_hint_type_id;
00739               unity_layout_hint_type_id = g_enum_register_static ("UnityLayoutHint", values);
00740               g_once_init_leave (&unity_layout_hint_type_id__volatile, unity_layout_hint_type_id);
00741        }
00742        return unity_layout_hint_type_id__volatile;
00743 }
00744 
00745 
00746 UnityPreviewAction* unity_preview_action_construct (GType object_type, const gchar* id, const gchar* display_name, GIcon* icon_hint) {
00747        UnityPreviewAction * self = NULL;
00748        const gchar* _tmp0_;
00749        const gchar* _tmp1_;
00750        GIcon* _tmp2_;
00751        g_return_val_if_fail (id != NULL, NULL);
00752        g_return_val_if_fail (display_name != NULL, NULL);
00753        _tmp0_ = id;
00754        _tmp1_ = display_name;
00755        _tmp2_ = icon_hint;
00756        self = (UnityPreviewAction*) g_object_new (object_type, "id", _tmp0_, "display-name", _tmp1_, "icon-hint", _tmp2_, NULL);
00757        return self;
00758 }
00759 
00760 
00761 UnityPreviewAction* unity_preview_action_new (const gchar* id, const gchar* display_name, GIcon* icon_hint) {
00762        return unity_preview_action_construct (UNITY_TYPE_PREVIEW_ACTION, id, display_name, icon_hint);
00763 }
00764 
00765 
00766 UnityPreviewAction* unity_preview_action_construct_with_layout_hint (GType object_type, const gchar* id, const gchar* display_name, GIcon* icon_hint, UnityLayoutHint layout) {
00767        UnityPreviewAction * self = NULL;
00768        const gchar* _tmp0_;
00769        const gchar* _tmp1_;
00770        GIcon* _tmp2_;
00771        UnityLayoutHint _tmp3_;
00772        g_return_val_if_fail (id != NULL, NULL);
00773        g_return_val_if_fail (display_name != NULL, NULL);
00774        _tmp0_ = id;
00775        _tmp1_ = display_name;
00776        _tmp2_ = icon_hint;
00777        _tmp3_ = layout;
00778        self = (UnityPreviewAction*) g_object_new (object_type, "id", _tmp0_, "display-name", _tmp1_, "icon-hint", _tmp2_, "layout-hint", _tmp3_, NULL);
00779        return self;
00780 }
00781 
00782 
00783 UnityPreviewAction* unity_preview_action_new_with_layout_hint (const gchar* id, const gchar* display_name, GIcon* icon_hint, UnityLayoutHint layout) {
00784        return unity_preview_action_construct_with_layout_hint (UNITY_TYPE_PREVIEW_ACTION, id, display_name, icon_hint, layout);
00785 }
00786 
00787 
00788 static GVariant* _variant_new17 (const gchar* value) {
00789        return g_variant_ref_sink (g_variant_new_string (value));
00790 }
00791 
00792 
00793 static GVariant* _variant_new18 (const gchar* value) {
00794        return g_variant_ref_sink (g_variant_new_string (value));
00795 }
00796 
00797 
00798 static GVariant* _variant_new19 (guint value) {
00799        return g_variant_ref_sink (g_variant_new_uint32 (value));
00800 }
00801 
00802 
00803 static GVariant* _variant_new20 (GHashTable* value) {
00804        GVariantBuilder _tmp18_;
00805        GHashTableIter _tmp19_;
00806        gpointer _tmp20_;
00807        gpointer _tmp21_;
00808        g_hash_table_iter_init (&_tmp19_, value);
00809        g_variant_builder_init (&_tmp18_, G_VARIANT_TYPE ("a{sv}"));
00810        while (g_hash_table_iter_next (&_tmp19_, &_tmp20_, &_tmp21_)) {
00811               gchar* _key;
00812               GVariant* _value;
00813               _key = (gchar*) _tmp20_;
00814               _value = (GVariant*) _tmp21_;
00815               g_variant_builder_add (&_tmp18_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
00816        }
00817        return g_variant_ref_sink (g_variant_builder_end (&_tmp18_));
00818 }
00819 
00820 
00821 static GVariant* unity_preview_action_real_serialize (DeeSerializable* base) {
00822        UnityPreviewAction * self;
00823        GVariant* result = NULL;
00824        GVariant* tuple[5] = {0};
00825        const gchar* _tmp0_;
00826        GVariant* _tmp1_;
00827        GVariant* _tmp2_;
00828        const gchar* _tmp3_;
00829        GVariant* _tmp4_;
00830        GVariant* _tmp5_;
00831        gchar* _tmp6_ = NULL;
00832        GIcon* _tmp7_;
00833        const gchar* _tmp11_;
00834        GVariant* _tmp12_;
00835        GVariant* _tmp13_;
00836        UnityLayoutHint _tmp14_;
00837        GVariant* _tmp15_;
00838        GVariant* _tmp16_;
00839        GHashTable* _tmp17_;
00840        GHashTable* hints;
00841        GVariant* _tmp22_;
00842        GVariant* _tmp23_;
00843        GVariant* _tmp24_;
00844        self = (UnityPreviewAction*) base;
00845        _tmp0_ = self->priv->_id;
00846        _tmp1_ = _variant_new17 (_tmp0_);
00847        _g_variant_unref0 (tuple[0]);
00848        tuple[0] = _tmp1_;
00849        _tmp2_ = tuple[0];
00850        _tmp3_ = self->priv->_display_name;
00851        _tmp4_ = _variant_new18 (_tmp3_);
00852        _g_variant_unref0 (tuple[1]);
00853        tuple[1] = _tmp4_;
00854        _tmp5_ = tuple[1];
00855        _tmp7_ = self->priv->_icon_hint;
00856        if (_tmp7_ != NULL) {
00857               GIcon* _tmp8_;
00858               gchar* _tmp9_ = NULL;
00859               _tmp8_ = self->priv->_icon_hint;
00860               _tmp9_ = g_icon_to_string (_tmp8_);
00861               _g_free0 (_tmp6_);
00862               _tmp6_ = _tmp9_;
00863        } else {
00864               gchar* _tmp10_;
00865               _tmp10_ = g_strdup ("");
00866               _g_free0 (_tmp6_);
00867               _tmp6_ = _tmp10_;
00868        }
00869        _tmp11_ = _tmp6_;
00870        _tmp12_ = g_variant_new_string (_tmp11_);
00871        g_variant_ref_sink (_tmp12_);
00872        _g_variant_unref0 (tuple[2]);
00873        tuple[2] = _tmp12_;
00874        _tmp13_ = tuple[2];
00875        _tmp14_ = self->priv->_layout_hint;
00876        _tmp15_ = _variant_new19 ((guint) _tmp14_);
00877        _g_variant_unref0 (tuple[3]);
00878        tuple[3] = _tmp15_;
00879        _tmp16_ = tuple[3];
00880        _tmp17_ = g_hash_table_new_full (NULL, NULL, _g_free0_, _g_variant_unref0_);
00881        hints = _tmp17_;
00882        _tmp22_ = _variant_new20 (hints);
00883        _g_variant_unref0 (tuple[4]);
00884        tuple[4] = _tmp22_;
00885        _tmp23_ = tuple[4];
00886        _tmp24_ = g_variant_new_tuple (tuple, 5);
00887        g_variant_ref_sink (_tmp24_);
00888        result = _tmp24_;
00889        _g_hash_table_unref0 (hints);
00890        _g_free0 (_tmp6_);
00891        _vala_array_destroy (tuple, 5, (GDestroyNotify) g_variant_unref);
00892        return result;
00893 }
00894 
00895 
00896 static void unity_preview_action_real_dummy1 (UnityPreviewAction* self) {
00897 }
00898 
00899 
00900 void unity_preview_action_dummy1 (UnityPreviewAction* self) {
00901        g_return_if_fail (self != NULL);
00902        UNITY_PREVIEW_ACTION_GET_CLASS (self)->dummy1 (self);
00903 }
00904 
00905 
00906 static void unity_preview_action_real_dummy2 (UnityPreviewAction* self) {
00907 }
00908 
00909 
00910 void unity_preview_action_dummy2 (UnityPreviewAction* self) {
00911        g_return_if_fail (self != NULL);
00912        UNITY_PREVIEW_ACTION_GET_CLASS (self)->dummy2 (self);
00913 }
00914 
00915 
00916 static void unity_preview_action_real_dummy3 (UnityPreviewAction* self) {
00917 }
00918 
00919 
00920 void unity_preview_action_dummy3 (UnityPreviewAction* self) {
00921        g_return_if_fail (self != NULL);
00922        UNITY_PREVIEW_ACTION_GET_CLASS (self)->dummy3 (self);
00923 }
00924 
00925 
00926 static void unity_preview_action_real_dummy4 (UnityPreviewAction* self) {
00927 }
00928 
00929 
00930 void unity_preview_action_dummy4 (UnityPreviewAction* self) {
00931        g_return_if_fail (self != NULL);
00932        UNITY_PREVIEW_ACTION_GET_CLASS (self)->dummy4 (self);
00933 }
00934 
00935 
00936 const gchar* unity_preview_action_get_id (UnityPreviewAction* self) {
00937        const gchar* result;
00938        const gchar* _tmp0_;
00939        g_return_val_if_fail (self != NULL, NULL);
00940        _tmp0_ = self->priv->_id;
00941        result = _tmp0_;
00942        return result;
00943 }
00944 
00945 
00946 static void unity_preview_action_set_id (UnityPreviewAction* self, const gchar* value) {
00947        const gchar* _tmp0_;
00948        gchar* _tmp1_;
00949        g_return_if_fail (self != NULL);
00950        _tmp0_ = value;
00951        _tmp1_ = g_strdup (_tmp0_);
00952        _g_free0 (self->priv->_id);
00953        self->priv->_id = _tmp1_;
00954        g_object_notify ((GObject *) self, "id");
00955 }
00956 
00957 
00958 const gchar* unity_preview_action_get_display_name (UnityPreviewAction* self) {
00959        const gchar* result;
00960        const gchar* _tmp0_;
00961        g_return_val_if_fail (self != NULL, NULL);
00962        _tmp0_ = self->priv->_display_name;
00963        result = _tmp0_;
00964        return result;
00965 }
00966 
00967 
00968 static void unity_preview_action_set_display_name (UnityPreviewAction* self, const gchar* value) {
00969        const gchar* _tmp0_;
00970        gchar* _tmp1_;
00971        g_return_if_fail (self != NULL);
00972        _tmp0_ = value;
00973        _tmp1_ = g_strdup (_tmp0_);
00974        _g_free0 (self->priv->_display_name);
00975        self->priv->_display_name = _tmp1_;
00976        g_object_notify ((GObject *) self, "display-name");
00977 }
00978 
00979 
00980 GIcon* unity_preview_action_get_icon_hint (UnityPreviewAction* self) {
00981        GIcon* result;
00982        GIcon* _tmp0_;
00983        g_return_val_if_fail (self != NULL, NULL);
00984        _tmp0_ = self->priv->_icon_hint;
00985        result = _tmp0_;
00986        return result;
00987 }
00988 
00989 
00990 static void unity_preview_action_set_icon_hint (UnityPreviewAction* self, GIcon* value) {
00991        GIcon* _tmp0_;
00992        GIcon* _tmp1_;
00993        g_return_if_fail (self != NULL);
00994        _tmp0_ = value;
00995        _tmp1_ = _g_object_ref0 (_tmp0_);
00996        _g_object_unref0 (self->priv->_icon_hint);
00997        self->priv->_icon_hint = _tmp1_;
00998        g_object_notify ((GObject *) self, "icon-hint");
00999 }
01000 
01001 
01002 UnityLayoutHint unity_preview_action_get_layout_hint (UnityPreviewAction* self) {
01003        UnityLayoutHint result;
01004        UnityLayoutHint _tmp0_;
01005        g_return_val_if_fail (self != NULL, 0);
01006        _tmp0_ = self->priv->_layout_hint;
01007        result = _tmp0_;
01008        return result;
01009 }
01010 
01011 
01012 static void unity_preview_action_set_layout_hint (UnityPreviewAction* self, UnityLayoutHint value) {
01013        UnityLayoutHint _tmp0_;
01014        g_return_if_fail (self != NULL);
01015        _tmp0_ = value;
01016        self->priv->_layout_hint = _tmp0_;
01017        g_object_notify ((GObject *) self, "layout-hint");
01018 }
01019 
01020 
01021 static void g_cclosure_user_marshal_OBJECT__STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
01022        typedef gpointer (*GMarshalFunc_OBJECT__STRING) (gpointer data1, const char* arg_1, gpointer data2);
01023        register GMarshalFunc_OBJECT__STRING callback;
01024        register GCClosure * cc;
01025        register gpointer data1;
01026        register gpointer data2;
01027        gpointer v_return;
01028        cc = (GCClosure *) closure;
01029        g_return_if_fail (return_value != NULL);
01030        g_return_if_fail (n_param_values == 2);
01031        if (G_CCLOSURE_SWAP_DATA (closure)) {
01032               data1 = closure->data;
01033               data2 = param_values->data[0].v_pointer;
01034        } else {
01035               data1 = param_values->data[0].v_pointer;
01036               data2 = closure->data;
01037        }
01038        callback = (GMarshalFunc_OBJECT__STRING) (marshal_data ? marshal_data : cc->callback);
01039        v_return = callback (data1, g_value_get_string (param_values + 1), data2);
01040        g_value_take_object (return_value, v_return);
01041 }
01042 
01043 
01044 static GObject* _unity_preview_action___lambda4_ (GVariant* data) {
01045        GObject* result = NULL;
01046        GVariant* _tmp0_;
01047        GVariant* _tmp1_ = NULL;
01048        GVariant* _tmp2_;
01049        const gchar* _tmp3_ = NULL;
01050        const gchar* _tmp4_;
01051        const gchar* icon_hint;
01052        GIcon* icon;
01053        gboolean _tmp5_ = FALSE;
01054        const gchar* _tmp6_;
01055        gboolean _tmp8_;
01056        GVariant* _tmp14_;
01057        GVariant* _tmp15_ = NULL;
01058        GVariant* _tmp16_;
01059        const gchar* _tmp17_ = NULL;
01060        GVariant* _tmp18_;
01061        GVariant* _tmp19_ = NULL;
01062        GVariant* _tmp20_;
01063        const gchar* _tmp21_ = NULL;
01064        GIcon* _tmp22_;
01065        GVariant* _tmp23_;
01066        GVariant* _tmp24_ = NULL;
01067        GVariant* _tmp25_;
01068        guint32 _tmp26_ = 0U;
01069        UnityPreviewAction* _tmp27_;
01070        GObject* _tmp28_;
01071        GError * _inner_error_ = NULL;
01072        g_return_val_if_fail (data != NULL, NULL);
01073        _tmp0_ = data;
01074        _tmp1_ = g_variant_get_child_value (_tmp0_, (gsize) 2);
01075        _tmp2_ = _tmp1_;
01076        _tmp3_ = g_variant_get_string (_tmp2_, NULL);
01077        _tmp4_ = _tmp3_;
01078        _g_variant_unref0 (_tmp2_);
01079        icon_hint = _tmp4_;
01080        icon = NULL;
01081        _tmp6_ = icon_hint;
01082        if (_tmp6_ != NULL) {
01083               const gchar* _tmp7_;
01084               _tmp7_ = icon_hint;
01085               _tmp5_ = g_strcmp0 (_tmp7_, "") != 0;
01086        } else {
01087               _tmp5_ = FALSE;
01088        }
01089        _tmp8_ = _tmp5_;
01090        if (_tmp8_) {
01091               {
01092                      const gchar* _tmp9_;
01093                      GIcon* _tmp10_ = NULL;
01094                      GIcon* _tmp11_;
01095                      _tmp9_ = icon_hint;
01096                      _tmp10_ = g_icon_new_for_string (_tmp9_, &_inner_error_);
01097                      _tmp11_ = _tmp10_;
01098                      if (_inner_error_ != NULL) {
01099                             goto __catch18_g_error;
01100                      }
01101                      _g_object_unref0 (icon);
01102                      icon = _tmp11_;
01103               }
01104               goto __finally18;
01105               __catch18_g_error:
01106               {
01107                      GError* err = NULL;
01108                      GError* _tmp12_;
01109                      const gchar* _tmp13_;
01110                      err = _inner_error_;
01111                      _inner_error_ = NULL;
01112                      _tmp12_ = err;
01113                      _tmp13_ = _tmp12_->message;
01114                      g_warning ("unity-previews.vala:173: Failed to deserialize GIcon: %s", _tmp13_);
01115                      _g_error_free0 (err);
01116               }
01117               __finally18:
01118               if (_inner_error_ != NULL) {
01119                      _g_object_unref0 (icon);
01120                      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);
01121                      g_clear_error (&_inner_error_);
01122                      return NULL;
01123               }
01124        }
01125        _tmp14_ = data;
01126        _tmp15_ = g_variant_get_child_value (_tmp14_, (gsize) 0);
01127        _tmp16_ = _tmp15_;
01128        _tmp17_ = g_variant_get_string (_tmp16_, NULL);
01129        _tmp18_ = data;
01130        _tmp19_ = g_variant_get_child_value (_tmp18_, (gsize) 1);
01131        _tmp20_ = _tmp19_;
01132        _tmp21_ = g_variant_get_string (_tmp20_, NULL);
01133        _tmp22_ = icon;
01134        _tmp23_ = data;
01135        _tmp24_ = g_variant_get_child_value (_tmp23_, (gsize) 3);
01136        _tmp25_ = _tmp24_;
01137        _tmp26_ = g_variant_get_uint32 (_tmp25_);
01138        _tmp27_ = unity_preview_action_new_with_layout_hint (_tmp17_, _tmp21_, _tmp22_, (UnityLayoutHint) _tmp26_);
01139        _tmp28_ = (GObject*) _tmp27_;
01140        _g_variant_unref0 (_tmp25_);
01141        _g_variant_unref0 (_tmp20_);
01142        _g_variant_unref0 (_tmp16_);
01143        result = _tmp28_;
01144        _g_object_unref0 (icon);
01145        return result;
01146 }
01147 
01148 
01149 static GObject* __unity_preview_action___lambda4__dee_serializable_parse_func (GVariant* data) {
01150        GObject* result;
01151        result = _unity_preview_action___lambda4_ (data);
01152        return result;
01153 }
01154 
01155 
01156 static void unity_preview_action_class_init (UnityPreviewActionClass * klass) {
01157        GVariantType* _tmp0_;
01158        GVariantType* _tmp1_;
01159        unity_preview_action_parent_class = g_type_class_peek_parent (klass);
01160        g_type_class_add_private (klass, sizeof (UnityPreviewActionPrivate));
01161        UNITY_PREVIEW_ACTION_CLASS (klass)->dummy1 = unity_preview_action_real_dummy1;
01162        UNITY_PREVIEW_ACTION_CLASS (klass)->dummy2 = unity_preview_action_real_dummy2;
01163        UNITY_PREVIEW_ACTION_CLASS (klass)->dummy3 = unity_preview_action_real_dummy3;
01164        UNITY_PREVIEW_ACTION_CLASS (klass)->dummy4 = unity_preview_action_real_dummy4;
01165        G_OBJECT_CLASS (klass)->get_property = _vala_unity_preview_action_get_property;
01166        G_OBJECT_CLASS (klass)->set_property = _vala_unity_preview_action_set_property;
01167        G_OBJECT_CLASS (klass)->finalize = unity_preview_action_finalize;
01168        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PREVIEW_ACTION_ID, g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01169        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PREVIEW_ACTION_DISPLAY_NAME, g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01170        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PREVIEW_ACTION_ICON_HINT, g_param_spec_object ("icon-hint", "icon-hint", "icon-hint", G_TYPE_ICON, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01171        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PREVIEW_ACTION_LAYOUT_HINT, g_param_spec_enum ("layout-hint", "layout-hint", "layout-hint", UNITY_TYPE_LAYOUT_HINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01172        g_signal_new ("activated", UNITY_TYPE_PREVIEW_ACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__STRING, UNITY_TYPE_ACTIVATION_RESPONSE, 1, G_TYPE_STRING);
01173        _tmp0_ = g_variant_type_new ("(sssua{sv})");
01174        _tmp1_ = _tmp0_;
01175        dee_serializable_register_parser (UNITY_TYPE_PREVIEW_ACTION, _tmp1_, __unity_preview_action___lambda4__dee_serializable_parse_func);
01176        _g_variant_type_free0 (_tmp1_);
01177 }
01178 
01179 
01180 static void unity_preview_action_dee_serializable_interface_init (DeeSerializableIface * iface) {
01181        unity_preview_action_dee_serializable_parent_iface = g_type_interface_peek_parent (iface);
01182        iface->serialize = (GVariant* (*)(DeeSerializable*)) unity_preview_action_real_serialize;
01183 }
01184 
01185 
01186 static void unity_preview_action_instance_init (UnityPreviewAction * self) {
01187        self->priv = UNITY_PREVIEW_ACTION_GET_PRIVATE (self);
01188 }
01189 
01190 
01191 static void unity_preview_action_finalize (GObject* obj) {
01192        UnityPreviewAction * self;
01193        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_PREVIEW_ACTION, UnityPreviewAction);
01194        _g_free0 (self->priv->_id);
01195        _g_free0 (self->priv->_display_name);
01196        _g_object_unref0 (self->priv->_icon_hint);
01197        G_OBJECT_CLASS (unity_preview_action_parent_class)->finalize (obj);
01198 }
01199 
01200 
01201 GType unity_preview_action_get_type (void) {
01202        static volatile gsize unity_preview_action_type_id__volatile = 0;
01203        if (g_once_init_enter (&unity_preview_action_type_id__volatile)) {
01204               static const GTypeInfo g_define_type_info = { sizeof (UnityPreviewActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_preview_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPreviewAction), 0, (GInstanceInitFunc) unity_preview_action_instance_init, NULL };
01205               static const GInterfaceInfo dee_serializable_info = { (GInterfaceInitFunc) unity_preview_action_dee_serializable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
01206               GType unity_preview_action_type_id;
01207               unity_preview_action_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityPreviewAction", &g_define_type_info, 0);
01208               g_type_add_interface_static (unity_preview_action_type_id, dee_serializable_get_type (), &dee_serializable_info);
01209               g_once_init_leave (&unity_preview_action_type_id__volatile, unity_preview_action_type_id);
01210        }
01211        return unity_preview_action_type_id__volatile;
01212 }
01213 
01214 
01215 static void _vala_unity_preview_action_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
01216        UnityPreviewAction * self;
01217        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_PREVIEW_ACTION, UnityPreviewAction);
01218        switch (property_id) {
01219               case UNITY_PREVIEW_ACTION_ID:
01220               g_value_set_string (value, unity_preview_action_get_id (self));
01221               break;
01222               case UNITY_PREVIEW_ACTION_DISPLAY_NAME:
01223               g_value_set_string (value, unity_preview_action_get_display_name (self));
01224               break;
01225               case UNITY_PREVIEW_ACTION_ICON_HINT:
01226               g_value_set_object (value, unity_preview_action_get_icon_hint (self));
01227               break;
01228               case UNITY_PREVIEW_ACTION_LAYOUT_HINT:
01229               g_value_set_enum (value, unity_preview_action_get_layout_hint (self));
01230               break;
01231               default:
01232               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01233               break;
01234        }
01235 }
01236 
01237 
01238 static void _vala_unity_preview_action_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
01239        UnityPreviewAction * self;
01240        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_PREVIEW_ACTION, UnityPreviewAction);
01241        switch (property_id) {
01242               case UNITY_PREVIEW_ACTION_ID:
01243               unity_preview_action_set_id (self, g_value_get_string (value));
01244               break;
01245               case UNITY_PREVIEW_ACTION_DISPLAY_NAME:
01246               unity_preview_action_set_display_name (self, g_value_get_string (value));
01247               break;
01248               case UNITY_PREVIEW_ACTION_ICON_HINT:
01249               unity_preview_action_set_icon_hint (self, g_value_get_object (value));
01250               break;
01251               case UNITY_PREVIEW_ACTION_LAYOUT_HINT:
01252               unity_preview_action_set_layout_hint (self, g_value_get_enum (value));
01253               break;
01254               default:
01255               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01256               break;
01257        }
01258 }
01259 
01260 
01261 UnityInfoHint* unity_info_hint_construct (GType object_type, const gchar* id, const gchar* display_name, GIcon* icon_hint, const gchar* data) {
01262        UnityInfoHint * self = NULL;
01263        const gchar* _tmp0_;
01264        const gchar* _tmp1_;
01265        GIcon* _tmp2_;
01266        const gchar* _tmp3_;
01267        GVariant* _tmp4_;
01268        GVariant* _tmp5_;
01269        g_return_val_if_fail (id != NULL, NULL);
01270        g_return_val_if_fail (display_name != NULL, NULL);
01271        g_return_val_if_fail (data != NULL, NULL);
01272        _tmp0_ = id;
01273        _tmp1_ = display_name;
01274        _tmp2_ = icon_hint;
01275        _tmp3_ = data;
01276        _tmp4_ = g_variant_new_string (_tmp3_);
01277        g_variant_ref_sink (_tmp4_);
01278        g_variant_ref_sink (_tmp4_);
01279        _tmp5_ = _tmp4_;
01280        self = (UnityInfoHint*) g_object_new (object_type, "id", _tmp0_, "display-name", _tmp1_, "icon-hint", _tmp2_, "data", _tmp5_, NULL);
01281        _g_variant_unref0 (_tmp5_);
01282        return self;
01283 }
01284 
01285 
01286 UnityInfoHint* unity_info_hint_new (const gchar* id, const gchar* display_name, GIcon* icon_hint, const gchar* data) {
01287        return unity_info_hint_construct (UNITY_TYPE_INFO_HINT, id, display_name, icon_hint, data);
01288 }
01289 
01290 
01291 UnityInfoHint* unity_info_hint_construct_with_variant (GType object_type, const gchar* id, const gchar* display_name, GIcon* icon_hint, GVariant* data) {
01292        UnityInfoHint * self = NULL;
01293        const gchar* _tmp0_;
01294        const gchar* _tmp1_;
01295        GIcon* _tmp2_;
01296        GVariant* _tmp3_;
01297        g_return_val_if_fail (id != NULL, NULL);
01298        g_return_val_if_fail (display_name != NULL, NULL);
01299        g_return_val_if_fail (data != NULL, NULL);
01300        _tmp0_ = id;
01301        _tmp1_ = display_name;
01302        _tmp2_ = icon_hint;
01303        _tmp3_ = data;
01304        self = (UnityInfoHint*) g_object_new (object_type, "id", _tmp0_, "display-name", _tmp1_, "icon-hint", _tmp2_, "data", _tmp3_, NULL);
01305        return self;
01306 }
01307 
01308 
01309 UnityInfoHint* unity_info_hint_new_with_variant (const gchar* id, const gchar* display_name, GIcon* icon_hint, GVariant* data) {
01310        return unity_info_hint_construct_with_variant (UNITY_TYPE_INFO_HINT, id, display_name, icon_hint, data);
01311 }
01312 
01313 
01314 const gchar* unity_info_hint_get_id (UnityInfoHint* self) {
01315        const gchar* result;
01316        const gchar* _tmp0_;
01317        g_return_val_if_fail (self != NULL, NULL);
01318        _tmp0_ = self->priv->_id;
01319        result = _tmp0_;
01320        return result;
01321 }
01322 
01323 
01324 static void unity_info_hint_set_id (UnityInfoHint* self, const gchar* value) {
01325        const gchar* _tmp0_;
01326        gchar* _tmp1_;
01327        g_return_if_fail (self != NULL);
01328        _tmp0_ = value;
01329        _tmp1_ = g_strdup (_tmp0_);
01330        _g_free0 (self->priv->_id);
01331        self->priv->_id = _tmp1_;
01332        g_object_notify ((GObject *) self, "id");
01333 }
01334 
01335 
01336 const gchar* unity_info_hint_get_display_name (UnityInfoHint* self) {
01337        const gchar* result;
01338        const gchar* _tmp0_;
01339        g_return_val_if_fail (self != NULL, NULL);
01340        _tmp0_ = self->priv->_display_name;
01341        result = _tmp0_;
01342        return result;
01343 }
01344 
01345 
01346 static void unity_info_hint_set_display_name (UnityInfoHint* self, const gchar* value) {
01347        const gchar* _tmp0_;
01348        gchar* _tmp1_;
01349        g_return_if_fail (self != NULL);
01350        _tmp0_ = value;
01351        _tmp1_ = g_strdup (_tmp0_);
01352        _g_free0 (self->priv->_display_name);
01353        self->priv->_display_name = _tmp1_;
01354        g_object_notify ((GObject *) self, "display-name");
01355 }
01356 
01357 
01358 GIcon* unity_info_hint_get_icon_hint (UnityInfoHint* self) {
01359        GIcon* result;
01360        GIcon* _tmp0_;
01361        g_return_val_if_fail (self != NULL, NULL);
01362        _tmp0_ = self->priv->_icon_hint;
01363        result = _tmp0_;
01364        return result;
01365 }
01366 
01367 
01368 static void unity_info_hint_set_icon_hint (UnityInfoHint* self, GIcon* value) {
01369        GIcon* _tmp0_;
01370        GIcon* _tmp1_;
01371        g_return_if_fail (self != NULL);
01372        _tmp0_ = value;
01373        _tmp1_ = _g_object_ref0 (_tmp0_);
01374        _g_object_unref0 (self->priv->_icon_hint);
01375        self->priv->_icon_hint = _tmp1_;
01376        g_object_notify ((GObject *) self, "icon-hint");
01377 }
01378 
01379 
01380 GVariant* unity_info_hint_get_data (UnityInfoHint* self) {
01381        GVariant* result;
01382        GVariant* _tmp0_;
01383        g_return_val_if_fail (self != NULL, NULL);
01384        _tmp0_ = self->priv->_data;
01385        result = _tmp0_;
01386        return result;
01387 }
01388 
01389 
01390 static gpointer _g_variant_ref0 (gpointer self) {
01391        return self ? g_variant_ref (self) : NULL;
01392 }
01393 
01394 
01395 static void unity_info_hint_set_data (UnityInfoHint* self, GVariant* value) {
01396        GVariant* _tmp0_;
01397        GVariant* _tmp1_;
01398        g_return_if_fail (self != NULL);
01399        _tmp0_ = value;
01400        _tmp1_ = _g_variant_ref0 (_tmp0_);
01401        _g_variant_unref0 (self->priv->_data);
01402        self->priv->_data = _tmp1_;
01403        g_object_notify ((GObject *) self, "data");
01404 }
01405 
01406 
01407 static void unity_info_hint_class_init (UnityInfoHintClass * klass) {
01408        unity_info_hint_parent_class = g_type_class_peek_parent (klass);
01409        g_type_class_add_private (klass, sizeof (UnityInfoHintPrivate));
01410        G_OBJECT_CLASS (klass)->get_property = _vala_unity_info_hint_get_property;
01411        G_OBJECT_CLASS (klass)->set_property = _vala_unity_info_hint_set_property;
01412        G_OBJECT_CLASS (klass)->finalize = unity_info_hint_finalize;
01413        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_INFO_HINT_ID, g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01414        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_INFO_HINT_DISPLAY_NAME, g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01415        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_INFO_HINT_ICON_HINT, g_param_spec_object ("icon-hint", "icon-hint", "icon-hint", G_TYPE_ICON, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01416        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_INFO_HINT_DATA, g_param_spec_variant ("data", "data", "data", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
01417 }
01418 
01419 
01420 static void unity_info_hint_instance_init (UnityInfoHint * self) {
01421        self->priv = UNITY_INFO_HINT_GET_PRIVATE (self);
01422 }
01423 
01424 
01425 static void unity_info_hint_finalize (GObject* obj) {
01426        UnityInfoHint * self;
01427        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_INFO_HINT, UnityInfoHint);
01428        _g_free0 (self->priv->_id);
01429        _g_free0 (self->priv->_display_name);
01430        _g_object_unref0 (self->priv->_icon_hint);
01431        _g_variant_unref0 (self->priv->_data);
01432        G_OBJECT_CLASS (unity_info_hint_parent_class)->finalize (obj);
01433 }
01434 
01435 
01436 GType unity_info_hint_get_type (void) {
01437        static volatile gsize unity_info_hint_type_id__volatile = 0;
01438        if (g_once_init_enter (&unity_info_hint_type_id__volatile)) {
01439               static const GTypeInfo g_define_type_info = { sizeof (UnityInfoHintClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_info_hint_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityInfoHint), 0, (GInstanceInitFunc) unity_info_hint_instance_init, NULL };
01440               GType unity_info_hint_type_id;
01441               unity_info_hint_type_id = g_type_register_static (G_TYPE_INITIALLY_UNOWNED, "UnityInfoHint", &g_define_type_info, 0);
01442               g_once_init_leave (&unity_info_hint_type_id__volatile, unity_info_hint_type_id);
01443        }
01444        return unity_info_hint_type_id__volatile;
01445 }
01446 
01447 
01448 static void _vala_unity_info_hint_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
01449        UnityInfoHint * self;
01450        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_INFO_HINT, UnityInfoHint);
01451        switch (property_id) {
01452               case UNITY_INFO_HINT_ID:
01453               g_value_set_string (value, unity_info_hint_get_id (self));
01454               break;
01455               case UNITY_INFO_HINT_DISPLAY_NAME:
01456               g_value_set_string (value, unity_info_hint_get_display_name (self));
01457               break;
01458               case UNITY_INFO_HINT_ICON_HINT:
01459               g_value_set_object (value, unity_info_hint_get_icon_hint (self));
01460               break;
01461               case UNITY_INFO_HINT_DATA:
01462               g_value_set_variant (value, unity_info_hint_get_data (self));
01463               break;
01464               default:
01465               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01466               break;
01467        }
01468 }
01469 
01470 
01471 static void _vala_unity_info_hint_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
01472        UnityInfoHint * self;
01473        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_INFO_HINT, UnityInfoHint);
01474        switch (property_id) {
01475               case UNITY_INFO_HINT_ID:
01476               unity_info_hint_set_id (self, g_value_get_string (value));
01477               break;
01478               case UNITY_INFO_HINT_DISPLAY_NAME:
01479               unity_info_hint_set_display_name (self, g_value_get_string (value));
01480               break;
01481               case UNITY_INFO_HINT_ICON_HINT:
01482               unity_info_hint_set_icon_hint (self, g_value_get_object (value));
01483               break;
01484               case UNITY_INFO_HINT_DATA:
01485               unity_info_hint_set_data (self, g_value_get_variant (value));
01486               break;
01487               default:
01488               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01489               break;
01490        }
01491 }
01492 
01493 
01494 UnityGenericPreview* unity_generic_preview_construct (GType object_type, const gchar* title, const gchar* description, GIcon* thumbnail) {
01495        UnityGenericPreview * self = NULL;
01496        const gchar* _tmp0_;
01497        GIcon* _tmp1_;
01498        const gchar* _tmp2_;
01499        g_return_val_if_fail (title != NULL, NULL);
01500        g_return_val_if_fail (description != NULL, NULL);
01501        _tmp0_ = title;
01502        _tmp1_ = thumbnail;
01503        _tmp2_ = description;
01504        self = (UnityGenericPreview*) g_object_new (object_type, "title", _tmp0_, "thumbnail", _tmp1_, "description-markup", _tmp2_, NULL);
01505        return self;
01506 }
01507 
01508 
01509 UnityGenericPreview* unity_generic_preview_new (const gchar* title, const gchar* description, GIcon* thumbnail) {
01510        return unity_generic_preview_construct (UNITY_TYPE_GENERIC_PREVIEW, title, description, thumbnail);
01511 }
01512 
01513 
01514 static GObject* unity_generic_preview_real_create_raw (UnityPreview* base) {
01515        UnityGenericPreview * self;
01516        GObject* result = NULL;
01517        UnityProtocolGenericPreview* _tmp0_;
01518        self = (UnityGenericPreview*) base;
01519        _tmp0_ = unity_protocol_generic_preview_new ();
01520        result = (GObject*) _tmp0_;
01521        return result;
01522 }
01523 
01524 
01525 static void unity_generic_preview_class_init (UnityGenericPreviewClass * klass) {
01526        unity_generic_preview_parent_class = g_type_class_peek_parent (klass);
01527        UNITY_PREVIEW_CLASS (klass)->create_raw = unity_generic_preview_real_create_raw;
01528 }
01529 
01530 
01531 static void unity_generic_preview_instance_init (UnityGenericPreview * self) {
01532 }
01533 
01534 
01535 GType unity_generic_preview_get_type (void) {
01536        static volatile gsize unity_generic_preview_type_id__volatile = 0;
01537        if (g_once_init_enter (&unity_generic_preview_type_id__volatile)) {
01538               static const GTypeInfo g_define_type_info = { sizeof (UnityGenericPreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_generic_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityGenericPreview), 0, (GInstanceInitFunc) unity_generic_preview_instance_init, NULL };
01539               GType unity_generic_preview_type_id;
01540               unity_generic_preview_type_id = g_type_register_static (UNITY_TYPE_PREVIEW, "UnityGenericPreview", &g_define_type_info, 0);
01541               g_once_init_leave (&unity_generic_preview_type_id__volatile, unity_generic_preview_type_id);
01542        }
01543        return unity_generic_preview_type_id__volatile;
01544 }
01545 
01546 
01547 UnityApplicationPreview* unity_application_preview_construct (GType object_type, const gchar* title, const gchar* subtitle, const gchar* description, GIcon* icon, GIcon* screenshot) {
01548        UnityApplicationPreview * self = NULL;
01549        const gchar* _tmp0_;
01550        const gchar* _tmp1_;
01551        GIcon* _tmp2_;
01552        const gchar* _tmp3_;
01553        GIcon* _tmp4_;
01554        g_return_val_if_fail (title != NULL, NULL);
01555        g_return_val_if_fail (subtitle != NULL, NULL);
01556        g_return_val_if_fail (description != NULL, NULL);
01557        _tmp0_ = title;
01558        _tmp1_ = subtitle;
01559        _tmp2_ = screenshot;
01560        _tmp3_ = description;
01561        _tmp4_ = icon;
01562        self = (UnityApplicationPreview*) g_object_new (object_type, "title", _tmp0_, "subtitle", _tmp1_, "thumbnail", _tmp2_, "description-markup", _tmp3_, "app-icon", _tmp4_, NULL);
01563        return self;
01564 }
01565 
01566 
01567 UnityApplicationPreview* unity_application_preview_new (const gchar* title, const gchar* subtitle, const gchar* description, GIcon* icon, GIcon* screenshot) {
01568        return unity_application_preview_construct (UNITY_TYPE_APPLICATION_PREVIEW, title, subtitle, description, icon, screenshot);
01569 }
01570 
01571 
01572 void unity_application_preview_set_rating (UnityApplicationPreview* self, gfloat rating, guint num_ratings) {
01573        UnityProtocolApplicationPreview* _tmp0_;
01574        gfloat _tmp1_;
01575        UnityProtocolApplicationPreview* _tmp2_;
01576        guint _tmp3_;
01577        g_return_if_fail (self != NULL);
01578        _tmp0_ = self->priv->_raw;
01579        _tmp1_ = rating;
01580        unity_protocol_application_preview_set_rating (_tmp0_, _tmp1_);
01581        _tmp2_ = self->priv->_raw;
01582        _tmp3_ = num_ratings;
01583        unity_protocol_application_preview_set_num_ratings (_tmp2_, _tmp3_);
01584 }
01585 
01586 
01587 static GObject* unity_application_preview_real_create_raw (UnityPreview* base) {
01588        UnityApplicationPreview * self;
01589        GObject* result = NULL;
01590        UnityProtocolApplicationPreview* _tmp0_;
01591        UnityProtocolApplicationPreview* raw;
01592        UnityProtocolApplicationPreview* _tmp1_;
01593        GObject* _tmp2_;
01594        self = (UnityApplicationPreview*) base;
01595        _tmp0_ = unity_protocol_application_preview_new ();
01596        raw = _tmp0_;
01597        self->priv->_raw = raw;
01598        _tmp1_ = self->priv->_raw;
01599        _tmp2_ = _g_object_ref0 ((GObject*) _tmp1_);
01600        result = _tmp2_;
01601        _g_object_unref0 (raw);
01602        return result;
01603 }
01604 
01605 
01606 GIcon* unity_application_preview_get_app_icon (UnityApplicationPreview* self) {
01607        GIcon* result;
01608        UnityProtocolApplicationPreview* _tmp0_;
01609        GIcon* _tmp1_;
01610        GIcon* _tmp2_;
01611        g_return_val_if_fail (self != NULL, NULL);
01612        _tmp0_ = self->priv->_raw;
01613        _tmp1_ = unity_protocol_application_preview_get_app_icon (_tmp0_);
01614        _tmp2_ = _tmp1_;
01615        result = _tmp2_;
01616        return result;
01617 }
01618 
01619 
01620 void unity_application_preview_set_app_icon (UnityApplicationPreview* self, GIcon* value) {
01621        UnityProtocolApplicationPreview* _tmp0_;
01622        GIcon* _tmp1_;
01623        g_return_if_fail (self != NULL);
01624        _tmp0_ = self->priv->_raw;
01625        _tmp1_ = value;
01626        unity_protocol_application_preview_set_app_icon (_tmp0_, _tmp1_);
01627        g_object_notify ((GObject *) self, "app-icon");
01628 }
01629 
01630 
01631 const gchar* unity_application_preview_get_license (UnityApplicationPreview* self) {
01632        const gchar* result;
01633        UnityProtocolApplicationPreview* _tmp0_;
01634        const gchar* _tmp1_;
01635        const gchar* _tmp2_;
01636        g_return_val_if_fail (self != NULL, NULL);
01637        _tmp0_ = self->priv->_raw;
01638        _tmp1_ = unity_protocol_application_preview_get_license (_tmp0_);
01639        _tmp2_ = _tmp1_;
01640        result = _tmp2_;
01641        return result;
01642 }
01643 
01644 
01645 void unity_application_preview_set_license (UnityApplicationPreview* self, const gchar* value) {
01646        UnityProtocolApplicationPreview* _tmp0_;
01647        const gchar* _tmp1_;
01648        g_return_if_fail (self != NULL);
01649        _tmp0_ = self->priv->_raw;
01650        _tmp1_ = value;
01651        unity_protocol_application_preview_set_license (_tmp0_, _tmp1_);
01652        g_object_notify ((GObject *) self, "license");
01653 }
01654 
01655 
01656 const gchar* unity_application_preview_get_copyright (UnityApplicationPreview* self) {
01657        const gchar* result;
01658        UnityProtocolApplicationPreview* _tmp0_;
01659        const gchar* _tmp1_;
01660        const gchar* _tmp2_;
01661        g_return_val_if_fail (self != NULL, NULL);
01662        _tmp0_ = self->priv->_raw;
01663        _tmp1_ = unity_protocol_application_preview_get_copyright (_tmp0_);
01664        _tmp2_ = _tmp1_;
01665        result = _tmp2_;
01666        return result;
01667 }
01668 
01669 
01670 void unity_application_preview_set_copyright (UnityApplicationPreview* self, const gchar* value) {
01671        UnityProtocolApplicationPreview* _tmp0_;
01672        const gchar* _tmp1_;
01673        g_return_if_fail (self != NULL);
01674        _tmp0_ = self->priv->_raw;
01675        _tmp1_ = value;
01676        unity_protocol_application_preview_set_copyright (_tmp0_, _tmp1_);
01677        g_object_notify ((GObject *) self, "copyright");
01678 }
01679 
01680 
01681 const gchar* unity_application_preview_get_last_update (UnityApplicationPreview* self) {
01682        const gchar* result;
01683        UnityProtocolApplicationPreview* _tmp0_;
01684        const gchar* _tmp1_;
01685        const gchar* _tmp2_;
01686        g_return_val_if_fail (self != NULL, NULL);
01687        _tmp0_ = self->priv->_raw;
01688        _tmp1_ = unity_protocol_application_preview_get_last_update (_tmp0_);
01689        _tmp2_ = _tmp1_;
01690        result = _tmp2_;
01691        return result;
01692 }
01693 
01694 
01695 void unity_application_preview_set_last_update (UnityApplicationPreview* self, const gchar* value) {
01696        UnityProtocolApplicationPreview* _tmp0_;
01697        const gchar* _tmp1_;
01698        g_return_if_fail (self != NULL);
01699        _tmp0_ = self->priv->_raw;
01700        _tmp1_ = value;
01701        unity_protocol_application_preview_set_last_update (_tmp0_, _tmp1_);
01702        g_object_notify ((GObject *) self, "last-update");
01703 }
01704 
01705 
01706 static void unity_application_preview_class_init (UnityApplicationPreviewClass * klass) {
01707        unity_application_preview_parent_class = g_type_class_peek_parent (klass);
01708        g_type_class_add_private (klass, sizeof (UnityApplicationPreviewPrivate));
01709        UNITY_PREVIEW_CLASS (klass)->create_raw = unity_application_preview_real_create_raw;
01710        G_OBJECT_CLASS (klass)->get_property = _vala_unity_application_preview_get_property;
01711        G_OBJECT_CLASS (klass)->set_property = _vala_unity_application_preview_set_property;
01712        G_OBJECT_CLASS (klass)->finalize = unity_application_preview_finalize;
01713        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_APPLICATION_PREVIEW_APP_ICON, g_param_spec_object ("app-icon", "app-icon", "app-icon", G_TYPE_ICON, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01714        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_APPLICATION_PREVIEW_LICENSE, g_param_spec_string ("license", "license", "license", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01715        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_APPLICATION_PREVIEW_COPYRIGHT, g_param_spec_string ("copyright", "copyright", "copyright", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01716        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_APPLICATION_PREVIEW_LAST_UPDATE, g_param_spec_string ("last-update", "last-update", "last-update", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
01717 }
01718 
01719 
01720 static void unity_application_preview_instance_init (UnityApplicationPreview * self) {
01721        self->priv = UNITY_APPLICATION_PREVIEW_GET_PRIVATE (self);
01722 }
01723 
01724 
01725 static void unity_application_preview_finalize (GObject* obj) {
01726        UnityApplicationPreview * self;
01727        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_APPLICATION_PREVIEW, UnityApplicationPreview);
01728        G_OBJECT_CLASS (unity_application_preview_parent_class)->finalize (obj);
01729 }
01730 
01731 
01732 GType unity_application_preview_get_type (void) {
01733        static volatile gsize unity_application_preview_type_id__volatile = 0;
01734        if (g_once_init_enter (&unity_application_preview_type_id__volatile)) {
01735               static const GTypeInfo g_define_type_info = { sizeof (UnityApplicationPreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_application_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityApplicationPreview), 0, (GInstanceInitFunc) unity_application_preview_instance_init, NULL };
01736               GType unity_application_preview_type_id;
01737               unity_application_preview_type_id = g_type_register_static (UNITY_TYPE_PREVIEW, "UnityApplicationPreview", &g_define_type_info, 0);
01738               g_once_init_leave (&unity_application_preview_type_id__volatile, unity_application_preview_type_id);
01739        }
01740        return unity_application_preview_type_id__volatile;
01741 }
01742 
01743 
01744 static void _vala_unity_application_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
01745        UnityApplicationPreview * self;
01746        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_APPLICATION_PREVIEW, UnityApplicationPreview);
01747        switch (property_id) {
01748               case UNITY_APPLICATION_PREVIEW_APP_ICON:
01749               g_value_set_object (value, unity_application_preview_get_app_icon (self));
01750               break;
01751               case UNITY_APPLICATION_PREVIEW_LICENSE:
01752               g_value_set_string (value, unity_application_preview_get_license (self));
01753               break;
01754               case UNITY_APPLICATION_PREVIEW_COPYRIGHT:
01755               g_value_set_string (value, unity_application_preview_get_copyright (self));
01756               break;
01757               case UNITY_APPLICATION_PREVIEW_LAST_UPDATE:
01758               g_value_set_string (value, unity_application_preview_get_last_update (self));
01759               break;
01760               default:
01761               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01762               break;
01763        }
01764 }
01765 
01766 
01767 static void _vala_unity_application_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
01768        UnityApplicationPreview * self;
01769        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_APPLICATION_PREVIEW, UnityApplicationPreview);
01770        switch (property_id) {
01771               case UNITY_APPLICATION_PREVIEW_APP_ICON:
01772               unity_application_preview_set_app_icon (self, g_value_get_object (value));
01773               break;
01774               case UNITY_APPLICATION_PREVIEW_LICENSE:
01775               unity_application_preview_set_license (self, g_value_get_string (value));
01776               break;
01777               case UNITY_APPLICATION_PREVIEW_COPYRIGHT:
01778               unity_application_preview_set_copyright (self, g_value_get_string (value));
01779               break;
01780               case UNITY_APPLICATION_PREVIEW_LAST_UPDATE:
01781               unity_application_preview_set_last_update (self, g_value_get_string (value));
01782               break;
01783               default:
01784               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
01785               break;
01786        }
01787 }
01788 
01789 
01790 GType unity_music_preview_track_state_get_type (void) {
01791        static volatile gsize unity_music_preview_track_state_type_id__volatile = 0;
01792        if (g_once_init_enter (&unity_music_preview_track_state_type_id__volatile)) {
01793               static const GEnumValue values[] = {{UNITY_MUSIC_PREVIEW_TRACK_STATE_STOPPED, "UNITY_MUSIC_PREVIEW_TRACK_STATE_STOPPED", "stopped"}, {UNITY_MUSIC_PREVIEW_TRACK_STATE_PLAYING, "UNITY_MUSIC_PREVIEW_TRACK_STATE_PLAYING", "playing"}, {UNITY_MUSIC_PREVIEW_TRACK_STATE_PAUSED, "UNITY_MUSIC_PREVIEW_TRACK_STATE_PAUSED", "paused"}, {0, NULL, NULL}};
01794               GType unity_music_preview_track_state_type_id;
01795               unity_music_preview_track_state_type_id = g_enum_register_static ("UnityMusicPreviewTrackState", values);
01796               g_once_init_leave (&unity_music_preview_track_state_type_id__volatile, unity_music_preview_track_state_type_id);
01797        }
01798        return unity_music_preview_track_state_type_id__volatile;
01799 }
01800 
01801 
01802 static GType unity_music_preview_track_data_columns_get_type (void) {
01803        static volatile gsize unity_music_preview_track_data_columns_type_id__volatile = 0;
01804        if (g_once_init_enter (&unity_music_preview_track_data_columns_type_id__volatile)) {
01805               static const GEnumValue values[] = {{UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_URI, "UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_URI", "uri"}, {UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_TRACK_NO, "UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_TRACK_NO", "track-no"}, {UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_TITLE, "UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_TITLE", "title"}, {UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_LENGTH, "UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_LENGTH", "length"}, {UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING, "UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING", "playing"}, {UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PROGRESS, "UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PROGRESS", "progress"}, {0, NULL, NULL}};
01806               GType unity_music_preview_track_data_columns_type_id;
01807               unity_music_preview_track_data_columns_type_id = g_enum_register_static ("UnityMusicPreviewTrackDataColumns", values);
01808               g_once_init_leave (&unity_music_preview_track_data_columns_type_id__volatile, unity_music_preview_track_data_columns_type_id);
01809        }
01810        return unity_music_preview_track_data_columns_type_id__volatile;
01811 }
01812 
01813 
01814 UnityMusicPreview* unity_music_preview_construct (GType object_type, const gchar* title, const gchar* subtitle, GIcon* thumbnail) {
01815        UnityMusicPreview * self = NULL;
01816        const gchar* _tmp0_;
01817        const gchar* _tmp1_;
01818        GIcon* _tmp2_;
01819        g_return_val_if_fail (title != NULL, NULL);
01820        g_return_val_if_fail (subtitle != NULL, NULL);
01821        _tmp0_ = title;
01822        _tmp1_ = subtitle;
01823        _tmp2_ = thumbnail;
01824        self = (UnityMusicPreview*) g_object_new (object_type, "title", _tmp0_, "subtitle", _tmp1_, "thumbnail", _tmp2_, NULL);
01825        return self;
01826 }
01827 
01828 
01829 UnityMusicPreview* unity_music_preview_new (const gchar* title, const gchar* subtitle, GIcon* thumbnail) {
01830        return unity_music_preview_construct (UNITY_TYPE_MUSIC_PREVIEW, title, subtitle, thumbnail);
01831 }
01832 
01833 
01834 static GObject* unity_music_preview_real_create_raw (UnityPreview* base) {
01835        UnityMusicPreview * self;
01836        GObject* result = NULL;
01837        UnityProtocolMusicPreview* _tmp0_;
01838        UnityProtocolMusicPreview* raw;
01839        UnityProtocolMusicPreview* _tmp1_;
01840        GObject* _tmp2_;
01841        self = (UnityMusicPreview*) base;
01842        _tmp0_ = unity_protocol_music_preview_new ();
01843        raw = _tmp0_;
01844        self->priv->_raw = raw;
01845        _tmp1_ = self->priv->_raw;
01846        _tmp2_ = _g_object_ref0 ((GObject*) _tmp1_);
01847        result = _tmp2_;
01848        _g_object_unref0 (raw);
01849        return result;
01850 }
01851 
01852 
01853 void unity_music_preview_add_track (UnityMusicPreview* self, UnityTrackMetadata* track) {
01854        DeeSharedModel* _tmp0_;
01855        UnityTrackMetadata* _tmp1_;
01856        const gchar* _tmp2_;
01857        const gchar* _tmp3_;
01858        UnityTrackMetadata* _tmp4_;
01859        gint _tmp5_;
01860        gint _tmp6_;
01861        UnityTrackMetadata* _tmp7_;
01862        const gchar* _tmp8_;
01863        const gchar* _tmp9_;
01864        UnityTrackMetadata* _tmp10_;
01865        guint _tmp11_;
01866        guint _tmp12_;
01867        g_return_if_fail (self != NULL);
01868        g_return_if_fail (track != NULL);
01869        unity_music_preview_init_model (self);
01870        _tmp0_ = self->priv->_track_data;
01871        _tmp1_ = track;
01872        _tmp2_ = unity_track_metadata_get_uri (_tmp1_);
01873        _tmp3_ = _tmp2_;
01874        _tmp4_ = track;
01875        _tmp5_ = unity_track_metadata_get_track_no (_tmp4_);
01876        _tmp6_ = _tmp5_;
01877        _tmp7_ = track;
01878        _tmp8_ = unity_track_metadata_get_title (_tmp7_);
01879        _tmp9_ = _tmp8_;
01880        _tmp10_ = track;
01881        _tmp11_ = unity_track_metadata_get_length (_tmp10_);
01882        _tmp12_ = _tmp11_;
01883        dee_model_append ((DeeModel*) _tmp0_, _tmp3_, _tmp6_, _tmp9_, _tmp12_, FALSE, 0.0, NULL);
01884 }
01885 
01886 
01887 static GVariant* _variant_new21 (gboolean value) {
01888        return g_variant_ref_sink (g_variant_new_boolean (value));
01889 }
01890 
01891 
01892 static GVariant* _variant_new22 (gdouble value) {
01893        return g_variant_ref_sink (g_variant_new_double (value));
01894 }
01895 
01896 
01897 static GVariant* _variant_new23 (gboolean value) {
01898        return g_variant_ref_sink (g_variant_new_boolean (value));
01899 }
01900 
01901 
01902 static GVariant* _variant_new24 (gdouble value) {
01903        return g_variant_ref_sink (g_variant_new_double (value));
01904 }
01905 
01906 
01907 static void unity_music_preview_update_track_state (UnityMusicPreview* self) {
01908        DeeSharedModel* _tmp0_;
01909        DeeSharedModel* _tmp1_;
01910        DeeSharedModel* _tmp2_;
01911        DeeSharedModel* model;
01912        DeeSharedModel* _tmp3_;
01913        DeeModelIter* _tmp4_ = NULL;
01914        DeeModelIter* iter;
01915        DeeSharedModel* _tmp5_;
01916        DeeModelIter* _tmp6_ = NULL;
01917        DeeModelIter* end_iter;
01918        gboolean found_last_playing;
01919        g_return_if_fail (self != NULL);
01920        _tmp0_ = self->priv->_track_data;
01921        g_return_if_fail (_tmp0_ != NULL);
01922        _tmp1_ = self->priv->_track_data;
01923        _tmp2_ = _g_object_ref0 (_tmp1_);
01924        model = _tmp2_;
01925        _tmp3_ = model;
01926        _tmp4_ = dee_model_get_first_iter ((DeeModel*) _tmp3_);
01927        iter = _tmp4_;
01928        _tmp5_ = model;
01929        _tmp6_ = dee_model_get_last_iter ((DeeModel*) _tmp5_);
01930        end_iter = _tmp6_;
01931        found_last_playing = FALSE;
01932        while (TRUE) {
01933               DeeModelIter* _tmp7_;
01934               DeeModelIter* _tmp8_;
01935               DeeSharedModel* _tmp9_;
01936               DeeModelIter* _tmp10_;
01937               const gchar* _tmp11_ = NULL;
01938               const gchar* _tmp12_;
01939               DeeSharedModel* _tmp45_;
01940               DeeModelIter* _tmp46_;
01941               DeeModelIter* _tmp47_ = NULL;
01942               _tmp7_ = iter;
01943               _tmp8_ = end_iter;
01944               if (!(_tmp7_ != _tmp8_)) {
01945                      break;
01946               }
01947               _tmp9_ = model;
01948               _tmp10_ = iter;
01949               _tmp11_ = dee_model_get_string ((DeeModel*) _tmp9_, _tmp10_, (guint) UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_URI);
01950               _tmp12_ = self->priv->_current_track_uri;
01951               if (g_strcmp0 (_tmp11_, _tmp12_) == 0) {
01952                      DeeSharedModel* _tmp13_;
01953                      DeeModelIter* _tmp14_;
01954                      GVariant** _tmp15_;
01955                      GVariant** _tmp16_ = NULL;
01956                      GVariant** row;
01957                      gint row_length1;
01958                      gint _row_size_;
01959                      GVariant** _tmp17_;
01960                      gint _tmp17__length1;
01961                      UnityMusicPreviewTrackState _tmp18_;
01962                      GVariant* _tmp19_;
01963                      GVariant* _tmp20_;
01964                      GVariant** _tmp21_;
01965                      gint _tmp21__length1;
01966                      gfloat _tmp22_;
01967                      GVariant* _tmp23_;
01968                      GVariant* _tmp24_;
01969                      DeeSharedModel* _tmp25_;
01970                      DeeModelIter* _tmp26_;
01971                      GVariant** _tmp27_;
01972                      gint _tmp27__length1;
01973                      gboolean _tmp28_;
01974                      _tmp13_ = model;
01975                      _tmp14_ = iter;
01976                      _tmp16_ = _tmp15_ = dee_model_get_row ((DeeModel*) _tmp13_, _tmp14_, NULL);
01977                      row = _tmp16_;
01978                      row_length1 = _vala_array_length (_tmp15_);
01979                      _row_size_ = row_length1;
01980                      _tmp17_ = row;
01981                      _tmp17__length1 = row_length1;
01982                      _tmp18_ = self->priv->_current_track_state;
01983                      _tmp19_ = _variant_new21 (_tmp18_ == UNITY_MUSIC_PREVIEW_TRACK_STATE_PLAYING);
01984                      _g_variant_unref0 (_tmp17_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING]);
01985                      _tmp17_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING] = _tmp19_;
01986                      _tmp20_ = _tmp17_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING];
01987                      _tmp21_ = row;
01988                      _tmp21__length1 = row_length1;
01989                      _tmp22_ = self->priv->_current_progress;
01990                      _tmp23_ = _variant_new22 ((gdouble) _tmp22_);
01991                      _g_variant_unref0 (_tmp21_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PROGRESS]);
01992                      _tmp21_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PROGRESS] = _tmp23_;
01993                      _tmp24_ = _tmp21_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PROGRESS];
01994                      _tmp25_ = model;
01995                      _tmp26_ = iter;
01996                      _tmp27_ = row;
01997                      _tmp27__length1 = row_length1;
01998                      dee_model_set_row ((DeeModel*) _tmp25_, _tmp26_, _tmp27_);
01999                      _tmp28_ = found_last_playing;
02000                      if (_tmp28_) {
02001                             row = (_vala_array_free (row, row_length1, (GDestroyNotify) g_variant_unref), NULL);
02002                             break;
02003                      }
02004                      row = (_vala_array_free (row, row_length1, (GDestroyNotify) g_variant_unref), NULL);
02005               } else {
02006                      DeeSharedModel* _tmp29_;
02007                      DeeModelIter* _tmp30_;
02008                      gboolean _tmp31_ = FALSE;
02009                      _tmp29_ = model;
02010                      _tmp30_ = iter;
02011                      _tmp31_ = dee_model_get_bool ((DeeModel*) _tmp29_, _tmp30_, (guint) UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING);
02012                      if (_tmp31_) {
02013                             DeeSharedModel* _tmp32_;
02014                             DeeModelIter* _tmp33_;
02015                             GVariant** _tmp34_;
02016                             GVariant** _tmp35_ = NULL;
02017                             GVariant** row;
02018                             gint row_length1;
02019                             gint _row_size_;
02020                             GVariant** _tmp36_;
02021                             gint _tmp36__length1;
02022                             GVariant* _tmp37_;
02023                             GVariant* _tmp38_;
02024                             GVariant** _tmp39_;
02025                             gint _tmp39__length1;
02026                             GVariant* _tmp40_;
02027                             GVariant* _tmp41_;
02028                             DeeSharedModel* _tmp42_;
02029                             DeeModelIter* _tmp43_;
02030                             GVariant** _tmp44_;
02031                             gint _tmp44__length1;
02032                             found_last_playing = TRUE;
02033                             _tmp32_ = model;
02034                             _tmp33_ = iter;
02035                             _tmp35_ = _tmp34_ = dee_model_get_row ((DeeModel*) _tmp32_, _tmp33_, NULL);
02036                             row = _tmp35_;
02037                             row_length1 = _vala_array_length (_tmp34_);
02038                             _row_size_ = row_length1;
02039                             _tmp36_ = row;
02040                             _tmp36__length1 = row_length1;
02041                             _tmp37_ = _variant_new23 (FALSE);
02042                             _g_variant_unref0 (_tmp36_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING]);
02043                             _tmp36_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING] = _tmp37_;
02044                             _tmp38_ = _tmp36_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PLAYING];
02045                             _tmp39_ = row;
02046                             _tmp39__length1 = row_length1;
02047                             _tmp40_ = _variant_new24 (0.0);
02048                             _g_variant_unref0 (_tmp39_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PROGRESS]);
02049                             _tmp39_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PROGRESS] = _tmp40_;
02050                             _tmp41_ = _tmp39_[UNITY_MUSIC_PREVIEW_TRACK_DATA_COLUMNS_PROGRESS];
02051                             _tmp42_ = model;
02052                             _tmp43_ = iter;
02053                             _tmp44_ = row;
02054                             _tmp44__length1 = row_length1;
02055                             dee_model_set_row ((DeeModel*) _tmp42_, _tmp43_, _tmp44_);
02056                             row = (_vala_array_free (row, row_length1, (GDestroyNotify) g_variant_unref), NULL);
02057                      }
02058               }
02059               _tmp45_ = model;
02060               _tmp46_ = iter;
02061               _tmp47_ = dee_model_next ((DeeModel*) _tmp45_, _tmp46_);
02062               iter = _tmp47_;
02063        }
02064        _g_object_unref0 (model);
02065 }
02066 
02067 
02068 static GHashTable* unity_music_preview_real_update_property (UnityPreview* base, GHashTable* values) {
02069        UnityMusicPreview * self;
02070        GHashTable* result = NULL;
02071        GHashTable* _tmp0_;
02072        gconstpointer _tmp1_ = NULL;
02073        GVariant* _tmp2_;
02074        GVariant* action_v;
02075        GHashTable* _tmp3_;
02076        gconstpointer _tmp4_ = NULL;
02077        GVariant* _tmp5_;
02078        GVariant* uri_v;
02079        gboolean _tmp6_ = FALSE;
02080        GVariant* _tmp7_;
02081        gboolean _tmp9_;
02082        GHashTable* _tmp21_;
02083        GHashTable* _tmp22_ = NULL;
02084        self = (UnityMusicPreview*) base;
02085        g_return_val_if_fail (values != NULL, NULL);
02086        _tmp0_ = values;
02087        _tmp1_ = g_hash_table_lookup (_tmp0_, "action");
02088        _tmp2_ = _g_variant_ref0 ((GVariant*) _tmp1_);
02089        action_v = _tmp2_;
02090        _tmp3_ = values;
02091        _tmp4_ = g_hash_table_lookup (_tmp3_, "uri");
02092        _tmp5_ = _g_variant_ref0 ((GVariant*) _tmp4_);
02093        uri_v = _tmp5_;
02094        _tmp7_ = action_v;
02095        if (_tmp7_ != NULL) {
02096               GVariant* _tmp8_;
02097               _tmp8_ = uri_v;
02098               _tmp6_ = _tmp8_ != NULL;
02099        } else {
02100               _tmp6_ = FALSE;
02101        }
02102        _tmp9_ = _tmp6_;
02103        if (_tmp9_) {
02104               GVariant* _tmp10_;
02105               const gchar* _tmp11_ = NULL;
02106               const gchar* _tmp12_;
02107               GQuark _tmp14_ = 0U;
02108               static GQuark _tmp13_label0 = 0;
02109               static GQuark _tmp13_label1 = 0;
02110               _tmp10_ = action_v;
02111               _tmp11_ = g_variant_get_string (_tmp10_, NULL);
02112               _tmp12_ = _tmp11_;
02113               _tmp14_ = (NULL == _tmp12_) ? 0 : g_quark_from_string (_tmp12_);
02114               if (_tmp14_ == ((0 != _tmp13_label0) ? _tmp13_label0 : (_tmp13_label0 = g_quark_from_static_string ("play")))) {
02115                      switch (0) {
02116                             default:
02117                             {
02118                                    GVariant* _tmp15_;
02119                                    const gchar* _tmp16_ = NULL;
02120                                    _tmp15_ = uri_v;
02121                                    _tmp16_ = g_variant_get_string (_tmp15_, NULL);
02122                                    g_signal_emit_by_name (self, "play", _tmp16_);
02123                                    break;
02124                             }
02125                      }
02126               } else if (_tmp14_ == ((0 != _tmp13_label1) ? _tmp13_label1 : (_tmp13_label1 = g_quark_from_static_string ("pause")))) {
02127                      switch (0) {
02128                             default:
02129                             {
02130                                    GVariant* _tmp17_;
02131                                    const gchar* _tmp18_ = NULL;
02132                                    _tmp17_ = uri_v;
02133                                    _tmp18_ = g_variant_get_string (_tmp17_, NULL);
02134                                    g_signal_emit_by_name (self, "pause", _tmp18_);
02135                                    break;
02136                             }
02137                      }
02138               } else {
02139                      switch (0) {
02140                             default:
02141                             {
02142                                    GVariant* _tmp19_;
02143                                    const gchar* _tmp20_ = NULL;
02144                                    _tmp19_ = action_v;
02145                                    _tmp20_ = g_variant_get_string (_tmp19_, NULL);
02146                                    g_warning ("unity-previews.vala:397: Unknown MusicPreview action: %s", _tmp20_);
02147                                    break;
02148                             }
02149                      }
02150               }
02151        }
02152        _tmp21_ = values;
02153        _tmp22_ = UNITY_PREVIEW_CLASS (unity_music_preview_parent_class)->update_property (G_TYPE_CHECK_INSTANCE_CAST (self, UNITY_TYPE_PREVIEW, UnityPreview), _tmp21_);
02154        result = _tmp22_;
02155        _g_variant_unref0 (uri_v);
02156        _g_variant_unref0 (action_v);
02157        return result;
02158 }
02159 
02160 
02161 static void unity_music_preview_init_model (UnityMusicPreview* self) {
02162        DeeSharedModel* _tmp0_;
02163        g_return_if_fail (self != NULL);
02164        _tmp0_ = self->priv->_track_data;
02165        if (_tmp0_ == NULL) {
02166               gint64 _tmp1_ = 0LL;
02167               gchar* _tmp2_ = NULL;
02168               gchar* name;
02169               const gchar* _tmp3_;
02170               DeeSharedModel* _tmp4_;
02171               DeeSharedModel* _tmp5_;
02172               UnityProtocolMusicPreview* _tmp6_;
02173               const gchar* _tmp7_;
02174               _tmp1_ = g_get_monotonic_time ();
02175               _tmp2_ = g_strdup_printf ("com.canonical.Unity.Scope.TrackData.T%" G_GINT64_FORMAT, _tmp1_);
02176               name = _tmp2_;
02177               _tmp3_ = name;
02178               _tmp4_ = (DeeSharedModel*) dee_shared_model_new (_tmp3_);
02179               _g_object_unref0 (self->priv->_track_data);
02180               self->priv->_track_data = _tmp4_;
02181               _tmp5_ = self->priv->_track_data;
02182               dee_model_set_schema ((DeeModel*) _tmp5_, "s", "i", "s", "u", "b", "d", NULL);
02183               _tmp6_ = self->priv->_raw;
02184               _tmp7_ = name;
02185               unity_protocol_music_preview_set_track_data_swarm_name (_tmp6_, _tmp7_);
02186               _g_free0 (name);
02187        }
02188 }
02189 
02190 
02191 const gchar* unity_music_preview_get_current_track_uri (UnityMusicPreview* self) {
02192        const gchar* result;
02193        const gchar* _tmp0_;
02194        g_return_val_if_fail (self != NULL, NULL);
02195        _tmp0_ = self->priv->_current_track_uri;
02196        result = _tmp0_;
02197        return result;
02198 }
02199 
02200 
02201 void unity_music_preview_set_current_track_uri (UnityMusicPreview* self, const gchar* value) {
02202        const gchar* _tmp0_;
02203        const gchar* _tmp1_;
02204        g_return_if_fail (self != NULL);
02205        _tmp0_ = self->priv->_current_track_uri;
02206        _tmp1_ = value;
02207        if (g_strcmp0 (_tmp0_, _tmp1_) != 0) {
02208               const gchar* _tmp2_;
02209               gchar* _tmp3_;
02210               _tmp2_ = value;
02211               _tmp3_ = g_strdup (_tmp2_);
02212               _g_free0 (self->priv->_current_track_uri);
02213               self->priv->_current_track_uri = _tmp3_;
02214               unity_music_preview_update_track_state (self);
02215        }
02216        g_object_notify ((GObject *) self, "current-track-uri");
02217 }
02218 
02219 
02220 gfloat unity_music_preview_get_current_progress (UnityMusicPreview* self) {
02221        gfloat result;
02222        gfloat _tmp0_;
02223        g_return_val_if_fail (self != NULL, 0.0F);
02224        _tmp0_ = self->priv->_current_progress;
02225        result = _tmp0_;
02226        return result;
02227 }
02228 
02229 
02230 void unity_music_preview_set_current_progress (UnityMusicPreview* self, gfloat value) {
02231        gfloat _tmp0_;
02232        g_return_if_fail (self != NULL);
02233        _tmp0_ = value;
02234        self->priv->_current_progress = _tmp0_;
02235        unity_music_preview_update_track_state (self);
02236        g_object_notify ((GObject *) self, "current-progress");
02237 }
02238 
02239 
02240 UnityMusicPreviewTrackState unity_music_preview_get_current_track_state (UnityMusicPreview* self) {
02241        UnityMusicPreviewTrackState result;
02242        UnityMusicPreviewTrackState _tmp0_;
02243        g_return_val_if_fail (self != NULL, 0);
02244        _tmp0_ = self->priv->_current_track_state;
02245        result = _tmp0_;
02246        return result;
02247 }
02248 
02249 
02250 void unity_music_preview_set_current_track_state (UnityMusicPreview* self, UnityMusicPreviewTrackState value) {
02251        UnityMusicPreviewTrackState _tmp0_;
02252        UnityMusicPreviewTrackState _tmp1_;
02253        g_return_if_fail (self != NULL);
02254        _tmp0_ = value;
02255        self->priv->_current_track_state = _tmp0_;
02256        _tmp1_ = self->priv->_current_track_state;
02257        if (_tmp1_ == UNITY_MUSIC_PREVIEW_TRACK_STATE_STOPPED) {
02258               self->priv->_current_progress = 0.0f;
02259        }
02260        unity_music_preview_update_track_state (self);
02261        g_object_notify ((GObject *) self, "current-track-state");
02262 }
02263 
02264 
02265 static void unity_music_preview_class_init (UnityMusicPreviewClass * klass) {
02266        unity_music_preview_parent_class = g_type_class_peek_parent (klass);
02267        g_type_class_add_private (klass, sizeof (UnityMusicPreviewPrivate));
02268        UNITY_PREVIEW_CLASS (klass)->create_raw = unity_music_preview_real_create_raw;
02269        UNITY_PREVIEW_CLASS (klass)->update_property = unity_music_preview_real_update_property;
02270        G_OBJECT_CLASS (klass)->get_property = _vala_unity_music_preview_get_property;
02271        G_OBJECT_CLASS (klass)->set_property = _vala_unity_music_preview_set_property;
02272        G_OBJECT_CLASS (klass)->finalize = unity_music_preview_finalize;
02273        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_PREVIEW_CURRENT_TRACK_URI, g_param_spec_string ("current-track-uri", "current-track-uri", "current-track-uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
02274        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_PREVIEW_CURRENT_PROGRESS, g_param_spec_float ("current-progress", "current-progress", "current-progress", -G_MAXFLOAT, G_MAXFLOAT, 0.0F, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
02275        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_PREVIEW_CURRENT_TRACK_STATE, g_param_spec_enum ("current-track-state", "current-track-state", "current-track-state", UNITY_MUSIC_PREVIEW_TYPE_TRACK_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
02276        g_signal_new ("play", UNITY_TYPE_MUSIC_PREVIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
02277        g_signal_new ("pause", UNITY_TYPE_MUSIC_PREVIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
02278 }
02279 
02280 
02281 static void unity_music_preview_instance_init (UnityMusicPreview * self) {
02282        self->priv = UNITY_MUSIC_PREVIEW_GET_PRIVATE (self);
02283 }
02284 
02285 
02286 static void unity_music_preview_finalize (GObject* obj) {
02287        UnityMusicPreview * self;
02288        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_MUSIC_PREVIEW, UnityMusicPreview);
02289        _g_object_unref0 (self->priv->_track_data);
02290        _g_free0 (self->priv->_current_track_uri);
02291        G_OBJECT_CLASS (unity_music_preview_parent_class)->finalize (obj);
02292 }
02293 
02294 
02295 GType unity_music_preview_get_type (void) {
02296        static volatile gsize unity_music_preview_type_id__volatile = 0;
02297        if (g_once_init_enter (&unity_music_preview_type_id__volatile)) {
02298               static const GTypeInfo g_define_type_info = { sizeof (UnityMusicPreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_music_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityMusicPreview), 0, (GInstanceInitFunc) unity_music_preview_instance_init, NULL };
02299               GType unity_music_preview_type_id;
02300               unity_music_preview_type_id = g_type_register_static (UNITY_TYPE_PREVIEW, "UnityMusicPreview", &g_define_type_info, 0);
02301               g_once_init_leave (&unity_music_preview_type_id__volatile, unity_music_preview_type_id);
02302        }
02303        return unity_music_preview_type_id__volatile;
02304 }
02305 
02306 
02307 static void _vala_unity_music_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
02308        UnityMusicPreview * self;
02309        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_MUSIC_PREVIEW, UnityMusicPreview);
02310        switch (property_id) {
02311               case UNITY_MUSIC_PREVIEW_CURRENT_TRACK_URI:
02312               g_value_set_string (value, unity_music_preview_get_current_track_uri (self));
02313               break;
02314               case UNITY_MUSIC_PREVIEW_CURRENT_PROGRESS:
02315               g_value_set_float (value, unity_music_preview_get_current_progress (self));
02316               break;
02317               case UNITY_MUSIC_PREVIEW_CURRENT_TRACK_STATE:
02318               g_value_set_enum (value, unity_music_preview_get_current_track_state (self));
02319               break;
02320               default:
02321               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
02322               break;
02323        }
02324 }
02325 
02326 
02327 static void _vala_unity_music_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
02328        UnityMusicPreview * self;
02329        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_MUSIC_PREVIEW, UnityMusicPreview);
02330        switch (property_id) {
02331               case UNITY_MUSIC_PREVIEW_CURRENT_TRACK_URI:
02332               unity_music_preview_set_current_track_uri (self, g_value_get_string (value));
02333               break;
02334               case UNITY_MUSIC_PREVIEW_CURRENT_PROGRESS:
02335               unity_music_preview_set_current_progress (self, g_value_get_float (value));
02336               break;
02337               case UNITY_MUSIC_PREVIEW_CURRENT_TRACK_STATE:
02338               unity_music_preview_set_current_track_state (self, g_value_get_enum (value));
02339               break;
02340               default:
02341               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
02342               break;
02343        }
02344 }
02345 
02346 
02347 UnityMoviePreview* unity_movie_preview_construct (GType object_type, const gchar* title, const gchar* subtitle, const gchar* description, GIcon* thumbnail) {
02348        UnityMoviePreview * self = NULL;
02349        const gchar* _tmp0_;
02350        const gchar* _tmp1_;
02351        const gchar* _tmp2_;
02352        GIcon* _tmp3_;
02353        g_return_val_if_fail (title != NULL, NULL);
02354        g_return_val_if_fail (subtitle != NULL, NULL);
02355        g_return_val_if_fail (description != NULL, NULL);
02356        _tmp0_ = title;
02357        _tmp1_ = subtitle;
02358        _tmp2_ = description;
02359        _tmp3_ = thumbnail;
02360        self = (UnityMoviePreview*) g_object_new (object_type, "title", _tmp0_, "subtitle", _tmp1_, "description-markup", _tmp2_, "thumbnail", _tmp3_, NULL);
02361        return self;
02362 }
02363 
02364 
02365 UnityMoviePreview* unity_movie_preview_new (const gchar* title, const gchar* subtitle, const gchar* description, GIcon* thumbnail) {
02366        return unity_movie_preview_construct (UNITY_TYPE_MOVIE_PREVIEW, title, subtitle, description, thumbnail);
02367 }
02368 
02369 
02370 void unity_movie_preview_set_rating (UnityMoviePreview* self, gfloat rating, guint num_ratings) {
02371        UnityProtocolMoviePreview* _tmp0_;
02372        gfloat _tmp1_;
02373        UnityProtocolMoviePreview* _tmp2_;
02374        guint _tmp3_;
02375        g_return_if_fail (self != NULL);
02376        _tmp0_ = self->priv->_raw;
02377        _tmp1_ = rating;
02378        unity_protocol_movie_preview_set_rating (_tmp0_, _tmp1_);
02379        _tmp2_ = self->priv->_raw;
02380        _tmp3_ = num_ratings;
02381        unity_protocol_movie_preview_set_num_ratings (_tmp2_, _tmp3_);
02382 }
02383 
02384 
02385 static GObject* unity_movie_preview_real_create_raw (UnityPreview* base) {
02386        UnityMoviePreview * self;
02387        GObject* result = NULL;
02388        UnityProtocolMoviePreview* _tmp0_;
02389        UnityProtocolMoviePreview* raw;
02390        UnityProtocolMoviePreview* _tmp1_;
02391        GObject* _tmp2_;
02392        self = (UnityMoviePreview*) base;
02393        _tmp0_ = unity_protocol_movie_preview_new ();
02394        raw = _tmp0_;
02395        self->priv->_raw = raw;
02396        _tmp1_ = self->priv->_raw;
02397        _tmp2_ = _g_object_ref0 ((GObject*) _tmp1_);
02398        result = _tmp2_;
02399        _g_object_unref0 (raw);
02400        return result;
02401 }
02402 
02403 
02404 const gchar* unity_movie_preview_get_year (UnityMoviePreview* self) {
02405        const gchar* result;
02406        UnityProtocolMoviePreview* _tmp0_;
02407        const gchar* _tmp1_;
02408        const gchar* _tmp2_;
02409        g_return_val_if_fail (self != NULL, NULL);
02410        _tmp0_ = self->priv->_raw;
02411        _tmp1_ = unity_protocol_movie_preview_get_year (_tmp0_);
02412        _tmp2_ = _tmp1_;
02413        result = _tmp2_;
02414        return result;
02415 }
02416 
02417 
02418 void unity_movie_preview_set_year (UnityMoviePreview* self, const gchar* value) {
02419        UnityProtocolMoviePreview* _tmp0_;
02420        const gchar* _tmp1_;
02421        g_return_if_fail (self != NULL);
02422        _tmp0_ = self->priv->_raw;
02423        _tmp1_ = value;
02424        unity_protocol_movie_preview_set_year (_tmp0_, _tmp1_);
02425        g_object_notify ((GObject *) self, "year");
02426 }
02427 
02428 
02429 static void unity_movie_preview_class_init (UnityMoviePreviewClass * klass) {
02430        unity_movie_preview_parent_class = g_type_class_peek_parent (klass);
02431        g_type_class_add_private (klass, sizeof (UnityMoviePreviewPrivate));
02432        UNITY_PREVIEW_CLASS (klass)->create_raw = unity_movie_preview_real_create_raw;
02433        G_OBJECT_CLASS (klass)->get_property = _vala_unity_movie_preview_get_property;
02434        G_OBJECT_CLASS (klass)->set_property = _vala_unity_movie_preview_set_property;
02435        G_OBJECT_CLASS (klass)->finalize = unity_movie_preview_finalize;
02436        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MOVIE_PREVIEW_YEAR, g_param_spec_string ("year", "year", "year", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
02437 }
02438 
02439 
02440 static void unity_movie_preview_instance_init (UnityMoviePreview * self) {
02441        self->priv = UNITY_MOVIE_PREVIEW_GET_PRIVATE (self);
02442 }
02443 
02444 
02445 static void unity_movie_preview_finalize (GObject* obj) {
02446        UnityMoviePreview * self;
02447        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_MOVIE_PREVIEW, UnityMoviePreview);
02448        G_OBJECT_CLASS (unity_movie_preview_parent_class)->finalize (obj);
02449 }
02450 
02451 
02452 GType unity_movie_preview_get_type (void) {
02453        static volatile gsize unity_movie_preview_type_id__volatile = 0;
02454        if (g_once_init_enter (&unity_movie_preview_type_id__volatile)) {
02455               static const GTypeInfo g_define_type_info = { sizeof (UnityMoviePreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_movie_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityMoviePreview), 0, (GInstanceInitFunc) unity_movie_preview_instance_init, NULL };
02456               GType unity_movie_preview_type_id;
02457               unity_movie_preview_type_id = g_type_register_static (UNITY_TYPE_PREVIEW, "UnityMoviePreview", &g_define_type_info, 0);
02458               g_once_init_leave (&unity_movie_preview_type_id__volatile, unity_movie_preview_type_id);
02459        }
02460        return unity_movie_preview_type_id__volatile;
02461 }
02462 
02463 
02464 static void _vala_unity_movie_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
02465        UnityMoviePreview * self;
02466        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_MOVIE_PREVIEW, UnityMoviePreview);
02467        switch (property_id) {
02468               case UNITY_MOVIE_PREVIEW_YEAR:
02469               g_value_set_string (value, unity_movie_preview_get_year (self));
02470               break;
02471               default:
02472               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
02473               break;
02474        }
02475 }
02476 
02477 
02478 static void _vala_unity_movie_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
02479        UnityMoviePreview * self;
02480        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_MOVIE_PREVIEW, UnityMoviePreview);
02481        switch (property_id) {
02482               case UNITY_MOVIE_PREVIEW_YEAR:
02483               unity_movie_preview_set_year (self, g_value_get_string (value));
02484               break;
02485               default:
02486               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
02487               break;
02488        }
02489 }
02490 
02491 
02492 UnitySeriesItem* unity_series_item_construct (GType object_type, const gchar* uri, const gchar* title, GIcon* icon_hint) {
02493        UnitySeriesItem * self = NULL;
02494        const gchar* _tmp0_;
02495        const gchar* _tmp1_;
02496        GIcon* _tmp2_;
02497        g_return_val_if_fail (uri != NULL, NULL);
02498        g_return_val_if_fail (title != NULL, NULL);
02499        _tmp0_ = uri;
02500        _tmp1_ = title;
02501        _tmp2_ = icon_hint;
02502        self = (UnitySeriesItem*) g_object_new (object_type, "uri", _tmp0_, "title", _tmp1_, "icon-hint", _tmp2_, NULL);
02503        return self;
02504 }
02505 
02506 
02507 UnitySeriesItem* unity_series_item_new (const gchar* uri, const gchar* title, GIcon* icon_hint) {
02508        return unity_series_item_construct (UNITY_TYPE_SERIES_ITEM, uri, title, icon_hint);
02509 }
02510 
02511 
02512 const gchar* unity_series_item_get_uri (UnitySeriesItem* self) {
02513        const gchar* result;
02514        const gchar* _tmp0_;
02515        g_return_val_if_fail (self != NULL, NULL);
02516        _tmp0_ = self->priv->_uri;
02517        result = _tmp0_;
02518        return result;
02519 }
02520 
02521 
02522 static void unity_series_item_set_uri (UnitySeriesItem* self, const gchar* value) {
02523        const gchar* _tmp0_;
02524        gchar* _tmp1_;
02525        g_return_if_fail (self != NULL);
02526        _tmp0_ = value;
02527        _tmp1_ = g_strdup (_tmp0_);
02528        _g_free0 (self->priv->_uri);
02529        self->priv->_uri = _tmp1_;
02530        g_object_notify ((GObject *) self, "uri");
02531 }
02532 
02533 
02534 const gchar* unity_series_item_get_title (UnitySeriesItem* self) {
02535        const gchar* result;
02536        const gchar* _tmp0_;
02537        g_return_val_if_fail (self != NULL, NULL);
02538        _tmp0_ = self->priv->_title;
02539        result = _tmp0_;
02540        return result;
02541 }
02542 
02543 
02544 static void unity_series_item_set_title (UnitySeriesItem* self, const gchar* value) {
02545        const gchar* _tmp0_;
02546        gchar* _tmp1_;
02547        g_return_if_fail (self != NULL);
02548        _tmp0_ = value;
02549        _tmp1_ = g_strdup (_tmp0_);
02550        _g_free0 (self->priv->_title);
02551        self->priv->_title = _tmp1_;
02552        g_object_notify ((GObject *) self, "title");
02553 }
02554 
02555 
02556 GIcon* unity_series_item_get_icon_hint (UnitySeriesItem* self) {
02557        GIcon* result;
02558        GIcon* _tmp0_;
02559        g_return_val_if_fail (self != NULL, NULL);
02560        _tmp0_ = self->priv->_icon_hint;
02561        result = _tmp0_;
02562        return result;
02563 }
02564 
02565 
02566 static void unity_series_item_set_icon_hint (UnitySeriesItem* self, GIcon* value) {
02567        GIcon* _tmp0_;
02568        GIcon* _tmp1_;
02569        g_return_if_fail (self != NULL);
02570        _tmp0_ = value;
02571        _tmp1_ = _g_object_ref0 (_tmp0_);
02572        _g_object_unref0 (self->priv->_icon_hint);
02573        self->priv->_icon_hint = _tmp1_;
02574        g_object_notify ((GObject *) self, "icon-hint");
02575 }
02576 
02577 
02578 static void unity_series_item_class_init (UnitySeriesItemClass * klass) {
02579        unity_series_item_parent_class = g_type_class_peek_parent (klass);
02580        g_type_class_add_private (klass, sizeof (UnitySeriesItemPrivate));
02581        G_OBJECT_CLASS (klass)->get_property = _vala_unity_series_item_get_property;
02582        G_OBJECT_CLASS (klass)->set_property = _vala_unity_series_item_set_property;
02583        G_OBJECT_CLASS (klass)->finalize = unity_series_item_finalize;
02584        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SERIES_ITEM_URI, g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
02585        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SERIES_ITEM_TITLE, g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
02586        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SERIES_ITEM_ICON_HINT, g_param_spec_object ("icon-hint", "icon-hint", "icon-hint", G_TYPE_ICON, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
02587 }
02588 
02589 
02590 static void unity_series_item_instance_init (UnitySeriesItem * self) {
02591        self->priv = UNITY_SERIES_ITEM_GET_PRIVATE (self);
02592 }
02593 
02594 
02595 static void unity_series_item_finalize (GObject* obj) {
02596        UnitySeriesItem * self;
02597        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SERIES_ITEM, UnitySeriesItem);
02598        _g_free0 (self->priv->_uri);
02599        _g_free0 (self->priv->_title);
02600        _g_object_unref0 (self->priv->_icon_hint);
02601        G_OBJECT_CLASS (unity_series_item_parent_class)->finalize (obj);
02602 }
02603 
02604 
02605 GType unity_series_item_get_type (void) {
02606        static volatile gsize unity_series_item_type_id__volatile = 0;
02607        if (g_once_init_enter (&unity_series_item_type_id__volatile)) {
02608               static const GTypeInfo g_define_type_info = { sizeof (UnitySeriesItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_series_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnitySeriesItem), 0, (GInstanceInitFunc) unity_series_item_instance_init, NULL };
02609               GType unity_series_item_type_id;
02610               unity_series_item_type_id = g_type_register_static (G_TYPE_OBJECT, "UnitySeriesItem", &g_define_type_info, 0);
02611               g_once_init_leave (&unity_series_item_type_id__volatile, unity_series_item_type_id);
02612        }
02613        return unity_series_item_type_id__volatile;
02614 }
02615 
02616 
02617 static void _vala_unity_series_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
02618        UnitySeriesItem * self;
02619        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SERIES_ITEM, UnitySeriesItem);
02620        switch (property_id) {
02621               case UNITY_SERIES_ITEM_URI:
02622               g_value_set_string (value, unity_series_item_get_uri (self));
02623               break;
02624               case UNITY_SERIES_ITEM_TITLE:
02625               g_value_set_string (value, unity_series_item_get_title (self));
02626               break;
02627               case UNITY_SERIES_ITEM_ICON_HINT:
02628               g_value_set_object (value, unity_series_item_get_icon_hint (self));
02629               break;
02630               default:
02631               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
02632               break;
02633        }
02634 }
02635 
02636 
02637 static void _vala_unity_series_item_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
02638        UnitySeriesItem * self;
02639        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SERIES_ITEM, UnitySeriesItem);
02640        switch (property_id) {
02641               case UNITY_SERIES_ITEM_URI:
02642               unity_series_item_set_uri (self, g_value_get_string (value));
02643               break;
02644               case UNITY_SERIES_ITEM_TITLE:
02645               unity_series_item_set_title (self, g_value_get_string (value));
02646               break;
02647               case UNITY_SERIES_ITEM_ICON_HINT:
02648               unity_series_item_set_icon_hint (self, g_value_get_object (value));
02649               break;
02650               default:
02651               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
02652               break;
02653        }
02654 }
02655 
02656 
02657 UnitySeriesPreview* unity_series_preview_construct (GType object_type, UnitySeriesItem** items, int items_length1, const gchar* selected_item_uri) {
02658        UnitySeriesPreview * self = NULL;
02659        const gchar* _tmp0_;
02660        UnitySeriesItem** _tmp1_;
02661        gint _tmp1__length1;
02662        g_return_val_if_fail (selected_item_uri != NULL, NULL);
02663        _tmp0_ = selected_item_uri;
02664        self = (UnitySeriesPreview*) g_object_new (object_type, "current-item-uri", _tmp0_, NULL);
02665        _tmp1_ = items;
02666        _tmp1__length1 = items_length1;
02667        {
02668               UnitySeriesItem** item_collection = NULL;
02669               gint item_collection_length1 = 0;
02670               gint _item_collection_size_ = 0;
02671               gint item_it = 0;
02672               item_collection = _tmp1_;
02673               item_collection_length1 = _tmp1__length1;
02674               for (item_it = 0; item_it < _tmp1__length1; item_it = item_it + 1) {
02675                      UnitySeriesItem* item = NULL;
02676                      item = item_collection[item_it];
02677                      {
02678                             UnitySeriesItem* _tmp2_;
02679                             _tmp2_ = item;
02680                             unity_series_preview_add_item (self, _tmp2_);
02681                      }
02682               }
02683        }
02684        return self;
02685 }
02686 
02687 
02688 UnitySeriesPreview* unity_series_preview_new (UnitySeriesItem** items, int items_length1, const gchar* selected_item_uri) {
02689        return unity_series_preview_construct (UNITY_TYPE_SERIES_PREVIEW, items, items_length1, selected_item_uri);
02690 }
02691 
02692 
02693 static void unity_series_preview_add_item (UnitySeriesPreview* self, UnitySeriesItem* item) {
02694        UnityProtocolSeriesPreview* _tmp0_;
02695        UnitySeriesItem* _tmp1_;
02696        const gchar* _tmp2_;
02697        const gchar* _tmp3_;
02698        UnitySeriesItem* _tmp4_;
02699        const gchar* _tmp5_;
02700        const gchar* _tmp6_;
02701        UnitySeriesItem* _tmp7_;
02702        GIcon* _tmp8_;
02703        GIcon* _tmp9_;
02704        g_return_if_fail (self != NULL);
02705        g_return_if_fail (item != NULL);
02706        _tmp0_ = self->priv->_raw;
02707        _tmp1_ = item;
02708        _tmp2_ = unity_series_item_get_title (_tmp1_);
02709        _tmp3_ = _tmp2_;
02710        _tmp4_ = item;
02711        _tmp5_ = unity_series_item_get_uri (_tmp4_);
02712        _tmp6_ = _tmp5_;
02713        _tmp7_ = item;
02714        _tmp8_ = unity_series_item_get_icon_hint (_tmp7_);
02715        _tmp9_ = _tmp8_;
02716        unity_protocol_series_preview_add_series_item (_tmp0_, _tmp3_, _tmp6_, _tmp9_);
02717 }
02718 
02719 
02720 static void unity_series_preview_update_child_preview (UnitySeriesPreview* self, const gchar* uri, gint item_index) {
02721        const gchar* _tmp0_;
02722        UnityPreview* _tmp1_ = NULL;
02723        UnityPreview* preview;
02724        UnityPreview* _tmp2_;
02725        g_return_if_fail (self != NULL);
02726        g_return_if_fail (uri != NULL);
02727        _tmp0_ = uri;
02728        g_signal_emit_by_name (self, "request-item-preview", _tmp0_, &_tmp1_);
02729        preview = _tmp1_;
02730        _tmp2_ = preview;
02731        if (_tmp2_ != NULL) {
02732               gint _tmp3_;
02733               UnityPreview* _tmp14_;
02734               UnityPreview* _tmp15_;
02735               UnityProtocolSeriesPreview* _tmp16_;
02736               UnityPreview* _tmp17_;
02737               UnityProtocolPreview* _tmp18_ = NULL;
02738               gboolean _tmp19_ = FALSE;
02739               gint _tmp20_;
02740               gboolean _tmp25_;
02741               const gchar* _tmp28_;
02742               gchar* _tmp29_;
02743               _tmp3_ = item_index;
02744               if (_tmp3_ < 0) {
02745                      gint i;
02746                      UnityProtocolSeriesPreview* _tmp4_;
02747                      gint _tmp5_ = 0;
02748                      UnityProtocolSeriesItemRaw* _tmp6_ = NULL;
02749                      gint _tmp12_;
02750                      i = 0;
02751                      _tmp4_ = self->priv->_raw;
02752                      _tmp6_ = unity_protocol_series_preview_get_items (_tmp4_, &_tmp5_);
02753                      {
02754                             UnityProtocolSeriesItemRaw* item_collection = NULL;
02755                             gint item_collection_length1 = 0;
02756                             gint _item_collection_size_ = 0;
02757                             gint item_it = 0;
02758                             item_collection = _tmp6_;
02759                             item_collection_length1 = _tmp5_;
02760                             for (item_it = 0; item_it < _tmp5_; item_it = item_it + 1) {
02761                                    UnityProtocolSeriesItemRaw item = {0};
02762                                    item = item_collection[item_it];
02763                                    {
02764                                           UnityProtocolSeriesItemRaw _tmp7_;
02765                                           const gchar* _tmp8_;
02766                                           const gchar* _tmp9_;
02767                                           gint _tmp11_;
02768                                           _tmp7_ = item;
02769                                           _tmp8_ = _tmp7_.uri;
02770                                           _tmp9_ = uri;
02771                                           if (g_strcmp0 (_tmp8_, _tmp9_) == 0) {
02772                                                  gint _tmp10_;
02773                                                  _tmp10_ = i;
02774                                                  self->priv->_selected_item = _tmp10_;
02775                                                  break;
02776                                           }
02777                                           _tmp11_ = i;
02778                                           i = _tmp11_ + 1;
02779                                    }
02780                             }
02781                      }
02782                      _tmp12_ = self->priv->_selected_item;
02783                      if (_tmp12_ < 0) {
02784                             g_warning ("unity-previews.vala:524: Unable to find URI in series items");
02785                      }
02786               } else {
02787                      gint _tmp13_;
02788                      _tmp13_ = item_index;
02789                      self->priv->_selected_item = _tmp13_;
02790               }
02791               _tmp14_ = preview;
02792               _tmp15_ = _g_object_ref0 (_tmp14_);
02793               _g_object_unref0 (self->priv->_child_preview);
02794               self->priv->_child_preview = _tmp15_;
02795               _tmp16_ = self->priv->_raw;
02796               _tmp17_ = preview;
02797               _tmp18_ = unity_preview_get_raw (_tmp17_);
02798               unity_protocol_series_preview_set_child_preview (_tmp16_, _tmp18_);
02799               _tmp20_ = self->priv->_selected_item;
02800               if (_tmp20_ >= 0) {
02801                      UnityProtocolSeriesPreview* _tmp21_;
02802                      gint _tmp22_;
02803                      gint _tmp23_;
02804                      gint _tmp24_;
02805                      _tmp21_ = self->priv->_raw;
02806                      _tmp22_ = unity_protocol_series_preview_get_selected_item (_tmp21_);
02807                      _tmp23_ = _tmp22_;
02808                      _tmp24_ = self->priv->_selected_item;
02809                      _tmp19_ = _tmp23_ != _tmp24_;
02810               } else {
02811                      _tmp19_ = FALSE;
02812               }
02813               _tmp25_ = _tmp19_;
02814               if (_tmp25_) {
02815                      UnityProtocolSeriesPreview* _tmp26_;
02816                      gint _tmp27_;
02817                      _tmp26_ = self->priv->_raw;
02818                      _tmp27_ = self->priv->_selected_item;
02819                      unity_protocol_series_preview_set_selected_item (_tmp26_, _tmp27_);
02820               }
02821               _tmp28_ = uri;
02822               _tmp29_ = g_strdup (_tmp28_);
02823               _g_free0 (self->priv->_current_item_uri);
02824               self->priv->_current_item_uri = _tmp29_;
02825        }
02826        _g_object_unref0 (preview);
02827 }
02828 
02829 
02830 static GHashTable* unity_series_preview_real_update_property (UnityPreview* base, GHashTable* values) {
02831        UnitySeriesPreview * self;
02832        GHashTable* result = NULL;
02833        GHashTable* _tmp0_;
02834        GHashTable* _tmp1_ = NULL;
02835        GHashTable* response;
02836        UnityProtocolSeriesPreview* _tmp2_;
02837        gint _tmp3_;
02838        gint _tmp4_;
02839        gint new_selected_item;
02840        UnityPreview* preview;
02841        gboolean _tmp5_ = FALSE;
02842        gint _tmp6_;
02843        gint _tmp7_;
02844        gboolean _tmp12_;
02845        UnityPreview* _tmp21_;
02846        UnityPreview* _tmp22_;
02847        GHashTable* _tmp23_;
02848        gchar* _tmp24_;
02849        UnityPreview* _tmp25_;
02850        GVariant* _tmp26_ = NULL;
02851        self = (UnitySeriesPreview*) base;
02852        g_return_val_if_fail (values != NULL, NULL);
02853        _tmp0_ = values;
02854        _tmp1_ = UNITY_PREVIEW_CLASS (unity_series_preview_parent_class)->update_property (G_TYPE_CHECK_INSTANCE_CAST (self, UNITY_TYPE_PREVIEW, UnityPreview), _tmp0_);
02855        response = _tmp1_;
02856        _tmp2_ = self->priv->_raw;
02857        _tmp3_ = unity_protocol_series_preview_get_selected_item (_tmp2_);
02858        _tmp4_ = _tmp3_;
02859        new_selected_item = _tmp4_;
02860        preview = NULL;
02861        _tmp6_ = new_selected_item;
02862        _tmp7_ = self->priv->_selected_item;
02863        if (_tmp6_ != _tmp7_) {
02864               gint _tmp8_;
02865               UnityProtocolSeriesPreview* _tmp9_;
02866               gint _tmp10_ = 0;
02867               UnityProtocolSeriesItemRaw* _tmp11_ = NULL;
02868               _tmp8_ = new_selected_item;
02869               _tmp9_ = self->priv->_raw;
02870               _tmp11_ = unity_protocol_series_preview_get_items (_tmp9_, &_tmp10_);
02871               _tmp5_ = _tmp8_ < _tmp10_;
02872        } else {
02873               _tmp5_ = FALSE;
02874        }
02875        _tmp12_ = _tmp5_;
02876        if (_tmp12_) {
02877               UnityProtocolSeriesPreview* _tmp13_;
02878               gint _tmp14_ = 0;
02879               UnityProtocolSeriesItemRaw* _tmp15_ = NULL;
02880               gint _tmp16_;
02881               UnityProtocolSeriesItemRaw _tmp17_;
02882               UnityProtocolSeriesItemRaw item;
02883               UnityProtocolSeriesItemRaw _tmp18_;
02884               const gchar* _tmp19_;
02885               gint _tmp20_;
02886               _tmp13_ = self->priv->_raw;
02887               _tmp15_ = unity_protocol_series_preview_get_items (_tmp13_, &_tmp14_);
02888               _tmp16_ = new_selected_item;
02889               _tmp17_ = _tmp15_[_tmp16_];
02890               item = _tmp17_;
02891               _tmp18_ = item;
02892               _tmp19_ = _tmp18_.uri;
02893               _tmp20_ = new_selected_item;
02894               unity_series_preview_update_child_preview (self, _tmp19_, _tmp20_);
02895        }
02896        _tmp21_ = self->priv->_child_preview;
02897        _tmp22_ = _g_object_ref0 (_tmp21_);
02898        _g_object_unref0 (preview);
02899        preview = _tmp22_;
02900        _tmp23_ = response;
02901        _tmp24_ = g_strdup ("preview");
02902        _tmp25_ = preview;
02903        _tmp26_ = dee_serializable_serialize ((DeeSerializable*) _tmp25_);
02904        g_hash_table_insert (_tmp23_, _tmp24_, _tmp26_);
02905        result = response;
02906        _g_object_unref0 (preview);
02907        return result;
02908 }
02909 
02910 
02911 UnityPreview* unity_series_preview_get_active_preview (UnitySeriesPreview* self) {
02912        UnityPreview* result = NULL;
02913        UnityPreview* _tmp0_;
02914        UnityPreview* _tmp1_;
02915        g_return_val_if_fail (self != NULL, NULL);
02916        _tmp0_ = self->priv->_child_preview;
02917        _tmp1_ = _g_object_ref0 (_tmp0_);
02918        result = _tmp1_;
02919        return result;
02920 }
02921 
02922 
02923 static GVariant* unity_series_preview_real_serialize (DeeSerializable* base) {
02924        UnitySeriesPreview * self;
02925        GVariant* result = NULL;
02926        gboolean _tmp0_ = FALSE;
02927        gint _tmp1_;
02928        gboolean _tmp5_;
02929        UnityProtocolSeriesPreview* _tmp8_;
02930        GVariant* _tmp9_ = NULL;
02931        self = (UnitySeriesPreview*) base;
02932        _tmp1_ = self->priv->_selected_item;
02933        if (_tmp1_ < 0) {
02934               UnityProtocolSeriesPreview* _tmp2_;
02935               gint _tmp3_ = 0;
02936               UnityProtocolSeriesItemRaw* _tmp4_ = NULL;
02937               _tmp2_ = self->priv->_raw;
02938               _tmp4_ = unity_protocol_series_preview_get_items (_tmp2_, &_tmp3_);
02939               _tmp0_ = _tmp3_ > 0;
02940        } else {
02941               _tmp0_ = FALSE;
02942        }
02943        _tmp5_ = _tmp0_;
02944        if (_tmp5_) {
02945               const gchar* _tmp6_;
02946               const gchar* _tmp7_;
02947               _tmp6_ = unity_series_preview_get_current_item_uri (self);
02948               _tmp7_ = _tmp6_;
02949               unity_series_preview_update_child_preview (self, _tmp7_, -1);
02950        }
02951        _tmp8_ = self->priv->_raw;
02952        _tmp9_ = dee_serializable_serialize ((DeeSerializable*) _tmp8_);
02953        result = _tmp9_;
02954        return result;
02955 }
02956 
02957 
02958 static GObject* unity_series_preview_real_create_raw (UnityPreview* base) {
02959        UnitySeriesPreview * self;
02960        GObject* result = NULL;
02961        UnityProtocolSeriesPreview* _tmp0_;
02962        UnityProtocolSeriesPreview* raw;
02963        UnityProtocolSeriesPreview* _tmp1_;
02964        GObject* _tmp2_;
02965        self = (UnitySeriesPreview*) base;
02966        _tmp0_ = unity_protocol_series_preview_new ();
02967        raw = _tmp0_;
02968        self->priv->_raw = raw;
02969        _tmp1_ = self->priv->_raw;
02970        _tmp2_ = _g_object_ref0 ((GObject*) _tmp1_);
02971        result = _tmp2_;
02972        _g_object_unref0 (raw);
02973        return result;
02974 }
02975 
02976 
02977 const gchar* unity_series_preview_get_current_item_uri (UnitySeriesPreview* self) {
02978        const gchar* result;
02979        const gchar* _tmp0_;
02980        g_return_val_if_fail (self != NULL, NULL);
02981        _tmp0_ = self->priv->_current_item_uri;
02982        result = _tmp0_;
02983        return result;
02984 }
02985 
02986 
02987 static void unity_series_preview_set_current_item_uri (UnitySeriesPreview* self, const gchar* value) {
02988        const gchar* _tmp0_;
02989        gchar* _tmp1_;
02990        g_return_if_fail (self != NULL);
02991        _tmp0_ = value;
02992        _tmp1_ = g_strdup (_tmp0_);
02993        _g_free0 (self->priv->_current_item_uri);
02994        self->priv->_current_item_uri = _tmp1_;
02995        g_object_notify ((GObject *) self, "current-item-uri");
02996 }
02997 
02998 
02999 static void unity_series_preview_class_init (UnitySeriesPreviewClass * klass) {
03000        unity_series_preview_parent_class = g_type_class_peek_parent (klass);
03001        g_type_class_add_private (klass, sizeof (UnitySeriesPreviewPrivate));
03002        UNITY_PREVIEW_CLASS (klass)->update_property = unity_series_preview_real_update_property;
03003        UNITY_PREVIEW_CLASS (klass)->create_raw = unity_series_preview_real_create_raw;
03004        G_OBJECT_CLASS (klass)->get_property = _vala_unity_series_preview_get_property;
03005        G_OBJECT_CLASS (klass)->set_property = _vala_unity_series_preview_set_property;
03006        G_OBJECT_CLASS (klass)->finalize = unity_series_preview_finalize;
03007        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SERIES_PREVIEW_CURRENT_ITEM_URI, g_param_spec_string ("current-item-uri", "current-item-uri", "current-item-uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
03008        g_signal_new ("request_item_preview", UNITY_TYPE_SERIES_PREVIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__STRING, UNITY_TYPE_PREVIEW, 1, G_TYPE_STRING);
03009 }
03010 
03011 
03012 static void unity_series_preview_dee_serializable_interface_init (DeeSerializableIface * iface) {
03013        unity_series_preview_dee_serializable_parent_iface = g_type_interface_peek_parent (iface);
03014        iface->serialize = (GVariant* (*)(DeeSerializable*)) unity_series_preview_real_serialize;
03015 }
03016 
03017 
03018 static void unity_series_preview_instance_init (UnitySeriesPreview * self) {
03019        self->priv = UNITY_SERIES_PREVIEW_GET_PRIVATE (self);
03020        self->priv->_selected_item = -1;
03021 }
03022 
03023 
03024 static void unity_series_preview_finalize (GObject* obj) {
03025        UnitySeriesPreview * self;
03026        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SERIES_PREVIEW, UnitySeriesPreview);
03027        _g_free0 (self->priv->_current_item_uri);
03028        _g_object_unref0 (self->priv->_child_preview);
03029        G_OBJECT_CLASS (unity_series_preview_parent_class)->finalize (obj);
03030 }
03031 
03032 
03033 GType unity_series_preview_get_type (void) {
03034        static volatile gsize unity_series_preview_type_id__volatile = 0;
03035        if (g_once_init_enter (&unity_series_preview_type_id__volatile)) {
03036               static const GTypeInfo g_define_type_info = { sizeof (UnitySeriesPreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_series_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnitySeriesPreview), 0, (GInstanceInitFunc) unity_series_preview_instance_init, NULL };
03037               static const GInterfaceInfo dee_serializable_info = { (GInterfaceInitFunc) unity_series_preview_dee_serializable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
03038               GType unity_series_preview_type_id;
03039               unity_series_preview_type_id = g_type_register_static (UNITY_TYPE_PREVIEW, "UnitySeriesPreview", &g_define_type_info, 0);
03040               g_type_add_interface_static (unity_series_preview_type_id, dee_serializable_get_type (), &dee_serializable_info);
03041               g_once_init_leave (&unity_series_preview_type_id__volatile, unity_series_preview_type_id);
03042        }
03043        return unity_series_preview_type_id__volatile;
03044 }
03045 
03046 
03047 static void _vala_unity_series_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
03048        UnitySeriesPreview * self;
03049        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SERIES_PREVIEW, UnitySeriesPreview);
03050        switch (property_id) {
03051               case UNITY_SERIES_PREVIEW_CURRENT_ITEM_URI:
03052               g_value_set_string (value, unity_series_preview_get_current_item_uri (self));
03053               break;
03054               default:
03055               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
03056               break;
03057        }
03058 }
03059 
03060 
03061 static void _vala_unity_series_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
03062        UnitySeriesPreview * self;
03063        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SERIES_PREVIEW, UnitySeriesPreview);
03064        switch (property_id) {
03065               case UNITY_SERIES_PREVIEW_CURRENT_ITEM_URI:
03066               unity_series_preview_set_current_item_uri (self, g_value_get_string (value));
03067               break;
03068               default:
03069               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
03070               break;
03071        }
03072 }
03073 
03074 
03075 UnityAsyncPreview* unity_async_preview_construct (GType object_type) {
03076        UnityAsyncPreview * self = NULL;
03077        self = (UnityAsyncPreview*) g_object_new (object_type, NULL);
03078        return self;
03079 }
03080 
03081 
03082 UnityAsyncPreview* unity_async_preview_new (void) {
03083        return unity_async_preview_construct (UNITY_TYPE_ASYNC_PREVIEW);
03084 }
03085 
03086 
03087 static GObject* unity_async_preview_real_create_raw (UnityPreview* base) {
03088        UnityAsyncPreview * self;
03089        GObject* result = NULL;
03090        UnityProtocolGenericPreview* _tmp0_;
03091        self = (UnityAsyncPreview*) base;
03092        _tmp0_ = unity_protocol_generic_preview_new ();
03093        result = (GObject*) _tmp0_;
03094        return result;
03095 }
03096 
03097 
03098 GCancellable* unity_async_preview_get_cancellable (UnityAsyncPreview* self) {
03099        GCancellable* result;
03100        GCancellable* _tmp0_;
03101        g_return_val_if_fail (self != NULL, NULL);
03102        _tmp0_ = self->priv->_cancellable;
03103        result = _tmp0_;
03104        return result;
03105 }
03106 
03107 
03108 static void unity_async_preview_set_cancellable (UnityAsyncPreview* self, GCancellable* value) {
03109        GCancellable* _tmp0_;
03110        GCancellable* _tmp1_;
03111        g_return_if_fail (self != NULL);
03112        _tmp0_ = value;
03113        _tmp1_ = _g_object_ref0 (_tmp0_);
03114        _g_object_unref0 (self->priv->_cancellable);
03115        self->priv->_cancellable = _tmp1_;
03116        g_object_notify ((GObject *) self, "cancellable");
03117 }
03118 
03119 
03120 static void unity_async_preview_class_init (UnityAsyncPreviewClass * klass) {
03121        unity_async_preview_parent_class = g_type_class_peek_parent (klass);
03122        g_type_class_add_private (klass, sizeof (UnityAsyncPreviewPrivate));
03123        UNITY_PREVIEW_CLASS (klass)->create_raw = unity_async_preview_real_create_raw;
03124        G_OBJECT_CLASS (klass)->get_property = _vala_unity_async_preview_get_property;
03125        G_OBJECT_CLASS (klass)->set_property = _vala_unity_async_preview_set_property;
03126        G_OBJECT_CLASS (klass)->finalize = unity_async_preview_finalize;
03127        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_ASYNC_PREVIEW_CANCELLABLE, g_param_spec_object ("cancellable", "cancellable", "cancellable", g_cancellable_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
03128        g_signal_new ("preview_ready", UNITY_TYPE_ASYNC_PREVIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, UNITY_TYPE_PREVIEW);
03129 }
03130 
03131 
03132 static void unity_async_preview_instance_init (UnityAsyncPreview * self) {
03133        self->priv = UNITY_ASYNC_PREVIEW_GET_PRIVATE (self);
03134 }
03135 
03136 
03137 static void unity_async_preview_finalize (GObject* obj) {
03138        UnityAsyncPreview * self;
03139        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_ASYNC_PREVIEW, UnityAsyncPreview);
03140        _g_object_unref0 (self->priv->_cancellable);
03141        G_OBJECT_CLASS (unity_async_preview_parent_class)->finalize (obj);
03142 }
03143 
03144 
03145 GType unity_async_preview_get_type (void) {
03146        static volatile gsize unity_async_preview_type_id__volatile = 0;
03147        if (g_once_init_enter (&unity_async_preview_type_id__volatile)) {
03148               static const GTypeInfo g_define_type_info = { sizeof (UnityAsyncPreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_async_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityAsyncPreview), 0, (GInstanceInitFunc) unity_async_preview_instance_init, NULL };
03149               GType unity_async_preview_type_id;
03150               unity_async_preview_type_id = g_type_register_static (UNITY_TYPE_PREVIEW, "UnityAsyncPreview", &g_define_type_info, 0);
03151               g_once_init_leave (&unity_async_preview_type_id__volatile, unity_async_preview_type_id);
03152        }
03153        return unity_async_preview_type_id__volatile;
03154 }
03155 
03156 
03157 static void _vala_unity_async_preview_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
03158        UnityAsyncPreview * self;
03159        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_ASYNC_PREVIEW, UnityAsyncPreview);
03160        switch (property_id) {
03161               case UNITY_ASYNC_PREVIEW_CANCELLABLE:
03162               g_value_set_object (value, unity_async_preview_get_cancellable (self));
03163               break;
03164               default:
03165               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
03166               break;
03167        }
03168 }
03169 
03170 
03171 static void _vala_unity_async_preview_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
03172        UnityAsyncPreview * self;
03173        self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_ASYNC_PREVIEW, UnityAsyncPreview);
03174        switch (property_id) {
03175               case UNITY_ASYNC_PREVIEW_CANCELLABLE:
03176               unity_async_preview_set_cancellable (self, g_value_get_object (value));
03177               break;
03178               default:
03179               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
03180               break;
03181        }
03182 }
03183 
03184 
03185 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
03186        if ((array != NULL) && (destroy_func != NULL)) {
03187               int i;
03188               for (i = 0; i < array_length; i = i + 1) {
03189                      if (((gpointer*) array)[i] != NULL) {
03190                             destroy_func (((gpointer*) array)[i]);
03191                      }
03192               }
03193        }
03194 }
03195 
03196 
03197 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
03198        _vala_array_destroy (array, array_length, destroy_func);
03199        g_free (array);
03200 }
03201 
03202 
03203 static gint _vala_array_length (gpointer array) {
03204        int length;
03205        length = 0;
03206        if (array) {
03207               while (((gpointer*) array)[length]) {
03208                      length++;
03209               }
03210        }
03211        return length;
03212 }
03213 
03214 
03215