objc2_intents/generated/
INFlight.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inflight?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct INFlight;
14);
15
16extern_conformance!(
17    unsafe impl NSCoding for INFlight {}
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for INFlight {}
22);
23
24unsafe impl CopyingHelper for INFlight {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for INFlight {}
30);
31
32extern_conformance!(
33    unsafe impl NSSecureCoding for INFlight {}
34);
35
36impl INFlight {
37    extern_methods!(
38        #[unsafe(method(init))]
39        #[unsafe(method_family = init)]
40        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
41
42        #[cfg(all(
43            feature = "INAirline",
44            feature = "INAirportGate",
45            feature = "INDateComponentsRange"
46        ))]
47        #[unsafe(method(initWithAirline:flightNumber:boardingTime:flightDuration:departureAirportGate:arrivalAirportGate:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithAirline_flightNumber_boardingTime_flightDuration_departureAirportGate_arrivalAirportGate(
50            this: Allocated<Self>,
51            airline: &INAirline,
52            flight_number: &NSString,
53            boarding_time: Option<&INDateComponentsRange>,
54            flight_duration: &INDateComponentsRange,
55            departure_airport_gate: &INAirportGate,
56            arrival_airport_gate: &INAirportGate,
57        ) -> Retained<Self>;
58
59        #[cfg(feature = "INAirline")]
60        #[unsafe(method(airline))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn airline(&self) -> Retained<INAirline>;
63
64        #[unsafe(method(flightNumber))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn flightNumber(&self) -> Retained<NSString>;
67
68        #[cfg(feature = "INDateComponentsRange")]
69        #[unsafe(method(boardingTime))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn boardingTime(&self) -> Option<Retained<INDateComponentsRange>>;
72
73        #[cfg(feature = "INDateComponentsRange")]
74        #[unsafe(method(flightDuration))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn flightDuration(&self) -> Retained<INDateComponentsRange>;
77
78        #[cfg(feature = "INAirportGate")]
79        #[unsafe(method(departureAirportGate))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn departureAirportGate(&self) -> Retained<INAirportGate>;
82
83        #[cfg(feature = "INAirportGate")]
84        #[unsafe(method(arrivalAirportGate))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn arrivalAirportGate(&self) -> Retained<INAirportGate>;
87    );
88}
89
90/// Methods declared on superclass `NSObject`.
91impl INFlight {
92    extern_methods!(
93        #[unsafe(method(new))]
94        #[unsafe(method_family = new)]
95        pub unsafe fn new() -> Retained<Self>;
96    );
97}