diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-21 10:33:42 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-21 11:35:00 -0800 |
commit | 913f49c701781a4621c7f273d0ec937f9bf92697 (patch) | |
tree | 2a6b86618cc6c1675bdf0ab44c77a479c5c3c989 /include | |
parent | 49bfdd662ff37ac77cd702c2cef92d2de8874be9 (diff) | |
download | qtlocation-mapboxgl-913f49c701781a4621c7f273d0ec937f9bf92697.tar.gz |
[core] Prepare for OfflineFileSource
* Rename existing DefaultFileSource to OnlineFileSource
* Restore a DefaultFileSource that's a passthrough to OnlineFileSource
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/storage/default_file_source.hpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index e669cebf72..3689b9e932 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -1,32 +1,25 @@ -#ifndef MBGL_STORAGE_DEFAULT_DEFAULT_FILE_SOURCE -#define MBGL_STORAGE_DEFAULT_DEFAULT_FILE_SOURCE +#ifndef MBGL_STORAGE_DEFAULT_FILE_SOURCE +#define MBGL_STORAGE_DEFAULT_FILE_SOURCE #include <mbgl/storage/file_source.hpp> -#include <mbgl/storage/file_cache.hpp> namespace mbgl { -namespace util { -template <typename T> class Thread; -} // namespace util +class FileCache; class DefaultFileSource : public FileSource { public: - DefaultFileSource(FileCache *cache, const std::string &root = ""); + DefaultFileSource(FileCache*, const std::string& root = ""); ~DefaultFileSource() override; - void setAccessToken(const std::string& t) { accessToken = t; } - std::string getAccessToken() const { return accessToken; } + void setAccessToken(const std::string&); + std::string getAccessToken() const; std::unique_ptr<FileRequest> request(const Resource&, Callback) override; private: - friend class DefaultFileRequest; - void cancel(const Resource&, FileRequest*); - class Impl; - const std::unique_ptr<util::Thread<Impl>> thread; - std::string accessToken; + const std::unique_ptr<Impl> impl; }; } // namespace mbgl |