objc2_intents/generated/
INHangUpCallIntentResponse.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 INHangUpCallIntentResponseCode(pub NSInteger);
14impl INHangUpCallIntentResponseCode {
15 #[doc(alias = "INHangUpCallIntentResponseCodeUnspecified")]
16 pub const Unspecified: Self = Self(0);
17 #[doc(alias = "INHangUpCallIntentResponseCodeReady")]
18 pub const Ready: Self = Self(1);
19 #[doc(alias = "INHangUpCallIntentResponseCodeInProgress")]
20 pub const InProgress: Self = Self(2);
21 #[doc(alias = "INHangUpCallIntentResponseCodeSuccess")]
22 pub const Success: Self = Self(3);
23 #[doc(alias = "INHangUpCallIntentResponseCodeFailure")]
24 pub const Failure: Self = Self(4);
25 #[doc(alias = "INHangUpCallIntentResponseCodeFailureRequiringAppLaunch")]
26 pub const FailureRequiringAppLaunch: Self = Self(5);
27 #[doc(alias = "INHangUpCallIntentResponseCodeFailureNoCallToHangUp")]
28 pub const FailureNoCallToHangUp: Self = Self(6);
29}
30
31unsafe impl Encode for INHangUpCallIntentResponseCode {
32 const ENCODING: Encoding = NSInteger::ENCODING;
33}
34
35unsafe impl RefEncode for INHangUpCallIntentResponseCode {
36 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39extern_class!(
40 #[unsafe(super(INIntentResponse, NSObject))]
42 #[derive(Debug, PartialEq, Eq, Hash)]
43 #[cfg(feature = "INIntentResponse")]
44 pub struct INHangUpCallIntentResponse;
45);
46
47#[cfg(feature = "INIntentResponse")]
48extern_conformance!(
49 unsafe impl NSCoding for INHangUpCallIntentResponse {}
50);
51
52#[cfg(feature = "INIntentResponse")]
53extern_conformance!(
54 unsafe impl NSCopying for INHangUpCallIntentResponse {}
55);
56
57#[cfg(feature = "INIntentResponse")]
58unsafe impl CopyingHelper for INHangUpCallIntentResponse {
59 type Result = Self;
60}
61
62#[cfg(feature = "INIntentResponse")]
63extern_conformance!(
64 unsafe impl NSObjectProtocol for INHangUpCallIntentResponse {}
65);
66
67#[cfg(feature = "INIntentResponse")]
68extern_conformance!(
69 unsafe impl NSSecureCoding for INHangUpCallIntentResponse {}
70);
71
72#[cfg(feature = "INIntentResponse")]
73impl INHangUpCallIntentResponse {
74 extern_methods!(
75 #[unsafe(method(init))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
78
79 #[unsafe(method(initWithCode:userActivity:))]
80 #[unsafe(method_family = init)]
81 pub unsafe fn initWithCode_userActivity(
82 this: Allocated<Self>,
83 code: INHangUpCallIntentResponseCode,
84 user_activity: Option<&NSUserActivity>,
85 ) -> Retained<Self>;
86
87 #[unsafe(method(code))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn code(&self) -> INHangUpCallIntentResponseCode;
90 );
91}
92
93#[cfg(feature = "INIntentResponse")]
95impl INHangUpCallIntentResponse {
96 extern_methods!(
97 #[unsafe(method(new))]
98 #[unsafe(method_family = new)]
99 pub unsafe fn new() -> Retained<Self>;
100 );
101}