ButeoSynchronizationFramework
Signals | Public Member Functions | List of all members
Buteo::SyncScheduler Class Reference

SyncScheduler Object to be used to set Schedule via the framework. More...

#include <SyncScheduler.h>

Inheritance diagram for Buteo::SyncScheduler:
Buteo::SyncOnChangeScheduler

Signals

void syncNow (QString aProfileName)
 Signal emitted when a sync session should be launched based on the sync schedule settings of the profile. More...
 
void externalSyncChanged (const SyncProfile *aProfile, bool aQuery=false)
 Signal emitted when a sync session should be launched based on the sync schedule settings of the profile. More...
 

Public Member Functions

 SyncScheduler (QObject *aParent=0)
 Constructor.
 
virtual ~SyncScheduler ()
 Destructor.
 
bool addProfile (const SyncProfile *aProfile)
 Adds a profile to the scheduler. More...
 
void addProfileForSyncRetry (const SyncProfile *aProfile, QDateTime aNextSyncTime)
 
void removeProfile (const QString &aProfileName)
 Removes the profile with the given name from the scheduler. More...
 

Detailed Description

SyncScheduler Object to be used to set Schedule via the framework.

Member Function Documentation

bool SyncScheduler::addProfile ( const SyncProfile aProfile)

Adds a profile to the scheduler.

Verifies that the profile is enabled and it has schedule enabled before adding. If the profile is already added, removes the old schedule and then adds the profile again. A syncNow signal is sent when sync should be started based on the schedule settings of the profile. The signal is sent only once. Call this function again after the sync has finished to continue scheduling syncs for the profile.

Parameters
aProfileProfile to add to scheduler.
Returns
Success indicator.
void Buteo::SyncScheduler::externalSyncChanged ( const SyncProfile aProfile,
bool  aQuery = false 
)
signal

Signal emitted when a sync session should be launched based on the sync schedule settings of the profile.

Parameters
aProfileNameName of the profile.
void SyncScheduler::removeProfile ( const QString &  aProfileName)

Removes the profile with the given name from the scheduler.

No new syncNow signals will be sent for the profile. Note that an already sent signal may still be waiting in the event queue of receiving thread.

Parameters
aProfileNameName of the profile to remove from the scheduler.
void Buteo::SyncScheduler::syncNow ( QString  aProfileName)
signal

Signal emitted when a sync session should be launched based on the sync schedule settings of the profile.

Parameters
aProfileNameName of the profile.

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