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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// A representation of a manifest that lists asset packs that are available to download.
///
/// This class applies only when you want to manage your asset packs manually. Don’t use this class if you want to opt in to automatic management of asset packs.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/baassetpackmanifest?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct BAAssetPackManifest;
);
unsafe impl Send for BAAssetPackManifest {}
unsafe impl Sync for BAAssetPackManifest {}
extern_conformance!(
unsafe impl NSObjectProtocol for BAAssetPackManifest {}
);
impl BAAssetPackManifest {
extern_methods!(
#[cfg(feature = "BAAssetPack")]
/// The asset packs that are available to download.
#[unsafe(method(assetPacks))]
#[unsafe(method_family = none)]
pub unsafe fn assetPacks(&self) -> Retained<NSSet<BAAssetPack>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// Initializes a representation of a manifest in memory given a URL to the manifest’s representation as a JSON file on disk.
/// - Parameters:
/// - URL: A URL to a local JSON file.
/// - applicationGroupIdentifier: The identifier of the application group in which to store unmanaged asset packs that are downloaded from the manifest.
/// - error: A pointer to an error that will be set if an error occurs.
#[unsafe(method(initWithContentsOfURL:applicationGroupIdentifier:error:_))]
#[unsafe(method_family = init)]
pub unsafe fn initWithContentsOfURL_applicationGroupIdentifier_error(
this: Allocated<Self>,
url: &NSURL,
application_group_identifier: &NSString,
) -> Result<Retained<Self>, Retained<NSError>>;
/// Initializes a representation of a manifest in memory from JSON-encoded data.
/// - Parameters:
/// - data: JSON-encoded data.
/// - applicationGroupIdentifier: The identifier of the application group in which to store unmanaged asset packs that are downloaded from the manifest.
/// - error: A pointer to an error that will be set if an error occurs.
#[unsafe(method(initFromData:applicationGroupIdentifier:error:_))]
#[unsafe(method_family = init)]
pub unsafe fn initFromData_applicationGroupIdentifier_error(
this: Allocated<Self>,
data: &NSData,
application_group_identifier: &NSString,
) -> Result<Retained<Self>, Retained<NSError>>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[cfg(feature = "BADownload")]
/// Creates download objects for every asset pack in this manifest.
///
/// The returned download objects can be scheduled with the download manager.
/// - Returns: A collection of download objects.
/// - Remark: Use this method in your main app; use `-allDownloadsForContentRequest:` in your downloader extension.
#[unsafe(method(allDownloads))]
#[unsafe(method_family = none)]
pub unsafe fn allDownloads(&self) -> Retained<NSSet<BADownload>>;
#[cfg(all(feature = "BADownload", feature = "BATypes"))]
/// Creates download objects for every asset pack in this manifest.
///
/// The returned download objects can be scheduled with the download manager.
/// - Parameter contentRequest: The content request for the current extension invocation.
/// - Returns: A collection of download objects.
/// - Remark: Use this method in your downloader extension; use `-allDownloads` instead in your main app.
#[unsafe(method(allDownloadsForContentRequest:))]
#[unsafe(method_family = none)]
pub unsafe fn allDownloadsForContentRequest(
&self,
content_request: BAContentRequest,
) -> Retained<NSSet<BADownload>>;
);
}