/* * This file is part of smolbote. It's copyrighted by the contributors recorded * in the version control history of the file, available from its original * location: git://neueland.iserlohn-fortress.net/smolbote.git * * SPDX-License-Identifier: GPL-3.0 */ #ifndef URLREQUESTINTERCEPTOR_H #define URLREQUESTINTERCEPTOR_H #include #include #include "filter/filter.h" class UrlRequestInterceptor : public QWebEngineUrlRequestInterceptor { Q_OBJECT public: explicit UrlRequestInterceptor(const QString &path, QObject *parent = nullptr); //~UrlRequestInterceptor(); void interceptRequest(QWebEngineUrlRequestInfo &info); signals: public slots: private: std::vector m_rules; }; bool shouldBlock(const QUrl &url, const QString &test); #endif // URLREQUESTINTERCEPTOR_H