Qmmp
Loading...
Searching...
No Matches
qmmpplugincache_p.h
1/***************************************************************************
2 * Copyright (C) 2013-2025 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 QString shortName() const;
44 QString file() const;
45 QStringList filters() const;
46 QStringList contentTypes() const;
47 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 void update(QSettings *settings);
58 static void cleanup(QSettings *settings);
59
60private:
61 QObject *instance();
62 void loadTranslation(const QString &translation);
63 QString m_path;
64 QString m_shortName;
65 QStringList m_filters, m_contentTypes, m_protocols;
66 bool m_error = false;
67 QObject *m_instance = nullptr;
68 DecoderFactory *m_decoderFactory = nullptr;
69 OutputFactory *m_outputFactory = nullptr;
70 EngineFactory *m_engineFactory = nullptr;
71 EffectFactory *m_effectFactory = nullptr;
72 InputSourceFactory *m_inputSourceFactory = nullptr;
73 int m_priority = 0;
74};
75
76#endif // QMMPPLUGINCACHE_P_H
Input plugin interface (decoder factory).
Definition decoderfactory.h:54
Effect plugin interface (effect factory).
Definition effectfactory.h:57
Engine plugin interface.
Definition enginefactory.h:55
Transport plugin interface.
Definition inputsourcefactory.h:51
Output plugin interface (output factory).
Definition outputfactory.h:49