Back to index

unity-lens-music  6.0.0
track.c
Go to the documentation of this file.
00001 /* track.c generated by valac 0.14.2, the Vala compiler
00002  * generated from track.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 <stdlib.h>
00026 #include <string.h>
00027 
00028 
00029 #define UNITY_MUSIC_LENS_TYPE_TRACK_TYPE (unity_music_lens_track_type_get_type ())
00030 
00031 #define UNITY_MUSIC_LENS_TYPE_TRACK (unity_music_lens_track_get_type ())
00032 #define UNITY_MUSIC_LENS_TRACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_TRACK, UnityMusicLensTrack))
00033 #define UNITY_MUSIC_LENS_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_TRACK, UnityMusicLensTrackClass))
00034 #define UNITY_MUSIC_LENS_IS_TRACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_TRACK))
00035 #define UNITY_MUSIC_LENS_IS_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_TRACK))
00036 #define UNITY_MUSIC_LENS_TRACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_TRACK, UnityMusicLensTrackClass))
00037 
00038 typedef struct _UnityMusicLensTrack UnityMusicLensTrack;
00039 typedef struct _UnityMusicLensTrackClass UnityMusicLensTrackClass;
00040 typedef struct _UnityMusicLensTrackPrivate UnityMusicLensTrackPrivate;
00041 #define _g_free0(var) (var = (g_free (var), NULL))
00042 
00043 typedef enum  {
00044        UNITY_MUSIC_LENS_TRACK_TYPE_SONG,
00045        UNITY_MUSIC_LENS_TRACK_TYPE_RADIO
00046 } UnityMusicLensTrackType;
00047 
00048 struct _UnityMusicLensTrack {
00049        GObject parent_instance;
00050        UnityMusicLensTrackPrivate * priv;
00051 };
00052 
00053 struct _UnityMusicLensTrackClass {
00054        GObjectClass parent_class;
00055 };
00056 
00057 struct _UnityMusicLensTrackPrivate {
00058        UnityMusicLensTrackType _type_track;
00059        gchar* _title;
00060        gchar* _uri;
00061        gchar* _artist;
00062        gchar* _mime_type;
00063        gchar* _artwork_path;
00064        gchar* _album;
00065        gchar* _album_artist;
00066        gchar* _genre;
00067        gint _track_number;
00068        gint _year;
00069        gint _play_count;
00070 };
00071 
00072 
00073 static gpointer unity_music_lens_track_parent_class = NULL;
00074 
00075 GType unity_music_lens_track_type_get_type (void) G_GNUC_CONST;
00076 GType unity_music_lens_track_get_type (void) G_GNUC_CONST;
00077 #define UNITY_MUSIC_LENS_TRACK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_MUSIC_LENS_TYPE_TRACK, UnityMusicLensTrackPrivate))
00078 enum  {
00079        UNITY_MUSIC_LENS_TRACK_DUMMY_PROPERTY,
00080        UNITY_MUSIC_LENS_TRACK_TYPE_TRACK,
00081        UNITY_MUSIC_LENS_TRACK_TITLE,
00082        UNITY_MUSIC_LENS_TRACK_URI,
00083        UNITY_MUSIC_LENS_TRACK_ARTIST,
00084        UNITY_MUSIC_LENS_TRACK_MIME_TYPE,
00085        UNITY_MUSIC_LENS_TRACK_ARTWORK_PATH,
00086        UNITY_MUSIC_LENS_TRACK_ALBUM,
00087        UNITY_MUSIC_LENS_TRACK_ALBUM_ARTIST,
00088        UNITY_MUSIC_LENS_TRACK_GENRE,
00089        UNITY_MUSIC_LENS_TRACK_TRACK_NUMBER,
00090        UNITY_MUSIC_LENS_TRACK_YEAR,
00091        UNITY_MUSIC_LENS_TRACK_PLAY_COUNT
00092 };
00093 UnityMusicLensTrack* unity_music_lens_track_new (void);
00094 UnityMusicLensTrack* unity_music_lens_track_construct (GType object_type);
00095 UnityMusicLensTrackType unity_music_lens_track_get_type_track (UnityMusicLensTrack* self);
00096 void unity_music_lens_track_set_type_track (UnityMusicLensTrack* self, UnityMusicLensTrackType value);
00097 const gchar* unity_music_lens_track_get_title (UnityMusicLensTrack* self);
00098 void unity_music_lens_track_set_title (UnityMusicLensTrack* self, const gchar* value);
00099 const gchar* unity_music_lens_track_get_uri (UnityMusicLensTrack* self);
00100 void unity_music_lens_track_set_uri (UnityMusicLensTrack* self, const gchar* value);
00101 const gchar* unity_music_lens_track_get_artist (UnityMusicLensTrack* self);
00102 void unity_music_lens_track_set_artist (UnityMusicLensTrack* self, const gchar* value);
00103 const gchar* unity_music_lens_track_get_mime_type (UnityMusicLensTrack* self);
00104 void unity_music_lens_track_set_mime_type (UnityMusicLensTrack* self, const gchar* value);
00105 const gchar* unity_music_lens_track_get_artwork_path (UnityMusicLensTrack* self);
00106 void unity_music_lens_track_set_artwork_path (UnityMusicLensTrack* self, const gchar* value);
00107 const gchar* unity_music_lens_track_get_album (UnityMusicLensTrack* self);
00108 void unity_music_lens_track_set_album (UnityMusicLensTrack* self, const gchar* value);
00109 const gchar* unity_music_lens_track_get_album_artist (UnityMusicLensTrack* self);
00110 void unity_music_lens_track_set_album_artist (UnityMusicLensTrack* self, const gchar* value);
00111 const gchar* unity_music_lens_track_get_genre (UnityMusicLensTrack* self);
00112 void unity_music_lens_track_set_genre (UnityMusicLensTrack* self, const gchar* value);
00113 gint unity_music_lens_track_get_track_number (UnityMusicLensTrack* self);
00114 void unity_music_lens_track_set_track_number (UnityMusicLensTrack* self, gint value);
00115 gint unity_music_lens_track_get_year (UnityMusicLensTrack* self);
00116 void unity_music_lens_track_set_year (UnityMusicLensTrack* self, gint value);
00117 gint unity_music_lens_track_get_play_count (UnityMusicLensTrack* self);
00118 void unity_music_lens_track_set_play_count (UnityMusicLensTrack* self, gint value);
00119 static void unity_music_lens_track_finalize (GObject* obj);
00120 static void _vala_unity_music_lens_track_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00121 static void _vala_unity_music_lens_track_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00122 
00123 
00124 GType unity_music_lens_track_type_get_type (void) {
00125        static volatile gsize unity_music_lens_track_type_type_id__volatile = 0;
00126        if (g_once_init_enter (&unity_music_lens_track_type_type_id__volatile)) {
00127               static const GEnumValue values[] = {{UNITY_MUSIC_LENS_TRACK_TYPE_SONG, "UNITY_MUSIC_LENS_TRACK_TYPE_SONG", "song"}, {UNITY_MUSIC_LENS_TRACK_TYPE_RADIO, "UNITY_MUSIC_LENS_TRACK_TYPE_RADIO", "radio"}, {0, NULL, NULL}};
00128               GType unity_music_lens_track_type_type_id;
00129               unity_music_lens_track_type_type_id = g_enum_register_static ("UnityMusicLensTrackType", values);
00130               g_once_init_leave (&unity_music_lens_track_type_type_id__volatile, unity_music_lens_track_type_type_id);
00131        }
00132        return unity_music_lens_track_type_type_id__volatile;
00133 }
00134 
00135 
00136 UnityMusicLensTrack* unity_music_lens_track_construct (GType object_type) {
00137        UnityMusicLensTrack * self = NULL;
00138        self = (UnityMusicLensTrack*) g_object_new (object_type, NULL);
00139        return self;
00140 }
00141 
00142 
00143 UnityMusicLensTrack* unity_music_lens_track_new (void) {
00144        return unity_music_lens_track_construct (UNITY_MUSIC_LENS_TYPE_TRACK);
00145 }
00146 
00147 
00148 UnityMusicLensTrackType unity_music_lens_track_get_type_track (UnityMusicLensTrack* self) {
00149        UnityMusicLensTrackType result;
00150        UnityMusicLensTrackType _tmp0_;
00151        g_return_val_if_fail (self != NULL, 0);
00152        _tmp0_ = self->priv->_type_track;
00153        result = _tmp0_;
00154        return result;
00155 }
00156 
00157 
00158 void unity_music_lens_track_set_type_track (UnityMusicLensTrack* self, UnityMusicLensTrackType value) {
00159        UnityMusicLensTrackType _tmp0_;
00160        g_return_if_fail (self != NULL);
00161        _tmp0_ = value;
00162        self->priv->_type_track = _tmp0_;
00163        g_object_notify ((GObject *) self, "type-track");
00164 }
00165 
00166 
00167 const gchar* unity_music_lens_track_get_title (UnityMusicLensTrack* self) {
00168        const gchar* result;
00169        const gchar* _tmp0_;
00170        g_return_val_if_fail (self != NULL, NULL);
00171        _tmp0_ = self->priv->_title;
00172        result = _tmp0_;
00173        return result;
00174 }
00175 
00176 
00177 void unity_music_lens_track_set_title (UnityMusicLensTrack* self, const gchar* value) {
00178        const gchar* _tmp0_;
00179        gchar* _tmp1_;
00180        g_return_if_fail (self != NULL);
00181        _tmp0_ = value;
00182        _tmp1_ = g_strdup (_tmp0_);
00183        _g_free0 (self->priv->_title);
00184        self->priv->_title = _tmp1_;
00185        g_object_notify ((GObject *) self, "title");
00186 }
00187 
00188 
00189 const gchar* unity_music_lens_track_get_uri (UnityMusicLensTrack* self) {
00190        const gchar* result;
00191        const gchar* _tmp0_;
00192        g_return_val_if_fail (self != NULL, NULL);
00193        _tmp0_ = self->priv->_uri;
00194        result = _tmp0_;
00195        return result;
00196 }
00197 
00198 
00199 void unity_music_lens_track_set_uri (UnityMusicLensTrack* self, const gchar* value) {
00200        const gchar* _tmp0_;
00201        gchar* _tmp1_;
00202        g_return_if_fail (self != NULL);
00203        _tmp0_ = value;
00204        _tmp1_ = g_strdup (_tmp0_);
00205        _g_free0 (self->priv->_uri);
00206        self->priv->_uri = _tmp1_;
00207        g_object_notify ((GObject *) self, "uri");
00208 }
00209 
00210 
00211 const gchar* unity_music_lens_track_get_artist (UnityMusicLensTrack* self) {
00212        const gchar* result;
00213        const gchar* _tmp0_;
00214        g_return_val_if_fail (self != NULL, NULL);
00215        _tmp0_ = self->priv->_artist;
00216        result = _tmp0_;
00217        return result;
00218 }
00219 
00220 
00221 void unity_music_lens_track_set_artist (UnityMusicLensTrack* self, const gchar* value) {
00222        const gchar* _tmp0_;
00223        gchar* _tmp1_;
00224        g_return_if_fail (self != NULL);
00225        _tmp0_ = value;
00226        _tmp1_ = g_strdup (_tmp0_);
00227        _g_free0 (self->priv->_artist);
00228        self->priv->_artist = _tmp1_;
00229        g_object_notify ((GObject *) self, "artist");
00230 }
00231 
00232 
00233 const gchar* unity_music_lens_track_get_mime_type (UnityMusicLensTrack* self) {
00234        const gchar* result;
00235        const gchar* _tmp0_;
00236        g_return_val_if_fail (self != NULL, NULL);
00237        _tmp0_ = self->priv->_mime_type;
00238        result = _tmp0_;
00239        return result;
00240 }
00241 
00242 
00243 void unity_music_lens_track_set_mime_type (UnityMusicLensTrack* self, const gchar* value) {
00244        const gchar* _tmp0_;
00245        gchar* _tmp1_;
00246        g_return_if_fail (self != NULL);
00247        _tmp0_ = value;
00248        _tmp1_ = g_strdup (_tmp0_);
00249        _g_free0 (self->priv->_mime_type);
00250        self->priv->_mime_type = _tmp1_;
00251        g_object_notify ((GObject *) self, "mime-type");
00252 }
00253 
00254 
00255 const gchar* unity_music_lens_track_get_artwork_path (UnityMusicLensTrack* self) {
00256        const gchar* result;
00257        const gchar* _tmp0_;
00258        g_return_val_if_fail (self != NULL, NULL);
00259        _tmp0_ = self->priv->_artwork_path;
00260        result = _tmp0_;
00261        return result;
00262 }
00263 
00264 
00265 void unity_music_lens_track_set_artwork_path (UnityMusicLensTrack* self, const gchar* value) {
00266        const gchar* _tmp0_;
00267        gchar* _tmp1_;
00268        g_return_if_fail (self != NULL);
00269        _tmp0_ = value;
00270        _tmp1_ = g_strdup (_tmp0_);
00271        _g_free0 (self->priv->_artwork_path);
00272        self->priv->_artwork_path = _tmp1_;
00273        g_object_notify ((GObject *) self, "artwork-path");
00274 }
00275 
00276 
00277 const gchar* unity_music_lens_track_get_album (UnityMusicLensTrack* self) {
00278        const gchar* result;
00279        const gchar* _tmp0_;
00280        g_return_val_if_fail (self != NULL, NULL);
00281        _tmp0_ = self->priv->_album;
00282        result = _tmp0_;
00283        return result;
00284 }
00285 
00286 
00287 void unity_music_lens_track_set_album (UnityMusicLensTrack* self, const gchar* value) {
00288        const gchar* _tmp0_;
00289        gchar* _tmp1_;
00290        g_return_if_fail (self != NULL);
00291        _tmp0_ = value;
00292        _tmp1_ = g_strdup (_tmp0_);
00293        _g_free0 (self->priv->_album);
00294        self->priv->_album = _tmp1_;
00295        g_object_notify ((GObject *) self, "album");
00296 }
00297 
00298 
00299 const gchar* unity_music_lens_track_get_album_artist (UnityMusicLensTrack* self) {
00300        const gchar* result;
00301        const gchar* _tmp0_;
00302        g_return_val_if_fail (self != NULL, NULL);
00303        _tmp0_ = self->priv->_album_artist;
00304        result = _tmp0_;
00305        return result;
00306 }
00307 
00308 
00309 void unity_music_lens_track_set_album_artist (UnityMusicLensTrack* self, const gchar* value) {
00310        const gchar* _tmp0_;
00311        gchar* _tmp1_;
00312        g_return_if_fail (self != NULL);
00313        _tmp0_ = value;
00314        _tmp1_ = g_strdup (_tmp0_);
00315        _g_free0 (self->priv->_album_artist);
00316        self->priv->_album_artist = _tmp1_;
00317        g_object_notify ((GObject *) self, "album-artist");
00318 }
00319 
00320 
00321 const gchar* unity_music_lens_track_get_genre (UnityMusicLensTrack* self) {
00322        const gchar* result;
00323        const gchar* _tmp0_;
00324        g_return_val_if_fail (self != NULL, NULL);
00325        _tmp0_ = self->priv->_genre;
00326        result = _tmp0_;
00327        return result;
00328 }
00329 
00330 
00331 void unity_music_lens_track_set_genre (UnityMusicLensTrack* self, const gchar* value) {
00332        const gchar* _tmp0_;
00333        gchar* _tmp1_;
00334        g_return_if_fail (self != NULL);
00335        _tmp0_ = value;
00336        _tmp1_ = g_strdup (_tmp0_);
00337        _g_free0 (self->priv->_genre);
00338        self->priv->_genre = _tmp1_;
00339        g_object_notify ((GObject *) self, "genre");
00340 }
00341 
00342 
00343 gint unity_music_lens_track_get_track_number (UnityMusicLensTrack* self) {
00344        gint result;
00345        gint _tmp0_;
00346        g_return_val_if_fail (self != NULL, 0);
00347        _tmp0_ = self->priv->_track_number;
00348        result = _tmp0_;
00349        return result;
00350 }
00351 
00352 
00353 void unity_music_lens_track_set_track_number (UnityMusicLensTrack* self, gint value) {
00354        gint _tmp0_;
00355        g_return_if_fail (self != NULL);
00356        _tmp0_ = value;
00357        self->priv->_track_number = _tmp0_;
00358        g_object_notify ((GObject *) self, "track-number");
00359 }
00360 
00361 
00362 gint unity_music_lens_track_get_year (UnityMusicLensTrack* self) {
00363        gint result;
00364        gint _tmp0_;
00365        g_return_val_if_fail (self != NULL, 0);
00366        _tmp0_ = self->priv->_year;
00367        result = _tmp0_;
00368        return result;
00369 }
00370 
00371 
00372 void unity_music_lens_track_set_year (UnityMusicLensTrack* self, gint value) {
00373        gint _tmp0_;
00374        g_return_if_fail (self != NULL);
00375        _tmp0_ = value;
00376        self->priv->_year = _tmp0_;
00377        g_object_notify ((GObject *) self, "year");
00378 }
00379 
00380 
00381 gint unity_music_lens_track_get_play_count (UnityMusicLensTrack* self) {
00382        gint result;
00383        gint _tmp0_;
00384        g_return_val_if_fail (self != NULL, 0);
00385        _tmp0_ = self->priv->_play_count;
00386        result = _tmp0_;
00387        return result;
00388 }
00389 
00390 
00391 void unity_music_lens_track_set_play_count (UnityMusicLensTrack* self, gint value) {
00392        gint _tmp0_;
00393        g_return_if_fail (self != NULL);
00394        _tmp0_ = value;
00395        self->priv->_play_count = _tmp0_;
00396        g_object_notify ((GObject *) self, "play-count");
00397 }
00398 
00399 
00400 static void unity_music_lens_track_class_init (UnityMusicLensTrackClass * klass) {
00401        unity_music_lens_track_parent_class = g_type_class_peek_parent (klass);
00402        g_type_class_add_private (klass, sizeof (UnityMusicLensTrackPrivate));
00403        G_OBJECT_CLASS (klass)->get_property = _vala_unity_music_lens_track_get_property;
00404        G_OBJECT_CLASS (klass)->set_property = _vala_unity_music_lens_track_set_property;
00405        G_OBJECT_CLASS (klass)->finalize = unity_music_lens_track_finalize;
00406        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_TYPE_TRACK, g_param_spec_enum ("type-track", "type-track", "type-track", UNITY_MUSIC_LENS_TYPE_TRACK_TYPE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00407        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_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));
00408        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_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));
00409        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_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));
00410        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_MIME_TYPE, g_param_spec_string ("mime-type", "mime-type", "mime-type", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00411        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_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));
00412        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_ALBUM, g_param_spec_string ("album", "album", "album", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00413        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_ALBUM_ARTIST, g_param_spec_string ("album-artist", "album-artist", "album-artist", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00414        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_GENRE, g_param_spec_string ("genre", "genre", "genre", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00415        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_TRACK_NUMBER, g_param_spec_int ("track-number", "track-number", "track-number", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00416        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_YEAR, g_param_spec_int ("year", "year", "year", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00417        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_TRACK_PLAY_COUNT, g_param_spec_int ("play-count", "play-count", "play-count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00418 }
00419 
00420 
00421 static void unity_music_lens_track_instance_init (UnityMusicLensTrack * self) {
00422        self->priv = UNITY_MUSIC_LENS_TRACK_GET_PRIVATE (self);
00423 }
00424 
00425 
00426 static void unity_music_lens_track_finalize (GObject* obj) {
00427        UnityMusicLensTrack * self;
00428        self = UNITY_MUSIC_LENS_TRACK (obj);
00429        _g_free0 (self->priv->_title);
00430        _g_free0 (self->priv->_uri);
00431        _g_free0 (self->priv->_artist);
00432        _g_free0 (self->priv->_mime_type);
00433        _g_free0 (self->priv->_artwork_path);
00434        _g_free0 (self->priv->_album);
00435        _g_free0 (self->priv->_album_artist);
00436        _g_free0 (self->priv->_genre);
00437        G_OBJECT_CLASS (unity_music_lens_track_parent_class)->finalize (obj);
00438 }
00439 
00440 
00441 GType unity_music_lens_track_get_type (void) {
00442        static volatile gsize unity_music_lens_track_type_id__volatile = 0;
00443        if (g_once_init_enter (&unity_music_lens_track_type_id__volatile)) {
00444               static const GTypeInfo g_define_type_info = { sizeof (UnityMusicLensTrackClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_music_lens_track_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityMusicLensTrack), 0, (GInstanceInitFunc) unity_music_lens_track_instance_init, NULL };
00445               GType unity_music_lens_track_type_id;
00446               unity_music_lens_track_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityMusicLensTrack", &g_define_type_info, 0);
00447               g_once_init_leave (&unity_music_lens_track_type_id__volatile, unity_music_lens_track_type_id);
00448        }
00449        return unity_music_lens_track_type_id__volatile;
00450 }
00451 
00452 
00453 static void _vala_unity_music_lens_track_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
00454        UnityMusicLensTrack * self;
00455        self = UNITY_MUSIC_LENS_TRACK (object);
00456        switch (property_id) {
00457               case UNITY_MUSIC_LENS_TRACK_TYPE_TRACK:
00458               g_value_set_enum (value, unity_music_lens_track_get_type_track (self));
00459               break;
00460               case UNITY_MUSIC_LENS_TRACK_TITLE:
00461               g_value_set_string (value, unity_music_lens_track_get_title (self));
00462               break;
00463               case UNITY_MUSIC_LENS_TRACK_URI:
00464               g_value_set_string (value, unity_music_lens_track_get_uri (self));
00465               break;
00466               case UNITY_MUSIC_LENS_TRACK_ARTIST:
00467               g_value_set_string (value, unity_music_lens_track_get_artist (self));
00468               break;
00469               case UNITY_MUSIC_LENS_TRACK_MIME_TYPE:
00470               g_value_set_string (value, unity_music_lens_track_get_mime_type (self));
00471               break;
00472               case UNITY_MUSIC_LENS_TRACK_ARTWORK_PATH:
00473               g_value_set_string (value, unity_music_lens_track_get_artwork_path (self));
00474               break;
00475               case UNITY_MUSIC_LENS_TRACK_ALBUM:
00476               g_value_set_string (value, unity_music_lens_track_get_album (self));
00477               break;
00478               case UNITY_MUSIC_LENS_TRACK_ALBUM_ARTIST:
00479               g_value_set_string (value, unity_music_lens_track_get_album_artist (self));
00480               break;
00481               case UNITY_MUSIC_LENS_TRACK_GENRE:
00482               g_value_set_string (value, unity_music_lens_track_get_genre (self));
00483               break;
00484               case UNITY_MUSIC_LENS_TRACK_TRACK_NUMBER:
00485               g_value_set_int (value, unity_music_lens_track_get_track_number (self));
00486               break;
00487               case UNITY_MUSIC_LENS_TRACK_YEAR:
00488               g_value_set_int (value, unity_music_lens_track_get_year (self));
00489               break;
00490               case UNITY_MUSIC_LENS_TRACK_PLAY_COUNT:
00491               g_value_set_int (value, unity_music_lens_track_get_play_count (self));
00492               break;
00493               default:
00494               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00495               break;
00496        }
00497 }
00498 
00499 
00500 static void _vala_unity_music_lens_track_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
00501        UnityMusicLensTrack * self;
00502        self = UNITY_MUSIC_LENS_TRACK (object);
00503        switch (property_id) {
00504               case UNITY_MUSIC_LENS_TRACK_TYPE_TRACK:
00505               unity_music_lens_track_set_type_track (self, g_value_get_enum (value));
00506               break;
00507               case UNITY_MUSIC_LENS_TRACK_TITLE:
00508               unity_music_lens_track_set_title (self, g_value_get_string (value));
00509               break;
00510               case UNITY_MUSIC_LENS_TRACK_URI:
00511               unity_music_lens_track_set_uri (self, g_value_get_string (value));
00512               break;
00513               case UNITY_MUSIC_LENS_TRACK_ARTIST:
00514               unity_music_lens_track_set_artist (self, g_value_get_string (value));
00515               break;
00516               case UNITY_MUSIC_LENS_TRACK_MIME_TYPE:
00517               unity_music_lens_track_set_mime_type (self, g_value_get_string (value));
00518               break;
00519               case UNITY_MUSIC_LENS_TRACK_ARTWORK_PATH:
00520               unity_music_lens_track_set_artwork_path (self, g_value_get_string (value));
00521               break;
00522               case UNITY_MUSIC_LENS_TRACK_ALBUM:
00523               unity_music_lens_track_set_album (self, g_value_get_string (value));
00524               break;
00525               case UNITY_MUSIC_LENS_TRACK_ALBUM_ARTIST:
00526               unity_music_lens_track_set_album_artist (self, g_value_get_string (value));
00527               break;
00528               case UNITY_MUSIC_LENS_TRACK_GENRE:
00529               unity_music_lens_track_set_genre (self, g_value_get_string (value));
00530               break;
00531               case UNITY_MUSIC_LENS_TRACK_TRACK_NUMBER:
00532               unity_music_lens_track_set_track_number (self, g_value_get_int (value));
00533               break;
00534               case UNITY_MUSIC_LENS_TRACK_YEAR:
00535               unity_music_lens_track_set_year (self, g_value_get_int (value));
00536               break;
00537               case UNITY_MUSIC_LENS_TRACK_PLAY_COUNT:
00538               unity_music_lens_track_set_play_count (self, g_value_get_int (value));
00539               break;
00540               default:
00541               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00542               break;
00543        }
00544 }
00545 
00546 
00547