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

Method OnMapFileDownloaded

libs/storage/http_map_files_downloader.cpp:114–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void HttpMapFilesDownloader::OnMapFileDownloaded(QueuedCountry const & queuedCountry, downloader::HttpRequest & request)
115{
116 CHECK_THREAD_CHECKER(m_checker, ());
117 // Because this method is called deferred on original thread,
118 // it is possible the country is already removed from queue.
119 if (m_queue.IsEmpty() || m_queue.GetFirstId() != queuedCountry.GetCountryId())
120 return;
121
122 m_queue.PopFront();
123
124 queuedCountry.OnDownloadFinished(request.GetStatus());
125
126 m_request.reset();
127
128 if (!m_queue.IsEmpty())
129 Download();
130}
131
132void HttpMapFilesDownloader::OnMapFileDownloadingProgress(QueuedCountry const & queuedCountry,
133 downloader::HttpRequest & request)

Callers

nothing calls this directly

Calls 6

GetCountryIdMethod · 0.80
IsEmptyMethod · 0.45
PopFrontMethod · 0.45
OnDownloadFinishedMethod · 0.45
GetStatusMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected