Threaded::ClientManager Class Reference
Client Thread. More...
#include <clientmanager.h>
Inheritance diagram for Threaded::ClientManager:

Signals | |
void | signalTerminated () |
void | signalFinished () |
void | signalError (const KSync::Error &) |
void | signalProgress (const KSync::Progress &) |
Public Member Functions | |
ClientManager (QObject *=0, const char *=0) | |
~ClientManager () | |
bool | isIdle () |
bool | readSyncees () |
bool | writeSyncees () |
bool | connectDevice () |
bool | disconnectDevice () |
bool | terminateThread () |
void | cancelJob () |
Detailed Description
Client Thread.A QThread for the OBEX client. Note that this QObject is only accessed from the main thread. It is used to report events from the working thread.
Definition at line 44 of file clientmanager.h.
Constructor & Destructor Documentation
|
Constructor with the usual parent handling. Definition at line 37 of file clientmanager.cpp. References Threaded::ClientThread::mLock. |
|
Destructor, make sure that the thread terminated. Definition at line 47 of file clientmanager.cpp. References terminateThread(). |
Member Function Documentation
|
Returns if the worker is idel at the monment. Since we have only one manager this lock free access does not introduce a race condition. Definition at line 77 of file clientmanager.cpp. References Threaded::ClientThread::mLock. |
|
Starts reading the device and computing the synccees. Returns if a backup could be started. If the function returns with true the job is terminated by by either a signalError( const KSync::Error& ) or a signalFinished( const KSync::Progress& ). Definition at line 88 of file clientmanager.cpp. References Threaded::ClientThread::mCommand, Threaded::ClientThread::mLock, Threaded::ClientThread::mWait, and QWaitCondition::wakeOne(). Referenced by Threaded::ThreadedPlugin::readSyncees(). |
|
Starts writing the syncees to the device. Returns if a backup could be started. If the function returns with true the job is terminated by by either a signalError( const KSync::Error& ) or a signalFinished( const KSync::Progress& ). Definition at line 106 of file clientmanager.cpp. References Threaded::ClientThread::mCommand, Threaded::ClientThread::mLock, Threaded::ClientThread::mWait, and QWaitCondition::wakeOne(). Referenced by Threaded::ThreadedPlugin::writeSyncees(). |
|
Starts connecting the device. Returns if a backup could be started. If the function returns with true the job is terminated by by either a signalError( const KSync::Error& ) or a signalFinished( const KSync::Progress& ). Definition at line 125 of file clientmanager.cpp. References Threaded::ClientThread::mCommand, Threaded::ClientThread::mLock, Threaded::ClientThread::mWait, and QWaitCondition::wakeOne(). Referenced by Threaded::ThreadedPlugin::connectDevice(). |
|
Starts disconnecting the device. Returns if a backup could be started. If the function returns with true the job is terminated by by either a signalError( const KSync::Error& ) or a signalFinished( const KSync::Progress& ). Definition at line 144 of file clientmanager.cpp. References Threaded::ClientThread::mCommand, Threaded::ClientThread::mLock, Threaded::ClientThread::mWait, and QWaitCondition::wakeOne(). Referenced by Threaded::ThreadedPlugin::disconnectDevice(). |
|
Terminates ... FIXME, work out if the usual terminate does a better job ... Definition at line 159 of file clientmanager.cpp. References Threaded::ClientThread::mCancel, Threaded::ClientThread::mCommand, Threaded::ClientThread::mLock, Threaded::ClientThread::mWait, and QWaitCondition::wakeOne(). Referenced by ~ClientManager(). |
|
Sets a flag in the client thread. We hope, that the worker thread regularly reads that flag ... Definition at line 176 of file clientmanager.cpp. References Threaded::ClientThread::mCancel. |
|
Is emitted when the thread running has terminated. Then it is save to destroy this class. |
|
Is emitted when the job running has finished.
|
|
Is emitted when the thread running main gets an error.
|
|
Is emitted when the thread running main gets an error.
|
The documentation for this class was generated from the following files: