Index: include/AdblockPlus/FilterEngine.h |
diff --git a/include/AdblockPlus/FilterEngine.h b/include/AdblockPlus/FilterEngine.h |
index f1c779b367c5efb176890ac96764d582aec5db34..9ecc5f53c1f071e26566e8765479e500675fbf2a 100644 |
--- a/include/AdblockPlus/FilterEngine.h |
+++ b/include/AdblockPlus/FilterEngine.h |
@@ -119,6 +119,12 @@ namespace AdblockPlus |
*/ |
bool IsUpdating(); |
+ /** |
+ * Indicates whether the subscription is acceptable ads subscription. |
+ * @return `true` if this subscription is acceptable ads subscription. |
+ */ |
+ bool IsAA(); |
+ |
bool operator==(const Subscription& subscription) const; |
/** |
@@ -307,6 +313,31 @@ namespace AdblockPlus |
std::vector<SubscriptionPtr> FetchAvailableSubscriptions() const; |
/** |
+ * Ensures that Acceptable Ads subscription is enabled or disabled. |
+ * @param enabled |
+ * - if the value is `true` |
+ * - ensure that the filter set includes an enabled AA subscription, |
+ * adding it if needed and enabling it if disabled. |
+ * - if the value is `false` |
+ * - if an AA subscription is present, disable it. |
+ * - if absent, do nothing. |
+ */ |
+ void SetAAEnabled(bool enabled); |
+ |
+ /** |
+ * Checks whether Acceptable Ads subscription is enabled. |
+ * @return `true` if acceptable ads subscription is present and enabled. |
+ */ |
+ bool IsAAEnabled() const; |
+ |
+ /** |
+ * Retrieves the URL of Acceptable Ads subscription, what makes the URL |
+ * available even if subscription is not add yet. |
+ * @return Returns URL of Acceptable Ads. |
+ */ |
+ std::string GetAAUrl() const; |
+ |
+ /** |
* Invokes the listener set via SetNotificationAvailableCallback() with the |
* next notification to be shown. |
* @param url URL to match notifications to (optional). |