[core] Move setResourceTransform() to FileSource interface
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user