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 NSCoding for BAURLDownload {}
19
20#[cfg(feature = "BADownload")]
21unsafe impl NSCopying for BAURLDownload {}
22
23#[cfg(feature = "BADownload")]
24unsafe impl CopyingHelper for BAURLDownload {
25    type Result = Self;
26}
27
28#[cfg(feature = "BADownload")]
29unsafe impl NSObjectProtocol for BAURLDownload {}
30
31#[cfg(feature = "BADownload")]
32unsafe impl NSSecureCoding for BAURLDownload {}
33
34#[cfg(feature = "BADownload")]
35impl BAURLDownload {
36    extern_methods!(
37        #[unsafe(method(new))]
38        #[unsafe(method_family = new)]
39        pub unsafe fn new() -> Retained<Self>;
40
41        #[unsafe(method(init))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45        /// Constructs a download object to represent the download of a asset located inside of the provided
46        /// `request.`
47        /// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
48        ///
49        /// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
50        ///
51        /// 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.
52        /// If the size does not match the file being downloaded, then the download will fail.
53        ///
54        /// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
55        #[unsafe(method(initWithIdentifier:request:fileSize:applicationGroupIdentifier:))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn initWithIdentifier_request_fileSize_applicationGroupIdentifier(
58            this: Allocated<Self>,
59            identifier: &NSString,
60            request: &NSURLRequest,
61            file_size: NSUInteger,
62            application_group_identifier: &NSString,
63        ) -> Retained<Self>;
64
65        /// Constructs a download object to represent the download of a asset located inside of the provided
66        /// `request.`
67        /// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
68        ///
69        /// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
70        ///
71        /// Parameter `essential`: Whether the download is essential. See
72        /// `BADownload.isEssential.`Default is false.
73        ///
74        /// 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.
75        /// If the size does not match the file being downloaded, then the download will fail.
76        ///
77        /// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
78        ///
79        /// Parameter `priority`: A priority between
80        /// `BADownloaderPriorityMin`-
81        /// `BADownloaderPriorityMax`which is used to order the downloads for this process.
82        /// It is recommended to use
83        /// `BADownloaderPriorityDefault`if download priority does not matter.
84        #[unsafe(method(initWithIdentifier:request:essential:fileSize:applicationGroupIdentifier:priority:))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn initWithIdentifier_request_essential_fileSize_applicationGroupIdentifier_priority(
87            this: Allocated<Self>,
88            identifier: &NSString,
89            request: &NSURLRequest,
90            essential: bool,
91            file_size: NSUInteger,
92            application_group_identifier: &NSString,
93            priority: BADownloaderPriority,
94        ) -> Retained<Self>;
95
96        /// Constructs a download object to represent the download of a asset located inside of the provided
97        /// `request.`
98        /// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
99        ///
100        /// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
101        ///
102        /// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
103        #[deprecated]
104        #[unsafe(method(initWithIdentifier:request:applicationGroupIdentifier:))]
105        #[unsafe(method_family = init)]
106        pub unsafe fn initWithIdentifier_request_applicationGroupIdentifier(
107            this: Allocated<Self>,
108            identifier: &NSString,
109            request: &NSURLRequest,
110            application_group_identifier: &NSString,
111        ) -> Retained<Self>;
112
113        /// Constructs a download object to represent the download of a asset located inside of the provided
114        /// `request.`
115        /// Parameter `identifier`: A unique identifier that is used to track the download across the app and extension.
116        ///
117        /// Parameter `request`: The request used to perform the download. The URL provided inside of the request must be a https scheme.
118        ///
119        /// Parameter `applicationGroupIdentifier`: The identifier of the application group that should used to store the finished download.
120        ///
121        /// Parameter `priority`: A priority between
122        /// `BADownloaderPriorityMin`-
123        /// `BADownloaderPriorityMax`which is used to order the downloads for this process.
124        /// It is recommended to use
125        /// `BADownloaderPriorityDefault`if download priority does not matter.
126        #[deprecated]
127        #[unsafe(method(initWithIdentifier:request:applicationGroupIdentifier:priority:))]
128        #[unsafe(method_family = init)]
129        pub unsafe fn initWithIdentifier_request_applicationGroupIdentifier_priority(
130            this: Allocated<Self>,
131            identifier: &NSString,
132            request: &NSURLRequest,
133            application_group_identifier: &NSString,
134            priority: BADownloaderPriority,
135        ) -> Retained<Self>;
136    );
137}