24#ifndef BACKGROUNDSYNC_H
25#define BACKGROUNDSYNC_H
30#include <keepalive/backgroundactivity.h>
32class BackgroundActivity;
42 struct BActivityStruct {
44 BackgroundActivity *backgroundActivity;
45 BackgroundActivity::Frequency frequency;
49 struct BActivitySwitchStruct {
51 BackgroundActivity *backgroundActivity;
74 bool set(
const QString &aProfName,
int seconds);
80 bool remove(
const QString &aProfName);
95 bool setSwitch(
const QString &aProfName,
const QDateTime &aSwitchTime);
127 void onBackgroundSyncStarted();
131 void onBackgroundSwitchStarted();
139 QString getProfNameFromId(
const QString activityId)
const;
147 BackgroundActivity::Frequency frequencyFromSeconds(
int seconds);
153 void removeAllSwitches();
160 QString getProfNameFromSwitchId(
const QString activityId)
const;
BackgroundSync implementation.
Definition BackgroundSync.h:38
void onBackgroundSyncCompleted(QString aProfName)
Called when background sync is completed.
Definition BackgroundSync.cpp:151
virtual ~BackgroundSync()
Destructor.
Definition BackgroundSync.cpp:38
void onBackgroundSwitchRunning(const QString &aProfName)
This signal will be emitted when a switch timer for particular profile is triggered.
bool set(const QString &aProfName, int seconds)
Schedules a background sync for this profile.
Definition BackgroundSync.cpp:82
void removeAll()
Removes all background syncs for all profiles.
Definition BackgroundSync.cpp:45
bool removeSwitch(const QString &aProfName)
Removes a switch(rush/off-rush) for a profile.
Definition BackgroundSync.cpp:224
void onBackgroundSyncRunning(QString aProfName)
This signal will be emitted when a background sync timer for particular profile is triggered.
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 b...
Definition BackgroundSync.cpp:240
bool remove(const QString &aProfName)
Removes background sync for a profile.
Definition BackgroundSync.cpp:64
Definition SyncBackupAdaptor.h:41