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::DeviceCheck::*;
use crate::Foundation::*;

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

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

#[cfg(feature = "DeviceCheck_DCDevice")]
unsafe impl NSObjectProtocol for DCDevice {}

extern_methods!(
    #[cfg(feature = "DeviceCheck_DCDevice")]
    unsafe impl DCDevice {
        #[method_id(@__retain_semantics Other currentDevice)]
        pub unsafe fn currentDevice() -> Id<DCDevice>;

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

        #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSError"))]
        #[method(generateTokenWithCompletionHandler:)]
        pub unsafe fn generateTokenWithCompletionHandler(
            &self,
            completion: &Block<(*mut NSData, *mut NSError), ()>,
        );
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "DeviceCheck_DCDevice")]
    unsafe impl DCDevice {
        #[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>;
    }
);