MBMOfflineManager.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. #import <MapboxCoreMaps/MBMStylePackLoadProgressCallback.h>
  4. @class MBMResourceOptions;
  5. @class MBMStylePackLoadOptions;
  6. @class MBMTilesetDescriptorOptions;
  7. @class MBMTilesetDescriptorOptionsForTilesets;
  8. @class MBXCancelable;
  9. @class MBXTilesetDescriptor;
  10. /**
  11. * An `offline manager` manages downloads and storage for style packages and also produces tileset descriptors for the `tile store`.
  12. *
  13. * All the asynchronous methods calls complete even if the `offline manager` instance gets out of scope before.
  14. */
  15. NS_SWIFT_NAME(OfflineManager)
  16. __attribute__((visibility ("default")))
  17. @interface MBMOfflineManager : NSObject
  18. // This class provides custom init which should be called
  19. - (nonnull instancetype)init NS_UNAVAILABLE;
  20. // This class provides custom init which should be called
  21. + (nonnull instancetype)new NS_UNAVAILABLE;
  22. /**
  23. * Construct a new `offline manager`.
  24. *
  25. * @param resourceOptions The `resource options` to manage.
  26. */
  27. - (nonnull instancetype)initWithResourceOptions:(nonnull MBMResourceOptions *)resourceOptions;
  28. /**
  29. * Construct a new `tileset descriptor` for the `tile store`.
  30. *
  31. * Tileset descriptors are used by the `tile store` to create new offline regions.
  32. * Resolving the created tileset descriptor includes loading and parsing the style and might include
  33. * creation or update of a style package - depending on the given options.
  34. *
  35. * @param tilesetDescriptorOptions The `tileset descriptor options` to manage.
  36. * @return A new `tileset descriptor`.
  37. */
  38. - (nonnull MBXTilesetDescriptor *)createTilesetDescriptorForTilesetDescriptorOptions:(nonnull MBMTilesetDescriptorOptions *)tilesetDescriptorOptions __attribute((ns_returns_retained));
  39. /**
  40. * An overloaded version that accepts `TilesetDescriptorOptionsForTilesets`.
  41. *
  42. * This method is helpful if the required tilesets do not originally belong to
  43. * a style, e.g. when their corresponding style sources are added using runtime API.
  44. *
  45. * @param tilesetDescriptorOptionsForTilesets The `tileset descriptor options` to manage.
  46. * @return A new `tileset descriptor`.
  47. */
  48. - (nonnull MBXTilesetDescriptor *)createTilesetDescriptorForTilesetDescriptorOptionsForTilesets:(nonnull MBMTilesetDescriptorOptionsForTilesets *)tilesetDescriptorOptionsForTilesets __attribute((ns_returns_retained));
  49. /**
  50. * Removes a style package.
  51. *
  52. * Removes a style package from the existing packages list. The actual resources
  53. * eviction might be deferred as the implementation can first put the resources to the disk cache.
  54. * Call `MapboxMap#clearData()` API to make sure all the temporary data is physically removed
  55. * from the disk cache.
  56. *
  57. * All pending loading operations for the style package with the given id will
  58. * fail with `Canceled` error.
  59. *
  60. * @param styleURI The URI of the style package's associated style
  61. */
  62. - (void)removeStylePackForStyleURI:(nonnull NSString *)styleURI;
  63. @end