File indexing completed on 2024-05-19 04:50:15
0001 /**************************************************************************************** 0002 * Copyright (c) 2008 Shane King <kde@dontletsstart.com> * 0003 * Copyright (c) 2008 Leo Franchi <lfranchi@gmail.com> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify it under * 0006 * the terms of the GNU General Public License as published by the Free Software * 0007 * Foundation; either version 2 of the License, or (at your option) any later * 0008 * version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0012 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License along with * 0015 * this program. If not, see <http://www.gnu.org/licenses/>. * 0016 ****************************************************************************************/ 0017 0018 #ifndef LASTFMSERVICECOLLECTION_H 0019 #define LASTFMSERVICECOLLECTION_H 0020 0021 #include "services/ServiceCollection.h" 0022 0023 class QNetworkReply; 0024 0025 namespace Meta 0026 { 0027 class ServiceGenre; 0028 } 0029 0030 namespace Collections { 0031 0032 class LastFmServiceCollection : public ServiceCollection 0033 { 0034 Q_OBJECT 0035 public: 0036 explicit LastFmServiceCollection( const QString &userName ); 0037 ~LastFmServiceCollection() override; 0038 0039 bool possiblyContainsTrack( const QUrl &url ) const override; 0040 Meta::TrackPtr trackForUrl( const QUrl &url ) override; 0041 0042 QString collectionId() const override; 0043 QString prettyName() const override; 0044 0045 QueryMaker* queryMaker() override; 0046 0047 private Q_SLOTS: 0048 void slotAddFriendsLoved(); 0049 void slotAddFriendsPersonal(); 0050 0051 private: 0052 QMap< QString, QNetworkReply* > m_jobs; 0053 Meta::ServiceGenre *m_friendsLoved; 0054 Meta::ServiceGenre *m_friendsPersonal; 0055 }; 0056 0057 } //namespace Collections 0058 0059 #endif // LASTFMSERVICECOLLECTION_H