Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: include/AdblockPlus/FilterEngine.h

Issue 9987009: Interface for the libadblockplus API (Closed)
Patch Set: Renamed match method, added tests for the stubs Created March 26, 2013, 3:39 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/AdblockPlus.h ('k') | libadblockplus.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include <vector>
2 #include <string>
3
4 namespace AdblockPlus
5 {
6 class JsEngine;
7
8 struct Subscription
9 {
10 std::string title;
11 std::string url;
12
13 Subscription(const std::string& title, const std::string& url);
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 std::vector<Subscription>& GetSubscriptions() const;
23 void UpdateSubscriptionFilters(const Subscription& subscription);
24 std::vector<Subscription> FetchAvailableSubscriptions();
25 bool MatchesFilters(const std::string& url,
26 const std::string& contentType) const;
27 std::vector<std::string> GetElementHidingRules() const;
28
29 private:
30 JsEngine& jsEngine;
31 std::vector<Subscription> subscriptions;
32 };
33 }
OLDNEW
« no previous file with comments | « include/AdblockPlus.h ('k') | libadblockplus.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld