Acts as glue between ChannelBase, EITSource, and EITHelper. More...
#include <eitscanner.h>
Public Member Functions | |
| EITScanner (uint cardnum) | |
| ~EITScanner () | |
| void | StartPassiveScan (ChannelBase *, EITSource *) |
| void | StopPassiveScan (void) |
| Stops inserting Event Information Tables into DB. | |
| void | StartActiveScan (TVRec *, uint max_seconds_per_source) |
| void | StopActiveScan (void) |
Protected Member Functions | |
| void | run (void) |
| This runs the event loop for EITScanner until 'exitThread' is true. | |
Private Member Functions | |
| void | TeardownAll (void) |
Static Private Member Functions | |
| static void * | SpawnEventLoop (void *) |
| static void | RescheduleRecordings (void) |
| Tells scheduler about programming changes. | |
Private Attributes | |
| QMutex | lock |
| ChannelBase * | channel |
| EITSource * | eitSource |
| EITHelper * | eitHelper |
| MThread * | eventThread |
| volatile bool | exitThread |
| QWaitCondition | exitThreadCond |
| TVRec * | rec |
| volatile bool | activeScan |
| volatile bool | activeScanStopped |
| QWaitCondition | activeScanCond |
| QDateTime | activeScanNextTrig |
| uint | activeScanTrigTime |
| QStringList | activeScanChannels |
| QStringList::iterator | activeScanNextChan |
| uint | cardnum |
Static Private Attributes | |
| static QMutex | resched_lock |
| static QDateTime | resched_next_time = QDateTime::currentDateTime() |
| static const uint | kMinRescheduleInterval = 150 |
| Minumum number of seconds between reschedules. | |
Acts as glue between ChannelBase, EITSource, and EITHelper.
This is the class where the "EIT Crawl" is implemented.
Definition at line 30 of file eitscanner.h.
| EITScanner::EITScanner | ( | uint | cardnum | ) |
Definition at line 35 of file eitscanner.cpp.
| EITScanner::~EITScanner | ( | ) | [inline] |
Definition at line 34 of file eitscanner.h.
| void EITScanner::StartPassiveScan | ( | ChannelBase * | _channel, | |
| EITSource * | _eitSource | |||
| ) |
Definition at line 195 of file eitscanner.cpp.
Referenced by TVRec::TuningSignalCheck().
| void EITScanner::StopPassiveScan | ( | void | ) |
Stops inserting Event Information Tables into DB.
Definition at line 214 of file eitscanner.cpp.
Referenced by StopActiveScan(), and TVRec::TuningShutdowns().
Definition at line 229 of file eitscanner.cpp.
Referenced by TVRec::run().
| void EITScanner::StopActiveScan | ( | void | ) |
Definition at line 287 of file eitscanner.cpp.
Referenced by TVRec::HandleStateChange(), TeardownAll(), TVRec::TuningShutdowns(), and TVRec::TuningSignalCheck().
| void EITScanner::run | ( | void | ) | [protected] |
This runs the event loop for EITScanner until 'exitThread' is true.
Definition at line 73 of file eitscanner.cpp.
| void EITScanner::TeardownAll | ( | void | ) | [private] |
Definition at line 49 of file eitscanner.cpp.
Referenced by ~EITScanner().
| static void* EITScanner::SpawnEventLoop | ( | void * | ) | [static, private] |
| void EITScanner::RescheduleRecordings | ( | void | ) | [static, private] |
Tells scheduler about programming changes.
This implements some very basic rate limiting. If a call is made to this within kMinRescheduleInterval of the last call it is ignored.
Definition at line 172 of file eitscanner.cpp.
Referenced by run().
QMutex EITScanner::lock [private] |
Definition at line 51 of file eitscanner.h.
Referenced by run(), StartPassiveScan(), StopActiveScan(), StopPassiveScan(), and TeardownAll().
ChannelBase* EITScanner::channel [private] |
Definition at line 52 of file eitscanner.h.
Referenced by StartPassiveScan(), and StopPassiveScan().
EITSource* EITScanner::eitSource [private] |
Definition at line 53 of file eitscanner.h.
Referenced by run(), StartPassiveScan(), and StopPassiveScan().
EITHelper* EITScanner::eitHelper [private] |
Definition at line 55 of file eitscanner.h.
Referenced by EITScanner(), run(), StartPassiveScan(), StopPassiveScan(), and TeardownAll().
MThread* EITScanner::eventThread [private] |
Definition at line 56 of file eitscanner.h.
Referenced by EITScanner(), and TeardownAll().
volatile bool EITScanner::exitThread [private] |
Definition at line 57 of file eitscanner.h.
Referenced by run(), and TeardownAll().
QWaitCondition EITScanner::exitThreadCond [private] |
Definition at line 58 of file eitscanner.h.
Referenced by run(), StopActiveScan(), and TeardownAll().
TVRec* EITScanner::rec [private] |
Definition at line 60 of file eitscanner.h.
Referenced by run(), StartActiveScan(), and StopActiveScan().
volatile bool EITScanner::activeScan [private] |
Definition at line 61 of file eitscanner.h.
Referenced by run(), StartActiveScan(), and StopActiveScan().
volatile bool EITScanner::activeScanStopped [private] |
Definition at line 62 of file eitscanner.h.
Referenced by run(), StartActiveScan(), and StopActiveScan().
QWaitCondition EITScanner::activeScanCond [private] |
Definition at line 63 of file eitscanner.h.
Referenced by run(), and StopActiveScan().
QDateTime EITScanner::activeScanNextTrig [private] |
Definition at line 64 of file eitscanner.h.
Referenced by run(), and StartActiveScan().
uint EITScanner::activeScanTrigTime [private] |
Definition at line 65 of file eitscanner.h.
Referenced by run(), and StartActiveScan().
QStringList EITScanner::activeScanChannels [private] |
Definition at line 66 of file eitscanner.h.
Referenced by run(), and StartActiveScan().
QStringList::iterator EITScanner::activeScanNextChan [private] |
Definition at line 67 of file eitscanner.h.
Referenced by run(), and StartActiveScan().
uint EITScanner::cardnum [private] |
Definition at line 69 of file eitscanner.h.
QMutex EITScanner::resched_lock [static, private] |
Definition at line 71 of file eitscanner.h.
Referenced by RescheduleRecordings().
QDateTime EITScanner::resched_next_time = QDateTime::currentDateTime() [static, private] |
Definition at line 72 of file eitscanner.h.
Referenced by RescheduleRecordings().
const uint EITScanner::kMinRescheduleInterval = 150 [static, private] |
Minumum number of seconds between reschedules.
Definition at line 75 of file eitscanner.h.
Referenced by RescheduleRecordings().
1.6.3