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/inrecurrencerule?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct INRecurrenceRule;
);

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

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

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

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

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

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

        #[cfg(feature = "INRecurrenceFrequency")]
        #[unsafe(method(initWithInterval:frequency:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithInterval_frequency(
            this: Allocated<Self>,
            interval: NSUInteger,
            frequency: INRecurrenceFrequency,
        ) -> Retained<Self>;

        #[cfg(all(feature = "INDayOfWeekOptions", feature = "INRecurrenceFrequency"))]
        #[unsafe(method(initWithInterval:frequency:weeklyRecurrenceDays:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithInterval_frequency_weeklyRecurrenceDays(
            this: Allocated<Self>,
            interval: NSUInteger,
            frequency: INRecurrenceFrequency,
            weekly_recurrence_days: INDayOfWeekOptions,
        ) -> Retained<Self>;

        #[unsafe(method(interval))]
        #[unsafe(method_family = none)]
        pub unsafe fn interval(&self) -> NSUInteger;

        #[cfg(feature = "INRecurrenceFrequency")]
        #[unsafe(method(frequency))]
        #[unsafe(method_family = none)]
        pub unsafe fn frequency(&self) -> INRecurrenceFrequency;

        #[cfg(feature = "INDayOfWeekOptions")]
        #[unsafe(method(weeklyRecurrenceDays))]
        #[unsafe(method_family = none)]
        pub unsafe fn weeklyRecurrenceDays(&self) -> INDayOfWeekOptions;
    );
}

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