diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-05-24 17:47:27 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-05-28 16:30:49 +0300 |
commit | cc26ef17d52367a768a134140c6c95cb2b880733 (patch) | |
tree | e61b3b464273b7950ee0d74b8a7e39bcc845ed93 /include | |
parent | 2f97a2660ada44cd18f2e02b4de4eb42cfcb07b1 (diff) | |
download | qtlocation-mapboxgl-cc26ef17d52367a768a134140c6c95cb2b880733.tar.gz |
[core] Introduce usage tag for resources
Make the distinction if a resource is being requested for offline
usage or if it will be used immediately.
Fixes #14746
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/storage/resource.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/storage/resource.hpp b/include/mbgl/storage/resource.hpp index 97b9fbcaf0..d828877e10 100644 --- a/include/mbgl/storage/resource.hpp +++ b/include/mbgl/storage/resource.hpp @@ -29,6 +29,11 @@ public: Low }; + enum class Usage : bool { + Online, + Offline + }; + struct TileData { std::string urlTemplate; uint8_t pixelRatio; @@ -60,6 +65,7 @@ public: } void setPriority(Priority p) { priority = p; } + void setUsage(Usage u) { usage = u; } bool hasLoadingMethod(LoadingMethod method); @@ -83,6 +89,7 @@ public: Kind kind; LoadingMethod loadingMethod; + Usage usage{ Usage::Online }; Priority priority; std::string url; |