objc2_intents/generated/
INGetRideStatusIntent.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/ingetridestatusintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    pub struct INGetRideStatusIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20    unsafe impl NSCoding for INGetRideStatusIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25    unsafe impl NSCopying for INGetRideStatusIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INGetRideStatusIntent {
30    type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for INGetRideStatusIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40    unsafe impl NSSecureCoding for INGetRideStatusIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INGetRideStatusIntent {
45    extern_methods!(
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49    );
50}
51
52/// Methods declared on superclass `NSObject`.
53#[cfg(feature = "INIntent")]
54impl INGetRideStatusIntent {
55    extern_methods!(
56        #[unsafe(method(new))]
57        #[unsafe(method_family = new)]
58        pub unsafe fn new() -> Retained<Self>;
59    );
60}
61
62extern_protocol!(
63    /// Protocol to declare support for handling an INGetRideStatusIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
64    ///
65    /// 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.
66    ///
67    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/ingetridestatusintenthandling?language=objc)
68    pub unsafe trait INGetRideStatusIntentHandling: NSObjectProtocol {
69        #[cfg(all(
70            feature = "INGetRideStatusIntentResponse",
71            feature = "INIntent",
72            feature = "INIntentResponse",
73            feature = "block2"
74        ))]
75        /// Handling method - Execute the task represented by the INGetRideStatusIntent that's passed in
76        ///
77        /// Called to actually execute the intent. The app must return a response for this intent.
78        ///
79        ///
80        /// Parameter `intent`: The input intent
81        ///
82        /// Parameter `completion`: The response handling block takes a INGetRideStatusIntentResponse containing the details of the result of having executed the intent
83        ///
84        ///
85        /// See: INGetRideStatusIntentResponse
86        #[unsafe(method(handleGetRideStatus:completion:))]
87        #[unsafe(method_family = none)]
88        unsafe fn handleGetRideStatus_completion(
89            &self,
90            intent: &INGetRideStatusIntent,
91            completion: &block2::DynBlock<dyn Fn(NonNull<INGetRideStatusIntentResponse>)>,
92        );
93
94        #[cfg(feature = "INIntent")]
95        #[unsafe(method(startSendingUpdatesForGetRideStatus:toObserver:))]
96        #[unsafe(method_family = none)]
97        unsafe fn startSendingUpdatesForGetRideStatus_toObserver(
98            &self,
99            intent: &INGetRideStatusIntent,
100            observer: &ProtocolObject<dyn INGetRideStatusIntentResponseObserver>,
101        );
102
103        #[cfg(feature = "INIntent")]
104        #[unsafe(method(stopSendingUpdatesForGetRideStatus:))]
105        #[unsafe(method_family = none)]
106        unsafe fn stopSendingUpdatesForGetRideStatus(&self, intent: &INGetRideStatusIntent);
107
108        #[cfg(all(
109            feature = "INGetRideStatusIntentResponse",
110            feature = "INIntent",
111            feature = "INIntentResponse",
112            feature = "block2"
113        ))]
114        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
115        ///
116        /// 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.
117        ///
118        ///
119        /// Parameter `intent`: The input intent
120        ///
121        /// Parameter `completion`: The response block contains an INGetRideStatusIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
122        ///
123        ///
124        /// See: INGetRideStatusIntentResponse
125        #[optional]
126        #[unsafe(method(confirmGetRideStatus:completion:))]
127        #[unsafe(method_family = none)]
128        unsafe fn confirmGetRideStatus_completion(
129            &self,
130            intent: &INGetRideStatusIntent,
131            completion: &block2::DynBlock<dyn Fn(NonNull<INGetRideStatusIntentResponse>)>,
132        );
133    }
134);
135
136extern_protocol!(
137    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetridestatusintentresponseobserver?language=objc)
138    pub unsafe trait INGetRideStatusIntentResponseObserver: NSObjectProtocol {
139        #[cfg(all(
140            feature = "INGetRideStatusIntentResponse",
141            feature = "INIntentResponse"
142        ))]
143        #[unsafe(method(getRideStatusResponseDidUpdate:))]
144        #[unsafe(method_family = none)]
145        unsafe fn getRideStatusResponseDidUpdate(&self, response: &INGetRideStatusIntentResponse);
146    }
147);