summaryrefslogtreecommitdiff
path: root/src/mbgl/util/mapbox.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-09-28 15:06:41 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-09-28 15:06:41 +0200
commita84cf6242442626d9205231f6855a4c2a981293f (patch)
tree9f4777ab22cef5eb5db72fafa5f43fe4f425493e /src/mbgl/util/mapbox.hpp
parent81fde4261f2430a428f7dea98cdc524e4a3e31f5 (diff)
downloadqtlocation-mapboxgl-a84cf6242442626d9205231f6855a4c2a981293f.tar.gz
[core] include api.mapbox.com in canonicalization
and move the canonicalization to mapbox.cpp since it's not specific to the SQLiteCache
Diffstat (limited to 'src/mbgl/util/mapbox.hpp')
-rw-r--r--src/mbgl/util/mapbox.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/util/mapbox.hpp b/src/mbgl/util/mapbox.hpp
index 9c24dda0e6..57f87e7959 100644
--- a/src/mbgl/util/mapbox.hpp
+++ b/src/mbgl/util/mapbox.hpp
@@ -14,6 +14,12 @@ std::string normalizeSpriteURL(const std::string& url, const std::string& access
std::string normalizeGlyphsURL(const std::string& url, const std::string& accessToken);
std::string normalizeTileURL(const std::string& url, const std::string& sourceURL, SourceType sourceType);
+// Canonicalizes Mapbox URLs by removing [a-d] subdomain prefixes, access tokens, and protocol.
+// Note that this is close, but not exactly the reverse operation as above, as this retains certain
+// information, such as the API version. It is used to cache resources retrieved from the URL, that
+// sometimes have multiple valid URLs.
+std::string canonicalURL(const std::string &url);
+
}
}
}