summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-01-26 12:19:04 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-02-10 15:40:20 -0800
commitcdedb66387065680efd318dacb61572c920b81b1 (patch)
tree3cc2676e15fac4c7b024cd17603c46e341f5a589 /include
parent025375ad0b365a06e0742b92fecc9bc538b5a6e0 (diff)
downloadqtlocation-mapboxgl-cdedb66387065680efd318dacb61572c920b81b1.tar.gz
[core] Reimplement existing caching within an offline-capable database schema
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/storage/default_file_source.hpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp
index e7f95aa238..d8fc4b98a3 100644
--- a/include/mbgl/storage/default_file_source.hpp
+++ b/include/mbgl/storage/default_file_source.hpp
@@ -5,7 +5,9 @@
namespace mbgl {
-class SQLiteCache;
+namespace util {
+template <typename T> class Thread;
+} // namespace util
class DefaultFileSource : public FileSource {
public:
@@ -20,14 +22,15 @@ public:
std::unique_ptr<FileRequest> request(const Resource&, Callback) override;
- // For testing purposes only.
- SQLiteCache& getCache();
+ // For testing only.
+ void put(const Resource&, const Response&);
+ void goOffline();
-private:
class Impl;
- friend class DefaultFileRequest;
- const std::unique_ptr<Impl> impl;
+private:
+ const std::unique_ptr<util::Thread<Impl>> thread;
+ const std::unique_ptr<FileSource> assetFileSource;
};
} // namespace mbgl