Qmmp
Loading...
Searching...
No Matches
enginefactory.h
1/***************************************************************************
2 * Copyright (C) 2009-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 EMGINEFACTORY_H
22#define EMGINEFACTORY_H
23
24#include <QStringList>
25#include <QList>
26#include <QMap>
27#include <QIODevice>
28#include "qmmp_export.h"
29#include "qmmp.h"
30#include "trackinfo.h"
31#include "abstractengine.h"
32#include "metadatamodel.h"
33
34class AbstractEngine;
35
40{
41 QString name;
42 QString shortName;
43 QStringList filters;
44 QString description;
45 QStringList contentTypes;
46 QStringList protocols;
47 bool hasAbout = false;
48 bool hasSettings = false;
49};
50
55{
56public:
60 virtual ~EngineFactory() {}
64 virtual bool supports(const QString &source) const = 0;
68 virtual EngineProperties properties() const = 0;
73 virtual AbstractEngine *create(QObject *parent = nullptr) = 0;
82 virtual QList<TrackInfo *> createPlayList(const QString &fileName, TrackInfo::Parts parts, QStringList *ignoredPaths) = 0;
89 virtual MetaDataModel* createMetaDataModel(const QString &path, bool readOnly) = 0;
94 virtual void showSettings(QWidget *parent) = 0;
99 virtual void showAbout(QWidget *parent) = 0;
103 virtual QString translation() const = 0;
104};
105
106Q_DECLARE_INTERFACE(EngineFactory, "EngineFactory/1.0")
107
108#endif
The AbstractEngine class provides the base interface class of audio audio engines.
Definition abstractengine.h:40
Engine plugin interface.
Definition enginefactory.h:55
virtual QList< TrackInfo * > createPlayList(const QString &fileName, TrackInfo::Parts parts, QStringList *ignoredPaths)=0
virtual EngineProperties properties() const =0
virtual QString translation() const =0
virtual MetaDataModel * createMetaDataModel(const QString &path, bool readOnly)=0
virtual void showSettings(QWidget *parent)=0
virtual void showAbout(QWidget *parent)=0
virtual ~EngineFactory()
Definition enginefactory.h:60
virtual bool supports(const QString &source) const =0
virtual AbstractEngine * create(QObject *parent=nullptr)=0
The MetaDataModel is the base interface class of metadata access.
Definition metadatamodel.h:81
Structure to store custom audio engine properies.
Definition enginefactory.h:40
bool hasAbout
Definition enginefactory.h:47
QStringList contentTypes
Definition enginefactory.h:45
QStringList filters
Definition enginefactory.h:43
QString description
Definition enginefactory.h:44
bool hasSettings
Definition enginefactory.h:48
QStringList protocols
Definition enginefactory.h:46
QString name
Definition enginefactory.h:41
QString shortName
Definition enginefactory.h:42