kodi
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 
28 {
29 public:
30  CGameSettings();
31  ~CGameSettings() override;
32 
33  // General settings
34  bool GamesEnabled();
35  bool ShowOSDHelp();
36  void SetShowOSDHelp(bool bShow);
37  void ToggleGames();
38  bool AutosaveEnabled();
39  bool RewindEnabled();
40  unsigned int MaxRewindTimeSec();
41  std::string GetRAUsername() const;
42  std::string GetRAToken() const;
43 
44  // Inherited from ISettingCallback
45  void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
46 
47 private:
48  std::string LoginToRA(const std::string& username,
49  const std::string& password,
50  std::string token) const;
51  bool IsAccountVerified(const std::string& username, const std::string& token) const;
52 
53  // Construction parameters
54  std::shared_ptr<CSettings> m_settings;
55 };
56 
57 } // namespace GAME
58 } // 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:27
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
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