Qmmp
Loading...
Searching...
No Matches
qmmpplugincache_p.h
1/***************************************************************************
2 * Copyright (C) 2013-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 QMMPPLUGINCACHE_P_H
22#define QMMPPLUGINCACHE_P_H
23
24#include <QString>
25#include <QStringList>
26#include <QObject>
27#include <QSettings>
28
29class DecoderFactory;
30class OutputFactory;
31class EngineFactory;
32class EffectFactory;
34
38class QmmpPluginCache
39{
40public:
41 QmmpPluginCache(const QString &file, QSettings *settings);
42
43 const QString shortName() const;
44 const QString file() const;
45 const QStringList &filters() const;
46 const QStringList &contentTypes() const;
47 const QStringList &protocols() const;
48 int priority() const;
49 bool hasError() const;
50
51 DecoderFactory *decoderFactory();
52 OutputFactory *outputFactory();
53 EngineFactory *engineFactory();
54 EffectFactory *effectFactory();
55 InputSourceFactory *inputSourceFactory();
56
57 static void cleanup(QSettings *settings);
58
59private:
60 QObject *instance();
61 void loadTranslation(const QString &translation);
62 QString m_path;
63 QString m_shortName;
64 QStringList m_filters, m_contentTypes, m_protocols;
65 bool m_error = false;
66 QObject *m_instance = nullptr;
67 DecoderFactory *m_decoderFactory = nullptr;
68 OutputFactory *m_outputFactory = nullptr;
69 EngineFactory *m_engineFactory = nullptr;
70 EffectFactory *m_effectFactory = nullptr;
71 InputSourceFactory *m_inputSourceFactory = nullptr;
72 int m_priority = 0;
73};
74
75#endif // QMMPPLUGINCACHE_P_H
Input plugin interface (decoder factory).
Definition decoderfactory.h:54
Effect plugin interface (effect factory).
Definition effectfactory.h:56
Engine plugin interface.
Definition enginefactory.h:55
Transport plugin interface.
Definition inputsourcefactory.h:50
Output plugin interface (output factory).
Definition outputfactory.h:48