aboutsummaryrefslogtreecommitdiff
path: root/lib/urlfilter/formats/adblocklist.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2019-01-09 19:38:58 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2019-01-09 19:38:58 +0100
commit3d2ae07c455c0e423c64f19e445518427a5684fa (patch)
tree58f6b47c3db33658a6f2e605fd021f08d1fa9964 /lib/urlfilter/formats/adblocklist.h
parentAdd assorted unfished doc files to repo (diff)
downloadsmolbote-3d2ae07c455c0e423c64f19e445518427a5684fa.tar.xz
Rewrite lib/urlfilter
- Make HostList and AdBlockList implementations independent from each other - Move urlfilter tests to lib/urlfilter
Diffstat (limited to 'lib/urlfilter/formats/adblocklist.h')
-rw-r--r--lib/urlfilter/formats/adblocklist.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/urlfilter/formats/adblocklist.h b/lib/urlfilter/formats/adblocklist.h
deleted file mode 100644
index 34a2120..0000000
--- a/lib/urlfilter/formats/adblocklist.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef ADBLOCKLIST_H
-#define ADBLOCKLIST_H
-
-#include <QHash>
-#include "adblockrule.h"
-
-class AdBlockList
-{
-public:
- AdBlockList();
-
- QString metadata(const QString &key) const;
- FilterLeaf::Action match(const QUrl &firstParty, const QUrl &requestUrl, QWebEngineUrlRequestInfo::ResourceType type = QWebEngineUrlRequestInfo::ResourceTypeUnknown) const;
-
- bool parseLine(const QString &line);
-
-protected:
- bool parseComment(const QString &commentLine);
-
-private:
- struct Filter
- {
- FilterLeaf::Action action = FilterLeaf::Block;
- Matcher *matcher;
- };
-
- QHash<QString, QString> m_metadata;
- //QMap<QString, Filter> m_rules;
- std::vector<Filter> m_rules;
-};
-
-#endif // ADBLOCKLIST_H