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

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

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

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

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

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

impl INTermsAndConditions {
    extern_methods!(
        #[unsafe(method(initWithLocalizedTermsAndConditionsText:privacyPolicyURL:termsAndConditionsURL:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithLocalizedTermsAndConditionsText_privacyPolicyURL_termsAndConditionsURL(
            this: Allocated<Self>,
            localized_terms_and_conditions_text: &NSString,
            privacy_policy_url: Option<&NSURL>,
            terms_and_conditions_url: Option<&NSURL>,
        ) -> Retained<Self>;

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

        #[unsafe(method(privacyPolicyURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn privacyPolicyURL(&self) -> Option<Retained<NSURL>>;

        #[unsafe(method(termsAndConditionsURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn termsAndConditionsURL(&self) -> Option<Retained<NSURL>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl INTermsAndConditions {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}