1 // 2 // C++ Interface: parserpls 3 // 4 // Description: Interface header for the example parser PlsParser 5 // 6 // 7 // Author: Ingo Kossyk <kossyki@cs.tu-berlin.de>, (C) 2004 8 // 9 // Copyright: See COPYING file that comes with this distribution 10 // 11 // 12 #pragma once 13 14 #include "library/parser.h" 15 16 #include <QTextStream> 17 #include <QList> 18 #include <QString> 19 20 class ParserPls : public Parser { 21 Q_OBJECT 22 public: 23 ParserPls(); 24 virtual ~ParserPls(); 25 /**Can be called to parse a pls file**/ 26 QList<QString> parse(const QString&); 27 //Playlist Export 28 static bool writePLSFile(const QString &file, const QList<QString> &items, bool useRelativePath); 29 30 private: 31 /**Returns the Number of entries in the pls file**/ 32 long getNumEntries(QTextStream*); 33 /**Reads a line from the file and returns filepath**/ 34 QString getFilePath(QTextStream*, const QString& basePath); 35 36 }; 37