Deskflow
1.26.0.418
Keyboard and mouse sharing utility
Toggle main menu visibility
Loading...
Searching...
No Matches
OSXPowerManager.h
Go to the documentation of this file.
1
/*
2
* Deskflow -- mouse and keyboard sharing utility
3
* SPDX-FileCopyrightText: (C) 2012 - 2021 Synergy App Ltd
4
* SPDX-FileCopyrightText: (C) 2008 Volker Lanz <vl@fidra.de>
5
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6
*/
7
8
#pragma once
9
10
#include <IOKit/pwr_mgt/IOPMLib.h>
11
12
class
OSXPowerManager
13
{
14
public
:
15
OSXPowerManager
() =
default
;
16
~OSXPowerManager
();
17
21
void
disableSleep
();
22
26
void
enableSleep
();
27
28
OSXPowerManager
(
const
OSXPowerManager
&) =
delete
;
29
OSXPowerManager
&
operator=
(
const
OSXPowerManager
&) =
delete
;
30
31
private
:
32
// handler for assertion preventing the system from going to sleep
33
IOPMAssertionID m_sleepPreventionAssertionID = 0;
34
};
OSXPowerManager::enableSleep
void enableSleep()
Enable automatically sleeping.
Definition
OSXPowerManager.cpp:30
OSXPowerManager::disableSleep
void disableSleep()
Prevents the system from sleep automatically.
Definition
OSXPowerManager.cpp:16
OSXPowerManager::OSXPowerManager
OSXPowerManager(const OSXPowerManager &)=delete
OSXPowerManager::operator=
OSXPowerManager & operator=(const OSXPowerManager &)=delete
OSXPowerManager::OSXPowerManager
OSXPowerManager()=default
src
lib
platform
OSXPowerManager.h
Generated by
1.18.0