aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/urlinterceptor.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-07-24 12:09:07 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-07-24 21:10:35 +0200
commite53906ccae7610b00ee12c3c0c45710907d7ff81 (patch)
tree72edeacf356e0d4bd7966db7e0ca26b5df64a87a /src/webengine/urlinterceptor.h
parentAdBlockRule: move matching logic to FilterRule (diff)
downloadsmolbote-e53906ccae7610b00ee12c3c0c45710907d7ff81.tar.xz
UrlRequestInterceptor: add filter rules
Diffstat (limited to 'src/webengine/urlinterceptor.h')
-rw-r--r--src/webengine/urlinterceptor.h9
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