Merge pull request #4425 from wsoltys/suspendinggb
[vuplus_xbmc] / xbmc / powermanagement / windows / Win32PowerSyscall.h
1 /*
2  *      Copyright (C) 2005-2013 Team XBMC
3  *      http://xbmc.org
4  *
5  *  This Program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2, or (at your option)
8  *  any later version.
9  *
10  *  This Program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with XBMC; see the file COPYING.  If not, see
17  *  <http://www.gnu.org/licenses/>.
18  *
19  */
20
21 #pragma once
22
23 #ifdef TARGET_WINDOWS
24 #ifndef _WIN32_POWER_SYSCALL_H_
25 #define _WIN32_POWER_SYSCALL_H_
26 #include "powermanagement/IPowerSyscall.h"
27
28 class CWin32PowerSyscall : public IPowerSyscall
29 {
30 public:
31   CWin32PowerSyscall();
32
33   virtual bool Powerdown();
34   virtual bool Suspend();
35   virtual bool Hibernate();
36   virtual bool Reboot();
37
38   virtual bool CanPowerdown();
39   virtual bool CanSuspend();
40   virtual bool CanHibernate();
41   virtual bool CanReboot();
42   virtual int  BatteryLevel();
43
44   virtual bool PumpPowerEvents(IPowerEventsCallback *callback);
45
46   static void SetOnResume() { m_OnResume = true; }
47   static void SetOnSuspend() { m_OnSuspend = true; }
48   static bool IsSuspending() { return m_OnSuspend; }
49
50 private:
51
52   static bool m_OnResume;
53   static bool m_OnSuspend;
54
55 };
56 #endif
57 #endif