objc2_intents/generated/
INStartCallIntentResponse.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INStartCallIntentResponseCode(pub NSInteger);
14impl INStartCallIntentResponseCode {
15 #[doc(alias = "INStartCallIntentResponseCodeUnspecified")]
16 pub const Unspecified: Self = Self(0);
17 #[doc(alias = "INStartCallIntentResponseCodeReady")]
18 pub const Ready: Self = Self(1);
19 #[doc(alias = "INStartCallIntentResponseCodeContinueInApp")]
20 pub const ContinueInApp: Self = Self(2);
21 #[doc(alias = "INStartCallIntentResponseCodeUserConfirmationRequired")]
22 pub const UserConfirmationRequired: Self = Self(3);
23 #[doc(alias = "INStartCallIntentResponseCodeFailure")]
24 pub const Failure: Self = Self(4);
25 #[doc(alias = "INStartCallIntentResponseCodeFailureRequiringAppLaunch")]
26 pub const FailureRequiringAppLaunch: Self = Self(5);
27 #[doc(alias = "INStartCallIntentResponseCodeFailureCallingServiceNotAvailable")]
28 pub const FailureCallingServiceNotAvailable: Self = Self(6);
29 #[doc(alias = "INStartCallIntentResponseCodeFailureContactNotSupportedByApp")]
30 pub const FailureContactNotSupportedByApp: Self = Self(7);
31 #[doc(alias = "INStartCallIntentResponseCodeFailureAirplaneModeEnabled")]
32 pub const FailureAirplaneModeEnabled: Self = Self(8);
33 #[doc(alias = "INStartCallIntentResponseCodeFailureUnableToHandOff")]
34 pub const FailureUnableToHandOff: Self = Self(9);
35 #[doc(alias = "INStartCallIntentResponseCodeFailureAppConfigurationRequired")]
36 pub const FailureAppConfigurationRequired: Self = Self(10);
37 #[doc(alias = "INStartCallIntentResponseCodeFailureCallInProgress")]
38 pub const FailureCallInProgress: Self = Self(11);
39 #[doc(alias = "INStartCallIntentResponseCodeFailureCallRinging")]
40 pub const FailureCallRinging: Self = Self(12);
41 #[doc(alias = "INStartCallIntentResponseCodeFailureRequiringInAppAuthentication")]
42 pub const FailureRequiringInAppAuthentication: Self = Self(13);
43}
44
45unsafe impl Encode for INStartCallIntentResponseCode {
46 const ENCODING: Encoding = NSInteger::ENCODING;
47}
48
49unsafe impl RefEncode for INStartCallIntentResponseCode {
50 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
51}
52
53extern_class!(
54 #[unsafe(super(INIntentResponse, NSObject))]
56 #[derive(Debug, PartialEq, Eq, Hash)]
57 #[cfg(feature = "INIntentResponse")]
58 pub struct INStartCallIntentResponse;
59);
60
61#[cfg(feature = "INIntentResponse")]
62extern_conformance!(
63 unsafe impl NSCoding for INStartCallIntentResponse {}
64);
65
66#[cfg(feature = "INIntentResponse")]
67extern_conformance!(
68 unsafe impl NSCopying for INStartCallIntentResponse {}
69);
70
71#[cfg(feature = "INIntentResponse")]
72unsafe impl CopyingHelper for INStartCallIntentResponse {
73 type Result = Self;
74}
75
76#[cfg(feature = "INIntentResponse")]
77extern_conformance!(
78 unsafe impl NSObjectProtocol for INStartCallIntentResponse {}
79);
80
81#[cfg(feature = "INIntentResponse")]
82extern_conformance!(
83 unsafe impl NSSecureCoding for INStartCallIntentResponse {}
84);
85
86#[cfg(feature = "INIntentResponse")]
87impl INStartCallIntentResponse {
88 extern_methods!(
89 #[unsafe(method(init))]
90 #[unsafe(method_family = init)]
91 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
92
93 #[unsafe(method(initWithCode:userActivity:))]
94 #[unsafe(method_family = init)]
95 pub unsafe fn initWithCode_userActivity(
96 this: Allocated<Self>,
97 code: INStartCallIntentResponseCode,
98 user_activity: Option<&NSUserActivity>,
99 ) -> Retained<Self>;
100
101 #[unsafe(method(code))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn code(&self) -> INStartCallIntentResponseCode;
104 );
105}
106
107#[cfg(feature = "INIntentResponse")]
109impl INStartCallIntentResponse {
110 extern_methods!(
111 #[unsafe(method(new))]
112 #[unsafe(method_family = new)]
113 pub unsafe fn new() -> Retained<Self>;
114 );
115}