diff --git a/android/src/com/mapswithme/maps/data/RoutingResultCodesProcessor.java b/android/src/com/mapswithme/maps/data/RoutingResultCodesProcessor.java index 9e49d901fe..0390a2dbe5 100644 --- a/android/src/com/mapswithme/maps/data/RoutingResultCodesProcessor.java +++ b/android/src/com/mapswithme/maps/data/RoutingResultCodesProcessor.java @@ -25,6 +25,7 @@ public class RoutingResultCodesProcessor public static final int ROUTE_NOT_FOUND = 8; public static final int NEED_MORE_MAPS = 9; public static final int INTERNAL_ERROR = 10; + public static final int FILE_TOO_OLD = 11; public static Pair getDialogTitleSubtitle(int errorCode, MapStorage.Index[] missingCountries) { diff --git a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm index cce1e6b360..932ec47433 100644 --- a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm +++ b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm @@ -95,6 +95,7 @@ case routing::IRouter::Cancelled: case routing::IRouter::NoError: case routing::IRouter::NeedMoreMaps: + case routing::IRouter::FileTooOld: return nil; } } diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index c7fdf0cf7f..c9dc2d01f4 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -745,6 +745,7 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView) case routing::IRouter::RouteFileNotExist: case routing::IRouter::InconsistentMWMandRoute: case routing::IRouter::NeedMoreMaps: + case rouitng::IRouter::FileTooOld: case routing::IRouter::RouteNotFound: [self presentDownloaderAlert:code countries:absentCountries routes:absentRoutes]; break; diff --git a/routing/async_router.cpp b/routing/async_router.cpp index 8b6cc0531a..95bddddaca 100644 --- a/routing/async_router.cpp +++ b/routing/async_router.cpp @@ -30,6 +30,7 @@ string ToString(IRouter::ResultCode code) case IRouter::RouteNotFound: return "RouteNotFound"; case IRouter::InternalError: return "InternalError"; case IRouter::NeedMoreMaps: return "NeedMoreMaps"; + case IRouter::FileTooOld: return "FileTooOld"; } } diff --git a/routing/router.hpp b/routing/router.hpp index ba0e8e8232..1968921828 100644 --- a/routing/router.hpp +++ b/routing/router.hpp @@ -26,19 +26,23 @@ string ToString(RouterType type); class IRouter { public: + /// Routing possible statuses enumeration. + /// \warning this enum has JNI mirror! + /// \see android/src/com/mapswithme/maps/data/RoutingResultCodesProcessor.java enum ResultCode { NoError = 0, - Cancelled, - NoCurrentPosition, - InconsistentMWMandRoute, - RouteFileNotExist, - StartPointNotFound, - EndPointNotFound, - PointsInDifferentMWM, - RouteNotFound, - NeedMoreMaps, - InternalError + Cancelled = 1, + NoCurrentPosition = 2, + InconsistentMWMandRoute = 3, + RouteFileNotExist = 4, + StartPointNotFound = 5, + EndPointNotFound = 6, + PointsInDifferentMWM = 7, + RouteNotFound = 8, + NeedMoreMaps = 9, + InternalError = 10, + FileTooOld = 11 }; virtual ~IRouter() {}