summaryrefslogtreecommitdiff
path: root/src/gamefeaturesproxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gamefeaturesproxy.h')
-rw-r--r--src/gamefeaturesproxy.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gamefeaturesproxy.h b/src/gamefeaturesproxy.h
new file mode 100644
index 00000000..9ffd6b04
--- /dev/null
+++ b/src/gamefeaturesproxy.h
@@ -0,0 +1,34 @@
+#ifndef GAMEFEATURESPROXY_H
+#define GAMEFEATURESPROXY_H
+
+#include "igamefeatures.h"
+
+class GameFeatures;
+class OrganizerProxy;
+
+class GameFeaturesProxy : public MOBase::IGameFeatures
+{
+public:
+ GameFeaturesProxy(OrganizerProxy* coreProxy, GameFeatures& gameFeatures);
+
+ bool registerFeature(QStringList const& games,
+ std::shared_ptr<MOBase::GameFeature> feature, int priority,
+ bool replace) override;
+ bool registerFeature(MOBase::IPluginGame* game,
+ std::shared_ptr<MOBase::GameFeature> feature, int priority,
+ bool replace) override;
+ bool registerFeature(std::shared_ptr<MOBase::GameFeature> feature, int priority,
+ bool replace) override;
+ bool unregisterFeature(std::shared_ptr<MOBase::GameFeature> feature) override;
+
+protected:
+ std::shared_ptr<MOBase::GameFeature>
+ gameFeatureImpl(std::type_info const& info) const override;
+ int unregisterFeaturesImpl(std::type_info const& info) override;
+
+private:
+ GameFeatures& m_Features;
+ OrganizerProxy& m_CoreProxy;
+};
+
+#endif