Messagelib

downloadlocaldatabasethread.h
1/*
2 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "webengineviewer_private_export.h"
10#include <QThread>
11#include <WebEngineViewer/CreatePhishingUrlDataBaseJob>
12namespace WebEngineViewer
13{
14class WEBENGINEVIEWER_TESTS_EXPORT DownloadLocalDatabaseThread : public QThread
15{
16 Q_OBJECT
17public:
18 explicit DownloadLocalDatabaseThread(QObject *parent = nullptr);
19 ~DownloadLocalDatabaseThread() override;
20
21 void setDataBaseState(const QString &value);
22
23 void setDatabaseFullPath(const QString &databaseFullPath);
24
25Q_SIGNALS:
26 void createDataBaseFinished(bool success, const QString &newClientState, const QString &minimumWaitDurationStr);
27 void createDataBaseFailed();
28
29protected:
30 void run() override;
31
32private:
33 WEBENGINEVIEWER_NO_EXPORT void installNewDataBase(const WebEngineViewer::UpdateDataBaseInfo &infoDataBase);
34 WEBENGINEVIEWER_NO_EXPORT void slotDownloadDataBaseFinished(const WebEngineViewer::UpdateDataBaseInfo &infoDataBase,
35 WebEngineViewer::CreatePhishingUrlDataBaseJob::DataBaseDownloadResult status);
36 WEBENGINEVIEWER_NO_EXPORT void slotCreateDataBaseFileNameFinished(bool success, const QString &newClientState, const QString &minimumWaitDurationStr);
37 QString mCurrentDataBaseState;
38 QString mDatabaseFullPath;
39};
40}
Q_SCRIPTABLE CaptureState status()
QFuture< T > run(Function function,...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.