objc2-mail-kit 0.3.2

Bindings to the MailKit 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 crate::*;

extern_protocol!(
    /// A protocol which must be adopted by the class set as extension's `NSExtensionPrincipalClass`.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mailkit/meextension?language=objc)
    pub unsafe trait MEExtension: NSObjectProtocol + MainThreadOnly {
        #[cfg(feature = "MEComposeSession")]
        /// A factory method for returning an instance of
        /// `MEComposeSessionHandler`
        /// Parameter `session`: An instance of
        /// `MEComposeSession`that represents a mail compose window.
        #[optional]
        #[unsafe(method(handlerForComposeSession:))]
        #[unsafe(method_family = none)]
        unsafe fn handlerForComposeSession(
            &self,
            session: &MEComposeSession,
        ) -> Retained<ProtocolObject<dyn MEComposeSessionHandler>>;

        #[cfg(feature = "MEMessageActionHandler")]
        /// A factory method for returning an instance of
        /// `MEMessageActionHandler`
        #[optional]
        #[unsafe(method(handlerForMessageActions))]
        #[unsafe(method_family = none)]
        unsafe fn handlerForMessageActions(
            &self,
        ) -> Retained<ProtocolObject<dyn MEMessageActionHandler>>;

        #[cfg(feature = "MEContentBlocker")]
        /// A factory method for returning an instance of
        /// `MEContentBlocker`
        #[optional]
        #[unsafe(method(handlerForContentBlocker))]
        #[unsafe(method_family = none)]
        unsafe fn handlerForContentBlocker(&self)
            -> Retained<ProtocolObject<dyn MEContentBlocker>>;

        #[cfg(all(
            feature = "MEMessageDecoder",
            feature = "MEMessageEncoder",
            feature = "MEMessageSecurityHandler"
        ))]
        /// A factory method for returning an instance of
        /// `MEMessageSecurityHandler`
        #[optional]
        #[unsafe(method(handlerForMessageSecurity))]
        #[unsafe(method_family = none)]
        unsafe fn handlerForMessageSecurity(
            &self,
        ) -> Retained<ProtocolObject<dyn MEMessageSecurityHandler>>;
    }
);