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

#include <InfoLoader.h>

Inheritance diagram for CInfoLoader:
IJobCallback CSysInfo CWeatherManager

Public Member Functions

 CInfoLoader (unsigned int timeToRefresh=5 *60 *1000)
 
 ~CInfoLoader () override
 
std::string GetInfo (int info)
 
void Refresh ()
 
void OnJobComplete (unsigned int jobID, bool success, CJob *job) override
 The callback used when a job completes.
 
- 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.
 

Protected Member Functions

virtual CJobGetJob () const =0
 
virtual std::string TranslateInfo (int info) const
 
virtual std::string BusyInfo (int info) const
 

Constructor & Destructor Documentation

◆ CInfoLoader()

CInfoLoader::CInfoLoader ( unsigned int timeToRefresh = 5 * 60 * 1000)
explicit

◆ ~CInfoLoader()

CInfoLoader::~CInfoLoader ( )
overridedefault

Member Function Documentation

◆ BusyInfo()

std::string CInfoLoader::BusyInfo ( int info) const
protectedvirtual

Reimplemented in CWeatherManager.

◆ GetInfo()

std::string CInfoLoader::GetInfo ( int info)

◆ GetJob()

virtual CJob * CInfoLoader::GetJob ( ) const
protectedpure virtual

Implemented in CSysInfo, and CWeatherManager.

◆ OnJobComplete()

void CInfoLoader::OnJobComplete ( unsigned int jobID,
bool success,
CJob * job )
overridevirtual

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

Implements IJobCallback.

Reimplemented in CSysInfo, and CWeatherManager.

◆ Refresh()

void CInfoLoader::Refresh ( )

◆ TranslateInfo()

std::string CInfoLoader::TranslateInfo ( int info) const
protectedvirtual

Reimplemented in CSysInfo, and CWeatherManager.


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