kpilot

ConduitAction Class Reference

The SyncActions created by the factory should obey at least the argument test, indicating a dry run. More...

#include <plugin.h>

Inheritance diagram for ConduitAction:

List of all members.


Public Member Functions

 ConduitAction (KPilotLink *, const char *name=0L, const QStringList &args=QStringList())
QString conduitName () const
void finished ()
bool isFirstSync () const
bool isFullSync () const
const SyncModesyncMode () const
virtual ~ConduitAction ()

Protected Member Functions

bool changeSync (SyncMode::Mode m)
ConflictResolution getConflictResolution () const
bool openDatabases (const QString &dbName, bool *retrieved=0L)
void setConflictResolution (ConflictResolution res)
void setFirstSync (bool first)

Protected Attributes

QString fConduitName
CUDCounterfCtrHH
CUDCounterfCtrPC
PilotDatabasefDatabase
PilotDatabasefLocalDatabase

Detailed Description

The SyncActions created by the factory should obey at least the argument test, indicating a dry run.

The device link is the link where the sync should run -- don't get the pilotPort() until the sync runs!

setConfig() will be called before the sync starts so that the conduit can read/write metadata and local settings.

Definition at line 260 of file plugin.h.


Constructor & Destructor Documentation

ConduitAction::ConduitAction ( KPilotLink p,
const char *  name = 0L,
const QStringList args = QStringList() 
)

Definition at line 279 of file plugin.cc.

ConduitAction::~ConduitAction (  )  [virtual]

Definition at line 312 of file plugin.cc.


Member Function Documentation

bool ConduitAction::changeSync ( SyncMode::Mode  m  )  [protected]

Try to change the sync mode from what it is now to the mode m.

This may fail (ie. changing a backup to a restore is not kosher) and changeSync() will return false then.

Definition at line 439 of file plugin.cc.

QString ConduitAction::conduitName (  )  const [inline]

Definition at line 275 of file plugin.h.

void ConduitAction::finished (  ) 

ConduitAction is done doing work.

Allow it to sanity-check the results

Definition at line 451 of file plugin.cc.

ConflictResolution ConduitAction::getConflictResolution (  )  const [inline, protected]

Retrieve the conflict resolution setting for this action.

Definition at line 304 of file plugin.h.

bool ConduitAction::isFirstSync (  )  const [inline]

A first sync (i.e.

database newly fetched from the handheld ) does not check for deleted records, but understands them as added on the other side. The flag is set by the conduits when opening the local database, or the calendar/addressbook (if it is empty). This also implies a full sync.

Definition at line 297 of file plugin.h.

bool ConduitAction::isFullSync (  )  const [inline]

A full sync happens for eFullSync, eCopyPCToHH and eCopyHHToPC.

It completely ignores all modified flags and walks through all records in the database.

Definition at line 285 of file plugin.h.

bool ConduitAction::openDatabases ( const QString dbName,
bool *  retrieved = 0L 
) [protected]

Open both the local copy of database dbName and the version on the Pilot.

Return true only if both opens succeed. If the local copy of the database does not exist, it is retrieved from the handheld. In this case, retrieved is set to true, otherwise it is left alone (i.e. retains its value and is not explicitly set to false).

Parameters:
dbName database name to open.
retrieved indicator whether the database had to be loaded from the handheld.

Definition at line 323 of file plugin.cc.

void ConduitAction::setConflictResolution ( ConflictResolution  res  )  [inline, protected]

Definition at line 318 of file plugin.h.

void ConduitAction::setFirstSync ( bool  first  )  [inline, protected]

Definition at line 324 of file plugin.h.

const SyncMode& ConduitAction::syncMode (  )  const [inline]

Retrieve the sync mode set for this action.

Definition at line 278 of file plugin.h.


Member Data Documentation

Name of the conduit; might be changed by subclasses.

Should normally be set in the constructor.

Definition at line 347 of file plugin.h.

Every plugin has 2 CUDCounters--one for keeping track of changes made to PC data and one for keeping track of Palm data.

Definition at line 351 of file plugin.h.

Definition at line 352 of file plugin.h.

Reimplemented in NullConduit.

Definition at line 324 of file plugin.h.

Definition at line 327 of file plugin.h.


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