2
* * Copyright (C) 2009 Ali <aliov@xfce.org>
4
* Licensed under the GNU General Public License Version 2
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
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, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25
#include "sample-provider.h"
27
static void sample_provider_iface_init (ParoleProviderPluginIface *iface);
28
static void sample_provider_finalize (GObject *object);
31
struct _SampleProviderClass
33
GObjectClass parent_class;
36
struct _SampleProvider
39
ParoleProviderPlayer *player;
42
PAROLE_DEFINE_TYPE_WITH_CODE (SampleProvider,
45
PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
46
sample_provider_iface_init));
48
static gboolean sample_provider_is_configurable (ParoleProviderPlugin *plugin)
54
sample_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *player)
56
SampleProvider *provider;
57
provider = SAMPLE_PROVIDER (plugin);
59
provider->player = player;
63
sample_provider_iface_init (ParoleProviderPluginIface *iface)
65
iface->get_is_configurable = sample_provider_is_configurable;
66
iface->set_player = sample_provider_set_player;
69
static void sample_provider_class_init (SampleProviderClass *klass)
71
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
73
gobject_class->finalize = sample_provider_finalize;
76
static void sample_provider_init (SampleProvider *provider)
78
provider->player = NULL;
81
static void sample_provider_finalize (GObject *object)
83
G_OBJECT_CLASS (sample_provider_parent_class)->finalize (object);