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