objc2_background_assets/generated/
BAAppExtensionInfo.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/baappextensioninfo?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct BAAppExtensionInfo;
14);
15
16unsafe impl Send for BAAppExtensionInfo {}
17
18unsafe impl Sync for BAAppExtensionInfo {}
19
20extern_conformance!(
21    unsafe impl NSCoding for BAAppExtensionInfo {}
22);
23
24extern_conformance!(
25    unsafe impl NSObjectProtocol for BAAppExtensionInfo {}
26);
27
28extern_conformance!(
29    unsafe impl NSSecureCoding for BAAppExtensionInfo {}
30);
31
32impl BAAppExtensionInfo {
33    extern_methods!(
34        /// The number of bytes remaining that can be scheduled if the total download size is restricted.
35        ///
36        /// When a download is restricted, your extension can only schedule up to its `BADownloadAllowance`
37        /// defined in your app's `Info.plist`. This result tells you the number of bytes remaining that can be scheduled
38        /// before the application is launched. Once the application is launched, this restriction is removed.
39        ///
40        /// Returns: The result is `nil` if downloads are not restricted. It returns a valid number with the remaining available download size otherwise.
41        #[unsafe(method(restrictedDownloadSizeRemaining))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn restrictedDownloadSizeRemaining(&self) -> Option<Retained<NSNumber>>;
44
45        /// The number of bytes remaining that can be scheduled if the total download size of optional assets is restricted.
46        ///
47        /// When a download is restricted, your extension can only schedule up to its `BAEssentialDownloadAllowance`
48        /// defined in your app's `Info.plist`. This result tells you the number of bytes remaining that can be scheduled
49        /// before the application is launched. Once the application is launched, this restriction is removed.
50        ///
51        /// Returns: The result is `nil` if downloads are not restricted. It returns a valid number with the remaining available download size otherwise.
52        #[unsafe(method(restrictedEssentialDownloadSizeRemaining))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn restrictedEssentialDownloadSizeRemaining(&self)
55            -> Option<Retained<NSNumber>>;
56
57        #[unsafe(method(init))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
60
61        #[unsafe(method(new))]
62        #[unsafe(method_family = new)]
63        pub unsafe fn new() -> Retained<Self>;
64    );
65}