summaryrefslogtreecommitdiff
path: root/src/mbgl/storage
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-06-13 18:56:35 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-06-25 20:10:21 +0300
commit1a9e07e4ed930f33a28d0eac800bccaa2a84570e (patch)
treeda680c8cb603e4427c42ac90ad54480011ffeec2 /src/mbgl/storage
parent8367c2ed5c32eae1364e5fc27e734631cf69aae3 (diff)
downloadqtlocation-mapboxgl-1a9e07e4ed930f33a28d0eac800bccaa2a84570e.tar.gz
[core] DefaultFileSource dynamic support for cache-only requests
Diffstat (limited to 'src/mbgl/storage')
-rw-r--r--src/mbgl/storage/resource_options.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mbgl/storage/resource_options.cpp b/src/mbgl/storage/resource_options.cpp
index c56a22540b..21ecca979a 100644
--- a/src/mbgl/storage/resource_options.cpp
+++ b/src/mbgl/storage/resource_options.cpp
@@ -10,6 +10,7 @@ public:
std::string cachePath = ":memory:";
std::string assetPath = ".";
uint64_t maximumSize = mbgl::util::DEFAULT_MAX_CACHE_SIZE;
+ bool supportCacheOnlyRequests = true;
void* platformContext = nullptr;
};
@@ -68,6 +69,15 @@ uint64_t ResourceOptions::maximumCacheSize() const {
return impl_->maximumSize;
}
+ResourceOptions& ResourceOptions::withCacheOnlyRequestsSupport(bool supportCacheOnlyRequests) {
+ impl_->supportCacheOnlyRequests = supportCacheOnlyRequests;
+ return *this;
+}
+
+bool ResourceOptions::supportsCacheOnlyRequests() const {
+ return impl_->supportCacheOnlyRequests;
+}
+
ResourceOptions& ResourceOptions::withPlatformContext(void* context) {
impl_->platformContext = context;
return *this;