diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-02-02 17:31:11 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:21:32 +0300 |
commit | dbe555605f496e65df0e762bec3dc3da75e009d5 (patch) | |
tree | 2f5902d58d8411a421ba73e216ec93b59522be1a /platform/country_file.hpp | |
parent | de3a5b9df15bfc5b3c957197921cc369753d0998 (diff) |
[new downloader] Moving new developed map downloader functionality to new map downloader branch.
Diffstat (limited to 'platform/country_file.hpp')
-rw-r--r-- | platform/country_file.hpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/platform/country_file.hpp b/platform/country_file.hpp index d0fed2bfe7..eb5c622cff 100644 --- a/platform/country_file.hpp +++ b/platform/country_file.hpp @@ -5,22 +5,23 @@ namespace platform { -// This class represents a country file name and sizes of -// corresponding map files on a server, which should correspond to an -// entry in countries.txt file. Also, this class can be used to -// represent a hand-made-country name. Instances of this class don't -// represent paths to disk files. +/// This class represents a country file name and sizes of +/// corresponding map files on a server, which should correspond to an +/// entry in countries.txt file. Also, this class can be used to +/// represent a hand-made-country name. Instances of this class don't +/// represent paths to disk files. class CountryFile { public: CountryFile(); explicit CountryFile(string const & name); - string const & GetNameWithoutExt() const; - string GetNameWithExt(MapOptions file) const; + /// \returns file name without extensions. + string const & GetName() const; + /// \note Remote size is size of mwm in bytes. This mwm contains routing and map sections. void SetRemoteSizes(uint32_t mapSize, uint32_t routingSize); - uint32_t GetRemoteSize(MapOptions filesMask) const; + uint32_t GetRemoteSize(MapOptions file) const; inline bool operator<(const CountryFile & rhs) const { return m_name < rhs.m_name; } inline bool operator==(const CountryFile & rhs) const { return m_name == rhs.m_name; } @@ -29,11 +30,17 @@ public: private: friend string DebugPrint(CountryFile const & file); - // Base name (without any extensions) of the file. Same as id of country/region. + /// Base name (without any extensions) of the file. Same as id of country/region. string m_name; uint32_t m_mapSize; uint32_t m_routingSize; }; +/// \returns This method returns file name with extension. For example Abkhazia.mwm or +/// Abkhazia.mwm.routing. +/// \param countryFile is a file name without extension. For example Abkhazia. +/// \param file is type of map data. +/// \param version is version of mwm. For example 160731. +string GetFileName(string const & countryFile, MapOptions file, int64_t version); string DebugPrint(CountryFile const & file); } // namespace platform |