objc2_intents/generated/INGetCarLockStatusIntent.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/ingetcarlockstatusintent?language=objc)
12 #[unsafe(super(INIntent, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "INIntent")]
15 pub struct INGetCarLockStatusIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20 unsafe impl NSCoding for INGetCarLockStatusIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25 unsafe impl NSCopying for INGetCarLockStatusIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INGetCarLockStatusIntent {
30 type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for INGetCarLockStatusIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40 unsafe impl NSSecureCoding for INGetCarLockStatusIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INGetCarLockStatusIntent {
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 INGetCarLockStatusIntent {
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 INGetCarLockStatusIntent. 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/ingetcarlockstatusintenthandling?language=objc)
81 pub unsafe trait INGetCarLockStatusIntentHandling: NSObjectProtocol {
82 #[cfg(all(
83 feature = "INGetCarLockStatusIntentResponse",
84 feature = "INIntent",
85 feature = "INIntentResponse",
86 feature = "block2"
87 ))]
88 /// Handling method - Execute the task represented by the INGetCarLockStatusIntent 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 INGetCarLockStatusIntentResponse containing the details of the result of having executed the intent
96 ///
97 ///
98 /// See: INGetCarLockStatusIntentResponse
99 #[unsafe(method(handleGetCarLockStatus:completion:))]
100 #[unsafe(method_family = none)]
101 unsafe fn handleGetCarLockStatus_completion(
102 &self,
103 intent: &INGetCarLockStatusIntent,
104 completion: &block2::DynBlock<dyn Fn(NonNull<INGetCarLockStatusIntentResponse>)>,
105 );
106
107 #[cfg(all(
108 feature = "INGetCarLockStatusIntentResponse",
109 feature = "INIntent",
110 feature = "INIntentResponse",
111 feature = "block2"
112 ))]
113 /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
114 ///
115 /// 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.
116 ///
117 ///
118 /// Parameter `intent`: The input intent
119 ///
120 /// Parameter `completion`: The response block contains an INGetCarLockStatusIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
121 ///
122 ///
123 /// See: INGetCarLockStatusIntentResponse
124 #[optional]
125 #[unsafe(method(confirmGetCarLockStatus:completion:))]
126 #[unsafe(method_family = none)]
127 unsafe fn confirmGetCarLockStatus_completion(
128 &self,
129 intent: &INGetCarLockStatusIntent,
130 completion: &block2::DynBlock<dyn Fn(NonNull<INGetCarLockStatusIntentResponse>)>,
131 );
132
133 #[cfg(all(
134 feature = "INIntent",
135 feature = "INIntentResolutionResult",
136 feature = "INSpeakableStringResolutionResult",
137 feature = "block2"
138 ))]
139 /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
140 ///
141 /// 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.
142 ///
143 ///
144 /// Parameter `intent`: The input intent
145 ///
146 /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
147 ///
148 ///
149 /// See: INIntentResolutionResult
150 #[optional]
151 #[unsafe(method(resolveCarNameForGetCarLockStatus:withCompletion:))]
152 #[unsafe(method_family = none)]
153 unsafe fn resolveCarNameForGetCarLockStatus_withCompletion(
154 &self,
155 intent: &INGetCarLockStatusIntent,
156 completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
157 );
158 }
159);