MythTV  master
mythscheduler.h
Go to the documentation of this file.
1 #ifndef MYTH_SCHEDULER_H
2 #define MYTH_SCHEDULER_H
3 
4 #include <deque>
5 
6 #include <QStringList>
7 #include <QMap>
8 
9 class ProgramInfo;
10 class RecordingInfo;
11 
12 using RecList = std::deque<RecordingInfo*>;
13 #define SORT_RECLIST(LIST, ORDER) \
14  do { std::stable_sort((LIST).begin(), (LIST).end(), ORDER); } while (false)
15 
16 using RecConstIter = RecList::const_iterator;
17 using RecIter = RecList::iterator;
18 
21 {
22  public:
23  MythScheduler() = default;
24  virtual ~MythScheduler() = default;
25  // Returns a string list containing the a boolean
26  // value for whether there are conflicts, followed
27  // by the number of ProgramInfo's represented by
28  // the list, followed by ProgramInfo's serialized
29  // to string lists.
30  virtual void GetAllPending(QStringList &strList) const = 0;
31  // Returns all the pending recording with a RecStatus::Recording, RecStatus::Tuning
32  // or RecStatus::Failing status (i.e. currently attempting to record.)
33  virtual QMap<QString,ProgramInfo*> GetRecording(void) const = 0;
34 };
35 
36 #endif // MYTH_SCHEDULER_H
RecConstIter
RecList::const_iterator RecConstIter
Definition: mythscheduler.h:16
MythScheduler
This is an generic interface to a program scheduler.
Definition: mythscheduler.h:21
RecordingInfo
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:35
MythScheduler::GetAllPending
virtual void GetAllPending(QStringList &strList) const =0
MythScheduler::GetRecording
virtual QMap< QString, ProgramInfo * > GetRecording(void) const =0
RecIter
RecList::iterator RecIter
Definition: mythscheduler.h:17
MythScheduler::~MythScheduler
virtual ~MythScheduler()=default
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:68
RecList
std::deque< RecordingInfo * > RecList
Definition: mythscheduler.h:12
MythScheduler::MythScheduler
MythScheduler()=default