Merge pull request #24470 from fuzzard/release_20.3
[xbmc.git] / xbmc / games / GameSettings.h
blob63ee67b37990bc8355f3ec78c241a98812532852
1 /*
2 * Copyright (C) 2012-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 "settings/lib/ISettingCallback.h"
12 #include "utils/Observer.h"
14 #include <string>
16 class CSetting;
17 class CSettings;
19 namespace KODI
21 namespace GAME
24 class CGameSettings : public ISettingCallback, public Observable
26 public:
27 CGameSettings();
28 ~CGameSettings() override;
30 // General settings
31 bool GamesEnabled();
32 bool ShowOSDHelp();
33 void SetShowOSDHelp(bool bShow);
34 void ToggleGames();
35 bool AutosaveEnabled();
36 bool RewindEnabled();
37 unsigned int MaxRewindTimeSec();
38 std::string GetRAUsername() const;
39 std::string GetRAToken() const;
41 // Inherited from ISettingCallback
42 void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
44 private:
45 std::string LoginToRA(const std::string& username,
46 const std::string& password,
47 std::string token) const;
48 bool IsAccountVerified(const std::string& username, const std::string& token) const;
50 // Construction parameters
51 std::shared_ptr<CSettings> m_settings;
54 } // namespace GAME
55 } // namespace KODI