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

Metadata for a Steam game parsed from appmanifest ACF file. More...

#include <steam_integration.h>

Collaboration diagram for SteamGame:

Public Member Functions

std::string downloadCoverArt (const std::string &coverArtDir) const
 Download cover art from Steam CDN.
Game toGame () const
 Convert SteamGame to Game object for library.

Public Attributes

uint32_t appId
 Steam App ID.
uint64_t bytesDownloaded = 0
 Bytes downloaded so far.
uint64_t bytesStaged = 0
 Bytes staged for installation.
uint64_t bytesToDownload = 0
 Total bytes to download.
uint64_t bytesToStage = 0
 Total bytes to stage.
std::vector< std::string > categories
 Steam categories (Single-player, Multi-player, etc.).
CloudSaveInfo cloudSave
 Steam Cloud save information.
std::string compatToolName
 Raw compat tool name from Steam config (e.g., "proton_experimental").
std::vector< DLCInfo > dlc
 Installed DLC for this game.
std::string gameArguments
 Default launch arguments from Steam (e.g., "-nohmd").
std::string gameExecutable
 Game exe relative to install dir (e.g., "FSD.exe").
std::filesystem::path gamePath
 Full path to game directory.
std::vector< std::string > genres
 Game genres from Steam API.
std::string installDir
 Installation directory name.
bool isDownloading = false
 Currently downloading/updating.
bool isInstalled
 True if game is installed (has appmanifest), false if owned but not installed.
bool isProtonGame = false
 Requires Proton (Windows game).
bool isUpdatePending = false
 Update available but not yet started.
time_t lastUpdated = 0
 Last update timestamp.
std::filesystem::path libraryPath
 Steam library root path.
bool metadataFetched = false
 Whether API metadata has been fetched.
std::string name
 Game name.
std::filesystem::path protonPath
 Resolved path to proton executable.
std::string protonVersion
 Detected Proton/compatibility tool version from Steam.
uint64_t sizeOnDisk = 0
 Installation size in bytes.
uint32_t stateFlags = 0
 Steam StateFlags from appmanifest.
std::string steamBuildId
 Steam build ID from appmanifest.
time_t steamLastExit = 0
 Last exit timestamp from Steam autocloud.
time_t steamLastLaunch = 0
 Last launch timestamp from Steam autocloud.
time_t steamLastPlayed = 0
 Last played timestamp from Steam.
uint32_t steamPlaytime2Weeks = 0
 Playtime in last 2 weeks (in minutes).
uint32_t steamPlaytimeMinutes = 0
 Total playtime from Steam (in minutes).
std::string steamType
 App type: "game", "dlc", "demo", "tool", "music", etc.
std::vector< std::string > steamUserCategories
 User-defined categories/tags from Steam.

Detailed Description

Metadata for a Steam game parsed from appmanifest ACF file.

Definition at line 212 of file steam_integration.h.

Member Function Documentation

◆ downloadCoverArt()

std::string SteamGame::downloadCoverArt ( const std::string & coverArtDir) const

Download cover art from Steam CDN.

Parameters
coverArtDirDirectory to save cover art images
Returns
Path to downloaded cover art, or empty string if failed

Definition at line 675 of file steam_integration.cpp.

References appId, Logger::debug(), SteamCDN::discoverImages(), SteamCDN::downloadImage(), SteamPaths::getPrimarySteamRoot(), Logger::info(), name, VerticalCover, and GameImagePaths::verticalCover.

◆ toGame()

Game SteamGame::toGame ( ) const

Convert SteamGame to Game object for library.

Returns
Game object with Steam-specific configuration

Definition at line 505 of file steam_integration.cpp.

