diff options
Diffstat (limited to 'plugins/PluginLoader/catchcopy-v0002/pluginLoader.h')
-rw-r--r--[-rwxr-xr-x] | plugins/PluginLoader/catchcopy-v0002/pluginLoader.h | 74 |
1 files changed, 35 insertions, 39 deletions
diff --git a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h index 79ba305..0246cd1 100755..100644 --- a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h +++ b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h @@ -1,67 +1,63 @@ /** \file pluginLoader.h \brief Define the plugin loader \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef PLUGIN_LOADER_TEST_H #define PLUGIN_LOADER_TEST_H #include <QObject> -#include <QtCore> #include <QMessageBox> #include <QString> #include <QStringList> #include <QProcess> #include <QSet> -#include <windows.h> -#include <tlhelp32.h> +#ifdef Q_OS_WIN32 + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include <windows.h> + #include <tlhelp32.h> +#endif #include "../../../interface/PluginInterface_PluginLoader.h" #include "Environment.h" #include "OptionsWidget.h" /// \brief \brief Define the plugin loader -class PluginLoader : public PluginInterface_PluginLoader +class WindowsExplorerLoader : public PluginInterface_PluginLoader { - Q_OBJECT - Q_INTERFACES(PluginInterface_PluginLoader) + Q_OBJECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.PluginLoader/1.0.0.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_PluginLoader) public: - PluginLoader(); - ~PluginLoader(); - /// \brief try enable/disable the catching - void setEnabled(bool); - /// \brief to set resources, writePath can be empty if read only mode - void setResources(OptionInterface * options,QString writePath,QString pluginPath,bool portableVersion); - /// \brief to get the options widget, NULL if not have - QWidget * options(); + WindowsExplorerLoader(); + ~WindowsExplorerLoader(); + /// \brief try enable/disable the catching + void setEnabled(const bool &needBeRegistred); + /// \brief to set resources, writePath can be empty if read only mode + void setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,const bool &portableVersion); + /// \brief to get the options widget, NULL if not have + QWidget * options(); public slots: - /// \brief to reload the translation, because the new language have been loaded - void newLanguageLoaded(); + /// \brief to reload the translation, because the new language have been loaded + void newLanguageLoaded(); private: - QString pluginPath; - QStringList importantDll,secondDll; - QSet<QString> correctlyLoaded; - bool RegisterShellExtDll(QString dllPath, bool bRegister,bool quiet); - bool checkExistsDll(); - bool dllChecked; - bool needBeRegistred; - bool WINAPI DLLEjecteurW(DWORD dwPid,PWSTR szDLLPath); - void HardUnloadDLL(QString myDllName); - OptionInterface * optionsEngine; - OptionsWidget optionsWidget; - bool allDllIsImportant,Debug; - bool changeOfArchDetected,is64Bits; -signals: - void newState(CatchState); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - /// \brief To debug source - void debugInformation(DebugLevel level,QString fonction,QString text,QString file,int ligne); - #endif + QString pluginPath; + QStringList importantDll,secondDll; + QSet<QString> correctlyLoaded; + bool RegisterShellExtDll(const QString &dllPath, const bool &bRegister,const bool &quiet); + bool checkExistsDll(); + bool dllChecked; + bool needBeRegistred; + OptionInterface * optionsEngine; + OptionsWidget *optionsWidget; + bool allDllIsImportant,Debug; + bool changeOfArchDetected,is64Bits; private slots: - void setAllDllIsImportant(bool allDllIsImportant); - void setDebug(bool Debug); + void setAllDllIsImportant(bool allDllIsImportant); + void setDebug(bool Debug); }; #endif // PLUGIN_LOADER_TEST_H |