objc2-background-assets 0.3.2

Bindings to the BackgroundAssets framework
Documentation
//! 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 "C" {
    /// The error domain used for Background Assets errors.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/baerrordomain?language=objc)
    pub static BAErrorDomain: &'static NSString;
}

/// [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/baerrorcode?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BAErrorCode(pub NSInteger);
impl BAErrorCode {
    #[doc(alias = "BAErrorCodeDownloadInvalid")]
    pub const DownloadInvalid: Self = Self(0);
    #[doc(alias = "BAErrorCodeCallFromExtensionNotAllowed")]
    pub const CallFromExtensionNotAllowed: Self = Self(50);
    #[doc(alias = "BAErrorCodeCallFromInactiveProcessNotAllowed")]
    pub const CallFromInactiveProcessNotAllowed: Self = Self(51);
    #[doc(alias = "BAErrorCodeCallerConnectionNotAccepted")]
    pub const CallerConnectionNotAccepted: Self = Self(55);
    #[doc(alias = "BAErrorCodeCallerConnectionInvalid")]
    pub const CallerConnectionInvalid: Self = Self(56);
    #[doc(alias = "BAErrorCodeDownloadAlreadyScheduled")]
    pub const DownloadAlreadyScheduled: Self = Self(100);
    #[doc(alias = "BAErrorCodeDownloadNotScheduled")]
    pub const DownloadNotScheduled: Self = Self(101);
    #[doc(alias = "BAErrorCodeDownloadFailedToStart")]
    pub const DownloadFailedToStart: Self = Self(102);
    #[doc(alias = "BAErrorCodeDownloadAlreadyFailed")]
    pub const DownloadAlreadyFailed: Self = Self(103);
    #[doc(alias = "BAErrorCodeDownloadEssentialDownloadNotPermitted")]
    pub const DownloadEssentialDownloadNotPermitted: Self = Self(109);
    #[doc(alias = "BAErrorCodeDownloadBackgroundActivityProhibited")]
    pub const DownloadBackgroundActivityProhibited: Self = Self(111);
    #[doc(alias = "BAErrorCodeDownloadWouldExceedAllowance")]
    pub const DownloadWouldExceedAllowance: Self = Self(112);
    #[doc(alias = "BAErrorCodeDownloadDoesNotExist")]
    pub const DownloadDoesNotExist: Self = Self(113);
    #[doc(alias = "BAErrorCodeSessionDownloadDisallowedByDomain")]
    pub const SessionDownloadDisallowedByDomain: Self = Self(202);
    #[doc(alias = "BAErrorCodeSessionDownloadDisallowedByAllowance")]
    pub const SessionDownloadDisallowedByAllowance: Self = Self(203);
    #[doc(alias = "BAErrorCodeSessionDownloadAllowanceExceeded")]
    pub const SessionDownloadAllowanceExceeded: Self = Self(204);
    #[doc(alias = "BAErrorCodeSessionDownloadNotPermittedBeforeAppLaunch")]
    pub const SessionDownloadNotPermittedBeforeAppLaunch: Self = Self(206);
}

unsafe impl Encode for BAErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for BAErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}