icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::BackgroundAssets::*;
use crate::Foundation::*;

ns_enum!(
    #[underlying(NSInteger)]
    pub enum BADownloadState {
        BADownloadStateFailed = -1,
        BADownloadStateCreated = 0,
        BADownloadStateWaiting = 1,
        BADownloadStateDownloading = 2,
        BADownloadStateFinished = 3,
    }
);

typed_extensible_enum!(
    pub type BADownloaderPriority = NSInteger;
);

extern_static!(BADownloaderPriorityMin: BADownloaderPriority);

extern_static!(BADownloaderPriorityDefault: BADownloaderPriority);

extern_static!(BADownloaderPriorityMax: BADownloaderPriority);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "BackgroundAssets_BADownload")]
    pub struct BADownload;

    #[cfg(feature = "BackgroundAssets_BADownload")]
    unsafe impl ClassType for BADownload {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "BackgroundAssets_BADownload")]
unsafe impl NSCoding for BADownload {}

#[cfg(feature = "BackgroundAssets_BADownload")]
unsafe impl NSCopying for BADownload {}

#[cfg(feature = "BackgroundAssets_BADownload")]
unsafe impl NSObjectProtocol for BADownload {}

#[cfg(feature = "BackgroundAssets_BADownload")]
unsafe impl NSSecureCoding for BADownload {}

extern_methods!(
    #[cfg(feature = "BackgroundAssets_BADownload")]
    unsafe impl BADownload {
        #[method(state)]
        pub unsafe fn state(&self) -> BADownloadState;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other identifier)]
        pub unsafe fn identifier(&self) -> Id<NSString>;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other uniqueIdentifier)]
        pub unsafe fn uniqueIdentifier(&self) -> Id<NSString>;

        #[method(priority)]
        pub unsafe fn priority(&self) -> BADownloaderPriority;

        #[method(isEssential)]
        pub unsafe fn isEssential(&self) -> bool;

        #[method_id(@__retain_semantics CopyOrMutCopy copyAsNonEssential)]
        pub unsafe fn copyAsNonEssential(&self) -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);