MythTV  master
scheduledrecording.h
Go to the documentation of this file.
1 #ifndef SCHEDULEDRECORDING_H
2 #define SCHEDULEDRECORDING_H
3 
4 #include "mythtvexp.h"
5 #include <QDateTime>
6 #include "recordinginfo.h"
7 
9 {
10  friend class Scheduler;
11 
12  public:
13  // Use when a recording rule or program data changes. Use 0 for
14  // recordid when all recordids are potentially affected, Use
15  // invalid starttime and 0 for chanids when not time nor channel
16  // specific.
17  static void RescheduleMatch(uint recordid, uint sourceid, uint mplexid,
18  const QDateTime &maxstarttime, const QString &why)
19  { SendReschedule(BuildMatchRequest(recordid, sourceid, mplexid,
20  maxstarttime, why)); };
21 
22  // Use when previous or current recorded duplicate status changes.
23  static void RescheduleCheck(const RecordingInfo &recinfo,
24  const QString &why)
25  { SendReschedule(BuildCheckRequest(recinfo, why)); };
26  // Alternate function for calling with a ProgramInfo structure
27  static void RescheduleCheck(const ProgramInfo &proginfo,
28  const QString &why)
29  { SendReschedule(BuildCheckRequest(RecordingInfo(proginfo), why)); };
30 
31  // Use when none of recording rule, program data or duplicate
32  // status changes.
33  static void ReschedulePlace(const QString &why)
34  { SendReschedule(BuildPlaceRequest(why)); };
35 
36  private:
37  ScheduledRecording() = default;
38  ~ScheduledRecording() = default;
39 
40  static void SendReschedule(const QStringList &request);
41  static QStringList BuildMatchRequest(uint recordid, uint sourceid,
42  uint mplexid, const QDateTime &maxstarttime, const QString &why);
43  static QStringList BuildCheckRequest(const RecordingInfo &recinfo,
44  const QString &why);
45  static QStringList BuildPlaceRequest(const QString &why);
46 };
47 
48 #endif
49 
50 /* vim: set expandtab tabstop=4 shiftwidth=4: */
51 
Scheduler
Definition: scheduler.h:45
RecordingInfo
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:35
mythtvexp.h
ScheduledRecording::RescheduleCheck
static void RescheduleCheck(const RecordingInfo &recinfo, const QString &why)
Definition: scheduledrecording.h:23
uint
unsigned int uint
Definition: compat.h:81
ScheduledRecording::RescheduleCheck
static void RescheduleCheck(const ProgramInfo &proginfo, const QString &why)
Definition: scheduledrecording.h:27
ScheduledRecording::ReschedulePlace
static void ReschedulePlace(const QString &why)
Definition: scheduledrecording.h:33
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
recordinginfo.h
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
ScheduledRecording::RescheduleMatch
static void RescheduleMatch(uint recordid, uint sourceid, uint mplexid, const QDateTime &maxstarttime, const QString &why)
Definition: scheduledrecording.h:17
ScheduledRecording
Definition: scheduledrecording.h:8