summaryrefslogtreecommitdiffstats
path: root/xbmc/games/GameSettings.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/games/GameSettings.h')
-rw-r--r--xbmc/games/GameSettings.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/xbmc/games/GameSettings.h b/xbmc/games/GameSettings.h
new file mode 100644
index 0000000..63ee67b
--- /dev/null
+++ b/xbmc/games/GameSettings.h
@@ -0,0 +1,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