KDE PIM / Developers / API Docs / kitchensync

KSync::Konnector Class Reference

This class provides the interface for a Konnector. More...

#include <konnector.h>

Inherits Resource.

Inherited by KSync::DummyKonnector, KSync::KABCKonnector, KSync::KCalKonnector, KSync::LocalKonnector, KSync::QtopiaKonnector, KSync::RemoteKonnector, and Threaded::ThreadedPlugin.

List of all members.

Public Types

Signals

Public Member Functions

Static Public Member Functions

Protected Slots


Detailed Description

This class provides the interface for a Konnector.

A Konnector is a class responsible for communication with a certain kind of PIM data source. It does the actual transport of the data and conversion of data is needed. It provides the PIM data in a generic way using the KSyncee class which is suitable for further processing within KDE, e.g. for syncing or being accessed by a kioslave.


Constructor & Destructor Documentation

Konnector::Konnector const KConfig *  config  ) 
 

Construct Konnector from information in config file.

Konnector::~Konnector  )  [virtual]
 

Destruct Konnector object.


Member Function Documentation

QString Konnector::generateMD5Sum const QString &  base  )  [static]
 

Generate a MD5SUM from a QString.

The intended use is with with storagePath() + "/" + generateMD5Sum(path) + "some_name.log" to really have unique identifiers

Returns:
a MD5SUM for the name

void Konnector::purgeRemovedEntries Syncee sync  )  [static]
 

Remove SyncEntry::wasRemoved() itrems from the Syncee.

Parameters:
sync The Syncee to manipulate

void Konnector::writeConfig KConfig *  config  ) 
 

Write configuration to config file.

virtual SynceeList KSync::Konnector::syncees  )  [pure virtual]
 

Get list of Syncees used by this Konnector.

It will contain a Syncee for each supported data type. If readSyncees() hasn't be called before, the Syncees will be empty.

Implemented in KSync::DummyKonnector, and Threaded::ThreadedPlugin.

void Konnector::appendSyncee Syncee ap  )  [virtual]
 

Append the Syncee to the internal list of Syncees.

If the Konnector implements this method and can handle the format it will upload the Syncee on writeSyncees. The ownership of

ap is transfered to the Konnector.
The default implementation deletes
ap.
Parameters:
ap The Syncee to append to the list of Syncees
See also:
writeSyncees

virtual bool KSync::Konnector::readSyncees  )  [pure virtual]
 

Request list of Syncee objects containing PIM data from connected entity.

The response is sent with the signal synceesRead(). If an error occurs during read the signal synceeReadError() is emitted.

Returns:
true, if request could successfully be started, false otherwise.

Implemented in KSync::DummyKonnector, and Threaded::ThreadedPlugin.

virtual bool KSync::Konnector::writeSyncees  )  [pure virtual]
 

Request to write back data contained in Syncee objects hold by the connected entity.

The end of the write operation is signalled with synceesWritten(). If an error occurs during write the signal synceeWriteError() is emitted.

Returns:
true, if request could successfully be started, false otherwise.

Implemented in KSync::DummyKonnector, and Threaded::ThreadedPlugin.

QString Konnector::storagePath  )  const
 

If a Konnector needs to store permanent data, such as timestamps using the KSync::SyncHistory it'll use this path as base.

Returns:
Return the Base-Path to be used for permanent storage

void Konnector::setStoragePath const QString &  path  ) 
 

Set the path to where the Konnector should save its data to restore the SyncHistory on next sync.

This is normally set by the part that does the syncing

KPIM::ProgressItem * Konnector::progressItem const QString &  msg  ) 
 

Returns a progress item with the given msg.

The item is already connected to the progressItemCanceled() slot. You can reimplement this slot for special needs.

virtual bool KSync::Konnector::connectDevice  )  [pure virtual]
 

Connect device.

Return true, if device could be connected.

Implemented in KSync::DummyKonnector, and Threaded::ThreadedPlugin.

virtual bool KSync::Konnector::disconnectDevice  )  [pure virtual]
 

Disconnect device.

Implemented in KSync::DummyKonnector, and Threaded::ThreadedPlugin.

bool Konnector::isConnected  )  const
 

Returns whether the device is connected.

virtual KonnectorInfo KSync::Konnector::info  )  const [pure virtual]
 

Return meta information about this Konnector.

Implemented in KSync::DummyKonnector, and Threaded::ThreadedPlugin.

QStringList Konnector::builtIn  )  const [virtual]
 

the Syncees that are supported builtIn

void Konnector::addFilter KSync::Filter  ) 
 

Add a Filter to the list of filters ownership is transfered to the Konnector.

void Konnector::removeFilter KSync::Filter  ) 
 

remove a Filter of the list of filters the ownership of the filter is transfered back to the caller

KSync::Filter::List Konnector::filters  )  const
 

the list of filters

void Konnector::applyFilters FilterMode   ) 
 

apply the filter to the synceeList()

See also:
synceeList()

void KSync::Konnector::synceesRead KSync::Konnector  )  [signal]
 

Emitted when Syncee list becomes available as response to requestSyncees().

void KSync::Konnector::synceeReadError KSync::Konnector  )  [signal]
 

Emitted when an error occurs during read.

void KSync::Konnector::synceesWritten KSync::Konnector  )  [signal]
 

Emitted when Syncee list was successfully written back to connected entity.

void KSync::Konnector::synceeWriteError KSync::Konnector  )  [signal]
 

Emitted when an error occurs during write.

void KSync::Konnector::storagePathChanged const QString &  path  )  [signal]
 

Emitted when the sourcePath was changed.


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