diff --git a/map/isolines_manager.cpp b/map/isolines_manager.cpp index 6102edcf0b..40f63e4ddb 100644 --- a/map/isolines_manager.cpp +++ b/map/isolines_manager.cpp @@ -21,6 +21,11 @@ IsolinesManager::IsolinesManager(DataSource & dataSource, GetMwmsByRectFn const CHECK(m_getMwmsByRectFn != nullptr, ()); } +IsolinesManager::IsolinesState IsolinesManager::GetState() const +{ + return m_state; +} + void IsolinesManager::SetStateListener(IsolinesStateChangedFn const & onStateChangedFn) { m_onStateChangedFn = onStateChangedFn; diff --git a/map/isolines_manager.hpp b/map/isolines_manager.hpp index 4caba30f61..e8ac643912 100644 --- a/map/isolines_manager.hpp +++ b/map/isolines_manager.hpp @@ -33,7 +33,9 @@ public: IsolinesManager(DataSource & dataSource, GetMwmsByRectFn const & getMwmsByRectFn); + IsolinesState GetState() const; void SetStateListener(IsolinesStateChangedFn const & onStateChangedFn); + void SetDrapeEngine(ref_ptr engine); void SetEnabled(bool enabled); diff --git a/map/traffic_manager.cpp b/map/traffic_manager.cpp index f5176745b8..89e26937a1 100644 --- a/map/traffic_manager.cpp +++ b/map/traffic_manager.cpp @@ -79,12 +79,14 @@ void TrafficManager::Teardown() m_thread.join(); } +TrafficManager::TrafficState TrafficManager::GetState() const +{ + return m_state; +} + void TrafficManager::SetStateListener(TrafficStateChangedFn const & onStateChangedFn) { - GetPlatform().RunTask(Platform::Thread::Gui, [this, onStateChangedFn]() - { - m_onStateChangedFn = onStateChangedFn; - }); + m_onStateChangedFn = onStateChangedFn; } void TrafficManager::SetEnabled(bool enabled) diff --git a/map/traffic_manager.hpp b/map/traffic_manager.hpp index 82d08875a7..bd0ae5432a 100644 --- a/map/traffic_manager.hpp +++ b/map/traffic_manager.hpp @@ -62,7 +62,9 @@ public: void Teardown(); + TrafficState GetState() const; void SetStateListener(TrafficStateChangedFn const & onStateChangedFn); + void SetDrapeEngine(ref_ptr engine); void SetCurrentDataVersion(int64_t dataVersion); diff --git a/map/transit/transit_reader.cpp b/map/transit/transit_reader.cpp index 48d3aec230..0d0e71ec26 100644 --- a/map/transit/transit_reader.cpp +++ b/map/transit/transit_reader.cpp @@ -411,6 +411,11 @@ void TransitReadManager::OnTaskCompleted(threads::IRoutine * task) m_event.notify_all(); } +TransitReadManager::TransitSchemeState TransitReadManager::GetState() const +{ + return m_state; +} + void TransitReadManager::SetStateListener(TransitStateChangedFn const & onStateChangedFn) { m_onStateChangedFn = onStateChangedFn; diff --git a/map/transit/transit_reader.hpp b/map/transit/transit_reader.hpp index 312114ffe9..aa1b4d06d9 100644 --- a/map/transit/transit_reader.hpp +++ b/map/transit/transit_reader.hpp @@ -99,6 +99,8 @@ public: void Stop(); void SetDrapeEngine(ref_ptr engine); + + TransitSchemeState GetState() const; void SetStateListener(TransitStateChangedFn const & onStateChangedFn); bool GetTransitDisplayInfo(TransitDisplayInfos & transitDisplayInfos);