/* * 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: https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote * * SPDX-License-Identifier: GPL-3.0 */ #ifndef SMOLBOTE_FILTER_H #define SMOLBOTE_FILTER_H #include #include #include #include #include #include "filtertree.h" class Configuration; class Filter : public QObject { Q_OBJECT public: struct HostRule { bool isBlocking; }; explicit Filter(const std::unique_ptr &config, QObject *parent = nullptr); ~Filter() override = default; void filterRequest(QWebEngineUrlRequestInfo &info) const; const QMap headers() const { return qAsConst(m_headers); } private: FilterTree filters; QMap m_headers; }; #endif // SMOLBOTE_FILTER_H