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

Method RunMetaConfigAsync

libs/storage/map_files_downloader.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void MapFilesDownloader::RunMetaConfigAsync(std::function<void()> && callback)
43{
44 m_isMetaConfigRequested = true;
45
46 GetPlatform().RunTask(Platform::Thread::Network, [this, callback = std::move(callback)]()
47 {
48 GetMetaConfig([this, callback = std::move(callback)](MetaConfig const & metaConfig)
49 {
50 m_serversList = metaConfig.m_serversList;
51 settings::Update(metaConfig.m_settings);
52 callback();
53
54 // Reset flag to invoke servers list downloading next time if current request has failed.
55 m_isMetaConfigRequested = false;
56 });
57 });
58}
59
60void MapFilesDownloader::Remove(CountryId const & id)
61{

Callers

nothing calls this directly

Calls 2

RunTaskMethod · 0.80
UpdateFunction · 0.50

Tested by

no test coverage detected