Sayonara Player
SoundcloudDataFetcher.h
1 /* SoundcloudDataFetcher.h */
2 
3 /* Copyright (C) 2011-2016 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program 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.
11 
12  * This program 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.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 
22 
23 #ifndef SOUNDCLOUDDATAFETCHER_H
24 #define SOUNDCLOUDDATAFETCHER_H
25 
26 
27 #include "Helper/MetaData/MetaDataList.h"
28 #include "Helper/MetaData/Album.h"
29 #include "Helper/MetaData/Artist.h"
30 
31 
32 
33 
34 class SoundcloudDataFetcher : public QObject
35 {
36  Q_OBJECT
37 
38 signals:
39  void sig_ext_artists_fetched(const ArtistList& artists);
40  void sig_artists_fetched(const ArtistList& artists);
41  void sig_playlists_fetched(const AlbumList& albums);
42  void sig_tracks_fetched(const MetaDataList& v_md);
43 
44 public:
45  SoundcloudDataFetcher(QObject* parent=nullptr);
47 
48  void search_artists(const QString& artist_name);
49  void get_artist(int artist_id);
50 
51  void get_playlists_by_artist(int artist_id);
52  void get_tracks_by_artist(int artist_id);
53 
54  void clear();
55 
56 private slots:
57 
58  void artists_fetched(bool success);
59  void playlist_tracks_fetched(bool success);
60  void tracks_fetched(bool success);
61 
62 private:
63  MetaDataList _playlist_tracks;
64  AlbumList _playlists;
65  ArtistList _artists;
66  int _artist_id;
67 
68 };
69 
70 #endif // SOUNDCLOUDDataFetcher_H
Definition: MetaDataList.h:44
The AlbumList class.
Definition: Album.h:72
ArtistList.
Definition: Artist.h:64
Definition: SoundcloudDataFetcher.h:34