From 46a3f975f7fa832da33ee52b2cd3bfe67f24d98d Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Sat, 23 Jan 2016 13:15:43 +0300 Subject: [PATCH] [old map downloader] Download all country simple implementation. --- map/country_tree.cpp | 7 +++++++ map/country_tree.hpp | 1 + 2 files changed, 8 insertions(+) diff --git a/map/country_tree.cpp b/map/country_tree.cpp index 5f05e34707..6f0a626c20 100644 --- a/map/country_tree.cpp +++ b/map/country_tree.cpp @@ -191,6 +191,13 @@ void CountryTree::RetryDownloading(int childPosition) GetActiveMapLayout().RetryDownloading(GetChild(childPosition)); } +void CountryTree::DownloadAllCountry(MapOptions const & options) +{ + size_t const childCount = GetChildCount(); + for (size_t i = 0; i < childCount; ++i) + DownloadCountry(i, options); +} + void CountryTree::CancelDownloading(int childPosition) { GetStorage().DeleteFromDownloader(GetChild(childPosition)); diff --git a/map/country_tree.hpp b/map/country_tree.hpp index f8e3e28142..9c4201e280 100644 --- a/map/country_tree.hpp +++ b/map/country_tree.hpp @@ -67,6 +67,7 @@ public: void DownloadCountry(int childPosition, MapOptions const & options); void DeleteCountry(int childPosition, MapOptions const & options); void RetryDownloading(int childPosition); + void DownloadAllCountry(MapOptions const & options); ///@} void CancelDownloading(int childPosition);