#pragma once #include #include #include typedef std::function DownloadProgressHandler; void installDownloadProgressHandler(DownloadProgressHandler handler); namespace PyDownloader { // Downloads url to local cache, returns local file path. Reports progress via installDownloadProgressHandler. std::string download(const std::string &url, bool use_cache = true, std::atomic *abort = nullptr); // Returns JSON string of route files (same format as /v1/route/.../files API) std::string getRouteFiles(const std::string &route); // Returns JSON string of user's devices std::string getDevices(); // Returns JSON string of device routes std::string getDeviceRoutes(const std::string &dongle_id, int64_t start_ms = 0, int64_t end_ms = 0, bool preserved = false); } // namespace PyDownloader