Index: include/AdblockPlus/Platform.h |
diff --git a/include/AdblockPlus/Platform.h b/include/AdblockPlus/Platform.h |
index 0b85dec8e8661e968fda41aa68c3dc0345f95e39..e32470b0094548def61bfd02193cb849f8b5c81c 100644 |
--- a/include/AdblockPlus/Platform.h |
+++ b/include/AdblockPlus/Platform.h |
@@ -30,7 +30,7 @@ |
namespace AdblockPlus |
{ |
- class IV8IsolateProvider; |
+ struct IV8IsolateProvider; |
class JsEngine; |
/** |
@@ -107,31 +107,24 @@ namespace AdblockPlus |
*/ |
FilterEngine& GetFilterEngine(); |
- /** |
- * @return The asynchronous ITimer implementation. |
- */ |
- ITimer& GetTimer(); |
+ typedef std::function<void(ITimer&)> WithTimerCallback; |
+ virtual void WithTimer(const WithTimerCallback&); |
- /** |
- * @return The asynchronous IFileSystem implementation. |
- */ |
- IFileSystem& GetFileSystem(); |
+ typedef std::function<void(IFileSystem&)> WithFileSystemCallback; |
+ virtual void WithFileSystem(const WithFileSystemCallback&); |
- /** |
- * @return The asynchronous IWebRequest implementation. |
- */ |
- IWebRequest& GetWebRequest(); |
+ typedef std::function<void(IWebRequest&)> WithWebRequestCallback; |
+ virtual void WithWebRequest(const WithWebRequestCallback&); |
- /** |
- * @return The LogSystem implementation. |
- */ |
- LogSystem& GetLogSystem(); |
+ typedef std::function<void(LogSystem&)> WithLogSystemCallback; |
+ virtual void WithLogSystem(const WithLogSystemCallback&); |
- private: |
+ protected: |
LogSystemPtr logSystem; |
TimerPtr timer; |
FileSystemPtr fileSystem; |
WebRequestPtr webRequest; |
+ private: |
// used for creation and deletion of modules. |
std::mutex modulesMutex; |
std::shared_ptr<JsEngine> jsEngine; |