Messagelib

downloadlocaldatabasethread.h
1 /*
2  SPDX-FileCopyrightText: 2016-2021 Laurent Montel <[email protected]>
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>
12 namespace WebEngineViewer
13 {
14 class WEBENGINEVIEWER_TESTS_EXPORT DownloadLocalDatabaseThread : public QThread
15 {
16  Q_OBJECT
17 public:
18  explicit DownloadLocalDatabaseThread(QObject *parent = nullptr);
19  ~DownloadLocalDatabaseThread() override;
20 
21  void setDataBaseState(const QString &value);
22 
23  void setDatabaseFullPath(const QString &databaseFullPath);
24 
25 Q_SIGNALS:
26  void createDataBaseFinished(bool success, const QString &newClientState, const QString &minimumWaitDurationStr);
27  void createDataBaseFailed();
28 
29 protected:
30  void run() override;
31 
32 private:
33  void installNewDataBase(const WebEngineViewer::UpdateDataBaseInfo &infoDataBase);
34  void slotDownloadDataBaseFinished(const WebEngineViewer::UpdateDataBaseInfo &infoDataBase,
35  WebEngineViewer::CreatePhishingUrlDataBaseJob::DataBaseDownloadResult status);
36  void slotCreateDataBaseFileNameFinished(bool success, const QString &newClientState, const QString &minimumWaitDurationStr);
37  QString mCurrentDataBaseState;
38  QString mDatabaseFullPath;
39 };
40 }
KIOWIDGETS_EXPORT bool run(const QUrl &_url, bool _is_local)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:04:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.