Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
XDGPowerManager.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
4 * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
5 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6 */
7
8#pragma once
9
10#include <string>
11
13{
14public:
15 XDGPowerManager() = default;
17
21 void disableSleep() const;
22
26 void enableSleep() const;
27
30
36 static bool inhibitScreenCall(InhibitScreenServices serviceID, bool state, std::string &error);
37};
static bool inhibitScreenCall(InhibitScreenServices serviceID, bool state, std::string &error)
Definition XDGPowerManager.cpp:52
~XDGPowerManager()
Definition XDGPowerManager.cpp:31
void disableSleep() const
Prevent the system from sleep.
Definition XDGPowerManager.cpp:36
XDGPowerManager()=default
XDGPowerManager & operator=(const XDGPowerManager &)=delete
InhibitScreenServices
Definition XDGPowerManager.h:32
@ kSessionManager
Definition XDGPowerManager.h:34
@ kScreenSaver
Definition XDGPowerManager.h:33
void enableSleep() const
Enables automatical sleep.
Definition XDGPowerManager.cpp:44
XDGPowerManager(const XDGPowerManager &)=delete