diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-13 17:10:13 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-10 15:40:20 -0800 |
commit | dbb8e58aea00a84716aafa6887b50c0186169f9e (patch) | |
tree | e981b82badcf800d6d33acac94d44a78f7b57776 /include/mbgl/storage/default_file_source.hpp | |
parent | f3d4107d19eef20cc2cf30cd347301128b4f9a86 (diff) | |
download | qtlocation-mapboxgl-dbb8e58aea00a84716aafa6887b50c0186169f9e.tar.gz |
[core] Moving caching logic to DefaultFileSource
This results in OnlineFileSource containing precisely the logic we want for reuse by OfflineFileSource, and no more.
Diffstat (limited to 'include/mbgl/storage/default_file_source.hpp')
-rw-r--r-- | include/mbgl/storage/default_file_source.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index bedea25bef..e7f95aa238 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -5,6 +5,8 @@ namespace mbgl { +class SQLiteCache; + class DefaultFileSource : public FileSource { public: DefaultFileSource(const std::string& cachePath, const std::string& assetRoot); @@ -18,8 +20,13 @@ public: std::unique_ptr<FileRequest> request(const Resource&, Callback) override; + // For testing purposes only. + SQLiteCache& getCache(); + private: class Impl; + friend class DefaultFileRequest; + const std::unique_ptr<Impl> impl; }; |