KDE PIM / Developers / API Docs / kitchensync

KSync::Merger Class Reference

Small class to help in not losing attributes. More...

#include <merger.h>

Inherited by KSync::AddressBookMerger, and KSync::CalendarMerger.

List of all members.

Public Member Functions

Protected Member Functions

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

virtual bool KSync::Merger::merge SyncEntry entry,
SyncEntry other
[pure virtual]
 

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.

Returns:
success or failure of merge

QString KSync::Merger::synceeType  )  const
 

Return which Syncee corresspondends to the actual implementation of the interface.

Normally the Attributes of the records heavily depend on it.

Returns:
The Type of the Syncee.

void KSync::Merger::setSynceeType const QString &  s  )  [protected]
 

Normally the actual implementation will already do that.

Parameters:
s The Type of the Syncee

bool KSync::Merger::sameType SyncEntry e1,
SyncEntry e2
[protected]
 

Convience method when implementing 'merge'.

Returns:
If the two entries are of the same type
Parameters:
e1 The first sync entry
e2 The second sync entry

template<class M>
M * KSync::Merger::otherMerger SyncEntry  )  [protected]
 

Concience for getting the Merger from a different Syncee over the SyncEntry.


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