Go to the documentation of this file.
3 #ifndef PROGRAM_INFO_CACHE_H
4 #define PROGRAM_INFO_CACHE_H
11 #include <QWaitCondition>
47 void GetOrdered(std::vector<ProgramInfo*> &list,
bool newest_first =
false);
53 void Load(
bool updateUI =
true);
62 using Cache = QHash<uint,ProgramInfo*>;
73 Q_DECLARE_OPERATORS_FOR_FLAGS(ProgramInfoCache::UpdateStates)
75 #endif // PROGRAM_INFO_CACHE_H
void Add(const ProgramInfo &pginfo)
Adds a ProgramInfo to the cache.
ProgramInfoCache(QObject *o)
void GetOrdered(std::vector< ProgramInfo * > &list, bool newest_first=false)
Q_DECLARE_FLAGS(UpdateStates, UpdateState)
void ScheduleLoad(bool updateUI=true)
ProgramInfoCache::UpdateStates Update(const ProgramInfo &pginfo)
Updates a ProgramInfo in the cache.
ProgramInfo * GetRecordingInfo(uint recordingID) const
void Refresh(void)
Refreshed the cache.
void WaitForLoadToComplete(void) const
bool IsLoadInProgress(void) const
void Load(bool updateUI=true)
Holds information on recordings and videos.
QWaitCondition m_loadWait
void UpdateFileSize(uint recordingID, uint64_t filesize, UpdateStates flags)
Updates a ProgramInfo in the cache.
bool Remove(uint recordingID)
Marks a ProgramInfo in the cache for deletion on the next call to Refresh().
QHash< uint, ProgramInfo * > Cache
void Clear(void)
Clears the cache, m_lock must be held when this is called.
std::vector< ProgramInfo * > * m_nextCache