blob: a0476d49bf6efc0adf0f7e4de7914aff94b34b19 (
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
35
|
#ifndef MBGL_STORAGE_REQUEST_BASE
#define MBGL_STORAGE_REQUEST_BASE
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/storage/file_cache.hpp>
#include <memory>
#include <functional>
#include <utility>
#include <string>
namespace mbgl {
class Response;
class RequestBase : private util::noncopyable {
public:
using Callback = std::function<void (std::shared_ptr<const Response> response)>;
RequestBase(const std::string& url_, Callback notify_)
: url(url_)
, notify(std::move(notify_)) {
}
virtual ~RequestBase() = default;
virtual void cancel() = 0;
protected:
std::string url;
Callback notify;
};
} // namespace mbgl
#endif // MBGL_STORAGE_REQUEST_BASE
|