objc2_intents/generated/
INRequestRideIntentResponse.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct INRequestRideIntentResponseCode(pub NSInteger);
15impl INRequestRideIntentResponseCode {
16 #[doc(alias = "INRequestRideIntentResponseCodeUnspecified")]
17 pub const Unspecified: Self = Self(0);
18 #[doc(alias = "INRequestRideIntentResponseCodeReady")]
19 pub const Ready: Self = Self(1);
20 #[doc(alias = "INRequestRideIntentResponseCodeInProgress")]
21 #[deprecated = "INRequestRideIntentResponseCodeInProgress is deprecated."]
22 pub const InProgress: Self = Self(2);
23 #[doc(alias = "INRequestRideIntentResponseCodeSuccess")]
24 pub const Success: Self = Self(3);
25 #[doc(alias = "INRequestRideIntentResponseCodeFailure")]
26 pub const Failure: Self = Self(4);
27 #[doc(alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunch")]
28 pub const FailureRequiringAppLaunch: Self = Self(5);
29 #[doc(alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchMustVerifyCredentials")]
30 pub const FailureRequiringAppLaunchMustVerifyCredentials: Self = Self(6);
31 #[doc(alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchNoServiceInArea")]
32 pub const FailureRequiringAppLaunchNoServiceInArea: Self = Self(7);
33 #[doc(
34 alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchServiceTemporarilyUnavailable"
35 )]
36 pub const FailureRequiringAppLaunchServiceTemporarilyUnavailable: Self = Self(8);
37 #[doc(
38 alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchPreviousRideNeedsCompletion"
39 )]
40 pub const FailureRequiringAppLaunchPreviousRideNeedsCompletion: Self = Self(9);
41 #[doc(alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchRideScheduledTooFar")]
42 pub const FailureRequiringAppLaunchRideScheduledTooFar: Self = Self(10);
43}
44
45unsafe impl Encode for INRequestRideIntentResponseCode {
46 const ENCODING: Encoding = NSInteger::ENCODING;
47}
48
49unsafe impl RefEncode for INRequestRideIntentResponseCode {
50 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
51}
52
53extern_class!(
54 #[unsafe(super(INIntentResponse, NSObject))]
56 #[derive(Debug, PartialEq, Eq, Hash)]
57 #[cfg(feature = "INIntentResponse")]
58 pub struct INRequestRideIntentResponse;
59);
60
61#[cfg(feature = "INIntentResponse")]
62extern_conformance!(
63 unsafe impl NSCoding for INRequestRideIntentResponse {}
64);
65
66#[cfg(feature = "INIntentResponse")]
67extern_conformance!(
68 unsafe impl NSCopying for INRequestRideIntentResponse {}
69);
70
71#[cfg(feature = "INIntentResponse")]
72unsafe impl CopyingHelper for INRequestRideIntentResponse {
73 type Result = Self;
74}
75
76#[cfg(feature = "INIntentResponse")]
77extern_conformance!(
78 unsafe impl NSObjectProtocol for INRequestRideIntentResponse {}
79);
80
81#[cfg(feature = "INIntentResponse")]
82extern_conformance!(
83 unsafe impl NSSecureCoding for INRequestRideIntentResponse {}
84);
85
86#[cfg(feature = "INIntentResponse")]
87impl INRequestRideIntentResponse {
88 extern_methods!(
89 #[unsafe(method(init))]
90 #[unsafe(method_family = init)]
91 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
92
93 #[unsafe(method(initWithCode:userActivity:))]
94 #[unsafe(method_family = init)]
95 pub unsafe fn initWithCode_userActivity(
96 this: Allocated<Self>,
97 code: INRequestRideIntentResponseCode,
98 user_activity: Option<&NSUserActivity>,
99 ) -> Retained<Self>;
100
101 #[unsafe(method(code))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn code(&self) -> INRequestRideIntentResponseCode;
104
105 #[cfg(feature = "INRideStatus")]
106 #[unsafe(method(rideStatus))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn rideStatus(&self) -> Option<Retained<INRideStatus>>;
109
110 #[cfg(feature = "INRideStatus")]
111 #[unsafe(method(setRideStatus:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn setRideStatus(&self, ride_status: Option<&INRideStatus>);
117 );
118}
119
120#[cfg(feature = "INIntentResponse")]
122impl INRequestRideIntentResponse {
123 extern_methods!(
124 #[unsafe(method(new))]
125 #[unsafe(method_family = new)]
126 pub unsafe fn new() -> Retained<Self>;
127 );
128}