Index: src/FilterEngine.cpp |
=================================================================== |
--- a/src/FilterEngine.cpp |
+++ b/src/FilterEngine.cpp |
@@ -328,17 +328,17 @@ |
return jsEngine->Evaluate("API.isAASubscriptionEnabled()")->AsBool(); |
} |
std::string FilterEngine::GetAAUrl() const |
{ |
return GetPref("subscriptions_exceptionsurl")->AsString(); |
} |
-void FilterEngine::ShowNextNotification(const std::string& url) |
+void FilterEngine::ShowNextNotification(const std::string& url) const |
{ |
JsValuePtr func = jsEngine->Evaluate("API.showNextNotification"); |
JsConstValueList params; |
if (!url.empty()) |
{ |
params.push_back(jsEngine->NewValue(url)); |
} |
func->Call(params); |
@@ -457,17 +457,17 @@ |
} |
void FilterEngine::RemoveUpdateAvailableCallback() |
{ |
jsEngine->RemoveEventCallback("updateAvailable"); |
} |
void FilterEngine::UpdateAvailable( |
- FilterEngine::UpdateAvailableCallback callback, JsValueList& params) |
+ FilterEngine::UpdateAvailableCallback callback, JsValueList& params) const |
{ |
if (params.size() >= 1 && !params[0]->IsNull()) |
callback(params[0]->AsString()); |
} |
void FilterEngine::ForceUpdateCheck( |
const FilterEngine::UpdateCheckDoneCallback& callback) |
{ |
@@ -511,25 +511,25 @@ |
std::unique_ptr<std::string> FilterEngine::GetAllowedConnectionType() const |
{ |
auto prefValue = GetPref("allowed_connection_type"); |
if (prefValue->AsString().empty()) |
return nullptr; |
return std::unique_ptr<std::string>(new std::string(prefValue->AsString())); |
} |
-void FilterEngine::FilterChanged(FilterEngine::FilterChangeCallback callback, JsValueList& params) |
+void FilterEngine::FilterChanged(FilterEngine::FilterChangeCallback callback, JsValueList& params) const |
{ |
std::string action(params.size() >= 1 && !params[0]->IsNull() ? params[0]->AsString() : ""); |
JsValuePtr item(params.size() >= 2 ? params[1] : jsEngine->NewValue(false)); |
callback(action, item); |
} |
void FilterEngine::ShowNotification(const ShowNotificationCallback& callback, |
- const JsValueList& params) |
+ const JsValueList& params) const |
{ |
if (params.size() < 1) |
return; |
if (!params[0]->IsObject()) |
{ |
return; |
} |