1 /**************************************************************************************** 2 * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn@kde.org> * 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 #ifndef INFOPARSERBASE_H 18 #define INFOPARSERBASE_H 19 20 #include "amarok_export.h" 21 #include "core/meta/forward_declarations.h" 22 23 #include <QObject> 24 25 /** 26 Abstract base class for info parsers 27 */ 28 class AMAROK_EXPORT InfoParserBase : public QObject 29 { 30 Q_OBJECT 31 32 public: 33 InfoParserBase(); 34 35 /** 36 * Fetches info about artist and emits info( QString ) 37 * with a ready to show html page when the info is ready 38 * @param artist The artist to get info about 39 */ 40 virtual void getInfo( const Meta::ArtistPtr &artist ) = 0; 41 42 /** 43 * Overloaded function 44 * Fetches info about album and emits info( QString ) 45 * with a ready to show html page when the info is ready 46 * @param album The album to get info about 47 */ 48 virtual void getInfo( const Meta::AlbumPtr &album ) = 0; 49 50 /** 51 * Overloaded function 52 * Fetches info about track and emits info( QString ) 53 * with a ready to show html page when the info is ready 54 * @param track The track to get info about 55 */ 56 virtual void getInfo( const Meta::TrackPtr &track ) = 0; 57 58 void showLoading( const QString &message ); 59 60 Q_SIGNALS: 61 /** 62 * Signal emitted when new html info is ready to be shown 63 * @param info The string containing the html formatted information 64 */ 65 void info( const QString &info ); 66 67 private: 68 static QString s_loadingBaseHtml; 69 }; 70 71 #endif 72