summaryrefslogtreecommitdiff
path: root/include/mbgl/storage/http_request.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/storage/http_request.hpp')
-rw-r--r--include/mbgl/storage/http_request.hpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/mbgl/storage/http_request.hpp b/include/mbgl/storage/http_request.hpp
new file mode 100644
index 0000000000..30f7b3aa6d
--- /dev/null
+++ b/include/mbgl/storage/http_request.hpp
@@ -0,0 +1,38 @@
+#ifndef MBGL_STORAGE_HTTP_REQUEST
+#define MBGL_STORAGE_HTTP_REQUEST
+
+#include <mbgl/storage/resource_type.hpp>
+#include <mbgl/storage/base_request.hpp>
+
+#include <string>
+#include <memory>
+#include <cassert>
+
+typedef struct uv_loop_s uv_loop_t;
+
+namespace mbgl {
+
+struct CacheRequestBaton;
+struct HTTPRequestBaton;
+struct CacheEntry;
+class SQLiteStore;
+
+class HTTPRequest : public BaseRequest {
+public:
+ HTTPRequest(ResourceType type, const std::string &path, uv_loop_t *loop, std::shared_ptr<SQLiteStore> store);
+ ~HTTPRequest();
+
+private:
+ void loadedCacheEntry(std::unique_ptr<Response> &&response);
+
+private:
+ const unsigned long thread_id;
+ CacheRequestBaton *cache_baton = nullptr;
+ HTTPRequestBaton *http_baton = nullptr;
+ std::shared_ptr<SQLiteStore> store;
+ const ResourceType type;
+};
+
+}
+
+#endif \ No newline at end of file