2 * Copyright (C) 2005-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.
11 #include "IPowerSyscall.h"
22 struct IntegerSettingOption
;
24 // This class will wrap and handle PowerSyscalls.
25 // It will handle and decide if syscalls are needed.
26 class CPowerManager
: public IPowerEventsCallback
30 ~CPowerManager() override
;
49 static void SettingOptionsShutdownStatesFiller(const std::shared_ptr
<const CSetting
>& setting
,
50 std::vector
<IntegerSettingOption
>& list
,
54 IPowerSyscall
* GetPowerSyscall() const { return m_instance
.get(); }
57 void OnSleep() override
;
58 void OnWake() override
;
59 void OnLowBattery() override
;
60 void RestorePlayerState();
61 void StorePlayerState();
63 // Construction parameters
64 std::shared_ptr
<CSettings
> m_settings
;
66 std::unique_ptr
<IPowerSyscall
> m_instance
;
67 std::unique_ptr
<CFileItem
> m_lastPlayedFileItem
;
68 std::string m_lastUsedPlayer
;