From 9ef65440b6bfd2c8da17d2613f8c967682cc0ef9 Mon Sep 17 00:00:00 2001 From: Tobrun Date: Thu, 15 Sep 2016 22:01:09 -0700 Subject: [core] [android] - public api configurable base endpoint (#6309) add runloop to test --- include/mbgl/storage/default_file_source.hpp | 3 +++ include/mbgl/storage/online_file_source.hpp | 5 +++++ 2 files changed, 8 insertions(+) (limited to 'include/mbgl/storage') diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index 235e738254..ab9c2bc6a0 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -29,6 +29,9 @@ public: bool supportsOptionalRequests() const override { return true; } + + void setAPIBaseURL(const std::string&); + std::string getAPIBaseURL() const; void setAccessToken(const std::string&); std::string getAccessToken() const; diff --git a/include/mbgl/storage/online_file_source.hpp b/include/mbgl/storage/online_file_source.hpp index 081beeeabc..9c7feceb47 100644 --- a/include/mbgl/storage/online_file_source.hpp +++ b/include/mbgl/storage/online_file_source.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include namespace mbgl { @@ -9,6 +10,9 @@ public: OnlineFileSource(); ~OnlineFileSource() override; + void setAPIBaseURL(const std::string& t) { apiBaseURL = t; } + std::string getAPIBaseURL() const { return apiBaseURL; } + void setAccessToken(const std::string& t) { accessToken = t; } std::string getAccessToken() const { return accessToken; } @@ -20,6 +24,7 @@ private: class Impl; const std::unique_ptr impl; std::string accessToken; + std::string apiBaseURL = mbgl::util::API_BASE_URL; }; } // namespace mbgl -- cgit v1.2.1