| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 * subscription URL. | 111 * subscription URL. |
| 112 */ | 112 */ |
| 113 void UpdateFilters(); | 113 void UpdateFilters(); |
| 114 | 114 |
| 115 /** | 115 /** |
| 116 * Checks if the subscription is currently being updated. | 116 * Checks if the subscription is currently being updated. |
| 117 * @return `true` if the subscription is currently being updated. | 117 * @return `true` if the subscription is currently being updated. |
| 118 */ | 118 */ |
| 119 bool IsUpdating(); | 119 bool IsUpdating(); |
| 120 | 120 |
| 121 /** | |
| 122 * Indicates whether the subscription is acceptable ads subscription. | |
| 123 * @return `true` if this subscription is acceptable ads subscription. | |
| 124 */ | |
| 125 bool IsAA(); | |
| 126 | |
|
Eric
2016/12/05 14:40:57
Typo: extra column of spaces
sergei
2017/03/17 15:55:25
Done.
| |
| 121 bool operator==(const Subscription& subscription) const; | 127 bool operator==(const Subscription& subscription) const; |
| 122 | 128 |
| 123 /** | 129 /** |
| 124 * Creates a wrapper for an existing JavaScript subscription object. | 130 * Creates a wrapper for an existing JavaScript subscription object. |
| 125 * Normally you shouldn't call this directly, but use | 131 * Normally you shouldn't call this directly, but use |
| 126 * FilterEngine::GetSubscription() instead. | 132 * FilterEngine::GetSubscription() instead. |
| 127 * @param value JavaScript subscription object. | 133 * @param value JavaScript subscription object. |
| 128 */ | 134 */ |
| 129 Subscription(JsValue&& value); | 135 Subscription(JsValue&& value); |
| 130 }; | 136 }; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 */ | 268 */ |
| 263 std::vector<SubscriptionPtr> GetListedSubscriptions() const; | 269 std::vector<SubscriptionPtr> GetListedSubscriptions() const; |
| 264 | 270 |
| 265 /** | 271 /** |
| 266 * Retrieves all recommended subscriptions. | 272 * Retrieves all recommended subscriptions. |
| 267 * @return List of recommended subscriptions. | 273 * @return List of recommended subscriptions. |
| 268 */ | 274 */ |
| 269 std::vector<SubscriptionPtr> FetchAvailableSubscriptions() const; | 275 std::vector<SubscriptionPtr> FetchAvailableSubscriptions() const; |
| 270 | 276 |
| 271 /** | 277 /** |
| 278 * Ensures that Acceptable Ads subscription is enabled or disabled. | |
| 279 * @param enabled If the value is true, adds AA subscription in case of | |
| 280 * necessity and enables AA subscription is disabled. If the value | |
| 281 * is false, disables the subscription if it is present and enabled. | |
| 282 * Otherwise has not effect. | |
|
Eric
2016/12/05 14:40:57
* @param enabled
* - if the argument is `true`
*
sergei
2017/03/17 15:55:25
The proposed variant is taken mostly without chang
| |
| 283 */ | |
| 284 void SetAAEnabled(bool enabled); | |
| 285 | |
| 286 /** | |
| 287 * Checks whether Acceptable Ads subscription is enaled. | |
|
Eric
2016/12/05 14:40:57
"... whether the filter set includes an Acceptable
sergei
2017/03/17 15:55:25
It cannot be enabled and not included in a filter
| |
| 288 * @return `true` if acceptable ads subscription is present and enabled. | |
| 289 */ | |
| 290 bool IsAAEnabled() const; | |
| 291 | |
| 292 /** | |
| 293 * Retrieves the URL of Acceptable Ads provisioned in configuration, what | |
| 294 * makes it available even if subscription is not add yet. | |
|
Eric
2016/12/05 14:40:57
* Retrieve the URL for an Acceptable Ads subscript
sergei
2017/03/17 15:55:25
The aim of this method is not to add the AA subscr
| |
| 295 * @return Returns URL of Acceptable Ads. | |
| 296 */ | |
| 297 std::string GetAAURL() const; | |
|
Eric
2016/12/05 14:40:57
Nit: According to our style conventions, it should
sergei
2017/03/17 15:55:25
Done.
| |
| 298 | |
| 299 /** | |
| 272 * Invokes the listener set via SetNotificationAvailableCallback() with the | 300 * Invokes the listener set via SetNotificationAvailableCallback() with the |
| 273 * next notification to be shown. | 301 * next notification to be shown. |
| 274 * @param url URL to match notifications to (optional). | 302 * @param url URL to match notifications to (optional). |
| 275 */ | 303 */ |
| 276 void ShowNextNotification(const std::string& url = std::string()); | 304 void ShowNextNotification(const std::string& url = std::string()); |
| 277 | 305 |
| 278 /** | 306 /** |
| 279 * Sets the callback invoked when a notification should be shown. | 307 * Sets the callback invoked when a notification should be shown. |
| 280 * @param callback Callback to invoke. | 308 * @param callback Callback to invoke. |
| 281 */ | 309 */ |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 459 const JsValueList& params); | 487 const JsValueList& params); |
| 460 FilterPtr GetWhitelistingFilter(const std::string& url, | 488 FilterPtr GetWhitelistingFilter(const std::string& url, |
| 461 ContentTypeMask contentTypeMask, const std::string& documentUrl) const; | 489 ContentTypeMask contentTypeMask, const std::string& documentUrl) const; |
| 462 FilterPtr GetWhitelistingFilter(const std::string& url, | 490 FilterPtr GetWhitelistingFilter(const std::string& url, |
| 463 ContentTypeMask contentTypeMask, | 491 ContentTypeMask contentTypeMask, |
| 464 const std::vector<std::string>& documentUrls) const; | 492 const std::vector<std::string>& documentUrls) const; |
| 465 }; | 493 }; |
| 466 } | 494 } |
| 467 | 495 |
| 468 #endif | 496 #endif |
| OLD | NEW |