Index: include/AdblockPlus/FilterEngine.h |
diff --git a/include/AdblockPlus/FilterEngine.h b/include/AdblockPlus/FilterEngine.h |
index 3d1df9f5fa9a17ab60178455a6c92889edfed15f..f445c62395cf94dc5d4a9097baa0409c35af1838 100644 |
--- a/include/AdblockPlus/FilterEngine.h |
+++ b/include/AdblockPlus/FilterEngine.h |
@@ -119,6 +119,12 @@ namespace AdblockPlus |
*/ |
bool IsUpdating() const; |
+ /** |
+ * Indicates whether the subscription is acceptable ads subscription. |
+ * @return `true` if this subscription is acceptable ads subscription. |
+ */ |
+ bool IsAA() const; |
+ |
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). |