Skip to main content

objc2_mail_kit/generated/
MEExtension.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_protocol!(
9    /// A protocol which must be adopted by the class set as extension's `NSExtensionPrincipalClass`.
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/mailkit/meextension?language=objc)
12    pub unsafe trait MEExtension: NSObjectProtocol + MainThreadOnly {
13        #[cfg(feature = "MEComposeSession")]
14        /// A factory method for returning an instance of
15        /// `MEComposeSessionHandler`
16        /// Parameter `session`: An instance of
17        /// `MEComposeSession`that represents a mail compose window.
18        #[optional]
19        #[unsafe(method(handlerForComposeSession:))]
20        #[unsafe(method_family = none)]
21        unsafe fn handlerForComposeSession(
22            &self,
23            session: &MEComposeSession,
24        ) -> Retained<ProtocolObject<dyn MEComposeSessionHandler>>;
25
26        #[cfg(feature = "MEMessageActionHandler")]
27        /// A factory method for returning an instance of
28        /// `MEMessageActionHandler`
29        #[optional]
30        #[unsafe(method(handlerForMessageActions))]
31        #[unsafe(method_family = none)]
32        unsafe fn handlerForMessageActions(
33            &self,
34        ) -> Retained<ProtocolObject<dyn MEMessageActionHandler>>;
35
36        #[cfg(feature = "MEContentBlocker")]
37        /// A factory method for returning an instance of
38        /// `MEContentBlocker`
39        #[optional]
40        #[unsafe(method(handlerForContentBlocker))]
41        #[unsafe(method_family = none)]
42        unsafe fn handlerForContentBlocker(&self)
43            -> Retained<ProtocolObject<dyn MEContentBlocker>>;
44
45        #[cfg(all(
46            feature = "MEMessageDecoder",
47            feature = "MEMessageEncoder",
48            feature = "MEMessageSecurityHandler"
49        ))]
50        /// A factory method for returning an instance of
51        /// `MEMessageSecurityHandler`
52        #[optional]
53        #[unsafe(method(handlerForMessageSecurity))]
54        #[unsafe(method_family = none)]
55        unsafe fn handlerForMessageSecurity(
56            &self,
57        ) -> Retained<ProtocolObject<dyn MEMessageSecurityHandler>>;
58    }
59);