MBNNRouteAlternativesControllerInterface_Internal.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. #import <MapboxNavigationNative/MBNNRefreshAlternativesCallback_Internal.h>
  4. @class MBNNRouteAlternativesOptions;
  5. @protocol MBNNRouteAlternativesObserver;
  6. NS_SWIFT_NAME(RouteAlternativesControllerInterface)
  7. @protocol MBNNRouteAlternativesControllerInterface
  8. /**
  9. * Enables requesting alternate routes as soon as we pass a fork with an alternate route.
  10. * Passed altrenal route will disappear from the list of alternative routes at any value.
  11. * Enabled by default.
  12. */
  13. - (void)enableRequestAfterForkForEnable:(BOOL)enable;
  14. /**
  15. * Enables alternative routes periodic polling. Polling starts only if there are no alternatives.
  16. * This will help avoid a situation when server has not returned any alternatives, but may return them later during the ride.
  17. * Refreshes will be stopped if status.routeState is Invalid, OffRoute or Complete. And will be resumed otherwise.
  18. * Now it can consume a lot of traffic!
  19. * Disabled by default.
  20. */
  21. - (void)enableOnEmptyAlternativesRequestForEnable:(BOOL)enable;
  22. /** Set RouteAlternativesOptions (can be changed in run-time). */
  23. - (void)setRouteAlternativesOptionsForOptions:(nonnull MBNNRouteAlternativesOptions *)options;
  24. /** Add observer. Requests will not be sent if no one observer present. */
  25. - (void)addObserverForObserver:(nonnull id<MBNNRouteAlternativesObserver>)observer;
  26. /** Remove observer. Requests will not be sent if no one observer present. */
  27. - (void)removeObserverForObserver:(nonnull id<MBNNRouteAlternativesObserver>)observer;
  28. /** Remove all observers. Requests will not be sent if no one observer present. */
  29. - (void)removeAllObservers;
  30. /** Make alternative route request immediately. */
  31. - (void)refreshImmediately;
  32. - (void)refreshImmediatelyForCallback:(nonnull MBNNRefreshAlternativesCallback)callback;
  33. @end