objc2_intents/generated/
INStartAudioCallIntent.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/instartaudiocallintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
16    pub struct INStartAudioCallIntent;
17);
18
19#[cfg(feature = "INIntent")]
20extern_conformance!(
21    unsafe impl NSCoding for INStartAudioCallIntent {}
22);
23
24#[cfg(feature = "INIntent")]
25extern_conformance!(
26    unsafe impl NSCopying for INStartAudioCallIntent {}
27);
28
29#[cfg(feature = "INIntent")]
30unsafe impl CopyingHelper for INStartAudioCallIntent {
31    type Result = Self;
32}
33
34#[cfg(feature = "INIntent")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INStartAudioCallIntent {}
37);
38
39#[cfg(feature = "INIntent")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INStartAudioCallIntent {}
42);
43
44#[cfg(feature = "INIntent")]
45impl INStartAudioCallIntent {
46    extern_methods!(
47        #[cfg(all(feature = "INCallDestinationType", feature = "INPerson"))]
48        #[unsafe(method(initWithDestinationType:contacts:))]
49        #[unsafe(method_family = init)]
50        pub unsafe fn initWithDestinationType_contacts(
51            this: Allocated<Self>,
52            destination_type: INCallDestinationType,
53            contacts: Option<&NSArray<INPerson>>,
54        ) -> Retained<Self>;
55
56        #[cfg(feature = "INCallDestinationType")]
57        #[unsafe(method(destinationType))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn destinationType(&self) -> INCallDestinationType;
60
61        #[cfg(feature = "INPerson")]
62        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
63        #[unsafe(method(contacts))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn contacts(&self) -> Option<Retained<NSArray<INPerson>>>;
66    );
67}
68
69/// Methods declared on superclass `NSObject`.
70#[cfg(feature = "INIntent")]
71impl INStartAudioCallIntent {
72    extern_methods!(
73        #[unsafe(method(init))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77        #[unsafe(method(new))]
78        #[unsafe(method_family = new)]
79        pub unsafe fn new() -> Retained<Self>;
80    );
81}
82
83extern_protocol!(
84    /// Protocol to declare support for handling an INStartAudioCallIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
85    ///
86    /// 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.
87    ///
88    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/instartaudiocallintenthandling?language=objc)
89    #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
90    pub unsafe trait INStartAudioCallIntentHandling: NSObjectProtocol {
91        #[cfg(all(
92            feature = "INIntent",
93            feature = "INIntentResponse",
94            feature = "INStartAudioCallIntentResponse",
95            feature = "block2"
96        ))]
97        /// Handling method - Execute the task represented by the INStartAudioCallIntent that's passed in
98        ///
99        /// Called to actually execute the intent. The app must return a response for this intent.
100        ///
101        ///
102        /// Parameter `intent`: The input intent
103        ///
104        /// Parameter `completion`: The response handling block takes a INStartAudioCallIntentResponse containing the details of the result of having executed the intent
105        ///
106        ///
107        /// See: INStartAudioCallIntentResponse
108        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
109        #[unsafe(method(handleStartAudioCall:completion:))]
110        #[unsafe(method_family = none)]
111        unsafe fn handleStartAudioCall_completion(
112            &self,
113            intent: &INStartAudioCallIntent,
114            completion: &block2::DynBlock<dyn Fn(NonNull<INStartAudioCallIntentResponse>)>,
115        );
116
117        #[cfg(all(
118            feature = "INIntent",
119            feature = "INIntentResponse",
120            feature = "INStartAudioCallIntentResponse",
121            feature = "block2"
122        ))]
123        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
124        ///
125        /// 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.
126        ///
127        ///
128        /// Parameter `intent`: The input intent
129        ///
130        /// Parameter `completion`: The response block contains an INStartAudioCallIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
131        ///
132        ///
133        /// See: INStartAudioCallIntentResponse
134        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
135        #[optional]
136        #[unsafe(method(confirmStartAudioCall:completion:))]
137        #[unsafe(method_family = none)]
138        unsafe fn confirmStartAudioCall_completion(
139            &self,
140            intent: &INStartAudioCallIntent,
141            completion: &block2::DynBlock<dyn Fn(NonNull<INStartAudioCallIntentResponse>)>,
142        );
143
144        #[cfg(all(
145            feature = "INCallDestinationTypeResolutionResult",
146            feature = "INIntent",
147            feature = "INIntentResolutionResult",
148            feature = "block2"
149        ))]
150        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
151        ///
152        /// 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.
153        ///
154        ///
155        /// Parameter `intent`: The input intent
156        ///
157        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
158        ///
159        ///
160        /// See: INIntentResolutionResult
161        #[optional]
162        #[unsafe(method(resolveDestinationTypeForStartAudioCall:withCompletion:))]
163        #[unsafe(method_family = none)]
164        unsafe fn resolveDestinationTypeForStartAudioCall_withCompletion(
165            &self,
166            intent: &INStartAudioCallIntent,
167            completion: &block2::DynBlock<dyn Fn(NonNull<INCallDestinationTypeResolutionResult>)>,
168        );
169
170        #[cfg(all(
171            feature = "INIntent",
172            feature = "INIntentResolutionResult",
173            feature = "INPersonResolutionResult",
174            feature = "block2"
175        ))]
176        #[deprecated = "INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead"]
177        #[optional]
178        #[unsafe(method(resolveContactsForStartAudioCall:withCompletion:))]
179        #[unsafe(method_family = none)]
180        unsafe fn resolveContactsForStartAudioCall_withCompletion(
181            &self,
182            intent: &INStartAudioCallIntent,
183            completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INPersonResolutionResult>>)>,
184        );
185    }
186);