Qmmp
playlistparser.h
1 /***************************************************************************
2  * Copyright (C) 2008-2020 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();
46  static QStringList filters();
51  static bool isPlayList(const QString &url);
56  static PlayListFormat *findByMime(const QString &mime);
61  static PlayListFormat *findByPath(const QString &filePath);
66  static PlayListFormat *findByUrl(const QUrl &url);
72  static void savePlayList(QList<PlayListTrack *> tracks, const QString &f_name);
78  static QList<PlayListTrack *> loadPlaylist(const QString &f_name);
85  static QList<PlayListTrack *> loadPlaylist(const QString &fmt, const QByteArray &content);
89  static void loadFormats();
90 
91 private:
92  PlayListParser(){}
93 
94  static QList<PlayListFormat*> *m_formats;
95 
96 
97 };
98 
99 #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