diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-07-22 16:17:15 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:58:33 +0300 |
commit | b6526cc5501ffb9f7b9ae5fdc081a2de61236290 (patch) | |
tree | 3ee2db2600ce0c5c5a6db324c53ec3ad2bbc2863 /map/framework.hpp | |
parent | 2f1d252f98d5222cbb6ce6c5d8f2581ede68afb4 (diff) |
Move a progress callback initialisation to the framework.
Diffstat (limited to 'map/framework.hpp')
-rw-r--r-- | map/framework.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/map/framework.hpp b/map/framework.hpp index 13e5898b25..f4d1d7127c 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -564,7 +564,12 @@ public: void BuildRoute(m2::PointD const & destination, uint32_t timeoutSec); typedef function<void(routing::IRouter::ResultCode, vector<storage::TIndex> const &, vector<storage::TIndex> const &)> TRouteBuildingCallback; - void SetRouteBuildingListener(TRouteBuildingCallback const & callback) { m_routingCallback = callback; } + typedef function<void(float)> TRouteProgressCallback; + void SetRouteBuildingListener(TRouteBuildingCallback const & buildingCallback, TRouteProgressCallback const & progressCallback) + { + m_routingCallback = buildingCallback; + m_progressCallback = progressCallback; + } void FollowRoute() { GetLocationState()->StartRouteFollow(); } void CloseRouting(); void GetRouteFollowingInfo(location::FollowingInfo & info) { m_routingSession.GetRouteFollowingInfo(info); } @@ -597,6 +602,7 @@ private: string GetRoutingErrorMessage(routing::IRouter::ResultCode code); TRouteBuildingCallback m_routingCallback; + TRouteProgressCallback m_progressCallback; routing::RouterType m_currentRouterType; //@} |