Buteo::SyncOnChangeScheduler Class Reference
Inheritance diagram for Buteo::SyncOnChangeScheduler:

## Public Member Functions

| SyncOnChangeScheduler ()
| constructor
| ~SyncOnChangeScheduler ()
| destructor
bool | addProfile (const SyncProfile *aProfile)
| Call this method to schedule SOC for a profile.
void | removeProfile (const QString &aProfileName)
| call this method to disable SOC that has been scheduled for a certain profile
Public Member Functions inherited from Buteo::SyncScheduler
| SyncScheduler (QObject *aParent=0)
| Constructor.
virtual | ~SyncScheduler ()
| Destructor.
bool | addProfile (const SyncProfile *aProfile)
| Adds a profile to the scheduler.
void | addProfileForSyncRetry (const SyncProfile *aProfile, QDateTime aNextSyncTime)
void | removeProfile (const QString &aProfileName)
| Removes the profile with the given name from the scheduler.

## Additional Inherited Members

Public Slots inherited from Buteo::SyncScheduler
void | syncStatusChanged (const QString &aProfileName, int aStatus, const QString &aMessage, int aMoreDetails)
| Handles the sync status change signal from the synchronizer.
Signals inherited from Buteo::SyncScheduler
void | syncNow (QString aProfileName)
| Signal emitted when a sync session should be launched based on the sync schedule settings of the profile.
void | externalSyncChanged (QString aProfileName, bool aQuery=false)
| Signal emitted when a sync session should be launched based on the sync schedule settings of the profile.

## Member Function Documentation

## addProfile()

bool SyncOnChangeScheduler::addProfile | ( | const SyncProfile * | aProfile | ) |

Call this method to schedule SOC for a profile.

There are 3 scheduling criteria - SOC after info from the profile, default SOC after and sync now.

The profile is first checked for sync on change after time, which should be specified in seconds (0 means sync now). If none is specified then we use a default of DEFAULT_SOC_AFTER_TIME

If the profile has already been added and if it's SOC is scheduled, calling this method again will just use the previous schedule, and in this case the method will return false.

Once the SOC is initiated (by sending a syncNow signal), the profile is removed automatically

Parameters

  aProfile | pointer to sync profile

Returns
  true if SOC could be scheduled, false otherwise

## removeProfile()

void SyncOnChangeScheduler::removeProfile | ( | const QString & | aProfileName | ) |

call this method to disable SOC that has been scheduled for a certain profile

Parameters

  aProfileName | name of the profile

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

- SyncOnChangeScheduler.h
- SyncOnChangeScheduler.cpp