diff options
Diffstat (limited to 'src/webengine/urlinterceptor.h')
-rw-r--r-- | src/webengine/urlinterceptor.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/webengine/urlinterceptor.h b/src/webengine/urlinterceptor.h index acd076a..4466523 100644 --- a/src/webengine/urlinterceptor.h +++ b/src/webengine/urlinterceptor.h @@ -18,27 +18,31 @@ ** ******************************************************************************/ -#ifndef ADBLOCKINTERCEPTOR_H -#define ADBLOCKINTERCEPTOR_H +#ifndef URLREQUESTINTERCEPTOR_H +#define URLREQUESTINTERCEPTOR_H #include <QWebEngineUrlRequestInterceptor> -#include "filter/blockermanager.h" +#include <vector> +#include "filter/filter.h" class UrlRequestInterceptor : public QWebEngineUrlRequestInterceptor { Q_OBJECT public: - explicit UrlRequestInterceptor(QObject *parent = 0); + explicit UrlRequestInterceptor(const QString &path, QObject *parent = nullptr); + //~UrlRequestInterceptor(); void interceptRequest(QWebEngineUrlRequestInfo &info); - void setSubscription(BlockerManager *manager); signals: public slots: private: - BlockerManager *m_manager; + + std::vector<FilterRule> m_rules; }; -#endif // ADBLOCKINTERCEPTOR_H +bool shouldBlock(const QUrl &url, const QString &test); + +#endif // URLREQUESTINTERCEPTOR_H |