Restore booking flow.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako
2023-06-23 22:55:21 -03:00
committed by Konstantin Pastbin
parent 8f1a0903bb
commit 556a474fda
25 changed files with 1390 additions and 9 deletions

View File

@@ -98,6 +98,27 @@ std::unique_ptr<FeatureType> FeatureGetter::GetFeatureByIndex(uint32_t index) co
return m_guard->GetFeatureByIndex(index);
}
void LoadDataSource(DataSource & dataSource)
{
std::vector<platform::LocalCountryFile> localFiles;
Platform & platform = GetPlatform();
platform::FindAllLocalMapsInDirectoryAndCleanup(platform.WritableDir(), 0 /* version */,
-1 /* latestVersion */, localFiles);
for (auto const & localFile : localFiles)
{
LOG(LINFO, ("Found mwm:", localFile));
try
{
dataSource.RegisterMap(localFile);
}
catch (RootException const & ex)
{
CHECK(false, (ex.Msg(), "Bad mwm file:", localFile));
}
}
}
bool ParseFeatureIdToOsmIdMapping(std::string const & path,
std::unordered_map<uint32_t, base::GeoObjectId> & mapping)
{