Qmmp
enginefactory.h
1 /***************************************************************************
2  * Copyright (C) 2009-2019 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 
34 class AbstractEngine;
35 
39 class QMMP_EXPORT EngineProperties
40 {
41 public:
46  {
47  hasAbout = false;
48  hasSettings = false;
49  }
50  QString name;
51  QString shortName;
52  QStringList filters;
53  QString description;
54  QStringList contentTypes;
55  QStringList protocols;
56  bool hasAbout;
57  bool hasSettings;
58 };
63 {
64 public:
68  virtual ~EngineFactory() {}
72  virtual bool supports(const QString &source) const = 0;
76  virtual EngineProperties properties() const = 0;
81  virtual AbstractEngine *create(QObject *parent = 0) = 0;
90  virtual QList<TrackInfo *> createPlayList(const QString &fileName, TrackInfo::Parts parts, QStringList *ignoredPaths) = 0;
97  virtual MetaDataModel* createMetaDataModel(const QString &path, bool readOnly) = 0;
102  virtual void showSettings(QWidget *parent) = 0;
107  virtual void showAbout(QWidget *parent) = 0;
111  virtual QString translation() const = 0;
112 };
113 
114 Q_DECLARE_INTERFACE(EngineFactory, "EngineFactory/1.0")
115 
116 #endif
QString description
Definition: enginefactory.h:53
Helper class to store custom audio engine properies.
Definition: enginefactory.h:39
The MetaDataModel is the base interface class of metadata access.
Definition: metadatamodel.h:80
EngineProperties()
Definition: enginefactory.h:45
virtual QList< TrackInfo * > createPlayList(const QString &fileName, TrackInfo::Parts parts, QStringList *ignoredPaths)=0
bool hasAbout
Definition: enginefactory.h:56
QString shortName
Definition: enginefactory.h:51
virtual AbstractEngine * create(QObject *parent=0)=0
bool hasSettings
Definition: enginefactory.h:57
virtual QString translation() const =0
virtual void showSettings(QWidget *parent)=0
virtual bool supports(const QString &source) const =0
The AbstractEngine class provides the base interface class of audio audio engines.
Definition: abstractengine.h:39
virtual ~EngineFactory()
Definition: enginefactory.h:68
QStringList protocols
Definition: enginefactory.h:55
Engine plugin interface.
Definition: enginefactory.h:62
virtual EngineProperties properties() const =0
QStringList filters
Definition: enginefactory.h:52
virtual void showAbout(QWidget *parent)=0
virtual MetaDataModel * createMetaDataModel(const QString &path, bool readOnly)=0
QStringList contentTypes
Definition: enginefactory.h:54
QString name
Definition: enginefactory.h:50