summaryrefslogtreecommitdiff
path: root/include/llmr/platform/platform.hpp
blob: f56e738ffacecfec22fa69d773f64036061a3f57 (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
29
30
31
32
33
34
35
#ifndef LLMR_PLATFORM_IOS
#define LLMR_PLATFORM_IOS

#include <memory>
#include <functional>
#include <string>

#define kTileURL "http://a.gl-api-us-east-1.tilestream.net/v3/mapbox.mapbox-streets-v4/%d/%d/%d.gl.pbf"
#define kSpriteURL "http://mapbox-kkaefer.s3.amazonaws.com/static/sprite"

namespace llmr {

class Tile;

namespace platform {

// Restarts painting. This could for example trigger the event loop of the
// controlling application.
void restart(void *obj);

struct Response {
    int16_t code = -1;
    std::string body;
};

void request_http(std::string url, std::function<void(Response&)> func, std::function<void()> cb);

// Returns a relative timestamp in seconds. This value must be monotonic.
double time();

}

}

#endif