blob: 8cfae03a964a70d2d18c3c9f04646c5e842a79c9 (
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
27
28
29
30
31
32
33
34
|
#ifndef MBGL_STORAGE_DEFAULT_DEFAULT_FILE_SOURCE
#define MBGL_STORAGE_DEFAULT_DEFAULT_FILE_SOURCE
#include <mbgl/storage/file_source.hpp>
#include <mbgl/storage/file_cache.hpp>
namespace mbgl {
namespace util {
template <typename T> class Thread;
}
class DefaultFileSource : public FileSource {
public:
DefaultFileSource(FileCache *cache, const std::string &root = "");
~DefaultFileSource() override;
void setAccessToken(const std::string& t) { accessToken = t; }
std::string getAccessToken() const { return accessToken; }
// FileSource API
Request* request(const Resource&, uv_loop_t*, Callback) override;
void cancel(Request*) override;
public:
class Impl;
private:
const std::unique_ptr<util::Thread<Impl>> thread;
std::string accessToken;
};
}
#endif
|