aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/adblockinterceptor.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-01-23 15:42:14 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-01-23 15:42:14 +0100
commitd886b377ac168d32668b5f3d145279a4f64de730 (patch)
treeb5547077ce555e8c609495fc6b3851b827abbb3d /src/webengine/adblockinterceptor.h
parentRemoved window/title config (diff)
downloadsmolbote-d886b377ac168d32668b5f3d145279a4f64de730.tar.xz
URL blocking
Diffstat (limited to 'src/webengine/adblockinterceptor.h')
-rw-r--r--src/webengine/adblockinterceptor.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/webengine/adblockinterceptor.h b/src/webengine/adblockinterceptor.h
new file mode 100644
index 0000000..061b626
--- /dev/null
+++ b/src/webengine/adblockinterceptor.h
@@ -0,0 +1,25 @@
+#ifndef ADBLOCKINTERCEPTOR_H
+#define ADBLOCKINTERCEPTOR_H
+
+#include <QWebEngineUrlRequestInterceptor>
+#include "adblockrule.h"
+
+class AdBlockInterceptor : public QWebEngineUrlRequestInterceptor
+{
+ Q_OBJECT
+public:
+ explicit AdBlockInterceptor(QObject *parent = 0);
+
+ void interceptRequest(QWebEngineUrlRequestInfo &info);
+
+ int loadSubscription(const QString &subpath);
+
+signals:
+
+public slots:
+
+private:
+ QList<AdBlockRule*> m_urlBlacklist;
+};
+
+#endif // ADBLOCKINTERCEPTOR_H