Messagelib

networkurlinterceptor.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_export.h"
10#include <QWebEngineUrlRequestInterceptor>
11#include <memory>
12namespace WebEngineViewer
13{
14class NetworkUrlInterceptorPrivate;
15class NetworkPluginUrlInterceptorInterface;
16/**
17 * @brief The NetworkUrlInterceptor class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class WEBENGINEVIEWER_EXPORT NetworkUrlInterceptor : public QWebEngineUrlRequestInterceptor
21{
22 Q_OBJECT
23public:
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
32private:
33 std::unique_ptr<NetworkUrlInterceptorPrivate> const d;
34};
35}
The NetworkUrlInterceptor class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.