From fded15dab041ae0bd9e6dd25c7cb9e1947f19eb0 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Wed, 19 Feb 2014 17:23:54 -0800 Subject: [PATCH] add tile-specific platform HTTP request --- include/llmr/platform/platform.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/llmr/platform/platform.hpp b/include/llmr/platform/platform.hpp index 41144fa63..68cbb33ef 100644 --- a/include/llmr/platform/platform.hpp +++ b/include/llmr/platform/platform.hpp @@ -12,6 +12,8 @@ namespace llmr { class Tile; +typedef std::shared_ptr tile_ptr; + namespace platform { // Restarts painting. This could for example trigger the event loop of the controlling application. @@ -25,6 +27,9 @@ struct Response { // Makes an HTTP request of a URL on a background thread, calls a function with the results on the same thread, and finally calls a callback function on the main thread. void request_http(std::string url, std::function background_function, std::function foreground_callback); +// Makes a tile-specific HTTP request of a URL on a background thread, calls a function with the results on the same thread, and finally calls a callback function on the main thread. Access to the tile object is provided via a shared pointer. +void request_http_tile(std::string tile_template_url, tile_ptr tile_object, std::function background_function, std::function foreground_callback); + // Returns a relative timestamp in seconds. This value must be monotonic. double time();