kodi
Classes | Public Types | Public Member Functions | List of all members
ADDON::CRepositoryUpdater Class Reference
Inheritance diagram for ADDON::CRepositoryUpdater:
Inheritance graph
[legend]
Collaboration diagram for ADDON::CRepositoryUpdater:
Collaboration graph
[legend]

Classes

struct  RepositoryUpdated
 

Public Types

enum  UpdateScheduleType { UpdateScheduleType::First, UpdateScheduleType::Regular }
 

Public Member Functions

 CRepositoryUpdater (CAddonMgr &addonMgr)
 
void Start ()
 
void CheckForUpdates (const ADDON::RepositoryPtr &repo, bool showProgress=false)
 Check a single repository for updates.
 
bool CheckForUpdates (bool showProgress=false)
 Check all repositories for updates.
 
void Await ()
 Wait for any pending/in-progress updates to complete.
 
void ScheduleUpdate (UpdateScheduleType scheduleType)
 Schedule an automatic update to run based on settings and previous update times. More...
 
CDateTime LastUpdated () const
 Returns the time of the last check (oldest). More...
 
void OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override
 The value of the given setting has changed. More...
 
CEventStream< RepositoryUpdated > & Events ()
 
- Public Member Functions inherited from ISettingCallback
virtual bool OnSettingChanging (const std::shared_ptr< const CSetting > &setting)
 The value of the given setting is being changed. More...
 
virtual void OnSettingAction (const std::shared_ptr< const CSetting > &setting)
 The given setting has been activated. More...
 
virtual bool OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode)
 The given setting needs to be updated. More...
 
virtual void OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName)
 The given property of the given setting has changed. More...
 

Member Enumeration Documentation

◆ UpdateScheduleType

Enumerator
First 

Update should be scheduled as the first update after application start or setting change.

Regular 

Update should be scheduled as a regular update during application runtime.

Member Function Documentation

◆ LastUpdated()

CDateTime ADDON::CRepositoryUpdater::LastUpdated ( ) const

Returns the time of the last check (oldest).

Invalid time if never checked.

◆ OnSettingChanged()

void ADDON::CRepositoryUpdater::OnSettingChanged ( const std::shared_ptr< const CSetting > &  setting)
overridevirtual

The value of the given setting has changed.

This callback is triggered whenever the value of a setting has been successfully changed (i.e. none of the OnSettingChanging() handlers) has reverted the change.

Parameters
settingThe setting whose value has been changed

Reimplemented from ISettingCallback.

◆ ScheduleUpdate()

void ADDON::CRepositoryUpdater::ScheduleUpdate ( UpdateScheduleType  scheduleType)

Schedule an automatic update to run based on settings and previous update times.

May be called when there are external changes this updater must know about. Any previously scheduled update will be cancelled.


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