3
* Copyright (C) 2003 Ross Burton <ross@burtonini.com>
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Library General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Library General Public License for more details.
15
* You should have received a copy of the GNU Library General Public
16
* License along with this library; if not, write to the
17
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
* Boston, MA 02111-1307, USA.
21
#include <glib-object.h>
22
#include "sj-metadata.h"
23
#include "sj-metadata-marshal.h"
30
static int signals[LAST_SIGNAL] = { 0 };
33
sj_metadata_base_init (gpointer g_class)
35
static gboolean initialized = FALSE;
37
signals[METADATA] = g_signal_new ("metadata",
38
G_TYPE_FROM_CLASS (g_class),
40
G_STRUCT_OFFSET (SjMetadataClass, metadata),
42
metadata_marshal_VOID__POINTER_POINTER,
43
G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
49
sj_metadata_get_type (void)
51
static GType type = 0;
53
static const GTypeInfo info = {
54
sizeof (SjMetadataClass), /* class_size */
55
sj_metadata_base_init, /* base_init */
56
NULL, /* base_finalize */
58
NULL, /* class_finalize */
59
NULL, /* class_data */
66
type = g_type_register_static (G_TYPE_INTERFACE, "SjMetadata", &info, 0);
67
g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
73
sj_metadata_get_new_error (SjMetadata *metadata)
75
return SJ_METADATA_GET_CLASS (metadata)->get_new_error (metadata);
79
sj_metadata_set_cdrom (SjMetadata *metadata, const char* device)
81
SJ_METADATA_GET_CLASS (metadata)->set_cdrom (metadata, device);
85
sj_metadata_set_proxy (SjMetadata *metadata, const char* proxy)
87
SJ_METADATA_GET_CLASS (metadata)->set_proxy (metadata, proxy);
91
sj_metadata_set_proxy_port (SjMetadata *metadata, const int proxy_port)
93
SJ_METADATA_GET_CLASS (metadata)->set_proxy_port (metadata, proxy_port);
97
sj_metadata_list_albums (SjMetadata *metadata, GError **error)
99
SJ_METADATA_GET_CLASS (metadata)->list_albums (metadata, error);