objc2_background_assets/generated/
BAURLDownload.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/baurldownload?language=objc)
11    #[unsafe(super(BADownload, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(feature = "BADownload")]
14    pub struct BAURLDownload;
15);
16
17#[cfg(feature = "BADownload")]
18unsafe impl Send for BAURLDownload {}
19
20#[cfg(feature = "BADownload")]
21unsafe impl Sync for BAURLDownload {}
22
23#[cfg(feature = "BADownload")]
24extern_conformance!(
25    unsafe impl NSCoding for BAURLDownload {}
26);
27
28#[cfg(feature = "BADownload")]
29extern_conformance!(
30    unsafe impl NSCopying for BAURLDownload {}
31);
32
33#[cfg(feature = "BADownload")]
34unsafe impl CopyingHelper for BAURLDownload {
35    type Result = Self;
36}
37
38#[cfg(feature = "BADownload")]
39extern_conformance!(
40    unsafe impl NSObjectProtocol for BAURLDownload {}
41);
42
43#[cfg(feature = "BADownload")]
44extern_conformance!(
45    unsafe impl NSSecureCoding for BAURLDownload {}
46);
47
48#[cfg(feature = "BADownload")]
49impl BAURLDownload {
50    extern_methods!(
51        #[unsafe(method(new))]
52        #[unsafe(method_family = new)]
53        pub unsafe fn new() -> Retained<Self>;
54
55        #[unsafe(method(init))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59        /// Constructs a download object to represent the download of a asset located inside of the provided
60        /// `request.`
61        /// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
62        ///
63        /// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
64        ///
65        /// 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.
66        /// If the size does not match the file being downloaded, then the download will fail.
67        ///
68        /// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
69        #[unsafe(method(initWithIdentifier:request:fileSize:applicationGroupIdentifier:))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn initWithIdentifier_request_fileSize_applicationGroupIdentifier(
72            this: Allocated<Self>,
73            identifier: &NSString,
74            request: &NSURLRequest,
75            file_size: NSUInteger,
76            application_group_identifier: &NSString,
77        ) -> Retained<Self>;
78
79        /// Constructs a download object to represent the download of a asset located inside of the provided
80        /// `request.`
81        /// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
82        ///
83        /// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
84        ///
85        /// Parameter `essential`: Whether the download is essential. See
86        /// `BADownload.isEssential.`Default is false.
87        ///
88        /// 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.
89        /// If the size does not match the file being downloaded, then the download will fail.
90        ///
91        /// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
92        ///
93        /// Parameter `priority`: A priority between
94        /// `BADownloaderPriorityMin`-
95        /// `BADownloaderPriorityMax`which is used to order the downloads for this process.
96        /// It is recommended to use
97        /// `BADownloaderPriorityDefault`if download priority does not matter.
98        #[unsafe(method(initWithIdentifier:request:essential:fileSize:applicationGroupIdentifier:priority:))]
99        #[unsafe(method_family = init)]
100        pub unsafe fn initWithIdentifier_request_essential_fileSize_applicationGroupIdentifier_priority(
101            this: Allocated<Self>,
102            identifier: &NSString,
103            request: &NSURLRequest,
104            essential: bool,
105            file_size: NSUInteger,
106            application_group_identifier: &NSString,
107            priority: BADownloaderPriority,
108        ) -> Retained<Self>;
109
110        /// Constructs a download object to represent the download of a asset located inside of the provided
111        /// `request.`
112        /// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
113        ///
114        /// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
115        ///
116        /// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
117        #[deprecated]
118        #[unsafe(method(initWithIdentifier:request:applicationGroupIdentifier:))]
119        #[unsafe(method_family = init)]
120        pub unsafe fn initWithIdentifier_request_applicationGroupIdentifier(
121            this: Allocated<Self>,
122            identifier: &NSString,
123            request: &NSURLRequest,
124            application_group_identifier: &NSString,
125        ) -> Retained<Self>;
126
127        /// Constructs a download object to represent the download of a asset located inside of the provided
128        /// `request.`
129        /// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
130        ///
131        /// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
132        ///
133        /// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
134        ///
135        /// Parameter `priority`: A priority between
136        /// `BADownloaderPriorityMin`-
137        /// `BADownloaderPriorityMax`which is used to order the downloads for this process.
138        /// It is recommended to use
139        /// `BADownloaderPriorityDefault`if download priority does not matter.
140        #[deprecated]
141        #[unsafe(method(initWithIdentifier:request:applicationGroupIdentifier:priority:))]
142        #[unsafe(method_family = init)]
143        pub unsafe fn initWithIdentifier_request_applicationGroupIdentifier_priority(
144            this: Allocated<Self>,
145            identifier: &NSString,
146            request: &NSURLRequest,
147            application_group_identifier: &NSString,
148            priority: BADownloaderPriority,
149        ) -> Retained<Self>;
150    );
151}