TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
enginefactory.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2009-2024 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 "trackinfo.h"
29 #include "abstractengine.h"
30 #include "metadatamodel.h"
31 
32 class AbstractEngine;
33 
38 {
39  QString name;
40  QString shortName;
41  QStringList filters;
42  QString description;
43  QStringList contentTypes;
44  QStringList protocols;
45  bool hasSettings = false;
46 };
47 
52 {
53 public:
57  virtual ~EngineFactory() = default;
58 
62  virtual bool supports(const QString &source) const = 0;
66  virtual EngineProperties properties() const = 0;
71  virtual AbstractEngine *create(QObject *parent = nullptr) = 0;
80  virtual QList<TrackInfo*> createPlayList(const QString &fileName, TrackInfo::Parts parts, QStringList *ignoredPaths) = 0;
87  virtual MetaDataModel* createMetaDataModel(const QString &path, bool readOnly) = 0;
88 
89 };
90 
91 Q_DECLARE_INTERFACE(EngineFactory, "EngineFactory/1.0")
92 
93 #endif
Structure to store custom audio engine properies.
Definition: enginefactory.h:37
QStringList protocols
Definition: enginefactory.h:44
The MetaDataModel is the base interface class of metadata access.
Definition: metadatamodel.h:78
QStringList filters
Definition: enginefactory.h:41
QStringList contentTypes
Definition: enginefactory.h:43
The AbstractEngine class provides the base interface class of audio audio engines.
#define QMMP_EXPORT
Definition: qmmp_export.h:29
Engine plugin interface.
Definition: enginefactory.h:51