|
MythTV
0.25-pre
|
Holds information on a TV Program one might wish to record. More...
#include <recordinginfo.h>
Public Types | |
| enum | LoadStatus { kNoProgram = 0, kFoundProgram = 1, kFakedLiveTVProgram = 2, kFakedZeroMinProgram = 3 } |
Public Member Functions | |
| RecordingInfo (void) | |
| RecordingInfo (const RecordingInfo &other) | |
| RecordingInfo (const ProgramInfo &other) | |
| RecordingInfo (uint _chanid, const QDateTime &_recstartts) | |
| RecordingInfo (QStringList::const_iterator &it, QStringList::const_iterator end) | |
| RecordingInfo (const QString &title, const QString &subtitle, const QString &description, uint season, uint episode, const QString &category, uint chanid, const QString &chanstr, const QString &chansign, const QString &channame, const QString &recgroup, const QString &playgroup, const QString &hostname, const QString &storagegroup, uint year, const QString &seriesid, const QString &programid, const QString &inetref, const QString &catType, int recpriority, const QDateTime &startts, const QDateTime &endts, const QDateTime &recstartts, const QDateTime &recendts, float stars, const QDate &originalAirDate, bool repeat, RecStatusType oldrecstatus, bool reactivate, uint recordid, uint parentid, RecordingType rectype, RecordingDupInType dupin, RecordingDupMethodType dupmethod, uint sourceid, uint inputid, uint cardid, uint findid, bool commfree, uint subtitleType, uint videoproperties, uint audioproperties, bool future) | |
| Create RecordingInfo from 'program'+'record'+'channel' tables, used in scheduler.cpp @ ~ 3296. | |
| RecordingInfo (const QString &title, const QString &subtitle, const QString &description, uint season, uint episode, const QString &category, uint chanid, const QString &chanstr, const QString &chansign, const QString &channame, const QString &recgroup, const QString &playgroup, const QString &seriesid, const QString &programid, const QString &inetref, int recpriority, const QDateTime &startts, const QDateTime &endts, const QDateTime &recstartts, const QDateTime &recendts, RecStatusType recstatus, uint recordid, RecordingType rectype, RecordingDupInType dupin, RecordingDupMethodType dupmethod, uint findid, bool commfree) | |
| Create RecordingInfo from 'record'+'channel' tables, user in scheduler.cpp @ ~ 3566 & ~ 3643. | |
| RecordingInfo (uint _chanid, const QDateTime &desiredts, bool genUnknown, uint maxHours=0, LoadStatus *status=NULL) | |
| Fills RecordingInfo for the program that airs at "desiredts" on "chanid". | |
| RecordingInfo & | operator= (const RecordingInfo &other) |
| RecordingInfo & | operator= (const ProgramInfo &other) |
| Copies important fields from other ProgramInfo. | |
| virtual void | clone (const RecordingInfo &other, bool ignore_non_serialized_data=false) |
| Copies important fields from other RecordingInfo. | |
| virtual void | clone (const ProgramInfo &other, bool ignore_non_serialized_data=false) |
| Copies important fields from ProgramInfo. | |
| virtual void | clear (void) |
| virtual | ~RecordingInfo () |
| Destructor deletes "record" if it exists. | |
| virtual void | SubstituteMatches (QString &str) |
| Replace MATCH% vars in the specified string. | |
| QString | MakeUniqueSchedulerKey (void) const |
| Creates a unique string that can be used to identify a scheduled recording. | |
| RecordingRule * | GetRecordingRule (void) |
| Returns the "record" field, creating it if necessary. | |
| int | getRecordID (void) |
| Returns a record id, creating "record" it if necessary. | |
| int | GetAutoRunJobs (void) const |
| Returns a bitmap of which jobs are attached to this RecordingInfo. | |
| RecordingType | GetProgramRecordingStatus (void) |
| Returns the recording type for this RecordingInfo, creating "record" field if necessary. | |
| QString | GetProgramRecordingProfile (void) const |
| Returns recording profile name that will be, or was used, for this program, creating "record" field if necessary. | |
| void | ApplyRecordStateChange (RecordingType newstate, bool save=true) |
| Sets RecordingType of "record", creating "record" if it does not exist. | |
| void | ApplyRecordRecPriorityChange (int) |
| Sets recording priority of "record", creating "record" if it does not exist. | |
| void | ToggleRecord (void) |
| Cycles through recording types. | |
| void | AddHistory (bool resched=true, bool forcedup=false, bool future=false) |
| Adds recording history, creating "record" it if necessary. | |
| void | DeleteHistory (void) |
| Deletes recording history, creating "record" it if necessary. | |
| void | ForgetHistory (void) |
| Forget the recording of a program so it will be recorded again. | |
| void | SetDupHistory (void) |
| Set the duplicate flag in oldrecorded. | |
| void | StartedRecording (QString ext) |
| Inserts this RecordingInfo into the database as an existing recording. | |
| void | FinishedRecording (bool allowReRecord) |
| If not a premature stop, adds program to history of recorded programs. | |
| void | UpdateRecordingEnd (void) |
| Update information in the recorded table when the end-time of a recording is changed. | |
| void | ReactivateRecording (void) |
| Asks the scheduler to restart this recording if possible. | |
| void | ApplyRecordRecID (void) |
| Sets recordid to match RecordingRule recordid. | |
| void | ApplyRecordRecGroupChange (const QString &newrecgroup) |
| Sets the recording group, both in this RecordingInfo and in the database. | |
| void | ApplyRecordPlayGroupChange (const QString &newrecgroup) |
| Sets the recording group, both in this RecordingInfo and in the database. | |
| void | ApplyStorageGroupChange (const QString &newstoragegroup) |
| Sets the storage group, both in this RecordingInfo and in the database. | |
| void | ApplyRecordRecTitleChange (const QString &newTitle, const QString &newSubtitle, const QString &newDescription) |
| Sets the recording title, subtitle, and description both in this RecordingInfo and in the database. | |
| void | ApplyTranscoderProfileChange (const QString &profile) const |
| Sets the transcoder profile for a recording. | |
| void | ApplyTranscoderProfileChangeById (int) |
Static Public Member Functions | |
| static void | signalChange (int recordid) |
Public Attributes | |
| RecStatusType | oldrecstatus |
| RecStatusType | savedrecstatus |
| bool | future |
Static Protected Member Functions | |
| static bool | InsertProgram (const RecordingInfo *pg, const RecordingRule *rule) |
Static Protected Attributes | |
| static QString | unknownTitle |
Private Attributes | |
| class RecordingRule * | record |
Holds information on a TV Program one might wish to record.
This class exxtends ProgramInfo with additional information about scheduled recordings and contains helper methods to aid in the scheduling of recordings.
Definition at line 29 of file recordinginfo.h.
Definition at line 165 of file recordinginfo.h.
| RecordingInfo::RecordingInfo | ( | void | ) | [inline] |
Definition at line 32 of file recordinginfo.h.
| RecordingInfo::RecordingInfo | ( | const RecordingInfo & | other | ) | [inline] |
Definition at line 37 of file recordinginfo.h.
| RecordingInfo::RecordingInfo | ( | const ProgramInfo & | other | ) | [inline] |
Definition at line 43 of file recordinginfo.h.
| RecordingInfo::RecordingInfo | ( | uint | _chanid, |
| const QDateTime & | _recstartts | ||
| ) | [inline] |
Definition at line 49 of file recordinginfo.h.
| RecordingInfo::RecordingInfo | ( | QStringList::const_iterator & | it, |
| QStringList::const_iterator | end | ||
| ) | [inline] |
Definition at line 55 of file recordinginfo.h.
| RecordingInfo::RecordingInfo | ( | const QString & | title, |
| const QString & | subtitle, | ||
| const QString & | description, | ||
| uint | season, | ||
| uint | episode, | ||
| const QString & | category, | ||
| uint | chanid, | ||
| const QString & | chanstr, | ||
| const QString & | chansign, | ||
| const QString & | channame, | ||
| const QString & | recgroup, | ||
| const QString & | playgroup, | ||
| const QString & | hostname, | ||
| const QString & | storagegroup, | ||
| uint | year, | ||
| const QString & | seriesid, | ||
| const QString & | programid, | ||
| const QString & | inetref, | ||
| const QString & | catType, | ||
| int | recpriority, | ||
| const QDateTime & | startts, | ||
| const QDateTime & | endts, | ||
| const QDateTime & | recstartts, | ||
| const QDateTime & | recendts, | ||
| float | stars, | ||
| const QDate & | originalAirDate, | ||
| bool | repeat, | ||
| RecStatusType | oldrecstatus, | ||
| bool | reactivate, | ||
| uint | recordid, | ||
| uint | parentid, | ||
| RecordingType | rectype, | ||
| RecordingDupInType | dupin, | ||
| RecordingDupMethodType | dupmethod, | ||
| uint | sourceid, | ||
| uint | inputid, | ||
| uint | cardid, | ||
| uint | findid, | ||
| bool | commfree, | ||
| uint | subtitleType, | ||
| uint | videoproperties, | ||
| uint | audioproperties, | ||
| bool | future | ||
| ) |
Create RecordingInfo from 'program'+'record'+'channel' tables, used in scheduler.cpp @ ~ 3296.
Definition at line 45 of file recordinginfo.cpp.
| RecordingInfo::RecordingInfo | ( | const QString & | title, |
| const QString & | subtitle, | ||
| const QString & | description, | ||
| uint | season, | ||
| uint | episode, | ||
| const QString & | category, | ||
| uint | chanid, | ||
| const QString & | chanstr, | ||
| const QString & | chansign, | ||
| const QString & | channame, | ||
| const QString & | recgroup, | ||
| const QString & | playgroup, | ||
| const QString & | seriesid, | ||
| const QString & | programid, | ||
| const QString & | inetref, | ||
| int | recpriority, | ||
| const QDateTime & | startts, | ||
| const QDateTime & | endts, | ||
| const QDateTime & | recstartts, | ||
| const QDateTime & | recendts, | ||
| RecStatusType | recstatus, | ||
| uint | recordid, | ||
| RecordingType | rectype, | ||
| RecordingDupInType | dupin, | ||
| RecordingDupMethodType | dupmethod, | ||
| uint | findid, | ||
| bool | commfree | ||
| ) |
Create RecordingInfo from 'record'+'channel' tables, user in scheduler.cpp @ ~ 3566 & ~ 3643.
Definition at line 159 of file recordinginfo.cpp.
| RecordingInfo::RecordingInfo | ( | uint | _chanid, |
| const QDateTime & | desiredts, | ||
| bool | genUnknown, | ||
| uint | maxHours = 0, |
||
| LoadStatus * | status = NULL |
||
| ) |
Fills RecordingInfo for the program that airs at "desiredts" on "chanid".
| chanid | Channel ID on which to search for program. |
| desiredts | Date and Time for which we desire the program. |
| genUnknown | Generate a full entry for live-tv if unknown |
| maxHours | Clamp the maximum time to X hours from dtime. |
Definition at line 230 of file recordinginfo.cpp.
| RecordingInfo::~RecordingInfo | ( | ) | [virtual] |
Destructor deletes "record" if it exists.
Definition at line 421 of file recordinginfo.cpp.
| RecordingInfo& RecordingInfo::operator= | ( | const RecordingInfo & | other | ) | [inline] |
Reimplemented in ProgramRecPriorityInfo.
Definition at line 176 of file recordinginfo.h.
| RecordingInfo& RecordingInfo::operator= | ( | const ProgramInfo & | other | ) | [inline] |
Copies important fields from other ProgramInfo.
Reimplemented from ProgramInfo.
Reimplemented in ProgramRecPriorityInfo.
Definition at line 178 of file recordinginfo.h.
| void RecordingInfo::clone | ( | const RecordingInfo & | other, |
| bool | ignore_non_serialized_data = false |
||
| ) | [virtual] |
Copies important fields from other RecordingInfo.
Definition at line 357 of file recordinginfo.cpp.
Referenced by clone().
| void RecordingInfo::clone | ( | const ProgramInfo & | other, |
| bool | ignore_non_serialized_data = false |
||
| ) | [virtual] |
Copies important fields from ProgramInfo.
Reimplemented from ProgramInfo.
Definition at line 383 of file recordinginfo.cpp.
| void RecordingInfo::clear | ( | void | ) | [virtual] |
Reimplemented from ProgramInfo.
Reimplemented in ProgramRecPriorityInfo.
Definition at line 405 of file recordinginfo.cpp.
| void RecordingInfo::SubstituteMatches | ( | QString & | str | ) | [virtual] |
Replace MATCH% vars in the specified string.
| str | QString containing matches to be substituted |
Reimplemented from ProgramInfo.
Definition at line 1357 of file recordinginfo.cpp.
| QString RecordingInfo::MakeUniqueSchedulerKey | ( | void | ) | const [inline] |
Creates a unique string that can be used to identify a scheduled recording.
Definition at line 196 of file recordinginfo.h.
Referenced by Scheduler::HandleRecording(), Scheduler::SchedNewRecords(), and Scheduler::TryAnotherShowing().
Returns the "record" field, creating it if necessary.
Definition at line 834 of file recordinginfo.cpp.
Referenced by Scheduler::AddRecording(), Dvr::AddRecordSchedule(), Dvr::GetRecordScheduleList(), load_profile(), TVRec::NotifySchedulerOfRecording(), and TVRec::TuningRestartRecorder().
Returns a record id, creating "record" it if necessary.
Definition at line 843 of file recordinginfo.cpp.
Referenced by ApplyRecordRecID(), ProgramRecPriority::scheduleChanged(), and SubstituteMatches().
| int RecordingInfo::GetAutoRunJobs | ( | void | ) | const |
Returns a bitmap of which jobs are attached to this RecordingInfo.
Definition at line 462 of file recordinginfo.cpp.
Referenced by init_jobs(), main(), and JobQueue::QueueRecordingJobs().
Returns the recording type for this RecordingInfo, creating "record" field if necessary.
Definition at line 432 of file recordinginfo.cpp.
Referenced by ApplyRecordRecPriorityChange(), ApplyRecordStateChange(), FinishedRecording(), getRecordID(), GetRecordingRule(), and ToggleRecord().
| QString RecordingInfo::GetProgramRecordingProfile | ( | void | ) | const |
Returns recording profile name that will be, or was used, for this program, creating "record" field if necessary.
Definition at line 448 of file recordinginfo.cpp.
Referenced by FillProgramInfo(), and HttpStatus::FillProgramInfo().
| void RecordingInfo::ApplyRecordStateChange | ( | RecordingType | newstate, |
| bool | save = true |
||
| ) |
Sets RecordingType of "record", creating "record" if it does not exist.
| newstate | State to apply to "record" RecordingType. |
Definition at line 526 of file recordinginfo.cpp.
Referenced by ScheduleCommon::customEvent(), and ToggleRecord().
| void RecordingInfo::ApplyRecordRecPriorityChange | ( | int | newrecpriority | ) |
Sets recording priority of "record", creating "record" if it does not exist.
| newrecpriority | New recording priority. |
Definition at line 547 of file recordinginfo.cpp.
Referenced by ProgramRecPriority::saveRecPriority().
Cycles through recording types.
If the program recording status is kNotRecording, ApplyRecordStateChange(kSingleRecord) is called. If the program recording status is kSingleRecording, ApplyRecordStateChange(kFindOneRecord) is called.
etc...
The states in order are: kNotRecording, kSingleRecord, kFindOneRecord, kWeekslotRecord, kFindWeeklyRecord, kTimeslotRecord, kFindDailyRecord, kChannelRecord, kAllRecord.
And: kOverrideRecord, kDontRecord.
That is if you the recording is in any of the first set of states, we cycle through those, if not we toggle between kOverrideRecord and kDontRecord.
Definition at line 763 of file recordinginfo.cpp.
Referenced by ProgFinder::getInfo(), GuideGrid::quickRecord(), ProgLister::RecordSelected(), and TV::ToggleRecord().
Adds recording history, creating "record" it if necessary.
Definition at line 1164 of file recordinginfo.cpp.
Referenced by Scheduler::AddRecording(), ScheduleCommon::customEvent(), Scheduler::HandleRecording(), Scheduler::HandleRecordingStatusChange(), Scheduler::HandleReschedule(), TVRec::NotifySchedulerOfRecording(), Scheduler::SlaveConnected(), Scheduler::SlaveDisconnected(), and Scheduler::UpdateRecStatus().
Deletes recording history, creating "record" it if necessary.
Definition at line 1232 of file recordinginfo.cpp.
Forget the recording of a program so it will be recorded again.
The duplicate flags in both the recorded and old recorded tables are set to 0. This causes these records to be skipped in the left join in the BUSQ In addition, any "Never Record" fake entries are removed from the oldrecorded table and any entries in the oldfind table are removed.
Definition at line 1271 of file recordinginfo.cpp.
Referenced by ScheduleCommon::customEvent(), ProgLister::customEvent(), MainServer::customEvent(), PlaybackBox::doAllowRerecord(), MainServer::DoHandleDeleteRecording(), and MainServer::HandleForgetRecording().
Set the duplicate flag in oldrecorded.
Definition at line 1330 of file recordinginfo.cpp.
Referenced by ProgLister::customEvent().
| void RecordingInfo::StartedRecording | ( | QString | ext | ) |
Inserts this RecordingInfo into the database as an existing recording.
This method, of course, only works if a recording has been scheduled and started.
| ext | File extension for recording |
Definition at line 858 of file recordinginfo.cpp.
Referenced by TVRec::StartedRecording().
| void RecordingInfo::FinishedRecording | ( | bool | allowReRecord | ) |
If not a premature stop, adds program to history of recorded programs.
| prematurestop | If true, we only fetch the recording status. |
Definition at line 1080 of file recordinginfo.cpp.
Referenced by TVRec::FinishedRecording().
Update information in the recorded table when the end-time of a recording is changed.
Definition at line 1123 of file recordinginfo.cpp.
Referenced by TVRec::StartRecording().
Asks the scheduler to restart this recording if possible.
Definition at line 1143 of file recordinginfo.cpp.
Referenced by ScheduleCommon::customEvent().
Sets recordid to match RecordingRule recordid.
Definition at line 494 of file recordinginfo.cpp.
Referenced by TVRec::NotifySchedulerOfRecording().
| void RecordingInfo::ApplyRecordRecGroupChange | ( | const QString & | newrecgroup | ) |
Sets the recording group, both in this RecordingInfo and in the database.
| newrecgroup | New recording group. |
Definition at line 559 of file recordinginfo.cpp.
Referenced by TVRec::CreateLiveTVRingBuffer(), StatusBox::customEvent(), MainServer::DoHandleDeleteRecording(), MainServer::DoHandleUndeleteRecording(), PlaybackBox::setRecGroup(), TVRec::SwitchLiveTVRingBuffer(), TV::ToggleRecord(), and TVRec::TuningRestartRecorder().
| void RecordingInfo::ApplyRecordPlayGroupChange | ( | const QString & | newplaygroup | ) |
Sets the recording group, both in this RecordingInfo and in the database.
| newplaygroup | New recording group. |
Definition at line 584 of file recordinginfo.cpp.
Referenced by PlaybackBox::setPlayGroup().
| void RecordingInfo::ApplyStorageGroupChange | ( | const QString & | newstoragegroup | ) |
Sets the storage group, both in this RecordingInfo and in the database.
| newstoragegroup | New storage group. |
Definition at line 609 of file recordinginfo.cpp.
| void RecordingInfo::ApplyRecordRecTitleChange | ( | const QString & | newTitle, |
| const QString & | newSubtitle, | ||
| const QString & | newDescription | ||
| ) |
Sets the recording title, subtitle, and description both in this RecordingInfo and in the database.
| newTitle | New recording title. |
| newSubtitle | New recording subtitle |
| newDescription | New recording description |
Definition at line 636 of file recordinginfo.cpp.
Referenced by PlaybackBox::saveRecMetadata().
| void RecordingInfo::ApplyTranscoderProfileChange | ( | const QString & | profile | ) | const |
Sets the transcoder profile for a recording.
| profile | Descriptive name of the profile. ie: Autodetect |
Definition at line 688 of file recordinginfo.cpp.
Referenced by TV::DoQueueTranscode(), and QueueTranscodeJob().
Definition at line 668 of file recordinginfo.cpp.
Referenced by PlaybackBox::changeProfileAndTranscode().
| static void RecordingInfo::signalChange | ( | int | recordid | ) | [static] |
Referenced by AddHistory(), DeleteHistory(), ForgetHistory(), ReactivateRecording(), and SetDupHistory().
| bool RecordingInfo::InsertProgram | ( | const RecordingInfo * | pg, |
| const RecordingRule * | rule | ||
| ) | [static, protected] |
Definition at line 938 of file recordinginfo.cpp.
Referenced by StartedRecording().
Reimplemented from ProgramInfo.
Definition at line 233 of file recordinginfo.h.
Referenced by AddHistory(), Scheduler::AddNewRecords(), clear(), clone(), Scheduler::HandleRecording(), Scheduler::HandleReschedule(), and Scheduler::PruneRedundants().
Definition at line 234 of file recordinginfo.h.
Referenced by Scheduler::BackupRecStatus(), clear(), clone(), and Scheduler::RestoreRecStatus().
Definition at line 235 of file recordinginfo.h.
Referenced by AddHistory(), Scheduler::AddNewRecords(), clear(), clone(), Scheduler::HandleReschedule(), and Scheduler::PruneRedundants().
class RecordingRule* RecordingInfo::record [private] |
Definition at line 238 of file recordinginfo.h.
Referenced by ApplyRecordRecPriorityChange(), ApplyRecordStateChange(), clear(), clone(), GetAutoRunJobs(), GetProgramRecordingProfile(), GetProgramRecordingStatus(), getRecordID(), GetRecordingRule(), StartedRecording(), and ~RecordingInfo().
QString RecordingInfo::unknownTitle [static, protected] |
Definition at line 244 of file recordinginfo.h.
Referenced by RecordingInfo().
1.7.6.1