objc2-intents 0.3.2

Bindings to the Intents framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inflight?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct INFlight;
);

extern_conformance!(
    unsafe impl NSCoding for INFlight {}
);

extern_conformance!(
    unsafe impl NSCopying for INFlight {}
);

unsafe impl CopyingHelper for INFlight {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for INFlight {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for INFlight {}
);

impl INFlight {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(all(
            feature = "INAirline",
            feature = "INAirportGate",
            feature = "INDateComponentsRange"
        ))]
        #[unsafe(method(initWithAirline:flightNumber:boardingTime:flightDuration:departureAirportGate:arrivalAirportGate:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithAirline_flightNumber_boardingTime_flightDuration_departureAirportGate_arrivalAirportGate(
            this: Allocated<Self>,
            airline: &INAirline,
            flight_number: &NSString,
            boarding_time: Option<&INDateComponentsRange>,
            flight_duration: &INDateComponentsRange,
            departure_airport_gate: &INAirportGate,
            arrival_airport_gate: &INAirportGate,
        ) -> Retained<Self>;

        #[cfg(feature = "INAirline")]
        #[unsafe(method(airline))]
        #[unsafe(method_family = none)]
        pub unsafe fn airline(&self) -> Retained<INAirline>;

        #[unsafe(method(flightNumber))]
        #[unsafe(method_family = none)]
        pub unsafe fn flightNumber(&self) -> Retained<NSString>;

        #[cfg(feature = "INDateComponentsRange")]
        #[unsafe(method(boardingTime))]
        #[unsafe(method_family = none)]
        pub unsafe fn boardingTime(&self) -> Option<Retained<INDateComponentsRange>>;

        #[cfg(feature = "INDateComponentsRange")]
        #[unsafe(method(flightDuration))]
        #[unsafe(method_family = none)]
        pub unsafe fn flightDuration(&self) -> Retained<INDateComponentsRange>;

        #[cfg(feature = "INAirportGate")]
        #[unsafe(method(departureAirportGate))]
        #[unsafe(method_family = none)]
        pub unsafe fn departureAirportGate(&self) -> Retained<INAirportGate>;

        #[cfg(feature = "INAirportGate")]
        #[unsafe(method(arrivalAirportGate))]
        #[unsafe(method_family = none)]
        pub unsafe fn arrivalAirportGate(&self) -> Retained<INAirportGate>;
    );
}

/// Methods declared on superclass `NSObject`.
impl INFlight {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}