diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-07-24 12:09:07 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-07-24 21:10:35 +0200 |
commit | e53906ccae7610b00ee12c3c0c45710907d7ff81 (patch) | |
tree | 72edeacf356e0d4bd7966db7e0ca26b5df64a87a /src/webengine/urlinterceptor.h | |
parent | AdBlockRule: move matching logic to FilterRule (diff) | |
download | smolbote-e53906ccae7610b00ee12c3c0c45710907d7ff81.tar.xz |
UrlRequestInterceptor: add filter rules
Diffstat (limited to 'src/webengine/urlinterceptor.h')
-rw-r--r-- | src/webengine/urlinterceptor.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/webengine/urlinterceptor.h b/src/webengine/urlinterceptor.h index 2f91e30..a4a1b6e 100644 --- a/src/webengine/urlinterceptor.h +++ b/src/webengine/urlinterceptor.h @@ -6,13 +6,14 @@ * SPDX-License-Identifier: GPL-3.0 */ -#ifndef URLREQUESTINTERCEPTOR_H -#define URLREQUESTINTERCEPTOR_H +#ifndef SMOLBOTE_URLREQUESTINTERCEPTOR_H +#define SMOLBOTE_URLREQUESTINTERCEPTOR_H #include <QWebEngineUrlRequestInterceptor> #include <memory> #include <QVector> #include <QByteArray> +#include "web/urlfilter/filterrule.h" typedef std::pair<std::string, std::string> Header; @@ -32,9 +33,11 @@ public: private: QHash<QString, HostRule> rules; + std::vector<FilterRule> filters; std::vector<Header> m_headers; }; QHash<QString, UrlRequestInterceptor::HostRule> parse(const QString &filename); +inline std::vector<FilterRule> parseAdBlockList(const QString &filename); -#endif // URLREQUESTINTERCEPTOR_H +#endif // SMOLBOTE_URLREQUESTINTERCEPTOR_H |