Qmmp
playlistparser.h
1 /***************************************************************************
2  * Copyright (C) 2008-2018 by Ilya Kotov *
3  * forkotov02@ya.ru *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef PLAYLISTPARSER_H
21 #define PLAYLISTPARSER_H
22 
23 #include <QStringList>
24 #include <QUrl>
25 #include "playlisttrack.h"
26 #include "playlistformat.h"
27 #include "qmmpui_export.h"
28 
32 class QMMPUI_EXPORT PlayListParser
33 {
34 public:
38  static QList<PlayListFormat*> formats();
42  static QStringList nameFilters();
47  static bool isPlayList(const QString &url);
52  static PlayListFormat *findByMime(const QString &mime);
57  static PlayListFormat *findByPath(const QString &filePath);
62  static PlayListFormat *findByUrl(const QUrl &url);
68  static void savePlayList(QList<PlayListTrack *> tracks, const QString &f_name);
74  static QList<PlayListTrack *> loadPlaylist(const QString &f_name);
81  static QList<PlayListTrack *> loadPlaylist(const QString &fmt, const QByteArray &content);
85  static void loadFormats();
86 
87 private:
88  PlayListParser(){}
89 
90  static QList<PlayListFormat*> *m_formats;
91 
92 
93 };
94 
95 #endif
Abstract interface for playlist formats.
Definition: playlistformat.h:42
The PlaylistParser class provides a simple api to access playlist format plugins. ...
Definition: playlistparser.h:32