Sayonara Player
PlaylistLoader.h
1 /* PlaylistLoader.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 PLAYLISTLOADER_H
24 #define PLAYLISTLOADER_H
25 
26 #include "Helper/MetaData/MetaData.h"
27 #include "Helper/Settings/SayonaraClass.h"
28 
29 #include "Playlist.h"
30 
31 class CustomPlaylist;
32 class PlaylistDBWrapper;
33 class PlaylistHandler;
34 
39 class PlaylistLoader : public QObject, protected SayonaraClass
40 {
41  Q_OBJECT
42 
43 private:
44 
45  CustomPlaylists _playlists;
46 
47  PlaylistDBWrapper* _playlist_db_connector=nullptr;
48 
49  int _last_playlist_idx;
50  int _last_track_idx;
51 
52 
53 public:
54  explicit PlaylistLoader(QObject* parent=nullptr);
55 
56 
57  CustomPlaylists get_playlists() const;
58  int get_playlist_count() const;
59 
60  int get_last_playlist_idx() const;
61  bool was_last_playlist_found() const;
62 
63  int get_last_track_idx() const;
64  bool was_last_track_found() const;
65 
66 
67  int create_playlists();
68 
69 };
70 
71 #endif // PLAYLISTLOADER_H
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:31
PlaylistDBWrapper is responsible for fetching playlist data from database, especially the handling be...
Definition: PlaylistDBWrapper.h:37
Global handler for playlists.
Definition: PlaylistHandler.h:47
The CustomPlaylist class.
Definition: CustomPlaylist.h:50
The PlaylistLoader class.
Definition: PlaylistLoader.h:39