Mercurial > hg > svcore
comparison data/fileio/PlaylistFileReader.h @ 401:d030801113b6
* Add ability to load playlists from a FileSource (used by runner)
author | Chris Cannam |
---|---|
date | Mon, 07 Apr 2008 16:55:21 +0000 |
parents | c022976d18e8 |
children | 5746c559af15 |
comparison
equal
deleted
inserted
replaced
400:78dd9b35559b | 401:d030801113b6 |
---|---|
14 */ | 14 */ |
15 | 15 |
16 #ifndef _PLAYLIST_FILE_READER_H_ | 16 #ifndef _PLAYLIST_FILE_READER_H_ |
17 #define _PLAYLIST_FILE_READER_H_ | 17 #define _PLAYLIST_FILE_READER_H_ |
18 | 18 |
19 #include "FileSource.h" | |
20 | |
19 #include <QString> | 21 #include <QString> |
20 | 22 |
21 #include <vector> | 23 #include <vector> |
22 #include <set> | 24 #include <set> |
23 | 25 |
27 { | 29 { |
28 public: | 30 public: |
29 typedef std::vector<QString> Playlist; | 31 typedef std::vector<QString> Playlist; |
30 | 32 |
31 PlaylistFileReader(QString path); | 33 PlaylistFileReader(QString path); |
34 PlaylistFileReader(FileSource source); | |
32 virtual ~PlaylistFileReader(); | 35 virtual ~PlaylistFileReader(); |
33 | 36 |
34 virtual bool isOK() const; | 37 virtual bool isOK() const; |
35 virtual QString getError() const; | 38 virtual QString getError() const; |
36 virtual Playlist load() const; | 39 virtual Playlist load() const; |
37 | 40 |
38 static void getSupportedExtensions(std::set<QString> &extensions); | 41 static void getSupportedExtensions(std::set<QString> &extensions); |
39 | 42 |
40 protected: | 43 protected: |
44 void init(); | |
45 | |
46 FileSource m_source; | |
41 QFile *m_file; | 47 QFile *m_file; |
42 QString m_error; | 48 QString m_error; |
43 }; | 49 }; |
44 | 50 |
45 #endif | 51 #endif |