Index: include/AdblockPlus/FilterEngine.h |
diff --git a/include/AdblockPlus/FilterEngine.h b/include/AdblockPlus/FilterEngine.h |
index 40484cc26cb9512a15688d28c354dc67d10cf037..5958d6f47ff1def282072c579d05cef7f8a76c45 100644 |
--- a/include/AdblockPlus/FilterEngine.h |
+++ b/include/AdblockPlus/FilterEngine.h |
@@ -299,6 +299,36 @@ namespace AdblockPlus |
const std::vector<std::string>& documentUrls) const; |
/** |
+ * Checks if the supplied URL is whitelisted. |
+ * @param url URL to match. |
+ * @param documentUrls Chain of documents requesting the resource, starting |
+ * with the current resource's parent frame, ending with the |
+ * top-level frame. |
+ * If the application is not capable of identifying the frame |
+ * structure, e.g. because it is a proxy, it can be approximated |
+ * using `ReferrerMapping`. |
+ * @return `true` if the URL is whitelisted. |
+ * @throw `std::invalid_argument`, if an invalid `contentType` was supplied. |
+ */ |
+ bool IsDocumentWhitelisted(const std::string& url, |
+ const std::vector<std::string>& documentUrls) const; |
+ |
+ /** |
+ * Checks if the element hidiing is whitelisted for the supplied URL. |
+ * @param url URL to match. |
+ * @param documentUrls Chain of documents requesting the resource, starting |
+ * with the current resource's parent frame, ending with the |
+ * top-level frame. |
+ * If the application is not capable of identifying the frame |
+ * structure, e.g. because it is a proxy, it can be approximated |
+ * using `ReferrerMapping`. |
+ * @return `true` if element hiding is whitelisted for the supplied URL. |
+ * @throw `std::invalid_argument`, if an invalid `contentType` was supplied. |
+ */ |
+ bool IsElemhideWhitelisted(const std::string& url, |
+ const std::vector<std::string>& documentUrls) const; |
+ |
+ /** |
* Retrieves CSS selectors for all element hiding filters active on the |
* supplied domain. |
* @param domain Domain to retrieve CSS selectors for. |
@@ -409,6 +439,11 @@ namespace AdblockPlus |
void FilterChanged(FilterChangeCallback callback, JsValueList& params); |
void ShowNotification(const ShowNotificationCallback& callback, |
const JsValueList& params); |
+ std::string GetWhitelistingFilter(const std::string& url, |
+ const std::string& parent, ContentType contentType) const; |
+ std::string GetWhitelistingFilter(const std::string& urlArg, |
+ const std::vector<std::string>& documentUrls, |
+ ContentType contentType) const; |
}; |
} |