kodi
PVRGUIActionsPowerManagement.h
1 /*
2  * Copyright (C) 2016-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 "pvr/IPVRComponent.h"
12 #include "pvr/settings/PVRSettings.h"
13 
14 #include <memory>
15 
16 class CFileItem;
17 
18 namespace PVR
19 {
20 class CPVRTimerInfoTag;
21 
23 {
24 public:
26  ~CPVRGUIActionsPowerManagement() override = default;
27 
36  bool CanSystemPowerdown(bool bAskUser = true) const;
37 
38 private:
40  CPVRGUIActionsPowerManagement const& operator=(CPVRGUIActionsPowerManagement const&) = delete;
41 
42  bool AllLocalBackendsIdle(std::shared_ptr<CPVRTimerInfoTag>& causingEvent) const;
43  bool EventOccursOnLocalBackend(const std::shared_ptr<CPVRTimerInfoTag>& event) const;
44  bool IsNextEventWithinBackendIdleTime() const;
45 
46  CPVRSettings m_settings;
47 };
48 
49 namespace GUI
50 {
51 // pretty scope and name
52 using PowerManagement = CPVRGUIActionsPowerManagement;
53 } // namespace GUI
54 
55 } // namespace PVR
Definition: PVRGUIActionsPowerManagement.h:22
Definition: ContextMenuManager.h:24
bool CanSystemPowerdown(bool bAskUser=true) const
Check whether the system Kodi is running on can be powered down (shutdown/reboot/suspend/hibernate) w...
Definition: PVRGUIActionsPowerManagement.cpp:37
Definition: IPVRComponent.h:13
Definition: PVRSettings.h:27
Represents a file on a share.
Definition: FileItem.h:102