[core] Move setResourceTransform() to FileSource interface

This commit is contained in:
Mikhail Pozdnyakov
2020-02-26 17:19:36 +02:00
parent aad13f6a3f
commit 353d07f40f
2 changed files with 5 additions and 6 deletions

View File

@@ -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;
};

View File

@@ -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;