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

use crate::*;

extern_class!(
    /// Methods in this class allow the host app to interact with their Mail extension.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mailkit/meextensionmanager?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MEExtensionManager;
);

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

impl MEExtensionManager {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

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

        #[cfg(feature = "block2")]
        /// 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.
        #[unsafe(method(reloadContentBlockerWithIdentifier:completionHandler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn reloadContentBlockerWithIdentifier_completionHandler(
            identifier: &NSString,
            completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
        );

        #[cfg(feature = "block2")]
        /// This will call on Mail to reload the currently visible messages.  Mail may throttle reloading visible messages.
        #[unsafe(method(reloadVisibleMessagesWithCompletionHandler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn reloadVisibleMessagesWithCompletionHandler(
            completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
        );
    );
}