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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
//! 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!(
/// [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/baurldownload?language=objc)
#[unsafe(super(BADownload, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "BADownload")]
pub struct BAURLDownload;
);
#[cfg(feature = "BADownload")]
unsafe impl Send for BAURLDownload {}
#[cfg(feature = "BADownload")]
unsafe impl Sync for BAURLDownload {}
#[cfg(feature = "BADownload")]
extern_conformance!(
unsafe impl NSCoding for BAURLDownload {}
);
#[cfg(feature = "BADownload")]
extern_conformance!(
unsafe impl NSCopying for BAURLDownload {}
);
#[cfg(feature = "BADownload")]
unsafe impl CopyingHelper for BAURLDownload {
type Result = Self;
}
#[cfg(feature = "BADownload")]
extern_conformance!(
unsafe impl NSObjectProtocol for BAURLDownload {}
);
#[cfg(feature = "BADownload")]
extern_conformance!(
unsafe impl NSSecureCoding for BAURLDownload {}
);
#[cfg(feature = "BADownload")]
impl BAURLDownload {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// Constructs a download object to represent the download of a asset located inside of the provided
/// `request.`
/// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
///
/// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
///
/// Parameter `fileSize`: The size of the file to download. This field must be accurate in order to show the user accurate progress during app installation.
/// If the size does not match the file being downloaded, then the download will fail.
///
/// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
#[unsafe(method(initWithIdentifier:request:fileSize:applicationGroupIdentifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithIdentifier_request_fileSize_applicationGroupIdentifier(
this: Allocated<Self>,
identifier: &NSString,
request: &NSURLRequest,
file_size: NSUInteger,
application_group_identifier: &NSString,
) -> Retained<Self>;
/// Constructs a download object to represent the download of a asset located inside of the provided
/// `request.`
/// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
///
/// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
///
/// Parameter `essential`: Whether the download is essential. See
/// `BADownload.isEssential.`Default is false.
///
/// Parameter `fileSize`: The size of the file to download. This field must be accurate in order to show the user accurate progress during app installation.
/// If the size does not match the file being downloaded, then the download will fail.
///
/// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
///
/// Parameter `priority`: A priority between
/// `BADownloaderPriorityMin`-
/// `BADownloaderPriorityMax`which is used to order the downloads for this process.
/// It is recommended to use
/// `BADownloaderPriorityDefault`if download priority does not matter.
#[unsafe(method(initWithIdentifier:request:essential:fileSize:applicationGroupIdentifier:priority:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithIdentifier_request_essential_fileSize_applicationGroupIdentifier_priority(
this: Allocated<Self>,
identifier: &NSString,
request: &NSURLRequest,
essential: bool,
file_size: NSUInteger,
application_group_identifier: &NSString,
priority: BADownloaderPriority,
) -> Retained<Self>;
/// Constructs a download object to represent the download of a asset located inside of the provided
/// `request.`
/// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
///
/// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
///
/// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
#[deprecated]
#[unsafe(method(initWithIdentifier:request:applicationGroupIdentifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithIdentifier_request_applicationGroupIdentifier(
this: Allocated<Self>,
identifier: &NSString,
request: &NSURLRequest,
application_group_identifier: &NSString,
) -> Retained<Self>;
/// Constructs a download object to represent the download of a asset located inside of the provided
/// `request.`
/// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
///
/// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
///
/// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
///
/// Parameter `priority`: A priority between
/// `BADownloaderPriorityMin`-
/// `BADownloaderPriorityMax`which is used to order the downloads for this process.
/// It is recommended to use
/// `BADownloaderPriorityDefault`if download priority does not matter.
#[deprecated]
#[unsafe(method(initWithIdentifier:request:applicationGroupIdentifier:priority:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithIdentifier_request_applicationGroupIdentifier_priority(
this: Allocated<Self>,
identifier: &NSString,
request: &NSURLRequest,
application_group_identifier: &NSString,
priority: BADownloaderPriority,
) -> Retained<Self>;
);
}