1
/* banshee-scope.c generated by valac 0.16.1, the Vala compiler
2
* generated from banshee-scope.vala, do not modify */
5
* Copyright (C) 2011 Canonical Ltd
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License version 3 as
9
* published by the Free Software Foundation.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
* Authored by Alex Launi <alex.launi@canonical.com>
24
#include <glib-object.h>
29
#include <glib/gi18n-lib.h>
32
#define UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE (unity_music_lens_simple_scope_get_type ())
33
#define UNITY_MUSIC_LENS_SIMPLE_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScope))
34
#define UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScopeClass))
35
#define UNITY_MUSIC_LENS_IS_SIMPLE_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE))
36
#define UNITY_MUSIC_LENS_IS_SIMPLE_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE))
37
#define UNITY_MUSIC_LENS_SIMPLE_SCOPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, UnityMusicLensSimpleScopeClass))
39
typedef struct _UnityMusicLensSimpleScope UnityMusicLensSimpleScope;
40
typedef struct _UnityMusicLensSimpleScopeClass UnityMusicLensSimpleScopeClass;
41
typedef struct _UnityMusicLensSimpleScopePrivate UnityMusicLensSimpleScopePrivate;
43
#define UNITY_MUSIC_LENS_TYPE_FILTER_PARSER (unity_music_lens_filter_parser_get_type ())
44
#define UNITY_MUSIC_LENS_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParser))
45
#define UNITY_MUSIC_LENS_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParserClass))
46
#define UNITY_MUSIC_LENS_IS_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER))
47
#define UNITY_MUSIC_LENS_IS_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER))
48
#define UNITY_MUSIC_LENS_FILTER_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParserClass))
50
typedef struct _UnityMusicLensFilterParser UnityMusicLensFilterParser;
51
typedef struct _UnityMusicLensFilterParserClass UnityMusicLensFilterParserClass;
53
#define UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY (unity_music_lens_banshee_scope_proxy_get_type ())
54
#define UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY, UnityMusicLensBansheeScopeProxy))
55
#define UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY, UnityMusicLensBansheeScopeProxyClass))
56
#define UNITY_MUSIC_LENS_IS_BANSHEE_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY))
57
#define UNITY_MUSIC_LENS_IS_BANSHEE_SCOPE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY))
58
#define UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY, UnityMusicLensBansheeScopeProxyClass))
60
typedef struct _UnityMusicLensBansheeScopeProxy UnityMusicLensBansheeScopeProxy;
61
typedef struct _UnityMusicLensBansheeScopeProxyClass UnityMusicLensBansheeScopeProxyClass;
62
typedef struct _UnityMusicLensBansheeScopeProxyPrivate UnityMusicLensBansheeScopeProxyPrivate;
64
#define UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION (unity_music_lens_banshee_collection_get_type ())
65
#define UNITY_MUSIC_LENS_BANSHEE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION, UnityMusicLensBansheeCollection))
66
#define UNITY_MUSIC_LENS_BANSHEE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION, UnityMusicLensBansheeCollectionClass))
67
#define UNITY_MUSIC_LENS_IS_BANSHEE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION))
68
#define UNITY_MUSIC_LENS_IS_BANSHEE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION))
69
#define UNITY_MUSIC_LENS_BANSHEE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_BANSHEE_COLLECTION, UnityMusicLensBansheeCollectionClass))
71
typedef struct _UnityMusicLensBansheeCollection UnityMusicLensBansheeCollection;
72
typedef struct _UnityMusicLensBansheeCollectionClass UnityMusicLensBansheeCollectionClass;
73
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
74
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
75
#define _g_free0(var) (var = (g_free (var), NULL))
77
#define UNITY_MUSIC_LENS_TYPE_TRACK (unity_music_lens_track_get_type ())
78
#define UNITY_MUSIC_LENS_TRACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_TRACK, UnityMusicLensTrack))
79
#define UNITY_MUSIC_LENS_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_TRACK, UnityMusicLensTrackClass))
80
#define UNITY_MUSIC_LENS_IS_TRACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_TRACK))
81
#define UNITY_MUSIC_LENS_IS_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_TRACK))
82
#define UNITY_MUSIC_LENS_TRACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_TRACK, UnityMusicLensTrackClass))
84
typedef struct _UnityMusicLensTrack UnityMusicLensTrack;
85
typedef struct _UnityMusicLensTrackClass UnityMusicLensTrackClass;
86
#define __g_slist_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_object_unref0_ (var), NULL)))
88
#define UNITY_MUSIC_LENS_TYPE_ALBUM (unity_music_lens_album_get_type ())
89
#define UNITY_MUSIC_LENS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbum))
90
#define UNITY_MUSIC_LENS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbumClass))
91
#define UNITY_MUSIC_LENS_IS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_ALBUM))
92
#define UNITY_MUSIC_LENS_IS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_ALBUM))
93
#define UNITY_MUSIC_LENS_ALBUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbumClass))
95
typedef struct _UnityMusicLensAlbum UnityMusicLensAlbum;
96
typedef struct _UnityMusicLensAlbumClass UnityMusicLensAlbumClass;
97
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
99
#define UNITY_MUSIC_LENS_TYPE_CATEGORY (unity_music_lens_category_get_type ())
100
typedef struct _UnityMusicLensBansheeScopeProxyPerformSearchData UnityMusicLensBansheeScopeProxyPerformSearchData;
102
struct _UnityMusicLensSimpleScope {
103
GObject parent_instance;
104
UnityMusicLensSimpleScopePrivate * priv;
107
struct _UnityMusicLensSimpleScopeClass {
108
GObjectClass parent_class;
109
void (*perform_search) (UnityMusicLensSimpleScope* self, UnityLensSearch* search, UnitySearchType search_type, GList* filters, gint max_results, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
110
void (*perform_search_finish) (UnityMusicLensSimpleScope* self, GAsyncResult* _res_);
111
gint (*get_num_results_without_search) (UnityMusicLensSimpleScope* self);
112
gint (*get_num_results_global_search) (UnityMusicLensSimpleScope* self);
113
gint (*get_num_results_lens_search) (UnityMusicLensSimpleScope* self);
116
struct _UnityMusicLensBansheeScopeProxy {
117
UnityMusicLensSimpleScope parent_instance;
118
UnityMusicLensBansheeScopeProxyPrivate * priv;
121
struct _UnityMusicLensBansheeScopeProxyClass {
122
UnityMusicLensSimpleScopeClass parent_class;
125
struct _UnityMusicLensBansheeScopeProxyPrivate {
126
UnityMusicLensBansheeCollection* collection;
130
UNITY_MUSIC_LENS_DATABASE_ERROR_FAILED_TO_OPEN
131
} UnityMusicLensDatabaseError;
132
#define UNITY_MUSIC_LENS_DATABASE_ERROR unity_music_lens_database_error_quark ()
134
UNITY_MUSIC_LENS_CATEGORY_SONGS,
135
UNITY_MUSIC_LENS_CATEGORY_ALBUMS,
136
UNITY_MUSIC_LENS_CATEGORY_PURCHASE,
137
UNITY_MUSIC_LENS_CATEGORY_MUSIC,
138
UNITY_MUSIC_LENS_CATEGORY_RADIOS
139
} UnityMusicLensCategory;
141
struct _UnityMusicLensBansheeScopeProxyPerformSearchData {
143
GObject* _source_object_;
145
GSimpleAsyncResult* _async_result;
146
UnityMusicLensBansheeScopeProxy* self;
147
UnityLensSearch* search;
148
UnitySearchType search_type;
151
GCancellable* cancellable;
152
gint category_override;
153
UnitySearchType _tmp0_;
154
UnityLensSearch* _tmp1_;
156
UnityMusicLensBansheeCollection* _tmp3_;
157
UnityLensSearch* _tmp4_;
158
UnitySearchType _tmp5_;
165
static gpointer unity_music_lens_banshee_scope_proxy_parent_class = NULL;
167
GType unity_music_lens_simple_scope_get_type (void) G_GNUC_CONST;
168
GType unity_music_lens_filter_parser_get_type (void) G_GNUC_CONST;
169
GType unity_music_lens_banshee_scope_proxy_get_type (void) G_GNUC_CONST;
170
GType unity_music_lens_banshee_collection_get_type (void) G_GNUC_CONST;
171
#define UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY, UnityMusicLensBansheeScopeProxyPrivate))
173
UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_DUMMY_PROPERTY,
174
UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_WITHOUT_SEARCH,
175
UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_GLOBAL_SEARCH,
176
UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_LENS_SEARCH
178
UnityMusicLensBansheeScopeProxy* unity_music_lens_banshee_scope_proxy_new (void);
179
UnityMusicLensBansheeScopeProxy* unity_music_lens_banshee_scope_proxy_construct (GType object_type);
180
UnityMusicLensSimpleScope* unity_music_lens_simple_scope_construct (GType object_type);
181
void unity_music_lens_simple_scope_set_scope (UnityMusicLensSimpleScope* self, UnityScope* value);
182
UnityScope* unity_music_lens_simple_scope_get_scope (UnityMusicLensSimpleScope* self);
183
UnityActivationResponse* unity_music_lens_banshee_scope_proxy_activate (UnityMusicLensBansheeScopeProxy* self, const gchar* uri);
184
static UnityActivationResponse* _unity_music_lens_banshee_scope_proxy_activate_unity_scope_activate_uri (UnityScope* _sender, const gchar* uri, gpointer self);
185
UnityPreview* unity_music_lens_banshee_scope_proxy_preview (UnityMusicLensBansheeScopeProxy* self, const gchar* uri);
186
static UnityPreview* _unity_music_lens_banshee_scope_proxy_preview_unity_scope_preview_uri (UnityScope* _sender, const gchar* uri, gpointer self);
187
void unity_music_lens_simple_scope_initialize (UnityMusicLensSimpleScope* self);
188
GQuark unity_music_lens_database_error_quark (void);
189
UnityMusicLensBansheeCollection* unity_music_lens_banshee_collection_new (GError** error);
190
UnityMusicLensBansheeCollection* unity_music_lens_banshee_collection_construct (GType object_type, GError** error);
191
GType unity_music_lens_track_get_type (void) G_GNUC_CONST;
192
GSList* unity_music_lens_banshee_collection_get_album_tracks_detailed (UnityMusicLensBansheeCollection* self, const gchar* album_title, const gchar* album_artist);
193
const gchar* unity_music_lens_track_get_artwork_path (UnityMusicLensTrack* self);
194
const gchar* unity_music_lens_track_get_uri (UnityMusicLensTrack* self);
195
gint unity_music_lens_track_get_track_number (UnityMusicLensTrack* self);
196
const gchar* unity_music_lens_track_get_title (UnityMusicLensTrack* self);
197
gint unity_music_lens_track_get_duration (UnityMusicLensTrack* self);
198
static void _g_object_unref0_ (gpointer var);
199
static void _g_slist_free__g_object_unref0_ (GSList* self);
200
UnityMusicLensTrack* unity_music_lens_banshee_collection_get_album_track (UnityMusicLensBansheeCollection* self, const gchar* uri);
201
const gchar* unity_music_lens_track_get_artist (UnityMusicLensTrack* self);
202
UnityMusicLensAlbum* unity_music_lens_album_new (void);
203
UnityMusicLensAlbum* unity_music_lens_album_construct (GType object_type);
204
GType unity_music_lens_album_get_type (void) G_GNUC_CONST;
205
void unity_music_lens_album_set_artist (UnityMusicLensAlbum* self, const gchar* value);
206
void unity_music_lens_album_set_title (UnityMusicLensAlbum* self, const gchar* value);
207
gchar** unity_music_lens_banshee_collection_get_track_uris (UnityMusicLensBansheeCollection* self, UnityMusicLensAlbum* album, int* result_length1);
208
static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value);
209
static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
210
static void _vala_array_add3 (gchar*** array, int* length, int* size, gchar* value);
211
static void _g_list_free__g_object_unref0_ (GList* self);
212
static void unity_music_lens_banshee_scope_proxy_real_perform_search_data_free (gpointer _data);
213
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_);
214
static gboolean unity_music_lens_banshee_scope_proxy_real_perform_search_co (UnityMusicLensBansheeScopeProxyPerformSearchData* _data_);
215
GType unity_music_lens_category_get_type (void) G_GNUC_CONST;
216
gboolean unity_music_lens_simple_scope_is_search_empty (UnityMusicLensSimpleScope* self, UnityLensSearch* search);
217
void unity_music_lens_banshee_collection_search (UnityMusicLensBansheeCollection* self, UnityLensSearch* search, UnitySearchType search_type, GList* filters, gint max_results, gint category_override);
218
static void unity_music_lens_banshee_scope_proxy_finalize (GObject* obj);
219
gint unity_music_lens_simple_scope_get_num_results_without_search (UnityMusicLensSimpleScope* self);
220
gint unity_music_lens_simple_scope_get_num_results_global_search (UnityMusicLensSimpleScope* self);
221
gint unity_music_lens_simple_scope_get_num_results_lens_search (UnityMusicLensSimpleScope* self);
222
static void _vala_unity_music_lens_banshee_scope_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
223
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
224
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
225
static gint _vala_array_length (gpointer array);
228
static UnityActivationResponse* _unity_music_lens_banshee_scope_proxy_activate_unity_scope_activate_uri (UnityScope* _sender, const gchar* uri, gpointer self) {
229
UnityActivationResponse* result;
230
result = unity_music_lens_banshee_scope_proxy_activate (self, uri);
235
static UnityPreview* _unity_music_lens_banshee_scope_proxy_preview_unity_scope_preview_uri (UnityScope* _sender, const gchar* uri, gpointer self) {
236
UnityPreview* result;
237
result = unity_music_lens_banshee_scope_proxy_preview (self, uri);
242
UnityMusicLensBansheeScopeProxy* unity_music_lens_banshee_scope_proxy_construct (GType object_type) {
243
UnityMusicLensBansheeScopeProxy * self = NULL;
254
UnityOptionsFilter* _tmp10_;
255
UnityOptionsFilter* _tmp11_;
256
const gchar* _tmp12_ = NULL;
257
UnityFilterOption* _tmp13_ = NULL;
258
UnityFilterOption* _tmp14_;
259
GError * _inner_error_ = NULL;
260
self = (UnityMusicLensBansheeScopeProxy*) unity_music_lens_simple_scope_construct (object_type);
261
_tmp0_ = unity_scope_new ("/com/canonical/unity/scope/banshee");
263
unity_music_lens_simple_scope_set_scope ((UnityMusicLensSimpleScope*) self, _tmp1_);
264
_g_object_unref0 (_tmp1_);
265
_tmp2_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self);
267
unity_scope_set_search_in_global (_tmp3_, TRUE);
268
_tmp4_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self);
270
g_signal_connect_object (_tmp5_, "activate-uri", (GCallback) _unity_music_lens_banshee_scope_proxy_activate_unity_scope_activate_uri, self, 0);
271
_tmp6_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self);
273
g_signal_connect_object (_tmp7_, "preview-uri", (GCallback) _unity_music_lens_banshee_scope_proxy_preview_unity_scope_preview_uri, self, 0);
274
_tmp8_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self);
276
_tmp10_ = unity_scope_get_sources (_tmp9_);
278
_tmp12_ = _ ("Banshee");
279
_tmp13_ = unity_options_filter_add_option (_tmp11_, "banshee", _tmp12_, NULL);
281
_g_object_unref0 (_tmp14_);
282
unity_music_lens_simple_scope_initialize (UNITY_MUSIC_LENS_SIMPLE_SCOPE (self));
284
UnityMusicLensBansheeCollection* _tmp15_;
285
UnityMusicLensBansheeCollection* _tmp16_;
286
_tmp15_ = unity_music_lens_banshee_collection_new (&_inner_error_);
288
if (_inner_error_ != NULL) {
289
if (_inner_error_->domain == UNITY_MUSIC_LENS_DATABASE_ERROR) {
290
goto __catch0_unity_music_lens_database_error;
292
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);
293
g_clear_error (&_inner_error_);
296
_g_object_unref0 (self->priv->collection);
297
self->priv->collection = _tmp16_;
300
__catch0_unity_music_lens_database_error:
302
GError* _error_ = NULL;
303
_error_ = _inner_error_;
304
_inner_error_ = NULL;
305
g_printerr ("Failed to open the Banshee collection database\n");
306
_g_error_free0 (_error_);
310
if (_inner_error_ != NULL) {
311
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);
312
g_clear_error (&_inner_error_);
319
UnityMusicLensBansheeScopeProxy* unity_music_lens_banshee_scope_proxy_new (void) {
320
return unity_music_lens_banshee_scope_proxy_construct (UNITY_MUSIC_LENS_TYPE_BANSHEE_SCOPE_PROXY);
324
static void _g_object_unref0_ (gpointer var) {
325
(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
329
static void _g_slist_free__g_object_unref0_ (GSList* self) {
330
g_slist_foreach (self, (GFunc) _g_object_unref0_, NULL);
335
UnityPreview* unity_music_lens_banshee_scope_proxy_preview (UnityMusicLensBansheeScopeProxy* self, const gchar* uri) {
336
UnityPreview* result = NULL;
337
UnityMusicPreview* preview;
338
GThemedIcon* icon_file;
340
gchar* _tmp1_ = NULL;
343
g_return_val_if_fail (self != NULL, NULL);
344
g_return_val_if_fail (uri != NULL, NULL);
348
_tmp1_ = g_uri_parse_scheme (_tmp0_);
350
_tmp3_ = g_strcmp0 (_tmp2_, "album") == 0;
355
gchar** _tmp6_ = NULL;
365
gint _tmp10__length1;
366
const gchar* _tmp11_;
369
UnityMusicLensBansheeCollection* _tmp13_;
370
const gchar* _tmp14_;
371
const gchar* _tmp15_;
372
GSList* _tmp16_ = NULL;
374
_tmp6_ = _tmp5_ = g_strsplit (_tmp4_, "/", 0);
376
split_length1 = _vala_array_length (_tmp5_);
377
_split_size_ = split_length1;
379
_tmp7__length1 = split_length1;
381
_tmp9_ = g_strdup (_tmp8_);
384
_tmp10__length1 = split_length1;
385
_tmp11_ = _tmp10_[3];
386
_tmp12_ = g_strdup (_tmp11_);
388
_tmp13_ = self->priv->collection;
391
_tmp16_ = unity_music_lens_banshee_collection_get_album_tracks_detailed (_tmp13_, _tmp14_, _tmp15_);
393
GSList* track_collection = NULL;
394
GSList* track_it = NULL;
395
track_collection = _tmp16_;
396
for (track_it = track_collection; track_it != NULL; track_it = track_it->next) {
397
UnityMusicLensTrack* track = NULL;
398
track = (UnityMusicLensTrack*) track_it->data;
400
UnityMusicPreview* _tmp17_;
401
UnityTrackMetadata* _tmp29_;
402
UnityTrackMetadata* tm;
403
UnityTrackMetadata* _tmp30_;
404
UnityMusicLensTrack* _tmp31_;
405
const gchar* _tmp32_;
406
const gchar* _tmp33_;
407
UnityTrackMetadata* _tmp34_;
408
UnityMusicLensTrack* _tmp35_;
411
UnityMusicLensTrack* _tmp38_;
412
const gchar* _tmp39_;
413
const gchar* _tmp40_;
416
const gchar* _tmp43_;
417
UnityTrackMetadata* _tmp45_;
418
const gchar* _tmp46_;
419
UnityTrackMetadata* _tmp47_;
420
UnityMusicLensTrack* _tmp48_;
423
UnityMusicPreview* _tmp51_;
424
UnityTrackMetadata* _tmp52_;
426
if (_tmp17_ == NULL) {
427
UnityMusicLensTrack* _tmp18_;
428
const gchar* _tmp19_;
429
const gchar* _tmp20_;
430
const gchar* _tmp25_;
431
const gchar* _tmp26_;
432
GThemedIcon* _tmp27_;
433
UnityMusicPreview* _tmp28_;
435
_tmp19_ = unity_music_lens_track_get_artwork_path (_tmp18_);
437
if (_tmp20_ != NULL) {
438
UnityMusicLensTrack* _tmp21_;
439
const gchar* _tmp22_;
440
const gchar* _tmp23_;
441
GThemedIcon* _tmp24_;
443
_tmp22_ = unity_music_lens_track_get_artwork_path (_tmp21_);
445
_tmp24_ = (GThemedIcon*) g_themed_icon_new (_tmp23_);
446
_g_object_unref0 (icon_file);
452
_tmp28_ = unity_music_preview_new (_tmp25_, _tmp26_, (GIcon*) _tmp27_);
453
_g_object_unref0 (preview);
456
_tmp29_ = unity_track_metadata_new ();
460
_tmp32_ = unity_music_lens_track_get_uri (_tmp31_);
462
unity_track_metadata_set_uri (_tmp30_, _tmp33_);
465
_tmp36_ = unity_music_lens_track_get_track_number (_tmp35_);
467
unity_track_metadata_set_track_no (_tmp34_, _tmp37_);
469
_tmp39_ = unity_music_lens_track_get_title (_tmp38_);
471
_tmp41_ = g_strdup (_tmp40_);
474
if (_tmp43_ == NULL) {
476
_tmp44_ = g_strdup ("");
482
unity_track_metadata_set_title (_tmp45_, _tmp46_);
485
_tmp49_ = unity_music_lens_track_get_duration (_tmp48_);
487
unity_track_metadata_set_length (_tmp47_, (guint) _tmp50_);
490
unity_music_preview_add_track (_tmp51_, _tmp52_);
492
_g_object_unref0 (tm);
495
__g_slist_free__g_object_unref0_0 (track_collection);
499
split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL);
501
UnityMusicLensBansheeCollection* _tmp53_;
502
const gchar* _tmp54_;
503
UnityMusicLensTrack* _tmp55_ = NULL;
504
UnityMusicLensTrack* track;
505
UnityMusicLensTrack* _tmp56_;
506
_tmp53_ = self->priv->collection;
508
_tmp55_ = unity_music_lens_banshee_collection_get_album_track (_tmp53_, _tmp54_);
511
if (_tmp56_ != NULL) {
512
UnityMusicLensTrack* _tmp57_;
513
const gchar* _tmp58_;
514
const gchar* _tmp59_;
515
UnityMusicLensTrack* _tmp64_;
516
const gchar* _tmp65_;
517
const gchar* _tmp66_;
518
UnityMusicLensTrack* _tmp67_;
519
const gchar* _tmp68_;
520
const gchar* _tmp69_;
521
GThemedIcon* _tmp70_;
522
UnityMusicPreview* _tmp71_;
523
UnityTrackMetadata* _tmp72_;
524
UnityTrackMetadata* tm;
525
UnityTrackMetadata* _tmp73_;
526
UnityMusicLensTrack* _tmp74_;
527
const gchar* _tmp75_;
528
const gchar* _tmp76_;
529
UnityTrackMetadata* _tmp77_;
530
UnityMusicLensTrack* _tmp78_;
533
UnityMusicLensTrack* _tmp81_;
534
const gchar* _tmp82_;
535
const gchar* _tmp83_;
538
const gchar* _tmp86_;
539
UnityTrackMetadata* _tmp88_;
540
const gchar* _tmp89_;
541
UnityTrackMetadata* _tmp90_;
542
UnityMusicLensTrack* _tmp91_;
545
UnityMusicPreview* _tmp94_;
546
UnityTrackMetadata* _tmp95_;
548
_tmp58_ = unity_music_lens_track_get_artwork_path (_tmp57_);
550
if (_tmp59_ != NULL) {
551
UnityMusicLensTrack* _tmp60_;
552
const gchar* _tmp61_;
553
const gchar* _tmp62_;
554
GThemedIcon* _tmp63_;
556
_tmp61_ = unity_music_lens_track_get_artwork_path (_tmp60_);
558
_tmp63_ = (GThemedIcon*) g_themed_icon_new (_tmp62_);
559
_g_object_unref0 (icon_file);
563
_tmp65_ = unity_music_lens_track_get_title (_tmp64_);
566
_tmp68_ = unity_music_lens_track_get_artist (_tmp67_);
569
_tmp71_ = unity_music_preview_new (_tmp66_, _tmp69_, (GIcon*) _tmp70_);
570
_g_object_unref0 (preview);
572
_tmp72_ = unity_track_metadata_new ();
576
_tmp75_ = unity_music_lens_track_get_uri (_tmp74_);
578
unity_track_metadata_set_uri (_tmp73_, _tmp76_);
581
_tmp79_ = unity_music_lens_track_get_track_number (_tmp78_);
583
unity_track_metadata_set_track_no (_tmp77_, _tmp80_);
585
_tmp82_ = unity_music_lens_track_get_title (_tmp81_);
587
_tmp84_ = g_strdup (_tmp83_);
590
if (_tmp86_ == NULL) {
592
_tmp87_ = g_strdup ("");
598
unity_track_metadata_set_title (_tmp88_, _tmp89_);
601
_tmp92_ = unity_music_lens_track_get_duration (_tmp91_);
603
unity_track_metadata_set_length (_tmp90_, (guint) _tmp93_);
606
unity_music_preview_add_track (_tmp94_, _tmp95_);
608
_g_object_unref0 (tm);
610
_g_object_unref0 (track);
612
result = (UnityPreview*) preview;
613
_g_object_unref0 (icon_file);
619
* Tells banshee to play the selected uri(s)
621
static const gchar* string_to_string (const gchar* self) {
622
const gchar* result = NULL;
623
g_return_val_if_fail (self != NULL, NULL);
629
static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value) {
630
if ((*length) == (*size)) {
631
*size = (*size) ? (2 * (*size)) : 4;
632
*array = g_renew (gchar*, *array, (*size) + 1);
634
(*array)[(*length)++] = value;
635
(*array)[*length] = NULL;
639
static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) {
640
if ((*length) == (*size)) {
641
*size = (*size) ? (2 * (*size)) : 4;
642
*array = g_renew (gchar*, *array, (*size) + 1);
644
(*array)[(*length)++] = value;
645
(*array)[*length] = NULL;
649
static void _vala_array_add3 (gchar*** array, int* length, int* size, gchar* value) {
650
if ((*length) == (*size)) {
651
*size = (*size) ? (2 * (*size)) : 4;
652
*array = g_renew (gchar*, *array, (*size) + 1);
654
(*array)[(*length)++] = value;
655
(*array)[*length] = NULL;
659
UnityActivationResponse* unity_music_lens_banshee_scope_proxy_activate (UnityMusicLensBansheeScopeProxy* self, const gchar* uri) {
660
UnityActivationResponse* result = NULL;
663
gchar** _tmp2_ = NULL;
667
GError * _inner_error_ = NULL;
668
g_return_val_if_fail (self != NULL, NULL);
669
g_return_val_if_fail (uri != NULL, NULL);
670
_tmp0_ = g_strdup ("banshee");
671
_tmp1_ = g_strdup ("--play-enqueued");
672
_tmp2_ = g_new0 (gchar*, 2 + 1);
677
_exec_size_ = exec_length1;
680
gchar* _tmp4_ = NULL;
684
gint _tmp36__length1;
686
gint _tmp37__length1;
687
gchar* _tmp38_ = NULL;
690
gint _tmp40__length1;
691
UnityActivationResponse* _tmp41_;
692
UnityActivationResponse* _tmp42_;
694
_tmp4_ = g_uri_parse_scheme (_tmp3_);
696
_tmp6_ = g_strcmp0 (_tmp5_, "album") == 0;
700
const gchar* _tmp8_ = NULL;
701
gchar* _tmp9_ = NULL;
703
const gchar* _tmp11_;
705
gchar** _tmp13_ = NULL;
710
gint _tmp14__length1;
711
const gchar* _tmp15_;
715
gint _tmp17__length1;
716
const gchar* _tmp18_;
719
UnityMusicLensAlbum* _tmp20_;
720
UnityMusicLensAlbum* album;
721
UnityMusicLensAlbum* _tmp21_;
722
const gchar* _tmp22_;
723
UnityMusicLensAlbum* _tmp23_;
724
const gchar* _tmp24_;
725
UnityMusicLensBansheeCollection* _tmp25_;
726
UnityMusicLensAlbum* _tmp26_;
728
gchar** _tmp28_ = NULL;
730
_tmp8_ = string_to_string (_tmp7_);
731
_tmp9_ = g_strconcat ("searching for tracks for ", _tmp8_, NULL);
733
g_debug ("banshee-scope.vala:113: %s", _tmp10_);
736
_tmp13_ = _tmp12_ = g_strsplit (_tmp11_, "/", 0);
738
split_length1 = _vala_array_length (_tmp12_);
739
_split_size_ = split_length1;
741
_tmp14__length1 = split_length1;
742
_tmp15_ = _tmp14_[2];
743
_tmp16_ = g_strdup (_tmp15_);
746
_tmp17__length1 = split_length1;
747
_tmp18_ = _tmp17_[3];
748
_tmp19_ = g_strdup (_tmp18_);
750
_tmp20_ = unity_music_lens_album_new ();
754
unity_music_lens_album_set_artist (_tmp21_, _tmp22_);
757
unity_music_lens_album_set_title (_tmp23_, _tmp24_);
758
_tmp25_ = self->priv->collection;
760
_tmp28_ = unity_music_lens_banshee_collection_get_track_uris (_tmp25_, _tmp26_, &_tmp27_);
762
gchar** track_collection = NULL;
763
gint track_collection_length1 = 0;
764
gint _track_collection_size_ = 0;
766
track_collection = _tmp28_;
767
track_collection_length1 = _tmp27_;
768
for (track_it = 0; track_it < _tmp27_; track_it = track_it + 1) {
771
_tmp29_ = g_strdup (track_collection[track_it]);
775
gint _tmp30__length1;
776
const gchar* _tmp31_;
779
_tmp30__length1 = exec_length1;
781
_tmp32_ = g_strdup (_tmp31_);
782
_vala_array_add1 (&exec, &exec_length1, &_exec_size_, _tmp32_);
786
track_collection = (_vala_array_free (track_collection, track_collection_length1, (GDestroyNotify) g_free), NULL);
788
_g_object_unref0 (album);
791
split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL);
794
gint _tmp33__length1;
795
const gchar* _tmp34_;
798
_tmp33__length1 = exec_length1;
800
_tmp35_ = g_strdup (_tmp34_);
801
_vala_array_add2 (&exec, &exec_length1, &_exec_size_, _tmp35_);
804
_tmp36__length1 = exec_length1;
805
_vala_array_add3 (&exec, &exec_length1, &_exec_size_, NULL);
807
_tmp37__length1 = exec_length1;
808
_tmp38_ = g_strjoinv (" ", _tmp37_);
810
g_debug ("banshee-scope.vala:132: Spawning banshee '%s'", _tmp39_);
813
_tmp40__length1 = exec_length1;
814
g_spawn_async (NULL, _tmp40_, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &_inner_error_);
815
if (_inner_error_ != NULL) {
816
if (_inner_error_->domain == G_SPAWN_ERROR) {
817
goto __catch1_g_spawn_error;
819
exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL);
820
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);
821
g_clear_error (&_inner_error_);
824
_tmp41_ = unity_activation_response_new (UNITY_HANDLED_TYPE_HIDE_DASH, "");
825
_tmp42_ = g_object_ref_sink (_tmp41_);
827
exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL);
831
__catch1_g_spawn_error:
833
GError* _error_ = NULL;
834
const gchar* _tmp43_;
835
UnityActivationResponse* _tmp44_;
836
UnityActivationResponse* _tmp45_;
837
_error_ = _inner_error_;
838
_inner_error_ = NULL;
840
g_warning ("banshee-scope.vala:142: Failed to launch URI %s", _tmp43_);
841
_tmp44_ = unity_activation_response_new (UNITY_HANDLED_TYPE_NOT_HANDLED, "");
842
_tmp45_ = g_object_ref_sink (_tmp44_);
844
_g_error_free0 (_error_);
845
exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL);
849
exec = (_vala_array_free (exec, exec_length1, (GDestroyNotify) g_free), NULL);
850
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);
851
g_clear_error (&_inner_error_);
856
static void _g_list_free__g_object_unref0_ (GList* self) {
857
g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
862
static void unity_music_lens_banshee_scope_proxy_real_perform_search_data_free (gpointer _data) {
863
UnityMusicLensBansheeScopeProxyPerformSearchData* _data_;
865
_g_object_unref0 (_data_->search);
866
__g_list_free__g_object_unref0_0 (_data_->filters);
867
_g_object_unref0 (_data_->cancellable);
868
_g_object_unref0 (_data_->self);
869
g_slice_free (UnityMusicLensBansheeScopeProxyPerformSearchData, _data_);
873
static gpointer _g_object_ref0 (gpointer self) {
874
return self ? g_object_ref (self) : NULL;
878
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_) {
879
UnityMusicLensBansheeScopeProxy * self;
880
UnityMusicLensBansheeScopeProxyPerformSearchData* _data_;
881
UnityMusicLensBansheeScopeProxy* _tmp0_;
882
UnityLensSearch* _tmp1_;
883
UnityLensSearch* _tmp2_;
884
UnitySearchType _tmp3_;
887
GCancellable* _tmp6_;
888
GCancellable* _tmp7_;
889
self = (UnityMusicLensBansheeScopeProxy*) base;
890
_data_ = g_slice_new0 (UnityMusicLensBansheeScopeProxyPerformSearchData);
891
_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_music_lens_banshee_scope_proxy_real_perform_search);
892
g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_music_lens_banshee_scope_proxy_real_perform_search_data_free);
893
_tmp0_ = _g_object_ref0 (self);
894
_data_->self = _tmp0_;
896
_tmp2_ = _g_object_ref0 (_tmp1_);
897
_data_->search = _tmp2_;
898
_tmp3_ = search_type;
899
_data_->search_type = _tmp3_;
901
__g_list_free__g_object_unref0_0 (_data_->filters);
902
_data_->filters = _tmp4_;
903
_tmp5_ = max_results;
904
_data_->max_results = _tmp5_;
905
_tmp6_ = cancellable;
906
_tmp7_ = _g_object_ref0 (_tmp6_);
907
_data_->cancellable = _tmp7_;
908
unity_music_lens_banshee_scope_proxy_real_perform_search_co (_data_);
912
static void unity_music_lens_banshee_scope_proxy_real_perform_search_finish (UnityMusicLensSimpleScope* base, GAsyncResult* _res_) {
913
UnityMusicLensBansheeScopeProxyPerformSearchData* _data_;
914
_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
918
static gboolean unity_music_lens_banshee_scope_proxy_real_perform_search_co (UnityMusicLensBansheeScopeProxyPerformSearchData* _data_) {
919
switch (_data_->_state_) {
923
g_assert_not_reached ();
926
_data_->category_override = -1;
927
_data_->_tmp0_ = _data_->search_type;
928
if (_data_->_tmp0_ == UNITY_SEARCH_TYPE_GLOBAL) {
929
_data_->category_override = (gint) UNITY_MUSIC_LENS_CATEGORY_MUSIC;
930
_data_->_tmp1_ = _data_->search;
931
_data_->_tmp2_ = FALSE;
932
_data_->_tmp2_ = unity_music_lens_simple_scope_is_search_empty ((UnityMusicLensSimpleScope*) _data_->self, _data_->_tmp1_);
933
if (_data_->_tmp2_) {
934
__g_list_free__g_object_unref0_0 (_data_->filters);
935
if (_data_->_state_ == 0) {
936
g_simple_async_result_complete_in_idle (_data_->_async_result);
938
g_simple_async_result_complete (_data_->_async_result);
940
g_object_unref (_data_->_async_result);
944
_data_->_tmp3_ = _data_->self->priv->collection;
945
_data_->_tmp4_ = _data_->search;
946
_data_->_tmp5_ = _data_->search_type;
947
_data_->_tmp6_ = _data_->filters;
948
_data_->_tmp7_ = _data_->max_results;
949
_data_->_tmp8_ = _data_->category_override;
950
unity_music_lens_banshee_collection_search (_data_->_tmp3_, _data_->_tmp4_, _data_->_tmp5_, _data_->_tmp6_, _data_->_tmp7_, _data_->_tmp8_);
951
__g_list_free__g_object_unref0_0 (_data_->filters);
952
if (_data_->_state_ == 0) {
953
g_simple_async_result_complete_in_idle (_data_->_async_result);
955
g_simple_async_result_complete (_data_->_async_result);
957
g_object_unref (_data_->_async_result);
962
static gint unity_music_lens_banshee_scope_proxy_real_get_num_results_without_search (UnityMusicLensSimpleScope* base) {
964
UnityMusicLensBansheeScopeProxy* self;
965
self = (UnityMusicLensBansheeScopeProxy*) base;
971
static gint unity_music_lens_banshee_scope_proxy_real_get_num_results_global_search (UnityMusicLensSimpleScope* base) {
973
UnityMusicLensBansheeScopeProxy* self;
974
self = (UnityMusicLensBansheeScopeProxy*) base;
980
static gint unity_music_lens_banshee_scope_proxy_real_get_num_results_lens_search (UnityMusicLensSimpleScope* base) {
982
UnityMusicLensBansheeScopeProxy* self;
983
self = (UnityMusicLensBansheeScopeProxy*) base;
989
static void unity_music_lens_banshee_scope_proxy_class_init (UnityMusicLensBansheeScopeProxyClass * klass) {
990
unity_music_lens_banshee_scope_proxy_parent_class = g_type_class_peek_parent (klass);
991
g_type_class_add_private (klass, sizeof (UnityMusicLensBansheeScopeProxyPrivate));
992
UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->perform_search = unity_music_lens_banshee_scope_proxy_real_perform_search;
993
UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->perform_search_finish = unity_music_lens_banshee_scope_proxy_real_perform_search_finish;
994
UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->get_num_results_without_search = unity_music_lens_banshee_scope_proxy_real_get_num_results_without_search;
995
UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->get_num_results_global_search = unity_music_lens_banshee_scope_proxy_real_get_num_results_global_search;
996
UNITY_MUSIC_LENS_SIMPLE_SCOPE_CLASS (klass)->get_num_results_lens_search = unity_music_lens_banshee_scope_proxy_real_get_num_results_lens_search;
997
G_OBJECT_CLASS (klass)->get_property = _vala_unity_music_lens_banshee_scope_proxy_get_property;
998
G_OBJECT_CLASS (klass)->finalize = unity_music_lens_banshee_scope_proxy_finalize;
999
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));
1000
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));
1001
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));
1005
static void unity_music_lens_banshee_scope_proxy_instance_init (UnityMusicLensBansheeScopeProxy * self) {
1006
self->priv = UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_GET_PRIVATE (self);
1010
static void unity_music_lens_banshee_scope_proxy_finalize (GObject* obj) {
1011
UnityMusicLensBansheeScopeProxy * self;
1012
self = UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY (obj);
1013
_g_object_unref0 (self->priv->collection);
1014
G_OBJECT_CLASS (unity_music_lens_banshee_scope_proxy_parent_class)->finalize (obj);
1018
GType unity_music_lens_banshee_scope_proxy_get_type (void) {
1019
static volatile gsize unity_music_lens_banshee_scope_proxy_type_id__volatile = 0;
1020
if (g_once_init_enter (&unity_music_lens_banshee_scope_proxy_type_id__volatile)) {
1021
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 };
1022
GType unity_music_lens_banshee_scope_proxy_type_id;
1023
unity_music_lens_banshee_scope_proxy_type_id = g_type_register_static (UNITY_MUSIC_LENS_TYPE_SIMPLE_SCOPE, "UnityMusicLensBansheeScopeProxy", &g_define_type_info, 0);
1024
g_once_init_leave (&unity_music_lens_banshee_scope_proxy_type_id__volatile, unity_music_lens_banshee_scope_proxy_type_id);
1026
return unity_music_lens_banshee_scope_proxy_type_id__volatile;
1030
static void _vala_unity_music_lens_banshee_scope_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
1031
UnityMusicLensBansheeScopeProxy * self;
1032
self = UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY (object);
1033
switch (property_id) {
1034
case UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_WITHOUT_SEARCH:
1035
g_value_set_int (value, unity_music_lens_simple_scope_get_num_results_without_search ((UnityMusicLensSimpleScope*) self));
1037
case UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_GLOBAL_SEARCH:
1038
g_value_set_int (value, unity_music_lens_simple_scope_get_num_results_global_search ((UnityMusicLensSimpleScope*) self));
1040
case UNITY_MUSIC_LENS_BANSHEE_SCOPE_PROXY_NUM_RESULTS_LENS_SEARCH:
1041
g_value_set_int (value, unity_music_lens_simple_scope_get_num_results_lens_search ((UnityMusicLensSimpleScope*) self));
1044
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
1050
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1051
if ((array != NULL) && (destroy_func != NULL)) {
1053
for (i = 0; i < array_length; i = i + 1) {
1054
if (((gpointer*) array)[i] != NULL) {
1055
destroy_func (((gpointer*) array)[i]);
1062
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1063
_vala_array_destroy (array, array_length, destroy_func);
1068
static gint _vala_array_length (gpointer array) {
1072
while (((gpointer*) array)[length]) {