CKlearAppScheduler Class Reference

Class which handles and organizes recording. More...

#include <CKlearAppScheduler.h>

Collaboration diagram for CKlearAppScheduler:

Collaboration graph

Signals

void signalStoppingScheduled ()
 emits an signal to maindialog that Recording is over, thus maindialog can for example switch button state or react on the event in general.
void signalStartingScheduled ()
 emits signal to maindialog that Recording will now start and Maindialog can swith button state of record button ect.
void signalPushQueue ()
 emits signal to maindialog to switch playback between live and recorded file or vice versa.
void signalCloseMain ()
 emits signal to maindialog to shutdown the system.

Public Member Functions

 CKlearAppScheduler (CKlearAppConfig *const KlearConfig, CKlearAppTuner *const KlearTuner, QObject *const parent)
 Constructor for CKlearAppScheduler Object.
virtual ~CKlearAppScheduler ()
 Destructor for CKlearAppScheduler Object.
virtual void run ()
 method called when threat is started evokes mainloop to manage recording
void stop ()
 method called to stop the thread, and thus any scheduling functions
void startQuickRecording ()
 creates an recordset with currentTime as StartTime, i.e. starts instand recording
void addRecordSet (const QString RecordFile, const QDateTime startDateTime, const QDateTime endDateTime, const QString channel)
 creates a new Recordset and inserts it to the RecordStorage vector from where it will be checked wheater to start or end recording every second if recordset is the "current - one".
void abortRecording ()
 stops the corresponding recorder, waits for it's thread to end and therafter deletes the recorder object by calling removeRecordset() and removes RecordSet from RecordStorage vector.
void removeRecordSet (const int i)
 Method call deletes the i 'th element of the RecordStorage vector and the corresponding RecordSetObject.
QString getRecordFile ()
 Returns the Filename and Path of either the currently active or next scheduled RecordSet as QString.
void WriteScheduledRecords ()
 Saves all scheduled RecordSets into the file KlearScheduledDatafile.dat which will have to be proccessed in future. Will be loaded at the next klear program launch.
bool isRecordInProgress ()
 returns true when Scheduler is at the moment handling a record, false when no record is in progress.
int getRecordStorageSize ()
 returns the size of the vector RecordStorage i.e. the number of existing RecordSets as int.
CKlearAppRecordSetgetRecordSet (const int i)
 returns pointer to the i'ths CKlearAppRecordSetobject from the RecordStorage vector.
void isValidRecordSet (const CKlearAppRecordSet *const rs) const
 checks the recordset for validity of its attributes i.e. valid date etc.
bool isTimeShifted ()
 returns timeshifting status
void setTimeShifted (bool timeShifting)
 sets timeshifting status

Detailed Description

Class which handles and organizes recording.

Author:
Klear.org


Constructor & Destructor Documentation

void CKlearAppScheduler::CKlearAppScheduler CKlearAppConfig *const   KlearConfig,
CKlearAppTuner *const   KlearTuner,
QObject *const   parent
 

Constructor for CKlearAppScheduler Object.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Parameters:
KlearConfig pointer to CKlearAppConfig Object.
KlearTuner pointer to CKlearAppTuner Object for inner tuning by scheduler.
parent pointer to MainDialog used only for interprocess communication via slots (to be able to combine emit with postevent to enable qt to communicate with an other threat in version 3.x since otherwise qt has problems in doing so ).
Return values:
void no return value

void CKlearAppScheduler::~CKlearAppScheduler  )  [virtual]
 

Destructor for CKlearAppScheduler Object.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value


Member Function Documentation

void CKlearAppScheduler::abortRecording  ) 
 

stops the corresponding recorder, waits for it's thread to end and therafter deletes the recorder object by calling removeRecordset() and removes RecordSet from RecordStorage vector.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value

void CKlearAppScheduler::addRecordSet const QString  RecordFile,
const QDateTime  startDateTime,
const QDateTime  endDateTime,
const QString  channel
 

