-
Notifications
You must be signed in to change notification settings - Fork 0
/
power.h
39 lines (35 loc) · 850 Bytes
/
power.h
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
#ifndef POWER_H
#define POWER_H
enum Action
{
sleep,
hibernate,
shutdownnormal,
shutdownhybrid,
restart,
lock,
signout,
monitoroff
};
#define STRING_SLEEP "Sleep"
#define STRING_HIBERNATE "Hibernate"
#define STRING_SHUTDOWN "Shut down"
#define STRING_SHUTDOWN_HYBRID "Shut down (Hybrib)"
#define STRING_RESTART "Restart"
#define STRING_LOCK "Lock"
#define STRING_SIGNOUT "Sign out"
#define STRING_MONITOR_OFF "Turn off monitor"
class Power
{
public:
static bool sleep();
static bool hibernate();
static bool is_support_hibernate();
static bool shutdown(bool forced);
static bool shutdown_hybrib(bool forced);
static bool restart(bool forced);
static bool lock();
static bool signout();
static void monitor_off();
};
#endif // POWER_H