Buteo Synchronization Framework
SyncOnChangeScheduler.h
1#ifndef SYNCONCHANGESCHEDULER_H
2#define SYNCONCHANGESCHEDULER_H
3
4#include <QObject>
5#include <QHash>
6#include <QStringList>
7
8#include "SyncScheduler.h"
9
10namespace Buteo {
11
12class SyncProfile;
13
15{
16 Q_OBJECT
17
18public:
22
26
46 bool addProfile(const SyncProfile *aProfile);
47
53 void removeProfile(const QString &aProfileName);
54
55private Q_SLOTS:
61 void sync(const SyncProfile *aProfile);
62
63private:
64 QStringList iSOCProfileNames;
65 QMap<QString, QObject *> iSOCTimers;
66};
67
68class SyncOnChangeTimer : public QObject
69{
70 Q_OBJECT
71
72public:
75 SyncOnChangeTimer(const SyncProfile *aProfile, const quint32 &aTimeout);
76
80
83 void fire();
84
85Q_SIGNALS:
90 void timeout(const SyncProfile *aProfile);
91
92private Q_SLOTS:
95 void onTimeout();
96
97private:
98 const SyncProfile *iSyncProfile;
99 quint32 iTimeout;
100};
101
102}
103
104#endif
Definition SyncOnChangeScheduler.h:15
bool addProfile(const SyncProfile *aProfile)
Call this method to schedule SOC for a profile.
Definition SyncOnChangeScheduler.cpp:24
SyncOnChangeScheduler()
constructor
Definition SyncOnChangeScheduler.cpp:9
~SyncOnChangeScheduler()
destructor
Definition SyncOnChangeScheduler.cpp:14
void removeProfile(const QString &aProfileName)
call this method to disable SOC that has been scheduled for a certain profile
Definition SyncOnChangeScheduler.cpp:45
Definition SyncOnChangeScheduler.h:69
void fire()
fire the timer
Definition SyncOnChangeScheduler.cpp:77
SyncOnChangeTimer(const SyncProfile *aProfile, const quint32 &aTimeout)
constructor
Definition SyncOnChangeScheduler.cpp:66
~SyncOnChangeTimer()
destructor
Definition SyncOnChangeScheduler.cpp:72
void timeout(const SyncProfile *aProfile)
emit this signal when the timeout occurs
Definition moc_SyncOnChangeScheduler.cpp:298
A top level synchronization profile.
Definition SyncProfile.h:54
SyncScheduler Object to be used to set Schedule via the framework.
Definition SyncScheduler.h:55
Definition SyncBackupAdaptor.h:41