2017-07-20 07:07:02 +00:00
|
|
|
class PowerSaver
|
|
|
|
{
|
|
|
|
public:
|
2017-08-02 19:56:33 +00:00
|
|
|
enum mode : int { DISABLED = -1, INSTANT = 200, ENHANCED = 3000, DEFAULT = 10000 };
|
|
|
|
|
|
|
|
static void init();
|
|
|
|
|
2017-07-20 07:07:02 +00:00
|
|
|
static int getTimeout();
|
2017-08-02 19:56:33 +00:00
|
|
|
static void updateTimeouts();
|
|
|
|
|
|
|
|
static mode getMode();
|
|
|
|
static void updateMode();
|
2017-07-20 07:07:02 +00:00
|
|
|
|
|
|
|
static bool getState();
|
|
|
|
static void setState(bool state);
|
2017-08-02 19:56:33 +00:00
|
|
|
|
|
|
|
static void runningScreenSaver(bool state);
|
|
|
|
|
2017-07-20 07:07:02 +00:00
|
|
|
private:
|
|
|
|
static bool mState;
|
2017-08-02 19:56:33 +00:00
|
|
|
static bool mRunningScreenSaver;
|
|
|
|
|
|
|
|
static mode mMode;
|
|
|
|
static int mPlayNextTimeout;
|
|
|
|
static int mScreenSaverTimeout;
|
2017-07-20 07:07:02 +00:00
|
|
|
};
|