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