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

Method DeleteCountry

libs/storage/storage.cpp:853–866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

851}
852
853void Storage::DeleteCountry(CountryId const & countryId, MapFileType type)
854{
855 ASSERT(m_willDelete != nullptr, ("Storage::Init wasn't called"));
856
857 LocalFilePtr localFile = GetLatestLocalFile(countryId);
858 bool const deferredDelete = m_willDelete(countryId, localFile);
859 DeleteCountryFiles(countryId, type, deferredDelete);
860 DeleteCountryFilesFromDownloader(countryId);
861 m_diffsDataSource->RemoveDiffForCountry(countryId);
862
863 m_downloadingCountries.erase(countryId);
864
865 NotifyStatusChangedForHierarchy(countryId);
866}
867
868void Storage::DeleteCustomCountryVersion(LocalCountryFile const & localFile)
869{

Callers 2

UNIT_CLASS_TESTFunction · 0.80
UNIT_TESTFunction · 0.80

Calls 3

ASSERTFunction · 0.85
RemoveDiffForCountryMethod · 0.80
eraseMethod · 0.45

Tested by 2

UNIT_CLASS_TESTFunction · 0.64
UNIT_TESTFunction · 0.64