kitchensync
KSync::SyncEntry Class Reference
#include <syncentry.h>
Inheritance diagram for KSync::SyncEntry:

Detailed Description
An entry of a dataset which is to be synced.
- Author:
- Cornelius Schumacher
SyncEntry objects are collected by a Syncee objects.
Definition at line 49 of file syncentry.h.
Public Types | |
typedef QPtrList< SyncEntry > | PtrList |
enum | Equalness { Different = -1, Equal = 0, EqualButModifiedThis = 1, EqualButModifiedOther = 2, EqualButModifiedBoth = 3 } |
enum | Status { Undefined = -1, Added = 0, Modified = 1, Removed = 2 } |
Public Member Functions | |
SyncEntry (Syncee *parent) | |
SyncEntry (const SyncEntry &) | |
virtual | ~SyncEntry () |
QString | type () const |
virtual QString | name ()=0 |
virtual QString | id ()=0 |
virtual void | setId (const QString &id) |
virtual QString | timestamp ()=0 |
virtual bool | equals (SyncEntry *)=0 |
virtual int | match (SyncEntry *entry) |
virtual int | compareTo (SyncEntry *entry) |
virtual int | state () const |
void | setSyncState (int) |
int | syncState () const |
virtual bool | wasAdded () const |
virtual bool | wasModified () const |
virtual bool | wasRemoved () const |
virtual void | setState (int state=Undefined) |
virtual SyncEntry * | clone ()=0 |
void | setSyncee (Syncee *) |
Syncee * | syncee () const |
void | setDontSync (bool) |
bool | dontSync () const |
bool | mergeWith (SyncEntry *other) |
virtual KPIM::DiffAlgo * | diffAlgo (SyncEntry *, SyncEntry *) |
Protected Member Functions | |
void | setType (const QString &) |
Merger * | merger () const |
Constructor & Destructor Documentation
|
This is the basic constructor of a SyncEntry. Every SyncEntry should have a parent Syncee where it belongs to. Definition at line 33 of file syncentry.cpp. |
Member Function Documentation
|
Creates an exact copy of the this SyncEntry deleting the original is save and does not influence the clone. Syncee will be unset and SyncStates will be copied over as well. Implemented in KSync::AddressBookSyncEntry, KSync::BookmarkSyncEntry, KSync::CalendarSyncEntry, KSync::OpieDesktopSyncEntry, and KSync::UnknownSyncEntry. |
|
Compares one SyncEntry to another. This functions differs from equals and match in some ways. it returns 0 if both are equal, -1 if not equal at all, or the state of equalnes Equal or EqualModifiedThis, EqualModifiedOther, EqualModifiedBoth -2 if not implemented Definition at line 61 of file syncentry.cpp. |
|
Returns the diffing algorithm which is used to present the differences between the two SyncEntries when a conflict occurs.
Reimplemented in KSync::AddressBookSyncEntry, and KSync::CalendarSyncEntry. Definition at line 133 of file syncentry.cpp. |
|
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. Implemented in KSync::AddressBookSyncEntry, KSync::BookmarkSyncEntry, KSync::CalendarSyncEntry, KSync::OpieDesktopSyncEntry, and KSync::UnknownSyncEntry. |
|
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. Implemented in KSync::AddressBookSyncEntry, KSync::BookmarkSyncEntry, KSync::CalendarSyncEntry, KSync::OpieDesktopSyncEntry, and KSync::UnknownSyncEntry. |
|
For future versions match should try to match one SyncEntry with another.
Definition at line 56 of file syncentry.cpp. |
|
Return a string describing this entry. This is presented to the user as identifier for the entry, when user interaction is required. Implemented in KSync::AddressBookSyncEntry, KSync::BookmarkSyncEntry, KSync::CalendarSyncEntry, KSync::OpieDesktopSyncEntry, and KSync::UnknownSyncEntry. |
|
Set if the entry should be synced or not.
Definition at line 106 of file syncentry.cpp. |
|
Set the ID of the underlying data. This is needed for example if the UID is not trusted and could come from a device. Reimplemented in KSync::AddressBookSyncEntry, and KSync::CalendarSyncEntry. Definition at line 139 of file syncentry.cpp. |
|
Sets the stae of this SyncEntry.
Definition at line 86 of file syncentry.cpp. |
|
Set the Syncee data set, the entry belongs to.
Definition at line 51 of file syncentry.cpp. |
|
The status of this SyncEntry either Undefined, Added, Modified or Removed.
Definition at line 66 of file syncentry.cpp. |
|
Return the Syncee data set, the entry belongs to.
Definition at line 101 of file syncentry.cpp. |
|
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. Implemented in KSync::AddressBookSyncEntry, KSync::BookmarkSyncEntry, KSync::CalendarSyncEntry, KSync::OpieDesktopSyncEntry, and KSync::UnknownSyncEntry. |
|
Return a string describing the type of the entry.
Reimplemented in KSync::OpieDesktopSyncEntry. Definition at line 143 of file syncentry.cpp. |
|
Convience functions for the state of an Entry.
Definition at line 71 of file syncentry.cpp. |
|
Convience function for the state of an Entry modified.
Definition at line 76 of file syncentry.cpp. |
|
Convience function for the state of an Entry.
Definition at line 81 of file syncentry.cpp. |
The documentation for this class was generated from the following files: