Index: include/AdblockPlus/AdblockPlus.h |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/include/AdblockPlus/AdblockPlus.h |
@@ -0,0 +1,31 @@ |
+#include <vector> |
+#include <string> |
+ |
+class JsEngine; |
+ |
+namespace AdblockPlus |
+{ |
+ struct Subscription |
+ { |
+ std::string title; |
+ std::string url; |
+ }; |
+ |
+ class AdblockPlus |
+ { |
+ public: |
+ AdblockPlus(JsEngine& jsEngine); |
+ void AddSubscription(Subscription subscription); |
+ void RemoveSubscription(const Subscription& subscription); |
+ Subscription FindSubscription(const std::string& title) const; |
+ std::vector<Subscription> GetSubscriptions(); |
+ void UpdateSubscriptionFilters(const Subscription& subscription); |
+ std::vector<Subscription> FetchSubscriptionList(); |
+ bool Matches(const std::string& url, |
+ const std::string& contentType) const; |
+ std::vector<std::string> GetElementHidingRules() const; |
+ |
+ private: |
+ JsEngine& jsEngine; |
+ }; |
+} |