summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-12-04 17:03:23 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-12-04 17:03:23 -0800
commitff640132de0fe855314a8fd86adae3a2fb33237b (patch)
treef3a794ad1a68ad91626a48727cdde0146152316d /include
parent0a942b6f143373c30fdd2027ff75fdb3b0c71551 (diff)
downloadqtlocation-mapboxgl-ff640132de0fe855314a8fd86adae3a2fb33237b.tar.gz
Move setAccessToken to CachingHTTPFileSource
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/map.hpp3
-rw-r--r--include/mbgl/storage/caching_http_file_source.hpp11
-rw-r--r--include/mbgl/storage/file_source.hpp2
3 files changed, 9 insertions, 7 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 23bd211af9..45ec16ffd5 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -78,8 +78,6 @@ public:
void setStyleURL(const std::string &url);
void setStyleJSON(std::string newStyleJSON, const std::string &base = "");
std::string getStyleJSON() const;
- void setAccessToken(std::string accessToken);
- std::string getAccessToken() const;
// Transition
void cancelTransitions();
@@ -187,7 +185,6 @@ private:
std::string styleURL;
std::string styleJSON = "";
- std::string accessToken = "";
bool debug = false;
timestamp animationTime = 0;
diff --git a/include/mbgl/storage/caching_http_file_source.hpp b/include/mbgl/storage/caching_http_file_source.hpp
index f566acf49e..6d7d852d2a 100644
--- a/include/mbgl/storage/caching_http_file_source.hpp
+++ b/include/mbgl/storage/caching_http_file_source.hpp
@@ -23,9 +23,11 @@ public:
bool hasLoop();
void clearLoop();
- // Stores and retrieves the base path/URL for relative requests
- void setBase(const std::string &value);
- const std::string &getBase() const;
+ // Set the base path/URL for relative requests
+ void setBase(std::string);
+
+ // Set the Mapbox API access token
+ void setAccessToken(std::string);
std::unique_ptr<Request> request(ResourceType type, const std::string &url);
@@ -37,6 +39,9 @@ public:
private:
std::thread::id thread_id;
+ // Mapbox API access token.
+ std::string accessToken;
+
// Path to the cache database.
std::string path;
diff --git a/include/mbgl/storage/file_source.hpp b/include/mbgl/storage/file_source.hpp
index 69a0060f6a..23a1462ae8 100644
--- a/include/mbgl/storage/file_source.hpp
+++ b/include/mbgl/storage/file_source.hpp
@@ -21,7 +21,7 @@ public:
virtual bool hasLoop() = 0;
virtual void clearLoop() = 0;
- virtual void setBase(const std::string &value) = 0;
+ virtual void setBase(std::string) = 0;
virtual std::unique_ptr<Request> request(ResourceType type, const std::string &url) = 0;
virtual void prepare(std::function<void()> fn) = 0;
};