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:
authorExMix <rahuba.youri@mapswithme.com>2014-10-13 11:45:39 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:30:21 +0300
commit67b4b0651e1445852a53b2961cb13da0a3e0e1e6 (patch)
tree6ea44be5005544764f415ffd8b89d2e6907d90ec /map/active_maps_layout.cpp
parent4307c13006b66eb5a230fb1a2261fbfa25eb9eea (diff)
[core] downloader API
Diffstat (limited to 'map/active_maps_layout.cpp')
-rw-r--r--map/active_maps_layout.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/map/active_maps_layout.cpp b/map/active_maps_layout.cpp
index 38c85b6bff..59300d959f 100644
--- a/map/active_maps_layout.cpp
+++ b/map/active_maps_layout.cpp
@@ -84,6 +84,19 @@ void ActiveMapsLayout::Clear()
m_split = { 0, 0 };
}
+size_t ActiveMapsLayout::GetSizeToUpdateAllInBytes() const
+{
+ size_t result = 0;
+ for (int i = m_split.first; i < m_split.second; ++i)
+ {
+ Item const & item = m_items[i];
+ if (item.m_status != TStatus::EInQueue && item.m_status != TStatus::EDownloading)
+ result += GetStorage().CountryByIndex(item.m_index).GetFile().GetRemoteSize(item.m_options);
+ }
+
+ return result;
+}
+
void ActiveMapsLayout::UpdateAll()
{
vector<Item> toDownload;