diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-11 17:20:07 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-14 13:46:03 -0800 |
commit | 7fb5e973edbf546046defb67dd28f1275326319b (patch) | |
tree | 39240ab154af6919e15e6b1ebf52ed44f6cd6b99 /include/mbgl | |
parent | f9574e350c9634b5a4f9849fdfe66fbd84747b12 (diff) | |
download | qtlocation-mapboxgl-7fb5e973edbf546046defb67dd28f1275326319b.tar.gz |
[core] Eliminate FileCache interface
There is only one implementation and we're unlikely to add more.
Diffstat (limited to 'include/mbgl')
-rw-r--r-- | include/mbgl/storage/file_cache.hpp | 28 | ||||
-rw-r--r-- | include/mbgl/storage/online_file_source.hpp | 5 |
2 files changed, 3 insertions, 30 deletions
diff --git a/include/mbgl/storage/file_cache.hpp b/include/mbgl/storage/file_cache.hpp deleted file mode 100644 index 65d6dfbff0..0000000000 --- a/include/mbgl/storage/file_cache.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef MBGL_STORAGE_FILE_CACHE -#define MBGL_STORAGE_FILE_CACHE - -#include <mbgl/util/noncopyable.hpp> - -#include <functional> -#include <memory> - -namespace mbgl { - -struct Resource; -class Response; -class WorkRequest; - -class FileCache : private util::noncopyable { -public: - virtual ~FileCache() = default; - - enum class Hint : bool { Full, Refresh }; - using Callback = std::function<void(std::unique_ptr<Response>)>; - - virtual std::unique_ptr<WorkRequest> get(const Resource &resource, Callback callback) = 0; - virtual void put(const Resource &resource, std::shared_ptr<const Response> response, Hint hint) = 0; -}; - -} // namespace mbgl - -#endif diff --git a/include/mbgl/storage/online_file_source.hpp b/include/mbgl/storage/online_file_source.hpp index e5253bc3fe..bdf14c7b34 100644 --- a/include/mbgl/storage/online_file_source.hpp +++ b/include/mbgl/storage/online_file_source.hpp @@ -2,17 +2,18 @@ #define MBGL_STORAGE_ONLINE_FILE_SOURCE #include <mbgl/storage/file_source.hpp> -#include <mbgl/storage/file_cache.hpp> namespace mbgl { +class SQLiteCache; + namespace util { template <typename T> class Thread; } // namespace util class OnlineFileSource : public FileSource { public: - OnlineFileSource(FileCache*); + OnlineFileSource(SQLiteCache*); ~OnlineFileSource() override; void setAccessToken(const std::string& t) { accessToken = t; } |