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