Sayonara Player
SoundcloudData.h
1 /* SoundcloudData.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 SOUNDCLOUDDATA_H
24 #define SOUNDCLOUDDATA_H
25 
26 #include "Helper/globals.h"
27 #include "SoundcloudJsonParser.h"
28 #include "SoundcloudWebAccess.h"
29 #include "Database/LibraryDatabase.h"
30 
31 
32 /* this is the database interface
33  * TODO: make database connector my parent
34  * TODO: create real (new) database
35  */
36 
38  public LibraryDatabase
39 {
40 
41  Q_OBJECT
42  SINGLETON(SoundcloudData)
43 
44 
45 public:
46  bool db_fetch_tracks(SayonaraQuery& q, MetaDataList& result) override;
47  bool db_fetch_albums(SayonaraQuery& q, AlbumList& result) override;
48  bool db_fetch_artists(SayonaraQuery& q, ArtistList& result) override;
49 
50  int updateArtist(const Artist& artist) override;
51  int insertArtistIntoDatabase (const Artist& artist) override;
52  int insertArtistIntoDatabase (const QString& artist) override;
53 
54  int updateAlbum(const Album& album) override;
55  int insertAlbumIntoDatabase (const Album& album) override;
56  int insertAlbumIntoDatabase (const QString& album) override;
57 
58  bool updateTrack(const MetaData& md) override;
59  bool storeMetadata(const MetaDataList& v_md) override;
60  bool insertTrackIntoDatabase(const MetaData &md, int artistID, int albumID) override;
61 
62  bool apply_fixes() override;
63 };
64 
65 #endif // SOUNDCLOUDDATA_H
Definition: MetaData.h:49
Definition: MetaDataList.h:46
Definition: SayonaraQuery.h:32
The AlbumList class.
Definition: Album.h:73
Definition: LibraryDatabase.h:35
ArtistList.
Definition: Artist.h:64
The Album class.
Definition: Album.h:41
The Artist class.
Definition: Artist.h:36
Definition: SoundcloudData.h:37