11 #include "settings/lib/ISettingCallback.h" 12 #include "threads/CriticalSection.h" 13 #include "threads/Timer.h" 14 #include "utils/EventStream.h" 15 #include "utils/Job.h" 28 using RepositoryPtr = std::shared_ptr<CRepository>;
30 class CRepositoryUpdateJob;
45 void CheckForUpdates(
const ADDON::RepositoryPtr& repo,
bool showProgress=
false);
78 void OnSettingChanged(
const std::shared_ptr<const CSetting>& setting)
override;
90 void OnJobComplete(
unsigned int jobID,
bool success,
CJob *job)
override;
92 void OnTimeout()
override;
98 CCriticalSection m_criticalSection;
101 std::vector<CRepositoryUpdateJob*> m_jobs;
Class - CAddonMgr Holds references to all addons, enabled or otherwise.
Definition: AddonManager.h:79
This is an Event class built from a ConditionVariable.
Definition: Event.h:35
Base class for jobs that are executed asynchronously.
Definition: Job.h:109
Definition: EventStream.h:65
void Await()
Wait for any pending/in-progress updates to complete.
Definition: RepositoryUpdater.cpp:247
CDateTime LastUpdated() const
Returns the time of the last check (oldest).
Definition: RepositoryUpdater.cpp:274
Definition: RepositoryUpdater.h:80
Definition: ISettingCallback.h:16
UpdateScheduleType
Definition: RepositoryUpdater.h:57
Definition: RepositoryUpdater.h:34
Definition: AddonEvents.h:18
void CheckForUpdates(const ADDON::RepositoryPtr &repo, bool showProgress=false)
Check a single repository for updates.
Definition: RepositoryUpdater.cpp:225
DateTime class, which uses FileTime as it's base.
Definition: XBDateTime.h:63
void OnSettingChanged(const std::shared_ptr< const CSetting > &setting) override
The value of the given setting has changed.
Definition: RepositoryUpdater.cpp:268
void ScheduleUpdate(UpdateScheduleType scheduleType)
Schedule an automatic update to run based on settings and previous update times.
Definition: RepositoryUpdater.cpp:314
Callback interface for asynchronous jobs.
Definition: Job.h:31
Definition: EventStream.h:22