Messagelib

networkurlinterceptor.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_export.h"
10 #include <QWebEngineUrlRequestInterceptor>
11 #include <memory>
12 namespace WebEngineViewer
13 {
14 class NetworkUrlInterceptorPrivate;
15 class NetworkPluginUrlInterceptorInterface;
16 /**
17  * @brief The NetworkUrlInterceptor class
18  * @author Laurent Montel <[email protected]>
19  */
20 class WEBENGINEVIEWER_EXPORT NetworkUrlInterceptor : public QWebEngineUrlRequestInterceptor
21 {
22  Q_OBJECT
23 public:
24  explicit NetworkUrlInterceptor(QObject *parent = nullptr);
25  ~NetworkUrlInterceptor() override;
26 
27  void interceptRequest(QWebEngineUrlRequestInfo &info) override;
28 
29  void addInterceptor(NetworkPluginUrlInterceptorInterface *interceptor);
30  void removeInterceptor(NetworkPluginUrlInterceptorInterface *interceptor);
31 
32 private:
33  std::unique_ptr<NetworkUrlInterceptorPrivate> const d;
34 };
35 }
The NetworkUrlInterceptor class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:16:43 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.