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

Singleton service for system detection and capabilities. More...

#include <system_info_service.h>

Public Member Functions

 SystemInfoService (const SystemInfoService &)=delete
const SystemCapabilities & getCapabilities ()
 Get complete system capabilities.
const std::vector< ControllerInfo > & getControllers ()
 Get connected controllers.
const CPUInfo & getCPUInfo ()
 Get full CPU information.
DisplayServer getDisplayServer ()
 Get display server type.
const GPUInfo & getGPUInfo ()
 Get full GPU information.
GPUVendor getGPUVendor ()
 Get GPU vendor.
std::string getGPUVendorName ()
 Get GPU vendor name as string.
const std::vector< RunnerInfo > & getInstalledRunners ()
 Get all installed runners (Proton/Wine versions).
const KernelInfo & getKernelInfo ()
 Get kernel information.
const MemoryInfo & getMemoryInfo ()
 Get memory information.
const std::vector< MonitorInfo > & getMonitors ()
 Get connected monitors.
const PowerInfo & getPowerInfo ()
 Get power/battery information.
std::string getRecommendedSyncMethod ()
 Get recommended sync method as string.
const std::vector< StorageInfo > & getStorageInfo ()
 Get storage information.
const SystemReadiness & getSystemReadiness ()
 Get system readiness checks.
const ToolAvailability & getToolAvailability ()
 Get available performance tools.
std::string getToolPath (const std::string &toolName)
 Get path to tool binary.
bool isCachyOS ()
 Check if running on CachyOS.
bool isToolAvailable (const std::string &toolName)
 Check if tool is available by name.
SystemInfoService & operator= (const SystemInfoService &)=delete
void refresh ()
 Force refresh of all cached data.
void refreshRunners ()
 Refresh only runner list (faster than full refresh).
bool supportsFsync ()
 Check if fsync is supported.
bool supportsNTSync ()
 Check if NTSync is supported (kernel 6.2+ with module loaded).

Static Public Member Functions

static SystemInfoService & instance ()
 Get singleton instance.

Detailed Description

Singleton service for system detection and capabilities.

Provides cached access to system hardware and software information. Detection is performed lazily on first access and cached for performance.

Definition at line 657 of file system_info_service.h.

Constructor & Destructor Documentation

◆ SystemInfoService()

SystemInfoService::SystemInfoService ( const SystemInfoService & )
delete

Member Function Documentation

◆ getCapabilities()

const SystemCapabilities & SystemInfoService::getCapabilities ( )

Get complete system capabilities.

Definition at line 163 of file system_info_service.cpp.

Referenced by ToolbarManager::setupToolbar().

◆ getControllers()

const std::vector< ControllerInfo > & SystemInfoService::getControllers ( )

Get connected controllers.

Definition at line 206 of file system_info_service.cpp.

◆ getCPUInfo()

const CPUInfo & SystemInfoService::getCPUInfo ( )

Get full CPU information.

Definition at line 123 of file system_info_service.cpp.

◆ getDisplayServer()

DisplayServer SystemInfoService::getDisplayServer ( )

Get display server type.

Definition at line 99 of file system_info_service.cpp.

◆ getGPUInfo()

const GPUInfo & SystemInfoService::getGPUInfo ( )

Get full GPU information.

Definition at line 113 of file system_info_service.cpp.

◆ getGPUVendor()

GPUVendor SystemInfoService::getGPUVendor ( )

Get GPU vendor.

Definition at line 39 of file system_info_service.cpp.

◆ getGPUVendorName()

std::string SystemInfoService::getGPUVendorName ( )

Get GPU vendor name as string.

Definition at line 49 of file system_info_service.cpp.

◆ getInstalledRunners()

const std::vector< RunnerInfo > & SystemInfoService::getInstalledRunners ( )

Get all installed runners (Proton/Wine versions).

Definition at line 153 of file system_info_service.cpp.

◆ getKernelInfo()

const KernelInfo & SystemInfoService::getKernelInfo ( )

Get kernel information.

Definition at line 133 of file system_info_service.cpp.

◆ getMemoryInfo()

const MemoryInfo & SystemInfoService::getMemoryInfo ( )

Get memory information.

Definition at line 186 of file system_info_service.cpp.

◆ getMonitors()

const std::vector< MonitorInfo > & SystemInfoService::getMonitors ( )

Get connected monitors.

Definition at line 196 of file system_info_service.cpp.

◆ getPowerInfo()

const PowerInfo & SystemInfoService::getPowerInfo ( )

Get power/battery information.

Definition at line 226 of file system_info_service.cpp.

◆ getRecommendedSyncMethod()

std::string SystemInfoService::getRecommendedSyncMethod ( )

Get recommended sync method as string.

Definition at line 89 of file system_info_service.cpp.

◆ getStorageInfo()

const std::vector< StorageInfo > & SystemInfoService::getStorageInfo ( )

Get storage information.

Definition at line 216 of file system_info_service.cpp.

◆ getSystemReadiness()

const SystemReadiness & SystemInfoService::getSystemReadiness ( )

Get system readiness checks.

Definition at line 236 of file system_info_service.cpp.

◆ getToolAvailability()

const ToolAvailability & SystemInfoService::getToolAvailability ( )

Get available performance tools.

Definition at line 143 of file system_info_service.cpp.

◆ getToolPath()

std::string SystemInfoService::getToolPath ( const std::string & toolName)

Get path to tool binary.

Parameters
toolNameTool binary name
Returns
Path to binary or empty string if not found

Definition at line 287 of file system_info_service.cpp.

Referenced by isToolAvailable().

◆ instance()

◆ isCachyOS()

bool SystemInfoService::isCachyOS ( )

Check if running on CachyOS.

Definition at line 59 of file system_info_service.cpp.

◆ isToolAvailable()

bool SystemInfoService::isToolAvailable ( const std::string & toolName)

Check if tool is available by name.

Parameters
toolNameTool binary name (e.g., "mangohud", "gamemoderun")

Definition at line 282 of file system_info_service.cpp.

References getToolPath().

◆ operator=()

SystemInfoService & SystemInfoService::operator= ( const SystemInfoService & )
delete

References SystemInfoService().

◆ refresh()

void SystemInfoService::refresh ( )

Force refresh of all cached data.

Definition at line 250 of file system_info_service.cpp.

References Logger::info().

◆ refreshRunners()

void SystemInfoService::refreshRunners ( )

Refresh only runner list (faster than full refresh).

Definition at line 274 of file system_info_service.cpp.

◆ supportsFsync()

bool SystemInfoService::supportsFsync ( )

Check if fsync is supported.

Definition at line 69 of file system_info_service.cpp.

◆ supportsNTSync()

bool SystemInfoService::supportsNTSync ( )

Check if NTSync is supported (kernel 6.2+ with module loaded).

Definition at line 79 of file system_info_service.cpp.

Referenced by anonymous_namespace{game_process.cpp}::kernelSupportsNTSync().


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