aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/urlinterceptor.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-12-11 18:16:50 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-12-11 18:16:50 +0100
commite25c011d5db32104ccdb3e8949082345efdba805 (patch)
treefb1892f8ae292a088638abaf158d086216106ad2 /src/webengine/urlinterceptor.h
parentFixed new window action (diff)
downloadsmolbote-e25c011d5db32104ccdb3e8949082345efdba805.tar.xz
Simple filterlist
Diffstat (limited to 'src/webengine/urlinterceptor.h')
-rw-r--r--src/webengine/urlinterceptor.h18
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