kitchensync
KSync::Konnector Class Reference
#include <konnector.h>
Inheritance diagram for KSync::Konnector:

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.
Definition at line 53 of file konnector.h.
Public Types | |
typedef QPtrList< Konnector > | List |
enum | FilterMode { FilterBeforeSync, FilterAfterSync } |
Signals | |
void | synceesRead (KSync::Konnector *) |
void | synceeReadError (KSync::Konnector *) |
void | synceesWritten (KSync::Konnector *) |
void | synceeWriteError (KSync::Konnector *) |
void | storagePathChanged (const QString &path) |
Public Member Functions | |
Konnector (const KConfig *config) | |
void | initDefaultFilters () |
virtual | ~Konnector () |
void | writeConfig (KConfig *config) |
virtual SynceeList | syncees ()=0 |
virtual void | appendSyncee (Syncee *ap) |
virtual bool | readSyncees ()=0 |
virtual bool | writeSyncees ()=0 |
QString | storagePath () const |
void | setStoragePath (const QString &path) |
KPIM::ProgressItem * | progressItem (const QString &msg) |
virtual bool | connectDevice ()=0 |
virtual bool | disconnectDevice ()=0 |
bool | isConnected () const |
virtual KonnectorInfo | info () const =0 |
virtual void | add (const QString &res) |
virtual void | remove (const QString &res) |
virtual QStringList | resources () const |
virtual QStringList | builtIn () const |
virtual QStringList | supportedFilterTypes () const =0 |
void | addFilter (KSync::Filter *) |
void | removeFilter (KSync::Filter *) |
KSync::Filter::List | filters () const |
KSync::Filter * | filter (const QString &type) |
void | applyFilters (FilterMode) |
Static Public Member Functions | |
static QString | generateMD5Sum (const QString &) |
static void | purgeRemovedEntries (Syncee *) |
Protected Slots | |
void | progressItemCanceled (KPIM::ProgressItem *) |
Constructor & Destructor Documentation
|
Construct Konnector from information in config file.
Definition at line 38 of file konnector.cpp. |
|
Destruct Konnector object.
Definition at line 45 of file konnector.cpp. |
Member Function Documentation
|
Add a Filter to the list of filters ownership is transfered to the Konnector.
Definition at line 175 of file konnector.cpp. |
|
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
Reimplemented in KSync::QtopiaKonnector. Definition at line 134 of file konnector.cpp. |
|
apply the filter to the synceeList()
Definition at line 203 of file konnector.cpp. |
|
the Syncees that are supported builtIn
Definition at line 91 of file konnector.cpp. |
|
Connect device. Return true, if device could be connected. Implemented in KSync::DummyKonnector, KSync::KABCKonnector, KSync::KCalKonnector, KSync::LocalKonnector, KSync::QtopiaKonnector, KSync::RemoteKonnector, and Threaded::ThreadedPlugin. |
|
Disconnect device.
Implemented in KSync::DummyKonnector, KSync::KABCKonnector, KSync::KCalKonnector, KSync::LocalKonnector, KSync::QtopiaKonnector, KSync::RemoteKonnector, and Threaded::ThreadedPlugin. |
|
returns the filter of the specified type.
Definition at line 190 of file konnector.cpp. |
|
the list of filters
Definition at line 185 of file konnector.cpp. |
|
Generate a MD5SUM from a QString. The intended use is with with storagePath() + "/" + generateMD5Sum(path) + "some_name.log" to really have unique identifiers
Definition at line 147 of file konnector.cpp. |
|
Return meta information about this Konnector.
Implemented in KSync::DummyKonnector, KSync::KABCKonnector, KSync::KCalKonnector, KSync::LocalKonnector, KSync::QtopiaKonnector, KSync::RemoteKonnector, and Threaded::ThreadedPlugin. |
|
Is called by KonnectorManager to initialize the default filters of the Konnector.
Definition at line 54 of file konnector.cpp. |
|
Returns whether the device is connected.
Definition at line 86 of file konnector.cpp. |
|
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. Note that
Definition at line 107 of file konnector.cpp. |
|
Remove SyncEntry::wasRemoved() itrems from the Syncee.
Definition at line 160 of file konnector.cpp. |
|
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.
Implemented in KSync::DummyKonnector, KSync::KABCKonnector, KSync::KCalKonnector, KSync::LocalKonnector, KSync::QtopiaKonnector, KSync::RemoteKonnector, and Threaded::ThreadedPlugin. |
|
remove a Filter of the list of filters the ownership of the filter is transfered back to the caller
Definition at line 180 of file konnector.cpp. |
|
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 Definition at line 101 of file konnector.cpp. |
|
If a Konnector needs to store permanent data, such as timestamps using the KSync::SyncHistory it'll use this path as base.
Definition at line 96 of file konnector.cpp. |
|
Emitted when the sourcePath was changed.
|
|
Returns a list of supported filter types.
Implemented in KSync::KABCKonnector, KSync::KCalKonnector, KSync::LocalKonnector, KSync::QtopiaKonnector, and KSync::RemoteKonnector. |
|
Emitted when an error occurs during read.
|
|
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, KSync::KABCKonnector, KSync::KCalKonnector, KSync::LocalKonnector, KSync::QtopiaKonnector, KSync::RemoteKonnector, and Threaded::ThreadedPlugin. |
|
Emitted when Syncee list becomes available as response to requestSyncees().
|
|
Emitted when Syncee list was successfully written back to connected entity.
|
|
Emitted when an error occurs during write.
|
|
Write configuration to config file.
Reimplemented in KSync::KABCKonnector, KSync::KCalKonnector, KSync::LocalKonnector, KSync::QtopiaKonnector, and KSync::RemoteKonnector. Definition at line 66 of file konnector.cpp. |
|
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.
Implemented in KSync::DummyKonnector, KSync::KABCKonnector, KSync::KCalKonnector, KSync::LocalKonnector, KSync::QtopiaKonnector, KSync::RemoteKonnector, and Threaded::ThreadedPlugin. |
The documentation for this class was generated from the following files: