86 void inhibitScreensaver();
87 void uninhibitScreensaver();
90 void switchToPerformanceProfile();
91 void restorePowerProfile();
94 static bool isCommandAvailable(
const std::string& cmd);
96 mutable std::mutex mutex_;
103 std::atomic<int> inhibitPid_{-1};
104 std::string previousPowerProfile_;
105 bool powerProfilesAvailable_ =
false;
106 bool systemdInhibitAvailable_ =
false;
static GameSessionService & instance()
Get singleton instance.
GameSessionService(const GameSessionService &)=delete
GameSessionService & operator=(const GameSessionService &)=delete
int activeGameCount() const
Get current number of running games being tracked.
void onGameStopped()
Called when a game stops running.
bool isActive() const
Check if any inhibitions are currently active.
void onGameStarted()
Called when a game starts running.