KDE PIM / Developers / API Docs / kitchensync

Threaded::ClientManager Class Reference

Client Thread. More...

#include <clientmanager.h>

Inherits QObject, and QThread.

List of all members.

Signals

Public Member Functions


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.


Constructor & Destructor Documentation

ClientManager::ClientManager QObject *  parent = 0,
const char *  name = 0
 

Constructor with the usual parent handling.

ClientManager::~ClientManager  ) 
 

Destructor, make sure that the thread terminated.


Member Function Documentation

bool ClientManager::isIdle  ) 
 

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.

bool ClientManager::readSyncees  ) 
 

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& ).

bool ClientManager::writeSyncees  ) 
 

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& ).

bool ClientManager::connectDevice  ) 
 

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& ).

bool ClientManager::disconnectDevice  ) 
 

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& ).

bool ClientManager::terminateThread  ) 
 

Terminates ...

FIXME, work out if the usual terminate does a better job ...

void ClientManager::cancelJob  ) 
 

Sets a flag in the client thread.

We hope, that the worker thread regularly reads that flag ...

void Threaded::ClientManager::signalTerminated  )  [signal]
 

Is emitted when the thread running has terminated.

Then it is save to destroy this class.

void Threaded::ClientManager::signalFinished  )  [signal]
 

Is emitted when the job running has finished.

void Threaded::ClientManager::signalError const KSync::Error &   )  [signal]
 

Is emitted when the thread running main gets an error.

void Threaded::ClientManager::signalProgress const KSync::Progress &   )  [signal]
 

Is emitted when the thread running main gets an error.


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