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

#include <WeatherJob.h>

Inheritance diagram for CWeatherJob:
CJob

Public Member Functions

 CWeatherJob (int location)
 
bool DoWork () override
 Main workhorse function of CJob instances.
 
int GetLocation () const
 
const WeatherInfoGetInfo () const
 
const CWeatherManager::WeatherInfoV2GetInfoV2 () const
 
- Public Member Functions inherited from CJob
 CJob ()=default
 
virtual ~CJob ()=default
 Destructor for job objects.
 
virtual const char * GetType () const
 Function that returns the type of job.
 
virtual bool Equals (const CJob *job) const
 Function that compares this job instance with the given job instance.
 
void SetProgressCallback (CJobManager *callback)
 Function to set a callback for jobs to report progress.
 
virtual bool ShouldCancel (unsigned int progress, unsigned int total) const
 Function for longer jobs to report progress and check whether they have been cancelled.
 

Static Public Attributes

static constexpr int MAX_HOURS_TO_FETCH = 72
 
static constexpr int MAX_DAYS_TO_FETCH = 31
 

Additional Inherited Members

- Public Types inherited from CJob
enum  PRIORITY {
  PRIORITY_LOW_PAUSABLE = 0 , PRIORITY_LOW , PRIORITY_NORMAL , PRIORITY_HIGH ,
  PRIORITY_DEDICATED
}
 Priority levels for jobs, specified by clients when adding jobs to the CJobManager. More...
 

Constructor & Destructor Documentation

◆ CWeatherJob()

CWeatherJob::CWeatherJob ( int location)
explicit

Member Function Documentation

◆ DoWork()

bool CWeatherJob::DoWork ( )
overridevirtual

Main workhorse function of CJob instances.

All CJob subclasses must implement this function, performing all processing. Once this function is complete, the OnJobComplete() callback is called, and the job is then destroyed.

See also
CJobManager, IJobCallback::OnJobComplete()

Implements CJob.

◆ GetInfo()

const WeatherInfo & CWeatherJob::GetInfo ( ) const

◆ GetInfoV2()

const CWeatherManager::WeatherInfoV2 & CWeatherJob::GetInfoV2 ( ) const

◆ GetLocation()

int CWeatherJob::GetLocation ( ) const

Member Data Documentation

◆ MAX_DAYS_TO_FETCH

int CWeatherJob::MAX_DAYS_TO_FETCH = 31
staticconstexpr

◆ MAX_HOURS_TO_FETCH

int CWeatherJob::MAX_HOURS_TO_FETCH = 72
staticconstexpr

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