SyncOnChange.h
#ifndef SYNCONCHANGE_H
#define SYNCONCHANGE_H
#include <QObject>
#include <QHash>
#include <QStringList>
namespace Buteo {
class SyncProfile;
class StorageChangeNotifier;
class PluginManager;
class SyncOnChangeScheduler;
class SyncOnChange : public QObject
{
Q_OBJECT
public:
SyncOnChange();
~SyncOnChange();
bool enable(const QHash<QString, QList<SyncProfile *> > &aSOCStorageMap,
SyncOnChangeScheduler *aSOCScheduler,
PluginManager *aPluginManager, QStringList *failedStorages);
void enable();
void disable();
void disableNext();
void addProfile(const QString &aStorageName, SyncProfile *aProfile);
public Q_SLOTS:
void sync(QString aStorageName);
private:
void cleanup(const QString &aStorageName);
QStringList getSOCStorageNames();
StorageChangeNotifier *iStorageChangeNotifier;
QHash<QString, QList<SyncProfile *> > iSOCStorageMap;
SyncOnChangeScheduler *iSOCScheduler;
};
}
#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:15
Buteo::SyncOnChangeScheduler
Definition SyncOnChangeScheduler.h:15
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:126
Buteo::SyncOnChange::disableNext
void disableNext()
Note the next change, and disable SOC if that happens.
Definition SyncOnChange.cpp:79
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:73
Buteo::SyncOnChange::enable
void enable()
Definition SyncOnChange.cpp:57
Buteo::SyncOnChange::SyncOnChange
SyncOnChange()
constructor
Definition SyncOnChange.cpp:9
Buteo::SyncOnChange::sync
void sync(QString aStorageName)
Definition SyncOnChange.cpp:112
Buteo::SyncProfile
A top level synchronization profile.
Definition SyncProfile.h:49
QList
Definition SyncBackupAdaptor.h:40