game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
GameLaunchManager Class Reference

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 ()

Detailed Description

Manages the complete game launch pipeline with state tracking.

Handles the full launch sequence:

  1. Check/sync Steam settings if needed
  2. Wait for Steam to be ready
  3. Launch the game
  4. Monitor for successful start

Provides callbacks at each stage for UI updates.

Definition at line 25 of file launch_manager.h.

Member Typedef Documentation

◆ CompletionCallback

using GameLaunchManager::CompletionCallback = std::function<void(bool success, const std::string& message)>

Definition at line 44 of file launch_manager.h.

◆ StateCallback

Initial value:
std::function<void(LaunchState oldState, LaunchState newState, const std::string& message)>

Definition at line 42 of file launch_manager.h.

Member Enumeration Documentation

◆ LaunchState

enum class GameLaunchManager::LaunchState
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.

Member Function Documentation

◆ cancelLaunch()

void GameLaunchManager::cancelLaunch ( )

Definition at line 82 of file launch_manager.cpp.

References Logger::info().

◆ getCurrentGameId()

std::string GameLaunchManager::getCurrentGameId ( ) const

Definition at line 108 of file launch_manager.cpp.

◆ getCurrentState()

GameLaunchManager::LaunchState GameLaunchManager::getCurrentState ( ) const

Definition at line 103 of file launch_manager.cpp.

◆ instance()

GameLaunchManager & GameLaunchManager::instance ( )
static

◆ isLaunchInProgress()

bool GameLaunchManager::isLaunchInProgress ( ) const

Definition at line 114 of file launch_manager.cpp.

References COMPLETED, FAILED, and IDLE.

◆ requestLaunch()

void GameLaunchManager::requestLaunch ( const Game & game)

◆ setCompletionCallback()

void GameLaunchManager::setCompletionCallback ( CompletionCallback callback)

◆ setStateCallback()

void GameLaunchManager::setStateCallback ( StateCallback callback)

Definition at line 125 of file launch_manager.cpp.


The documentation for this class was generated from the following files: