forked from organicmaps/organicmaps
[core] move guides file to storage. Update guides data when country download starts.
This commit is contained in:
parent
2cdd4de3e2
commit
f71f6a01ef
11 changed files with 18 additions and 12 deletions
|
@ -258,7 +258,7 @@ Framework::Framework()
|
|||
LOG(LDEBUG, ("Storage initialized"));
|
||||
|
||||
//Init guides manager
|
||||
m_guidesManager.RestoreFromFile();
|
||||
m_storage.GetGuideManager().RestoreFromFile();
|
||||
}
|
||||
|
||||
Framework::~Framework()
|
||||
|
@ -1719,5 +1719,5 @@ void Framework::UpdateSavedDataVersion()
|
|||
|
||||
guides::GuidesManager & Framework::GetGuidesManager()
|
||||
{
|
||||
return m_guidesManager;
|
||||
return m_storage.GetGuideManager();
|
||||
}
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
#include "../std/scoped_ptr.hpp"
|
||||
#include "../std/target_os.hpp"
|
||||
|
||||
#include "guides.hpp"
|
||||
|
||||
|
||||
//#define DRAW_TOUCH_POINTS
|
||||
|
||||
|
@ -484,9 +482,6 @@ public:
|
|||
//@{
|
||||
public:
|
||||
guides::GuidesManager & GetGuidesManager();
|
||||
|
||||
private:
|
||||
guides::GuidesManager m_guidesManager;
|
||||
//@}
|
||||
|
||||
};
|
||||
|
|
|
@ -63,7 +63,6 @@ HEADERS += \
|
|||
ge0_parser.hpp \
|
||||
balloon_manager.hpp \
|
||||
scales_processor.hpp \
|
||||
guides.hpp \
|
||||
|
||||
SOURCES += \
|
||||
feature_vec_model.cpp \
|
||||
|
@ -113,7 +112,6 @@ SOURCES += \
|
|||
../api/src/c/api-client.c \
|
||||
balloon_manager.cpp \
|
||||
scales_processor.cpp \
|
||||
guides.cpp \
|
||||
|
||||
!iphone*:!bada*:!android* {
|
||||
HEADERS += qgl_render_context.hpp
|
||||
|
|
|
@ -33,4 +33,3 @@ SOURCES += \
|
|||
mwm_url_tests.cpp \
|
||||
feature_processor_test.cpp \
|
||||
ge0_parser_tests.cpp \
|
||||
guides_tests.cpp \
|
||||
|
|
|
@ -156,6 +156,8 @@ namespace storage
|
|||
return;
|
||||
}
|
||||
|
||||
m_guideManager.UpdateGuidesData();
|
||||
|
||||
// remove it from failed list
|
||||
m_failedCountries.erase(index);
|
||||
// add it into the queue
|
||||
|
@ -473,4 +475,9 @@ namespace storage
|
|||
{
|
||||
return m_currentVersion;
|
||||
}
|
||||
|
||||
guides::GuidesManager & Storage::GetGuideManager()
|
||||
{
|
||||
return m_guideManager;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "country.hpp"
|
||||
#include "index.hpp"
|
||||
#include "guides.hpp"
|
||||
|
||||
#include "../platform/http_request.hpp"
|
||||
|
||||
|
@ -13,7 +14,6 @@
|
|||
#include "../std/function.hpp"
|
||||
#include "../std/scoped_ptr.hpp"
|
||||
|
||||
|
||||
namespace storage
|
||||
{
|
||||
/// Used in GUI
|
||||
|
@ -128,5 +128,9 @@ namespace storage
|
|||
int GetOutdatedCountries(vector<Country> & list) const;
|
||||
|
||||
int64_t GetCurrentDataVersion() const;
|
||||
private:
|
||||
guides::GuidesManager m_guideManager;
|
||||
public:
|
||||
guides::GuidesManager & GetGuideManager();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ HEADERS += \
|
|||
country_info.hpp \
|
||||
country_decl.hpp \
|
||||
index.hpp \
|
||||
guides.hpp \
|
||||
|
||||
SOURCES += \
|
||||
country.cpp \
|
||||
|
@ -25,3 +26,4 @@ SOURCES += \
|
|||
country_info.cpp \
|
||||
country_decl.cpp \
|
||||
index.cpp \
|
||||
guides.cpp \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "../../testing/testing.hpp"
|
||||
|
||||
#include "../../map/guides.hpp"
|
||||
#include "../guides.hpp"
|
||||
|
||||
UNIT_TEST(ValidTest)
|
||||
{
|
|
@ -23,3 +23,4 @@ SOURCES += \
|
|||
simple_tree_test.cpp \
|
||||
country_info_test.cpp \
|
||||
storage_tests.cpp \
|
||||
guides_tests.cpp \
|
||||
|
|
Loading…
Add table
Reference in a new issue