Messagelib

checkphishingurlcache.h
1 /*
2  SPDX-FileCopyrightText: 2016-2020 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef CHECKPHISHINGURLCACHE_H
8 #define CHECKPHISHINGURLCACHE_H
9 
10 #include "webengineviewer_export.h"
11 #include <QObject>
12 #include <QUrl>
13 
14 namespace WebEngineViewer {
15 class CheckPhishingUrlCachePrivate;
20 class WEBENGINEVIEWER_EXPORT CheckPhishingUrlCache : public QObject
21 {
22  Q_OBJECT
23 public:
24  static CheckPhishingUrlCache *self();
25 
26  enum UrlStatus {
27  UrlOk = 0,
28  MalWare = 1,
29  Unknown = 2
30  };
31 
32  explicit CheckPhishingUrlCache(QObject *parent = nullptr);
34 
40  void addCheckingUrlResult(const QUrl &url, bool correctUrl, uint cacheDuration = 0);
46  CheckPhishingUrlCache::UrlStatus urlStatus(const QUrl &url);
47 
51  void clearCache();
52 private:
53  CheckPhishingUrlCachePrivate *const d;
54 };
55 }
56 
57 Q_DECLARE_METATYPE(WebEngineViewer::CheckPhishingUrlCache::UrlStatus)
58 
59 #endif // CHECKPHISHINGURLCACHE_H
The CheckPhishingUrlCache class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Sep 21 2020 23:14:03 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.