Qmmp
Loading...
Searching...
No Matches
playlistformat.h
1/***************************************************************************
2 * Copyright (C) 2006-2022 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
21#ifndef PALYLISTFORMAT_H
22#define PALYLISTFORMAT_H
23
24#include <QStringList>
25#include "qmmpui_export.h"
26
27class PlayListTrack;
28
33{
34 QString shortName;
35 QStringList filters;
36 QStringList contentTypes;
37};
38
42class QMMPUI_EXPORT PlayListFormat
43{
44public:
48 virtual ~PlayListFormat() {}
57 virtual QList<PlayListTrack*> decode(const QByteArray &contents) = 0;
64 virtual QByteArray encode(const QList<PlayListTrack*> &contents, const QString &path) = 0;
65};
66
67Q_DECLARE_INTERFACE(PlayListFormat,"PlayListFormat/1.0")
68
69#endif
Abstract interface for playlist formats.
Definition playlistformat.h:43
virtual PlayListFormatProperties properties() const =0
virtual QByteArray encode(const QList< PlayListTrack * > &contents, const QString &path)=0
virtual ~PlayListFormat()
Definition playlistformat.h:48
virtual QList< PlayListTrack * > decode(const QByteArray &contents)=0
The PlayListTrack class provides a track for use with the PlayListModel class.
Definition playlisttrack.h:37
Helper structure to store playlist format properies.
Definition playlistformat.h:33
QStringList contentTypes
Definition playlistformat.h:36
QStringList filters
Definition playlistformat.h:35
QString shortName
Definition playlistformat.h:34