Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'storage/storage.cpp')
-rw-r--r--storage/storage.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/storage/storage.cpp b/storage/storage.cpp
index d862e4df3a..10247ebdd7 100644
--- a/storage/storage.cpp
+++ b/storage/storage.cpp
@@ -925,17 +925,11 @@ void Storage::OnMapDownloadFinished(TCountryId const & countryId, bool success,
string Storage::GetFileDownloadUrl(string const & baseUrl,
QueuedCountry const & queuedCountry) const
{
- return GetFileDownloadUrl(baseUrl, queuedCountry.GetCountryId(),
- queuedCountry.GetCurrentFileOptions());
-}
-
-string Storage::GetFileDownloadUrl(string const & baseUrl, TCountryId const & countryId,
- MapOptions options) const
-{
+ auto const & countryId = queuedCountry.GetCountryId();
+ auto const options = queuedCountry.GetCurrentFileOptions();
CountryFile const & countryFile = GetCountryFile(countryId);
- string const fileName =
- GetFileName(countryFile.GetName(), options, GetCurrentDataVersion());
+ string const fileName = GetFileName(countryFile.GetName(), options, GetCurrentDataVersion());
ostringstream url;
url << baseUrl;
@@ -949,6 +943,12 @@ string Storage::GetFileDownloadUrl(string const & baseUrl, TCountryId const & co
return url.str();
}
+string Storage::GetFileDownloadUrl(string const & baseUrl, string const & fileName) const
+{
+ return baseUrl + OMIM_OS_NAME "/" + strings::to_string(GetCurrentDataVersion()) + "/" +
+ UrlEncode(fileName);
+}
+
TCountryId Storage::FindCountryIdByFile(string const & name) const
{
// @TODO(bykoianko) Probably it's worth to check here if name represent a node in the tree.