objc2-intents 0.3.2

Bindings to the Intents framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/insetclimatesettingsincarintent?language=objc)
    #[unsafe(super(INIntent, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "INIntent")]
    #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
    pub struct INSetClimateSettingsInCarIntent;
);

#[cfg(feature = "INIntent")]
extern_conformance!(
    unsafe impl NSCoding for INSetClimateSettingsInCarIntent {}
);

#[cfg(feature = "INIntent")]
extern_conformance!(
    unsafe impl NSCopying for INSetClimateSettingsInCarIntent {}
);

#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INSetClimateSettingsInCarIntent {
    type Result = Self;
}

#[cfg(feature = "INIntent")]
extern_conformance!(
    unsafe impl NSObjectProtocol for INSetClimateSettingsInCarIntent {}
);

#[cfg(feature = "INIntent")]
extern_conformance!(
    unsafe impl NSSecureCoding for INSetClimateSettingsInCarIntent {}
);

#[cfg(feature = "INIntent")]
impl INSetClimateSettingsInCarIntent {
    extern_methods!(
        #[cfg(all(
            feature = "INCarAirCirculationMode",
            feature = "INCarSeat",
            feature = "INRelativeSetting",
            feature = "INSpeakableString"
        ))]
        #[unsafe(method(initWithEnableFan:enableAirConditioner:enableClimateControl:enableAutoMode:airCirculationMode:fanSpeedIndex:fanSpeedPercentage:relativeFanSpeedSetting:temperature:relativeTemperatureSetting:climateZone:carName:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithEnableFan_enableAirConditioner_enableClimateControl_enableAutoMode_airCirculationMode_fanSpeedIndex_fanSpeedPercentage_relativeFanSpeedSetting_temperature_relativeTemperatureSetting_climateZone_carName(
            this: Allocated<Self>,
            enable_fan: Option<&NSNumber>,
            enable_air_conditioner: Option<&NSNumber>,
            enable_climate_control: Option<&NSNumber>,
            enable_auto_mode: Option<&NSNumber>,
            air_circulation_mode: INCarAirCirculationMode,
            fan_speed_index: Option<&NSNumber>,
            fan_speed_percentage: Option<&NSNumber>,
            relative_fan_speed_setting: INRelativeSetting,
            temperature: Option<&NSMeasurement<NSUnitTemperature>>,
            relative_temperature_setting: INRelativeSetting,
            climate_zone: INCarSeat,
            car_name: Option<&INSpeakableString>,
        ) -> Retained<Self>;

        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(enableFan))]
        #[unsafe(method_family = none)]
        pub unsafe fn enableFan(&self) -> Option<Retained<NSNumber>>;

        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(enableAirConditioner))]
        #[unsafe(method_family = none)]
        pub unsafe fn enableAirConditioner(&self) -> Option<Retained<NSNumber>>;

        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(enableClimateControl))]
        #[unsafe(method_family = none)]
        pub unsafe fn enableClimateControl(&self) -> Option<Retained<NSNumber>>;

        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(enableAutoMode))]
        #[unsafe(method_family = none)]
        pub unsafe fn enableAutoMode(&self) -> Option<Retained<NSNumber>>;

        #[cfg(feature = "INCarAirCirculationMode")]
        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(airCirculationMode))]
        #[unsafe(method_family = none)]
        pub unsafe fn airCirculationMode(&self) -> INCarAirCirculationMode;

        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(fanSpeedIndex))]
        #[unsafe(method_family = none)]
        pub unsafe fn fanSpeedIndex(&self) -> Option<Retained<NSNumber>>;

        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(fanSpeedPercentage))]
        #[unsafe(method_family = none)]
        pub unsafe fn fanSpeedPercentage(&self) -> Option<Retained<NSNumber>>;

        #[cfg(feature = "INRelativeSetting")]
        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(relativeFanSpeedSetting))]
        #[unsafe(method_family = none)]
        pub unsafe fn relativeFanSpeedSetting(&self) -> INRelativeSetting;

        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(temperature))]
        #[unsafe(method_family = none)]
        pub unsafe fn temperature(&self) -> Option<Retained<NSMeasurement<NSUnitTemperature>>>;

        #[cfg(feature = "INRelativeSetting")]
        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(relativeTemperatureSetting))]
        #[unsafe(method_family = none)]
        pub unsafe fn relativeTemperatureSetting(&self) -> INRelativeSetting;

        #[cfg(feature = "INCarSeat")]
        #[deprecated = "INSetClimateSettingsInCarIntent is deprecated. There is no replacement."]
        #[unsafe(method(climateZone))]
        #[unsafe(method_family = none)]
        pub unsafe fn climateZone(&self) -> INCarSeat;

        #[cfg(feature = "INSpeakableString")]
        #[unsafe(method(carName))]
        #[unsafe(method_family = none)]
        pub unsafe fn carName(&self) -> Option<Retained<INSpeakableString>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "INIntent")]
