libadblockplus
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Member Functions | Protected Member Functions | Friends | List of all members
AdblockPlus::Subscription Class Reference

Wrapper for a subscription object. More...

#include <FilterEngine.h>

Inheritance diagram for AdblockPlus::Subscription:
Inheritance graph
[legend]
Collaboration diagram for AdblockPlus::Subscription:
Collaboration graph
[legend]

Public Member Functions

 Subscription (const Subscription &src)
 Copy constructor.
 
 Subscription (Subscription &&src)
 Move constructor.
 
Subscriptionoperator= (const Subscription &src)
 Assignment operator.
 
Subscriptionoperator= (Subscription &&src)
 Move assignment operator.
 
bool IsDisabled () const
 Checks if the subscription is disabled. More...
 
void SetDisabled (bool value)
 Allows to enable or disable current subscription. More...
 
bool IsListed () const
 Checks if this subscription has been added to the list of subscriptions. More...
 
void AddToList ()
 Adds this subscription to the list of subscriptions.
 
void RemoveFromList ()
 Removes this subscription from the list of subscriptions.
 
void UpdateFilters ()
 Updates this subscription, i.e. retrieves the current filters from the subscription URL.
 
bool IsUpdating () const
 Checks if the subscription is currently being updated. More...
 
bool IsAA () const
 Indicates whether the subscription is the Acceptable Ads subscription. More...
 
bool operator== (const Subscription &subscription) const
 
- Public Member Functions inherited from AdblockPlus::JsValue
 JsValue (JsValue &&src)
 
 JsValue (const JsValue &src)
 
JsValueoperator= (const JsValue &src)
 
JsValueoperator= (JsValue &&src)
 
bool IsUndefined () const
 
bool IsNull () const
 
bool IsString () const
 
bool IsNumber () const
 
bool IsBool () const
 
bool IsObject () const
 
bool IsArray () const
 
bool IsFunction () const
 
std::string AsString () const
 
StringBuffer AsStringBuffer () const
 
int64_t AsInt () const
 
bool AsBool () const
 
JsValueList AsList () const
 
std::vector< std::string > GetOwnPropertyNames () const
 Returns a list of property names if this is an object (see IsObject()). More...
 
JsValue GetProperty (const std::string &name) const
 Returns a property value if this is an object (see IsObject()). More...
 
void SetStringBufferProperty (const std::string &name, const StringBuffer &val)
 Sets a property value string if this is an object (see IsObject()). More...
 
std::string GetClass () const
 Returns the value's class name, e.g. Array for arrays (see IsArray()). More...
 
JsValue Call (const JsValueList &params=JsValueList()) const
 Invokes the value as a function (see IsFunction()). More...
 
JsValue Call (const JsValueList &params, const AdblockPlus::JsValue &thisValue) const
 Invokes the value as a method (see IsFunction()). More...
 
JsValue Call (const JsValue &arg) const
 Invokes the value as a function (see IsFunction()) with single parameter. More...
 
v8::Local< v8::Value > UnwrapValue () const
 
void SetProperty (const std::string &name, const std::string &val)
 Sets a property value if this is an object (see IsObject()). More...
 
void SetProperty (const std::string &name, const StringBuffer &val)
 Sets a property value if this is an object (see IsObject()). More...
 
void SetProperty (const std::string &name, int64_t val)
 Sets a property value if this is an object (see IsObject()). More...
 
void SetProperty (const std::string &name, bool val)
 Sets a property value if this is an object (see IsObject()). More...
 
void SetProperty (const std::string &name, const JsValue &value)
 Sets a property value if this is an object (see IsObject()). More...
 
void SetProperty (const std::string &name, const char *val)
 Sets a property value if this is an object (see IsObject()). More...
 
void SetProperty (const std::string &name, int val)
 Sets a property value if this is an object (see IsObject()). More...
 

Protected Member Functions

 Subscription (JsValue &&value)
 Creates a wrapper for an existing JavaScript subscription object. More...
 

Friends

class FilterEngine
 

Additional Inherited Members

- Protected Attributes inherited from AdblockPlus::JsValue
JsEnginePtr jsEngine
 

Detailed Description

Wrapper for a subscription object.

There are no accessors for most subscription properties, use GetProperty() to retrieve them by name.

Constructor & Destructor Documentation

AdblockPlus::Subscription::Subscription ( JsValue &&  value)
protected

Creates a wrapper for an existing JavaScript subscription object.

Normally you shouldn't call this directly, but use FilterEngine::GetSubscription() instead.

Parameters
valueJavaScript subscription object.

Member Function Documentation

bool AdblockPlus::Subscription::IsAA ( ) const

Indicates whether the subscription is the Acceptable Ads subscription.

Returns
true if this subscription is the Acceptable Ads subscription.
bool AdblockPlus::Subscription::IsDisabled ( ) const

Checks if the subscription is disabled.

Returns
true if this subscription is disabled.
bool AdblockPlus::Subscription::IsListed ( ) const

Checks if this subscription has been added to the list of subscriptions.

Returns
true if this subscription has been added.
bool AdblockPlus::Subscription::IsUpdating ( ) const

Checks if the subscription is currently being updated.

Returns
true if the subscription is currently being updated.
void AdblockPlus::Subscription::SetDisabled ( bool  value)

Allows to enable or disable current subscription.

Parameters
<tt>value</tt>disabling the subscription if true and enabling if false. If the previous state was the same then it has no effect.

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