1
/* album.c generated by valac 0.16.1, the Vala compiler
2
* generated from album.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
#define UNITY_MUSIC_LENS_TYPE_ALBUM (unity_music_lens_album_get_type ())
30
#define UNITY_MUSIC_LENS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbum))
31
#define UNITY_MUSIC_LENS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbumClass))
32
#define UNITY_MUSIC_LENS_IS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_ALBUM))
33
#define UNITY_MUSIC_LENS_IS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_ALBUM))
34
#define UNITY_MUSIC_LENS_ALBUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbumClass))
36
typedef struct _UnityMusicLensAlbum UnityMusicLensAlbum;
37
typedef struct _UnityMusicLensAlbumClass UnityMusicLensAlbumClass;
38
typedef struct _UnityMusicLensAlbumPrivate UnityMusicLensAlbumPrivate;
39
#define _g_free0(var) (var = (g_free (var), NULL))
41
struct _UnityMusicLensAlbum {
42
GObject parent_instance;
43
UnityMusicLensAlbumPrivate * priv;
46
struct _UnityMusicLensAlbumClass {
47
GObjectClass parent_class;
50
struct _UnityMusicLensAlbumPrivate {
58
static gpointer unity_music_lens_album_parent_class = NULL;
60
GType unity_music_lens_album_get_type (void) G_GNUC_CONST;
61
#define UNITY_MUSIC_LENS_ALBUM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_MUSIC_LENS_TYPE_ALBUM, UnityMusicLensAlbumPrivate))
63
UNITY_MUSIC_LENS_ALBUM_DUMMY_PROPERTY,
64
UNITY_MUSIC_LENS_ALBUM_TITLE,
65
UNITY_MUSIC_LENS_ALBUM_ARTIST,
66
UNITY_MUSIC_LENS_ALBUM_URI,
67
UNITY_MUSIC_LENS_ALBUM_ARTWORK_PATH
69
UnityMusicLensAlbum* unity_music_lens_album_new (void);
70
UnityMusicLensAlbum* unity_music_lens_album_construct (GType object_type);
71
const gchar* unity_music_lens_album_get_title (UnityMusicLensAlbum* self);
72
void unity_music_lens_album_set_title (UnityMusicLensAlbum* self, const gchar* value);
73
const gchar* unity_music_lens_album_get_artist (UnityMusicLensAlbum* self);
74
void unity_music_lens_album_set_artist (UnityMusicLensAlbum* self, const gchar* value);
75
const gchar* unity_music_lens_album_get_uri (UnityMusicLensAlbum* self);
76
void unity_music_lens_album_set_uri (UnityMusicLensAlbum* self, const gchar* value);
77
const gchar* unity_music_lens_album_get_artwork_path (UnityMusicLensAlbum* self);
78
void unity_music_lens_album_set_artwork_path (UnityMusicLensAlbum* self, const gchar* value);
79
static void unity_music_lens_album_finalize (GObject* obj);
80
static void _vala_unity_music_lens_album_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
81
static void _vala_unity_music_lens_album_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
84
UnityMusicLensAlbum* unity_music_lens_album_construct (GType object_type) {
85
UnityMusicLensAlbum * self = NULL;
86
self = (UnityMusicLensAlbum*) g_object_new (object_type, NULL);
91
UnityMusicLensAlbum* unity_music_lens_album_new (void) {
92
return unity_music_lens_album_construct (UNITY_MUSIC_LENS_TYPE_ALBUM);
96
const gchar* unity_music_lens_album_get_title (UnityMusicLensAlbum* self) {
99
g_return_val_if_fail (self != NULL, NULL);
100
_tmp0_ = self->priv->_title;
106
void unity_music_lens_album_set_title (UnityMusicLensAlbum* self, const gchar* value) {
109
g_return_if_fail (self != NULL);
111
_tmp1_ = g_strdup (_tmp0_);
112
_g_free0 (self->priv->_title);
113
self->priv->_title = _tmp1_;
114
g_object_notify ((GObject *) self, "title");
118
const gchar* unity_music_lens_album_get_artist (UnityMusicLensAlbum* self) {
121
g_return_val_if_fail (self != NULL, NULL);
122
_tmp0_ = self->priv->_artist;
128
void unity_music_lens_album_set_artist (UnityMusicLensAlbum* self, const gchar* value) {
131
g_return_if_fail (self != NULL);
133
_tmp1_ = g_strdup (_tmp0_);
134
_g_free0 (self->priv->_artist);
135
self->priv->_artist = _tmp1_;
136
g_object_notify ((GObject *) self, "artist");
140
const gchar* unity_music_lens_album_get_uri (UnityMusicLensAlbum* self) {
143
g_return_val_if_fail (self != NULL, NULL);
144
_tmp0_ = self->priv->_uri;
150
void unity_music_lens_album_set_uri (UnityMusicLensAlbum* self, const gchar* value) {
153
g_return_if_fail (self != NULL);
155
_tmp1_ = g_strdup (_tmp0_);
156
_g_free0 (self->priv->_uri);
157
self->priv->_uri = _tmp1_;
158
g_object_notify ((GObject *) self, "uri");
162
const gchar* unity_music_lens_album_get_artwork_path (UnityMusicLensAlbum* self) {
165
g_return_val_if_fail (self != NULL, NULL);
166
_tmp0_ = self->priv->_artwork_path;
172
void unity_music_lens_album_set_artwork_path (UnityMusicLensAlbum* self, const gchar* value) {
175
g_return_if_fail (self != NULL);
177
_tmp1_ = g_strdup (_tmp0_);
178
_g_free0 (self->priv->_artwork_path);
179
self->priv->_artwork_path = _tmp1_;
180
g_object_notify ((GObject *) self, "artwork-path");
184
static void unity_music_lens_album_class_init (UnityMusicLensAlbumClass * klass) {
185
unity_music_lens_album_parent_class = g_type_class_peek_parent (klass);
186
g_type_class_add_private (klass, sizeof (UnityMusicLensAlbumPrivate));
187
G_OBJECT_CLASS (klass)->get_property = _vala_unity_music_lens_album_get_property;
188
G_OBJECT_CLASS (klass)->set_property = _vala_unity_music_lens_album_set_property;
189
G_OBJECT_CLASS (klass)->finalize = unity_music_lens_album_finalize;
190
g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_ALBUM_TITLE, g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
191
g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_ALBUM_ARTIST, g_param_spec_string ("artist", "artist", "artist", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
192
g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_ALBUM_URI, g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
193
g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_ALBUM_ARTWORK_PATH, g_param_spec_string ("artwork-path", "artwork-path", "artwork-path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
197
static void unity_music_lens_album_instance_init (UnityMusicLensAlbum * self) {
198
self->priv = UNITY_MUSIC_LENS_ALBUM_GET_PRIVATE (self);
202
static void unity_music_lens_album_finalize (GObject* obj) {
203
UnityMusicLensAlbum * self;
204
self = UNITY_MUSIC_LENS_ALBUM (obj);
205
_g_free0 (self->priv->_title);
206
_g_free0 (self->priv->_artist);
207
_g_free0 (self->priv->_uri);
208
_g_free0 (self->priv->_artwork_path);
209
G_OBJECT_CLASS (unity_music_lens_album_parent_class)->finalize (obj);
213
GType unity_music_lens_album_get_type (void) {
214
static volatile gsize unity_music_lens_album_type_id__volatile = 0;
215
if (g_once_init_enter (&unity_music_lens_album_type_id__volatile)) {
216
static const GTypeInfo g_define_type_info = { sizeof (UnityMusicLensAlbumClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_music_lens_album_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityMusicLensAlbum), 0, (GInstanceInitFunc) unity_music_lens_album_instance_init, NULL };
217
GType unity_music_lens_album_type_id;
218
unity_music_lens_album_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityMusicLensAlbum", &g_define_type_info, 0);
219
g_once_init_leave (&unity_music_lens_album_type_id__volatile, unity_music_lens_album_type_id);
221
return unity_music_lens_album_type_id__volatile;
225
static void _vala_unity_music_lens_album_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
226
UnityMusicLensAlbum * self;
227
self = UNITY_MUSIC_LENS_ALBUM (object);
228
switch (property_id) {
229
case UNITY_MUSIC_LENS_ALBUM_TITLE:
230
g_value_set_string (value, unity_music_lens_album_get_title (self));
232
case UNITY_MUSIC_LENS_ALBUM_ARTIST:
233
g_value_set_string (value, unity_music_lens_album_get_artist (self));
235
case UNITY_MUSIC_LENS_ALBUM_URI:
236
g_value_set_string (value, unity_music_lens_album_get_uri (self));
238
case UNITY_MUSIC_LENS_ALBUM_ARTWORK_PATH:
239
g_value_set_string (value, unity_music_lens_album_get_artwork_path (self));
242
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
248
static void _vala_unity_music_lens_album_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
249
UnityMusicLensAlbum * self;
250
self = UNITY_MUSIC_LENS_ALBUM (object);
251
switch (property_id) {
252
case UNITY_MUSIC_LENS_ALBUM_TITLE:
253
unity_music_lens_album_set_title (self, g_value_get_string (value));
255
case UNITY_MUSIC_LENS_ALBUM_ARTIST:
256
unity_music_lens_album_set_artist (self, g_value_get_string (value));
258
case UNITY_MUSIC_LENS_ALBUM_URI:
259
unity_music_lens_album_set_uri (self, g_value_get_string (value));
261
case UNITY_MUSIC_LENS_ALBUM_ARTWORK_PATH:
262
unity_music_lens_album_set_artwork_path (self, g_value_get_string (value));
265
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);