objc2_intents/generated/
INListRideOptionsIntent.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::*;
6#[cfg(feature = "objc2-core-location")]
7use objc2_core_location::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inlistrideoptionsintent?language=objc)
14    #[unsafe(super(INIntent, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "INIntent")]
17    pub struct INListRideOptionsIntent;
18);
19
20#[cfg(feature = "INIntent")]
21extern_conformance!(
22    unsafe impl NSCoding for INListRideOptionsIntent {}
23);
24
25#[cfg(feature = "INIntent")]
26extern_conformance!(
27    unsafe impl NSCopying for INListRideOptionsIntent {}
28);
29
30#[cfg(feature = "INIntent")]
31unsafe impl CopyingHelper for INListRideOptionsIntent {
32    type Result = Self;
33}
34
35#[cfg(feature = "INIntent")]
36extern_conformance!(
37    unsafe impl NSObjectProtocol for INListRideOptionsIntent {}
38);
39
40#[cfg(feature = "INIntent")]
41extern_conformance!(
42    unsafe impl NSSecureCoding for INListRideOptionsIntent {}
43);
44
45#[cfg(feature = "INIntent")]
46impl INListRideOptionsIntent {
47    extern_methods!(
48        #[cfg(feature = "objc2-core-location")]
49        #[unsafe(method(initWithPickupLocation:dropOffLocation:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithPickupLocation_dropOffLocation(
52            this: Allocated<Self>,
53            pickup_location: Option<&CLPlacemark>,
54            drop_off_location: Option<&CLPlacemark>,
55        ) -> Retained<Self>;
56
57        #[cfg(feature = "objc2-core-location")]
58        #[unsafe(method(pickupLocation))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn pickupLocation(&self) -> Option<Retained<CLPlacemark>>;
61
62        #[cfg(feature = "objc2-core-location")]
63        #[unsafe(method(dropOffLocation))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn dropOffLocation(&self) -> Option<Retained<CLPlacemark>>;
66    );
67}
68
69/// Methods declared on superclass `NSObject`.
70#[cfg(feature = "INIntent")]
71impl INListRideOptionsIntent {
72    extern_methods!(
73        #[unsafe(method(init))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77        #[unsafe(method(new))]
78        #[unsafe(method_family = new)]
79        pub unsafe fn new() -> Retained<Self>;
80    );
81}
82
83extern_protocol!(
84    /// Protocol to declare support for handling an INListRideOptionsIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
85    ///
86    /// 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.
87    ///
88    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/inlistrideoptionsintenthandling?language=objc)
89    pub unsafe trait INListRideOptionsIntentHandling: NSObjectProtocol {
90        #[cfg(all(
91            feature = "INIntent",
92            feature = "INIntentResponse",
93            feature = "INListRideOptionsIntentResponse",
94            feature = "block2"
95        ))]
96        /// Handling method - Execute the task represented by the INListRideOptionsIntent that's passed in
97        ///
98        /// Called to actually execute the intent. The app must return a response for this intent.
99        ///
100        ///
101        /// Parameter `intent`: The input intent
102        ///
103        /// Parameter `completion`: The response handling block takes a INListRideOptionsIntentResponse containing the details of the result of having executed the intent
104        ///
105        ///
106        /// See: INListRideOptionsIntentResponse
107        #[unsafe(method(handleListRideOptions:completion:))]
108        #[unsafe(method_family = none)]
109        unsafe fn handleListRideOptions_completion(
110            &self,
111            intent: &INListRideOptionsIntent,
112            completion: &block2::DynBlock<dyn Fn(NonNull<INListRideOptionsIntentResponse>)>,
113        );
114
115        #[cfg(all(
116            feature = "INIntent",
117            feature = "INIntentResponse",
118            feature = "INListRideOptionsIntentResponse",
119            feature = "block2"
120        ))]
121        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
122        ///
123        /// 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.
124        ///
125        ///
126        /// Parameter `intent`: The input intent
127        ///
128        /// Parameter `completion`: The response block contains an INListRideOptionsIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
129        ///
130        ///
131        /// See: INListRideOptionsIntentResponse
132        #[optional]
133        #[unsafe(method(confirmListRideOptions:completion:))]
134        #[unsafe(method_family = none)]
135        unsafe fn confirmListRideOptions_completion(
136            &self,
137            intent: &INListRideOptionsIntent,
138            completion: &block2::DynBlock<dyn Fn(NonNull<INListRideOptionsIntentResponse>)>,
139        );
140
141        #[cfg(all(
142            feature = "INIntent",
143            feature = "INIntentResolutionResult",
144            feature = "INPlacemarkResolutionResult",
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        #[optional]
159        #[unsafe(method(resolvePickupLocationForListRideOptions:withCompletion:))]
160        #[unsafe(method_family = none)]
161        unsafe fn resolvePickupLocationForListRideOptions_withCompletion(
162            &self,
163            intent: &INListRideOptionsIntent,
164            completion: &block2::DynBlock<dyn Fn(NonNull<INPlacemarkResolutionResult>)>,
165        );
166
167        #[cfg(all(
168            feature = "INIntent",
169            feature = "INIntentResolutionResult",
170            feature = "INPlacemarkResolutionResult",
171            feature = "block2"
172        ))]
173        #[optional]
174        #[unsafe(method(resolveDropOffLocationForListRideOptions:withCompletion:))]
175        #[unsafe(method_family = none)]
176        unsafe fn resolveDropOffLocationForListRideOptions_withCompletion(
177            &self,
178            intent: &INListRideOptionsIntent,
179            completion: &block2::DynBlock<dyn Fn(NonNull<INPlacemarkResolutionResult>)>,
180        );
181    }
182);