Files
MapLibreParticleLab/src/mbgl/storage/asset_file_source.hpp
John Firebaugh 86c8446d3a [core] Simplify asset:// implementation
* Move asset:// URL handling to DefaultFileSource.
* AssetFileSource implements FileSource interface and follows familiar implementation patterns.
* Move default implementation to platform/default, zip implementation to platform/android.
* Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter.
* Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit.
2016-01-13 13:40:31 -08:00

27 lines
567 B
C++

#ifndef MBGL_STORAGE_ASSET_FILE_SOURCE
#define MBGL_STORAGE_ASSET_FILE_SOURCE
#include <mbgl/storage/file_source.hpp>
namespace mbgl {
namespace util {
template <typename T> class Thread;
} // namespace util
class AssetFileSource : public FileSource {
public:
AssetFileSource(const std::string& assetRoot);
~AssetFileSource() override;
std::unique_ptr<FileRequest> request(const Resource&, Callback) override;
private:
class Impl;
std::unique_ptr<util::Thread<Impl>> thread;
};
} // namespace mbgl
#endif // MBGL_STORAGE_ASSET_FILE_SOURCE