References appId, GameRunnerConfig::arguments, categories, GameMetadata::cloudSave, cloudSave, Logger::debug(), SteamCDN::discoverImages(), GameMetadata::dlc, dlc, GameRunnerConfig::environmentVariables, GameRunnerConfig::executablePath, gameArguments, gameExecutable, gamePath, GameMetadata::genres, genres, SteamPaths::getPrimarySteamRoot(), GameImagePaths::heroImage, GameMetadata::imagePaths, Installed, Game::installPath, Game::installSizeBytes, isInstalled, isProtonGame, GameMetadata::isSteamGame, GameStatistics::lastPlayed, Game::metadata, Game::name, name, Native, NotInstalled, Proton, protonPath, GameRunnerConfig::protonVersion, protonVersion, SteamLibraryScanner::readSteamLaunchOptions(), Game::runner, Game::runnerConfig, GameRunnerConfig::runnerType, GameRunnerConfig::runnerVersion, sizeOnDisk, Game::source, Game::statistics, Game::status, Steam, GameMetadata::steamAppId, GameMetadata::steamBuildId, steamBuildId, GameMetadata::steamCategories, GameMetadata::steamInstalled, GameMetadata::steamLastExit, steamLastExit, GameMetadata::steamLastLaunch, steamLastLaunch, steamLastPlayed, GameMetadata::steamLaunchOptions, GameMetadata::steamPlaytime2Weeks, steamPlaytime2Weeks, steamPlaytimeMinutes, GameMetadata::steamType, steamType, GameMetadata::steamUserCategories, steamUserCategories, Game::syncPlatformFromRunner(), GameStatistics::totalPlayTimeSeconds, GameRunnerConfig::useSteamDefaults, GameRunnerConfig::useSteamLaunch, GameImagePaths::verticalCover, and GameRunnerConfig::workingDirectory.

Member Data Documentation

◆ appId

◆ bytesDownloaded

uint64_t SteamGame::bytesDownloaded = 0

Bytes downloaded so far.

Definition at line 229 of file steam_integration.h.

Referenced by ACFParser::parseManifest().

◆ bytesStaged

uint64_t SteamGame::bytesStaged = 0

Bytes staged for installation.

Definition at line 231 of file steam_integration.h.

Referenced by ACFParser::parseManifest().

◆ bytesToDownload

uint64_t SteamGame::bytesToDownload = 0

Total bytes to download.

Definition at line 230 of file steam_integration.h.

Referenced by ACFParser::parseManifest().

◆ bytesToStage

uint64_t SteamGame::bytesToStage = 0

Total bytes to stage.

Definition at line 232 of file steam_integration.h.

Referenced by ACFParser::parseManifest().

◆ categories

std::vector<std::string> SteamGame::categories

Steam categories (Single-player, Multi-player, etc.).

Definition at line 247 of file steam_integration.h.

Referenced by toGame().

◆ cloudSave

CloudSaveInfo SteamGame::cloudSave

Steam Cloud save information.

Definition at line 259 of file steam_integration.h.

Referenced by toGame().

◆ compatToolName

std::string SteamGame::compatToolName

Raw compat tool name from Steam config (e.g., "proton_experimental").

Definition at line 255 of file steam_integration.h.

Referenced by SteamLibraryScanner::populateDirectLaunchInfo().

◆ dlc

std::vector<DLCInfo> SteamGame::dlc

Installed DLC for this game.

Definition at line 260 of file steam_integration.h.

Referenced by toGame().

◆ gameArguments

std::string SteamGame::gameArguments

Default launch arguments from Steam (e.g., "-nohmd").

Definition at line 252 of file steam_integration.h.

Referenced by SteamLibraryScanner::populateDirectLaunchInfo(), and toGame().

◆ gameExecutable

std::string SteamGame::gameExecutable

Game exe relative to install dir (e.g., "FSD.exe").

Definition at line 251 of file steam_integration.h.

Referenced by SteamLibraryScanner::populateDirectLaunchInfo(), and toGame().

◆ gamePath

std::filesystem::path SteamGame::gamePath

Full path to game directory.

Definition at line 218 of file steam_integration.h.

Referenced by isSteamToolOrRuntime(), ACFParser::parseManifest(), SteamLibraryScanner::scanAllOwnedGames(), and toGame().

◆ genres

std::vector<std::string> SteamGame::genres

Game genres from Steam API.

Definition at line 246 of file steam_integration.h.

Referenced by toGame().

◆ installDir

std::string SteamGame::installDir

Installation directory name.

Definition at line 216 of file steam_integration.h.

Referenced by ACFParser::parseManifest(), and SteamLibraryScanner::scanAllOwnedGames().

◆ isDownloading

bool SteamGame::isDownloading = false

Currently downloading/updating.

Definition at line 233 of file steam_integration.h.

Referenced by ACFParser::parseManifest().

◆ isInstalled

bool SteamGame::isInstalled
Initial value:
=
true

