/* * 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 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) { matcher = other.matcher; } ~FilterRule(); bool shouldBlock(const QUrl &requestUrl) const; private: void parse(const QString &line); // QStringMatcher: holds a pattern you want to repeatedly match against some strings QStringMatcher matcher; }; #endif // FILTERRULE_H