ksync Library API Documentation

KSyncEntry Class Reference

An entry of a dataset which is to be synced. More...

#include <ksyncer.h>

List of all members.

Public Member Functions

virtual QString name ()=0
 Return a string describing this entry.

virtual QString id ()=0
 Return a unique id.

virtual QString timestamp ()=0
 Return a time stamp representing the time of the last change.

virtual bool equals (KSyncEntry *)=0
 Return, if the two entries are equal.

void setSyncee (KSyncee *)
 Set the KSyncee data set, the entry belongs to.

KSynceesyncee ()
 Return the KSyncee data set, the entry belongs to.


Detailed Description

An entry of a dataset which is to be synced.

Author:
Cornelius Schumacher
See also:
Ksyncee, KSyncer
The KSyncEntry class represents the basic unit of syncing. It provides an interface for identifying and comparing entries, which has to be implemented by concrete subclasses.

KSyncEntry objects are collected by KSyncee objects.

Definition at line 24 of file ksyncer.h.


Member Function Documentation

virtual QString KSyncEntry::name  )  [pure virtual]
 

Return a string describing this entry.

This is presented to the user as identifier for the entry, when user interaction is required.

Referenced by KSyncUi::deconflict(), and KSyncee::writeLog().

virtual QString KSyncEntry::id  )  [pure virtual]
 

Return a unique id.

This is used to uniquely identify the entry. Two entries having the same id are considered to be two variants of the same entry. No two entries of the same KSyncee data set must have the same id.

Referenced by KSyncee::findEntry(), KSyncee::hasChanged(), KSyncer::syncToTarget(), and KSyncee::writeLog().

virtual QString KSyncEntry::timestamp  )  [pure virtual]
 

Return a time stamp representing the time of the last change.

This is only used to compare, if an entry has changed or not. It is not used to define an order of changes. If an entry has been copied from one KSyncee data set to another KSyncee data set, the timestamp has to be the same on both entries. If the user has changed the entry in one data set the timestamp has to be different.

Return QString::null, if there is no timestamp available. This means that the user has to manually select which entry is the new one.

Referenced by KSyncee::hasChanged(), and KSyncee::writeLog().

virtual bool KSyncEntry::equals KSyncEntry  )  [pure virtual]
 

Return, if the two entries are equal.

Two entries are considered to be equal, if they contain exactly the same information, including the same id and timestamp.

Referenced by KSyncer::syncToTarget().

void KSyncEntry::setSyncee KSyncee  ) 
 

Set the KSyncee data set, the entry belongs to.

Definition at line 22 of file ksyncer.cpp.

KSyncee * KSyncEntry::syncee  ) 
 

Return the KSyncee data set, the entry belongs to.

Definition at line 27 of file ksyncer.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:17 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001