[new downloader] Code cleanup

This commit is contained in:
Constantin Shalnev 2016-02-18 12:03:08 +03:00 committed by Sergey Yershov
parent cc919e118a
commit c696d010e4
2 changed files with 0 additions and 54 deletions

View file

@ -443,48 +443,6 @@ bool Framework::IsWatchFrameRendererInited() const
return m_cpuDrawer != nullptr;
}
void Framework::DeleteCountry(storage::TCountryId const & index, MapOptions opt)
{
switch (opt)
{
case MapOptions::Nothing:
return;
case MapOptions::Map: // fall through
case MapOptions::MapWithCarRouting:
{
CountryFile const & countryFile = m_storage.GetCountryFile(index);
// m_model will notify us when latest map file will be deleted via
// OnMapDeregistered call.
if (m_model.DeregisterMap(countryFile))
InvalidateRect(GetCountryBounds(countryFile.GetName()));
// TODO (@ldragunov, @gorshenin): rewrite routing session to use MwmHandles. Thus,
// it won' be needed to reset it after maps update.
m_routingSession.Reset();
return;
}
case MapOptions::CarRouting:
m_routingSession.Reset();
m_storage.DeleteCountry(index, opt);
return;
}
}
void Framework::DownloadCountry(storage::TCountryId const & index, MapOptions opt)
{
m_storage.DownloadCountry(index, opt);
}
Status Framework::GetCountryStatus(storage::TCountryId const & index) const
{
return m_storage.CountryStatusEx(index);
}
string Framework::GetCountryName(storage::TCountryId const & countryId) const
{
return countryId;
}
m2::RectD Framework::GetCountryBounds(storage::TCountryId const & countryId) const
{
CountryFile const & file = m_storage.GetCountryFile(countryId);

View file

@ -179,18 +179,6 @@ public:
platform::LocalCountryFile const & localFile);
//@}
/// Deletes all disk files corresponding to country.
///
/// @name This functions is used by Downloader UI.
//@{
/// options - flags that signal about parts of map that must be deleted
void DeleteCountry(storage::TCountryId const & index, MapOptions opt);
/// options - flags that signal about parts of map that must be downloaded
void DownloadCountry(storage::TCountryId const & index, MapOptions opt);
storage::Status GetCountryStatus(storage::TCountryId const & index) const;
string GetCountryName(storage::TCountryId const & index) const;
/// Get country rect from borders (not from mwm file).
/// @param[in] file Pass country file name without extension as an id.
m2::RectD GetCountryBounds(storage::TCountryId const & countryId) const;