28class ScopedLowPowerModeDisabler::Pimpl
33 if (@available (macOS 10.9, *))
34 activity = [[NSProcessInfo processInfo] beginActivityWithOptions: NSActivityUserInitiatedAllowingIdleSystemSleep
35 reason:
@"App must remain in high-power mode"];
40 if (@available (macOS 10.9, *))
41 [[NSProcessInfo processInfo] endActivity: activity];
58ScopedLowPowerModeDisabler::ScopedLowPowerModeDisabler()
59 : pimpl (
std::make_unique<
Pimpl>()) {}
61ScopedLowPowerModeDisabler::~ScopedLowPowerModeDisabler() =
default;