objc2_map_kit/generated/
MKDirectionsResponse.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkdirectionsresponse?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct MKDirectionsResponse;
16);
17
18unsafe impl NSObjectProtocol for MKDirectionsResponse {}
19
20impl MKDirectionsResponse {
21    extern_methods!(
22        #[cfg(feature = "MKMapItem")]
23        #[unsafe(method(source))]
24        #[unsafe(method_family = none)]
25        pub unsafe fn source(&self) -> Retained<MKMapItem>;
26
27        #[cfg(feature = "MKMapItem")]
28        #[unsafe(method(destination))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn destination(&self) -> Retained<MKMapItem>;
31
32        #[unsafe(method(routes))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn routes(&self) -> Retained<NSArray<MKRoute>>;
35    );
36}
37
38/// Methods declared on superclass `NSObject`.
39impl MKDirectionsResponse {
40    extern_methods!(
41        #[unsafe(method(init))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45        #[unsafe(method(new))]
46        #[unsafe(method_family = new)]
47        pub unsafe fn new() -> Retained<Self>;
48    );
49}
50
51extern_class!(
52    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkroute?language=objc)
53    #[unsafe(super(NSObject))]
54    #[derive(Debug, PartialEq, Eq, Hash)]
55    pub struct MKRoute;
56);
57
58unsafe impl NSObjectProtocol for MKRoute {}
59
60impl MKRoute {
61    extern_methods!(
62        #[unsafe(method(name))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn name(&self) -> Retained<NSString>;
65
66        #[unsafe(method(advisoryNotices))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn advisoryNotices(&self) -> Retained<NSArray<NSString>>;
69
70        #[cfg(feature = "objc2-core-location")]
71        #[unsafe(method(distance))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn distance(&self) -> CLLocationDistance;
74
75        #[unsafe(method(expectedTravelTime))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn expectedTravelTime(&self) -> NSTimeInterval;
78
79        #[cfg(feature = "MKDirectionsTypes")]
80        #[unsafe(method(transportType))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn transportType(&self) -> MKDirectionsTransportType;
83
84        #[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
85        #[unsafe(method(polyline))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn polyline(&self) -> Retained<MKPolyline>;
88
89        #[unsafe(method(steps))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn steps(&self) -> Retained<NSArray<MKRouteStep>>;
92
93        #[unsafe(method(hasTolls))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn hasTolls(&self) -> bool;
96
97        #[unsafe(method(hasHighways))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn hasHighways(&self) -> bool;
100    );
101}
102
103/// Methods declared on superclass `NSObject`.
104impl MKRoute {
105    extern_methods!(
106        #[unsafe(method(init))]
107        #[unsafe(method_family = init)]
108        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
109
110        #[unsafe(method(new))]
111        #[unsafe(method_family = new)]
112        pub unsafe fn new() -> Retained<Self>;
113    );
114}
115
116extern_class!(
117    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkroutestep?language=objc)
118    #[unsafe(super(NSObject))]
119    #[derive(Debug, PartialEq, Eq, Hash)]
120    pub struct MKRouteStep;
121);
122
123unsafe impl NSObjectProtocol for MKRouteStep {}
124
125impl MKRouteStep {
126    extern_methods!(
127        #[unsafe(method(instructions))]
128        #[unsafe(method_family = none)]
129        pub unsafe fn instructions(&self) -> Retained<NSString>;
130
131        #[unsafe(method(notice))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn notice(&self) -> Option<Retained<NSString>>;
134
135        #[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
136        #[unsafe(method(polyline))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn polyline(&self) -> Retained<MKPolyline>;
139
140        #[cfg(feature = "objc2-core-location")]
141        #[unsafe(method(distance))]
142        #[unsafe(method_family = none)]
143        pub unsafe fn distance(&self) -> CLLocationDistance;
144
145        #[cfg(feature = "MKDirectionsTypes")]
146        #[unsafe(method(transportType))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn transportType(&self) -> MKDirectionsTransportType;
149    );
150}
151
152/// Methods declared on superclass `NSObject`.
153impl MKRouteStep {
154    extern_methods!(
155        #[unsafe(method(init))]
156        #[unsafe(method_family = init)]
157        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
158
159        #[unsafe(method(new))]
160        #[unsafe(method_family = new)]
161        pub unsafe fn new() -> Retained<Self>;
162    );
163}
164
165extern_class!(
166    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mketaresponse?language=objc)
167    #[unsafe(super(NSObject))]
168    #[derive(Debug, PartialEq, Eq, Hash)]
169    pub struct MKETAResponse;
170);
171
172unsafe impl NSObjectProtocol for MKETAResponse {}
173
174impl MKETAResponse {
175    extern_methods!(
176        #[cfg(feature = "MKMapItem")]
177        #[unsafe(method(source))]
178        #[unsafe(method_family = none)]
179        pub unsafe fn source(&self) -> Retained<MKMapItem>;
180
181        #[cfg(feature = "MKMapItem")]
182        #[unsafe(method(destination))]
183        #[unsafe(method_family = none)]
184        pub unsafe fn destination(&self) -> Retained<MKMapItem>;
185
186        #[unsafe(method(expectedTravelTime))]
187        #[unsafe(method_family = none)]
188        pub unsafe fn expectedTravelTime(&self) -> NSTimeInterval;
189
190        #[cfg(feature = "objc2-core-location")]
191        #[unsafe(method(distance))]
192        #[unsafe(method_family = none)]
193        pub unsafe fn distance(&self) -> CLLocationDistance;
194
195        #[unsafe(method(expectedArrivalDate))]
196        #[unsafe(method_family = none)]
197        pub unsafe fn expectedArrivalDate(&self) -> Retained<NSDate>;
198
199        #[unsafe(method(expectedDepartureDate))]
200        #[unsafe(method_family = none)]
201        pub unsafe fn expectedDepartureDate(&self) -> Retained<NSDate>;
202
203        #[cfg(feature = "MKDirectionsTypes")]
204        #[unsafe(method(transportType))]
205        #[unsafe(method_family = none)]
206        pub unsafe fn transportType(&self) -> MKDirectionsTransportType;
207    );
208}
209
210/// Methods declared on superclass `NSObject`.
211impl MKETAResponse {
212    extern_methods!(
213        #[unsafe(method(init))]
214        #[unsafe(method_family = init)]
215        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
216
217        #[unsafe(method(new))]
218        #[unsafe(method_family = new)]
219        pub unsafe fn new() -> Retained<Self>;
220    );
221}