diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2019-11-20 11:37:41 +0200 |
---|---|---|
committer | Juha Alanen <juha.alanen@mapbox.com> | 2019-11-21 14:39:47 +0200 |
commit | 69d980cdc1acf590b59c45861b6e9321271caed6 (patch) | |
tree | 0e95faed6539f87c68d590037dfcbf5123868e32 | |
parent | 451e6d40fa81aa1dff5241e4a5c482ea1dff85f4 (diff) | |
download | qtlocation-mapboxgl-69d980cdc1acf590b59c45861b6e9321271caed6.tar.gz |
[core] Add new method to DefaultFileSource
Add setMaximumConcurrentRequests() method for setting it on the
OnlineFileSource.
-rw-r--r-- | include/mbgl/storage/default_file_source.hpp | 1 | ||||
-rw-r--r-- | platform/default/src/mbgl/storage/default_file_source.cpp | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index 8fc8ed50df..88f318581b 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -245,6 +245,7 @@ public: // For testing only. void setOnlineStatus(bool); + void setMaximumConcurrentRequests(uint32_t); class Impl; diff --git a/platform/default/src/mbgl/storage/default_file_source.cpp b/platform/default/src/mbgl/storage/default_file_source.cpp index 3982f3dbc7..da74b0e0ad 100644 --- a/platform/default/src/mbgl/storage/default_file_source.cpp +++ b/platform/default/src/mbgl/storage/default_file_source.cpp @@ -180,6 +180,10 @@ public: onlineFileSource.setOnlineStatus(status); } + void setMaximumConcurrentRequests(uint32_t maximumConcurrentRequests_) { + onlineFileSource.setMaximumConcurrentRequests(maximumConcurrentRequests_); + } + void put(const Resource& resource, const Response& response) { offlineDatabase->put(resource, response); } @@ -375,4 +379,8 @@ void DefaultFileSource::setOnlineStatus(const bool status) { impl->actor().invoke(&Impl::setOnlineStatus, status); } +void DefaultFileSource::setMaximumConcurrentRequests(uint32_t maximumConcurrentRequests_) { + impl->actor().invoke(&Impl::setMaximumConcurrentRequests, maximumConcurrentRequests_); +} + } // namespace mbgl |