summaryrefslogtreecommitdiff
path: root/SessionLoader.h
blob: 5676cec05164464f856ef747ed9bf6f914fef2d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/** \file SessionLoader.h
\brief Define the class to load the plugin and lunch it
\author alpha_one_x86
\version 0.3
\date 2010
\licence GPL3, see the file COPYING

This class load ALL plugin compatible to listen and catch the copy/move
*/

#ifndef SESSIONLOADER_H
#define SESSIONLOADER_H

#include <QObject>
#include <QList>
#include <QPluginLoader>
#include <QString>
#include <QStringList>

#include "interface/PluginInterface_SessionLoader.h"
#include "PluginsManager.h"
#include "GlobalClass.h"

/// \todo SessionLoader -> put plugin by plugin loading to add plugin no reload all
/// \todo async the plugin call

/** \brief manage all SessionLoader plugin */
class SessionLoader : public QObject, GlobalClass
{
	Q_OBJECT
	public:
		explicit SessionLoader(QObject *parent = 0);
		~SessionLoader();
	private slots:
		void onePluginAdded(const PluginsAvailable &plugin);
		void onePluginWillBeRemoved(const PluginsAvailable &plugin);
		void newOptionValue(const QString &groupName,const QString &variableName,const QVariant &value);
		#ifdef ULTRACOPIER_DEBUG
		void debugInformation(DebugLevel level,const QString& fonction,const QString& text,const QString& file,const int& ligne);
		#endif // ULTRACOPIER_DEBUG
	private:
		//variable
		struct LocalPlugin
		{
			PluginInterface_SessionLoader * sessionLoaderInterface;
			QPluginLoader * pluginLoader;
			QString path;
			LocalPluginOptions *options;
		};
		QList<LocalPlugin> pluginList;
};

#endif // SESSIONLOADER_H