summaryrefslogtreecommitdiffstats
path: root/src/library/parserpls.h
blob: a7ca089da3ad238a4295c21d1ce9ce93c43b40d5 (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
//
// C++ Interface: parserpls
//
// Description: Interface header for the example parser PlsParser
//
//
// Author: Ingo Kossyk <kossyki@cs.tu-berlin.de>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#pragma once

#include "library/parser.h"

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

class ParserPls : public Parser {
    Q_OBJECT
  public:
    ParserPls();
    virtual ~ParserPls();
    /**Can be called to parse a pls file**/
    QList<QString> parse(const QString&);
    //Playlist Export
    static bool writePLSFile(const QString &file, const QList<QString> &items, bool useRelativePath);

  private:
    /**Returns the Number of entries in the pls file**/
    long getNumEntries(QTextStream*);
    /**Reads a line from the file and returns filepath**/
    QString getFilePath(QTextStream*, const QString& basePath);

};