kpilot/lib

ConduitAction Class Reference

#include <plugin.h>

Inheritance diagram for ConduitAction:

SyncAction RecordConduitBase RecordConduit< PCEntry, PCContainer, HHEntry, HHAppInfo, Syncer > List of all members.

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 137 of file plugin.h.


Public Member Functions

 ConduitAction (KPilotLink *, const char *name=0L, const QStringList &args=QStringList())
virtual ~ConduitAction ()
QString conduitName () const

Protected Member Functions

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

Protected Attributes

PilotDatabasefDatabase
PilotDatabasefLocalDatabase
QString fConduitName

Member Function Documentation

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

Retrieve the sync mode set for this action.

Definition at line 150 of file plugin.h.

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

Retrieve the conflict resolution setting for this action.

Definition at line 152 of file plugin.h.

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 238 of file plugin.cc.

bool ConduitAction::isFullSync (  )  const [inline, protected]

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 177 of file plugin.h.

bool ConduitAction::isFirstSync (  )  const [inline, protected]

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 189 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 133 of file plugin.cc.


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