[core] Introduce the ResourceTransform

Wrapper for transforming URLs on the OnlineFileSource.
This commit is contained in:
Thiago Marcos P. Santos
2017-06-21 17:32:41 +03:00
parent 54c3ccc37d
commit 6beccef517
3 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
#include <mbgl/storage/resource_transform.hpp>
namespace mbgl {
ResourceTransform::ResourceTransform(ActorRef<ResourceTransform>, TransformCallback&& callback)
: transformCallback(std::move(callback)) {
}
void ResourceTransform::transform(Resource::Kind kind, const std::string&& url, FinishedCallback&& finished) {
finished(transformCallback(kind, std::move(url)));
}
} // namespace mbgl