From 04c855bd649ce8589c81d653455e8b1e3e5900b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Thu, 30 Jan 2014 16:57:38 +0100 Subject: add request_http() function refs #23 --- include/llmr/platform/platform.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/llmr/platform/platform.hpp b/include/llmr/platform/platform.hpp index 75d491cb09..ae34dc7ba9 100644 --- a/include/llmr/platform/platform.hpp +++ b/include/llmr/platform/platform.hpp @@ -2,6 +2,8 @@ #define LLMR_PLATFORM_IOS #include +#include +#include namespace llmr { @@ -18,6 +20,19 @@ void restart(void *obj); // Then, call map.tileLoaded(tile); or map.tileFailed(tile); in the main thread. void request(void *obj, std::shared_ptr tile); + +struct Response { + Response(int16_t code, const char *body, size_t length) + : code(code), + body(body), + length(length) {} + int16_t code; + const char *body; + size_t length; +}; + +void request_http(std::string url, std::function func); + // Returns a relative timestamp in seconds. This value must be monotonic. double time(); -- cgit v1.2.1