libquentier
0.5.0
The library for rich desktop clients of Evernote service
Toggle main menu visibility
Loading...
Searching...
No Matches
headers
quentier
local_storage
ILocalStoragePatch.h
1
/*
2
* Copyright 2018-2020 Dmitry Ivanov
3
*
4
* This file is part of libquentier
5
*
6
* libquentier is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation, version 3 of the License.
9
*
10
* libquentier is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with libquentier. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef LIB_QUENTIER_LOCAL_STORAGE_I_LOCAL_STORAGE_PATCH_H
20
#define LIB_QUENTIER_LOCAL_STORAGE_I_LOCAL_STORAGE_PATCH_H
21
22
#include <quentier/utility/Linkage.h>
23
24
#include <QObject>
25
26
namespace
quentier {
27
28
QT_FORWARD_DECLARE_CLASS(
ErrorString
)
29
QT_FORWARD_DECLARE_CLASS(LocalStorageDatabaseUpgrader)
30
31
37
class QUENTIER_EXPORT ILocalStoragePatch : public QObject
38
{
39
Q_OBJECT
40
protected
:
41
explicit
ILocalStoragePatch(QObject * parent =
nullptr
);
42
43
public
:
44
virtual
~ILocalStoragePatch();
45
50
virtual
int
fromVersion
()
const
= 0;
51
56
virtual
int
toVersion
()
const
= 0;
57
61
virtual
QString
patchShortDescription
()
const
= 0;
62
66
virtual
QString
patchLongDescription
()
const
= 0;
67
78
virtual
bool
backupLocalStorage
(
ErrorString
& errorDescription) = 0;
79
91
virtual
bool
restoreLocalStorageFromBackup
(
92
ErrorString
& errorDescription) = 0;
93
106
virtual
bool
removeLocalStorageBackup
(
ErrorString
& errorDescription) = 0;
107
116
virtual
bool
apply
(
ErrorString
& errorDescription) = 0;
117
118
friend
class
LocalStorageDatabaseUpgrader;
119
120
Q_SIGNALS:
126
void
progress
(
double
progress
);
127
133
void
backupProgress
(
double
progress
);
134
141
void
restoreBackupProgress
(
double
progress
);
142
};
143
144
}
// namespace quentier
145
146
#endif
// LIB_QUENTIER_LOCAL_STORAGE_I_LOCAL_STORAGE_PATCH_H
quentier::ErrorString
The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (bas...
Definition
ErrorString.h:44
quentier::ILocalStoragePatch::backupProgress
void backupProgress(double progress)
quentier::ILocalStoragePatch::toVersion
virtual int toVersion() const =0
quentier::ILocalStoragePatch::restoreBackupProgress
void restoreBackupProgress(double progress)
quentier::ILocalStoragePatch::restoreLocalStorageFromBackup
virtual bool restoreLocalStorageFromBackup(ErrorString &errorDescription)=0
quentier::ILocalStoragePatch::progress
void progress(double progress)
quentier::ILocalStoragePatch::patchShortDescription
virtual QString patchShortDescription() const =0
quentier::ILocalStoragePatch::removeLocalStorageBackup
virtual bool removeLocalStorageBackup(ErrorString &errorDescription)=0
quentier::ILocalStoragePatch::apply
virtual bool apply(ErrorString &errorDescription)=0
quentier::ILocalStoragePatch::fromVersion
virtual int fromVersion() const =0
quentier::ILocalStoragePatch::backupLocalStorage
virtual bool backupLocalStorage(ErrorString &errorDescription)=0
quentier::ILocalStoragePatch::patchLongDescription
virtual QString patchLongDescription() const =0
Generated on
for libquentier by
1.17.0