|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Manages the complete game launch pipeline with state tracking. More...
#include <launch_manager.h>
Public Types | |
| using | CompletionCallback = std::function<void(bool success, const std::string& message)> |
| enum class | LaunchState { IDLE , CHECKING_SETTINGS , SYNCING_SETTINGS , WAITING_FOR_STEAM , LAUNCHING , VERIFYING_START , RUNNING , FAILED , COMPLETED } |
| using | StateCallback |
Public Member Functions | |
| void | cancelLaunch () |
| std::string | getCurrentGameId () const |
| LaunchState | getCurrentState () const |
| bool | isLaunchInProgress () const |
| void | requestLaunch (const Game &game) |
| void | setCompletionCallback (CompletionCallback callback) |
| void | setStateCallback (StateCallback callback) |
Static Public Member Functions | |
| static GameLaunchManager & | instance () |
Manages the complete game launch pipeline with state tracking.
Handles the full launch sequence:
Provides callbacks at each stage for UI updates.
Definition at line 25 of file launch_manager.h.
| using GameLaunchManager::CompletionCallback = std::function<void(bool success, const std::string& message)> |
Definition at line 44 of file launch_manager.h.
Definition at line 42 of file launch_manager.h.
|
strong |
| Enumerator | |
|---|---|
| IDLE | |
| CHECKING_SETTINGS | |
| SYNCING_SETTINGS | |
| WAITING_FOR_STEAM | |
| LAUNCHING | |
| VERIFYING_START | |
| RUNNING | |
| FAILED | |
| COMPLETED | |
Definition at line 28 of file launch_manager.h.
| void GameLaunchManager::cancelLaunch | ( | ) |
Definition at line 82 of file launch_manager.cpp.
References Logger::info().
| std::string GameLaunchManager::getCurrentGameId | ( | ) | const |
Definition at line 108 of file launch_manager.cpp.
| GameLaunchManager::LaunchState GameLaunchManager::getCurrentState | ( | ) | const |
Definition at line 103 of file launch_manager.cpp.
|
static |
Definition at line 19 of file launch_manager.cpp.
References instance().
Referenced by core::LaunchController::~LaunchController(), instance(), and core::LaunchController::launchGame().
| bool GameLaunchManager::isLaunchInProgress | ( | ) | const |
Definition at line 114 of file launch_manager.cpp.
| void GameLaunchManager::requestLaunch | ( | const Game & | game | ) |
Definition at line 49 of file launch_manager.cpp.
References COMPLETED, FAILED, Game::id, IDLE, Logger::info(), Game::name, and Logger::warn().
Referenced by core::LaunchController::launchGame().
| void GameLaunchManager::setCompletionCallback | ( | CompletionCallback | callback | ) |
Definition at line 131 of file launch_manager.cpp.
Referenced by core::LaunchController::~LaunchController(), and core::LaunchController::launchGame().
| void GameLaunchManager::setStateCallback | ( | StateCallback | callback | ) |
Definition at line 125 of file launch_manager.cpp.