summaryrefslogtreecommitdiff
path: root/src/mbgl/storage/asset_file_source.hpp
blob: f6c11c17689bf1b5642d3a1b9c2176bace0a029e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#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<AsyncRequest> request(const Resource&, Callback) override;

private:
    class Impl;
    std::unique_ptr<util::Thread<Impl>> thread;
};

} // namespace mbgl

#endif // MBGL_STORAGE_ASSET_FILE_SOURCE