1
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
3
* Written by Hugo Lindström <hugolm84@gmail.com>
4
* But based on Leo Franchi's work from spotifyParser
5
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
7
* Tomahawk is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
12
* Tomahawk is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
21
#ifndef ITUNES_PARSER_H
22
#define ITUNES_PARSER_H
27
#include "DropJobNotifier.h"
31
#include <QtCore/QStringList>
40
* Small class to parse itunes links into query_ptrs
42
* Connect to the signals to get the results
44
class DLLEXPORT ItunesParser : public QObject
48
explicit ItunesParser( const QString& trackUrl, QObject* parent = 0 );
49
explicit ItunesParser( const QStringList& trackUrls, QObject* parent = 0 );
50
virtual ~ItunesParser();
53
void track( const Tomahawk::query_ptr& track );
54
void tracks( const QList< Tomahawk::query_ptr > tracks );
57
void itunesResponseLookupFinished();
60
QPixmap pixmap() const;
61
void lookupItunesUri( const QString& track );
62
void checkTrackFinished();
65
QList< query_ptr > m_tracks;
66
QSet< NetworkReply* > m_queries;
67
QString m_title, m_info, m_creator;
68
Tomahawk::playlist_ptr m_playlist;
70
DropJobNotifier* m_browseJob;
71
static QPixmap* s_pixmap;