objc2_mail_kit/generated/
MEExtensionManager.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// Methods in this class allow the host app to interact with their Mail extension.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/mailkit/meextensionmanager?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct MEExtensionManager;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for MEExtensionManager {}
21);
22
23impl MEExtensionManager {
24    extern_methods!(
25        #[unsafe(method(new))]
26        #[unsafe(method_family = new)]
27        pub unsafe fn new() -> Retained<Self>;
28
29        #[unsafe(method(init))]
30        #[unsafe(method_family = init)]
31        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
32
33        #[cfg(feature = "block2")]
34        /// This will call on Mail to reload the content rule list associated with the given identifier. Mail May throttle reloading the content blocker to once every few minutes.
35        #[unsafe(method(reloadContentBlockerWithIdentifier:completionHandler:))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn reloadContentBlockerWithIdentifier_completionHandler(
38            identifier: &NSString,
39            completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
40        );
41
42        #[cfg(feature = "block2")]
43        /// This will call on Mail to reload the currently visible messages.  Mail may throttle reloading visible messages.
44        #[unsafe(method(reloadVisibleMessagesWithCompletionHandler:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn reloadVisibleMessagesWithCompletionHandler(
47            completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
48        );
49    );
50}