diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2014-12-04 17:03:23 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2014-12-04 17:03:23 -0800 |
commit | ff640132de0fe855314a8fd86adae3a2fb33237b (patch) | |
tree | f3a794ad1a68ad91626a48727cdde0146152316d /include | |
parent | 0a942b6f143373c30fdd2027ff75fdb3b0c71551 (diff) | |
download | qtlocation-mapboxgl-ff640132de0fe855314a8fd86adae3a2fb33237b.tar.gz |
Move setAccessToken to CachingHTTPFileSource
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/map.hpp | 3 | ||||
-rw-r--r-- | include/mbgl/storage/caching_http_file_source.hpp | 11 | ||||
-rw-r--r-- | include/mbgl/storage/file_source.hpp | 2 |
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; }; |