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/Macros.h>
23 #include <quentier/utility/Linkage.h>
29 QT_FORWARD_DECLARE_CLASS(ErrorString)
30 QT_FORWARD_DECLARE_CLASS(LocalStorageDatabaseUpgrader)
51 virtual int fromVersion()
const = 0;
57 virtual int toVersion()
const = 0;
62 virtual QString patchShortDescription()
const = 0;
67 virtual QString patchLongDescription()
const = 0;
79 virtual bool backupLocalStorage(
ErrorString & errorDescription) = 0;
92 virtual bool restoreLocalStorageFromBackup(
107 virtual bool removeLocalStorageBackup(
ErrorString & errorDescription) = 0;
117 virtual bool apply(
ErrorString & errorDescription) = 0;
119 friend class LocalStorageDatabaseUpgrader;
127 void progress(
double progress);
134 void backupProgress(
double progress);
142 void restoreBackupProgress(
double progress);
147 #endif // LIB_QUENTIER_LOCAL_STORAGE_I_LOCAL_STORAGE_PATCH_H