BackgroundSync Class Reference

BackgroundSync implementation. More...

`#include <BackgroundSync.h>`

Inheritance diagram for BackgroundSync:

## Public Slots

void | onBackgroundSyncCompleted (QString aProfName)
| Called when background sync is completed.

## Signals

void | onBackgroundSyncRunning (QString aProfName)
| This signal will be emitted when a background sync timer for particular profile is triggered.
void | onBackgroundSwitchRunning (const QString &aProfName)
| This signal will be emitted when a switch timer for particular profile is triggered.

## Public Member Functions

| BackgroundSync (QObject *aParent)
| Constructor.
virtual | ~BackgroundSync ()
| Destructor.
bool | set (const QString &aProfName, int seconds)
| Schedules a background sync for this profile.
bool | remove (const QString &aProfName)
| Removes background sync for a profile.
void | removeAll ()
| Removes all background syncs for all profiles.
bool | setSwitch (const QString &aProfName, const QDateTime &aSwitchTime)
| Schedules a switch(rush/off-rush) for a background sync running for this profile, the switch should be added after the background activity.
bool | removeSwitch (const QString &aProfName)
| Removes a switch(rush/off-rush) for a profile.

## Detailed Description

BackgroundSync implementation.

This class manages background syncs for different profiles.

## Constructor & Destructor Documentation

## BackgroundSync()

BackgroundSync::BackgroundSync | ( | QObject * | aParent | ) |

Constructor.

Parameters

  aParent | Parent object.

## Member Function Documentation

## onBackgroundSwitchRunning

void BackgroundSync::onBackgroundSwitchRunning | ( | const QString & | aProfName | ) |

signal

This signal will be emitted when a switch timer for particular profile is triggered.

Parameters

  aProfName | Name of the profile for which switch timer is triggered.

## onBackgroundSyncCompleted

void BackgroundSync::onBackgroundSyncCompleted | ( | QString | aProfName | ) |

slot

Called when background sync is completed.

Parameters

  aProfName | Name of the profile for which background sync is completed.

## onBackgroundSyncRunning

void BackgroundSync::onBackgroundSyncRunning | ( | QString | aProfName | ) |

signal

This signal will be emitted when a background sync timer for particular profile is triggered.

Parameters

  aProfName | Name of the profile for which background sync timer is triggered.

## remove()

bool BackgroundSync::remove | ( | const QString & | aProfName | ) |

Removes background sync for a profile.

Parameters

  aProfName | Name of the profile.

## removeSwitch()

bool BackgroundSync::removeSwitch | ( | const QString & | aProfName | ) |

Removes a switch(rush/off-rush) for a profile.

Parameters

  aProfName | Name of the profile.

## set()

bool BackgroundSync::set | ( | const QString & | aProfName,
|  | int | seconds )

Schedules a background sync for this profile.

The beat will be generated between minWaitTime and maxWaitTime seconds

Parameters

  aProfName | Name of the profile.
  seconds | Sync frequency in seconds

Returns
  Success indicator.

## setSwitch()

bool BackgroundSync::setSwitch | ( | const QString & | aProfName,
|  | const QDateTime & | aSwitchTime )

Schedules a switch(rush/off-rush) for a background sync running for this profile, the switch should be added after the background activity.

Parameters

  aProfName | Name of the profile.
  aSwitchTime | when the switch will occurs

Returns
  Success indicator.

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

- BackgroundSync.h
- BackgroundSync.cpp