OLD | NEW |
(Empty) | |
| 1 #include <vector> |
| 2 #include <string> |
| 3 |
| 4 namespace AdblockPlus |
| 5 { |
| 6 class JsEngine; |
| 7 |
| 8 struct Subscription |
| 9 { |
| 10 std::string url; |
| 11 std::string title; |
| 12 |
| 13 Subscription(const std::string& url, const std::string& title); |
| 14 }; |
| 15 |
| 16 class FilterEngine |
| 17 { |
| 18 public: |
| 19 explicit FilterEngine(JsEngine& jsEngine); |
| 20 void AddSubscription(Subscription subscription); |
| 21 void RemoveSubscription(const Subscription& subscription); |
| 22 const Subscription* FindSubscription(const std::string& url) const; |
| 23 const std::vector<Subscription>& GetSubscriptions() const; |
| 24 void UpdateSubscriptionFilters(const Subscription& subscription); |
| 25 std::vector<Subscription> FetchAvailableSubscriptions(); |
| 26 bool MatchesFilters(const std::string& url, |
| 27 const std::string& contentType) const; |
| 28 std::vector<std::string> GetElementHidingRules() const; |
| 29 |
| 30 private: |
| 31 JsEngine& jsEngine; |
| 32 std::vector<Subscription> subscriptions; |
| 33 }; |
| 34 } |
OLD | NEW |