~ubuntu-branches/ubuntu/quantal/kscd/quantal-proposed

« back to all changes in this revision

Viewing changes to mbmanager.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-06-14 17:35:46 UTC
  • Revision ID: package-import@ubuntu.com-20120614173546-0t4dq1zkvl62ebpd
Tags: upstream-4.8.90+repack
Import upstream version 4.8.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Kscd - A simple cd player for the KDE Project
 
3
 *
 
4
 * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu
 
5
 * Copyright (c) 2002-2003 Aaron J. Seigo <aseigo@kde.org>
 
6
 * Copyright (c) 2004 Alexander Kern <alex.kern@gmx.de>
 
7
 * Copyright (c) 2003-2006 Richard Lärkäng <nouseforaname@home.se>
 
8
 *
 
9
 * --------------
 
10
 * ISI KsCD Team :
 
11
 * --------------
 
12
 * Stanislas KRZYWDA <stanislas.krzywda@gmail.com>
 
13
 * Sovanramy Var <mastasushi@gmail.com>
 
14
 * Bouchikhi Mohamed-Amine <bouchikhi.amine@gmail.com>
 
15
 * Gastellu Sylvain<sylvain.gastellu@gmail.com>
 
16
 * -----------------------------------------------------------------------------
 
17
 *
 
18
 * This program is free software; you can redistribute it and/or modify
 
19
 * it under the terms of the GNU General Public License as published by
 
20
 * the Free Software Foundation; either version 2, or (at your option)
 
21
 * any later version.
 
22
 *
 
23
 * This program is distributed in the hope that it will be useful,
 
24
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
25
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
26
 * GNU General Public License for more details.
 
27
 *
 
28
 * You should have received a copy of the GNU General Public License
 
29
 * along with this program; if not, write to the Free Software
 
30
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
31
 *
 
32
 */
 
33
 
 
34
#ifndef MBMANAGER_H
 
35
#define MBMANAGER_H
 
36
 
 
37
// KDE includes
 
38
#include <kdebug.h>
 
39
#include <klocalizedstring.h>
 
40
 
 
41
// QT includes
 
42
#include <qstring.h>
 
43
#include <qlist.h>
 
44
 
 
45
struct DiscInfo
 
46
{
 
47
        QString Title;
 
48
        QString Artist;
 
49
};
 
50
 
 
51
struct MBTrackInfo
 
52
{
 
53
        QString Title;
 
54
        QString Artist;
 
55
        int Duration; // in milliseconds
 
56
};
 
57
 
 
58
class MBManager : public QObject
 
59
{
 
60
        Q_OBJECT
 
61
 
 
62
private:
 
63
        DiscInfo m_discInfo;                            /// Contains the album's information
 
64
        QList <MBTrackInfo> m_trackList;        /// List of tracks information
 
65
 
 
66
        bool m_validInfo;                                       /// Tells whether the lookup query succeeded
 
67
 
 
68
public:
 
69
        MBManager();
 
70
        ~MBManager();
 
71
 
 
72
/**
 
73
* Getters/Setters
 
74
*/
 
75
        /** Returns the disc information */
 
76
        DiscInfo getDiscInfo() const { return this->m_discInfo; }
 
77
        QList <MBTrackInfo> getTrackList() const { return this->m_trackList; }
 
78
        bool isValidInfo() const { return this->m_validInfo; }
 
79
 
 
80
public slots:
 
81
        /** Gets information about the disc inserted */
 
82
        void discLookup(const QString& device);
 
83
 
 
84
        /** Uploads information */
 
85
        void discUpload();
 
86
 
 
87
signals:
 
88
        void showArtistLabel(QString&);
 
89
        
 
90
        void discLookupFinished();
 
91
};
 
92
 
 
93
#endif
 
94