kitchensync
KSync::Merger Class Reference
#include <merger.h>
Inheritance diagram for KSync::Merger:

Detailed Description
Small class to help in not losing attributes.The idea of this class is the need for not losing attributes between syncs where two parties do not support the same amount of attributes. One party can create a specialised Merger and set it on the Syncee to allow merging attributes from a different SyncEntry into one belonging to the Syncee of the party.
Your specialised class just need to implement the merge function. and call setSynceeType
Definition at line 47 of file merger.h.
Public Member Functions | |
Merger () | |
virtual | ~Merger () |
virtual bool | merge (SyncEntry *entry, SyncEntry *other)=0 |
QString | synceeType () const |
Protected Member Functions | |
void | setSynceeType (const QString &s) |
bool | sameType (SyncEntry *e1, SyncEntry *e2) |
bool | sameType (SyncEntry *e1, SyncEntry *e2, const QString &wished) |
template<class M> | |
M * | otherMerger (SyncEntry *) |
Protected Attributes | |
QBitArray | mBitArray |
QString | mString |
Member Function Documentation
|
Ask the interface to do the merge. This asks to merge 'other's additional attributes into entry. This will alter entry and 'other' should not be changed. If other does not have a merger treat it as every attribute is supported. You might at least want to merge all custom attributes.
Implemented in KSync::AddressBookMerger, and KSync::CalendarMerger. |
|
Concience for getting the Merger from a different Syncee over the SyncEntry.
|
|
Convience method when implementing 'merge'.
Definition at line 43 of file merger.cpp. |
|
Normally the actual implementation will already do that.
Definition at line 38 of file merger.cpp. |
|
Return which Syncee corresspondends to the actual implementation of the interface. Normally the Attributes of the records heavily depend on it.
Definition at line 33 of file merger.cpp. |
The documentation for this class was generated from the following files: