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