objc2-call-kit 0.3.2

Bindings to the CallKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/callkit/cxaction?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CXAction;
);

extern_conformance!(
    unsafe impl NSCoding for CXAction {}
);

extern_conformance!(
    unsafe impl NSCopying for CXAction {}
);

unsafe impl CopyingHelper for CXAction {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for CXAction {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for CXAction {}
);

impl CXAction {
    extern_methods!(
        /// Unique ID
        #[unsafe(method(UUID))]
        #[unsafe(method_family = none)]
        pub unsafe fn UUID(&self) -> Retained<NSUUID>;

        /// Whether all actions are either fulfilled or failed
        #[unsafe(method(isComplete))]
        #[unsafe(method_family = none)]
        pub unsafe fn isComplete(&self) -> bool;

        #[unsafe(method(timeoutDate))]
        #[unsafe(method_family = none)]
        pub unsafe fn timeoutDate(&self) -> Retained<NSDate>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        /// # Safety
        ///
        /// `a_decoder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            a_decoder: &NSCoder,
        ) -> Option<Retained<Self>>;

        /// Report successful execution of the receiver.
        #[unsafe(method(fulfill))]
        #[unsafe(method_family = none)]
        pub unsafe fn fulfill(&self);

        /// Report failed execution of the receiver.
        #[unsafe(method(fail))]
        #[unsafe(method_family = none)]
        pub unsafe fn fail(&self);
    );
}

/// Methods declared on superclass `NSObject`.
impl CXAction {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}