summaryrefslogtreecommitdiff
path: root/src/mbgl/storage/http_request.hpp
blob: faf6ee2f1c20c3516fac3a20fdce4d3af629b984 (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
#ifndef MBGL_STORAGE_DEFAULT_HTTP_REQUEST
#define MBGL_STORAGE_DEFAULT_HTTP_REQUEST

#include "request_base.hpp"

namespace mbgl {

struct Resource;

class HTTPRequest : public RequestBase {
public:
    HTTPRequest(const Resource&, Callback);

    void start(uv_loop_t *loop, std::shared_ptr<const Response> response = nullptr);
    void cancel();

    void retryImmediately();

private:
    ~HTTPRequest();
    void *ptr = nullptr;

    friend class HTTPRequestImpl;
};

}

#endif