blob: 7af9a31fb8fa9edb384dba77ae8f7874a8c092ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#pragma once
#include "storage/index.hpp"
#include "platform/country_defines.hpp"
namespace storage
{
/// Country queued for downloading.
/// @TODO(bykoianko) This class assumes that a map may consist of one or two mwm files.
/// But single mwm files are used now. So this class should be redisigned to support
/// only single mwm case.
class QueuedCountry
{
public:
QueuedCountry(TCountryId const & m_countryId, MapOptions opt);
void AddOptions(MapOptions opt);
void RemoveOptions(MapOptions opt);
/// In case we can't update file using diff scheme.
void ResetToDefaultOptions();
bool SwitchToNextFile();
inline TCountryId const & GetCountryId() const { return m_countryId; }
inline MapOptions GetInitOptions() const { return m_init; }
inline MapOptions GetCurrentFileOptions() const { return m_current; }
inline MapOptions GetDownloadedFilesOptions() const { return UnsetOptions(m_init, m_left); }
inline bool operator==(TCountryId const & countryId) const { return m_countryId == countryId; }
private:
TCountryId m_countryId;
MapOptions m_init;
MapOptions m_left;
MapOptions m_current;
};
} // namespace storage
|