diff --git a/map/framework.hpp b/map/framework.hpp index 5fde90dcb4..4cbaafec60 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -594,8 +594,14 @@ public: bool IsRoutingActive() const { return m_routingSession.IsActive(); } bool IsRouteBuilt() const { return m_routingSession.IsBuilt(); } bool IsRouteBuilding() const { return m_routingSession.IsBuilding(); } + bool IsRouteBuildingOnly() const { return m_routingSession.IsBuildingOnly(); } + bool IsRouteRebuildingOnly() const { return m_routingSession.IsRebuildingOnly(); } + bool IsRouteNotReady() const { return m_routingSession.IsNotReady(); } + bool IsRouteFinished() const { return m_routingSession.IsFinished(); } + bool IsRouteNoFollowing() const { return m_routingSession.IsNoFollowing(); } bool IsOnRoute() const { return m_routingSession.IsOnRoute(); } bool IsRouteNavigable() const { return m_routingSession.IsNavigable(); } + void BuildRoute(m2::PointD const & finish, uint32_t timeoutSec); void BuildRoute(m2::PointD const & start, m2::PointD const & finish, uint32_t timeoutSec); // FollowRoute has a bug where the router follows the route even if the method hads't been called. diff --git a/routing/routing_session.hpp b/routing/routing_session.hpp index bc01d3b287..ecc3cb3e39 100644 --- a/routing/routing_session.hpp +++ b/routing/routing_session.hpp @@ -88,12 +88,15 @@ public: m2::PointD GetEndPoint() const { return m_endPoint; } bool IsActive() const { return (m_state != RoutingNotActive); } bool IsNavigable() const { return (m_state == RouteNotStarted || m_state == OnRoute || m_state == RouteFinished); } - bool IsBuilt() const { return (IsNavigable() || m_state == RouteNeedRebuild || m_state == RouteFinished); } + bool IsBuilt() const { return (IsNavigable() || m_state == RouteNeedRebuild); } /// \returns true if a new route is in process of building rebuilding or /// if a route is being rebuilt in case the user left the route, and false otherwise. bool IsBuilding() const { return (m_state == RouteBuilding || m_state == RouteRebuilding); } - bool IsBuildingOnly() const { return m_state == RouteBuilding ; } - bool IsRebuildingOnly() const { return m_state == RouteRebuilding ; } + bool IsBuildingOnly() const { return m_state == RouteBuilding; } + bool IsRebuildingOnly() const { return m_state == RouteRebuilding; } + bool IsNotReady() const { return m_state == RouteNotReady; } + bool IsFinished() const { return m_state == RouteFinished; } + bool IsNoFollowing() const { return m_state == RouteNoFollowing; } bool IsOnRoute() const { return (m_state == OnRoute); } bool IsFollowing() const { return m_isFollowing; } void Reset();