summaryrefslogtreecommitdiff
path: root/src/gamefeaturesproxy.h
blob: 9ffd6b0468c0bda6402abfe42699c23138e9313c (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
#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