forked from organicmaps/organicmaps
[core] Storage can return file name without extension by index
This commit is contained in:
parent
f30fa7ac9c
commit
ec5134ad4e
3 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,7 @@ namespace storage
|
|||
: m_fileName(fName), m_remoteSize(remoteSize), m_price(price) {}
|
||||
|
||||
string GetFileWithExt() const { return m_fileName + DATA_FILE_EXTENSION; }
|
||||
string const & GetFileWithoutExt() const { return m_fileName; }
|
||||
|
||||
uint32_t GetFileSize() const;
|
||||
|
||||
|
|
|
@ -117,6 +117,11 @@ namespace storage
|
|||
return NodeFromIndex(m_countries, index).Value().Flag();
|
||||
}
|
||||
|
||||
string const & Storage::CountryFileName(TIndex const & index) const
|
||||
{
|
||||
return NodeFromIndex(m_countries, index).Value().GetFile().GetFileWithoutExt();
|
||||
}
|
||||
|
||||
LocalAndRemoteSizeT Storage::CountrySizeInBytes(TIndex const & index) const
|
||||
{
|
||||
return CountryByIndex(index).Size();
|
||||
|
|
|
@ -109,6 +109,8 @@ namespace storage
|
|||
size_t CountriesCount(TIndex const & index) const;
|
||||
string const & CountryName(TIndex const & index) const;
|
||||
string const & CountryFlag(TIndex const & index) const;
|
||||
//country file name without extension
|
||||
string const & CountryFileName(TIndex const & index) const;
|
||||
LocalAndRemoteSizeT CountrySizeInBytes(TIndex const & index) const;
|
||||
TStatus CountryStatus(TIndex const & index) const;
|
||||
//m2::RectD CountryBounds(TIndex const & index) const;
|
||||
|
|
Loading…
Add table
Reference in a new issue