Index: include/AdblockPlus/JsEngine.h |
=================================================================== |
--- a/include/AdblockPlus/JsEngine.h |
+++ b/include/AdblockPlus/JsEngine.h |
@@ -217,30 +217,30 @@ |
* convert. |
* @return List of arguments converted to `JsValue` objects. |
*/ |
JsValueList ConvertArguments(const v8::Arguments& arguments); |
/** |
* @see `SetFileSystem()`. |
*/ |
- FileSystemPtr GetFileSystem(); |
+ FileSystemPtr GetFileSystem() const; |
/** |
* Sets the `FileSystem` implementation used for all file I/O. |
* Setting this is optional, the engine will use a `DefaultFileSystem` |
* instance by default, which might be sufficient. |
* @param The `FileSystem` instance to use. |
*/ |
void SetFileSystem(FileSystemPtr val); |
/** |
* @see `SetWebRequest()`. |
*/ |
- WebRequestPtr GetWebRequest(); |
+ WebRequestPtr GetWebRequest() const; |
/** |
* Sets the `WebRequest` implementation used for XMLHttpRequests. |
* Setting this is optional, the engine will use a `DefaultWebRequest` |
* instance by default, which might be sufficient. |
* @param The `WebRequest` instance to use. |
*/ |
void SetWebRequest(WebRequestPtr val); |
@@ -251,22 +251,22 @@ |
* @param callback callback function. |
*/ |
void SetIsConnectionAllowedCallback(const IsConnectionAllowedCallback& callback); |
/** |
* Checks whether current connection is allowed. If |
* IsConnectionAllowedCallback is not set then then it returns true. |
*/ |
- bool IsConnectionAllowed(); |
+ bool IsConnectionAllowed() const; |
/** |
* @see `SetLogSystem()`. |
*/ |
- LogSystemPtr GetLogSystem(); |
+ LogSystemPtr GetLogSystem() const; |
/** |
* Sets the `LogSystem` implementation used for logging (e.g. to handle |
* `console.log()` calls from JavaScript). |
* Setting this is optional, the engine will use a `DefaultLogSystem` |
* instance by default, which might be sufficient. |
* @param The `LogSystem` instance to use. |
*/ |
@@ -305,16 +305,16 @@ |
ScopedV8IsolatePtr isolate; |
FileSystemPtr fileSystem; |
WebRequestPtr webRequest; |
LogSystemPtr logSystem; |
std::unique_ptr<v8::Persistent<v8::Context>> context; |
EventMap eventCallbacks; |
std::mutex eventCallbacksMutex; |
- std::mutex isConnectionAllowedMutex; |
+ mutable std::mutex isConnectionAllowedMutex; |
IsConnectionAllowedCallback isConnectionAllowed; |
TimerTasks timerTasks; |
TimerPtr timer; |
}; |
} |
#endif |