objc2_background_assets/generated/BAManagedAssetPackDownloadDelegate.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 /// An object that handles status updates when downloading an asset pack.
12 ///
13 /// See also [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/bamanagedassetpackdownloaddelegate?language=objc)
14 pub unsafe trait BAManagedAssetPackDownloadDelegate:
15 NSObjectProtocol + Send + Sync
16 {
17 #[cfg(feature = "BAAssetPack")]
18 /// Notifies the receiver that the download began or resumed after being paused.
19 /// - Parameter assetPack: The asset pack.
20 #[optional]
21 #[unsafe(method(downloadOfAssetPackBegan:))]
22 #[unsafe(method_family = none)]
23 unsafe fn downloadOfAssetPackBegan(&self, asset_pack: &BAAssetPack);
24
25 #[cfg(feature = "BAAssetPack")]
26 /// Notifies the receiver that the download paused.
27 /// - Parameter assetPack: The asset pack.
28 #[optional]
29 #[unsafe(method(downloadOfAssetPackPaused:))]
30 #[unsafe(method_family = none)]
31 unsafe fn downloadOfAssetPackPaused(&self, asset_pack: &BAAssetPack);
32
33 #[cfg(feature = "BAAssetPack")]
34 /// Notifies the receiver that the download is in progress.
35 /// - Parameters:
36 /// - assetPack: The asset pack.
37 /// - progress: The download progress.
38 #[optional]
39 #[unsafe(method(downloadOfAssetPack:hasProgress:))]
40 #[unsafe(method_family = none)]
41 unsafe fn downloadOfAssetPack_hasProgress(
42 &self,
43 asset_pack: &BAAssetPack,
44 progress: &NSProgress,
45 );
46
47 #[cfg(feature = "BAAssetPack")]
48 /// Notifies the receiver that the download completed and that the asset pack is available locally.
49 /// - Parameter assetPack: The asset pack.
50 #[optional]
51 #[unsafe(method(downloadOfAssetPackFinished:))]
52 #[unsafe(method_family = none)]
53 unsafe fn downloadOfAssetPackFinished(&self, asset_pack: &BAAssetPack);
54
55 #[cfg(feature = "BAAssetPack")]
56 /// Notifies the receiver that the download failed.
57 /// - Parameters:
58 /// - assetPack: The asset pack.
59 /// - error: The error that occurred.
60 #[optional]
61 #[unsafe(method(downloadOfAssetPack:failedWithError:))]
62 #[unsafe(method_family = none)]
63 unsafe fn downloadOfAssetPack_failedWithError(
64 &self,
65 asset_pack: &BAAssetPack,
66 error: &NSError,
67 );
68 }
69);