objc2_intents/generated/
INSetClimateSettingsInCarIntent.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/insetclimatesettingsincarintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
16    pub struct INSetClimateSettingsInCarIntent;
17);
18
19#[cfg(feature = "INIntent")]
20extern_conformance!(
21    unsafe impl NSCoding for INSetClimateSettingsInCarIntent {}
22);
23
24#[cfg(feature = "INIntent")]
25extern_conformance!(
26    unsafe impl NSCopying for INSetClimateSettingsInCarIntent {}
27);
28
29#[cfg(feature = "INIntent")]
30unsafe impl CopyingHelper for INSetClimateSettingsInCarIntent {
31    type Result = Self;
32}
33
34#[cfg(feature = "INIntent")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INSetClimateSettingsInCarIntent {}
37);
38
39#[cfg(feature = "INIntent")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INSetClimateSettingsInCarIntent {}
42);
43
44#[cfg(feature = "INIntent")]
45impl INSetClimateSettingsInCarIntent {
46    extern_methods!(
47        #[cfg(all(
48            feature = "INCarAirCirculationMode",
49            feature = "INCarSeat",
50            feature = "INRelativeSetting",
51            feature = "INSpeakableString"
52        ))]
53        #[unsafe(method(initWithEnableFan:enableAirConditioner:enableClimateControl:enableAutoMode:airCirculationMode:fanSpeedIndex:fanSpeedPercentage:relativeFanSpeedSetting:temperature:relativeTemperatureSetting:climateZone:carName:))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn initWithEnableFan_enableAirConditioner_enableClimateControl_enableAutoMode_airCirculationMode_fanSpeedIndex_fanSpeedPercentage_relativeFanSpeedSetting_temperature_relativeTemperatureSetting_climateZone_carName(
56            this: Allocated<Self>,
57            enable_fan: Option<&NSNumber>,
58            enable_air_conditioner: Option<&NSNumber>,
59            enable_climate_control: Option<&NSNumber>,
60            enable_auto_mode: Option<&NSNumber>,
61            air_circulation_mode: INCarAirCirculationMode,
62            fan_speed_index: Option<&NSNumber>,
63            fan_speed_percentage: Option<&NSNumber>,
64            relative_fan_speed_setting: INRelativeSetting,
65            temperature: Option<&NSMeasurement<NSUnitTemperature>>,
66            relative_temperature_setting: INRelativeSetting,
67            climate_zone: INCarSeat,
68            car_name: Option<&INSpeakableString>,
69        ) -> Retained<Self>;
70
71        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
72        #[unsafe(method(enableFan))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn enableFan(&self) -> Option<Retained<NSNumber>>;
75
76        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
77        #[unsafe(method(enableAirConditioner))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn enableAirConditioner(&self) -> Option<Retained<NSNumber>>;
80
81        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
82        #[unsafe(method(enableClimateControl))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn enableClimateControl(&self) -> Option<Retained<NSNumber>>;
85
86        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
87        #[unsafe(method(enableAutoMode))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn enableAutoMode(&self) -> Option<Retained<NSNumber>>;
90
91        #[cfg(feature = "INCarAirCirculationMode")]
92        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
93        #[unsafe(method(airCirculationMode))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn airCirculationMode(&self) -> INCarAirCirculationMode;
96
97        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
98        #[unsafe(method(fanSpeedIndex))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn fanSpeedIndex(&self) -> Option<Retained<NSNumber>>;
101
102        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
103        #[unsafe(method(fanSpeedPercentage))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn fanSpeedPercentage(&self) -> Option<Retained<NSNumber>>;
106
107        #[cfg(feature = "INRelativeSetting")]
108        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
109        #[unsafe(method(relativeFanSpeedSetting))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn relativeFanSpeedSetting(&self) -> INRelativeSetting;
112
113        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
114        #[unsafe(method(temperature))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn temperature(&self) -> Option<Retained<NSMeasurement<NSUnitTemperature>>>;
117
118        #[cfg(feature = "INRelativeSetting")]
119        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
120        #[unsafe(method(relativeTemperatureSetting))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn relativeTemperatureSetting(&self) -> INRelativeSetting;
123
124        #[cfg(feature = "INCarSeat")]
125        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
126        #[unsafe(method(climateZone))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn climateZone(&self) -> INCarSeat;
129
130        #[cfg(feature = "INSpeakableString")]
131        #[unsafe(method(carName))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn carName(&self) -> Option<Retained<INSpeakableString>>;
134    );
135}
136
137/// Methods declared on superclass `NSObject`.
138#[cfg(feature = "INIntent")]
139impl INSetClimateSettingsInCarIntent {
140    extern_methods!(
141        #[unsafe(method(init))]
142        #[unsafe(method_family = init)]
143        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
144
145        #[unsafe(method(new))]
146        #[unsafe(method_family = new)]
147        pub unsafe fn new() -> Retained<Self>;
148    );
149}
150
151extern_protocol!(
152    /// Protocol to declare support for handling an INSetClimateSettingsInCarIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
153    ///
154    /// 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.
155    ///
156    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/insetclimatesettingsincarintenthandling?language=objc)
157    #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
158    pub unsafe trait INSetClimateSettingsInCarIntentHandling: NSObjectProtocol {
159        #[cfg(all(
160            feature = "INIntent",
161            feature = "INIntentResponse",
162            feature = "INSetClimateSettingsInCarIntentResponse",
163            feature = "block2"
164        ))]
165        /// Handling method - Execute the task represented by the INSetClimateSettingsInCarIntent that's passed in
166        ///
167        /// Called to actually execute the intent. The app must return a response for this intent.
168        ///
169        ///
170        /// Parameter `intent`: The input intent
171        ///
172        /// Parameter `completion`: The response handling block takes a INSetClimateSettingsInCarIntentResponse containing the details of the result of having executed the intent
173        ///
174        ///
175        /// See: INSetClimateSettingsInCarIntentResponse
176        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
177        #[unsafe(method(handleSetClimateSettingsInCar:completion:))]
178        #[unsafe(method_family = none)]
179        unsafe fn handleSetClimateSettingsInCar_completion(
180            &self,
181            intent: &INSetClimateSettingsInCarIntent,
182            completion: &block2::DynBlock<dyn Fn(NonNull<INSetClimateSettingsInCarIntentResponse>)>,
183        );
184
185        #[cfg(all(
186            feature = "INIntent",
187            feature = "INIntentResponse",
188            feature = "INSetClimateSettingsInCarIntentResponse",
189            feature = "block2"
190        ))]
191        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
192        ///
193        /// 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.
194        ///
195        ///
196        /// Parameter `intent`: The input intent
197        ///
198        /// Parameter `completion`: The response block contains an INSetClimateSettingsInCarIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
199        ///
200        ///
201        /// See: INSetClimateSettingsInCarIntentResponse
202        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
203        #[optional]
204        #[unsafe(method(confirmSetClimateSettingsInCar:completion:))]
205        #[unsafe(method_family = none)]
206        unsafe fn confirmSetClimateSettingsInCar_completion(
207            &self,
208            intent: &INSetClimateSettingsInCarIntent,
209            completion: &block2::DynBlock<dyn Fn(NonNull<INSetClimateSettingsInCarIntentResponse>)>,
210        );
211
212        #[cfg(all(
213            feature = "INBooleanResolutionResult",
214            feature = "INIntent",
215            feature = "INIntentResolutionResult",
216            feature = "block2"
217        ))]
218        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
219        ///
220        /// 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.
221        ///
222        ///
223        /// Parameter `intent`: The input intent
224        ///
225        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
226        ///
227        ///
228        /// See: INIntentResolutionResult
229        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
230        #[optional]
231        #[unsafe(method(resolveEnableFanForSetClimateSettingsInCar:withCompletion:))]
232        #[unsafe(method_family = none)]
233        unsafe fn resolveEnableFanForSetClimateSettingsInCar_withCompletion(
234            &self,
235            intent: &INSetClimateSettingsInCarIntent,
236            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
237        );
238
239        #[cfg(all(
240            feature = "INBooleanResolutionResult",
241            feature = "INIntent",
242            feature = "INIntentResolutionResult",
243            feature = "block2"
244        ))]
245        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
246        #[optional]
247        #[unsafe(method(resolveEnableAirConditionerForSetClimateSettingsInCar:withCompletion:))]
248        #[unsafe(method_family = none)]
249        unsafe fn resolveEnableAirConditionerForSetClimateSettingsInCar_withCompletion(
250            &self,
251            intent: &INSetClimateSettingsInCarIntent,
252            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
253        );
254
255        #[cfg(all(
256            feature = "INBooleanResolutionResult",
257            feature = "INIntent",
258            feature = "INIntentResolutionResult",
259            feature = "block2"
260        ))]
261        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
262        #[optional]
263        #[unsafe(method(resolveEnableClimateControlForSetClimateSettingsInCar:withCompletion:))]
264        #[unsafe(method_family = none)]
265        unsafe fn resolveEnableClimateControlForSetClimateSettingsInCar_withCompletion(
266            &self,
267            intent: &INSetClimateSettingsInCarIntent,
268            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
269        );
270
271        #[cfg(all(
272            feature = "INBooleanResolutionResult",
273            feature = "INIntent",
274            feature = "INIntentResolutionResult",
275            feature = "block2"
276        ))]
277        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
278        #[optional]
279        #[unsafe(method(resolveEnableAutoModeForSetClimateSettingsInCar:withCompletion:))]
280        #[unsafe(method_family = none)]
281        unsafe fn resolveEnableAutoModeForSetClimateSettingsInCar_withCompletion(
282            &self,
283            intent: &INSetClimateSettingsInCarIntent,
284            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
285        );
286
287        #[cfg(all(
288            feature = "INCarAirCirculationModeResolutionResult",
289            feature = "INIntent",
290            feature = "INIntentResolutionResult",
291            feature = "block2"
292        ))]
293        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
294        #[optional]
295        #[unsafe(method(resolveAirCirculationModeForSetClimateSettingsInCar:withCompletion:))]
296        #[unsafe(method_family = none)]
297        unsafe fn resolveAirCirculationModeForSetClimateSettingsInCar_withCompletion(
298            &self,
299            intent: &INSetClimateSettingsInCarIntent,
300            completion: &block2::DynBlock<dyn Fn(NonNull<INCarAirCirculationModeResolutionResult>)>,
301        );
302
303        #[cfg(all(
304            feature = "INIntegerResolutionResult",
305            feature = "INIntent",
306            feature = "INIntentResolutionResult",
307            feature = "block2"
308        ))]
309        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
310        #[optional]
311        #[unsafe(method(resolveFanSpeedIndexForSetClimateSettingsInCar:withCompletion:))]
312        #[unsafe(method_family = none)]
313        unsafe fn resolveFanSpeedIndexForSetClimateSettingsInCar_withCompletion(
314            &self,
315            intent: &INSetClimateSettingsInCarIntent,
316            completion: &block2::DynBlock<dyn Fn(NonNull<INIntegerResolutionResult>)>,
317        );
318
319        #[cfg(all(
320            feature = "INDoubleResolutionResult",
321            feature = "INIntent",
322            feature = "INIntentResolutionResult",
323            feature = "block2"
324        ))]
325        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
326        #[optional]
327        #[unsafe(method(resolveFanSpeedPercentageForSetClimateSettingsInCar:withCompletion:))]
328        #[unsafe(method_family = none)]
329        unsafe fn resolveFanSpeedPercentageForSetClimateSettingsInCar_withCompletion(
330            &self,
331            intent: &INSetClimateSettingsInCarIntent,
332            completion: &block2::DynBlock<dyn Fn(NonNull<INDoubleResolutionResult>)>,
333        );
334
335        #[cfg(all(
336            feature = "INIntent",
337            feature = "INIntentResolutionResult",
338            feature = "INRelativeSettingResolutionResult",
339            feature = "block2"
340        ))]
341        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
342        #[optional]
343        #[unsafe(method(resolveRelativeFanSpeedSettingForSetClimateSettingsInCar:withCompletion:))]
344        #[unsafe(method_family = none)]
345        unsafe fn resolveRelativeFanSpeedSettingForSetClimateSettingsInCar_withCompletion(
346            &self,
347            intent: &INSetClimateSettingsInCarIntent,
348            completion: &block2::DynBlock<dyn Fn(NonNull<INRelativeSettingResolutionResult>)>,
349        );
350
351        #[cfg(all(
352            feature = "INIntent",
353            feature = "INIntentResolutionResult",
354            feature = "INTemperatureResolutionResult",
355            feature = "block2"
356        ))]
357        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
358        #[optional]
359        #[unsafe(method(resolveTemperatureForSetClimateSettingsInCar:withCompletion:))]
360        #[unsafe(method_family = none)]
361        unsafe fn resolveTemperatureForSetClimateSettingsInCar_withCompletion(
362            &self,
363            intent: &INSetClimateSettingsInCarIntent,
364            completion: &block2::DynBlock<dyn Fn(NonNull<INTemperatureResolutionResult>)>,
365        );
366
367        #[cfg(all(
368            feature = "INIntent",
369            feature = "INIntentResolutionResult",
370            feature = "INRelativeSettingResolutionResult",
371            feature = "block2"
372        ))]
373        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
374        #[optional]
375        #[unsafe(method(resolveRelativeTemperatureSettingForSetClimateSettingsInCar:withCompletion:))]
376        #[unsafe(method_family = none)]
377        unsafe fn resolveRelativeTemperatureSettingForSetClimateSettingsInCar_withCompletion(
378            &self,
379            intent: &INSetClimateSettingsInCarIntent,
380            completion: &block2::DynBlock<dyn Fn(NonNull<INRelativeSettingResolutionResult>)>,
381        );
382
383        #[cfg(all(
384            feature = "INCarSeatResolutionResult",
385            feature = "INIntent",
386            feature = "INIntentResolutionResult",
387            feature = "block2"
388        ))]
389        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
390        #[optional]
391        #[unsafe(method(resolveClimateZoneForSetClimateSettingsInCar:withCompletion:))]
392        #[unsafe(method_family = none)]
393        unsafe fn resolveClimateZoneForSetClimateSettingsInCar_withCompletion(
394            &self,
395            intent: &INSetClimateSettingsInCarIntent,
396            completion: &block2::DynBlock<dyn Fn(NonNull<INCarSeatResolutionResult>)>,
397        );
398
399        #[cfg(all(
400            feature = "INIntent",
401            feature = "INIntentResolutionResult",
402            feature = "INSpeakableStringResolutionResult",
403            feature = "block2"
404        ))]
405        #[optional]
406        #[unsafe(method(resolveCarNameForSetClimateSettingsInCar:withCompletion:))]
407        #[unsafe(method_family = none)]
408        unsafe fn resolveCarNameForSetClimateSettingsInCar_withCompletion(
409            &self,
410            intent: &INSetClimateSettingsInCarIntent,
411            completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
412        );
413    }
414);