True if game is installed (has appmanifest), false if owned but not installed.

Definition at line 220 of file steam_integration.h.

Referenced by isSteamToolOrRuntime(), SteamLibraryScanner::scanAllOwnedGames(), and toGame().

◆ isProtonGame

bool SteamGame::isProtonGame = false

Requires Proton (Windows game).

Definition at line 224 of file steam_integration.h.

Referenced by ACFParser::parseManifest(), SteamLibraryScanner::populateDirectLaunchInfo(), and toGame().

◆ isUpdatePending

bool SteamGame::isUpdatePending = false

Update available but not yet started.

Definition at line 234 of file steam_integration.h.

Referenced by ACFParser::parseManifest().

◆ lastUpdated

time_t SteamGame::lastUpdated = 0

Last update timestamp.

Definition at line 223 of file steam_integration.h.

Referenced by ACFParser::parseManifest(), and SteamLibraryScanner::scanAllOwnedGames().

◆ libraryPath

std::filesystem::path SteamGame::libraryPath

Steam library root path.

Definition at line 217 of file steam_integration.h.

Referenced by ACFParser::parseManifest(), and SteamLibraryScanner::scanAllOwnedGames().

◆ metadataFetched

bool SteamGame::metadataFetched = false

Whether API metadata has been fetched.

Definition at line 248 of file steam_integration.h.

◆ name

std::string SteamGame::name

◆ protonPath

std::filesystem::path SteamGame::protonPath

Resolved path to proton executable.

Definition at line 253 of file steam_integration.h.

Referenced by SteamLibraryScanner::populateDirectLaunchInfo(), and toGame().

◆ protonVersion

std::string SteamGame::protonVersion

Detected Proton/compatibility tool version from Steam.

Definition at line 225 of file steam_integration.h.

Referenced by ACFParser::parseManifest(), and toGame().

◆ sizeOnDisk

uint64_t SteamGame::sizeOnDisk = 0

Installation size in bytes.

Definition at line 222 of file steam_integration.h.

Referenced by ACFParser::parseManifest(), SteamLibraryScanner::scanAllOwnedGames(), and toGame().

◆ stateFlags

uint32_t SteamGame::stateFlags = 0

Steam StateFlags from appmanifest.

Definition at line 228 of file steam_integration.h.

Referenced by ACFParser::parseManifest().

◆ steamBuildId

std::string SteamGame::steamBuildId

Steam build ID from appmanifest.

Definition at line 242 of file steam_integration.h.

Referenced by ACFParser::parseManifest(), and toGame().

◆ steamLastExit

time_t SteamGame::steamLastExit = 0

Last exit timestamp from Steam autocloud.

Definition at line 241 of file steam_integration.h.

Referenced by SteamLibraryScanner::scanAllOwnedGames(), and toGame().

◆ steamLastLaunch

time_t SteamGame::steamLastLaunch = 0

Last launch timestamp from Steam autocloud.

Definition at line 240 of file steam_integration.h.

Referenced by SteamLibraryScanner::scanAllOwnedGames(), and toGame().

◆ steamLastPlayed

time_t SteamGame::steamLastPlayed = 0

Last played timestamp from Steam.

Definition at line 238 of file steam_integration.h.

Referenced by SteamLibraryScanner::scanAllOwnedGames(), and toGame().

◆ steamPlaytime2Weeks

uint32_t SteamGame::steamPlaytime2Weeks = 0

Playtime in last 2 weeks (in minutes).

Definition at line 239 of file steam_integration.h.

Referenced by SteamLibraryScanner::scanAllOwnedGames(), and toGame().

◆ steamPlaytimeMinutes

uint32_t SteamGame::steamPlaytimeMinutes = 0

Total playtime from Steam (in minutes).

Definition at line 237 of file steam_integration.h.

Referenced by SteamLibraryScanner::scanAllOwnedGames(), and toGame().

◆ steamType

std::string SteamGame::steamType

App type: "game", "dlc", "demo", "tool", "music", etc.

Definition at line 245 of file steam_integration.h.

Referenced by SteamLibraryScanner::populateDirectLaunchInfo(), and toGame().

◆ steamUserCategories

std::vector<std::string> SteamGame::steamUserCategories

User-defined categories/tags from Steam.

Definition at line 258 of file steam_integration.h.

Referenced by toGame().


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