24#ifndef BACKGROUNDSYNC_H
25#define BACKGROUNDSYNC_H
31#include <keepalive/backgroundactivity.h>
33class BackgroundActivity;
43 struct BActivityStruct {
45 BackgroundActivity *backgroundActivity;
46 BackgroundActivity::Frequency frequency;
50 struct BActivitySwitchStruct {
52 BackgroundActivity *backgroundActivity;
75 bool set(
const QString &aProfName,
int seconds);
81 bool remove(
const QString &aProfName);
96 bool setSwitch(
const QString &aProfName,
const QDateTime &aSwitchTime);
128 void onBackgroundSyncStarted();
132 void onBackgroundSwitchStarted();
140 QString getProfNameFromId(
const QString activityId)
const;
148 BackgroundActivity::Frequency frequencyFromSeconds(
int seconds);
154 void removeAllSwitches();
161 QString getProfNameFromSwitchId(
const QString activityId)
const;
void onBackgroundSyncCompleted(QString aProfName)
Called when background sync is completed.
Definition BackgroundSync.cpp:155
BackgroundSync(QObject *aParent)
Constructor.
Definition BackgroundSync.cpp:34
virtual ~BackgroundSync()
Destructor.
Definition BackgroundSync.cpp:40
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:84
void removeAll()
Removes all background syncs for all profiles.
Definition BackgroundSync.cpp:47
bool removeSwitch(const QString &aProfName)
Removes a switch(rush/off-rush) for a profile.
Definition BackgroundSync.cpp:228
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:244
bool remove(const QString &aProfName)
Removes background sync for a profile.
Definition BackgroundSync.cpp:66
Definition SyncBackupAdaptor.h:41