1 /*
2  * Cantata
3  *
4  * Copyright (c) 2011-2020 Craig Drummond <craig.p.drummond@gmail.com>
5  *
6  */
7 /*
8   Copyright (C) 2005 Richard Lärkäng <nouseforaname@home.se>
9 
10   This library is free software; you can redistribute it and/or
11   modify it under the terms of the GNU Library General Public
12   License as published by the Free Software Foundation; either
13   version 2 of the License, or (at your option) any later version.
14 
15   This library is distributed in the hope that it will be useful,
16   but WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18   Library General Public License for more details.
19 
20   You should have received a copy of the GNU Library General Public License
21   along with this library; see the file COPYING.LIB.  If not, write to
22   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23   Boston, MA 02110-1301, USA.
24 */
25 
26 #ifndef MUSICBRAINZ_H
27 #define MUSICBRAINZ_H
28 
29 #include "cdalbum.h"
30 #include <QString>
31 #include <QObject>
32 
33 class Thread;
34 
35 class MusicBrainz : public QObject
36 {
37     Q_OBJECT
38 public:
39     MusicBrainz(const QString &device);
40     ~MusicBrainz();
41 
42 public Q_SLOTS:
43     void lookup(bool full);
44 
45 Q_SIGNALS:
46     void error(const QString &error);
47     void initialDetails(const CdAlbum &);
48     void matches(const QList<CdAlbum> &);
49 
50 private:
51     void readDisc();
52 
53 private:
54     Thread *thread;
55     QString dev;
56     QString discId;
57     CdAlbum initial;
58 };
59 
60 #endif // MUSICBRAINZ_H
61