MythTV master
scheduledrecording.cpp
Go to the documentation of this file.
4
5void ScheduledRecording::SendReschedule(const QStringList &request)
6{
8 {
9 MythEvent me(QString("RESCHEDULE_RECORDINGS"), request);
11 }
12 else
13 {
14 QStringList slist;
15 slist << QString("RESCHEDULE_RECORDINGS");
16 slist << request;
18 {
19 LOG(VB_GENERAL, LOG_ERR,
20 QString("Error rescheduling %1 in "
21 "ScheduledRecording::SendReschedule").arg(request[0]));
22 }
23 }
24}
25
27 uint sourceid, uint mplexid, const QDateTime &maxstarttime,
28 const QString &why)
29{
30 return QStringList(QString("MATCH %1 %2 %3 %4 %5")
31 .arg(recordid).arg(sourceid).arg(mplexid)
32 .arg(maxstarttime.isValid()
33 ? maxstarttime.toString(Qt::ISODate)
34 : "-",
35 why));
36};
37
39 const QString &why)
40{
41 return QStringList(QString("CHECK %1 %2 %3 %4")
42 .arg(recinfo.GetRecordingStatus())
43 .arg(recinfo.GetParentRecordingRuleID() ?
44 recinfo.GetParentRecordingRuleID() :
45 recinfo.GetRecordingRuleID())
46 .arg(recinfo.GetFindID())
47 .arg(why))
48 << recinfo.GetTitle()
49 << recinfo.GetSubtitle()
50 << recinfo.GetDescription()
51 << recinfo.GetProgramID();
52};
53
54QStringList ScheduledRecording::BuildPlaceRequest(const QString &why)
55{
56 return QStringList(QString("PLACE %1").arg(why));
57};
58
59/* vim: set expandtab tabstop=4 shiftwidth=4: */
bool IsBackend(void) const
is this process a backend process
void dispatch(const MythEvent &event)
bool SendReceiveStringList(QStringList &strlist, bool quickTimeout=false, bool block=true)
Send a message to the backend and wait for a response.
This class is used as a container for messages.
Definition: mythevent.h:17
uint GetRecordingRuleID(void) const
Definition: programinfo.h:453
QString GetProgramID(void) const
Definition: programinfo.h:440
QString GetDescription(void) const
Definition: programinfo.h:366
QString GetTitle(void) const
Definition: programinfo.h:362
uint GetFindID(void) const
Definition: programinfo.h:472
uint GetParentRecordingRuleID(void) const
Definition: programinfo.h:454
RecStatus::Type GetRecordingStatus(void) const
Definition: programinfo.h:451
QString GetSubtitle(void) const
Definition: programinfo.h:364
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:36
static QStringList BuildPlaceRequest(const QString &why)
static QStringList BuildCheckRequest(const RecordingInfo &recinfo, const QString &why)
static QStringList BuildMatchRequest(uint recordid, uint sourceid, uint mplexid, const QDateTime &maxstarttime, const QString &why)
static void SendReschedule(const QStringList &request)
unsigned int uint
Definition: freesurround.h:24
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
@ ISODate
Default UTC.
Definition: mythdate.h:17