summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-02-26 17:19:36 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-02-26 22:31:59 +0200
commit353d07f40ff62fea11d0faaba364f0b3e5f4dd40 (patch)
treef0c06ce402f2cc0d477b1d9b907c58d76170640c
parentaad13f6a3f998dc5b699b9e09484ca63bb5be6f1 (diff)
downloadqtlocation-mapboxgl-353d07f40ff62fea11d0faaba364f0b3e5f4dd40.tar.gz
[core] Move setResourceTransform() to FileSource interface
-rw-r--r--include/mbgl/storage/file_source.hpp4
-rw-r--r--include/mbgl/storage/online_file_source.hpp7
2 files changed, 5 insertions, 6 deletions
diff --git a/include/mbgl/storage/file_source.hpp b/include/mbgl/storage/file_source.hpp
index baf3fabcfa..43143c640f 100644
--- a/include/mbgl/storage/file_source.hpp
+++ b/include/mbgl/storage/file_source.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include <mbgl/storage/resource_transform.hpp>
#include <mbgl/storage/response.hpp>
#include <mapbox/value.hpp>
@@ -80,6 +81,9 @@ public:
virtual void setProperty(const std::string&, const mapbox::base::Value&){};
virtual mapbox::base::Value getProperty(const std::string&) const { return {}; };
+ // When supported, sets the modifier of the requested resources.
+ virtual void setResourceTransform(ResourceTransform) {}
+
protected:
FileSource() = default;
};
diff --git a/include/mbgl/storage/online_file_source.hpp b/include/mbgl/storage/online_file_source.hpp
index 3c61f20d2e..bb7adbb5d5 100644
--- a/include/mbgl/storage/online_file_source.hpp
+++ b/include/mbgl/storage/online_file_source.hpp
@@ -5,8 +5,6 @@
namespace mbgl {
-class ResourceTransform;
-
class OnlineFileSource : public FileSource {
public:
OnlineFileSource();
@@ -19,10 +17,7 @@ public:
void resume() override;
void setProperty(const std::string&, const mapbox::base::Value&) override;
mapbox::base::Value getProperty(const std::string&) const override;
-
- // OnlineFileSource interface.
- // TODO: Would be nice to drop it to get uniform interface.
- virtual void setResourceTransform(ResourceTransform);
+ void setResourceTransform(ResourceTransform) override;
private:
class Impl;