xbmc
GameSettings.h
1 /*
2  * Copyright (C) 2012-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "settings/lib/ISettingCallback.h"
12 #include "utils/Observer.h"
13 
14 #include <string>
15 
16 class CSetting;
17 class CSettings;
18 
19 namespace KODI
20 {
21 namespace GAME
22 {
23 
25 {
26 public:
27  CGameSettings();
28  ~CGameSettings() override;
29 
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;
40 
41  // Inherited from ISettingCallback
42  void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
43 
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;
49 
50  // Construction parameters
51  std::shared_ptr<CSettings> m_settings;
52 };
53 
54 } // namespace GAME
55 } // namespace KODI
Wrapper around CSettingsManager responsible for properly setting up the settings manager and register...
Definition: Settings.h:27
Definition: ISettingCallback.h:16
Definition: GameSettings.h:24
Setting base class containing all the properties which are common to all settings independent of the ...
Definition: Setting.h:46
void SetShowOSDHelp(bool bShow)
Definition: GameSettings.cpp:75
Controller configuration window.
Definition: AudioDecoder.h:18
void OnSettingChanged(const std::shared_ptr< const CSetting > &setting) override
The value of the given setting has changed.
Definition: GameSettings.cpp:118
Definition: Observer.h:44