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

Method CountryStatusEx

libs/storage/storage.cpp:771–788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771Status Storage::CountryStatusEx(CountryId const & countryId) const
772{
773 auto const status = CountryStatus(countryId);
774 if (status != Status::UnknownError)
775 return status;
776
777 auto localFile = GetLatestLocalFile(countryId);
778 if (!localFile || !(localFile->OnDisk(MapFileType::Map) || localFile->IsInBundle()))
779 return Status::NotDownloaded;
780
781 auto const & countryFile = GetCountryFile(countryId);
782 if (GetRemoteSize(countryFile) == 0)
783 return Status::UnknownError;
784
785 if (localFile->GetVersion() != m_currentVersion)
786 return Status::OnDiskOutOfDate;
787 return Status::OnDisk;
788}
789
790void Storage::SaveDownloadQueue()
791{

Callers 12

mainFunction · 0.80
PrepareCountriesMethod · 0.80
OnCountryChangedMethod · 0.80
DownloadGroupFunction · 0.80
DeleteGroupFunction · 0.80
StartDownloadMethod · 0.80
OnStatusChangedMethod · 0.80
UNIT_TESTFunction · 0.80
UNIT_CLASS_TESTFunction · 0.80

Calls 4

GetRemoteSizeFunction · 0.85
OnDiskMethod · 0.80
IsInBundleMethod · 0.80
GetVersionMethod · 0.45

Tested by 8

DownloadGroupFunction · 0.64
DeleteGroupFunction · 0.64
StartDownloadMethod · 0.64
OnStatusChangedMethod · 0.64
UNIT_TESTFunction · 0.64
UNIT_CLASS_TESTFunction · 0.64