|
MythTV
0.26-pre
|
#include <programinfocache.h>
Classes | |
| struct | ltkey |
| class | PICKey |
Public Member Functions | |
| ProgramInfoCache (QObject *o) | |
| ~ProgramInfoCache () | |
| void | ScheduleLoad (const bool updateUI=true) |
| bool | IsLoadInProgress (void) const |
| void | WaitForLoadToComplete (void) const |
| void | Refresh (void) |
| Refreshed the cache. | |
| void | Add (const ProgramInfo &) |
| Adds a ProgramInfo to the cache. | |
| bool | Remove (uint chanid, const QDateTime &recstartts) |
| Marks a ProgramInfo in the cache for deletion on the next call to Refresh(). | |
| bool | Update (const ProgramInfo &) |
| Updates a ProgramInfo in the cache. | |
| bool | UpdateFileSize (uint chanid, const QDateTime &recstartts, uint64_t filesize) |
| Updates a ProgramInfo in the cache. | |
| QString | GetRecGroup (uint chanid, const QDateTime &recstartts) const |
| Returns the ProgramInfo::recgroup or an empty string if not found. | |
| void | GetOrdered (vector< ProgramInfo * > &list, bool newest_first=false) |
| bool | empty (void) const |
| ProgramInfo * | GetProgramInfo (uint chanid, const QDateTime &recstartts) const |
| ProgramInfo * | GetProgramInfo (const QString &piKey) const |
Private Types | |
| typedef map< PICKey, ProgramInfo *, ltkey > | Cache |
Private Member Functions | |
| void | Load (const bool updateUI=true) |
| void | Clear (void) |
| Clears the cache, m_lock must be held when this is called. | |
Private Attributes | |
| QMutex | m_lock |
| Cache | m_cache |
| vector< ProgramInfo * > * | m_next_cache |
| QObject * | m_listener |
| bool | m_load_is_queued |
| uint | m_loads_in_progress |
| QWaitCondition | m_load_wait |
Friends | |
| class | ProgramInfoLoader |
Definition at line 23 of file programinfocache.h.
typedef map<PICKey,ProgramInfo*,ltkey> ProgramInfoCache::Cache [private] |
Definition at line 71 of file programinfocache.h.
| ProgramInfoCache::ProgramInfoCache | ( | QObject * | o | ) |
Definition at line 45 of file programinfocache.cpp.
Definition at line 51 of file programinfocache.cpp.
| void ProgramInfoCache::ScheduleLoad | ( | const bool | updateUI = true | ) |
Definition at line 62 of file programinfocache.cpp.
Referenced by PlaybackBox::Create(), PlaybackBox::customEvent(), and PlaybackBox::HandleRecordingRemoveEvent().
| bool ProgramInfoCache::IsLoadInProgress | ( | void | ) | const |
Definition at line 98 of file programinfocache.cpp.
Referenced by PlaybackBox::ScheduleUpdateUIList().
| void ProgramInfoCache::WaitForLoadToComplete | ( | void | ) | const |
Definition at line 104 of file programinfocache.cpp.
Referenced by PlaybackBox::Load().
Refreshed the cache.
If a new list has been loaded this fills the cache with that list if not, this simply removes list items marked for deletion from the the list.
Definition at line 121 of file programinfocache.cpp.
Referenced by PlaybackBox::UpdateUILists().
| void ProgramInfoCache::Add | ( | const ProgramInfo & | pginfo | ) |
Adds a ProgramInfo to the cache.
Definition at line 215 of file programinfocache.cpp.
Referenced by PlaybackBox::HandleRecordingAddEvent().
| bool ProgramInfoCache::Remove | ( | uint | chanid, |
| const QDateTime & | recstartts | ||
| ) |
Marks a ProgramInfo in the cache for deletion on the next call to Refresh().
Definition at line 229 of file programinfocache.cpp.
Referenced by PlaybackBox::HandleRecordingRemoveEvent().
| bool ProgramInfoCache::Update | ( | const ProgramInfo & | pginfo | ) |
Updates a ProgramInfo in the cache.
Definition at line 161 of file programinfocache.cpp.
Referenced by Add(), and PlaybackBox::HandleUpdateProgramInfoEvent().
| bool ProgramInfoCache::UpdateFileSize | ( | uint | chanid, |
| const QDateTime & | recstartts, | ||
| uint64_t | filesize | ||
| ) |
Updates a ProgramInfo in the cache.
Definition at line 178 of file programinfocache.cpp.
Referenced by PlaybackBox::HandleUpdateProgramInfoFileSizeEvent().
| QString ProgramInfoCache::GetRecGroup | ( | uint | chanid, |
| const QDateTime & | recstartts | ||
| ) | const |
Returns the ProgramInfo::recgroup or an empty string if not found.
Definition at line 198 of file programinfocache.cpp.
Referenced by PlaybackBox::HandleUpdateProgramInfoEvent().
| void ProgramInfoCache::GetOrdered | ( | vector< ProgramInfo * > & | list, |
| bool | newest_first = false |
||
| ) |
Definition at line 239 of file programinfocache.cpp.
Referenced by PlaybackBox::UpdateUILists().
| bool ProgramInfoCache::empty | ( | void | ) | const [inline] |
Definition at line 44 of file programinfocache.h.
Referenced by empty(), PlaybackBox::updateRecList(), and PlaybackBox::UpdateUILists().
| ProgramInfo * ProgramInfoCache::GetProgramInfo | ( | uint | chanid, |
| const QDateTime & | recstartts | ||
| ) | const |
Definition at line 254 of file programinfocache.cpp.
Referenced by PlaybackBox::customEvent(), GetProgramInfo(), PlaybackBox::HandlePreviewEvent(), and PlaybackBox::Play().
| ProgramInfo * ProgramInfoCache::GetProgramInfo | ( | const QString & | piKey | ) | const |
Definition at line 265 of file programinfocache.cpp.
| void ProgramInfoCache::Load | ( | const bool | updateUI = true | ) | [private] |
Definition at line 74 of file programinfocache.cpp.
Referenced by ProgramInfoLoader::run().
| void ProgramInfoCache::Clear | ( | void | ) | [private] |
Clears the cache, m_lock must be held when this is called.
Definition at line 275 of file programinfocache.cpp.
Referenced by Refresh(), and ~ProgramInfoCache().
friend class ProgramInfoLoader [friend] |
Definition at line 25 of file programinfocache.h.
Referenced by ScheduleLoad().
QMutex ProgramInfoCache::m_lock [mutable, private] |
Definition at line 73 of file programinfocache.h.
Referenced by GetRecGroup(), IsLoadInProgress(), Load(), Refresh(), ScheduleLoad(), Update(), UpdateFileSize(), WaitForLoadToComplete(), and ~ProgramInfoCache().
Cache ProgramInfoCache::m_cache [private] |
Definition at line 74 of file programinfocache.h.
Referenced by Add(), Clear(), GetOrdered(), GetProgramInfo(), GetRecGroup(), Refresh(), Remove(), Update(), and UpdateFileSize().
vector<ProgramInfo*>* ProgramInfoCache::m_next_cache [private] |
Definition at line 75 of file programinfocache.h.
Referenced by Load(), Refresh(), and ~ProgramInfoCache().
QObject* ProgramInfoCache::m_listener [private] |
Definition at line 76 of file programinfocache.h.
Referenced by Load().
bool ProgramInfoCache::m_load_is_queued [private] |
Definition at line 77 of file programinfocache.h.
Referenced by Load(), and ScheduleLoad().
uint ProgramInfoCache::m_loads_in_progress [private] |
Definition at line 78 of file programinfocache.h.
Referenced by IsLoadInProgress(), Load(), ScheduleLoad(), WaitForLoadToComplete(), and ~ProgramInfoCache().
QWaitCondition ProgramInfoCache::m_load_wait [mutable, private] |
Definition at line 79 of file programinfocache.h.
Referenced by Load(), WaitForLoadToComplete(), and ~ProgramInfoCache().
1.7.6.1