summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2017-02-24 15:08:49 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-02-25 14:03:38 +0200
commit4c2e720b1522d2a45980ac8dcf34d2a3783cf426 (patch)
tree991b4c938ff943fd950d83b4d78e9ff1fac27d4e /platform
parentbc5e9afd0d9332433c3356064352b54cfbf5aee5 (diff)
downloadqtlocation-mapboxgl-4c2e720b1522d2a45980ac8dcf34d2a3783cf426.tar.gz
[core] Add a pause/resume API to the DefaultFileSource
It will halt the networking thread completely. Expired and error'ed tiles won't get re-requested until resume() is called again.
Diffstat (limited to 'platform')
-rw-r--r--platform/default/default_file_source.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/default/default_file_source.cpp b/platform/default/default_file_source.cpp
index 3742414f3d..46178dbb8a 100644
--- a/platform/default/default_file_source.cpp
+++ b/platform/default/default_file_source.cpp
@@ -261,6 +261,14 @@ void DefaultFileSource::setOfflineMapboxTileCountLimit(uint64_t limit) const {
thread->invokeSync(&Impl::setOfflineMapboxTileCountLimit, limit);
}
+void DefaultFileSource::pause() {
+ thread->pause();
+}
+
+void DefaultFileSource::resume() {
+ thread->resume();
+}
+
// For testing only:
void DefaultFileSource::put(const Resource& resource, const Response& response) {