objc2-intents 0.3.2

Bindings to the Intents 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::*;

/// [Apple's documentation](https://developer.apple.com/documentation/intents/instartaudiocallintentresponsecode?language=objc)
// NS_ENUM
#[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INStartAudioCallIntentResponseCode(pub NSInteger);
impl INStartAudioCallIntentResponseCode {
    #[doc(alias = "INStartAudioCallIntentResponseCodeUnspecified")]
    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
    pub const Unspecified: Self = Self(0);
    #[doc(alias = "INStartAudioCallIntentResponseCodeReady")]
    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
    pub const Ready: Self = Self(1);
    #[doc(alias = "INStartAudioCallIntentResponseCodeContinueInApp")]
    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
    pub const ContinueInApp: Self = Self(2);
    #[doc(alias = "INStartAudioCallIntentResponseCodeFailure")]
    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
    pub const Failure: Self = Self(3);
    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureRequiringAppLaunch")]
    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
    pub const FailureRequiringAppLaunch: Self = Self(4);
    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureAppConfigurationRequired")]
    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
    pub const FailureAppConfigurationRequired: Self = Self(5);
    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureCallingServiceNotAvailable")]
    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
    pub const FailureCallingServiceNotAvailable: Self = Self(6);
    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureContactNotSupportedByApp")]
    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
    pub const FailureContactNotSupportedByApp: Self = Self(7);
    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureNoValidNumber")]
    pub const FailureNoValidNumber: Self = Self(8);
}

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

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

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/instartaudiocallintentresponse?language=objc)
    #[unsafe(super(INIntentResponse, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "INIntentResponse")]
    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
    pub struct INStartAudioCallIntentResponse;
);

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSCoding for INStartAudioCallIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSCopying for INStartAudioCallIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
unsafe impl CopyingHelper for INStartAudioCallIntentResponse {
    type Result = Self;
}

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSObjectProtocol for INStartAudioCallIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSSecureCoding for INStartAudioCallIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
impl INStartAudioCallIntentResponse {
    extern_methods!(
        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
        #[unsafe(method(initWithCode:userActivity:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCode_userActivity(
            this: Allocated<Self>,
            code: INStartAudioCallIntentResponseCode,
            user_activity: Option<&NSUserActivity>,
        ) -> Retained<Self>;

        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
        #[unsafe(method(code))]
        #[unsafe(method_family = none)]
        pub unsafe fn code(&self) -> INStartAudioCallIntentResponseCode;
    );
}

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