1 //
2 // C++ Interface: parserm3u
3 //
4 // Description: Interface header for the example parser ParserM3u
5 //
6 //
7 // Author: Ingo Kossyk <kossyki@cs.tu-berlin.de>, (C) 2004
8 // Author: Tobias Rafreider trafreider@mixxx.org, (C) 2011
9 //
10 // Copyright: See COPYING file that comes with this distribution
11 //
12 //
13 #pragma once
14 
15 #include <QDir>
16 #include <QTextStream>
17 #include <QList>
18 #include <QString>
19 
20 #include "library/parser.h"
21 
22 class ParserM3u : public Parser
23 {
24     Q_OBJECT
25 public:
26     ParserM3u();
27     ~ParserM3u();
28     /**Overwriting function parse in class Parser**/
29     QList<QString> parse(const QString&);
30     //Playlist Export
31     static bool writeM3UFile(const QString &file_str, const QList<QString> &items, bool useRelativePath, bool useUtf8);
32     static bool writeM3UFile(const QString &file, const QList<QString> &items, bool useRelativePath);
33     static bool writeM3U8File(const QString &file_str, const QList<QString> &items, bool useRelativePath);
34 
35 private:
36     /**Reads a line from the file and returns filepath if a valid file**/
37     QString getFilePath(QTextStream* stream, const QString& basePath);
38 
39 
40 };
41