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();