1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern "C" {
    pub static BAErrorDomain: &'static NSString;
}

// 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 = "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);
}