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

Delta Between Two Patch Sets: include/AdblockPlus/FilterEngine.h

Issue 5728380594946048: Issue 116 - Document the libadblockplus API (Closed)
Left Patch Set: Address all comments Created Sept. 1, 2014, 4:59 p.m.
Right Patch Set: Write libadblockplus in lower case consistently Created Sept. 2, 2014, 2:18 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « include/AdblockPlus/FileSystem.h ('k') | include/AdblockPlus/JsEngine.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 /** 65 /**
66 * Removes this filter from the list of custom filters. 66 * Removes this filter from the list of custom filters.
67 */ 67 */
68 void RemoveFromList(); 68 void RemoveFromList();
69 69
70 bool operator==(const Filter& filter) const; 70 bool operator==(const Filter& filter) const;
71 71
72 /** 72 /**
73 * Creates a wrapper for an existing JavaScript filter object. 73 * Creates a wrapper for an existing JavaScript filter object.
74 * Normally you shouldn't call this directly, but use GetFilter() instead. 74 * Normally you shouldn't call this directly, but use
Wladimir Palant 2014/09/01 17:36:56 It's FilterEngine::GetFilter(), not Filter::GetFil
Felix Dahlke 2014/09/02 05:24:51 Done.
75 * FilterEngine::GetFilter() instead.
75 * @param value JavaScript filter object. 76 * @param value JavaScript filter object.
76 */ 77 */
77 Filter(JsValuePtr value); 78 Filter(JsValuePtr value);
78 }; 79 };
79 80
80 /** 81 /**
81 * Wrapper for a subscription object. 82 * Wrapper for a subscription object.
82 */ 83 */
83 class Subscription : public JsValue, 84 class Subscription : public JsValue,
84 public std::tr1::enable_shared_from_this<Subscription> 85 public std::tr1::enable_shared_from_this<Subscription>
(...skipping 15 matching lines...) Expand all
100 */ 101 */
101 void RemoveFromList(); 102 void RemoveFromList();
102 103
103 /** 104 /**
104 * Updates this subscription, i.e.\ retrieves the current filters from the 105 * Updates this subscription, i.e.\ retrieves the current filters from the
105 * subscription URL. 106 * subscription URL.
106 */ 107 */
107 void UpdateFilters(); 108 void UpdateFilters();
108 109
109 /** 110 /**
110 * Checks if this subscriptions is currently being updated. 111 * Checks if the subscription is currently being updated.
111 * @return `true` if this subscriptions is currently being updated. 112 * @return `true` if the subscription is currently being updated.
112 */ 113 */
113 bool IsUpdating(); 114 bool IsUpdating();
114 115
115 bool operator==(const Subscription& subscription) const; 116 bool operator==(const Subscription& subscription) const;
116 117
117 /** 118 /**
118 * Creates a wrapper for an existing JavaScript subscription object. 119 * Creates a wrapper for an existing JavaScript subscription object.
119 * Normally you shouldn't call this directly, but use GetSubscription() 120 * Normally you shouldn't call this directly, but use
Wladimir Palant 2014/09/01 17:36:56 It's FilterEngine::GetSubscription(), not Subscrip
Felix Dahlke 2014/09/02 05:24:51 Done.
120 * instead. 121 * FilterEngine::GetSubscription() instead.
121 * @param value JavaScript subscription object. 122 * @param value JavaScript subscription object.
122 */ 123 */
123 Subscription(JsValuePtr value); 124 Subscription(JsValuePtr value);
124 }; 125 };
125 126
126 /** 127 /**
127 * Shared smart pointer to a `Filter` instance. 128 * Shared smart pointer to a `Filter` instance.
128 */ 129 */
129 typedef std::tr1::shared_ptr<Filter> FilterPtr; 130 typedef std::tr1::shared_ptr<Filter> FilterPtr;
130 131
131 /** 132 /**
132 * Shared smart pointer to a `Subscription` instance. 133 * Shared smart pointer to a `Subscription` instance.
133 */ 134 */
134 typedef std::tr1::shared_ptr<Subscription> SubscriptionPtr; 135 typedef std::tr1::shared_ptr<Subscription> SubscriptionPtr;
135 136
136 /** 137 /**
137 * Main component of Libadblockplus. 138 * Main component of libadblockplus.
138 * It handles: 139 * It handles:
139 * - Filter management and matching. 140 * - Filter management and matching.
140 * - Subscription management and synchronization. 141 * - Subscription management and synchronization.
141 * - Update checks for the application. 142 * - Update checks for the application.
142 */ 143 */
143 class FilterEngine 144 class FilterEngine
144 { 145 {
145 public: 146 public:
146 /** 147 /**
147 * Callback type invoked when an update is available. 148 * Callback type invoked when an update is available.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 void InitDone(JsValueList& params); 340 void InitDone(JsValueList& params);
340 FilterPtr CheckFilterMatch(const std::string& url, 341 FilterPtr CheckFilterMatch(const std::string& url,
341 const std::string& contentType, 342 const std::string& contentType,
342 const std::string& documentUrl) const; 343 const std::string& documentUrl) const;
343 void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback, JsValueList& params); 344 void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback, JsValueList& params);
344 void FilterChanged(FilterChangeCallback callback, JsValueList& params); 345 void FilterChanged(FilterChangeCallback callback, JsValueList& params);
345 }; 346 };
346 } 347 }
347 348
348 #endif 349 #endif
LEFTRIGHT

Powered by Google App Engine
This is Rietveld