kpilot/lib

RecordConduitBase Class Reference

#include <recordConduit.h>

Inheritance diagram for RecordConduitBase:

ConduitAction List of all members.

Detailed Description

An intermediate class that introduces the slots we need for our sync implementation.

This is here _only_ because mixing moc with template classes sounds really scary.

Definition at line 54 of file recordConduit.h.


Public Types

enum  SyncDirection { HHtoPC = 0, PCtoHH = 1, Both = 2 }
enum  SyncProgress { NotDone = 0, Done = 1, Error = 2 }

Public Member Functions

 RecordConduitBase (KPilotDeviceLink *o, const char *n, const QStringList a=QStringList())
virtual ~RecordConduitBase ()

Protected Slots

void process ()

Protected Member Functions

virtual SyncProgress loadPC ()=0
virtual SyncProgress palmRecToPC ()=0
virtual SyncProgress cleanup ()=0
virtual bool exec ()

Member Enumeration Documentation

enum RecordConduitBase::SyncDirection
 

The different directions that a pair of records (one on the PC, one on the Pilot) can be synced.

These correspond to special sync directions and the most general "sync both ways". Values of this type are passed to the single-record syncer functions.

Definition at line 78 of file recordConduit.h.

enum RecordConduitBase::SyncProgress
 

Return values for the processing functions.

Each should return NotDone if it needs to be called again (e.g. to process another record), Done if it is finished and something else should be done, and Error if the sync cannot be completed.

Definition at line 85 of file recordConduit.h.


Constructor & Destructor Documentation

RecordConduitBase::RecordConduitBase KPilotDeviceLink o,
const char *  n,
const QStringList  a = QStringList()
[inline]
 

Constructor.

The QStringList a sets flags for the ConduitAction.

Definition at line 60 of file recordConduit.h.

virtual RecordConduitBase::~RecordConduitBase  )  [inline, virtual]
 

Destructor.

Definition at line 68 of file recordConduit.h.


Member Function Documentation

virtual SyncProgress RecordConduitBase::cleanup  )  [protected, pure virtual]
 

Function called at the end of this conduit's sync, which should reset DB flags and write changed config data out to disk.

Returns:
true if the cleanup succeeds.
See also:
process

virtual SyncProgress RecordConduitBase::loadPC  )  [protected, pure virtual]
 

Function called at the beginning of a sync to load data from the PC.

Returns:
Done when the load has finished.
See also:
process

virtual SyncProgress RecordConduitBase::palmRecToPC  )  [protected, pure virtual]
 

Function called repeatedly to fetch the next modified entry from the Palm and sync it with the PC by looking up the record, and calling the syncer for it.

Returns:
true when there are no more modified records on the Palm
See also:
process

void RecordConduitBase::process  )  [protected, slot]
 

Slot used for the implementation of a state machine: calls each of the relevant other slots (above) as needed until they return true.

Definition at line 86 of file recordConduit.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys