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

« back to all changes in this revision

Viewing changes to libubuntuone/u1-codec-installer.h

  • Committer: Rodney Dawes
  • Date: 2011-04-05 14:51:45 UTC
  • mfrom: (129.1.1 codec-installer)
  • Revision ID: rodney.dawes@canonical.com-20110405145145-jluguvhmz0o4s15f
Check for MP3 support when store is initialized
Add an implementation for installing the codec with aptdaemon
Show the notification on the main page, and when preview is clicked

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
2
/*
 
3
 * Copyright (C) 2011 Canonical, Ltd.
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of version 2 of the GNU Lesser General Public
 
7
 * License as published by the Free Software Foundation.
 
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 GNU
 
12
 * General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Lesser General Public
 
15
 * License along with this library; if not, write to the
 
16
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
 * Boston, MA 02110-1301, USA.
 
18
 */
 
19
 
 
20
#ifndef __U1_CODEC_INSTALLER_H__
 
21
#define __U1_CODEC_INSTALLER_H__
 
22
 
 
23
#include <glib-object.h>
 
24
#include <gtk/gtk.h>
 
25
 
 
26
#define U1_TYPE_CODEC_INSTALLER            (u1_codec_installer_get_type ())
 
27
#define U1_CODEC_INSTALLER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), U1_TYPE_CODEC_INSTALLER, U1CodecInstaller))
 
28
#define U1_IS_CODEC_INSTALLER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), U1_TYPE_CODEC_INSTALLER))
 
29
#define U1_CODEC_INSTALLER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), U1_TYPE_CODEC_INSTALLER, U1CodecInstaller))
 
30
#define U1_IS_CODEC_INSTALLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), U1_TYPE_CODEC_INSTALLER))
 
31
#define U1_CODEC_INSTALLER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), U1_TYPE_CODEC_INSTALLER, U1CodecInstaller))
 
32
#define U1_CODEC_INSTALLER_ERROR           (u1_codec_installer_error_quark ())
 
33
 
 
34
typedef struct _U1CodecInstaller        U1CodecInstaller;
 
35
typedef struct _U1CodecInstallerClass   U1CodecInstallerClass;
 
36
typedef struct _U1CodecInstallerPrivate U1CodecInstallerPrivate;
 
37
typedef enum   _U1CodecInstallerError   U1CodecInstallerError;
 
38
 
 
39
struct _U1CodecInstaller {
 
40
        GObject parent;
 
41
 
 
42
        U1CodecInstallerPrivate *priv;
 
43
};
 
44
 
 
45
struct _U1CodecInstallerClass {
 
46
        GObjectClass parent_class;
 
47
 
 
48
        void (* started)  (U1CodecInstaller *installer);
 
49
        void (* finished) (U1CodecInstaller *installer);
 
50
        void (* error)    (U1CodecInstaller *installer, GError *error);
 
51
};
 
52
 
 
53
enum _U1CodecInstallerError {
 
54
        U1_CODEC_INSTALLER_ERROR_UNKNOWN = 0,
 
55
        U1_CODEC_INSTALLER_ERROR_UNSUPPORTED
 
56
};
 
57
 
 
58
GType u1_codec_installer_get_type (void);
 
59
 
 
60
U1CodecInstaller *u1_codec_installer_new (void);
 
61
 
 
62
void  u1_codec_installer_install_codec (U1CodecInstaller *installer,
 
63
                                        GtkWindow *parent_window);
 
64
GtkWidget *u1_codec_installer_get_progress_widget (U1CodecInstaller *installer);
 
65
 
 
66
GQuark u1_codec_installer_error_quark (void);
 
67
 
 
68
#endif