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.hpp')
-rw-r--r--storage/storage.hpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/storage/storage.hpp b/storage/storage.hpp
index b938eca52c..eb68c5c75c 100644
--- a/storage/storage.hpp
+++ b/storage/storage.hpp
@@ -7,9 +7,9 @@
#include "storage/downloading_policy.hpp"
#include "storage/index.hpp"
#include "storage/map_files_downloader.hpp"
+#include "storage/pinger.hpp"
#include "storage/queued_country.hpp"
#include "storage/storage_defines.hpp"
-#include "storage/storage_defines.hpp"
#include "platform/local_country_file.hpp"
@@ -17,7 +17,6 @@
#include "base/thread_checker.hpp"
#include "base/worker_thread.hpp"
-#include <future>
#include "std/function.hpp"
#include "std/list.hpp"
#include "std/shared_ptr.hpp"
@@ -26,6 +25,8 @@
#include "std/utility.hpp"
#include "std/vector.hpp"
+#include <boost/optional.hpp>
+
namespace storage
{
struct CountryIdAndName
@@ -250,7 +251,8 @@ private:
diffs::Manager m_diffManager;
vector<platform::LocalCountryFile> m_notAppliedDiffs;
- vector<vector<string>> m_deferredDownloads;
+ bool m_needToStartDeferredDownloading = false;
+ boost::optional<vector<string>> m_sessionServerList;
StartDownloadingCallback m_startDownloadingCallback;
@@ -263,9 +265,9 @@ private:
void ReportProgressForHierarchy(TCountryId const & countryId,
MapFilesDownloader::TProgress const & leafProgress);
- /// Called on the main thread by MapFilesDownloader when list of
- /// suitable servers is received.
- void OnServerListDownloaded(vector<string> const & urls);
+ void DoDownload();
+ void SetDeferDownloading();
+ void DoDeferredDownloadIfNeeded();
/// Called on the main thread by MapFilesDownloader when
/// downloading of a map file succeeds/fails.
@@ -673,6 +675,10 @@ private:
// Should be called once on startup, downloading process should be suspended until this method
// was not called. Do not call this method manually.
void OnDiffStatusReceived(diffs::Status const status) override;
+
+ void LoadServerListForSession();
+ void LoadServerListForTesting();
+ void PingServerList(vector<string> const & urls);
};
void GetQueuedCountries(Storage::TQueue const & queue, TCountriesSet & resultCountries);