[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / settings / SkinSettings.h
blob9ade2458d9c4bdec1a73ec1e5f26c319f5321b4c
1 /*
2 * Copyright (C) 2013-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "addons/Skin.h"
12 #include "settings/ISubSettings.h"
13 #include "threads/CriticalSection.h"
15 #include <memory>
16 #include <set>
17 #include <string>
19 class TiXmlNode;
21 class CSkinSettings : public ISubSettings
23 public:
24 static CSkinSettings& GetInstance();
26 bool Load(const TiXmlNode *settings) override;
27 bool Save(TiXmlNode *settings) const override;
28 void Clear() override;
30 void MigrateSettings(const std::shared_ptr<ADDON::CSkinInfo>& skin);
32 int TranslateString(const std::string &setting);
33 const std::string& GetString(int setting) const;
34 void SetString(int setting, const std::string &label);
36 int TranslateBool(const std::string &setting);
37 bool GetBool(int setting) const;
38 void SetBool(int setting, bool set);
40 /*! \brief Get the skin setting value as an integer value
41 * \param setting - the setting id
42 * \return the setting value as an integer, -1 if no conversion is possible
44 int GetInt(int setting) const;
46 std::set<ADDON::CSkinSettingPtr> GetSettings() const;
47 ADDON::CSkinSettingPtr GetSetting(const std::string& settingId);
48 std::shared_ptr<const ADDON::CSkinSetting> GetSetting(const std::string& settingId) const;
50 void Reset(const std::string &setting);
51 void Reset();
53 protected:
54 CSkinSettings();
55 CSkinSettings(const CSkinSettings&) = delete;
56 CSkinSettings& operator=(CSkinSettings const&) = delete;
57 ~CSkinSettings() override;
59 private:
60 CCriticalSection m_critical;
61 std::set<ADDON::CSkinSettingPtr> m_settings;