objc2_intents/generated/
INSetProfileInCarIntent.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/insetprofileincarintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    #[deprecated = "INSetProfileInCarIntent is deprecated. There is no replacement."]
16    pub struct INSetProfileInCarIntent;
17);
18
19#[cfg(feature = "INIntent")]
20extern_conformance!(
21    unsafe impl NSCoding for INSetProfileInCarIntent {}
22);
23
24#[cfg(feature = "INIntent")]
25extern_conformance!(
26    unsafe impl NSCopying for INSetProfileInCarIntent {}
27);
28
29#[cfg(feature = "INIntent")]
30unsafe impl CopyingHelper for INSetProfileInCarIntent {
31    type Result = Self;
32}
33
34#[cfg(feature = "INIntent")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INSetProfileInCarIntent {}
37);
38
39#[cfg(feature = "INIntent")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INSetProfileInCarIntent {}
42);
43
44#[cfg(feature = "INIntent")]
45impl INSetProfileInCarIntent {
46    extern_methods!(
47        #[cfg(feature = "INSpeakableString")]
48        #[unsafe(method(initWithProfileNumber:profileName:defaultProfile:carName:))]
49        #[unsafe(method_family = init)]
50        pub unsafe fn initWithProfileNumber_profileName_defaultProfile_carName(
51            this: Allocated<Self>,
52            profile_number: Option<&NSNumber>,
53            profile_name: Option<&NSString>,
54            default_profile: Option<&NSNumber>,
55            car_name: Option<&INSpeakableString>,
56        ) -> Retained<Self>;
57
58        #[deprecated = "INSetProfileInCarIntent is deprecated. There is no replacement."]
59        #[unsafe(method(profileNumber))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn profileNumber(&self) -> Option<Retained<NSNumber>>;
62
63        #[unsafe(method(profileName))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn profileName(&self) -> Option<Retained<NSString>>;
66
67        #[deprecated = "INSetProfileInCarIntent is deprecated. There is no replacement."]
68        #[unsafe(method(defaultProfile))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn defaultProfile(&self) -> Option<Retained<NSNumber>>;
71
72        #[cfg(feature = "INSpeakableString")]
73        #[unsafe(method(carName))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn carName(&self) -> Option<Retained<INSpeakableString>>;
76    );
77}
78
79/// Methods declared on superclass `NSObject`.
80#[cfg(feature = "INIntent")]
81impl INSetProfileInCarIntent {
82    extern_methods!(
83        #[unsafe(method(init))]
84        #[unsafe(method_family = init)]
85        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
86
87        #[unsafe(method(new))]
88        #[unsafe(method_family = new)]
89        pub unsafe fn new() -> Retained<Self>;
90    );
91}
92
93extern_protocol!(
94    /// Protocol to declare support for handling an INSetProfileInCarIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
95    ///
96    /// 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.
97    ///
98    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/insetprofileincarintenthandling?language=objc)
99    #[deprecated = "INSetProfileInCarIntentHandling is deprecated. There is no replacement."]
100    pub unsafe trait INSetProfileInCarIntentHandling: NSObjectProtocol {
101        #[cfg(all(
102            feature = "INIntent",
103            feature = "INIntentResponse",
104            feature = "INSetProfileInCarIntentResponse",
105            feature = "block2"
106        ))]
107        /// Handling method - Execute the task represented by the INSetProfileInCarIntent that's passed in
108        ///
109        /// Called to actually execute the intent. The app must return a response for this intent.
110        ///
111        ///
112        /// Parameter `intent`: The input intent
113        ///
114        /// Parameter `completion`: The response handling block takes a INSetProfileInCarIntentResponse containing the details of the result of having executed the intent
115        ///
116        ///
117        /// See: INSetProfileInCarIntentResponse
118        #[deprecated = "INSetProfileInCarIntentHandling is deprecated. There is no replacement."]
119        #[unsafe(method(handleSetProfileInCar:completion:))]
120        #[unsafe(method_family = none)]
121        unsafe fn handleSetProfileInCar_completion(
122            &self,
123            intent: &INSetProfileInCarIntent,
124            completion: &block2::DynBlock<dyn Fn(NonNull<INSetProfileInCarIntentResponse>)>,
125        );
126
127        #[cfg(all(
128            feature = "INIntent",
129            feature = "INIntentResponse",
130            feature = "INSetProfileInCarIntentResponse",
131            feature = "block2"
132        ))]
133        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
134        ///
135        /// 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.
136        ///
137        ///
138        /// Parameter `intent`: The input intent
139        ///
140        /// Parameter `completion`: The response block contains an INSetProfileInCarIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
141        ///
142        ///
143        /// See: INSetProfileInCarIntentResponse
144        #[deprecated = "INSetProfileInCarIntentHandling is deprecated. There is no replacement."]
145        #[optional]
146        #[unsafe(method(confirmSetProfileInCar:completion:))]
147        #[unsafe(method_family = none)]
148        unsafe fn confirmSetProfileInCar_completion(
149            &self,
150            intent: &INSetProfileInCarIntent,
151            completion: &block2::DynBlock<dyn Fn(NonNull<INSetProfileInCarIntentResponse>)>,
152        );
153
154        #[cfg(all(
155            feature = "INIntegerResolutionResult",
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 = "INSetProfileInCarIntentHandling is deprecated. There is no replacement."]
172        #[optional]
173        #[unsafe(method(resolveProfileNumberForSetProfileInCar:withCompletion:))]
174        #[unsafe(method_family = none)]
175        unsafe fn resolveProfileNumberForSetProfileInCar_withCompletion(
176            &self,
177            intent: &INSetProfileInCarIntent,
178            completion: &block2::DynBlock<dyn Fn(NonNull<INIntegerResolutionResult>)>,
179        );
180
181        #[cfg(all(
182            feature = "INIntent",
183            feature = "INIntentResolutionResult",
184            feature = "INStringResolutionResult",
185            feature = "block2"
186        ))]
187        #[optional]
188        #[unsafe(method(resolveProfileNameForSetProfileInCar:withCompletion:))]
189        #[unsafe(method_family = none)]
190        unsafe fn resolveProfileNameForSetProfileInCar_withCompletion(
191            &self,
192            intent: &INSetProfileInCarIntent,
193            completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
194        );
195
196        #[cfg(all(
197            feature = "INIntent",
198            feature = "INIntentResolutionResult",
199            feature = "INSpeakableStringResolutionResult",
200            feature = "block2"
201        ))]
202        #[optional]
203        #[unsafe(method(resolveCarNameForSetProfileInCar:withCompletion:))]
204        #[unsafe(method_family = none)]
205        unsafe fn resolveCarNameForSetProfileInCar_withCompletion(
206            &self,
207            intent: &INSetProfileInCarIntent,
208            completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
209        );
210
211        #[cfg(all(
212            feature = "INBooleanResolutionResult",
213            feature = "INIntent",
214            feature = "INIntentResolutionResult",
215            feature = "block2"
216        ))]
217        #[deprecated = "The property doesn't need to be resolved"]
218        #[optional]
219        #[unsafe(method(resolveDefaultProfileForSetProfileInCar:withCompletion:))]
220        #[unsafe(method_family = none)]
221        unsafe fn resolveDefaultProfileForSetProfileInCar_withCompletion(
222            &self,
223            intent: &INSetProfileInCarIntent,
224            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
225        );
226    }
227);