summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-12-04 12:09:27 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-12-04 15:26:54 -0800
commit36500b9f957dec5336cb080784e6099408cf6af8 (patch)
tree29e5d5363932f683674affe8e967227fa6c2f08d /include
parent16fe8e64c4d47ac35fa6dd594342d3a265af358b (diff)
downloadqtlocation-mapboxgl-36500b9f957dec5336cb080784e6099408cf6af8.tar.gz
Add CachingHTTPFileSource::clearLoop()
So loop state can be cleaned up in the appropriate thread. This is a hack; loop needs to be externalized from Map. Fixes #686
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/storage/caching_http_file_source.hpp1
-rw-r--r--include/mbgl/storage/file_source.hpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/storage/caching_http_file_source.hpp b/include/mbgl/storage/caching_http_file_source.hpp
index 403db31838..f566acf49e 100644
--- a/include/mbgl/storage/caching_http_file_source.hpp
+++ b/include/mbgl/storage/caching_http_file_source.hpp
@@ -21,6 +21,7 @@ public:
// Stores and checks the libuv loop for requests
void setLoop(uv_loop_t*);
bool hasLoop();
+ void clearLoop();
// Stores and retrieves the base path/URL for relative requests
void setBase(const std::string &value);
diff --git a/include/mbgl/storage/file_source.hpp b/include/mbgl/storage/file_source.hpp
index c8f6217877..69a0060f6a 100644
--- a/include/mbgl/storage/file_source.hpp
+++ b/include/mbgl/storage/file_source.hpp
@@ -16,8 +16,11 @@ namespace mbgl {
class FileSource : public util::noncopyable {
public:
virtual ~FileSource() = default;
+
virtual void setLoop(uv_loop_t*) = 0;
virtual bool hasLoop() = 0;
+ virtual void clearLoop() = 0;
+
virtual void setBase(const std::string &value) = 0;
virtual std::unique_ptr<Request> request(ResourceType type, const std::string &url) = 0;
virtual void prepare(std::function<void()> fn) = 0;