Back to index

unity-lens-music  6.0.0
filter-parser-decade.c
Go to the documentation of this file.
00001 /* filter-parser-decade.c generated by valac 0.14.2, the Vala compiler
00002  * generated from filter-parser-decade.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 #include <unity.h>
00028 
00029 
00030 #define UNITY_MUSIC_LENS_TYPE_FILTER_PARSER (unity_music_lens_filter_parser_get_type ())
00031 #define UNITY_MUSIC_LENS_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParser))
00032 #define UNITY_MUSIC_LENS_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParserClass))
00033 #define UNITY_MUSIC_LENS_IS_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER))
00034 #define UNITY_MUSIC_LENS_IS_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER))
00035 #define UNITY_MUSIC_LENS_FILTER_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, UnityMusicLensFilterParserClass))
00036 
00037 typedef struct _UnityMusicLensFilterParser UnityMusicLensFilterParser;
00038 typedef struct _UnityMusicLensFilterParserClass UnityMusicLensFilterParserClass;
00039 typedef struct _UnityMusicLensFilterParserPrivate UnityMusicLensFilterParserPrivate;
00040 
00041 #define UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER (unity_music_lens_decade_filter_parser_get_type ())
00042 #define UNITY_MUSIC_LENS_DECADE_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER, UnityMusicLensDecadeFilterParser))
00043 #define UNITY_MUSIC_LENS_DECADE_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER, UnityMusicLensDecadeFilterParserClass))
00044 #define UNITY_MUSIC_LENS_IS_DECADE_FILTER_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER))
00045 #define UNITY_MUSIC_LENS_IS_DECADE_FILTER_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER))
00046 #define UNITY_MUSIC_LENS_DECADE_FILTER_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER, UnityMusicLensDecadeFilterParserClass))
00047 
00048 typedef struct _UnityMusicLensDecadeFilterParser UnityMusicLensDecadeFilterParser;
00049 typedef struct _UnityMusicLensDecadeFilterParserClass UnityMusicLensDecadeFilterParserClass;
00050 typedef struct _UnityMusicLensDecadeFilterParserPrivate UnityMusicLensDecadeFilterParserPrivate;
00051 
00052 struct _UnityMusicLensFilterParser {
00053        GObject parent_instance;
00054        UnityMusicLensFilterParserPrivate * priv;
00055 };
00056 
00057 struct _UnityMusicLensFilterParserClass {
00058        GObjectClass parent_class;
00059        gchar* (*parse) (UnityMusicLensFilterParser* self);
00060        const gchar* (*get_id) (UnityMusicLensFilterParser* self);
00061 };
00062 
00063 struct _UnityMusicLensDecadeFilterParser {
00064        UnityMusicLensFilterParser parent_instance;
00065        UnityMusicLensDecadeFilterParserPrivate * priv;
00066 };
00067 
00068 struct _UnityMusicLensDecadeFilterParserClass {
00069        UnityMusicLensFilterParserClass parent_class;
00070 };
00071 
00072 
00073 static gpointer unity_music_lens_decade_filter_parser_parent_class = NULL;
00074 
00075 GType unity_music_lens_filter_parser_get_type (void) G_GNUC_CONST;
00076 GType unity_music_lens_decade_filter_parser_get_type (void) G_GNUC_CONST;
00077 enum  {
00078        UNITY_MUSIC_LENS_DECADE_FILTER_PARSER_DUMMY_PROPERTY,
00079        UNITY_MUSIC_LENS_DECADE_FILTER_PARSER_ID
00080 };
00081 UnityMusicLensDecadeFilterParser* unity_music_lens_decade_filter_parser_new (UnityMultiRangeFilter* filter);
00082 UnityMusicLensDecadeFilterParser* unity_music_lens_decade_filter_parser_construct (GType object_type, UnityMultiRangeFilter* filter);
00083 UnityMusicLensFilterParser* unity_music_lens_filter_parser_construct (GType object_type, UnityFilter* filter);
00084 static gchar* unity_music_lens_decade_filter_parser_real_parse (UnityMusicLensFilterParser* base);
00085 const gchar* unity_music_lens_filter_parser_get_id (UnityMusicLensFilterParser* self);
00086 static void _vala_unity_music_lens_decade_filter_parser_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00087 
00088 
00089 UnityMusicLensDecadeFilterParser* unity_music_lens_decade_filter_parser_construct (GType object_type, UnityMultiRangeFilter* filter) {
00090        UnityMusicLensDecadeFilterParser * self = NULL;
00091        UnityMultiRangeFilter* _tmp0_;
00092        g_return_val_if_fail (filter != NULL, NULL);
00093        _tmp0_ = filter;
00094        self = (UnityMusicLensDecadeFilterParser*) unity_music_lens_filter_parser_construct (object_type, (UnityFilter*) _tmp0_);
00095        return self;
00096 }
00097 
00098 
00099 UnityMusicLensDecadeFilterParser* unity_music_lens_decade_filter_parser_new (UnityMultiRangeFilter* filter) {
00100        return unity_music_lens_decade_filter_parser_construct (UNITY_MUSIC_LENS_TYPE_DECADE_FILTER_PARSER, filter);
00101 }
00102 
00103 
00104 static gchar* unity_music_lens_decade_filter_parser_real_parse (UnityMusicLensFilterParser* base) {
00105        UnityMusicLensDecadeFilterParser * self;
00106        gchar* result = NULL;
00107        gchar* _tmp0_;
00108        self = (UnityMusicLensDecadeFilterParser*) base;
00109        _tmp0_ = g_strdup ("");
00110        result = _tmp0_;
00111        return result;
00112 }
00113 
00114 
00115 static const gchar* unity_music_lens_decade_filter_parser_real_get_id (UnityMusicLensFilterParser* base) {
00116        const gchar* result;
00117        UnityMusicLensDecadeFilterParser* self;
00118        self = (UnityMusicLensDecadeFilterParser*) base;
00119        result = "decade";
00120        return result;
00121 }
00122 
00123 
00124 static void unity_music_lens_decade_filter_parser_class_init (UnityMusicLensDecadeFilterParserClass * klass) {
00125        unity_music_lens_decade_filter_parser_parent_class = g_type_class_peek_parent (klass);
00126        UNITY_MUSIC_LENS_FILTER_PARSER_CLASS (klass)->parse = unity_music_lens_decade_filter_parser_real_parse;
00127        UNITY_MUSIC_LENS_FILTER_PARSER_CLASS (klass)->get_id = unity_music_lens_decade_filter_parser_real_get_id;
00128        G_OBJECT_CLASS (klass)->get_property = _vala_unity_music_lens_decade_filter_parser_get_property;
00129        g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_MUSIC_LENS_DECADE_FILTER_PARSER_ID, g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
00130 }
00131 
00132 
00133 static void unity_music_lens_decade_filter_parser_instance_init (UnityMusicLensDecadeFilterParser * self) {
00134 }
00135 
00136 
00137 GType unity_music_lens_decade_filter_parser_get_type (void) {
00138        static volatile gsize unity_music_lens_decade_filter_parser_type_id__volatile = 0;
00139        if (g_once_init_enter (&unity_music_lens_decade_filter_parser_type_id__volatile)) {
00140               static const GTypeInfo g_define_type_info = { sizeof (UnityMusicLensDecadeFilterParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_music_lens_decade_filter_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityMusicLensDecadeFilterParser), 0, (GInstanceInitFunc) unity_music_lens_decade_filter_parser_instance_init, NULL };
00141               GType unity_music_lens_decade_filter_parser_type_id;
00142               unity_music_lens_decade_filter_parser_type_id = g_type_register_static (UNITY_MUSIC_LENS_TYPE_FILTER_PARSER, "UnityMusicLensDecadeFilterParser", &g_define_type_info, 0);
00143               g_once_init_leave (&unity_music_lens_decade_filter_parser_type_id__volatile, unity_music_lens_decade_filter_parser_type_id);
00144        }
00145        return unity_music_lens_decade_filter_parser_type_id__volatile;
00146 }
00147 
00148 
00149 static void _vala_unity_music_lens_decade_filter_parser_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
00150        UnityMusicLensDecadeFilterParser * self;
00151        self = UNITY_MUSIC_LENS_DECADE_FILTER_PARSER (object);
00152        switch (property_id) {
00153               case UNITY_MUSIC_LENS_DECADE_FILTER_PARSER_ID:
00154               g_value_set_string (value, unity_music_lens_filter_parser_get_id ((UnityMusicLensFilterParser*) self));
00155               break;
00156               default:
00157               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00158               break;
00159        }
00160 }
00161 
00162 
00163