Index: include/AdblockPlus/FilterEngine.h |
=================================================================== |
--- a/include/AdblockPlus/FilterEngine.h |
+++ b/include/AdblockPlus/FilterEngine.h |
@@ -69,6 +69,7 @@ |
{ |
public: |
typedef std::tr1::function<void(const std::string&)> UpdaterCallback; |
+ typedef std::tr1::function<void(const std::string&, const std::string&, const int64_t)> FilterChangeCallback; |
Wladimir Palant
2013/06/18 15:02:15
int64_t doesn't need to be const.
Felix Dahlke
2013/06/19 10:28:38
It's a matter of taste here. I like to const every
Wladimir Palant
2013/06/19 11:27:09
This essentially disallows the callback to change
Felix Dahlke
2013/06/19 11:35:34
That's the trouble with const parameters, have to
|
explicit FilterEngine(JsEnginePtr jsEngine); |
JsEnginePtr GetJsEngine() const { return jsEngine; } |
@@ -85,6 +86,7 @@ |
JsValuePtr GetPref(const std::string& pref) const; |
void SetPref(const std::string& pref, JsValuePtr value); |
void ForceUpdateCheck(UpdaterCallback callback = 0); |
+ void SetFilterChangeCallback(FilterChangeCallback callback = 0); |
Wladimir Palant
2013/06/18 15:02:15
Having a default for the callback makes no sense -
|
private: |
JsEnginePtr jsEngine; |
@@ -94,6 +96,7 @@ |
void InitDone(JsValueList& params); |
void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback, JsValueList& params); |
+ void FilterChanged(const std::string& eventName, FilterChangeCallback callback, JsValueList& params); |
}; |
} |