KSync::Merger Class Reference
Small class to help in not losing attributes. More...
#include <merger.h>
Inherited by KSync::AddressBookMerger, and KSync::CalendarMerger.
Public Member Functions
- 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
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
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.
|
|
Return which Syncee corresspondends to the actual implementation of the interface. Normally the Attributes of the records heavily depend on it.
|
|
Normally the actual implementation will already do that.
|
|
Convience method when implementing 'merge'.
|
|
Concience for getting the Merger from a different Syncee over the SyncEntry.
|
The documentation for this class was generated from the following files:
- merger.h
- merger.cpp