23#ifndef SUSPENDINHIBITOR_H
24#define SUSPENDINHIBITOR_H
28#include <IOKit/pwr_mgt/IOPMLib.h>
88 mutable std::mutex m_mutex;
91 unsigned int m_cookie;
92#elif defined(__APPLE__)
93 IOPMAssertionID m_cookie;
An object to prevent the system from suspending.
Definition suspendinhibitor.h:37
SuspendInhibitor & operator=(const SuspendInhibitor &inhibitor)
Copies a SuspendInhibitor object.
~SuspendInhibitor()
Destructs a SuspendInhibitor.
bool inhibit()
Inhibits the system from suspending.
bool isInhibiting() const
Gets whether or not the system is being inhibited from suspending.
bool uninhibit()
Uninhibits the system from suspending.
SuspendInhibitor()
Constructs a SuspendInhibitor.
SuspendInhibitor & operator=(SuspendInhibitor &&inhibitor) noexcept
Moves a SuspendInhibitor object.
SuspendInhibitor(SuspendInhibitor &&inhibitor) noexcept
Moves a SuspendInhibitor object.
SuspendInhibitor(const SuspendInhibitor &inhibitor)
Copies a SuspendInhibitor object.
Definition deploymentmode.h:27