objc2_map_kit/generated/
MKDirectionsResponse.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct MKDirectionsResponse;
16);
17
18extern_conformance!(
19 unsafe impl NSObjectProtocol for MKDirectionsResponse {}
20);
21
22impl MKDirectionsResponse {
23 extern_methods!(
24 #[cfg(feature = "MKMapItem")]
25 #[unsafe(method(source))]
26 #[unsafe(method_family = none)]
27 pub unsafe fn source(&self) -> Retained<MKMapItem>;
28
29 #[cfg(feature = "MKMapItem")]
30 #[unsafe(method(destination))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn destination(&self) -> Retained<MKMapItem>;
33
34 #[unsafe(method(routes))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn routes(&self) -> Retained<NSArray<MKRoute>>;
37 );
38}
39
40impl MKDirectionsResponse {
42 extern_methods!(
43 #[unsafe(method(init))]
44 #[unsafe(method_family = init)]
45 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
46
47 #[unsafe(method(new))]
48 #[unsafe(method_family = new)]
49 pub unsafe fn new() -> Retained<Self>;
50 );
51}
52
53extern_class!(
54 #[unsafe(super(NSObject))]
56 #[derive(Debug, PartialEq, Eq, Hash)]
57 pub struct MKRoute;
58);
59
60extern_conformance!(
61 unsafe impl NSObjectProtocol for MKRoute {}
62);
63
64impl MKRoute {
65 extern_methods!(
66 #[unsafe(method(name))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn name(&self) -> Retained<NSString>;
69
70 #[unsafe(method(advisoryNotices))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn advisoryNotices(&self) -> Retained<NSArray<NSString>>;
73
74 #[cfg(feature = "objc2-core-location")]
75 #[unsafe(method(distance))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn distance(&self) -> CLLocationDistance;
78
79 #[unsafe(method(expectedTravelTime))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn expectedTravelTime(&self) -> NSTimeInterval;
82
83 #[cfg(feature = "MKDirectionsTypes")]
84 #[unsafe(method(transportType))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn transportType(&self) -> MKDirectionsTransportType;
87
88 #[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
89 #[unsafe(method(polyline))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn polyline(&self) -> Retained<MKPolyline>;
92
93 #[unsafe(method(steps))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn steps(&self) -> Retained<NSArray<MKRouteStep>>;
96
97 #[unsafe(method(hasTolls))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn hasTolls(&self) -> bool;
100
101 #[unsafe(method(hasHighways))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn hasHighways(&self) -> bool;
104 );
105}
106
107impl MKRoute {
109 extern_methods!(
110 #[unsafe(method(init))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
113
114 #[unsafe(method(new))]
115 #[unsafe(method_family = new)]
116 pub unsafe fn new() -> Retained<Self>;
117 );
118}
119
120extern_class!(
121 #[unsafe(super(NSObject))]
123 #[derive(Debug, PartialEq, Eq, Hash)]
124 pub struct MKRouteStep;
125);
126
127extern_conformance!(
128 unsafe impl NSObjectProtocol for MKRouteStep {}
129);
130
131impl MKRouteStep {
132 extern_methods!(
133 #[unsafe(method(instructions))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn instructions(&self) -> Retained<NSString>;
136
137 #[unsafe(method(notice))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn notice(&self) -> Option<Retained<NSString>>;
140
141 #[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
142 #[unsafe(method(polyline))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn polyline(&self) -> Retained<MKPolyline>;
145
146 #[cfg(feature = "objc2-core-location")]
147 #[unsafe(method(distance))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn distance(&self) -> CLLocationDistance;
150
151 #[cfg(feature = "MKDirectionsTypes")]
152 #[unsafe(method(transportType))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn transportType(&self) -> MKDirectionsTransportType;
155 );
156}
157
158impl MKRouteStep {
160 extern_methods!(
161 #[unsafe(method(init))]
162 #[unsafe(method_family = init)]
163 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
164
165 #[unsafe(method(new))]
166 #[unsafe(method_family = new)]
167 pub unsafe fn new() -> Retained<Self>;
168 );
169}
170
171extern_class!(
172 #[unsafe(super(NSObject))]
174 #[derive(Debug, PartialEq, Eq, Hash)]
175 pub struct MKETAResponse;
176);
177
178extern_conformance!(
179 unsafe impl NSObjectProtocol for MKETAResponse {}
180);
181
182impl MKETAResponse {
183 extern_methods!(
184 #[cfg(feature = "MKMapItem")]
185 #[unsafe(method(source))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn source(&self) -> Retained<MKMapItem>;
188
189 #[cfg(feature = "MKMapItem")]
190 #[unsafe(method(destination))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn destination(&self) -> Retained<MKMapItem>;
193
194 #[unsafe(method(expectedTravelTime))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn expectedTravelTime(&self) -> NSTimeInterval;
197
198 #[cfg(feature = "objc2-core-location")]
199 #[unsafe(method(distance))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn distance(&self) -> CLLocationDistance;
202
203 #[unsafe(method(expectedArrivalDate))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn expectedArrivalDate(&self) -> Retained<NSDate>;
206
207 #[unsafe(method(expectedDepartureDate))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn expectedDepartureDate(&self) -> Retained<NSDate>;
210
211 #[cfg(feature = "MKDirectionsTypes")]
212 #[unsafe(method(transportType))]
213 #[unsafe(method_family = none)]
214 pub unsafe fn transportType(&self) -> MKDirectionsTransportType;
215 );
216}
217
218impl MKETAResponse {
220 extern_methods!(
221 #[unsafe(method(init))]
222 #[unsafe(method_family = init)]
223 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
224
225 #[unsafe(method(new))]
226 #[unsafe(method_family = new)]
227 pub unsafe fn new() -> Retained<Self>;
228 );
229}