objc2_background_assets/generated/BAAssetPackStatus.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// The status of an asset pack.
8///
9/// See also [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/baassetpackstatus?language=objc)
10// NS_OPTIONS
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct BAAssetPackStatus(pub NSUInteger);
14bitflags::bitflags! {
15 impl BAAssetPackStatus: NSUInteger {
16/// A status value that indicates that the asset pack is available to download.
17 #[doc(alias = "BAAssetPackStatusDownloadAvailable")]
18 const DownloadAvailable = 1<<0;
19/// A status value that indicates that an update to the asset pack is available to download.
20 #[doc(alias = "BAAssetPackStatusUpdateAvailable")]
21 const UpdateAvailable = 1<<1;
22/// A status value that indicates that the downloaded asset pack is up to date.
23 #[doc(alias = "BAAssetPackStatusUpToDate")]
24 const UpToDate = 1<<2;
25/// A status value that indicates that the downloaded asset pack is out of date.
26///
27/// The presence of this status value doesn’t necessarily imply that an update to the asset pack can be downloaded over the current network connection. Check for the presence of ``BAAssetPackStatus/updateAvailable`` to determine whether an update can currently be downloaded.
28 #[doc(alias = "BAAssetPackStatusOutOfDate")]
29 const OutOfDate = 1<<3;
30/// A status value that indicates that the asset pack is no longer available to download.
31///
32/// Obsolete asset packs can’t be updated, and they also can’t be redownloaded once removed.
33 #[doc(alias = "BAAssetPackStatusObsolete")]
34 const Obsolete = 1<<4;
35/// A status value that indicates that the system is currently downloading the asset pack.
36 #[doc(alias = "BAAssetPackStatusDownloading")]
37 const Downloading = 1<<5;
38/// A status value that indicates that the system finished downloading the asset pack.
39 #[doc(alias = "BAAssetPackStatusDownloaded")]
40 const Downloaded = 1<<6;
41 }
42}
43
44unsafe impl Encode for BAAssetPackStatus {
45 const ENCODING: Encoding = NSUInteger::ENCODING;
46}
47
48unsafe impl RefEncode for BAAssetPackStatus {
49 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
50}