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

Real-time download/installation progress for a Steam game. More...

#include <steam_integration.h>

Public Member Functions

void calculateProgress ()
 Calculate progress percentages from byte values.
std::string getFormattedSpeed () const
 Get formatted download speed string.
void updateSpeed ()
 Update download speed calculation Should be called periodically with new progress data.

Public Attributes

uint32_t appId = 0
 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.
double downloadProgress = 0.0
 Download progress (0.0 to 1.0).
double downloadSpeedBytesPerSec = 0.0
 Current download speed in bytes/sec.
bool isComplete = false
 Installation complete.
bool isError = false
 Error occurred.
uint64_t lastBytesDownloaded = 0
 Previous bytes downloaded for speed calc.
std::chrono::steady_clock::time_point lastSpeedUpdate
 Time of last speed update.
double overallProgress = 0.0
 Combined progress (0.0 to 1.0).
int queuePosition = 0
 Position in download queue (0 = active, 1+ = queued).
double stageProgress = 0.0
 Staging progress (0.0 to 1.0).
std::string stateDescription
 Human-readable state.
uint32_t stateFlags = 0
 Current StateFlags.

Detailed Description

Real-time download/installation progress for a Steam game.

Definition at line 825 of file steam_integration.h.

Member Function Documentation

◆ calculateProgress()

void SteamDownloadProgress::calculateProgress ( )
inline

◆ getFormattedSpeed()

std::string SteamDownloadProgress::getFormattedSpeed ( ) const
inline

Get formatted download speed string.

Definition at line 909 of file steam_integration.h.

References downloadSpeedBytesPerSec.

◆ updateSpeed()

void SteamDownloadProgress::updateSpeed ( )
inline

Update download speed calculation Should be called periodically with new progress data.

Definition at line 882 of file steam_integration.h.

References bytesDownloaded, downloadSpeedBytesPerSec, lastBytesDownloaded, and lastSpeedUpdate.

Member Data Documentation

◆ appId

uint32_t SteamDownloadProgress::appId = 0

Steam App ID.

Definition at line 827 of file steam_integration.h.

Referenced by SteamDownloadMonitor::readGameState(), and SteamDownloadMonitor::Impl::watchGame().

◆ bytesDownloaded

uint64_t SteamDownloadProgress::bytesDownloaded = 0

Bytes downloaded so far.

Definition at line 829 of file steam_integration.h.

Referenced by calculateProgress(), SteamDownloadMonitor::readGameState(), and updateSpeed().

◆ bytesStaged

uint64_t SteamDownloadProgress::bytesStaged = 0

Bytes staged for installation.

Definition at line 831 of file steam_integration.h.

Referenced by calculateProgress(), and SteamDownloadMonitor::readGameState().

◆ bytesToDownload

uint64_t SteamDownloadProgress::bytesToDownload = 0

Total bytes to download.

Definition at line 830 of file steam_integration.h.

Referenced by calculateProgress(), and SteamDownloadMonitor::readGameState().

◆ bytesToStage

uint64_t SteamDownloadProgress::bytesToStage = 0

Total bytes to stage.

Definition at line 832 of file steam_integration.h.

Referenced by calculateProgress(), and SteamDownloadMonitor::readGameState().

◆ downloadProgress

double SteamDownloadProgress::downloadProgress = 0.0

Download progress (0.0 to 1.0).

Definition at line 833 of file steam_integration.h.

Referenced by calculateProgress(), and DetailsPanelManager::Impl::updateLaunchButton().

◆ downloadSpeedBytesPerSec

double SteamDownloadProgress::downloadSpeedBytesPerSec = 0.0

Current download speed in bytes/sec.

Definition at line 841 of file steam_integration.h.

Referenced by getFormattedSpeed(), and updateSpeed().

◆ isComplete

bool SteamDownloadProgress::isComplete = false

Installation complete.

Definition at line 837 of file steam_integration.h.

Referenced by calculateProgress(), and SteamDownloadMonitor::readGameState().

◆ isError

bool SteamDownloadProgress::isError = false

Error occurred.

Definition at line 838 of file steam_integration.h.

◆ lastBytesDownloaded

uint64_t SteamDownloadProgress::lastBytesDownloaded = 0

Previous bytes downloaded for speed calc.

Definition at line 842 of file steam_integration.h.

Referenced by updateSpeed().

◆ lastSpeedUpdate

std::chrono::steady_clock::time_point SteamDownloadProgress::lastSpeedUpdate

Time of last speed update.

Definition at line 843 of file steam_integration.h.

Referenced by updateSpeed().

◆ overallProgress

double SteamDownloadProgress::overallProgress = 0.0

Combined progress (0.0 to 1.0).

Definition at line 835 of file steam_integration.h.

Referenced by calculateProgress().

◆ queuePosition

int SteamDownloadProgress::queuePosition = 0

Position in download queue (0 = active, 1+ = queued).

Definition at line 844 of file steam_integration.h.

◆ stageProgress

double SteamDownloadProgress::stageProgress = 0.0

Staging progress (0.0 to 1.0).

Definition at line 834 of file steam_integration.h.

Referenced by calculateProgress().

◆ stateDescription

std::string SteamDownloadProgress::stateDescription

Human-readable state.

Definition at line 836 of file steam_integration.h.

Referenced by calculateProgress(), and SteamDownloadMonitor::readGameState().

◆ stateFlags

uint32_t SteamDownloadProgress::stateFlags = 0

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