localdatabasemanager.h 1.67 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
/*
Laurent Montel's avatar
Laurent Montel committed
2
   Copyright (C) 2016-2017 Laurent Montel <montel@kde.org>
Laurent Montel's avatar
Laurent Montel committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef LOCALDATABASEMANAGER_H
#define LOCALDATABASEMANAGER_H

#include <QObject>
Laurent Montel's avatar
Laurent Montel committed
24
#include "webengineviewer_export.h"
25
#include "createphishingurldatabasejob.h"
26
#include "searchfullhashjob.h"
Laurent Montel's avatar
Laurent Montel committed
27
#include <QUrl>
Laurent Montel's avatar
Laurent Montel committed
28 29
namespace WebEngineViewer
{
30
class WebEngineView;
Laurent Montel's avatar
Laurent Montel committed
31
class LocalDataBaseManagerPrivate;
Laurent Montel's avatar
Laurent Montel committed
32
class WEBENGINEVIEWER_EXPORT LocalDataBaseManager : public QObject
Laurent Montel's avatar
Laurent Montel committed
33 34 35
{
    Q_OBJECT
public:
Laurent Montel's avatar
Laurent Montel committed
36
    explicit LocalDataBaseManager(QObject *parent = nullptr);
Laurent Montel's avatar
Laurent Montel committed
37
    ~LocalDataBaseManager();
Laurent Montel's avatar
Laurent Montel committed
38

Laurent Montel's avatar
Laurent Montel committed
39
    void checkUrl(const QUrl &url);
Laurent Montel's avatar
Laurent Montel committed
40

Laurent Montel's avatar
Laurent Montel committed
41
    void initialize();
42

Laurent Montel's avatar
Laurent Montel committed
43
Q_SIGNALS:
Laurent Montel's avatar
Laurent Montel committed
44
    void checkUrlFinished(const QUrl &url, WebEngineViewer::CheckPhishingUrlUtil::UrlStatus status);
Laurent Montel's avatar
Laurent Montel committed
45

46
protected:
47 48
    explicit LocalDataBaseManager(LocalDataBaseManagerPrivate *impl,
                                  QObject *parent = nullptr);
Laurent Montel's avatar
Laurent Montel committed
49

Laurent Montel's avatar
Laurent Montel committed
50
    LocalDataBaseManagerPrivate *const d;
Laurent Montel's avatar
Laurent Montel committed
51 52 53 54
};
}

#endif // LOCALDATABASEMANAGER_H