Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CSysInfo Class Reference

#include <SystemInfo.h>

Inheritance diagram for CSysInfo:
CInfoLoader ISubSettings IJobCallback

Public Types

enum  WindowsVersion {
  WindowsVersionUnknown = -1 , WindowsVersionWin8_1 , WindowsVersionWin10 , WindowsVersionWin10_1607 ,
  WindowsVersionWin10_1703 , WindowsVersionWin10_1709 , WindowsVersionWin10_1803 , WindowsVersionWin10_1809 ,
  WindowsVersionWin10_1903 , WindowsVersionWin10_1909 , WindowsVersionWin10_2004 , WindowsVersionWin10_20H2 ,
  WindowsVersionWin10_21H1 , WindowsVersionWin10_21H2 , WindowsVersionWin10_22H2 , WindowsVersionWin10_Future ,
  WindowsVersionWin11_21H2 , WindowsVersionWin11_22H2 , WindowsVersionWin11_23H2 , WindowsVersionWin11_24H2 ,
  WindowsVersionWin11_Future , WindowsVersionFuture = 100
}
 
enum  WindowsDeviceFamily {
  Mobile = 1 , Desktop = 2 , IoT = 3 , Xbox = 4 ,
  Surface = 5 , Other = 100
}
 

Public Member Functions

 CSysInfo (void)
 
 ~CSysInfo () override
 
bool Load (const TiXmlNode *settings) override
 Load settings from the given XML node.
 
bool Save (TiXmlNode *settings) const override
 Save settings to the given XML node.
 
bool HasInternet ()
 
bool IsAeroDisabled ()
 
bool GetDiskSpace (std::string drive, int &iTotal, int &iTotalFree, int &iTotalUsed, int &iPercentFree, int &iPercentUsed)
 
std::string GetHddSpaceInfo (int &percent, int drive, bool shortText=false)
 
std::string GetHddSpaceInfo (int drive, bool shortText=false)
 
int GetTotalUptime () const
 
void SetTotalUptime (int uptime)
 
std::string GetPrivacyPolicy ()
 
- Public Member Functions inherited from CInfoLoader
 CInfoLoader (unsigned int timeToRefresh=5 *60 *1000)
 
 ~CInfoLoader () override
 
std::string GetInfo (int info)
 
void Refresh ()
 
- Public Member Functions inherited from IJobCallback
virtual ~IJobCallback ()=default
 Destructor for job call back objects.
 
virtual void OnJobAbort (unsigned int jobID, CJob *job)
 An optional callback function used when a job will be aborted.
 
virtual void OnJobProgress (unsigned int jobID, unsigned int progress, unsigned int total, const CJob *job)
 An optional callback function that a job may call while processing.
 
- Public Member Functions inherited from ISubSettings
virtual ~ISubSettings ()=default
 
virtual void Clear ()
 Clear any loaded setting values.
 

Static Public Member Functions

static const std::string & GetAppName (void)
 
static std::string GetKernelName (bool emptyIfUnknown=false)
 
static std::string GetKernelVersionFull (void)
 
static std::string GetKernelVersion (void)
 
static std::string GetOsName (bool emptyIfUnknown=false)
 
static std::string GetOsVersion (void)
 
static std::string GetOsPrettyNameWithVersion (void)
 
static std::string GetUserAgent ()
 
static std::string GetDeviceName ()
 
static std::string GetVersion ()
 
static std::string GetVersionShort ()
 
static std::string GetVersionCode ()
 
static std::string GetVersionGit ()
 
static std::string GetBuildDate ()
 
static bool IsWindowsVersion (WindowsVersion ver)
 
static bool IsWindowsVersionAtLeast (WindowsVersion ver)
 
static WindowsVersion GetWindowsVersion ()
 
static int GetKernelBitness (void)
 
static int GetXbmcBitness (void)
 
static const std::string & GetKernelCpuFamily (void)
 
static std::string GetManufacturerName (void)
 
static std::string GetModelName (void)
 
static std::string GetBuildTargetPlatformName (void)
 
static std::string GetBuildTargetPlatformVersion (void)
 
static std::string GetBuildTargetPlatformVersionDecoded (void)
 
static std::string GetBuildTargetCpuFamily (void)
 
static std::string GetUsedCompilerNameAndVer (void)
 
static WindowsDeviceFamily GetWindowsDeviceFamily ()
 

Public Attributes

char MD5_Sign [32+1]
 

Protected Member Functions

CJobGetJob () const override
 
std::string TranslateInfo (int info) const override
 
void OnJobComplete (unsigned int jobID, bool success, CJob *job) override
 The callback used when a job completes.
 
- Protected Member Functions inherited from CInfoLoader
virtual std::string BusyInfo (int info) const
 

Member Enumeration Documentation

◆ WindowsDeviceFamily

Enumerator
Mobile 
Desktop 
IoT 
Xbox 
Surface 
Other 

◆ WindowsVersion

Enumerator
WindowsVersionUnknown 
WindowsVersionWin8_1 
WindowsVersionWin10 
WindowsVersionWin10_1607 
WindowsVersionWin10_1703 
WindowsVersionWin10_1709 
WindowsVersionWin10_1803 
WindowsVersionWin10_1809 
WindowsVersionWin10_1903 
WindowsVersionWin10_1909 
WindowsVersionWin10_2004 
WindowsVersionWin10_20H2 
WindowsVersionWin10_21H1 
WindowsVersionWin10_21H2 
WindowsVersionWin10_22H2 
WindowsVersionWin10_Future 
WindowsVersionWin11_21H2 
WindowsVersionWin11_22H2 
WindowsVersionWin11_23H2 
WindowsVersionWin11_24H2 
WindowsVersionWin11_Future 
WindowsVersionFuture 

