KSyncee Class Reference
A data set to be synced. More...
#include <ksyncer.h>
Inheritance diagram for KSyncee:

Public Member Functions | |
virtual KSyncEntry * | firstEntry ()=0 |
Return the first KSyncEntry object of the data set. | |
virtual KSyncEntry * | nextEntry ()=0 |
Return the next KSyncEntry object of the data set. | |
virtual KSyncEntry * | findEntry (const QString &id) |
Find an entry identified by a unique id. | |
virtual void | addEntry (KSyncEntry *)=0 |
Add a KSyncEntry object to this data set. | |
virtual void | removeEntry (KSyncEntry *)=0 |
Remove a KSyncEntry. | |
void | replaceEntry (KSyncEntry *oldEntry, KSyncEntry *newEntry) |
Replace an entry of the data set by another. | |
void | setFilename (const QString &) |
Set the filename, the data set is read from and written to. | |
QString | filename () |
Return the filename, the data set is read from and written to. | |
QString | statusLogName () |
Return the name of a config file, which is used to store status information about the data set. | |
bool | load () |
Load the data set from the file with them name filename(). | |
bool | save () |
Save the data set to the file with them name filename(). | |
virtual bool | read ()=0 |
Read the data set from disk from the file with the name filename(). | |
virtual bool | write ()=0 |
Write the data set to disk to the file with the name filename(). | |
void | writeLog () |
Write the status log file with the name statusLogName(). | |
bool | hasChanged (KSyncEntry *) |
Return, if the given KSyncEntry has changed since the last syncing. |
Detailed Description
A data set to be synced.
- Author:
- Cornelius Schumacher
- See also:
- KSyncEntry, KSyncer
The KSyncee class provides an interface, which has to be implemented by concrete subclasses.
KSyncer operates on KSyncee objects.
Definition at line 89 of file ksyncer.h.
Member Function Documentation
|
Return the first KSyncEntry object of the data set. This function together with nextEntry() is used to iterate through all entries of a KSyncee data set. Implemented in AddressBookSyncee, BookmarkSyncee, and CalendarSyncee. Referenced by findEntry(), KSyncer::syncToTarget(), and writeLog(). |
|
Return the next KSyncEntry object of the data set. This function together with firstEntry() is used to iterate through all entries of a KSyncee data set. Implemented in AddressBookSyncee, BookmarkSyncee, and CalendarSyncee. Referenced by findEntry(), KSyncer::syncToTarget(), and writeLog(). |
|
Find an entry identified by a unique id. See KSyncEntry::id(). Definition at line 53 of file ksyncer.cpp. References firstEntry(), KSyncEntry::id(), and nextEntry(). Referenced by KSyncer::syncToTarget(). |
|
Add a KSyncEntry object to this data set. Ownership of the object remains with the caller. Implemented in AddressBookSyncee, BookmarkSyncee, and CalendarSyncee. Referenced by replaceEntry(), and KSyncer::syncToTarget(). |
|
Remove a KSyncEntry. The entry is removed from the data set, but the object is not deleted. Implemented in AddressBookSyncee, BookmarkSyncee, and CalendarSyncee. Referenced by replaceEntry(). |
|
Replace an entry of the data set by another. Ownership of the objects is handled as with the addEntry() and removeEntry() functions. Definition at line 66 of file ksyncer.cpp. References addEntry(), and removeEntry(). Referenced by KSyncer::syncToTarget(). |
|
Set the filename, the data set is read from and written to.
Definition at line 43 of file ksyncer.cpp. |
|
Return the filename, the data set is read from and written to.
Definition at line 48 of file ksyncer.cpp. Referenced by CalendarSyncee::read(), BookmarkSyncee::read(), AddressBookSyncee::read(), statusLogName(), KSyncer::syncToTarget(), and CalendarSyncee::write(). |
|
Return the name of a config file, which is used to store status information about the data set.
Definition at line 112 of file ksyncer.cpp. References filename(), and QString::replace(). Referenced by load(). |
|
Load the data set from the file with them name filename().
Definition at line 82 of file ksyncer.cpp. References read(), and statusLogName(). |
|
Save the data set to the file with them name filename().
Definition at line 90 of file ksyncer.cpp. References write(), and writeLog(). Referenced by KSyncer::sync(). |
|
Read the data set from disk from the file with the name filename(). This function has to be reimplemented by concrete subclasses to provide the actual reading from disk.
Implemented in AddressBookSyncee, BookmarkSyncee, and CalendarSyncee. Referenced by load(). |
|
Write the data set to disk to the file with the name filename(). This function has to be reimplemented by concrete subclasses to provide the actual writing to disk.
Implemented in AddressBookSyncee, BookmarkSyncee, and CalendarSyncee. Referenced by save(). |
|
Write the status log file with the name statusLogName().
Definition at line 101 of file ksyncer.cpp. References firstEntry(), KSyncEntry::id(), KSyncEntry::name(), nextEntry(), and KSyncEntry::timestamp(). Referenced by save(), KSyncer::syncAllToTarget(), and KSyncer::syncToTarget(). |
|
Return, if the given KSyncEntry has changed since the last syncing. This information is retrieved by comparing the timestamps from the log file and the freshly read data set. Definition at line 72 of file ksyncer.cpp. References KSyncEntry::id(), QString::isEmpty(), and KSyncEntry::timestamp(). Referenced by KSyncer::syncToTarget(). |
The documentation for this class was generated from the following files: