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