19 #ifndef LIB_QUENTIER_LOCAL_STORAGE_I_LOCAL_STORAGE_PATCH_H
20 #define LIB_QUENTIER_LOCAL_STORAGE_I_LOCAL_STORAGE_PATCH_H
22 #include <quentier/utility/Linkage.h>
28 QT_FORWARD_DECLARE_CLASS(ErrorString)
29 QT_FORWARD_DECLARE_CLASS(LocalStorageDatabaseUpgrader)
50 virtual int fromVersion()
const = 0;
56 virtual int toVersion()
const = 0;
61 virtual QString patchShortDescription()
const = 0;
66 virtual QString patchLongDescription()
const = 0;
78 virtual bool backupLocalStorage(
ErrorString & errorDescription) = 0;
91 virtual bool restoreLocalStorageFromBackup(
106 virtual bool removeLocalStorageBackup(
ErrorString & errorDescription) = 0;
116 virtual bool apply(
ErrorString & errorDescription) = 0;
118 friend class LocalStorageDatabaseUpgrader;
126 void progress(
double progress);
133 void backupProgress(
double progress);
141 void restoreBackupProgress(
double progress);
146 #endif // LIB_QUENTIER_LOCAL_STORAGE_I_LOCAL_STORAGE_PATCH_H