objc2_intents/generated/
INStartAudioCallIntentResponse.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/intents/instartaudiocallintentresponsecode?language=objc)
10// NS_ENUM
11#[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct INStartAudioCallIntentResponseCode(pub NSInteger);
15impl INStartAudioCallIntentResponseCode {
16    #[doc(alias = "INStartAudioCallIntentResponseCodeUnspecified")]
17    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
18    pub const Unspecified: Self = Self(0);
19    #[doc(alias = "INStartAudioCallIntentResponseCodeReady")]
20    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
21    pub const Ready: Self = Self(1);
22    #[doc(alias = "INStartAudioCallIntentResponseCodeContinueInApp")]
23    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
24    pub const ContinueInApp: Self = Self(2);
25    #[doc(alias = "INStartAudioCallIntentResponseCodeFailure")]
26    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
27    pub const Failure: Self = Self(3);
28    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureRequiringAppLaunch")]
29    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
30    pub const FailureRequiringAppLaunch: Self = Self(4);
31    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureAppConfigurationRequired")]
32    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
33    pub const FailureAppConfigurationRequired: Self = Self(5);
34    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureCallingServiceNotAvailable")]
35    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
36    pub const FailureCallingServiceNotAvailable: Self = Self(6);
37    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureContactNotSupportedByApp")]
38    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
39    pub const FailureContactNotSupportedByApp: Self = Self(7);
40    #[doc(alias = "INStartAudioCallIntentResponseCodeFailureNoValidNumber")]
41    pub const FailureNoValidNumber: Self = Self(8);
42}
43
44unsafe impl Encode for INStartAudioCallIntentResponseCode {
45    const ENCODING: Encoding = NSInteger::ENCODING;
46}
47
48unsafe impl RefEncode for INStartAudioCallIntentResponseCode {
49    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
50}
51
52extern_class!(
53    /// [Apple's documentation](https://developer.apple.com/documentation/intents/instartaudiocallintentresponse?language=objc)
54    #[unsafe(super(INIntentResponse, NSObject))]
55    #[derive(Debug, PartialEq, Eq, Hash)]
56    #[cfg(feature = "INIntentResponse")]
57    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
58    pub struct INStartAudioCallIntentResponse;
59);
60
61#[cfg(feature = "INIntentResponse")]
62extern_conformance!(
63    unsafe impl NSCoding for INStartAudioCallIntentResponse {}
64);
65
66#[cfg(feature = "INIntentResponse")]
67extern_conformance!(
68    unsafe impl NSCopying for INStartAudioCallIntentResponse {}
69);
70
71#[cfg(feature = "INIntentResponse")]
72unsafe impl CopyingHelper for INStartAudioCallIntentResponse {
73    type Result = Self;
74}
75
76#[cfg(feature = "INIntentResponse")]
77extern_conformance!(
78    unsafe impl NSObjectProtocol for INStartAudioCallIntentResponse {}
79);
80
81#[cfg(feature = "INIntentResponse")]
82extern_conformance!(
83    unsafe impl NSSecureCoding for INStartAudioCallIntentResponse {}
84);
85
86#[cfg(feature = "INIntentResponse")]
87impl INStartAudioCallIntentResponse {
88    extern_methods!(
89        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
90        #[unsafe(method(init))]
91        #[unsafe(method_family = init)]
92        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
95        #[unsafe(method(initWithCode:userActivity:))]
96        #[unsafe(method_family = init)]
97        pub unsafe fn initWithCode_userActivity(
98            this: Allocated<Self>,
99            code: INStartAudioCallIntentResponseCode,
100            user_activity: Option<&NSUserActivity>,
101        ) -> Retained<Self>;
102
103        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
104        #[unsafe(method(code))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn code(&self) -> INStartAudioCallIntentResponseCode;
107    );
108}
109
110/// Methods declared on superclass `NSObject`.
111#[cfg(feature = "INIntentResponse")]
112impl INStartAudioCallIntentResponse {
113    extern_methods!(
114        #[unsafe(method(new))]
115        #[unsafe(method_family = new)]
116        pub unsafe fn new() -> Retained<Self>;
117    );
118}