summaryrefslogtreecommitdiff
path: root/include/mbgl/storage/file_source.hpp
blob: accdc3c49924d79e70442a3b38eff6db52d81978 (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
#ifndef MBGL_STORAGE_FILE_SOURCE
#define MBGL_STORAGE_FILE_SOURCE

#include <mbgl/util/noncopyable.hpp>
#include <mbgl/storage/resource_type.hpp>
#include <mbgl/storage/request.hpp>

#include <string>
#include <functional>

typedef struct uv_loop_s uv_loop_t;


namespace mbgl {

class FileSource : public util::noncopyable {
public:
    virtual ~FileSource() = default;
    virtual void setLoop(uv_loop_t*) = 0;
    virtual bool hasLoop() = 0;
    virtual void setBase(const std::string &value) = 0;
    virtual std::unique_ptr<Request> request(ResourceType type, const std::string &url) = 0;
    virtual void prepare(std::function<void()> fn) = 0;
    virtual void retryAllPending() = 0;
};

}

#endif