Buteo Synchronization Framework: SyncOnChange.h Source File

Buteo Synchronization Framework

SyncOnChange.h
1 #ifndef SYNCONCHANGE_H
2 #define SYNCONCHANGE_H
3
4 #include <QObject>
5 #include <QHash>
6 #include <QStringList>
7
8 namespace Buteo {
9
10 class SyncProfile;
11 class StorageChangeNotifier;
12 class PluginManager;
13 class SyncOnChangeScheduler;
14
18 class SyncOnChange : public QObject
19 {
20 Q_OBJECT
21
22 public:
25 SyncOnChange();
26
29 ~SyncOnChange();
30
45 bool enable(const QHash<QString, QList<SyncProfile *> > &aSOCStorageMap,
46 SyncOnChangeScheduler *aSOCScheduler,
47 PluginManager *aPluginManager, QStringList &aFailedStorages);
48
55 void enable();
56
60 void disable();
61
64 void disableNext();
65
71 void addProfile(const QString &aStorageName, SyncProfile *aProfile);
72
73 public Q_SLOTS:
76 void sync(QString aStorageName);
77
78 private:
82 void cleanup(const QString &aStorageName);
83
88 QStringList getSOCStorageNames();
89
90 StorageChangeNotifier *iStorageChangeNotifier;
91 QHash<QString, QList<SyncProfile *> > iSOCStorageMap;
92 SyncOnChangeScheduler *iSOCScheduler;
93 };
94
95 }
96
97 #endif
Buteo::PluginManager
Manages plugins.
Definition: PluginManager.h:56
Buteo::StorageChangeNotifier
Notifies about changes in storages that it's asked to monitor.
Definition: StorageChangeNotifier.h:16
Buteo::SyncOnChangeScheduler
Definition: SyncOnChangeScheduler.h:15
Buteo::SyncOnChange
this class initiates a sync if there are changes in storage(s) it's asked to monitor
Definition: SyncOnChange.h:19
Buteo::SyncOnChange::addProfile
void addProfile(const QString &aStorageName, SyncProfile *aProfile)
adds a profile to the list of profiles interested in soc for a specific storage
Definition: SyncOnChange.cpp:124
Buteo::SyncOnChange::disableNext
void disableNext()
Note the next change, and disable SOC if that happens.
Definition: SyncOnChange.cpp:77
Buteo::SyncOnChange::~SyncOnChange
~SyncOnChange()
destructor
Definition: SyncOnChange.cpp:16
Buteo::SyncOnChange::disable
void disable()
disable sync on change immediately, i.e stop listening to change notifiers
Definition: SyncOnChange.cpp:71
Buteo::SyncOnChange::enable
void enable()
Definition: SyncOnChange.cpp:56
Buteo::SyncOnChange::SyncOnChange
SyncOnChange()
constructor
Definition: SyncOnChange.cpp:9
Buteo::SyncOnChange::sync
void sync(QString aStorageName)
Definition: SyncOnChange.cpp:110
Buteo::SyncProfile
A top level synchronization profile.
Definition: SyncProfile.h:49
QList
Definition: SyncBackupAdaptor.h:40