diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-03-23 17:31:14 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-03-24 10:54:32 -0700 |
commit | 169755e89a72b103fab100ccd101013e8eef1481 (patch) | |
tree | 5716e13519fe2b7f5c91cccbdbf14635a1ef117d /include/mbgl/storage | |
parent | 7ff074889e826f766028ba582beb677b39d16bec (diff) | |
download | qtlocation-mapboxgl-169755e89a72b103fab100ccd101013e8eef1481.tar.gz |
[core] Unify FileRequest and WorkRequest
Diffstat (limited to 'include/mbgl/storage')
-rw-r--r-- | include/mbgl/storage/default_file_source.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/storage/file_source.hpp | 10 | ||||
-rw-r--r-- | include/mbgl/storage/online_file_source.hpp | 2 |
3 files changed, 5 insertions, 9 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index dd67cff9b8..76d60fce70 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -30,7 +30,7 @@ public: void setAccessToken(const std::string&); std::string getAccessToken() const; - std::unique_ptr<FileRequest> request(const Resource&, Callback) override; + std::unique_ptr<AsyncRequest> request(const Resource&, Callback) override; /* * Retrieve all regions in the offline database. diff --git a/include/mbgl/storage/file_source.hpp b/include/mbgl/storage/file_source.hpp index 8d08315cd9..e572776af2 100644 --- a/include/mbgl/storage/file_source.hpp +++ b/include/mbgl/storage/file_source.hpp @@ -5,17 +5,13 @@ #include <mbgl/storage/resource.hpp> #include <mbgl/util/noncopyable.hpp> +#include <mbgl/util/async_request.hpp> #include <functional> #include <memory> namespace mbgl { -class FileRequest : private util::noncopyable { -public: - virtual ~FileRequest() = default; -}; - class FileSource : private util::noncopyable { public: virtual ~FileSource() = default; @@ -24,10 +20,10 @@ public: // Request a resource. The callback will be called asynchronously, in the same // thread as the request was made. This thread must have an active RunLoop. The - // request may be cancelled before completion by releasing the returned FileRequest. + // request may be cancelled before completion by releasing the returned AsyncRequest. // If the request is cancelled before the callback is executed, the callback will // not be executed. - virtual std::unique_ptr<FileRequest> request(const Resource&, Callback) = 0; + virtual std::unique_ptr<AsyncRequest> request(const Resource&, Callback) = 0; }; } // namespace mbgl diff --git a/include/mbgl/storage/online_file_source.hpp b/include/mbgl/storage/online_file_source.hpp index aceb141fb4..b52dce35f0 100644 --- a/include/mbgl/storage/online_file_source.hpp +++ b/include/mbgl/storage/online_file_source.hpp @@ -17,7 +17,7 @@ public: void setAccessToken(const std::string& t) { accessToken = t; } std::string getAccessToken() const { return accessToken; } - std::unique_ptr<FileRequest> request(const Resource&, Callback) override; + std::unique_ptr<AsyncRequest> request(const Resource&, Callback) override; private: friend class OnlineFileRequestImpl; |