kodi
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
CSysInfo Class Reference
Inheritance diagram for CSysInfo:
Inheritance graph
[legend]
Collaboration diagram for CSysInfo:
Collaboration graph
[legend]

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_Future, WindowsVersionFuture = 100
}
 
enum  WindowsDeviceFamily {
  Mobile = 1, Desktop = 2, IoT = 3, Xbox = 4,
  Surface = 5, Other = 100
}
 

Public Member Functions

bool Load (const TiXmlNode *settings) override
 Load settings from the given XML node. More...
 
bool Save (TiXmlNode *settings) const override
 Save settings to the given XML node. More...
 
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)
 
std::string GetInfo (int info)
 
void Refresh ()
 
- Public Member Functions inherited from IJobCallback
virtual ~IJobCallback ()=default
 Destructor for job call back objects. More...
 
virtual void OnJobAbort (unsigned int jobID, CJob *job)
 An optional callback function used when a job will be aborted. More...
 
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. More...
 
- Public Member Functions inherited from ISubSettings
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. More...
 
- Protected Member Functions inherited from CInfoLoader
virtual std::string BusyInfo (int info) const
 

Member Function Documentation

◆ 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.


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