diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/android/native_map_view.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/storage/sqlite_cache.hpp | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/mbgl/android/native_map_view.hpp b/include/mbgl/android/native_map_view.hpp index d5606ae37f..4033c628b0 100644 --- a/include/mbgl/android/native_map_view.hpp +++ b/include/mbgl/android/native_map_view.hpp @@ -90,7 +90,7 @@ private: size_t totalMemory = 0; // Ensure these are initialised last - mbgl::SQLiteCache fileCache; + std::shared_ptr<mbgl::SQLiteCache> fileCache; mbgl::DefaultFileSource fileSource; mbgl::Map map; diff --git a/include/mbgl/storage/sqlite_cache.hpp b/include/mbgl/storage/sqlite_cache.hpp index 65328652f4..3054b6c73c 100644 --- a/include/mbgl/storage/sqlite_cache.hpp +++ b/include/mbgl/storage/sqlite_cache.hpp @@ -26,6 +26,16 @@ private: const std::unique_ptr<util::Thread<Impl>> thread; }; +class SharedSQLiteCache : util::noncopyable { +public: + static std::shared_ptr<SQLiteCache> get(const std::string &path = ":memory:"); + +private: + SharedSQLiteCache() {} + + static std::weak_ptr<SQLiteCache> masterPtr; +}; + } #endif |