~ubuntuone-control-tower/libubuntuone/stable-3-0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Copyright (C) 2009 Canonical Services Ltd (www.canonical.com)
 *
 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __U1_MUSIC_STORE_H__
#define __U1_MUSIC_STORE_H__

#include <gtk/gtk.h>


G_BEGIN_DECLS

#define U1_TYPE_MUSIC_STORE                (u1_music_store_get_type ())
#define U1_MUSIC_STORE(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), U1_TYPE_MUSIC_STORE, U1MusicStore))
#define U1_IS_MUSIC_STORE(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), U1_TYPE_MUSIC_STORE))
#define U1_MUSIC_STORE_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), U1_TYPE_MUSIC_STORE, U1MusicStoreClass))
#define U1_IS_MUSIC_STORE_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), U1_TYPE_MUSIC_STORE))
#define U1_MUSIC_STORE_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), U1_TYPE_MUSIC_STORE, U1MusicStoreClass))

typedef struct _U1MusicStore        U1MusicStore;
typedef struct _U1MusicStoreClass   U1MusicStoreClass;
typedef struct _U1MusicStorePrivate U1MusicStorePrivate;

struct _U1MusicStore {
	GtkVBox parent;
	U1MusicStorePrivate *priv;
};

struct _U1MusicStoreClass {
	GtkVBoxClass parent_class;

	/* Signals */
	void (* preview_mp3) (U1MusicStore *music_store, const gchar *url, const gchar *title);
	void (* play_library) (U1MusicStore *music_store, const gchar *path);
	void (* url_loaded) (U1MusicStore *music_store, const gchar *url);
	void (* download_finished) (U1MusicStore *music_store, const gchar *path);
};

GType        u1_music_store_get_type (void);

GtkWidget   *u1_music_store_new (void);
const gchar *u1_music_store_get_library_location (U1MusicStore *music_store);
void         u1_music_store_load_store_link (U1MusicStore *music_store, const gchar *url);

G_END_DECLS

#endif