MBMOfflineRegion.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. #import <MapboxCoreMaps/MBMOfflineRegionDownloadState.h>
  4. @class MBMOfflineRegionGeometryDefinition;
  5. @class MBMOfflineRegionTilePyramidDefinition;
  6. @protocol MBMOfflineRegionObserver;
  7. /** An offline region represents an identifiable geographic region with optional metadata. */
  8. NS_SWIFT_NAME(OfflineRegion)
  9. __attribute__((visibility ("default")))
  10. __attribute__((deprecated))
  11. @interface MBMOfflineRegion : NSObject
  12. // This class provides custom init which should be called
  13. - (nonnull instancetype)init NS_UNAVAILABLE;
  14. // This class provides custom init which should be called
  15. + (nonnull instancetype)new NS_UNAVAILABLE;
  16. /** The regions identifier */
  17. - (int64_t)getIdentifier;
  18. /**
  19. * The tile pyramid defining the region. Tile pyramid and geometry definitions are
  20. * mutually exclusive.
  21. *
  22. * @return A definition describing the tile pyramid including attributes, otherwise empty.
  23. */
  24. - (nullable MBMOfflineRegionTilePyramidDefinition *)getTilePyramidDefinition __attribute((ns_returns_retained));
  25. /**
  26. * The geometry defining the region. Geometry and tile pyramid definitions are
  27. * mutually exclusive.
  28. *
  29. * @return A definition describing the geometry including attributes, otherwise empty.
  30. */
  31. - (nullable MBMOfflineRegionGeometryDefinition *)getGeometryDefinition __attribute((ns_returns_retained));
  32. /**
  33. * Arbitrary binary region metadata.
  34. *
  35. * @return The metadata associated with the region.
  36. */
  37. - (nonnull NSData *)getMetadata __attribute((ns_returns_retained));
  38. /**
  39. * Sets the download state of an offline region
  40. * A region is either inactive (not downloading, but previously-downloaded
  41. * resources are available for use), or active (resources are being downloaded
  42. * or will be downloaded, if necessary, when network access is available).
  43. *
  44. * If the region is already in the given state, this call is ignored.
  45. *
  46. * @param state The new state to set.
  47. */
  48. - (void)setOfflineRegionDownloadStateForState:(MBMOfflineRegionDownloadState)state;
  49. /**
  50. * Register an observer to be notified when the state of the region changes.
  51. *
  52. * @param observer The observer that will be notified when a region’s status changes.
  53. */
  54. - (void)setOfflineRegionObserverForObserver:(nonnull id<MBMOfflineRegionObserver>)observer;
  55. @end