1
/***************************************************************************************
2
* Copyright (c) 2009 Dan Meltzer <parallelgrapefruit@gmail.com>                        *
3
*                                                                                      *
4
* This program is free software; you can redistribute it and/or modify it under        *
5
* the terms of the GNU General Public License as published by the Free Software        *
6
* Foundation; either version 2 of the License, or (at your option) any later           *
7
* version.                                                                             *
8
*                                                                                      *
9
* This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
10
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
11
* PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
12
*                                                                                      *
13
* You should have received a copy of the GNU General Public License along with         *
14
* this program.  If not, see <http://www.gnu.org/licenses/>.                           *
15
****************************************************************************************/
16
17
18
#ifndef LASTFMREADLABELCAPABILITY_H
19
#define LASTFMREADLABELCAPABILITY_H
20
21
#include "core/meta/Meta.h"
22
#include "core/capabilities/Capability.h"
23
#include "core/capabilities/ReadLabelCapability.h"
24
class QNetworkReply;
25
26
namespace Capabilities
27
{
28
29
class LastfmReadLabelCapability : public Capabilities::ReadLabelCapability
30
{
31
    Q_OBJECT
32
    public:
33
        LastfmReadLabelCapability( Meta::Track *track );
34
        virtual void fetchLabels();
35
        virtual void fetchGlobalLabels();
36
        virtual QStringList labels();
37
38
    private:
39
        QStringList m_labels;
40
        Meta::TrackPtr m_track;
41
        QNetworkReply *m_job;
42
43
    private slots:
44
        void onTagsFetched();
45
};
46
}
47
48
#endif // LASTFMREADLABELCAPABILITY_H