impl INSetClimateSettingsInCarIntent {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_protocol!(
    /// Protocol to declare support for handling an INSetClimateSettingsInCarIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
    ///
    /// 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.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/insetclimatesettingsincarintenthandling?language=objc)
    #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
    pub unsafe trait INSetClimateSettingsInCarIntentHandling: NSObjectProtocol {
        #[cfg(all(
            feature = "INIntent",
            feature = "INIntentResponse",
            feature = "INSetClimateSettingsInCarIntentResponse",
            feature = "block2"
        ))]
        /// Handling method - Execute the task represented by the INSetClimateSettingsInCarIntent that's passed in
        ///
        /// Called to actually execute the intent. The app must return a response for this intent.
        ///
        ///
        /// Parameter `intent`: The input intent
        ///
        /// Parameter `completion`: The response handling block takes a INSetClimateSettingsInCarIntentResponse containing the details of the result of having executed the intent
        ///
        ///
        /// See: INSetClimateSettingsInCarIntentResponse
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[unsafe(method(handleSetClimateSettingsInCar:completion:))]
        #[unsafe(method_family = none)]
        unsafe fn handleSetClimateSettingsInCar_completion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INSetClimateSettingsInCarIntentResponse>)>,
        );

        #[cfg(all(
            feature = "INIntent",
            feature = "INIntentResponse",
            feature = "INSetClimateSettingsInCarIntentResponse",
            feature = "block2"
        ))]
        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
        ///
        /// 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.
        ///
        ///
        /// Parameter `intent`: The input intent
        ///
        /// 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.
        ///
        ///
        /// See: INSetClimateSettingsInCarIntentResponse
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(confirmSetClimateSettingsInCar:completion:))]
        #[unsafe(method_family = none)]
        unsafe fn confirmSetClimateSettingsInCar_completion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INSetClimateSettingsInCarIntentResponse>)>,
        );

        #[cfg(all(
            feature = "INBooleanResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
        ///
        /// 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.
        ///
        ///
        /// Parameter `intent`: The input intent
        ///
        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
        ///
        ///
        /// See: INIntentResolutionResult
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveEnableFanForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveEnableFanForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INBooleanResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveEnableAirConditionerForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveEnableAirConditionerForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INBooleanResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveEnableClimateControlForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveEnableClimateControlForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INBooleanResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveEnableAutoModeForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveEnableAutoModeForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INCarAirCirculationModeResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveAirCirculationModeForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveAirCirculationModeForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INCarAirCirculationModeResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INIntegerResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveFanSpeedIndexForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveFanSpeedIndexForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INIntegerResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INDoubleResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveFanSpeedPercentageForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveFanSpeedPercentageForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INDoubleResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "INRelativeSettingResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveRelativeFanSpeedSettingForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveRelativeFanSpeedSettingForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INRelativeSettingResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "INTemperatureResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveTemperatureForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveTemperatureForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INTemperatureResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "INRelativeSettingResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveRelativeTemperatureSettingForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveRelativeTemperatureSettingForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INRelativeSettingResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INCarSeatResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSetClimateSettingsInCarIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveClimateZoneForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveClimateZoneForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INCarSeatResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "INSpeakableStringResolutionResult",
            feature = "block2"
        ))]
        #[optional]
        #[unsafe(method(resolveCarNameForSetClimateSettingsInCar:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveCarNameForSetClimateSettingsInCar_withCompletion(
            &self,
            intent: &INSetClimateSettingsInCarIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
        );
    }
);