Back to index

unity-lens-music  6.0.0
banshee-scope.c
Go to the documentation of this file.
00001 /* banshee-scope.c generated by valac 0.14.2, the Vala compiler
00002  * generated from banshee-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 <glib/gi18n-lib.h>
00030 
00031 
00032 #define UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE (unity_music_lens_simple_scope_get_type ())
00033 #define UNITY_MUSIC_LENS_SIMPLE_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScope))
00034 #define UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScopeClass))
00035 #define UNITY_MUSIC_LENS_IS_SIMPLE_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE))
00036 #define UNITY_MUSIC_LENS_IS_SIMPLE_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE))
00037 #define UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScopeClass))
00038 
00039 typedef struct _UnityMusicLensSimpleScope UnityMusicLensSimpleScope;
00040 typedef struct _UnityMusicLensSimpleScopeClass UnityMusicLensSimpleScopeClass;
00041 typedef struct _UnityMusicLensSimpleScopePrivate UnityMusicLensSimpleScopePrivate;
00042 
00043 #define UNITY_MUSIC_LENS_TYPE_FILTER_PARSER (unity_music_lens_filter_parser_get_type ())
00044 #define UNITY_MUSIC_LENS_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParser))
00045 #define UNITY_MUSIC_LENS_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParserClass))
00046 #define UNITY_MUSIC_LENS_IS_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER))
00047 #define UNITY_MUSIC_LENS_IS_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER))
00048 #define UNITY_MUSIC_LENS_FILTER_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParserClass))
00049 
00050 typedef struct _UnityMusicLensFilterParser UnityMusicLensFilterParser;
00051 typedef struct _UnityMusicLensFilterParserClass UnityMusicLensFilterParserClass;
00052 
00053 #define UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY (unity_music_lens_banshee_scope_proxy_get_type ())
00054 #define UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY, UnityMusicLensBansheeScopeProxy))
00055 #define UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY, UnityMusicLensBansheeScopeProxyClass))
00056 #define UNITY_MUSIC_LENS_IS_BANSHEE_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY))
00057 #define UNITY_MUSIC_LENS_IS_BANSHEE_SCOPE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY))
00058 #define UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY, UnityMusicLensBansheeScopeProxyClass))
00059 
00060 typedef struct _UnityMusicLensBansheeScopeProxy UnityMusicLensBansheeScopeProxy;
00061 typedef struct _UnityMusicLensBansheeScopeProxyClass UnityMusicLensBansheeScopeProxyClass;
00062 typedef struct _UnityMusicLensBansheeScopeProxyPrivate UnityMusicLensBansheeScopeProxyPrivate;
00063 
00064 #define UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION (unity_music_lens_banshee_collection_get_type ())
00065 #define UNITY_MUSIC_LENS_BANSHEE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION, UnityMusicLensBansheeCollection))
00066 #define UNITY_MUSIC_LENS_BANSHEE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION, UnityMusicLensBansheeCollectionClass))
00067 #define UNITY_MUSIC_LENS_IS_BANSHEE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION))
00068 #define UNITY_MUSIC_LENS_IS_BANSHEE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION))
00069 #define UNITY_MUSIC_LENS_BANSHEE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION, UnityMusicLensBansheeCollectionClass))
00070 
00071 typedef struct _UnityMusicLensBansheeCollection UnityMusicLensBansheeCollection;
00072 typedef struct _UnityMusicLensBansheeCollectionClass UnityMusicLensBansheeCollectionClass;
00073 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00074 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00075 #define _g_free0(var) (var = (g_free (var), NULL))
00076 
00077 #define UNITY_MUSIC_LENS_TYPE_ALBUM (unity_music_lens_album_get_type ())
00078 #define UNITY_MUSIC_LENS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbum))
00079 #define UNITY_MUSIC_LENS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbumClass))
00080 #define UNITY_MUSIC_LENS_IS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_ALBUM))
00081 #define UNITY_MUSIC_LENS_IS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_ALBUM))
00082 #define UNITY_MUSIC_LENS_ALBUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbumClass))
00083 
00084 typedef struct _UnityMusicLensAlbum UnityMusicLensAlbum;
00085 typedef struct _UnityMusicLensAlbumClass UnityMusicLensAlbumClass;
00086 #define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
00087 
00088 #define UNITY_MUSIC_LENS_TYPE_CATEGORY (unity_music_lens_category_get_type ())
00089 typedef struct _UnityMusicLensBansheeScopeProxyPerformSearchData UnityMusicLensBansheeScopeProxyPerformSearchData;
00090 
00091 struct _UnityMusicLensSimpleScope {
00092        GObject parent_instance;
00093        UnityMusicLensSimpleScopePrivate * priv;
00094 };
00095 
00096 struct _UnityMusicLensSimpleScopeClass {
00097        GObjectClass parent_class;
00098        void (*perform_search) (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, GList* filters, gint max_results, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
00099        void (*perform_search_finish) (UnityMusicLensSimpleScope* self, GAsyncResult* _res_);
00100        gint (*get_num_results_without_search) (UnityMusicLensSimpleScope* self);
00101        gint (*get_num_results_global_search) (UnityMusicLensSimpleScope* self);
00102        gint (*get_num_results_lens_search) (UnityMusicLensSimpleScope* self);
00103 };
00104 
00105 struct _UnityMusicLensBansheeScopeProxy {
00106        UnityMusicLensSimpleScope parent_instance;
00107        UnityMusicLensBansheeScopeProxyPrivate * priv;
00108 };
00109 
00110 struct _UnityMusicLensBansheeScopeProxyClass {
00111        UnityMusicLensSimpleScopeClass parent_class;
00112 };
00113 
00114 struct _UnityMusicLensBansheeScopeProxyPrivate {
00115        UnityMusicLensBansheeCollection* collection;
00116 };
00117 
00118 typedef enum  {
00119        UNITY_MUSIC_LENS_DATABASE_ERROR_FAILED_TO_OPEN
00120 } UnityMusicLensDatabaseError;
00121 #define UNITY_MUSIC_LENS_DATABASE_ERROR unity_music_lens_database_error_quark ()
00122 typedef enum  {
00123        UNITY_MUSIC_LENS_CATEGORY_SONGS,
00124        UNITY_MUSIC_LENS_CATEGORY_ALBUMS,
00125        UNITY_MUSIC_LENS_CATEGORY_PURCHASE,
00126        UNITY_MUSIC_LENS_CATEGORY_MUSIC,
00127        UNITY_MUSIC_LENS_CATEGORY_RADIOS
00128 } UnityMusicLensCategory;
00129 
00130 struct _UnityMusicLensBansheeScopeProxyPerformSearchData {
00131        int _state_;
00132        GObject* _source_object_;
00133        GAsyncResult* _res_;
00134        GSimpleAsyncResult* _async_result;
00135        UnityMusicLensBansheeScopeProxy* self;
00136        UnityLensSearch* search;
00137        UnitySearchType search_type;
00138        GList* filters;
00139        gint max_results;
00140        GCancellable* cancellable;
00141        gint category_override;
00142        UnitySearchType _tmp0_;
00143        UnityLensSearch* _tmp1_;
00144        gboolean _tmp2_;
00145        UnityMusicLensBansheeCollection* _tmp3_;
00146        UnityLensSearch* _tmp4_;
00147        UnitySearchType _tmp5_;
00148        GList* _tmp6_;
00149        gint _tmp7_;
00150        gint _tmp8_;
00151 };
00152 
00153 
00154 static gpointer unity_music_lens_banshee_scope_proxy_parent_class = NULL;
00155 
00156 GType unity_music_lens_simple_scope_get_type (void) G_GNUC_CONST;
00157 GType unity_music_lens_filter_parser_get_type (void) G_GNUC_CONST;
00158 GType unity_music_lens_banshee_scope_proxy_get_type (void) G_GNUC_CONST;
00159 GType unity_music_lens_banshee_collection_get_type (void) G_GNUC_CONST;
00160 #define UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY, UnityMusicLensBansheeScopeProxyPrivate))
00161 enum  {
00162        UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_DUMMY_PROPERTY,
00163        UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_WITHOUT_SEARCH,
00164        UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_GLOBAL_SEARCH,
00165        UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_LENS_SEARCH
00166 };
00167 UnityMusicLensBansheeScopeProxy* unity_music_lens_banshee_scope_proxy_new (void);
00168 UnityMusicLensBansheeScopeProxy* unity_music_lens_banshee_scope_proxy_construct (GType object_type);
00169 UnityMusicLensSimpleScope* unity_music_lens_simple_scope_construct (GType object_type);
00170 void unity_music_lens_simple_scope_set_scope (UnityMusicLensSimpleScope* self, UnityScope* value);
00171 UnityScope* unity_music_lens_simple_scope_get_scope (UnityMusicLensSimpleScope* self);
00172 UnityActivationResponse* unity_music_lens_banshee_scope_proxy_activate (UnityMusicLensBansheeScopeProxy* self, const gchar* uri);
00173 static UnityActivationResponse* _unity_music_lens_banshee_scope_proxy_activate_unity_scope_activate_uri (UnityScope* _sender, const gchar* uri, gpointer self);
00174 void unity_music_lens_simple_scope_initialize (UnityMusicLensSimpleScope* self);
00175 GQuark unity_music_lens_database_error_quark (void);
00176 UnityMusicLensBansheeCollection* unity_music_lens_banshee_collection_new (GError** error);
00177 UnityMusicLensBansheeCollection* unity_music_lens_banshee_collection_construct (GType object_type, GError** error);
00178 UnityMusicLensAlbum* unity_music_lens_album_new (void);
00179 UnityMusicLensAlbum* unity_music_lens_album_construct (GType object_type);
00180 GType unity_music_lens_album_get_type (void) G_GNUC_CONST;
00181 void unity_music_lens_album_set_artist (UnityMusicLensAlbum* self, const gchar* value);
00182 void unity_music_lens_album_set_title (UnityMusicLensAlbum* self, const gchar* value);
00183 gchar** unity_music_lens_banshee_collection_get_track_uris (UnityMusicLensBansheeCollection* self, UnityMusicLensAlbum* album, int* result_length1);
00184 static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value);
00185 static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
00186 static void _vala_array_add3 (gchar*** array, int* length, int* size, gchar* value);
00187 static void _g_object_unref0_ (gpointer var);
00188 static void _g_list_free__g_object_unref0_ (GList* self);
00189 static void unity_music_lens_banshee_scope_proxy_real_perform_search_data_free (gpointer _data);
00190 static void unity_music_lens_banshee_scope_proxy_real_perform_search (UnityMusicLensSimpleScope* base, UnityLensSearch* search, UnitySearchType search_type, GList* filters, gint max_results, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
00191 static gboolean unity_music_lens_banshee_scope_proxy_real_perform_search_co (UnityMusicLensBansheeScopeProxyPerformSearchData* _data_);
00192 GType unity_music_lens_category_get_type (void) G_GNUC_CONST;
00193 gboolean unity_music_lens_simple_scope_is_search_empty (UnityMusicLensSimpleScope* self, UnityLensSearch* search);
00194 void unity_music_lens_banshee_collection_search (UnityMusicLensBansheeCollection* self, UnityLensSearch* search, UnitySearchType search_type, GList* filters, gint max_results, gint category_override);
00195 static void unity_music_lens_banshee_scope_proxy_finalize (GObject* obj);
00196 gint unity_music_lens_simple_scope_get_num_results_without_search (UnityMusicLensSimpleScope* self);
00197 gint unity_music_lens_simple_scope_get_num_results_global_search (UnityMusicLensSimpleScope* self);
00198 gint unity_music_lens_simple_scope_get_num_results_lens_search (UnityMusicLensSimpleScope* self);
00199 static void _vala_unity_music_lens_banshee_scope_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00200 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00201 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00202 static gint _vala_array_length (gpointer array);
00203 
00204 
00205 static UnityActivationResponse* _unity_music_lens_banshee_scope_proxy_activate_unity_scope_activate_uri (UnityScope* _sender, const gchar* uri, gpointer self) {
00206        UnityActivationResponse* result;
00207        result = unity_music_lens_banshee_scope_proxy_activate (self, uri);
00208        return result;
00209 }
00210 
00211 
00212 UnityMusicLensBansheeScopeProxy* unity_music_lens_banshee_scope_proxy_construct (GType object_type) {
00213        UnityMusicLensBansheeScopeProxy * self = NULL;
00214        UnityScope* _tmp0_;
00215        UnityScope* _tmp1_;
00216        UnityScope* _tmp2_;
00217        UnityScope* _tmp3_;
00218        UnityScope* _tmp4_;
00219        UnityScope* _tmp5_;
00220        UnityScope* _tmp6_;
00221        UnityScope* _tmp7_;
00222        UnityOptionsFilter* _tmp8_;
00223        UnityOptionsFilter* _tmp9_;
00224        const gchar* _tmp10_ = NULL;
00225        UnityFilterOption* _tmp11_ = NULL;
00226        UnityFilterOption* _tmp12_;
00227        GError * _inner_error_ = NULL;
00228        self = (UnityMusicLensBansheeScopeProxy*) unity_music_lens_simple_scope_construct (object_type);
00229        _tmp0_ = unity_scope_new ("/com/canonical/unity/scope/banshee");
00230        _tmp1_ = _tmp0_;
00231        unity_music_lens_simple_scope_set_scope ((UnityMusicLensSimpleScope*) self, _tmp1_);
00232        _g_object_unref0 (_tmp1_);
00233        _tmp2_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self);
00234        _tmp3_ = _tmp2_;
00235        unity_scope_set_search_in_global (_tmp3_, TRUE);
00236        _tmp4_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self);
00237        _tmp5_ = _tmp4_;
00238        g_signal_connect_object (_tmp5_, "activate-uri", (GCallback) _unity_music_lens_banshee_scope_proxy_activate_unity_scope_activate_uri, self, 0);
00239        _tmp6_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self);
00240        _tmp7_ = _tmp6_;
00241        _tmp8_ = unity_scope_get_sources (_tmp7_);
00242        _tmp9_ = _tmp8_;
00243        _tmp10_ = _ ("Banshee");
00244        _tmp11_ = unity_options_filter_add_option (_tmp9_, "banshee", _tmp10_, NULL);
00245        _tmp12_ = _tmp11_;
00246        _g_object_unref0 (_tmp12_);
00247        unity_music_lens_simple_scope_initialize (UNITY_MUSIC_LENS_SIMPLE_SCOPE (self));
00248        {
00249               UnityMusicLensBansheeCollection* _tmp13_;
00250               UnityMusicLensBansheeCollection* _tmp14_;
00251               _tmp13_ = unity_music_lens_banshee_collection_new (&_inner_error_);
00252               _tmp14_ = _tmp13_;
00253               if (_inner_error_ != NULL) {
00254                      if (_inner_error_->domain == UNITY_MUSIC_LENS_DATABASE_ERROR) {
00255                             goto __catch0_unity_music_lens_database_error;
00256                      }
00257                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
00258                      g_clear_error (&_inner_error_);
00259                      return NULL;
00260               }
00261               _g_object_unref0 (self->priv->collection);
00262               self->priv->collection = _tmp14_;
00263        }
00264        goto __finally0;
00265        __catch0_unity_music_lens_database_error:
00266        {
00267               GError* _error_ = NULL;
00268               _error_ = _inner_error_;
00269               _inner_error_ = NULL;
00270               g_printerr ("Failed to open the Banshee collection database\n");
00271               _g_error_free0 (_error_);
00272               return self;
00273        }
00274        __finally0:
00275        if (_inner_error_ != NULL) {
00276               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);
00277               g_clear_error (&_inner_error_);
00278               return NULL;
00279        }
00280        return self;
00281 }
00282 
00283 
00284 UnityMusicLensBansheeScopeProxy* unity_music_lens_banshee_scope_proxy_new (void) {
00285        return unity_music_lens_banshee_scope_proxy_construct (UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY);
00286 }
00287 
00288 
00292 static const gchar* string_to_string (const gchar* self) {
00293        const gchar* result = NULL;
00294        g_return_val_if_fail (self != NULL, NULL);
00295        result = self;
00296        return result;
00297 }
00298 
00299 
00300 static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value) {
00301        if ((*length) == (*size)) {
00302               *size = (*size) ? (2 * (*size)) : 4;
00303               *array = g_renew (gchar*, *array, (*size) + 1);
00304        }
00305        (*array)[(*length)++] = value;
00306        (*array)[*length] = NULL;
00307 }
00308 
00309 
00310 static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) {
00311        if ((*length) == (*size)) {
00312               *size = (*size) ? (2 * (*size)) : 4;
00313               *array = g_renew (gchar*, *array, (*size) + 1);
00314        }
00315        (*array)[(*length)++] = value;
00316        (*array)[*length] = NULL;
00317 }
00318 
00319 
00320 static void _vala_array_add3 (gchar*** array, int* length, int* size, gchar* value) {
00321        if ((*length) == (*size)) {
00322               *size = (*size) ? (2 * (*size)) : 4;
00323               *array = g_renew (gchar*, *array, (*size) + 1);
00324        }
00325        (*array)[(*length)++] = value;
00326        (*array)[*length] = NULL;
00327 }
00328 
00329 
00330 UnityActivationResponse* unity_music_lens_banshee_scope_proxy_activate (UnityMusicLensBansheeScopeProxy* self, const gchar* uri) {
00331        UnityActivationResponse* result = NULL;
00332        gchar* _tmp0_;
00333        gchar* _tmp1_;
00334        gchar** _tmp2_ = NULL;
00335        gchar** exec;
00336        gint exec_length1;
00337        gint _exec_size_;
00338        GError * _inner_error_ = NULL;
00339        g_return_val_if_fail (self != NULL, NULL);
00340        g_return_val_if_fail (uri != NULL, NULL);
00341        _tmp0_ = g_strdup ("banshee");
00342        _tmp1_ = g_strdup ("--play-enqueued");
00343        _tmp2_ = g_new0 (gchar*, 2 + 1);
00344        _tmp2_[0] = _tmp0_;
00345        _tmp2_[1] = _tmp1_;
00346        exec = _tmp2_;
00347        exec_length1 = 2;
00348        _exec_size_ = exec_length1;
00349        {
00350               const gchar* _tmp3_;
00351               gchar* _tmp4_ = NULL;
00352               gchar* _tmp5_;
00353               gboolean _tmp6_;
00354               gchar** _tmp36_;
00355               gint _tmp36__length1;
00356               gchar** _tmp37_;
00357               gint _tmp37__length1;
00358               gchar* _tmp38_ = NULL;
00359               gchar* _tmp39_;
00360               gchar** _tmp40_;
00361               gint _tmp40__length1;
00362               UnityActivationResponse* _tmp41_;
00363               UnityActivationResponse* _tmp42_;
00364               _tmp3_ = uri;
00365               _tmp4_ = g_uri_parse_scheme (_tmp3_);
00366               _tmp5_ = _tmp4_;
00367               _tmp6_ = g_strcmp0 (_tmp5_, "album") == 0;
00368               _g_free0 (_tmp5_);
00369               if (_tmp6_) {
00370                      const gchar* _tmp7_;
00371                      const gchar* _tmp8_ = NULL;
00372                      gchar* _tmp9_ = NULL;
00373                      gchar* _tmp10_;
00374                      const gchar* _tmp11_;
00375                      gchar** _tmp12_;
00376                      gchar** _tmp13_ = NULL;
00377                      gchar** split;
00378                      gint split_length1;
00379                      gint _split_size_;
00380                      gchar** _tmp14_;
00381                      gint _tmp14__length1;
00382                      const gchar* _tmp15_;
00383                      gchar* _tmp16_;
00384                      gchar* artist;
00385                      gchar** _tmp17_;
00386                      gint _tmp17__length1;
00387                      const gchar* _tmp18_;
00388                      gchar* _tmp19_;
00389                      gchar* title;
00390                      UnityMusicLensAlbum* _tmp20_;
00391                      UnityMusicLensAlbum* album;
00392                      UnityMusicLensAlbum* _tmp21_;
00393                      const gchar* _tmp22_;
00394                      UnityMusicLensAlbum* _tmp23_;
00395                      const gchar* _tmp24_;
00396                      UnityMusicLensBansheeCollection* _tmp25_;
00397                      UnityMusicLensAlbum* _tmp26_;
00398                      gint _tmp27_ = 0;
00399                      gchar** _tmp28_ = NULL;
00400                      _tmp7_ = uri;
00401                      _tmp8_ = string_to_string (_tmp7_);
00402                      _tmp9_ = g_strconcat ("searching for tracks for ", _tmp8_, NULL);
00403                      _tmp10_ = _tmp9_;
00404                      g_debug ("banshee-scope.vala:61: %s", _tmp10_);
00405                      _g_free0 (_tmp10_);
00406                      _tmp11_ = uri;
00407                      _tmp13_ = _tmp12_ = g_strsplit (_tmp11_, "/", 0);
00408                      split = _tmp13_;
00409                      split_length1 = _vala_array_length (_tmp12_);
00410                      _split_size_ = split_length1;
00411                      _tmp14_ = split;
00412                      _tmp14__length1 = split_length1;
00413                      _tmp15_ = _tmp14_[2];
00414                      _tmp16_ = g_strdup (_tmp15_);
00415                      artist = _tmp16_;
00416                      _tmp17_ = split;
00417                      _tmp17__length1 = split_length1;
00418                      _tmp18_ = _tmp17_[3];
00419                      _tmp19_ = g_strdup (_tmp18_);
00420                      title = _tmp19_;
00421                      _tmp20_ = unity_music_lens_album_new ();
00422                      album = _tmp20_;
00423                      _tmp21_ = album;
00424                      _tmp22_ = artist;
00425                      unity_music_lens_album_set_artist (_tmp21_, _tmp22_);
00426                      _tmp23_ = album;
00427                      _tmp24_ = title;
00428                      unity_music_lens_album_set_title (_tmp23_, _tmp24_);
00429                      _tmp25_ = self->priv->collection;
00430                      _tmp26_ = album;
00431                      _tmp28_ = unity_music_lens_banshee_collection_get_track_uris (_tmp25_, _tmp26_, &_tmp27_);
00432                      {
00433                             gchar** track_collection = NULL;
00434                             gint track_collection_length1 = 0;
00435                             gint _track_collection_size_ = 0;
00436                             gint track_it = 0;
00437                             track_collection = _tmp28_;
00438                             track_collection_length1 = _tmp27_;
00439                             for (track_it = 0; track_it < _tmp27_; track_it = track_it + 1) {
00440                                    gchar* _tmp29_;
00441                                    gchar* track = NULL;
00442                                    _tmp29_ = g_strdup (track_collection[track_it]);
00443                                    track = _tmp29_;
00444                                    {
00445                                           gchar** _tmp30_;
00446                                           gint _tmp30__length1;
00447                                           const gchar* _tmp31_;
00448                                           gchar* _tmp32_;
00449                                           _tmp30_ = exec;
00450                                           _tmp30__length1 = exec_length1;
00451                                           _tmp31_ = track;
00452                                           _tmp32_ = g_strdup (_tmp31_);
00453                                           _vala_array_add1 (&exec, &exec_length1, &_exec_size_, _tmp32_);
00454                                           _g_free0 (track);
00455                                    }
00456                             }
00457                             track_collection = (_vala_array_free (track_collection, track_collection_length1, (GDestroyNotify) g_free), NULL);
00458                      }
00459                      _g_object_unref0 (album);
00460                      _g_free0 (title);
00461                      _g_free0 (artist);
00462                      split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL);
00463               } else {
00464                      gchar** _tmp33_;
00465                      gint _tmp33__length1;
00466                      const gchar* _tmp34_;
00467                      gchar* _tmp35_;
00468                      _tmp33_ = exec;
00469                      _tmp33__length1 = exec_length1;
00470                      _tmp34_ = uri;
00471                      _tmp35_ = g_strdup (_tmp34_);
00472                      _vala_array_add2 (&exec, &exec_length1, &_exec_size_, _tmp35_);
00473               }
00474               _tmp36_ = exec;
00475               _tmp36__length1 = exec_length1;
00476               _vala_array_add3 (&exec, &exec_length1, &_exec_size_, NULL);
00477               _tmp37_ = exec;
00478               _tmp37__length1 = exec_length1;
00479               _tmp38_ = g_strjoinv (" ", _tmp37_);
00480               _tmp39_ = _tmp38_;
00481               g_debug ("banshee-scope.vala:80: Spawning banshee '%s'", _tmp39_);
00482               _g_free0 (_tmp39_);
00483               _tmp40_ = exec;
00484               _tmp40__length1 = exec_length1;
00485               g_spawn_async (NULL, _tmp40_, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &_inner_error_);
00486               if (_inner_error_ != NULL) {
00487                      if (_inner_error_->domain == G_SPAWN_ERROR) {
00488                             goto __catch1_g_spawn_error;
00489                      }
00490                      exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL);
00491                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
00492                      g_clear_error (&_inner_error_);
00493                      return NULL;
00494               }
00495               _tmp41_ = unity_activation_response_new (UNITY_HANDLED_TYPE_HIDE_DASH, "");
00496               _tmp42_ = g_object_ref_sink (_tmp41_);
00497               result = _tmp42_;
00498               exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL);
00499               return result;
00500        }
00501        goto __finally1;
00502        __catch1_g_spawn_error:
00503        {
00504               GError* _error_ = NULL;
00505               const gchar* _tmp43_;
00506               UnityActivationResponse* _tmp44_;
00507               UnityActivationResponse* _tmp45_;
00508               _error_ = _inner_error_;
00509               _inner_error_ = NULL;
00510               _tmp43_ = uri;
00511               g_warning ("banshee-scope.vala:90: Failed to launch URI %s", _tmp43_);
00512               _tmp44_ = unity_activation_response_new (UNITY_HANDLED_TYPE_NOT_HANDLED, "");
00513               _tmp45_ = g_object_ref_sink (_tmp44_);
00514               result = _tmp45_;
00515               _g_error_free0 (_error_);
00516               exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL);
00517               return result;
00518        }
00519        __finally1:
00520        exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL);
00521        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);
00522        g_clear_error (&_inner_error_);
00523        return NULL;
00524 }
00525 
00526 
00527 static void _g_object_unref0_ (gpointer var) {
00528        (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
00529 }
00530 
00531 
00532 static void _g_list_free__g_object_unref0_ (GList* self) {
00533        g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
00534        g_list_free (self);
00535 }
00536 
00537 
00538 static void unity_music_lens_banshee_scope_proxy_real_perform_search_data_free (gpointer _data) {
00539        UnityMusicLensBansheeScopeProxyPerformSearchData* _data_;
00540        _data_ = _data;
00541        _g_object_unref0 (_data_->search);
00542        __g_list_free__g_object_unref0_0 (_data_->filters);
00543        _g_object_unref0 (_data_->cancellable);
00544        _g_object_unref0 (_data_->self);
00545        g_slice_free (UnityMusicLensBansheeScopeProxyPerformSearchData, _data_);
00546 }
00547 
00548 
00549 static gpointer _g_object_ref0 (gpointer self) {
00550        return self ? g_object_ref (self) : NULL;
00551 }
00552 
00553 
00554 static void unity_music_lens_banshee_scope_proxy_real_perform_search (UnityMusicLensSimpleScope* base, UnityLensSearch* search, UnitySearchType search_type, GList* filters, gint max_results, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00555        UnityMusicLensBansheeScopeProxy * self;
00556        UnityMusicLensBansheeScopeProxyPerformSearchData* _data_;
00557        UnityMusicLensBansheeScopeProxy* _tmp0_;
00558        UnityLensSearch* _tmp1_;
00559        UnityLensSearch* _tmp2_;
00560        UnitySearchType _tmp3_;
00561        GList* _tmp4_;
00562        gint _tmp5_;
00563        GCancellable* _tmp6_;
00564        GCancellable* _tmp7_;
00565        self = (UnityMusicLensBansheeScopeProxy*) base;
00566        _data_ = g_slice_new0 (UnityMusicLensBansheeScopeProxyPerformSearchData);
00567        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_music_lens_banshee_scope_proxy_real_perform_search);
00568        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_music_lens_banshee_scope_proxy_real_perform_search_data_free);
00569        _tmp0_ = _g_object_ref0 (self);
00570        _data_->self = _tmp0_;
00571        _tmp1_ = search;
00572        _tmp2_ = _g_object_ref0 (_tmp1_);
00573        _data_->search = _tmp2_;
00574        _tmp3_ = search_type;
00575        _data_->search_type = _tmp3_;
00576        _tmp4_ = filters;
00577        __g_list_free__g_object_unref0_0 (_data_->filters);
00578        _data_->filters = _tmp4_;
00579        _tmp5_ = max_results;
00580        _data_->max_results = _tmp5_;
00581        _tmp6_ = cancellable;
00582        _tmp7_ = _g_object_ref0 (_tmp6_);
00583        _data_->cancellable = _tmp7_;
00584        unity_music_lens_banshee_scope_proxy_real_perform_search_co (_data_);
00585 }
00586 
00587 
00588 static void unity_music_lens_banshee_scope_proxy_real_perform_search_finish (UnityMusicLensSimpleScope* base, GAsyncResult* _res_) {
00589        UnityMusicLensBansheeScopeProxyPerformSearchData* _data_;
00590        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00591 }
00592 
00593 
00594 static gboolean unity_music_lens_banshee_scope_proxy_real_perform_search_co (UnityMusicLensBansheeScopeProxyPerformSearchData* _data_) {
00595        switch (_data_->_state_) {
00596               case 0:
00597               goto _state_0;
00598               default:
00599               g_assert_not_reached ();
00600        }
00601        _state_0:
00602        _data_->category_override = -1;
00603        _data_->_tmp0_ = _data_->search_type;
00604        if (_data_->_tmp0_ == UNITY_SEARCH_TYPE_GLOBAL) {
00605               _data_->category_override = (gint) UNITY_MUSIC_LENS_CATEGORY_MUSIC;
00606               _data_->_tmp1_ = _data_->search;
00607               _data_->_tmp2_ = FALSE;
00608               _data_->_tmp2_ = unity_music_lens_simple_scope_is_search_empty ((UnityMusicLensSimpleScope*) _data_->self, _data_->_tmp1_);
00609               if (_data_->_tmp2_) {
00610                      __g_list_free__g_object_unref0_0 (_data_->filters);
00611                      if (_data_->_state_ == 0) {
00612                             g_simple_async_result_complete_in_idle (_data_->_async_result);
00613                      } else {
00614                             g_simple_async_result_complete (_data_->_async_result);
00615                      }
00616                      g_object_unref (_data_->_async_result);
00617                      return FALSE;
00618               }
00619        }
00620        _data_->_tmp3_ = _data_->self->priv->collection;
00621        _data_->_tmp4_ = _data_->search;
00622        _data_->_tmp5_ = _data_->search_type;
00623        _data_->_tmp6_ = _data_->filters;
00624        _data_->_tmp7_ = _data_->max_results;
00625        _data_->_tmp8_ = _data_->category_override;
00626        unity_music_lens_banshee_collection_search (_data_->_tmp3_, _data_->_tmp4_, _data_->_tmp5_, _data_->_tmp6_, _data_->_tmp7_, _data_->_tmp8_);
00627        __g_list_free__g_object_unref0_0 (_data_->filters);
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 
00638 static gint unity_music_lens_banshee_scope_proxy_real_get_num_results_without_search (UnityMusicLensSimpleScope* base) {
00639        gint result;
00640        UnityMusicLensBansheeScopeProxy* self;
00641        self = (UnityMusicLensBansheeScopeProxy*) base;
00642        result = 100;
00643        return result;
00644 }
00645 
00646 
00647 static gint unity_music_lens_banshee_scope_proxy_real_get_num_results_global_search (UnityMusicLensSimpleScope* base) {
00648        gint result;
00649        UnityMusicLensBansheeScopeProxy* self;
00650        self = (UnityMusicLensBansheeScopeProxy*) base;
00651        result = 20;
00652        return result;
00653 }
00654 
00655 
00656 static gint unity_music_lens_banshee_scope_proxy_real_get_num_results_lens_search (UnityMusicLensSimpleScope* base) {
00657        gint result;
00658        UnityMusicLensBansheeScopeProxy* self;
00659        self = (UnityMusicLensBansheeScopeProxy*) base;
00660        result = 50;
00661        return result;
00662 }
00663 
00664 
00665 static void unity_music_lens_banshee_scope_proxy_class_init (UnityMusicLensBansheeScopeProxyClass * klass) {
00666        unity_music_lens_banshee_scope_proxy_parent_class = g_type_class_peek_parent (klass);
00667        g_type_class_add_private (klass, sizeof (UnityMusicLensBansheeScopeProxyPrivate));
00668        UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->perform_search = unity_music_lens_banshee_scope_proxy_real_perform_search;
00669        UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->perform_search_finish = unity_music_lens_banshee_scope_proxy_real_perform_search_finish;
00670        UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->get_num_results_without_search = unity_music_lens_banshee_scope_proxy_real_get_num_results_without_search;
00671        UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->get_num_results_global_search = unity_music_lens_banshee_scope_proxy_real_get_num_results_global_search;
00672        UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->get_num_results_lens_search = unity_music_lens_banshee_scope_proxy_real_get_num_results_lens_search;
00673        G_OBJECT_CLASS (klass)->get_property = _vala_unity_music_lens_banshee_scope_proxy_get_property;
00674        G_OBJECT_CLASS (klass)->finalize = unity_music_lens_banshee_scope_proxy_finalize;
00675        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_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));
00676        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_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));
00677        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_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));
00678 }
00679 
00680 
00681 static void unity_music_lens_banshee_scope_proxy_instance_init (UnityMusicLensBansheeScopeProxy * self) {
00682        self->priv = UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_GET_PRIVATE (self);
00683 }
00684 
00685 
00686 static void unity_music_lens_banshee_scope_proxy_finalize (GObject* obj) {
00687        UnityMusicLensBansheeScopeProxy * self;
00688        self = UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY (obj);
00689        _g_object_unref0 (self->priv->collection);
00690        G_OBJECT_CLASS (unity_music_lens_banshee_scope_proxy_parent_class)->finalize (obj);
00691 }
00692 
00693 
00694 GType unity_music_lens_banshee_scope_proxy_get_type (void) {
00695        static volatile gsize unity_music_lens_banshee_scope_proxy_type_id__volatile = 0;
00696        if (g_once_init_enter (&unity_music_lens_banshee_scope_proxy_type_id__volatile)) {
00697               static const GTypeInfo g_define_type_info = { sizeof (UnityMusicLensBansheeScopeProxyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_music_lens_banshee_scope_proxy_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityMusicLensBansheeScopeProxy), 0, (GInstanceInitFunc) unity_music_lens_banshee_scope_proxy_instance_init, NULL };
00698               GType unity_music_lens_banshee_scope_proxy_type_id;
00699               unity_music_lens_banshee_scope_proxy_type_id = g_type_register_static (UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, "UnityMusicLensBansheeScopeProxy", &g_define_type_info, 0);
00700               g_once_init_leave (&unity_music_lens_banshee_scope_proxy_type_id__volatile, unity_music_lens_banshee_scope_proxy_type_id);
00701        }
00702        return unity_music_lens_banshee_scope_proxy_type_id__volatile;
00703 }
00704 
00705 
00706 static void _vala_unity_music_lens_banshee_scope_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
00707        UnityMusicLensBansheeScopeProxy * self;
00708        self = UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY (object);
00709        switch (property_id) {
00710               case UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_WITHOUT_SEARCH:
00711               g_value_set_int (value, unity_music_lens_simple_scope_get_num_results_without_search ((UnityMusicLensSimpleScope*) self));
00712               break;
00713               case UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_GLOBAL_SEARCH:
00714               g_value_set_int (value, unity_music_lens_simple_scope_get_num_results_global_search ((UnityMusicLensSimpleScope*) self));
00715               break;
00716               case UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_LENS_SEARCH:
00717               g_value_set_int (value, unity_music_lens_simple_scope_get_num_results_lens_search ((UnityMusicLensSimpleScope*) self));
00718               break;
00719               default:
00720               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00721               break;
00722        }
00723 }
00724 
00725 
00726 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
00727        if ((array != NULL) && (destroy_func != NULL)) {
00728               int i;
00729               for (i = 0; i < array_length; i = i + 1) {
00730                      if (((gpointer*) array)[i] != NULL) {
00731                             destroy_func (((gpointer*) array)[i]);
00732                      }
00733               }
00734        }
00735 }
00736 
00737 
00738 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
00739        _vala_array_destroy (array, array_length, destroy_func);
00740        g_free (array);
00741 }
00742 
00743 
00744 static gint _vala_array_length (gpointer array) {
00745        int length;
00746        length = 0;
00747        if (array) {
00748               while (((gpointer*) array)[length]) {
00749                      length++;
00750               }
00751        }
00752        return length;
00753 }
00754 
00755 
00756