summaryrefslogtreecommitdiffstats
path: root/src/library/parserm3u.h
blob: 1b8829fa8d0d3ba3f6b53f8e796a8aad664483a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// C++ Interface: parserm3u
//
// Description: Interface header for the example parser ParserM3u
//
//
// Author: Ingo Kossyk <kossyki@cs.tu-berlin.de>, (C) 2004
// Author: Tobias Rafreider trafreider@mixxx.org, (C) 2011
//
// Copyright: See COPYING file that comes with this distribution
//
//
#pragma once

#include <QDir>
#include <QTextStream>
#include <QList>
#include <QString>

#include "library/parser.h"

class ParserM3u : public Parser
{
    Q_OBJECT
public:
    ParserM3u();
    ~ParserM3u();
    /**Overwriting function parse in class Parser**/
    QList<QString> parse(const QString&);
    //Playlist Export
    static bool writeM3UFile(const QString &file_str, const QList<QString> &items, bool useRelativePath, bool useUtf8);
    static bool writeM3UFile(const QString &file, const QList<QString> &items, bool useRelativePath);
    static bool writeM3U8File(const QString &file_str, const QList<QString> &items, bool useRelativePath);

private:
    /**Reads a line from the file and returns filepath if a valid file**/
    QString getFilePath(QTextStream* stream, const QString& basePath);


};