Back to index

unity-lens-music  6.0.0
simple-scope.c
Go to the documentation of this file.
00001 /* simple-scope.c generated by valac 0.14.2, the Vala compiler
00002  * generated from simple-scope.vala, do not modify */
00003 
00004 /*
00005  * Copyright (C) 2011 Canonical Ltd
00006  *
00007  * This program is free software: you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License version 3 as
00009  * published by the Free Software Foundation.
00010  *
00011  * This program 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 General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  * Authored by Alex Launi <alex.launi@canonical.com>
00020  *
00021  */
00022 
00023 #include <glib.h>
00024 #include <glib-object.h>
00025 #include <gio/gio.h>
00026 #include <unity.h>
00027 #include <stdlib.h>
00028 #include <string.h>
00029 #include <dee.h>
00030 #include <glib/gi18n-lib.h>
00031 
00032 
00033 #define UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE (unity_music_lens_simple_scope_get_type ())
00034 #define UNITY_MUSIC_LENS_SIMPLE_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScope))
00035 #define UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScopeClass))
00036 #define UNITY_MUSIC_LENS_IS_SIMPLE_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE))
00037 #define UNITY_MUSIC_LENS_IS_SIMPLE_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE))
00038 #define UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScopeClass))
00039 
00040 typedef struct _UnityMusicLensSimpleScope UnityMusicLensSimpleScope;
00041 typedef struct _UnityMusicLensSimpleScopeClass UnityMusicLensSimpleScopeClass;
00042 typedef struct _UnityMusicLensSimpleScopePrivate UnityMusicLensSimpleScopePrivate;
00043 
00044 #define UNITY_MUSIC_LENS_TYPE_FILTER_PARSER (unity_music_lens_filter_parser_get_type ())
00045 #define UNITY_MUSIC_LENS_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParser))
00046 #define UNITY_MUSIC_LENS_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParserClass))
00047 #define UNITY_MUSIC_LENS_IS_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER))
00048 #define UNITY_MUSIC_LENS_IS_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER))
00049 #define UNITY_MUSIC_LENS_FILTER_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParserClass))
00050 
00051 typedef struct _UnityMusicLensFilterParser UnityMusicLensFilterParser;
00052 typedef struct _UnityMusicLensFilterParserClass UnityMusicLensFilterParserClass;
00053 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00054 #define _g_free0(var) (var = (g_free (var), NULL))
00055 typedef struct _UnityMusicLensSimpleScopeUpdateSearchAsyncData UnityMusicLensSimpleScopeUpdateSearchAsyncData;
00056 
00057 #define UNITY_MUSIC_LENS_TYPE_GENRE_FILTER_PARSER (unity_music_lens_genre_filter_parser_get_type ())
00058 #define UNITY_MUSIC_LENS_GENRE_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_GENRE_FILTER_PARSER, UnityMusicLensGenreFilterParser))
00059 #define UNITY_MUSIC_LENS_GENRE_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_GENRE_FILTER_PARSER, UnityMusicLensGenreFilterParserClass))
00060 #define UNITY_MUSIC_LENS_IS_GENRE_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_GENRE_FILTER_PARSER))
00061 #define UNITY_MUSIC_LENS_IS_GENRE_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_GENRE_FILTER_PARSER))
00062 #define UNITY_MUSIC_LENS_GENRE_FILTER_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_GENRE_FILTER_PARSER, UnityMusicLensGenreFilterParserClass))
00063 
00064 typedef struct _UnityMusicLensGenreFilterParser UnityMusicLensGenreFilterParser;
00065 typedef struct _UnityMusicLensGenreFilterParserClass UnityMusicLensGenreFilterParserClass;
00066 
00067 #define UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER (unity_music_lens_decade_filter_parser_get_type ())
00068 #define UNITY_MUSIC_LENS_DECADE_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER, UnityMusicLensDecadeFilterParser))
00069 #define UNITY_MUSIC_LENS_DECADE_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER, UnityMusicLensDecadeFilterParserClass))
00070 #define UNITY_MUSIC_LENS_IS_DECADE_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER))
00071 #define UNITY_MUSIC_LENS_IS_DECADE_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER))
00072 #define UNITY_MUSIC_LENS_DECADE_FILTER_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER, UnityMusicLensDecadeFilterParserClass))
00073 
00074 typedef struct _UnityMusicLensDecadeFilterParser UnityMusicLensDecadeFilterParser;
00075 typedef struct _UnityMusicLensDecadeFilterParserClass UnityMusicLensDecadeFilterParserClass;
00076 #define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
00077 typedef struct _UnityMusicLensSimpleScopePrepareSearchData UnityMusicLensSimpleScopePrepareSearchData;
00078 
00079 struct _UnityMusicLensSimpleScope {
00080        GObject parent_instance;
00081        UnityMusicLensSimpleScopePrivate * priv;
00082 };
00083 
00084 struct _UnityMusicLensSimpleScopeClass {
00085        GObjectClass parent_class;
00086        void (*perform_search) (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, GList* filters, gint max_results, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
00087        void (*perform_search_finish) (UnityMusicLensSimpleScope* self, GAsyncResult* _res_);
00088        gint (*get_num_results_without_search) (UnityMusicLensSimpleScope* self);
00089        gint (*get_num_results_global_search) (UnityMusicLensSimpleScope* self);
00090        gint (*get_num_results_lens_search) (UnityMusicLensSimpleScope* self);
00091 };
00092 
00093 struct _UnityMusicLensSimpleScopePrivate {
00094        UnityScope* _scope;
00095 };
00096 
00097 struct _UnityMusicLensSimpleScopeUpdateSearchAsyncData {
00098        int _state_;
00099        GObject* _source_object_;
00100        GAsyncResult* _res_;
00101        GSimpleAsyncResult* _async_result;
00102        UnityMusicLensSimpleScope* self;
00103        UnityLensSearch* search;
00104        UnitySearchType search_type;
00105        GCancellable* cancellable;
00106        gint max_results;
00107        UnitySearchType _tmp0_;
00108        gint _tmp1_;
00109        gint _tmp2_;
00110        UnityLensSearch* _tmp3_;
00111        gboolean _tmp4_;
00112        gint _tmp5_;
00113        gint _tmp6_;
00114        gint _tmp7_;
00115        gint _tmp8_;
00116        UnityLensSearch* _tmp9_;
00117        UnitySearchType _tmp10_;
00118        gint _tmp11_;
00119        GCancellable* _tmp12_;
00120 };
00121 
00122 struct _UnityMusicLensSimpleScopePrepareSearchData {
00123        int _state_;
00124        GObject* _source_object_;
00125        GAsyncResult* _res_;
00126        GSimpleAsyncResult* _async_result;
00127        UnityMusicLensSimpleScope* self;
00128        UnityLensSearch* search;
00129        UnitySearchType search_type;
00130        gint max_results;
00131        GCancellable* cancellable;
00132        UnityLensSearch* _tmp0_;
00133        DeeSerializableModel* _tmp1_;
00134        DeeSerializableModel* _tmp2_;
00135        DeeSerializableModel* _tmp3_;
00136        DeeSerializableModel* results_model;
00137        GList* filters;
00138        UnitySearchType _tmp4_;
00139        UnityScope* _tmp5_;
00140        UnityFilter* _tmp6_;
00141        UnityFilter* filter;
00142        UnityFilter* _tmp7_;
00143        gboolean _tmp8_;
00144        gboolean _tmp9_;
00145        UnityFilter* _tmp10_;
00146        UnityMusicLensGenreFilterParser* _tmp11_;
00147        UnityScope* _tmp12_;
00148        UnityFilter* _tmp13_;
00149        UnityFilter* _tmp14_;
00150        gboolean _tmp15_;
00151        gboolean _tmp16_;
00152        UnityFilter* _tmp17_;
00153        UnityMusicLensDecadeFilterParser* _tmp18_;
00154        DeeSerializableModel* _tmp19_;
00155        gboolean _tmp20_;
00156        UnityScope* _tmp21_;
00157        UnityOptionsFilter* _tmp22_;
00158        UnityOptionsFilter* _tmp23_;
00159        GList* _tmp24_;
00160        guint _tmp25_;
00161        UnityScope* _tmp26_;
00162        UnityOptionsFilter* _tmp27_;
00163        UnityOptionsFilter* _tmp28_;
00164        gboolean _tmp29_;
00165        gboolean _tmp30_;
00166        gboolean _tmp31_;
00167        gboolean any_active;
00168        UnityScope* _tmp32_;
00169        UnityOptionsFilter* _tmp33_;
00170        UnityOptionsFilter* _tmp34_;
00171        GList* _tmp35_;
00172        GList* source_collection;
00173        GList* source_it;
00174        UnityFilterOption* _tmp36_;
00175        UnityFilterOption* source;
00176        UnityFilterOption* _tmp37_;
00177        gboolean _tmp38_;
00178        gboolean _tmp39_;
00179        gboolean _tmp40_;
00180        UnityLensSearch* _tmp41_;
00181        UnityLensSearch* _tmp42_;
00182        UnitySearchType _tmp43_;
00183        GList* _tmp44_;
00184        gint _tmp45_;
00185        GCancellable* _tmp46_;
00186        DeeSerializableModel* _tmp47_;
00187        guint _tmp48_;
00188        UnityLensSearch* _tmp49_;
00189        const gchar* _tmp50_;
00190        GVariant* _tmp51_;
00191        UnityLensSearch* _tmp52_;
00192 };
00193 
00194 
00195 static gpointer unity_music_lens_simple_scope_parent_class = NULL;
00196 
00197 GType unity_music_lens_simple_scope_get_type (void) G_GNUC_CONST;
00198 GType unity_music_lens_filter_parser_get_type (void) G_GNUC_CONST;
00199 #define UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScopePrivate))
00200 enum  {
00201        UNITY_MUSIC_LENS_SIMPLE_SCOPE_DUMMY_PROPERTY,
00202        UNITY_MUSIC_LENS_SIMPLE_SCOPE_SCOPE,
00203        UNITY_MUSIC_LENS_SIMPLE_SCOPE_NUM_RESULTS_WITHOUT_SEARCH,
00204        UNITY_MUSIC_LENS_SIMPLE_SCOPE_NUM_RESULTS_GLOBAL_SEARCH,
00205        UNITY_MUSIC_LENS_SIMPLE_SCOPE_NUM_RESULTS_LENS_SEARCH
00206 };
00207 void unity_music_lens_simple_scope_perform_search (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, GList* filters, gint max_results, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
00208 void unity_music_lens_simple_scope_perform_search_finish (UnityMusicLensSimpleScope* self, GAsyncResult* _res_);
00209 UnityMusicLensSimpleScope* unity_music_lens_simple_scope_construct (GType object_type);
00210 void unity_music_lens_simple_scope_initialize (UnityMusicLensSimpleScope* self);
00211 UnityScope* unity_music_lens_simple_scope_get_scope (UnityMusicLensSimpleScope* self);
00212 static void __lambda0_ (UnityMusicLensSimpleScope* self);
00213 static void ___lambda0__unity_scope_filters_changed (UnityScope* _sender, gpointer self);
00214 static void __lambda1_ (UnityMusicLensSimpleScope* self);
00215 static void ___lambda1__unity_scope_active_sources_changed (UnityScope* _sender, gchar** active_ids, int active_ids_length1, gpointer self);
00216 static gchar* __lambda2_ (UnityMusicLensSimpleScope* self, UnityLensSearch* lens_search);
00217 static gchar* ___lambda2__unity_scope_generate_search_key (UnityScope* _sender, UnityLensSearch* search, gpointer self);
00218 static void __lambda3_ (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, GCancellable* cancellable);
00219 static void unity_music_lens_simple_scope_update_search_async (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
00220 static void unity_music_lens_simple_scope_update_search_finish (UnityMusicLensSimpleScope* self, GAsyncResult* _res_);
00221 static void ___lambda3__unity_scope_search_changed (UnityScope* _sender, UnityLensSearch* search, UnitySearchType search_type, GCancellable* cancellable, gpointer self);
00222 static void unity_music_lens_simple_scope_update_search_async_data_free (gpointer _data);
00223 static gboolean unity_music_lens_simple_scope_update_search_async_co (UnityMusicLensSimpleScopeUpdateSearchAsyncData* _data_);
00224 gint unity_music_lens_simple_scope_get_num_results_global_search (UnityMusicLensSimpleScope* self);
00225 gboolean unity_music_lens_simple_scope_is_search_empty (UnityMusicLensSimpleScope* self, UnityLensSearch* search);
00226 gint unity_music_lens_simple_scope_get_num_results_without_search (UnityMusicLensSimpleScope* self);
00227 gint unity_music_lens_simple_scope_get_num_results_lens_search (UnityMusicLensSimpleScope* self);
00228 static void unity_music_lens_simple_scope_prepare_search (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, gint max_results, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
00229 static void unity_music_lens_simple_scope_prepare_search_finish (UnityMusicLensSimpleScope* self, GAsyncResult* _res_);
00230 static void unity_music_lens_simple_scope_update_search_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00231 static void unity_music_lens_simple_scope_prepare_search_data_free (gpointer _data);
00232 static gboolean unity_music_lens_simple_scope_prepare_search_co (UnityMusicLensSimpleScopePrepareSearchData* _data_);
00233 UnityMusicLensGenreFilterParser* unity_music_lens_genre_filter_parser_new (UnityCheckOptionFilterCompact* filter);
00234 UnityMusicLensGenreFilterParser* unity_music_lens_genre_filter_parser_construct (GType object_type, UnityCheckOptionFilterCompact* filter);
00235 GType unity_music_lens_genre_filter_parser_get_type (void) G_GNUC_CONST;
00236 UnityMusicLensDecadeFilterParser* unity_music_lens_decade_filter_parser_new (UnityMultiRangeFilter* filter);
00237 UnityMusicLensDecadeFilterParser* unity_music_lens_decade_filter_parser_construct (GType object_type, UnityMultiRangeFilter* filter);
00238 GType unity_music_lens_decade_filter_parser_get_type (void) G_GNUC_CONST;
00239 static void _g_object_unref0_ (gpointer var);
00240 static void _g_list_free__g_object_unref0_ (GList* self);
00241 static void unity_music_lens_simple_scope_prepare_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00242 static GVariant* _variant_new1 (const gchar* value);
00243 void unity_music_lens_simple_scope_set_scope (UnityMusicLensSimpleScope* self, UnityScope* value);
00244 static void unity_music_lens_simple_scope_finalize (GObject* obj);
00245 static void _vala_unity_music_lens_simple_scope_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00246 static void _vala_unity_music_lens_simple_scope_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00247 
00248 
00249 void unity_music_lens_simple_scope_perform_search (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, GList* filters, gint max_results, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00250        UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_CLASS (self)->perform_search (self, search, search_type, filters, max_results, cancellable, _callback_, _user_data_);
00251 }
00252 
00253 
00254 void unity_music_lens_simple_scope_perform_search_finish (UnityMusicLensSimpleScope* self, GAsyncResult* _res_) {
00255        UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_CLASS (self)->perform_search_finish (self, _res_);
00256 }
00257 
00258 
00259 UnityMusicLensSimpleScope* unity_music_lens_simple_scope_construct (GType object_type) {
00260        UnityMusicLensSimpleScope * self = NULL;
00261        self = (UnityMusicLensSimpleScope*) g_object_new (object_type, NULL);
00262        return self;
00263 }
00264 
00265 
00266 static void __lambda0_ (UnityMusicLensSimpleScope* self) {
00267        UnityScope* _tmp0_;
00268        _tmp0_ = self->priv->_scope;
00269        unity_scope_queue_search_changed (_tmp0_, UNITY_SEARCH_TYPE_DEFAULT);
00270 }
00271 
00272 
00273 static void ___lambda0__unity_scope_filters_changed (UnityScope* _sender, gpointer self) {
00274        __lambda0_ (self);
00275 }
00276 
00277 
00278 static void __lambda1_ (UnityMusicLensSimpleScope* self) {
00279        UnityScope* _tmp0_;
00280        _tmp0_ = self->priv->_scope;
00281        unity_scope_queue_search_changed (_tmp0_, UNITY_SEARCH_TYPE_DEFAULT);
00282 }
00283 
00284 
00285 static void ___lambda1__unity_scope_active_sources_changed (UnityScope* _sender, gchar** active_ids, int active_ids_length1, gpointer self) {
00286        __lambda1_ (self);
00287 }
00288 
00289 
00290 static gchar* string_strip (const gchar* self) {
00291        gchar* result = NULL;
00292        gchar* _tmp0_ = NULL;
00293        gchar* _result_;
00294        const gchar* _tmp1_;
00295        g_return_val_if_fail (self != NULL, NULL);
00296        _tmp0_ = g_strdup (self);
00297        _result_ = _tmp0_;
00298        _tmp1_ = _result_;
00299        g_strstrip (_tmp1_);
00300        result = _result_;
00301        return result;
00302 }
00303 
00304 
00305 static gchar* __lambda2_ (UnityMusicLensSimpleScope* self, UnityLensSearch* lens_search) {
00306        gchar* result = NULL;
00307        UnityLensSearch* _tmp0_;
00308        const gchar* _tmp1_;
00309        const gchar* _tmp2_;
00310        gchar* _tmp3_ = NULL;
00311        g_return_val_if_fail (lens_search != NULL, NULL);
00312        _tmp0_ = lens_search;
00313        _tmp1_ = unity_lens_search_get_search_string (_tmp0_);
00314        _tmp2_ = _tmp1_;
00315        _tmp3_ = string_strip (_tmp2_);
00316        result = _tmp3_;
00317        return result;
00318 }
00319 
00320 
00321 static gchar* ___lambda2__unity_scope_generate_search_key (UnityScope* _sender, UnityLensSearch* search, gpointer self) {
00322        gchar* result;
00323        result = __lambda2_ (self, search);
00324        return result;
00325 }
00326 
00327 
00328 static void __lambda3_ (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, GCancellable* cancellable) {
00329        UnityLensSearch* _tmp0_;
00330        UnitySearchType _tmp1_;
00331        GCancellable* _tmp2_;
00332        g_return_if_fail (search != NULL);
00333        g_return_if_fail (cancellable != NULL);
00334        _tmp0_ = search;
00335        _tmp1_ = search_type;
00336        _tmp2_ = cancellable;
00337        unity_music_lens_simple_scope_update_search_async (self, _tmp0_, _tmp1_, _tmp2_, NULL, NULL);
00338 }
00339 
00340 
00341 static void ___lambda3__unity_scope_search_changed (UnityScope* _sender, UnityLensSearch* search, UnitySearchType search_type, GCancellable* cancellable, gpointer self) {
00342        __lambda3_ (self, search, search_type, cancellable);
00343 }
00344 
00345 
00346 void unity_music_lens_simple_scope_initialize (UnityMusicLensSimpleScope* self) {
00347        UnityScope* _tmp0_;
00348        UnityScope* _tmp1_;
00349        UnityScope* _tmp2_;
00350        UnityScope* _tmp3_;
00351        g_return_if_fail (self != NULL);
00352        _tmp0_ = self->priv->_scope;
00353        g_signal_connect_object (_tmp0_, "filters-changed", (GCallback) ___lambda0__unity_scope_filters_changed, self, 0);
00354        _tmp1_ = self->priv->_scope;
00355        g_signal_connect_object (_tmp1_, "active-sources-changed", (GCallback) ___lambda1__unity_scope_active_sources_changed, self, 0);
00356        _tmp2_ = self->priv->_scope;
00357        g_signal_connect_object (_tmp2_, "generate-search-key", (GCallback) ___lambda2__unity_scope_generate_search_key, self, 0);
00358        _tmp3_ = self->priv->_scope;
00359        g_signal_connect_object (_tmp3_, "search-changed", (GCallback) ___lambda3__unity_scope_search_changed, self, 0);
00360 }
00361 
00362 
00363 static void unity_music_lens_simple_scope_update_search_async_data_free (gpointer _data) {
00364        UnityMusicLensSimpleScopeUpdateSearchAsyncData* _data_;
00365        _data_ = _data;
00366        _g_object_unref0 (_data_->search);
00367        _g_object_unref0 (_data_->cancellable);
00368        _g_object_unref0 (_data_->self);
00369        g_slice_free (UnityMusicLensSimpleScopeUpdateSearchAsyncData, _data_);
00370 }
00371 
00372 
00373 static gpointer _g_object_ref0 (gpointer self) {
00374        return self ? g_object_ref (self) : NULL;
00375 }
00376 
00377 
00378 static void unity_music_lens_simple_scope_update_search_async (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00379        UnityMusicLensSimpleScopeUpdateSearchAsyncData* _data_;
00380        UnityMusicLensSimpleScope* _tmp0_;
00381        UnityLensSearch* _tmp1_;
00382        UnityLensSearch* _tmp2_;
00383        UnitySearchType _tmp3_;
00384        GCancellable* _tmp4_;
00385        GCancellable* _tmp5_;
00386        _data_ = g_slice_new0 (UnityMusicLensSimpleScopeUpdateSearchAsyncData);
00387        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_music_lens_simple_scope_update_search_async);
00388        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_music_lens_simple_scope_update_search_async_data_free);
00389        _tmp0_ = _g_object_ref0 (self);
00390        _data_->self = _tmp0_;
00391        _tmp1_ = search;
00392        _tmp2_ = _g_object_ref0 (_tmp1_);
00393        _data_->search = _tmp2_;
00394        _tmp3_ = search_type;
00395        _data_->search_type = _tmp3_;
00396        _tmp4_ = cancellable;
00397        _tmp5_ = _g_object_ref0 (_tmp4_);
00398        _data_->cancellable = _tmp5_;
00399        unity_music_lens_simple_scope_update_search_async_co (_data_);
00400 }
00401 
00402 
00403 static void unity_music_lens_simple_scope_update_search_finish (UnityMusicLensSimpleScope* self, GAsyncResult* _res_) {
00404        UnityMusicLensSimpleScopeUpdateSearchAsyncData* _data_;
00405        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00406 }
00407 
00408 
00409 static void unity_music_lens_simple_scope_update_search_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00410        UnityMusicLensSimpleScopeUpdateSearchAsyncData* _data_;
00411        _data_ = _user_data_;
00412        _data_->_source_object_ = source_object;
00413        _data_->_res_ = _res_;
00414        unity_music_lens_simple_scope_update_search_async_co (_data_);
00415 }
00416 
00417 
00418 static gboolean unity_music_lens_simple_scope_update_search_async_co (UnityMusicLensSimpleScopeUpdateSearchAsyncData* _data_) {
00419        switch (_data_->_state_) {
00420               case 0:
00421               goto _state_0;
00422               case 1:
00423               goto _state_1;
00424               default:
00425               g_assert_not_reached ();
00426        }
00427        _state_0:
00428        _data_->_tmp0_ = _data_->search_type;
00429        if (_data_->_tmp0_ == UNITY_SEARCH_TYPE_GLOBAL) {
00430               _data_->_tmp1_ = unity_music_lens_simple_scope_get_num_results_global_search (_data_->self);
00431               _data_->_tmp2_ = _data_->_tmp1_;
00432               _data_->max_results = _data_->_tmp2_;
00433        } else {
00434               _data_->_tmp3_ = _data_->search;
00435               _data_->_tmp4_ = FALSE;
00436               _data_->_tmp4_ = unity_music_lens_simple_scope_is_search_empty (_data_->self, _data_->_tmp3_);
00437               if (_data_->_tmp4_) {
00438                      _data_->_tmp5_ = unity_music_lens_simple_scope_get_num_results_without_search (_data_->self);
00439                      _data_->_tmp6_ = _data_->_tmp5_;
00440                      _data_->max_results = _data_->_tmp6_;
00441               } else {
00442                      _data_->_tmp7_ = unity_music_lens_simple_scope_get_num_results_lens_search (_data_->self);
00443                      _data_->_tmp8_ = _data_->_tmp7_;
00444                      _data_->max_results = _data_->_tmp8_;
00445               }
00446        }
00447        _data_->_tmp9_ = _data_->search;
00448        _data_->_tmp10_ = _data_->search_type;
00449        _data_->_tmp11_ = _data_->max_results;
00450        _data_->_tmp12_ = _data_->cancellable;
00451        _data_->_state_ = 1;
00452        unity_music_lens_simple_scope_prepare_search (_data_->self, _data_->_tmp9_, _data_->_tmp10_, _data_->_tmp11_, _data_->_tmp12_, unity_music_lens_simple_scope_update_search_async_ready, _data_);
00453        return FALSE;
00454        _state_1:
00455        unity_music_lens_simple_scope_prepare_search_finish (_data_->self, _data_->_res_);
00456        if (_data_->_state_ == 0) {
00457               g_simple_async_result_complete_in_idle (_data_->_async_result);
00458        } else {
00459               g_simple_async_result_complete (_data_->_async_result);
00460        }
00461        g_object_unref (_data_->_async_result);
00462        return FALSE;
00463 }
00464 
00465 
00466 static void unity_music_lens_simple_scope_prepare_search_data_free (gpointer _data) {
00467        UnityMusicLensSimpleScopePrepareSearchData* _data_;
00468        _data_ = _data;
00469        _g_object_unref0 (_data_->search);
00470        _g_object_unref0 (_data_->cancellable);
00471        _g_object_unref0 (_data_->self);
00472        g_slice_free (UnityMusicLensSimpleScopePrepareSearchData, _data_);
00473 }
00474 
00475 
00476 static void unity_music_lens_simple_scope_prepare_search (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, gint max_results, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00477        UnityMusicLensSimpleScopePrepareSearchData* _data_;
00478        UnityMusicLensSimpleScope* _tmp0_;
00479        UnityLensSearch* _tmp1_;
00480        UnityLensSearch* _tmp2_;
00481        UnitySearchType _tmp3_;
00482        gint _tmp4_;
00483        GCancellable* _tmp5_;
00484        GCancellable* _tmp6_;
00485        _data_ = g_slice_new0 (UnityMusicLensSimpleScopePrepareSearchData);
00486        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_music_lens_simple_scope_prepare_search);
00487        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_music_lens_simple_scope_prepare_search_data_free);
00488        _tmp0_ = _g_object_ref0 (self);
00489        _data_->self = _tmp0_;
00490        _tmp1_ = search;
00491        _tmp2_ = _g_object_ref0 (_tmp1_);
00492        _data_->search = _tmp2_;
00493        _tmp3_ = search_type;
00494        _data_->search_type = _tmp3_;
00495        _tmp4_ = max_results;
00496        _data_->max_results = _tmp4_;
00497        _tmp5_ = cancellable;
00498        _tmp6_ = _g_object_ref0 (_tmp5_);
00499        _data_->cancellable = _tmp6_;
00500        unity_music_lens_simple_scope_prepare_search_co (_data_);
00501 }
00502 
00503 
00504 static void unity_music_lens_simple_scope_prepare_search_finish (UnityMusicLensSimpleScope* self, GAsyncResult* _res_) {
00505        UnityMusicLensSimpleScopePrepareSearchData* _data_;
00506        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00507 }
00508 
00509 
00510 static void _g_object_unref0_ (gpointer var) {
00511        (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
00512 }
00513 
00514 
00515 static void _g_list_free__g_object_unref0_ (GList* self) {
00516        g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
00517        g_list_free (self);
00518 }
00519 
00520 
00521 static void unity_music_lens_simple_scope_prepare_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00522        UnityMusicLensSimpleScopePrepareSearchData* _data_;
00523        _data_ = _user_data_;
00524        _data_->_source_object_ = source_object;
00525        _data_->_res_ = _res_;
00526        unity_music_lens_simple_scope_prepare_search_co (_data_);
00527 }
00528 
00529 
00530 static GVariant* _variant_new1 (const gchar* value) {
00531        return g_variant_ref_sink (g_variant_new_string (value));
00532 }
00533 
00534 
00535 static gboolean unity_music_lens_simple_scope_prepare_search_co (UnityMusicLensSimpleScopePrepareSearchData* _data_) {
00536        switch (_data_->_state_) {
00537               case 0:
00538               goto _state_0;
00539               case 1:
00540               goto _state_1;
00541               default:
00542               g_assert_not_reached ();
00543        }
00544        _state_0:
00545        _data_->_tmp0_ = _data_->search;
00546        _data_->_tmp1_ = unity_lens_search_get_results_model (_data_->_tmp0_);
00547        _data_->_tmp2_ = _data_->_tmp1_;
00548        _data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
00549        _data_->results_model = _data_->_tmp3_;
00550        _data_->filters = NULL;
00551        _data_->_tmp4_ = _data_->search_type;
00552        if (_data_->_tmp4_ != UNITY_SEARCH_TYPE_GLOBAL) {
00553               _data_->_tmp5_ = _data_->self->priv->_scope;
00554               _data_->_tmp6_ = NULL;
00555               _data_->_tmp6_ = unity_scope_get_filter (_data_->_tmp5_, "genre");
00556               _data_->filter = _data_->_tmp6_;
00557               _data_->_tmp7_ = _data_->filter;
00558               _data_->_tmp8_ = unity_filter_get_filtering (_data_->_tmp7_);
00559               _data_->_tmp9_ = _data_->_tmp8_;
00560               if (_data_->_tmp9_) {
00561                      _data_->_tmp10_ = _data_->filter;
00562                      _data_->_tmp11_ = unity_music_lens_genre_filter_parser_new (UNITY_IS_CHECK_OPTION_FILTER_COMPACT (_data_->_tmp10_) ? ((UnityCheckOptionFilterCompact*) _data_->_tmp10_) : NULL);
00563                      _data_->filters = g_list_append (_data_->filters, (UnityMusicLensFilterParser*) _data_->_tmp11_);
00564               }
00565               _data_->_tmp12_ = _data_->self->priv->_scope;
00566               _data_->_tmp13_ = NULL;
00567               _data_->_tmp13_ = unity_scope_get_filter (_data_->_tmp12_, "decade");
00568               _g_object_unref0 (_data_->filter);
00569               _data_->filter = _data_->_tmp13_;
00570               _data_->_tmp14_ = _data_->filter;
00571               _data_->_tmp15_ = unity_filter_get_filtering (_data_->_tmp14_);
00572               _data_->_tmp16_ = _data_->_tmp15_;
00573               if (_data_->_tmp16_) {
00574                      _data_->_tmp17_ = _data_->filter;
00575                      _data_->_tmp18_ = unity_music_lens_decade_filter_parser_new (UNITY_IS_MULTI_RANGE_FILTER (_data_->_tmp17_) ? ((UnityMultiRangeFilter*) _data_->_tmp17_) : NULL);
00576                      _data_->filters = g_list_append (_data_->filters, (UnityMusicLensFilterParser*) _data_->_tmp18_);
00577               }
00578               _g_object_unref0 (_data_->filter);
00579        }
00580        _data_->_tmp19_ = _data_->results_model;
00581        dee_model_clear ((DeeModel*) _data_->_tmp19_);
00582        _data_->_tmp21_ = _data_->self->priv->_scope;
00583        _data_->_tmp22_ = unity_scope_get_sources (_data_->_tmp21_);
00584        _data_->_tmp23_ = _data_->_tmp22_;
00585        _data_->_tmp24_ = _data_->_tmp23_->options;
00586        _data_->_tmp25_ = 0U;
00587        _data_->_tmp25_ = g_list_length (_data_->_tmp24_);
00588        if (_data_->_tmp25_ > ((guint) 0)) {
00589               _data_->_tmp26_ = _data_->self->priv->_scope;
00590               _data_->_tmp27_ = unity_scope_get_sources (_data_->_tmp26_);
00591               _data_->_tmp28_ = _data_->_tmp27_;
00592               _data_->_tmp29_ = unity_filter_get_filtering ((UnityFilter*) _data_->_tmp28_);
00593               _data_->_tmp30_ = _data_->_tmp29_;
00594               _data_->_tmp20_ = _data_->_tmp30_;
00595        } else {
00596               _data_->_tmp20_ = FALSE;
00597        }
00598        _data_->_tmp31_ = _data_->_tmp20_;
00599        if (_data_->_tmp31_) {
00600               _data_->any_active = FALSE;
00601               _data_->_tmp32_ = _data_->self->priv->_scope;
00602               _data_->_tmp33_ = unity_scope_get_sources (_data_->_tmp32_);
00603               _data_->_tmp34_ = _data_->_tmp33_;
00604               _data_->_tmp35_ = _data_->_tmp34_->options;
00605               {
00606                      _data_->source_collection = _data_->_tmp35_;
00607                      _data_->source_it = NULL;
00608                      for (_data_->source_it = _data_->source_collection; _data_->source_it != NULL; _data_->source_it = _data_->source_it->next) {
00609                             _data_->_tmp36_ = _g_object_ref0 ((UnityFilterOption*) _data_->source_it->data);
00610                             _data_->source = _data_->_tmp36_;
00611                             {
00612                                    _data_->_tmp37_ = _data_->source;
00613                                    _data_->_tmp38_ = unity_filter_option_get_active (_data_->_tmp37_);
00614                                    _data_->_tmp39_ = _data_->_tmp38_;
00615                                    if (_data_->_tmp39_) {
00616                                           _data_->any_active = TRUE;
00617                                    }
00618                                    _g_object_unref0 (_data_->source);
00619                             }
00620                      }
00621               }
00622               _data_->_tmp40_ = _data_->any_active;
00623               if (!_data_->_tmp40_) {
00624                      _data_->_tmp41_ = _data_->search;
00625                      g_signal_emit_by_name (_data_->_tmp41_, "finished");
00626                      __g_list_free__g_object_unref0_0 (_data_->filters);
00627                      _g_object_unref0 (_data_->results_model);
00628                      if (_data_->_state_ == 0) {
00629                             g_simple_async_result_complete_in_idle (_data_->_async_result);
00630                      } else {
00631                             g_simple_async_result_complete (_data_->_async_result);
00632                      }
00633                      g_object_unref (_data_->_async_result);
00634                      return FALSE;
00635               }
00636        }
00637        _data_->_tmp42_ = _data_->search;
00638        _data_->_tmp43_ = _data_->search_type;
00639        _data_->_tmp44_ = _data_->filters;
00640        _data_->filters = NULL;
00641        _data_->_tmp45_ = _data_->max_results;
00642        _data_->_tmp46_ = _data_->cancellable;
00643        _data_->_state_ = 1;
00644        unity_music_lens_simple_scope_perform_search (_data_->self, _data_->_tmp42_, _data_->_tmp43_, _data_->_tmp44_, _data_->_tmp45_, _data_->_tmp46_, unity_music_lens_simple_scope_prepare_search_ready, _data_);
00645        return FALSE;
00646        _state_1:
00647        unity_music_lens_simple_scope_perform_search_finish (_data_->self, _data_->_res_);
00648        _data_->_tmp47_ = _data_->results_model;
00649        _data_->_tmp48_ = 0U;
00650        _data_->_tmp48_ = dee_model_get_n_rows ((DeeModel*) _data_->_tmp47_);
00651        if (_data_->_tmp48_ == ((guint) 0)) {
00652               _data_->_tmp49_ = _data_->search;
00653               _data_->_tmp50_ = NULL;
00654               _data_->_tmp50_ = _ ("Sorry, there is no music that matches your search.");
00655               _data_->_tmp51_ = _variant_new1 (_data_->_tmp50_);
00656               unity_lens_search_set_reply_hint (_data_->_tmp49_, "no-results-hint", _data_->_tmp51_);
00657        }
00658        _data_->_tmp52_ = _data_->search;
00659        g_signal_emit_by_name (_data_->_tmp52_, "finished");
00660        __g_list_free__g_object_unref0_0 (_data_->filters);
00661        _g_object_unref0 (_data_->results_model);
00662        if (_data_->_state_ == 0) {
00663               g_simple_async_result_complete_in_idle (_data_->_async_result);
00664        } else {
00665               g_simple_async_result_complete (_data_->_async_result);
00666        }
00667        g_object_unref (_data_->_async_result);
00668        return FALSE;
00669 }
00670 
00671 
00672 gboolean unity_music_lens_simple_scope_is_search_empty (UnityMusicLensSimpleScope* self, UnityLensSearch* search) {
00673        gboolean result = FALSE;
00674        UnityLensSearch* _tmp0_;
00675        const gchar* _tmp1_;
00676        const gchar* _tmp2_;
00677        UnityLensSearch* _tmp3_;
00678        const gchar* _tmp4_;
00679        const gchar* _tmp5_;
00680        gchar* _tmp6_ = NULL;
00681        gchar* _tmp7_;
00682        gboolean _tmp8_;
00683        g_return_val_if_fail (self != NULL, FALSE);
00684        g_return_val_if_fail (search != NULL, FALSE);
00685        _tmp0_ = search;
00686        _tmp1_ = unity_lens_search_get_search_string (_tmp0_);
00687        _tmp2_ = _tmp1_;
00688        g_return_val_if_fail (_tmp2_ != NULL, FALSE);
00689        _tmp3_ = search;
00690        _tmp4_ = unity_lens_search_get_search_string (_tmp3_);
00691        _tmp5_ = _tmp4_;
00692        _tmp6_ = string_strip (_tmp5_);
00693        _tmp7_ = _tmp6_;
00694        _tmp8_ = g_strcmp0 (_tmp7_, "") == 0;
00695        _g_free0 (_tmp7_);
00696        result = _tmp8_;
00697        return result;
00698 }
00699 
00700 
00701 UnityScope* unity_music_lens_simple_scope_get_scope (UnityMusicLensSimpleScope* self) {
00702        UnityScope* result;
00703        UnityScope* _tmp0_;
00704        g_return_val_if_fail (self != NULL, NULL);
00705        _tmp0_ = self->priv->_scope;
00706        result = _tmp0_;
00707        return result;
00708 }
00709 
00710 
00711 void unity_music_lens_simple_scope_set_scope (UnityMusicLensSimpleScope* self, UnityScope* value) {
00712        UnityScope* _tmp0_;
00713        UnityScope* _tmp1_;
00714        g_return_if_fail (self != NULL);
00715        _tmp0_ = value;
00716        _tmp1_ = _g_object_ref0 (_tmp0_);
00717        _g_object_unref0 (self->priv->_scope);
00718        self->priv->_scope = _tmp1_;
00719        g_object_notify ((GObject *) self, "scope");
00720 }
00721 
00722 
00723 gint unity_music_lens_simple_scope_get_num_results_without_search (UnityMusicLensSimpleScope* self) {
00724        g_return_val_if_fail (self != NULL, 0);
00725        return UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_CLASS (self)->get_num_results_without_search (self);
00726 }
00727 
00728 
00729 gint unity_music_lens_simple_scope_get_num_results_global_search (UnityMusicLensSimpleScope* self) {
00730        g_return_val_if_fail (self != NULL, 0);
00731        return UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_CLASS (self)->get_num_results_global_search (self);
00732 }
00733 
00734 
00735 gint unity_music_lens_simple_scope_get_num_results_lens_search (UnityMusicLensSimpleScope* self) {
00736        g_return_val_if_fail (self != NULL, 0);
00737        return UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_CLASS (self)->get_num_results_lens_search (self);
00738 }
00739 
00740 
00741 static void unity_music_lens_simple_scope_class_init (UnityMusicLensSimpleScopeClass * klass) {
00742        unity_music_lens_simple_scope_parent_class = g_type_class_peek_parent (klass);
00743        g_type_class_add_private (klass, sizeof (UnityMusicLensSimpleScopePrivate));
00744        G_OBJECT_CLASS (klass)->get_property = _vala_unity_music_lens_simple_scope_get_property;
00745        G_OBJECT_CLASS (klass)->set_property = _vala_unity_music_lens_simple_scope_set_property;
00746        G_OBJECT_CLASS (klass)->finalize = unity_music_lens_simple_scope_finalize;
00747        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_SIMPLE_SCOPE_SCOPE, g_param_spec_object ("scope", "scope", "scope", UNITY_TYPE_SCOPE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00748        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_SIMPLE_SCOPE_NUM_RESULTS_WITHOUT_SEARCH, g_param_spec_int ("num-results-without-search", "num-results-without-search", "num-results-without-search", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
00749        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_SIMPLE_SCOPE_NUM_RESULTS_GLOBAL_SEARCH, g_param_spec_int ("num-results-global-search", "num-results-global-search", "num-results-global-search", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
00750        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_SIMPLE_SCOPE_NUM_RESULTS_LENS_SEARCH, g_param_spec_int ("num-results-lens-search", "num-results-lens-search", "num-results-lens-search", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
00751 }
00752 
00753 
00754 static void unity_music_lens_simple_scope_instance_init (UnityMusicLensSimpleScope * self) {
00755        self->priv = UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_PRIVATE (self);
00756 }
00757 
00758 
00759 static void unity_music_lens_simple_scope_finalize (GObject* obj) {
00760        UnityMusicLensSimpleScope * self;
00761        self = UNITY_MUSIC_LENS_SIMPLE_SCOPE (obj);
00762        _g_object_unref0 (self->priv->_scope);
00763        G_OBJECT_CLASS (unity_music_lens_simple_scope_parent_class)->finalize (obj);
00764 }
00765 
00766 
00767 GType unity_music_lens_simple_scope_get_type (void) {
00768        static volatile gsize unity_music_lens_simple_scope_type_id__volatile = 0;
00769        if (g_once_init_enter (&unity_music_lens_simple_scope_type_id__volatile)) {
00770               static const GTypeInfo g_define_type_info = { sizeof (UnityMusicLensSimpleScopeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_music_lens_simple_scope_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityMusicLensSimpleScope), 0, (GInstanceInitFunc) unity_music_lens_simple_scope_instance_init, NULL };
00771               GType unity_music_lens_simple_scope_type_id;
00772               unity_music_lens_simple_scope_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityMusicLensSimpleScope", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
00773               g_once_init_leave (&unity_music_lens_simple_scope_type_id__volatile, unity_music_lens_simple_scope_type_id);
00774        }
00775        return unity_music_lens_simple_scope_type_id__volatile;
00776 }
00777 
00778 
00779 static void _vala_unity_music_lens_simple_scope_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
00780        UnityMusicLensSimpleScope * self;
00781        self = UNITY_MUSIC_LENS_SIMPLE_SCOPE (object);
00782        switch (property_id) {
00783               case UNITY_MUSIC_LENS_SIMPLE_SCOPE_SCOPE:
00784               g_value_set_object (value, unity_music_lens_simple_scope_get_scope (self));
00785               break;
00786               default:
00787               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00788               break;
00789        }
00790 }
00791 
00792 
00793 static void _vala_unity_music_lens_simple_scope_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
00794        UnityMusicLensSimpleScope * self;
00795        self = UNITY_MUSIC_LENS_SIMPLE_SCOPE (object);
00796        switch (property_id) {
00797               case UNITY_MUSIC_LENS_SIMPLE_SCOPE_SCOPE:
00798               unity_music_lens_simple_scope_set_scope (self, g_value_get_object (value));
00799               break;
00800               default:
00801               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00802               break;
00803        }
00804 }
00805 
00806 
00807