objc2_intents/generated/
INAnswerCallIntent.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(INIntent, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "INIntent")]
15 pub struct INAnswerCallIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20 unsafe impl NSCoding for INAnswerCallIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25 unsafe impl NSCopying for INAnswerCallIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INAnswerCallIntent {
30 type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for INAnswerCallIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40 unsafe impl NSSecureCoding for INAnswerCallIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INAnswerCallIntent {
45 extern_methods!(
46 #[cfg(feature = "INCallAudioRoute")]
47 #[unsafe(method(initWithAudioRoute:callIdentifier:))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn initWithAudioRoute_callIdentifier(
50 this: Allocated<Self>,
51 audio_route: INCallAudioRoute,
52 call_identifier: Option<&NSString>,
53 ) -> Retained<Self>;
54
55 #[cfg(feature = "INCallAudioRoute")]
56 #[unsafe(method(audioRoute))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn audioRoute(&self) -> INCallAudioRoute;
59
60 #[unsafe(method(callIdentifier))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn callIdentifier(&self) -> Option<Retained<NSString>>;
63 );
64}
65
66#[cfg(feature = "INIntent")]
68impl INAnswerCallIntent {
69 extern_methods!(
70 #[unsafe(method(init))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
73
74 #[unsafe(method(new))]
75 #[unsafe(method_family = new)]
76 pub unsafe fn new() -> Retained<Self>;
77 );
78}
79
80extern_protocol!(
81 pub unsafe trait INAnswerCallIntentHandling: NSObjectProtocol {
87 #[cfg(all(
88 feature = "INAnswerCallIntentResponse",
89 feature = "INIntent",
90 feature = "INIntentResponse",
91 feature = "block2"
92 ))]
93 #[unsafe(method(handleAnswerCall:completion:))]
105 #[unsafe(method_family = none)]
106 unsafe fn handleAnswerCall_completion(
107 &self,
108 intent: &INAnswerCallIntent,
109 completion: &block2::DynBlock<dyn Fn(NonNull<INAnswerCallIntentResponse>)>,
110 );
111
112 #[cfg(all(
113 feature = "INAnswerCallIntentResponse",
114 feature = "INIntent",
115 feature = "INIntentResponse",
116 feature = "block2"
117 ))]
118 #[optional]
130 #[unsafe(method(confirmAnswerCall:completion:))]
131 #[unsafe(method_family = none)]
132 unsafe fn confirmAnswerCall_completion(
133 &self,
134 intent: &INAnswerCallIntent,
135 completion: &block2::DynBlock<dyn Fn(NonNull<INAnswerCallIntentResponse>)>,
136 );
137 }
138);