LeechCraft  0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
consistencychecker.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <variant>
12 #include <QObject>
13 #include <util/sll/either.h>
15 #include "dbconfig.h"
16 
18 {
19  struct Failed {};
20  struct Succeeded {};
22 
23  UTIL_DB_API Task<CheckResult_t> Check (QString dbPath);
24 
26  {
27  qint64 OldFileSize_;
28  qint64 NewFileSize_;
29  };
30 
32  {
33  qint64 Available_;
34  qint64 Expected_;
35  };
36  struct RecoverTargetExists { QString Target_; };
37  struct RecoverOtherFailure { QString Message_; };
38  using RecoverFailed = std::variant<RecoverNoSpace, RecoverTargetExists, RecoverOtherFailure>;
40 
41  UTIL_DB_API Task<RecoverResult_t> Recover (QString dbPath);
42  UTIL_DB_API Task<RecoverResult_t> RecoverWithUserInteraction (QString dbPath, QString diaTitle);
43 }
Task< CheckResult_t > Check(QString dbPath)
std::variant< RecoverNoSpace, RecoverTargetExists, RecoverOtherFailure > RecoverFailed
#define UTIL_DB_API
Definition: dbconfig.h:16
Task< RecoverResult_t > Recover(QString dbPath)
Task< RecoverResult_t > RecoverWithUserInteraction(QString dbPath, QString diaTitle)