![]() |
Diana Software
|
thread responsible for closing the database connection after it remains idle for a certain amount of time. More...
Public Member Functions | |
| QDbWatchdogThread () | |
| virtual | ~QDbWatchdogThread () |
| void | SetWatchdogTimer (QWatchdogTimer *timer) |
| void | SetDatabase (QDb *db) |
| virtual void | operator() () |
Public Member Functions inherited from QBaseThread | |
| QBaseThread () | |
| virtual | ~QBaseThread () |
| void | SetError (QError *err) |
| void | SetControlFlag (const int *flag) |
Private Attributes | |
| QWatchdogTimer * | fTimer |
| QDb * | fDb |
Additional Inherited Members | |
Protected Attributes inherited from QBaseThread | |
| QError * | fErr |
| const int * | fControlFlag |
thread responsible for closing the database connection after it remains idle for a certain amount of time.
This class uses protected methods IsConnected() and Disconnect() of QDb, therefore it needs to be friend of QDb.
Definition at line 19 of file QDbWatchdogThread.hh.
| QDbWatchdogThread::QDbWatchdogThread | ( | ) |
Definition at line 9 of file QDbWatchdogThread.cc.
|
inlinevirtual |
Definition at line 23 of file QDbWatchdogThread.hh.
|
virtual |
this is where the thread is run
Implements QBaseThread.
Definition at line 15 of file QDbWatchdogThread.cc.
References QDb::Disconnect(), QBaseThread::fControlFlag, fDb, QBaseThread::fErr, fTimer, QDb::IsConnected(), QERR_SUCCESS, QERR_UNDEFINED_STATUS, QError::Set(), success, and QWatchdogTimer::TimeoutElapsed().
|
inline |
the database is not owned by this object
Definition at line 28 of file QDbWatchdogThread.hh.
References fDb.
Referenced by QDbWatchdogThreadHandler::Start().
|
inline |
the timer is not owned by this object
Definition at line 26 of file QDbWatchdogThread.hh.
References fTimer.
Referenced by QDbWatchdogThreadHandler::Start().
|
private |
Definition at line 38 of file QDbWatchdogThread.hh.
Referenced by operator()(), and SetDatabase().
|
private |
Definition at line 37 of file QDbWatchdogThread.hh.
Referenced by operator()(), and SetWatchdogTimer().