objc2_intents/generated/
INStartCallIntent.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/intents/instartcallintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    pub struct INStartCallIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20    unsafe impl NSCoding for INStartCallIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25    unsafe impl NSCopying for INStartCallIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INStartCallIntent {
30    type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for INStartCallIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40    unsafe impl NSSecureCoding for INStartCallIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INStartCallIntent {
45    extern_methods!(
46        #[cfg(all(
47            feature = "INCallAudioRoute",
48            feature = "INCallCapability",
49            feature = "INCallDestinationType",
50            feature = "INCallRecord",
51            feature = "INCallRecordFilter",
52            feature = "INPerson"
53        ))]
54        #[unsafe(method(initWithCallRecordFilter:callRecordToCallBack:audioRoute:destinationType:contacts:callCapability:))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn initWithCallRecordFilter_callRecordToCallBack_audioRoute_destinationType_contacts_callCapability(
57            this: Allocated<Self>,
58            call_record_filter: Option<&INCallRecordFilter>,
59            call_record_to_call_back: Option<&INCallRecord>,
60            audio_route: INCallAudioRoute,
61            destination_type: INCallDestinationType,
62            contacts: Option<&NSArray<INPerson>>,
63            call_capability: INCallCapability,
64        ) -> Retained<Self>;
65
66        #[cfg(feature = "INCallRecordFilter")]
67        #[unsafe(method(callRecordFilter))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn callRecordFilter(&self) -> Option<Retained<INCallRecordFilter>>;
70
71        #[cfg(feature = "INCallRecord")]
72        #[unsafe(method(callRecordToCallBack))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn callRecordToCallBack(&self) -> Option<Retained<INCallRecord>>;
75
76        #[cfg(feature = "INCallAudioRoute")]
77        #[unsafe(method(audioRoute))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn audioRoute(&self) -> INCallAudioRoute;
80
81        #[cfg(feature = "INCallDestinationType")]
82        #[unsafe(method(destinationType))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn destinationType(&self) -> INCallDestinationType;
85
86        #[cfg(feature = "INPerson")]
87        #[unsafe(method(contacts))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn contacts(&self) -> Option<Retained<NSArray<INPerson>>>;
90
91        #[cfg(feature = "INCallCapability")]
92        #[unsafe(method(callCapability))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn callCapability(&self) -> INCallCapability;
95    );
96}
97
98/// Methods declared on superclass `NSObject`.
99#[cfg(feature = "INIntent")]
100impl INStartCallIntent {
101    extern_methods!(
102        #[unsafe(method(init))]
103        #[unsafe(method_family = init)]
104        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
105
106        #[unsafe(method(new))]
107        #[unsafe(method_family = new)]
108        pub unsafe fn new() -> Retained<Self>;
109    );
110}
111
112extern_protocol!(
113    /// Protocol to declare support for handling an INStartCallIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
114    ///
115    /// The minimum requirement for an implementing class is that it should be able to handle the intent. The resolution and confirmation methods are optional. The handling method is always called last, after resolving and confirming the intent.
116    ///
117    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/instartcallintenthandling?language=objc)
118    pub unsafe trait INStartCallIntentHandling: NSObjectProtocol {
119        #[cfg(all(
120            feature = "INIntent",
121            feature = "INIntentResponse",
122            feature = "INStartCallIntentResponse",
123            feature = "block2"
124        ))]
125        /// Handling method - Execute the task represented by the INStartCallIntent that's passed in
126        ///
127        /// Called to actually execute the intent. The app must return a response for this intent.
128        ///
129        ///
130        /// Parameter `intent`: The input intent
131        ///
132        /// Parameter `completion`: The response handling block takes a INStartCallIntentResponse containing the details of the result of having executed the intent
133        ///
134        ///
135        /// See: INStartCallIntentResponse
136        #[unsafe(method(handleStartCall:completion:))]
137        #[unsafe(method_family = none)]
138        unsafe fn handleStartCall_completion(
139            &self,
140            intent: &INStartCallIntent,
141            completion: &block2::DynBlock<dyn Fn(NonNull<INStartCallIntentResponse>)>,
142        );
143
144        #[cfg(all(
145            feature = "INIntent",
146            feature = "INIntentResponse",
147            feature = "INStartCallIntentResponse",
148            feature = "block2"
149        ))]
150        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
151        ///
152        /// Called prior to asking the app to handle the intent. The app should return a response object that contains additional information about the intent, which may be relevant for the system to show the user prior to handling. If unimplemented, the system will assume the intent is valid following resolution, and will assume there is no additional information relevant to this intent.
153        ///
154        ///
155        /// Parameter `intent`: The input intent
156        ///
157        /// Parameter `completion`: The response block contains an INStartCallIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
158        ///
159        ///
160        /// See: INStartCallIntentResponse
161        #[optional]
162        #[unsafe(method(confirmStartCall:completion:))]
163        #[unsafe(method_family = none)]
164        unsafe fn confirmStartCall_completion(
165            &self,
166            intent: &INStartCallIntent,
167            completion: &block2::DynBlock<dyn Fn(NonNull<INStartCallIntentResponse>)>,
168        );
169
170        #[cfg(all(
171            feature = "INCallRecordResolutionResult",
172            feature = "INIntent",
173            feature = "INIntentResolutionResult",
174            feature = "block2"
175        ))]
176        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
177        ///
178        /// Called to make sure the app extension is capable of handling this intent in its current form. This method is for validating if the intent needs any further fleshing out.
179        ///
180        ///
181        /// Parameter `intent`: The input intent
182        ///
183        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
184        ///
185        ///
186        /// See: INIntentResolutionResult
187        #[optional]
188        #[unsafe(method(resolveCallRecordToCallBackForStartCall:withCompletion:))]
189        #[unsafe(method_family = none)]
190        unsafe fn resolveCallRecordToCallBackForStartCall_withCompletion(
191            &self,
192            intent: &INStartCallIntent,
193            completion: &block2::DynBlock<dyn Fn(NonNull<INCallRecordResolutionResult>)>,
194        );
195
196        #[cfg(all(
197            feature = "INCallDestinationTypeResolutionResult",
198            feature = "INIntent",
199            feature = "INIntentResolutionResult",
200            feature = "block2"
201        ))]
202        #[optional]
203        #[unsafe(method(resolveDestinationTypeForStartCall:withCompletion:))]
204        #[unsafe(method_family = none)]
205        unsafe fn resolveDestinationTypeForStartCall_withCompletion(
206            &self,
207            intent: &INStartCallIntent,
208            completion: &block2::DynBlock<dyn Fn(NonNull<INCallDestinationTypeResolutionResult>)>,
209        );
210
211        #[cfg(all(
212            feature = "INIntent",
213            feature = "INIntentResolutionResult",
214            feature = "INPersonResolutionResult",
215            feature = "INStartCallContactResolutionResult",
216            feature = "block2"
217        ))]
218        #[optional]
219        #[unsafe(method(resolveContactsForStartCall:withCompletion:))]
220        #[unsafe(method_family = none)]
221        unsafe fn resolveContactsForStartCall_withCompletion(
222            &self,
223            intent: &INStartCallIntent,
224            completion: &block2::DynBlock<
225                dyn Fn(NonNull<NSArray<INStartCallContactResolutionResult>>),
226            >,
227        );
228
229        #[cfg(all(
230            feature = "INCallCapabilityResolutionResult",
231            feature = "INIntent",
232            feature = "INIntentResolutionResult",
233            feature = "INStartCallCallCapabilityResolutionResult",
234            feature = "block2"
235        ))]
236        #[optional]
237        #[unsafe(method(resolveCallCapabilityForStartCall:withCompletion:))]
238        #[unsafe(method_family = none)]
239        unsafe fn resolveCallCapabilityForStartCall_withCompletion(
240            &self,
241            intent: &INStartCallIntent,
242            completion: &block2::DynBlock<
243                dyn Fn(NonNull<INStartCallCallCapabilityResolutionResult>),
244            >,
245        );
246    }
247);