 Issue 5653480979038208:
  Issue 2325 - Add a way to set settings in libadblockplus for FRP and automatic updates  (Closed)
    
  
    Issue 5653480979038208:
  Issue 2325 - Add a way to set settings in libadblockplus for FRP and automatic updates  (Closed) 
  | 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 /** | 179 /** | 
| 180 * Callback type invoked when the filters change. | 180 * Callback type invoked when the filters change. | 
| 181 * The first parameter is the action event code (see | 181 * The first parameter is the action event code (see | 
| 182 * [FilterNotifier.triggerListeners](https://adblockplus.org/jsdoc/adblockpl us/symbols/FilterNotifier.html#.triggerListeners) | 182 * [FilterNotifier.triggerListeners](https://adblockplus.org/jsdoc/adblockpl us/symbols/FilterNotifier.html#.triggerListeners) | 
| 183 * for the full list). | 183 * for the full list). | 
| 184 * The second parameter is the filter/subscription object affected, if any. | 184 * The second parameter is the filter/subscription object affected, if any. | 
| 185 */ | 185 */ | 
| 186 typedef std::tr1::function<void(const std::string&, const JsValuePtr)> Filte rChangeCallback; | 186 typedef std::tr1::function<void(const std::string&, const JsValuePtr)> Filte rChangeCallback; | 
| 187 | 187 | 
| 188 /** | 188 /** | 
| 189 * Constructor. | 189 * Constructor. Allows overloading the prefs | 
| 
Felix Dahlke
2015/06/09 19:40:51
Nit: Kind of redundant with the parameter descript
 | |
| 190 * @param jsEngine `JsEngine` instance used to run JavaScript code | 190 * @param jsEngine `JsEngine` instance used to run JavaScript code | 
| 191 * internally. | 191 * internally. | 
| 192 * @param preconfiguredPrefs `std::map<std::string, std::string>` name-value list of preconfigured Prefs | |
| 
Felix Dahlke
2015/06/09 19:40:51
Nit: 80 columns? We usually manage to stick to tha
 | |
| 192 */ | 193 */ | 
| 193 explicit FilterEngine(JsEnginePtr jsEngine); | 194 explicit FilterEngine(JsEnginePtr jsEngine, std::map<std::string, std::strin g> preconfiguredPrefs = std::map<std::string, std::string>()); | 
| 
Felix Dahlke
2015/06/09 19:40:51
Nit: Put preconfiguredPrefs on its own line? Proba
 | |
| 194 | 195 | 
| 195 /** | 196 /** | 
| 196 * Retrieves the `JsEngine` instance associated with this `FilterEngine` | 197 * Retrieves the `JsEngine` instance associated with this `FilterEngine` | 
| 197 * instance. | 198 * instance. | 
| 198 */ | 199 */ | 
| 199 JsEnginePtr GetJsEngine() const { return jsEngine; } | 200 JsEnginePtr GetJsEngine() const { return jsEngine; } | 
| 200 | 201 | 
| 201 /** | 202 /** | 
| 202 * Checks if this is the first run of the application. | 203 * Checks if this is the first run of the application. | 
| 203 * @return `true` if the application is running for the first time. | 204 * @return `true` if the application is running for the first time. | 
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 383 ContentType contentType, | 384 ContentType contentType, | 
| 384 const std::string& documentUrl) const; | 385 const std::string& documentUrl) const; | 
| 385 void UpdateAvailable(UpdateAvailableCallback callback, JsValueList& params); | 386 void UpdateAvailable(UpdateAvailableCallback callback, JsValueList& params); | 
| 386 void UpdateCheckDone(const std::string& eventName, | 387 void UpdateCheckDone(const std::string& eventName, | 
| 387 UpdateCheckDoneCallback callback, JsValueList& params); | 388 UpdateCheckDoneCallback callback, JsValueList& params); | 
| 388 void FilterChanged(FilterChangeCallback callback, JsValueList& params); | 389 void FilterChanged(FilterChangeCallback callback, JsValueList& params); | 
| 389 }; | 390 }; | 
| 390 } | 391 } | 
| 391 | 392 | 
| 392 #endif | 393 #endif | 
| OLD | NEW |