summaryrefslogtreecommitdiff
path: root/include/mbgl/storage
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2016-09-15 22:01:09 -0700
committerGitHub <noreply@github.com>2016-09-15 22:01:09 -0700
commit9ef65440b6bfd2c8da17d2613f8c967682cc0ef9 (patch)
tree52b5508cae9fe76548b9efee15268d2da1543080 /include/mbgl/storage
parent217c43d1255f36c7ef2b588a90b6c19ca176dce2 (diff)
downloadqtlocation-mapboxgl-9ef65440b6bfd2c8da17d2613f8c967682cc0ef9.tar.gz
[core] [android] - public api configurable base endpoint (#6309)
add runloop to test
Diffstat (limited to 'include/mbgl/storage')
-rw-r--r--include/mbgl/storage/default_file_source.hpp3
-rw-r--r--include/mbgl/storage/online_file_source.hpp5
2 files changed, 8 insertions, 0 deletions
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 <mbgl/storage/file_source.hpp>
+#include <mbgl/util/constants.hpp>
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> impl;
std::string accessToken;
+ std::string apiBaseURL = mbgl::util::API_BASE_URL;
};
} // namespace mbgl