aboutsummaryrefslogtreecommitdiff
path: root/lib/adblock/filterrule.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/adblock/filterrule.h')
-rw-r--r--lib/adblock/filterrule.h50
1 files changed, 0 insertions, 50 deletions
diff --git a/lib/adblock/filterrule.h b/lib/adblock/filterrule.h
deleted file mode 100644
index 084bd8c..0000000
--- a/lib/adblock/filterrule.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This file is part of smolbote. It's copyrighted by the contributors recorded
- * in the version control history of the file, available from its original
- * location: git://neueland.iserlohn-fortress.net/smolbote.git
- *
- * SPDX-License-Identifier: GPL-3.0
- */
-
-#ifndef FILTERRULE_H
-#define FILTERRULE_H
-
-#include <QRegularExpression>
-
-class QUrl;
-class FilterRule
-{
-public:
-
- FilterRule(const QString &line);
-
- // delete the copy constructor and assignment operator
- FilterRule(const FilterRule&) = delete;
- FilterRule& operator=(const FilterRule&) = delete;
-
- // move constructor
- FilterRule(FilterRule&& other) {
- valid = other.valid;
- exception = other.exception;
- rule = other.rule;
- }
-
- ~FilterRule();
-
- bool isValid() const;
- bool isException() const;
- bool shouldBlock(const QUrl &requestUrl) const;
-
-private:
- bool parse(const QString &line);
-
- bool valid;
- bool exception;
-
- QRegularExpression rule;
-
-};
-
-QString createRegExpPattern(const QString &line);
-
-#endif // FILTERRULE_H