diff options
author | Panagiotis Papadopoulos <pano_90@gmx.net> | 2010-04-21 13:34:20 +0200 |
---|---|---|
committer | Panagiotis Papadopoulos <pano_90@gmx.net> | 2010-04-21 13:34:20 +0200 |
commit | f9153663cb8210ac4d6e7055838344839b4e19b6 (patch) | |
tree | b70233b32eadfbebff062c0000f007ca2f99d732 /src/adblock/adblockmanager.h | |
parent | Merge branch 'master' of git://gitorious.org/rekonq/mainline into i18n (diff) | |
parent | Nebulon's patch. (diff) | |
download | rekonq-f9153663cb8210ac4d6e7055838344839b4e19b6.tar.xz |
Merge branch 'master' of git://gitorious.org/rekonq/mainline into i18n
Diffstat (limited to 'src/adblock/adblockmanager.h')
-rw-r--r-- | src/adblock/adblockmanager.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/adblock/adblockmanager.h b/src/adblock/adblockmanager.h index f01aaca0..9b1cc915 100644 --- a/src/adblock/adblockmanager.h +++ b/src/adblock/adblockmanager.h @@ -2,7 +2,7 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2009 by Andrea Diamantini <adjam7 at gmail dot com> +* Copyright (C) 2010 by Andrea Diamantini <adjam7 at gmail dot com> * * * This program is free software; you can redistribute it and/or @@ -105,12 +105,15 @@ // Local Includes +#include "rekonqprivate_export.h" #include "adblockrule.h" // Qt Includes #include <QObject> #include <QNetworkReply> #include <QStringList> +#include <QByteArray> +#include <KIO/Job> // Forward Includes class QNetworkRequest; @@ -120,7 +123,7 @@ class WebPage; typedef QList<AdBlockRule> AdBlockRuleList; -class AdBlockManager : public QObject +class REKONQ_TESTS_EXPORT AdBlockManager : public QObject { Q_OBJECT @@ -128,9 +131,21 @@ public: AdBlockManager(QObject *parent = 0); ~AdBlockManager(); - void loadSettings(); - QNetworkReply *block(const QNetworkRequest &request); + QNetworkReply *block(const QNetworkRequest &request, WebPage *page); void applyHidingRules(WebPage *page); + void addSubscription(const QString &title, const QString &location); + +public slots: + void loadSettings(bool checkUpdateDate = true); + +private: + void updateNextSubscription(); + void saveRules(const QStringList &); + void loadRules(const QStringList &); + +private slots: + void slotResult(KJob *); + void subscriptionData(KIO::Job*, const QByteArray&); private: bool _isAdblockEnabled; @@ -139,6 +154,9 @@ private: AdBlockRuleList _blackList; AdBlockRuleList _whiteList; QStringList _hideList; + + int _index; + QByteArray _buffer; }; #endif |