24 #ifndef BACKGROUNDSYNC_H
25 #define BACKGROUNDSYNC_H
30 #include <keepalive/backgroundactivity.h>
32 class BackgroundActivity;
42 struct BActivityStruct
45 BackgroundActivity* backgroundActivity;
46 BackgroundActivity::Frequency frequency;
50 struct BActivitySwitchStruct
53 BackgroundActivity* backgroundActivity;
76 bool set(
const QString& aProfName,
int seconds);
82 bool remove(
const QString& aProfName);
97 bool setSwitch(
const QString& aProfName,
const QDateTime& aSwitchTime);
130 void onBackgroundSyncStarted();
134 void onBackgroundSwitchStarted();
143 QString getProfNameFromId(
const QString activityId)
const;
151 BackgroundActivity::Frequency frequencyFromSeconds(
int seconds);
157 void removeAllSwitches();
164 QString getProfNameFromSwitchId(
const QString activityId)
const;
175 #endif // BACKGROUNDSYNC_H
virtual ~BackgroundSync()
Destructor.
Definition: BackgroundSync.cpp:38
bool set(const QString &aProfName, int seconds)
Schedules a background sync for this profile.
Definition: BackgroundSync.cpp:82
void onBackgroundSwitchRunning(const QString &aProfName)
This signal will be emitted when a switch timer for particular profile is triggered.
BackgroundSync implementation.
Definition: BackgroundSync.h:37
void removeAll()
Removes all background syncs for all profiles.
Definition: BackgroundSync.cpp:45
void onBackgroundSyncRunning(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:147
BackgroundSync(QObject *aParent)
Constructor.
Definition: BackgroundSync.cpp:32
bool removeSwitch(const QString &aProfName)
Removes a switch(rush/off-rush) for a profile.
Definition: BackgroundSync.cpp:220
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:236