18 , ContextID_ { QUuid::createUuid ().toString () }
22 ScreensaverProhibitor::~ScreensaverProhibitor ()
24 SetProhibited (
false);
27 void ScreensaverProhibitor::SetProhibited (
bool prohibited)
29 if (Prohibited_ == prohibited)
32 Prohibited_ = prohibited;
35 SendEntity (Prohibited_);
38 void ScreensaverProhibitor::SetProhibitionsEnabled (
bool enabled)
40 if (Enabled_ == enabled)
46 SendEntity (Enabled_);
49 void ScreensaverProhibitor::SendEntity (
bool prohibit)
51 auto e =
MakeEntity (
"ScreensaverProhibition", {}, {}, QStringLiteral (
"x-leechcraft/power-management"));
53 { QStringLiteral (
"Enable"), prohibit },
54 { QStringLiteral (
"ContextID"), ContextID_ }
56 IEM_->HandleEntity (e);