|
ButeoSynchronizationFramework
|
31 #include "SyncSchedule.h"
32 #include "SyncCommonDefs.h"
36 class SyncProfilePrivate;
150 virtual void setName(
const QString &aName);
154 virtual void setName(
const QStringList &aKeys);
158 virtual QDomElement
toXml(QDomDocument &aDoc,
bool aLocalOnly =
true)
const;
206 virtual QDateTime
nextSyncTime(QDateTime aDateTime = QDateTime::currentDateTime())
const;
386 bool hasRetries()
const;
402 SyncProfilePrivate *d_ptr;
407 #endif // SYNCPROFILE_H
QList< const Profile * > storageProfiles() const
Get the storage sub-profiles.
Definition: SyncProfile.cpp:488
History of completed synchronization sessions and their results.
Definition: SyncLog.h:44
@ DESTINATION_TYPE_ONLINE
Destination is an online service.
Definition: SyncProfile.h:69
@ DESTINATION_TYPE_DEVICE
Destination is a device (N95, Harmattan, OviSuite etc.)
Definition: SyncProfile.h:66
QList< Profile * > storageProfilesNonConst()
Get the storage sub-profiles.
Definition: SyncProfile.cpp:503
virtual void setName(const QString &aName)
Sets the name for the profile and associated log.
Definition: SyncProfile.cpp:199
SyncLog * log() const
Gets the synchronization log associated with this profile.
Definition: SyncProfile.cpp:306
@ SYNC_SCHEDULED
Definition: SyncProfile.h:59
@ SYNC_DIRECTION_TO_REMOTE
Data is copied to remote device only.
Definition: SyncProfile.h:85
~SyncProfile()
Destructor.
Definition: SyncProfile.cpp:161
@ SYNC_NEVER_HAPPENED
NOT_SYNCED - no sync has been done for the profile yet.
Definition: SyncProfile.h:108
void setConflictResolutionPolicy(ConflictResolutionPolicy aPolicy)
Set conflict resolution policy.
Definition: SyncProfile.cpp:677
@ CR_POLICY_PREFER_REMOTE_CHANGES
Prefer remote data in conflict situation.
Definition: SyncProfile.h:98
CurrentSyncStatus
Current status enum.
Definition: SyncProfile.h:105
Class for handling sync schedule settings.
Definition: SyncSchedule.h:53
void setSyncDirection(SyncDirection aDirection)
Sets sync direction.
Definition: SyncProfile.cpp:614
void setInternetConnectionTypes(const QList< Sync::InternetConnectionType > &aTypes)
Sets the internet connection types on which this profile can be synced.
Definition: SyncProfile.cpp:364
QDateTime nextRushSwitchTime(const QDateTime &aFromTime) const
Gets next time to switch rush/off-rush schedule intervals.
Definition: SyncProfile.cpp:284
virtual QDomElement toXml(QDomDocument &aDoc, bool aLocalOnly=true) const
Definition: SyncProfile.cpp:172
QStringList storageBackendNames() const
Gets the names of storage backends used by this profile.
Definition: SyncProfile.cpp:373
@ DESTINATION_TYPE_UNDEFINED
Destination type is not defined.
Definition: SyncProfile.h:72
Definition: SyncBackupAdaptor.h:40
QList< Sync::InternetConnectionType > internetConnectionTypes() const
Gets allowed connection types.
Definition: SyncProfile.cpp:349
@ SYNC_CANCLLED
SYNC_CANCELLED - the last sync has been cancelled.
Definition: SyncProfile.h:117
SyncDirection
Sync direction for device-to-device syncs.
Definition: SyncProfile.h:76
CurrentSyncStatus currentSyncStatus() const
Gives the current status of the sync as an enum value If the current status of ongoing syncs is requi...
Definition: SyncProfile.cpp:719
@ SYNC_SUCCESS
SYNC_SUCCESS - the last sync has been successful.
Definition: SyncProfile.h:111
DestinationType destinationType() const
Gets sync destination type (device or online).
Definition: SyncProfile.cpp:518
A top level synchronization profile.
Definition: SyncProfile.h:48
SyncType syncType() const
Gets the sync type of this profile.
Definition: SyncProfile.cpp:327
SyncSchedule syncSchedule() const
Gets sync schedule settings.
Definition: SyncProfile.cpp:339
const SyncResults * lastResults() const
Gets the results of the last sync from the sync log.
Definition: SyncProfile.cpp:294
SyncDirection syncDirection() const
Gets sync direction (two way, to destination, from destination).
Definition: SyncProfile.cpp:545
virtual bool rushEnabled() const
Checks if rush/off-rush schedule is enabled.
Definition: SyncProfile.cpp:227
const Profile * serverProfile() const
Get the first server sub-profile.
Definition: SyncProfile.cpp:460
quint32 syncOnChangeAfter() const
If a profiles is interested in SOC, this gets the the SOC after time from that profile....
Definition: SyncProfile.cpp:592
virtual SyncProfile * clone() const
Creates a clone of the sync profile.
Definition: SyncProfile.cpp:167
bool isSOCProfile() const
checks if a profile has SOC enabled
Definition: SyncProfile.cpp:576
virtual QDateTime nextSyncTime(QDateTime aDateTime=QDateTime::currentDateTime()) const
Gets the next scheduled sync time.
Definition: SyncProfile.cpp:268
This class represents a single profile, a collection of settings or data releated to some entity.
Definition: Profile.h:52
ConflictResolutionPolicy
Conflict resolution policy for device-to-device syncs.
Definition: SyncProfile.h:92
DestinationType
Sync destination type.
Definition: SyncProfile.h:63
virtual bool syncExternallyDuringRush() const
Checks if external rush schedule is to be obeyed.
Definition: SyncProfile.cpp:232
@ SYNC_DIRECTION_FROM_REMOTE
Data is copied from remote device only.
Definition: SyncProfile.h:82
SyncProfile(const QString &aName)
Constructs an empty SyncProfile with the given name.
Definition: SyncProfile.cpp:124
const Profile * clientProfile() const
Get the first service sub-profile.
Definition: SyncProfile.cpp:432
void setLog(SyncLog *aLog)
Sets the synchronization log for this profile.
Definition: SyncProfile.cpp:311
@ CR_POLICY_UNDEFINED
Conflict resolution policy is undefined.
Definition: SyncProfile.h:101
QString serviceName() const
Get the service name of profile.
@ SYNC_DIRECTION_UNDEFINED
Sync direction is not defined.
Definition: SyncProfile.h:88
@ SYNC_MANUAL
Synchronization is started manually.
Definition: SyncProfile.h:55
void addResults(const SyncResults &aResults)
Adds synchronization results to the log.
Definition: SyncProfile.cpp:317
virtual bool syncExternallyEnabled() const
Checks if schedule is controlled by a external process (e.g always-up-to-date).
Definition: SyncProfile.cpp:222
@ CR_POLICY_PREFER_LOCAL_CHANGES
Prefer local data in conflict situation.
Definition: SyncProfile.h:95
Contains information about a completed synchronization session.
Definition: SyncResults.h:58
@ SYNC_DIRECTION_TWO_WAY
Two way sync.
Definition: SyncProfile.h:79
@ SYNC_FAILED
SYNC_FAILED - the last sync has failed.
Definition: SyncProfile.h:114
SyncType
Synchronization types.
Definition: SyncProfile.h:52
virtual bool inExternalSyncRushPeriod(QDateTime aDateTime=QDateTime::currentDateTime()) const
Checks if a given time is inside rush hour and if the sync is controlled by a external process.
Definition: SyncProfile.cpp:238
void setSyncType(SyncType aType)
Sets the sync type of this profile (manual/scheduled).
Definition: SyncProfile.cpp:334
QDateTime lastSuccessfulSyncTime() const
Gets the time of the last successful sync session for this profile.
Definition: SyncProfile.cpp:256
ConflictResolutionPolicy conflictResolutionPolicy() const
Gets conflict resolution policy.
Definition: SyncProfile.cpp:650
QDateTime lastSyncTime() const
Gets the time of last completed sync session with this profile.
Definition: SyncProfile.cpp:243
void setSyncSchedule(const SyncSchedule &aSchedule)
Sets sync schedule settings.
Definition: SyncProfile.cpp:344