LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
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 {
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
42 UTIL_DB_API Task<RecoverResult_t> RecoverWithUserInteraction (QString dbPath, QString diaTitle);
43}
#define UTIL_DB_API
Definition dbconfig.h:16
Task< RecoverResult_t > Recover(QString dbPath)
Task< RecoverResult_t > RecoverWithUserInteraction(QString dbPath, QString diaTitle)
Either< Failed, Succeeded > CheckResult_t
std::variant< RecoverNoSpace, RecoverTargetExists, RecoverOtherFailure > RecoverFailed
Either< RecoverFailed, RecoverFinished > RecoverResult_t
Task< CheckResult_t > Check(QString dbPath)