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