Constructor & Destructor Documentation

◆ CSysInfo()

CSysInfo::CSysInfo ( void )

◆ ~CSysInfo()

CSysInfo::~CSysInfo ( )
overridedefault

Member Function Documentation

◆ GetAppName()

const std::string & CSysInfo::GetAppName ( void )
static

◆ GetBuildDate()

std::string CSysInfo::GetBuildDate ( )
static

◆ GetBuildTargetCpuFamily()

std::string CSysInfo::GetBuildTargetCpuFamily ( void )
static

◆ GetBuildTargetPlatformName()

std::string CSysInfo::GetBuildTargetPlatformName ( void )
static

◆ GetBuildTargetPlatformVersion()

std::string CSysInfo::GetBuildTargetPlatformVersion ( void )
static

◆ GetBuildTargetPlatformVersionDecoded()

std::string CSysInfo::GetBuildTargetPlatformVersionDecoded ( void )
static

◆ GetDeviceName()

std::string CSysInfo::GetDeviceName ( )
static

◆ GetDiskSpace()

bool CSysInfo::GetDiskSpace ( std::string drive,
int & iTotal,
int & iTotalFree,
int & iTotalUsed,
int & iPercentFree,
int & iPercentUsed )

◆ GetHddSpaceInfo() [1/2]

std::string CSysInfo::GetHddSpaceInfo ( int & percent,
int drive,
bool shortText = false )

◆ GetHddSpaceInfo() [2/2]

std::string CSysInfo::GetHddSpaceInfo ( int drive,
bool shortText = false )

◆ GetJob()

CJob * CSysInfo::GetJob ( ) const
overrideprotectedvirtual

Implements CInfoLoader.

◆ GetKernelBitness()

int CSysInfo::GetKernelBitness ( void )
static

◆ GetKernelCpuFamily()

const std::string & CSysInfo::GetKernelCpuFamily ( void )
static

◆ GetKernelName()

std::string CSysInfo::GetKernelName ( bool emptyIfUnknown = false)
static

◆ GetKernelVersion()

std::string CSysInfo::GetKernelVersion ( void )
static

◆ GetKernelVersionFull()

std::string CSysInfo::GetKernelVersionFull ( void )
static

◆ GetManufacturerName()

std::string CSysInfo::GetManufacturerName ( void )
static

◆ GetModelName()

std::string CSysInfo::GetModelName ( void )
static

◆ GetOsName()

std::string CSysInfo::GetOsName ( bool emptyIfUnknown = false)
static

◆ GetOsPrettyNameWithVersion()

std::string CSysInfo::GetOsPrettyNameWithVersion ( void )
static

◆ GetOsVersion()

std::string CSysInfo::GetOsVersion ( void )
static

◆ GetPrivacyPolicy()

std::string CSysInfo::GetPrivacyPolicy ( )

◆ GetTotalUptime()

int CSysInfo::GetTotalUptime ( ) const
inline

◆ GetUsedCompilerNameAndVer()

std::string CSysInfo::GetUsedCompilerNameAndVer ( void )
static

◆ GetUserAgent()

std::string CSysInfo::GetUserAgent ( )
static

◆ GetVersion()

std::string CSysInfo::GetVersion ( )
static

◆ GetVersionCode()

std::string CSysInfo::GetVersionCode ( )
static

◆ GetVersionGit()

std::string CSysInfo::GetVersionGit ( )
static

◆ GetVersionShort()

std::string CSysInfo::GetVersionShort ( )
static

◆ GetWindowsDeviceFamily()

CSysInfo::WindowsDeviceFamily CSysInfo::GetWindowsDeviceFamily ( )
static

◆ GetWindowsVersion()

CSysInfo::WindowsVersion CSysInfo::GetWindowsVersion ( )
static

◆ GetXbmcBitness()

int CSysInfo::GetXbmcBitness ( void )
static

◆ HasInternet()

bool CSysInfo::HasInternet ( )

◆ IsAeroDisabled()

bool CSysInfo::IsAeroDisabled ( )

◆ IsWindowsVersion()

bool CSysInfo::IsWindowsVersion ( WindowsVersion ver)
static

◆ IsWindowsVersionAtLeast()

bool CSysInfo::IsWindowsVersionAtLeast ( WindowsVersion ver)
static

◆ Load()

bool CSysInfo::Load ( const TiXmlNode * settings)
overridevirtual

Load settings from the given XML node.

Parameters
settingsXML node containing setting values
Returns
True if loading the settings was successful, false otherwise.

Reimplemented from ISubSettings.

◆ OnJobComplete()

void CSysInfo::OnJobComplete ( unsigned int jobID,
bool success,
CJob * job )
overrideprotectedvirtual

The callback used when a job completes.

OnJobComplete is called at the completion of the job's DoWork() function, and is used to return information to the caller on the result of the job. On returning form this function the CJobManager will destroy this job.

Parameters
jobIDthe unique id of the job (as retrieved from CJobManager::AddJob)
successthe result from the DoWork call
jobthe job that has been processed. The job will be destroyed after this function returns
See also
CJobManager and CJob

Reimplemented from CInfoLoader.

◆ Save()

bool CSysInfo::Save ( TiXmlNode * settings) const
overridevirtual

Save settings to the given XML node.

Parameters
settingsXML node in which the settings will be saved
Returns
True if saving the settings was successful, false otherwise.

Reimplemented from ISubSettings.

◆ SetTotalUptime()

void CSysInfo::SetTotalUptime ( int uptime)
inline

◆ TranslateInfo()

std::string CSysInfo::TranslateInfo ( int info) const
overrideprotectedvirtual

Reimplemented from CInfoLoader.

Member Data Documentation

◆ MD5_Sign

char CSysInfo::MD5_Sign[32+1]

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