1 /*
2  *  Copyright (C) 2009 Marc Pavot <marc.pavot@gmail.com>
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #include <glib.h>
21 #include <string.h>
22 #include <glib/gi18n.h>
23 #include "lib/ario-conf.h"
24 #include "playlist/ario-playlist-normal.h"
25 #include "servers/ario-server.h"
26 #include "ario-util.h"
27 #include "preferences/ario-preferences.h"
28 #include "ario-debug.h"
29 
30 static void ario_playlist_normal_class_init (ArioPlaylistNormalClass *klass);
31 static void ario_playlist_normal_init (ArioPlaylistNormal *playlist_normal);
32 
33 static GObjectClass *parent_class = NULL;
34 
35 #define ARIO_PLAYLIST_NORMAL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ARIO_PLAYLIST_NORMAL, ArioPlaylistNormalPrivate))
G_DEFINE_TYPE(ArioPlaylistNormal,ario_playlist_normal,ARIO_TYPE_PLAYLIST_MODE)36 G_DEFINE_TYPE (ArioPlaylistNormal, ario_playlist_normal, ARIO_TYPE_PLAYLIST_MODE)
37 
38 static gchar *
39 ario_playlist_normal_get_id (ArioPlaylistMode *playlist_mode)
40 {
41         return "normal";
42 }
43 
44 static gchar *
ario_playlist_normal_get_name(ArioPlaylistMode * playlist_mode)45 ario_playlist_normal_get_name (ArioPlaylistMode *playlist_mode)
46 {
47         return _("Normal");
48 }
49 
50 static void
ario_playlist_normal_class_init(ArioPlaylistNormalClass * klass)51 ario_playlist_normal_class_init (ArioPlaylistNormalClass *klass)
52 {
53         ARIO_LOG_FUNCTION_START;
54         ArioPlaylistModeClass *playlist_mode_class = ARIO_PLAYLIST_MODE_CLASS (klass);
55 
56         parent_class = g_type_class_peek_parent (klass);
57 
58         playlist_mode_class->get_id = ario_playlist_normal_get_id;
59         playlist_mode_class->get_name = ario_playlist_normal_get_name;
60 }
61 
62 static void
ario_playlist_normal_init(ArioPlaylistNormal * playlist_normal)63 ario_playlist_normal_init (ArioPlaylistNormal *playlist_normal)
64 {
65         ARIO_LOG_FUNCTION_START;
66 }
67 
68 ArioPlaylistMode*
ario_playlist_normal_new(void)69 ario_playlist_normal_new (void)
70 {
71         ARIO_LOG_FUNCTION_START;
72         ArioPlaylistNormal *normal;
73 
74         normal = g_object_new (TYPE_ARIO_PLAYLIST_NORMAL,
75                                NULL);
76 
77         return ARIO_PLAYLIST_MODE (normal);
78 }
79 
80