MBNNTileEndpointConfiguration.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. NS_SWIFT_NAME(TileEndpointConfiguration)
  4. __attribute__((visibility ("default")))
  5. @interface MBNNTileEndpointConfiguration : NSObject
  6. // This class provides custom init which should be called
  7. - (nonnull instancetype)init NS_UNAVAILABLE;
  8. // This class provides custom init which should be called
  9. + (nonnull instancetype)new NS_UNAVAILABLE;
  10. - (nonnull instancetype)initWithHost:(nonnull NSString *)host
  11. dataset:(nonnull NSString *)dataset
  12. version:(nonnull NSString *)version
  13. token:(nonnull NSString *)token
  14. userAgent:(nonnull NSString *)userAgent
  15. navigatorVersion:(nonnull NSString *)navigatorVersion
  16. isFallback:(BOOL)isFallback
  17. versionBeforeFallback:(nonnull NSString *)versionBeforeFallback
  18. minDiffInDaysToConsiderServerVersion:(nullable NSNumber *)minDiffInDaysToConsiderServerVersion;
  19. /**
  20. * API routing tiles (ART) endpoint address (e.g. https://api.mapbox.com)
  21. * Could be one of the staging servers or api.mapbox.com (primarily for OSM now)
  22. * Various servers may have the info from different data providers.
  23. */
  24. @property (nonatomic, readonly, nonnull, copy) NSString *host;
  25. /** Tile dataset to use when querying ART, for example 'mapbox/driving' */
  26. @property (nonatomic, readonly, nonnull, copy) NSString *dataset;
  27. /**
  28. * Version of the routing tiles on ART.
  29. * Usually it's a string associated with a date (e.g. 2020_07_03-03_00_00).
  30. * Available versions can be queried via ${host}/route-tiles/v1/versions?access_token=YOUR_TOKEN_HERE
  31. * [!] When empty, nav-native will try to determine the latest version through ART request itself.
  32. */
  33. @property (nonatomic, readonly, nonnull, copy) NSString *version;
  34. /** Mapbox access token that will be used for ART (and potentially other web services) access */
  35. @property (nonatomic, readonly, nonnull, copy) NSString *token;
  36. /**
  37. * Application's portion of the user agent string used for querying web services.
  38. * No specific format enforced, but it's better to have an SDK and possibly an app name/version here.
  39. * Will be appended to the internal portion of the user agent string via a whitespace.
  40. * "<internal part filled by NavNative> ${userAgent}"
  41. */
  42. @property (nonatomic, readonly, nonnull, copy) NSString *userAgent;
  43. /** Detailed Navigation SDK version. Purely for information purposes. Can be empty */
  44. @property (nonatomic, readonly, nonnull, copy) NSString *navigatorVersion;
  45. /** Are we in an off-line fallback mode? */
  46. @property (nonatomic, readonly, getter=isIsFallback) BOOL isFallback;
  47. /** Valid only if isFallback is true. Should indicate which version was before we switched to the fallback mode. Empty string means 'we use the auto versioning' */
  48. @property (nonatomic, readonly, nonnull, copy) NSString *versionBeforeFallback;
  49. /**
  50. * Minimum time in days between local version of tiles and latest on the server
  51. * to consider using the latest version of routing tiles from the server.
  52. * The parameter is applied only to the case with automatic version switching.
  53. * The main purpose of the parameter - ability to do update frequency throttling.
  54. * It also assumes there are regular update on the server side.
  55. * Default: 0
  56. */
  57. @property (nonatomic, readonly, nullable) NSNumber *minDiffInDaysToConsiderServerVersion;
  58. @end