creates a new Recordset and inserts it to the RecordStorage vector from where it will be checked wheater to start or end recording every second if recordset is the "current - one".

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Parameters:
RecordFile the Filename and Path of the recent RecordSet as QString.
startDateTime the sec. exact starttime and date for the new RecordObject represented as QDateTime.
endDateTime the sec. exact endtime and date for the new RecordObject represented as QDateTime.
channel the channel the recorder shall record from when currenttime equals starttime.
Return values:
void no return value
Exceptions:
CKlearAppInputException Is thrown if specified start/end.times are not valid or if the channel is is not in channels.conf

QString CKlearAppScheduler::getRecordFile  ) 
 

Returns the Filename and Path of either the currently active or next scheduled RecordSet as QString.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
QString path and name of the recordfile

CKlearAppRecordSet * CKlearAppScheduler::getRecordSet const int  i  ) 
 

returns pointer to the i'ths CKlearAppRecordSetobject from the RecordStorage vector.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Parameters:
i specifies the index of the desired element in the recordstorage
Return values:
CKlearAppRecordSet* pointer to the CKlearAppRecordSetobject specified by parameter i

int CKlearAppScheduler::getRecordStorageSize  ) 
 

returns the size of the vector RecordStorage i.e. the number of existing RecordSets as int.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
int size of vector RecordStorage.

bool CKlearAppScheduler::isRecordInProgress  ) 
 

returns true when Scheduler is at the moment handling a record, false when no record is in progress.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
bool true when Scheduler is in its recording-phase.

bool CKlearAppScheduler::isTimeShifted  ) 
 

returns timeshifting status

Author:
Patric Sherif <patric@klear.org> and Manuel Habermann <manuel@klear.org>
Return values:
bool returns true when Timeshifting is activated

void CKlearAppScheduler::isValidRecordSet const CKlearAppRecordSet *const   rs  )  const
 

checks the recordset for validity of its attributes i.e. valid date etc.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Parameters:
rs the recordset to be validated
Return values:
void no return value
Exceptions:
CKlearAppInputException Is thrown if the recordset's specified start/end.times are not valid or if the channel is is not in channels.conf

void CKlearAppScheduler::removeRecordSet const int  i  ) 
 

Method call deletes the i 'th element of the RecordStorage vector and the corresponding RecordSetObject.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Parameters:
i is handeled as the i'th element from index of the Recordstorage as int.
Return values:
void no return value

void CKlearAppScheduler::run  )  [virtual]
 

method called when threat is started evokes mainloop to manage recording

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value

void CKlearAppScheduler::setTimeShifted bool  timeShifting  ) 
 

sets timeshifting status

Author:
Patric Sherif <patric@klear.org> and Manuel Habermann <manuel@klear.org>
Return values:
void no return value
Parameters:
timeShifting timeshift status

void CKlearAppScheduler::signalCloseMain  )  [signal]
 

emits signal to maindialog to shutdown the system.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value

void CKlearAppScheduler::signalPushQueue  )  [signal]
 

emits signal to maindialog to switch playback between live and recorded file or vice versa.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value

void CKlearAppScheduler::signalStartingScheduled  )  [signal]
 

emits signal to maindialog that Recording will now start and Maindialog can swith button state of record button ect.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value

void CKlearAppScheduler::signalStoppingScheduled  )  [signal]
 

emits an signal to maindialog that Recording is over, thus maindialog can for example switch button state or react on the event in general.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value

void CKlearAppScheduler::startQuickRecording  ) 
 

creates an recordset with currentTime as StartTime, i.e. starts instand recording

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value

void CKlearAppScheduler::stop  ) 
 

method called to stop the thread, and thus any scheduling functions

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value

void CKlearAppScheduler::WriteScheduledRecords  ) 
 

Saves all scheduled RecordSets into the file KlearScheduledDatafile.dat which will have to be proccessed in future. Will be loaded at the next klear program launch.

Author:
Manuel Habermann <manuel@klear.org>, Patric Sherif <patric@klear.org>
Return values:
void no return value


The documentation for this class was generated from the following file:
Generated on Sun Nov 20 17:46:57 2005 for klear.kdevelop by  doxygen 1.4.5