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::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

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

#[cfg(feature = "INIntentDonationMetadata")]
extern_conformance!(
    unsafe impl NSCoding for INSendMessageIntentDonationMetadata {}
);

#[cfg(feature = "INIntentDonationMetadata")]
extern_conformance!(
    unsafe impl NSCopying for INSendMessageIntentDonationMetadata {}
);

#[cfg(feature = "INIntentDonationMetadata")]
unsafe impl CopyingHelper for INSendMessageIntentDonationMetadata {
    type Result = Self;
}

#[cfg(feature = "INIntentDonationMetadata")]
extern_conformance!(
    unsafe impl NSObjectProtocol for INSendMessageIntentDonationMetadata {}
);

#[cfg(feature = "INIntentDonationMetadata")]
extern_conformance!(
    unsafe impl NSSecureCoding for INSendMessageIntentDonationMetadata {}
);

#[cfg(feature = "INIntentDonationMetadata")]
impl INSendMessageIntentDonationMetadata {
    extern_methods!(
        #[unsafe(method(mentionsCurrentUser))]
        #[unsafe(method_family = none)]
        pub unsafe fn mentionsCurrentUser(&self) -> bool;

        /// Setter for [`mentionsCurrentUser`][Self::mentionsCurrentUser].
        #[unsafe(method(setMentionsCurrentUser:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMentionsCurrentUser(&self, mentions_current_user: bool);

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

        /// Setter for [`isReplyToCurrentUser`][Self::isReplyToCurrentUser].
        #[unsafe(method(setReplyToCurrentUser:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setReplyToCurrentUser(&self, reply_to_current_user: bool);

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

        /// Setter for [`notifyRecipientAnyway`][Self::notifyRecipientAnyway].
        #[unsafe(method(setNotifyRecipientAnyway:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setNotifyRecipientAnyway(&self, notify_recipient_anyway: bool);

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

        /// Setter for [`recipientCount`][Self::recipientCount].
        #[unsafe(method(setRecipientCount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRecipientCount(&self, recipient_count: NSUInteger);

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

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