Falkon Develop
Cross-platform Qt-based web browser
AdBlockSubscription Class Reference

#include <adblocksubscription.h>

Inheritance diagram for AdBlockSubscription:
AdBlockCustomList

Public Slots

void updateSubscription ()
 

Signals

void subscriptionChanged ()
 
void subscriptionUpdated ()
 
void subscriptionError (const QString &message)
 

Public Member Functions

 AdBlockSubscription (const QString &title, QObject *parent=nullptr)
 
 ~AdBlockSubscription ()
 
QString title () const
 
QString filePath () const
 
void setFilePath (const QString &path)
 
QUrl url () const
 
void setUrl (const QUrl &url)
 
virtual void loadSubscription (const QStringList &disabledRules)
 
virtual void saveSubscription ()
 
const AdBlockRulerule (int offset) const
 
QVector< AdBlockRule * > allRules () const
 
const AdBlockRuleenableRule (int offset)
 
const AdBlockRuledisableRule (int offset)
 
virtual bool canEditRules () const
 
virtual bool canBeRemoved () const
 
virtual int addRule (AdBlockRule *rule)
 
virtual bool removeRule (int offset)
 
virtual const AdBlockRulereplaceRule (AdBlockRule *rule, int offset)
 

Protected Slots

void subscriptionDownloaded ()
 

Protected Member Functions

virtual bool saveDownloadedData (const QByteArray &data)
 

Protected Attributes

QNetworkReply * m_reply
 
QVector< AdBlockRule * > m_rules
 

Detailed Description

Definition at line 59 of file adblocksubscription.h.

Constructor & Destructor Documentation

◆ AdBlockSubscription()

AdBlockSubscription::AdBlockSubscription ( const QString &  title,
QObject *  parent = nullptr 
)
explicit

Copyright (c) 2009, Benjamin C. Meyer ben@m.nosp@m.eyer.nosp@m.home..nosp@m.net

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the Benjamin Meyer nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS `‘AS IS’' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition at line 57 of file adblocksubscription.cpp.

◆ ~AdBlockSubscription()

AdBlockSubscription::~AdBlockSubscription ( )

Definition at line 278 of file adblocksubscription.cpp.

Member Function Documentation

◆ addRule()

int AdBlockSubscription::addRule ( AdBlockRule rule)
virtual

Reimplemented in AdBlockCustomList.

Definition at line 259 of file adblocksubscription.cpp.

◆ allRules()

QVector< AdBlockRule * > AdBlockSubscription::allRules ( ) const

Definition at line 208 of file adblocksubscription.cpp.

◆ canBeRemoved()

bool AdBlockSubscription::canBeRemoved ( ) const
virtual

Reimplemented in AdBlockCustomList.

Definition at line 254 of file adblocksubscription.cpp.

◆ canEditRules()

bool AdBlockSubscription::canEditRules ( ) const
virtual

Reimplemented in AdBlockCustomList.

Definition at line 249 of file adblocksubscription.cpp.

◆ disableRule()

const AdBlockRule * AdBlockSubscription::disableRule ( int  offset)

Definition at line 231 of file adblocksubscription.cpp.

◆ enableRule()

const AdBlockRule * AdBlockSubscription::enableRule ( int  offset)

Definition at line 213 of file adblocksubscription.cpp.

◆ filePath()

QString AdBlockSubscription::filePath ( ) const

Definition at line 70 of file adblocksubscription.cpp.

◆ loadSubscription()

void AdBlockSubscription::loadSubscription ( const QStringList &  disabledRules)
virtual

Reimplemented in AdBlockCustomList.

Definition at line 90 of file adblocksubscription.cpp.

◆ removeRule()

bool AdBlockSubscription::removeRule ( int  offset)
virtual

Reimplemented in AdBlockCustomList.

Definition at line 265 of file adblocksubscription.cpp.

◆ replaceRule()

const AdBlockRule * AdBlockSubscription::replaceRule ( AdBlockRule rule,
int  offset 
)
virtual

Reimplemented in AdBlockCustomList.

Definition at line 271 of file adblocksubscription.cpp.

◆ rule()

const AdBlockRule * AdBlockSubscription::rule ( int  offset) const

Definition at line 199 of file adblocksubscription.cpp.

◆ saveDownloadedData()

bool AdBlockSubscription::saveDownloadedData ( const QByteArray &  data)
protectedvirtual

Definition at line 183 of file adblocksubscription.cpp.

◆ saveSubscription()

void AdBlockSubscription::saveSubscription ( )
virtual

Reimplemented in AdBlockCustomList.

Definition at line 139 of file adblocksubscription.cpp.

◆ setFilePath()

void AdBlockSubscription::setFilePath ( const QString &  path)

Definition at line 75 of file adblocksubscription.cpp.

◆ setUrl()

void AdBlockSubscription::setUrl ( const QUrl &  url)

Definition at line 85 of file adblocksubscription.cpp.

◆ subscriptionChanged

void AdBlockSubscription::subscriptionChanged ( )
signal

◆ subscriptionDownloaded

void AdBlockSubscription::subscriptionDownloaded ( )
protectedslot

Definition at line 153 of file adblocksubscription.cpp.

◆ subscriptionError

void AdBlockSubscription::subscriptionError ( const QString &  message)
signal

◆ subscriptionUpdated

void AdBlockSubscription::subscriptionUpdated ( )
signal

◆ title()

QString AdBlockSubscription::title ( ) const

Definition at line 65 of file adblocksubscription.cpp.

◆ updateSubscription

void AdBlockSubscription::updateSubscription ( )
slot

Definition at line 143 of file adblocksubscription.cpp.

◆ url()

QUrl AdBlockSubscription::url ( ) const

Definition at line 80 of file adblocksubscription.cpp.

Member Data Documentation

◆ m_reply

QNetworkReply* AdBlockSubscription::m_reply
protected

Definition at line 104 of file adblocksubscription.h.

◆ m_rules

QVector<AdBlockRule*> AdBlockSubscription::m_rules
protected

Definition at line 105 of file adblocksubscription.h.


The documentation for this class was generated from the following files: