BackgroundSync implementation.
More...
#include <BackgroundSync.h>
|
| void | backgroundSyncRunning (QString aProfName) |
| | This signal will be emitted when a background sync timer for particular profile is triggered.
|
| void | backgroundSwitchRunning (const QString &aProfName) |
| | This signal will be emitted when a switch timer for particular profile is triggered.
|
|
| | BackgroundSync (QObject *aParent) |
| | Constructor.
|
|
virtual | ~BackgroundSync () |
| | Destructor.
|
| bool | set (const QString &aProfName, int seconds, bool aExactTime=false) |
| | 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.
|
BackgroundSync implementation.
This class manages background syncs for different profiles.
◆ BackgroundSync()
| BackgroundSync::BackgroundSync |
( |
QObject * | aParent | ) |
|
◆ backgroundSwitchRunning
| void BackgroundSync::backgroundSwitchRunning |
( |
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. |
◆ backgroundSyncRunning
| void BackgroundSync::backgroundSyncRunning |
( |
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. |
◆ 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. |
◆ 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, |
|
|
bool | aExactTime = false ) |
Schedules a background sync for this profile.
For interval based schedules the wakeup is mapped onto one of the platform frequency slots (see frequencyFromSeconds()), which are aligned to system-wide heartbeats and may fire well before or after the requested time. Explicit-time schedules (aExactTime == true) instead arm a one-shot wakeup range close to the requested moment, so the sync runs near the configured time rather than on a coarse frequency slot.
- Parameters
-
| aProfName | Name of the profile. |
| seconds | Time until the next scheduled sync, in seconds. |
| aExactTime | When true, wake up close to seconds using a wakeup range instead of a coarse frequency slot. |
- 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: