blob: 63ee67b37990bc8355f3ec78c241a98812532852 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*
* Copyright (C) 2012-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#pragma once
#include "settings/lib/ISettingCallback.h"
#include "utils/Observer.h"
#include <string>
class CSetting;
class CSettings;
namespace KODI
{
namespace GAME
{
class CGameSettings : public ISettingCallback, public Observable
{
public:
CGameSettings();
~CGameSettings() override;
// General settings
bool GamesEnabled();
bool ShowOSDHelp();
void SetShowOSDHelp(bool bShow);
void ToggleGames();
bool AutosaveEnabled();
bool RewindEnabled();
unsigned int MaxRewindTimeSec();
std::string GetRAUsername() const;
std::string GetRAToken() const;
// Inherited from ISettingCallback
void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
private:
std::string LoginToRA(const std::string& username,
const std::string& password,
std::string token) const;
bool IsAccountVerified(const std::string& username, const std::string& token) const;
// Construction parameters
std::shared_ptr<CSettings> m_settings;
};
} // namespace GAME
} // namespace KODI
|