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;
82 bool set(
const QString &aProfName,
int seconds,
bool aExactTime =
false);
88 bool remove(
const QString &aProfName);
103 bool setSwitch(
const QString &aProfName,
const QDateTime &aSwitchTime);
134 void onBackgroundSyncStarted();
138 void onBackgroundSwitchStarted();
146 QString getProfNameFromId(
const QString activityId)
const;
154 BackgroundActivity::Frequency frequencyFromSeconds(
int seconds);
160 void removeAllSwitches();
167 QString getProfNameFromSwitchId(
const QString activityId)
const;
bool set(const QString &aProfName, int seconds, bool aExactTime=false)
Schedules a background sync for this profile.
Definition BackgroundSync.cpp:91
void backgroundSyncRunning(QString aProfName)
This signal will be emitted when a background sync timer for particular profile is triggered.
void onBackgroundSyncCompleted(QString aProfName)
Called when background sync is completed.
Definition BackgroundSync.cpp:170
BackgroundSync(QObject *aParent)
Constructor.
Definition BackgroundSync.cpp:41
virtual ~BackgroundSync()
Destructor.
Definition BackgroundSync.cpp:47
void backgroundSwitchRunning(const QString &aProfName)
This signal will be emitted when a switch timer for particular profile is triggered.
void removeAll()
Removes all background syncs for all profiles.
Definition BackgroundSync.cpp:54
bool removeSwitch(const QString &aProfName)
Removes a switch(rush/off-rush) for a profile.
Definition BackgroundSync.cpp:243
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:259
bool remove(const QString &aProfName)
Removes background sync for a profile.
Definition BackgroundSync.cpp:73
Definition SyncBackupAdaptor.h:41