objc2_intents/generated/
INSetCarLockStatusIntent.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/insetcarlockstatusintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    pub struct INSetCarLockStatusIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20    unsafe impl NSCoding for INSetCarLockStatusIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25    unsafe impl NSCopying for INSetCarLockStatusIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INSetCarLockStatusIntent {
30    type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for INSetCarLockStatusIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40    unsafe impl NSSecureCoding for INSetCarLockStatusIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INSetCarLockStatusIntent {
45    extern_methods!(
46        #[cfg(feature = "INSpeakableString")]
47        #[unsafe(method(initWithLocked:carName:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithLocked_carName(
50            this: Allocated<Self>,
51            locked: Option<&NSNumber>,
52            car_name: Option<&INSpeakableString>,
53        ) -> Retained<Self>;
54
55        #[unsafe(method(locked))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn locked(&self) -> Option<Retained<NSNumber>>;
58
59        #[cfg(feature = "INSpeakableString")]
60        #[unsafe(method(carName))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn carName(&self) -> Option<Retained<INSpeakableString>>;
63    );
64}
65
66/// Methods declared on superclass `NSObject`.
67#[cfg(feature = "INIntent")]
68impl INSetCarLockStatusIntent {
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 INSetCarLockStatusIntent. 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/insetcarlockstatusintenthandling?language=objc)
86    pub unsafe trait INSetCarLockStatusIntentHandling: NSObjectProtocol {
87        #[cfg(all(
88            feature = "INIntent",
89            feature = "INIntentResponse",
90            feature = "INSetCarLockStatusIntentResponse",
91            feature = "block2"
92        ))]
93        /// Handling method - Execute the task represented by the INSetCarLockStatusIntent that's passed in
94        ///
95        /// Called to actually execute the intent. The app must return a response for this intent.
96        ///
97        ///
98        /// Parameter `intent`: The input intent
99        ///
100        /// Parameter `completion`: The response handling block takes a INSetCarLockStatusIntentResponse containing the details of the result of having executed the intent
101        ///
102        ///
103        /// See: INSetCarLockStatusIntentResponse
104        #[unsafe(method(handleSetCarLockStatus:completion:))]
105        #[unsafe(method_family = none)]
106        unsafe fn handleSetCarLockStatus_completion(
107            &self,
108            intent: &INSetCarLockStatusIntent,
109            completion: &block2::DynBlock<dyn Fn(NonNull<INSetCarLockStatusIntentResponse>)>,
110        );
111
112        #[cfg(all(
113            feature = "INIntent",
114            feature = "INIntentResponse",
115            feature = "INSetCarLockStatusIntentResponse",
116            feature = "block2"
117        ))]
118        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
119        ///
120        /// 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.
121        ///
122        ///
123        /// Parameter `intent`: The input intent
124        ///
125        /// Parameter `completion`: The response block contains an INSetCarLockStatusIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
126        ///
127        ///
128        /// See: INSetCarLockStatusIntentResponse
129        #[optional]
130        #[unsafe(method(confirmSetCarLockStatus:completion:))]
131        #[unsafe(method_family = none)]
132        unsafe fn confirmSetCarLockStatus_completion(
133            &self,
134            intent: &INSetCarLockStatusIntent,
135            completion: &block2::DynBlock<dyn Fn(NonNull<INSetCarLockStatusIntentResponse>)>,
136        );
137
138        #[cfg(all(
139            feature = "INBooleanResolutionResult",
140            feature = "INIntent",
141            feature = "INIntentResolutionResult",
142            feature = "block2"
143        ))]
144        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
145        ///
146        /// 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.
147        ///
148        ///
149        /// Parameter `intent`: The input intent
150        ///
151        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
152        ///
153        ///
154        /// See: INIntentResolutionResult
155        #[optional]
156        #[unsafe(method(resolveLockedForSetCarLockStatus:withCompletion:))]
157        #[unsafe(method_family = none)]
158        unsafe fn resolveLockedForSetCarLockStatus_withCompletion(
159            &self,
160            intent: &INSetCarLockStatusIntent,
161            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
162        );
163
164        #[cfg(all(
165            feature = "INIntent",
166            feature = "INIntentResolutionResult",
167            feature = "INSpeakableStringResolutionResult",
168            feature = "block2"
169        ))]
170        #[optional]
171        #[unsafe(method(resolveCarNameForSetCarLockStatus:withCompletion:))]
172        #[unsafe(method_family = none)]
173        unsafe fn resolveCarNameForSetCarLockStatus_withCompletion(
174            &self,
175            intent: &INSetCarLockStatusIntent,
176            completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
177        );
178    }
179);