Sayonara Player
PlaylistLoader.h
1 /* PlaylistLoader.h */
2 
3 /* Copyright (C) 2011-2017 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 #ifndef PLAYLISTLOADER_H
22 #define PLAYLISTLOADER_H
23 
24 #include "Helper/Settings/SayonaraClass.h"
25 #include "Helper/Playlist/CustomPlaylistFwd.h"
26 
27 #include <QObject>
28 
29 class PlaylistDBWrapper;
30 
36  public QObject,
37  protected SayonaraClass
38 {
39  Q_OBJECT
40 
41 private:
42 
43  CustomPlaylists _playlists;
44 
45  PlaylistDBWrapper* _playlist_db_connector=nullptr;
46 
47  int _last_playlist_idx;
48  int _last_track_idx;
49 
50 
51 public:
52  explicit PlaylistLoader(QObject* parent=nullptr);
53  virtual ~PlaylistLoader();
54 
55 
56  CustomPlaylists get_playlists() const;
57  int get_last_playlist_idx() const;
58  int get_last_track_idx() const;
59  int create_playlists();
60 };
61 
62 #endif // PLAYLISTLOADER_H
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:29
PlaylistDBWrapper is responsible for fetching playlist data from database, especially the handling be...
Definition: PlaylistDBWrapper.h:36
The PlaylistLoader class.
Definition: PlaylistLoader.h:35