126 bool stopGame(const std::
string& gameId);
129 bool killGame(const std::
string& gameId);
198 std::unique_ptr<
Impl> impl_;
Complete representation of a game in the library.
std::chrono::seconds getSessionDuration(const std::string &gameId) const
Get current session duration for a running game.
bool stopGame(const std::string &gameId)
Request graceful stop of a running game.
void setOnProcessStarted(OnProcessStarted callback)
void stopAllGames()
Stop all running games.
LaunchController(LaunchController &&) noexcept
std::vector< RunningGameInfo > getAllRunningGames() const
Get all currently running games.
void setOnProcessExited(OnProcessExited callback)
bool killGame(const std::string &gameId)
Force kill a running game.
std::function< void(const LaunchStateChangedEvent &)> OnStateChanged
void setOnLaunchError(OnLaunchError callback)
LaunchController & operator=(const LaunchController &)=delete
void setOnStateChanged(OnStateChanged callback)
bool launchGame(const std::string &gameId, const Game &game)
Launch a game Returns true if launch was initiated (doesn't mean success yet).
size_t getRunningGameCount() const
Get the number of running games.
std::optional< RunningGameInfo > getRunningGameInfo(const std::string &gameId) const
Get info about a running game (returns nullopt if not running).
std::chrono::seconds getTotalSessionPlayTime() const
Get total play time recorded for this session.
std::string getSteamStateDescription() const
Get Steam state description.
bool hasRunningGames() const
Check if any game is currently running.
std::function< void(const LaunchErrorEvent &)> OnLaunchError
bool isSteamRunning() const
Check if Steam is running.
void requestSteamStart()
Request Steam to start (async).
void update()
Called periodically to update internal state (process monitoring, etc.) UI layer should call this fro...
LaunchState getGameState(const std::string &gameId) const
Get current launch state for a game.
std::function< void(const ProcessExitedEvent &)> OnProcessExited
bool isGameRunning(const std::string &gameId) const
Check if a specific game is running.
std::function< void(const ProcessStartedEvent &)> OnProcessStarted
LaunchController(const LaunchController &)=delete
std::chrono::seconds sessionDuration
std::chrono::steady_clock::time_point startTime
std::string protonVersion
std::string trackedProcessName