Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CSysInfo Class Reference

#include <SystemInfo.h>

Inheritance diagram for CSysInfo:
CInfoLoader ISubSettings IJobCallback

Public Types

enum  WindowsVersion {
  WindowsVersionUnknown = -1 , WindowsVersionWin7 , WindowsVersionWin8 , WindowsVersionWin8_1 ,
  WindowsVersionWin10 , WindowsVersionWin10_FCU , 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. More...
 
bool Save (TiXmlNode *settings) const override
 Save settings to the given XML node. More...
 
bool HasInternet ()
 
bool HasVideoToolBoxDecoder ()
 
bool IsAeroDisabled ()
 
std::string GetCPUModel ()
 
std::string GetCPUBogoMips ()
 
std::string GetCPUSoC ()
 
std::string GetCPUHardware ()
 
std::string GetCPURevision ()
 
std::string GetCPUSerial ()
 
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. 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 ~ISubSettings ()=default
 
virtual void Clear ()
 Clear any loaded setting values. More...
 

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 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 Enumeration Documentation

◆ WindowsDeviceFamily

Enumerator
Mobile 
Desktop 
IoT 
Xbox 
Surface 
Other 

◆ WindowsVersion

Enumerator
WindowsVersionUnknown 
WindowsVersionWin7 
WindowsVersionWin8 
WindowsVersionWin8_1 
WindowsVersionWin10 
WindowsVersionWin10_FCU 
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

◆ GetCPUBogoMips()

std::string CSysInfo::GetCPUBogoMips ( )

◆ GetCPUHardware()

std::string CSysInfo::GetCPUHardware ( )

◆ GetCPUModel()

std::string CSysInfo::GetCPUModel ( )

◆ GetCPURevision()

std::string CSysInfo::GetCPURevision ( )

◆ GetCPUSerial()

std::string CSysInfo::GetCPUSerial ( )

◆ GetCPUSoC()

std::string CSysInfo::GetCPUSoC ( )

◆ 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

◆ 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 ( )

◆ HasVideoToolBoxDecoder()

bool CSysInfo::HasVideoToolBoxDecoder ( )

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