EITScanner Class Reference

#include <eitscanner.h>

List of all members.


Detailed Description

Acts as glue between ChannelBase, EITSource, and EITHelper.

This is the class where the "EIT Crawl" is implemented.

Definition at line 37 of file eitscanner.h.


Public Member Functions

 EITScanner (uint cardnum)
 ~EITScanner ()
void StartPassiveScan (ChannelBase *, EITSource *, bool ignore_source)
 Start inserting Event Information Tables from the multiplex we happen to be tuned to into the database.
void StopPassiveScan (void)
 Stops inserting Event Information Tables into DB.
void StartActiveScan (TVRec *, uint max_seconds_per_source, bool ignore_source)
void StopActiveScan (void)

Protected Member Functions

void RunEventLoop (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
ChannelBasechannel
EITSourceeitSource
EITHelpereitHelper
EITThread eventThread
bool exitThread
QWaitCondition exitThreadCond
TVRecrec
bool activeScan
QDateTime activeScanNextTrig
uint activeScanTrigTime
QStringList activeScanChannels
QStringList::iterator activeScanNextChan
bool ignore_source
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.

Friends

class EITThread

Constructor & Destructor Documentation

EITScanner::EITScanner ( uint  cardnum  ) 

Definition at line 42 of file eitscanner.cpp.

EITScanner::~EITScanner (  )  [inline]

Definition at line 43 of file eitscanner.h.


Member Function Documentation

void EITScanner::StartPassiveScan ( ChannelBase _channel,
EITSource _eitSource,
bool  ignore_source 
)

Start inserting Event Information Tables from the multiplex we happen to be tuned to into the database.

Definition at line 182 of file eitscanner.cpp.

Referenced by TVRec::TuningSignalCheck().

void EITScanner::StopPassiveScan ( void   ) 

Stops inserting Event Information Tables into DB.

Definition at line 206 of file eitscanner.cpp.

Referenced by StopActiveScan(), and TVRec::TuningShutdowns().

void EITScanner::StartActiveScan ( TVRec _rec,
uint  max_seconds_per_source,
bool  ignore_source 
)

Definition at line 221 of file eitscanner.cpp.

Referenced by TVRec::RunTV().

void EITScanner::StopActiveScan ( void   ) 

Definition at line 280 of file eitscanner.cpp.

Referenced by TVRec::HandleStateChange(), TeardownAll(), and TVRec::TuningShutdowns().

void EITScanner::RunEventLoop ( void   )  [protected]

This runs the event loop for EITScanner until 'exitThread' is true.

Definition at line 74 of file eitscanner.cpp.

Referenced by EITThread::run().

void EITScanner::TeardownAll ( void   )  [private]

Definition at line 54 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 159 of file eitscanner.cpp.

Referenced by RunEventLoop().


Friends And Related Function Documentation

friend class EITThread [friend]

Definition at line 39 of file eitscanner.h.


Member Data Documentation

QMutex EITScanner::lock [private]

Definition at line 61 of file eitscanner.h.

Referenced by RunEventLoop(), StartPassiveScan(), and StopPassiveScan().

Definition at line 62 of file eitscanner.h.

Referenced by StartPassiveScan(), and StopPassiveScan().

Definition at line 63 of file eitscanner.h.

Referenced by RunEventLoop(), StartPassiveScan(), and StopPassiveScan().

Definition at line 65 of file eitscanner.h.

Referenced by EITScanner(), RunEventLoop(), StartPassiveScan(), StopPassiveScan(), and TeardownAll().

Definition at line 66 of file eitscanner.h.

Referenced by EITScanner(), and TeardownAll().

Definition at line 67 of file eitscanner.h.

Referenced by RunEventLoop(), and TeardownAll().

QWaitCondition EITScanner::exitThreadCond [private]

Definition at line 68 of file eitscanner.h.

Referenced by RunEventLoop(), and TeardownAll().

TVRec* EITScanner::rec [private]

Definition at line 70 of file eitscanner.h.

Referenced by RunEventLoop(), StartActiveScan(), and StopActiveScan().

Definition at line 71 of file eitscanner.h.

Referenced by RunEventLoop(), StartActiveScan(), and StopActiveScan().

QDateTime EITScanner::activeScanNextTrig [private]

Definition at line 72 of file eitscanner.h.

Referenced by RunEventLoop(), and StartActiveScan().

Definition at line 73 of file eitscanner.h.

Referenced by RunEventLoop(), and StartActiveScan().

QStringList EITScanner::activeScanChannels [private]

Definition at line 74 of file eitscanner.h.

Referenced by RunEventLoop(), and StartActiveScan().

QStringList::iterator EITScanner::activeScanNextChan [private]

Definition at line 75 of file eitscanner.h.

Referenced by RunEventLoop(), and StartActiveScan().

Definition at line 77 of file eitscanner.h.

Referenced by StartActiveScan(), and StartPassiveScan().

Definition at line 79 of file eitscanner.h.

QMutex EITScanner::resched_lock [static, private]

Definition at line 81 of file eitscanner.h.

Referenced by RescheduleRecordings().

QDateTime EITScanner::resched_next_time = QDateTime::currentDateTime() [static, private]

Definition at line 82 of file eitscanner.h.

Referenced by RescheduleRecordings().

const uint EITScanner::kMinRescheduleInterval = 150 [static, private]

Minumum number of seconds between reschedules.

Definition at line 85 of file eitscanner.h.

Referenced by RescheduleRecordings().


The documentation for this class was generated from the following files:

Generated on Sat Dec 18 05:16:02 2010 for MythTV by  doxygen 1.5.5