Qmmp
enginefactory.h
1 /***************************************************************************
2  * Copyright (C) 2009-2015 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 class QObject;
25 class QString;
26 class QIODevice;
27 class QWidget;
28 class QTranslator;
29 class QStringList;
30 class MetaDataModel;
31 class FileInfo;
32 class AbstractEngine;
33 
38 {
39 public:
44  {
45  hasAbout = false;
46  hasSettings = false;
47  }
48  QString name;
49  QString shortName;
50  QStringList filters;
51  QString description;
52  QStringList contentTypes;
53  QStringList protocols;
54  bool hasAbout;
55  bool hasSettings;
56 };
61 {
62 public:
66  virtual ~EngineFactory() {}
70  virtual bool supports(const QString &source) const = 0;
74  virtual const EngineProperties properties() const = 0;
79  virtual AbstractEngine *create(QObject *parent = 0) = 0;
88  virtual QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *ignoredPaths) = 0;
95  virtual MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0) = 0;
100  virtual void showSettings(QWidget *parent) = 0;
105  virtual void showAbout(QWidget *parent) = 0;
110  virtual QTranslator *createTranslator(QObject *parent) = 0;
111 };
112 
113 Q_DECLARE_INTERFACE(EngineFactory, "EngineFactory/1.0")
114 
115 #endif
The FileInfo class stores metadata and audio information about media file or stream.
Definition: fileinfo.h:32
QString description
Definition: enginefactory.h:51
Helper class to store custom audio engine properies.
Definition: enginefactory.h:37
The MetaDataModel is the base interface class of metadata access.
Definition: metadatamodel.h:34
EngineProperties()
Definition: enginefactory.h:43
bool hasAbout
Definition: enginefactory.h:54
QString shortName
Definition: enginefactory.h:49
bool hasSettings
Definition: enginefactory.h:55
The AbstractEngine class provides the base interface class of audio audio engines.
Definition: abstractengine.h:38
virtual ~EngineFactory()
Definition: enginefactory.h:66
QStringList protocols
Definition: enginefactory.h:53
Engine plugin interface.
Definition: enginefactory.h:60
QStringList filters
Definition: enginefactory.h:50
QStringList contentTypes
Definition: enginefactory.h:52
QString name
Definition: enginefactory.h:48