Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/backgroundassets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ interface BAAssetPack {
delegate void BAAssetPackManagerGetAllAssetPacksCompletionHandler ([NullAllowed] NSSet<BAAssetPack> assetPacks, [NullAllowed] NSError error);
delegate void BAAssetPackManagerGetAssetPackCompletionHandler ([NullAllowed] BAAssetPack assetPack, [NullAllowed] NSError error);
delegate void BAAssetPackManagerGetStatusCompletionHandler ([NullAllowed] BAAssetPackStatus status, [NullAllowed] NSError error);
/// <summary>Completion handler invoked with the local status of an asset pack.</summary>
/// <param name="status">The <see cref="BAAssetPackStatus" /> of the asset pack on the local device.</param>
delegate void BAAssetPackManagerGetLocalStatusCompletionHandler (BAAssetPackStatus status);
delegate void BAAssetPackManagerEnsureLocalAvailabilityCompletionHandler ([NullAllowed] NSError error);
delegate void BAAssetPackManagerCheckForUpdatesCompletionHandler ([NullAllowed] NSSet<NSString> updatingIdentifiers, [NullAllowed] NSSet<NSString> removedIdentifiers, [NullAllowed] NSError error);
delegate void BAAssetPackManagerRemoveAssetPackCompletionHandler ([NullAllowed] NSError error);
Expand Down Expand Up @@ -329,6 +332,10 @@ interface BAAssetPackManager {
[Async]
void GetAssetPack (string assetPackIdentifier, BAAssetPackManagerGetAssetPackCompletionHandler completionHandler);

[Deprecated (PlatformName.iOS, 26, 4, message: "Use 'GetRelativeStatus' or 'GetLocalStatus' instead.")]
[Deprecated (PlatformName.MacOSX, 26, 4, message: "Use 'GetRelativeStatus' or 'GetLocalStatus' instead.")]
[Deprecated (PlatformName.TvOS, 26, 4, message: "Use 'GetRelativeStatus' or 'GetLocalStatus' instead.")]
[Deprecated (PlatformName.MacCatalyst, 26, 4, message: "Use 'GetRelativeStatus' or 'GetLocalStatus' instead.")]
[Export ("getStatusOfAssetPackWithIdentifier:completionHandler:")]
[Async]
void GetStatus (string assetPackIdentifier, BAAssetPackManagerGetStatusCompletionHandler completionHandler);
Expand All @@ -355,6 +362,38 @@ interface BAAssetPackManager {
[Export ("removeAssetPackWithIdentifier:completionHandler:")]
[Async]
void RemoveAssetPack (string assetPackIdentifier, [NullAllowed] BAAssetPackManagerRemoveAssetPackCompletionHandler completionHandler);

/// <summary>Gets the status of an asset pack relative to the server.</summary>
/// <param name="assetPack">The <see cref="BAAssetPack" /> to query.</param>
/// <param name="completionHandler">A completion handler called with the <see cref="BAAssetPackStatus" /> and an optional error.</param>
[TV (26, 4), Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4)]
[Export ("getStatusRelativeToAssetPack:completionHandler:")]
[Async]
void GetRelativeStatus (BAAssetPack assetPack, BAAssetPackManagerGetStatusCompletionHandler completionHandler);

/// <summary>Gets the local status of an asset pack.</summary>
/// <param name="assetPackIdentifier">The identifier of the asset pack to query.</param>
/// <param name="completionHandler">A completion handler called with the <see cref="BAAssetPackStatus" /> of the asset pack on the local device.</param>
[TV (26, 4), Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4)]
[Export ("getLocalStatusOfAssetPackWithIdentifier:completionHandler:")]
[Async]
void GetLocalStatus (string assetPackIdentifier, BAAssetPackManagerGetLocalStatusCompletionHandler completionHandler);

/// <summary>Synchronously checks whether an asset pack is available on the local device.</summary>
/// <param name="assetPackIdentifier">The identifier of the asset pack to check.</param>
/// <returns><see langword="true" /> if the asset pack is available locally; otherwise, <see langword="false" />.</returns>
[TV (26, 4), Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4)]
[Export ("assetPackIsAvailableLocallyWithIdentifier:")]
bool IsAssetPackAvailableLocally (string assetPackIdentifier);

/// <summary>Ensures that an asset pack is available locally, optionally requiring the latest version.</summary>
/// <param name="assetPack">The <see cref="BAAssetPack" /> to make available.</param>
/// <param name="requireLatestVersion">If <see langword="true" />, checks for updates before making the asset pack available.</param>
/// <param name="completionHandler">A completion handler called with an optional error when the operation completes.</param>
[TV (26, 4), Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4)]
[Export ("ensureLocalAvailabilityOfAssetPack:requireLatestVersion:completionHandler:")]
[Async]
void EnsureLocalAvailability (BAAssetPack assetPack, bool requireLatestVersion, BAAssetPackManagerEnsureLocalAvailabilityCompletionHandler completionHandler);
}

[TV (26, 0), iOS (26, 0), MacCatalyst (26, 0), Mac (26, 0)]
Expand Down
3 changes: 3 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9824,13 +9824,16 @@ M:BackgroundAssets.BAAssetPackManager.CheckForUpdates(BackgroundAssets.BAAssetPa
M:BackgroundAssets.BAAssetPackManager.CheckForUpdatesAsync
M:BackgroundAssets.BAAssetPackManager.Dispose(System.Boolean)
M:BackgroundAssets.BAAssetPackManager.EnsureLocalAvailability(BackgroundAssets.BAAssetPack,BackgroundAssets.BAAssetPackManagerEnsureLocalAvailabilityCompletionHandler)
M:BackgroundAssets.BAAssetPackManager.EnsureLocalAvailabilityAsync(BackgroundAssets.BAAssetPack,System.Boolean)
M:BackgroundAssets.BAAssetPackManager.EnsureLocalAvailabilityAsync(BackgroundAssets.BAAssetPack)
M:BackgroundAssets.BAAssetPackManager.GetAllAssetPacks(BackgroundAssets.BAAssetPackManagerGetAllAssetPacksCompletionHandler)
M:BackgroundAssets.BAAssetPackManager.GetAllAssetPacksAsync
M:BackgroundAssets.BAAssetPackManager.GetAssetPack(System.String,BackgroundAssets.BAAssetPackManagerGetAssetPackCompletionHandler)
M:BackgroundAssets.BAAssetPackManager.GetAssetPackAsync(System.String)
M:BackgroundAssets.BAAssetPackManager.GetContents(System.String,System.String,Foundation.NSDataReadingOptions,Foundation.NSError@)
M:BackgroundAssets.BAAssetPackManager.GetFileDescriptor(System.String,System.String,Foundation.NSError@)
M:BackgroundAssets.BAAssetPackManager.GetLocalStatusAsync(System.String)
M:BackgroundAssets.BAAssetPackManager.GetRelativeStatusAsync(BackgroundAssets.BAAssetPack)
M:BackgroundAssets.BAAssetPackManager.GetStatus(System.String,BackgroundAssets.BAAssetPackManagerGetStatusCompletionHandler)
M:BackgroundAssets.BAAssetPackManager.GetStatusAsync(System.String)
M:BackgroundAssets.BAAssetPackManager.GetUrl(System.String,Foundation.NSError@)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading