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