blob: 9597723de19ce5dab70b1d5c5a14142388228469 (
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
|
#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);
bool SwitchToNextFile();
inline TCountryId const & GetCountryId() const { return m_countryId; }
inline MapOptions GetInitOptions() const { return m_init; }
inline MapOptions GetCurrentFile() const { return m_current; }
inline MapOptions GetDownloadedFiles() 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
|