aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/blockerrule.h
blob: ddbd1c9a906750d0a78e2b811d74ba29414ea3a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef ADBLOCKRULE_H
#define ADBLOCKRULE_H

#include <QObject>
#include <QUrl>
#include <QRegularExpression>

class BlockerRule : public QObject
{
    Q_OBJECT
public:
    explicit BlockerRule(QString rule, QObject *parent = 0);

    bool match(const QUrl &url);
    bool isValid();
    bool isException();

signals:

public slots:

private:
    bool m_valid;
    bool m_exception;
    QRegularExpression ruleExpression;
};

#endif // ADBLOCKRULE_H