MCPcopy Create free account
hub / github.com/comaps/comaps / DownloadMapFile

Method DownloadMapFile

libs/storage/map_files_downloader.cpp:19–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace storage
18{
19void MapFilesDownloader::DownloadMapFile(QueuedCountry && queuedCountry)
20{
21 /// @todo(pastk): check for new map versions before every download session
22
23 if (!m_serversList.empty())
24 {
25 Download(std::move(queuedCountry));
26 return;
27 }
28
29 m_pendingRequests.Append(std::move(queuedCountry));
30
31 if (!m_isMetaConfigRequested)
32 {
33 RunMetaConfigAsync([this]()
34 {
35 m_pendingRequests.ForEachCountry([this](QueuedCountry & country) { Download(std::move(country)); });
36
37 m_pendingRequests.Clear();
38 });
39 }
40}
41
42void MapFilesDownloader::RunMetaConfigAsync(std::function<void()> && callback)
43{

Callers 1

DownloadCountryMethod · 0.80

Calls 4

emptyMethod · 0.45
AppendMethod · 0.45
ForEachCountryMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected