Buteo Synchronization Framework: Buteo::SyncScheduler Class Reference

Buteo Synchronization Framework

Public Slots | 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:

## Public Slots
void | syncStatusChanged (const QString &aProfileName, int aStatus, const QString &aMessage, int aMoreDetails)
| Handles the sync status change signal from the synchronizer. More...

## 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 (QString aProfileName, 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

## ◆ addProfile()

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

  aProfile | Profile to add to scheduler.

Returns
  Success indicator.

## ◆ externalSyncChanged

void Buteo::SyncScheduler::externalSyncChanged | ( | QString | aProfileName,
|  | bool | aQuery = `false`
| ) |  |
| signal

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

Parameters

  aProfileName | Name of the profile.

## ◆ removeProfile()

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

  aProfileName | Name of the profile to remove from the scheduler.

## ◆ syncNow

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

  aProfileName | Name of the profile.

## ◆ syncStatusChanged

void SyncScheduler::syncStatusChanged | ( | const QString & | aProfileName,
|  | int | aStatus,
|  | const QString & | aMessage,
|  | int | aMoreDetails
| ) |  |
| slot

Handles the sync status change signal from the synchronizer.

This allows the SyncScheduler to appropriately wait() or stop() any background activity which is preventing device suspend.

Parameters

  aProfileName | Name of the profile
  aStatus | Status of the sync
  aMessage | Status message as a string
  aMoreDetails | In case of failure, contains detailed reason

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

- SyncScheduler.h
- moc_SyncScheduler.cpp
- SyncScheduler.cpp