diff --git a/map/framework.cpp b/map/framework.cpp index fa7174ebcf..9818d655d3 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -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(); } diff --git a/map/framework.hpp b/map/framework.hpp index 46d464a35e..9ffc729f4f 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -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; //@} }; diff --git a/map/map.pro b/map/map.pro index d005fbed6b..c382fe20c4 100644 --- a/map/map.pro +++ b/map/map.pro @@ -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 diff --git a/map/map_tests/map_tests.pro b/map/map_tests/map_tests.pro index 0b0feda852..6118879ee3 100644 --- a/map/map_tests/map_tests.pro +++ b/map/map_tests/map_tests.pro @@ -33,4 +33,3 @@ SOURCES += \ mwm_url_tests.cpp \ feature_processor_test.cpp \ ge0_parser_tests.cpp \ - guides_tests.cpp \ diff --git a/map/guides.cpp b/storage/guides.cpp similarity index 100% rename from map/guides.cpp rename to storage/guides.cpp diff --git a/map/guides.hpp b/storage/guides.hpp similarity index 100% rename from map/guides.hpp rename to storage/guides.hpp diff --git a/storage/storage.cpp b/storage/storage.cpp index b3a3fdfcbc..e7526e6279 100644 --- a/storage/storage.cpp +++ b/storage/storage.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; + } } diff --git a/storage/storage.hpp b/storage/storage.hpp index 169414197d..b9cc09da4b 100644 --- a/storage/storage.hpp +++ b/storage/storage.hpp @@ -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 & list) const; int64_t GetCurrentDataVersion() const; + private: + guides::GuidesManager m_guideManager; + public: + guides::GuidesManager & GetGuideManager(); }; } diff --git a/storage/storage.pro b/storage/storage.pro index 29913f1b13..c3cb3a2009 100644 --- a/storage/storage.pro +++ b/storage/storage.pro @@ -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 \ diff --git a/map/map_tests/guides_tests.cpp b/storage/storage_tests/guides_tests.cpp similarity index 99% rename from map/map_tests/guides_tests.cpp rename to storage/storage_tests/guides_tests.cpp index 0167018392..aae48337da 100644 --- a/map/map_tests/guides_tests.cpp +++ b/storage/storage_tests/guides_tests.cpp @@ -1,6 +1,6 @@ #include "../../testing/testing.hpp" -#include "../../map/guides.hpp" +#include "../guides.hpp" UNIT_TEST(ValidTest) { diff --git a/storage/storage_tests/storage_tests.pro b/storage/storage_tests/storage_tests.pro index d779026f19..554b2f1c26 100644 --- a/storage/storage_tests/storage_tests.pro +++ b/storage/storage_tests/storage_tests.pro @@ -23,3 +23,4 @@ SOURCES += \ simple_tree_test.cpp \ country_info_test.cpp \ storage_tests.cpp \ + guides_tests.cpp \