diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-10-11 21:17:34 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-10-11 21:17:34 +0200 |
| commit | 3932371cd12ae7ec0812fbb2db3315448e18f1a8 (patch) | |
| tree | 9751fce7edd8d6042f3f78bdfecedea520338b83 /src/organizerproxy.h | |
| parent | 0363b73adb75714c94a7a7cea2840a9c40ee006e (diff) | |
Use proxy for ModList, PluginList and DownloadManager. Do not use registered callbacks when plugin is inactive.
Diffstat (limited to 'src/organizerproxy.h')
| -rw-r--r-- | src/organizerproxy.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/organizerproxy.h b/src/organizerproxy.h index 8950217d..cc059aa9 100644 --- a/src/organizerproxy.h +++ b/src/organizerproxy.h @@ -1,18 +1,28 @@ #ifndef ORGANIZERPROXY_H
#define ORGANIZERPROXY_H
+#include <memory>
+#include <iplugin.h>
#include <imoinfo.h>
class OrganizerCore;
class PluginContainer;
+class DownloadManagerProxy;
+class ModListProxy;
+class PluginListProxy;
class OrganizerProxy : public MOBase::IOrganizer
{
public:
- OrganizerProxy(OrganizerCore *organizer, PluginContainer *pluginContainer, const QString &pluginName);
+ OrganizerProxy(OrganizerCore *organizer, PluginContainer *pluginContainer, MOBase::IPlugin *plugin);
+
+ /**
+ * @return the plugin corresponding to this proxy.
+ */
+ MOBase::IPlugin* plugin() const { return m_Plugin; }
virtual MOBase::IModRepositoryBridge *createNexusBridge() const;
virtual QString profileName() const;
@@ -65,7 +75,11 @@ private: OrganizerCore *m_Proxied;
PluginContainer *m_PluginContainer;
- QString m_PluginName;
+ MOBase::IPlugin *m_Plugin;
+
+ std::unique_ptr<DownloadManagerProxy> m_DownloadManagerProxy;
+ std::unique_ptr<ModListProxy> m_ModListProxy;
+ std::unique_ptr<PluginListProxy> m_PluginListProxy;
};
|
