objc2_mail_kit/generated/
MEOutgoingMessageEncodingStatus.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Contains information about any security measures that will be applied to a mail message when it is sent or any errrors that occurred while verifying security status.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/mailkit/meoutgoingmessageencodingstatus?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct MEOutgoingMessageEncodingStatus;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for MEOutgoingMessageEncodingStatus {}
20);
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for MEOutgoingMessageEncodingStatus {}
24);
25
26extern_conformance!(
27    unsafe impl NSSecureCoding for MEOutgoingMessageEncodingStatus {}
28);
29
30impl MEOutgoingMessageEncodingStatus {
31    extern_methods!(
32        /// Whether or not the message can be signed.
33        #[unsafe(method(canSign))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn canSign(&self) -> bool;
36
37        /// Whether or not the message can be encrypted.
38        #[unsafe(method(canEncrypt))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn canEncrypt(&self) -> bool;
41
42        /// Any error that occurred while verifying the security status for the outgoing mail message.
43        #[unsafe(method(securityError))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn securityError(&self) -> Option<Retained<NSError>>;
46
47        #[cfg(feature = "MEEmailAddress")]
48        /// A list of any recipients for which the message should be encrypted but an error occurred. This could include missing the public key for the recipient.
49        #[unsafe(method(addressesFailingEncryption))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn addressesFailingEncryption(&self) -> Retained<NSArray<MEEmailAddress>>;
52
53        #[unsafe(method(new))]
54        #[unsafe(method_family = new)]
55        pub unsafe fn new() -> Retained<Self>;
56
57        #[unsafe(method(init))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
60
61        #[cfg(feature = "MEEmailAddress")]
62        #[unsafe(method(initWithCanSign:canEncrypt:securityError:addressesFailingEncryption:))]
63        #[unsafe(method_family = init)]
64        pub unsafe fn initWithCanSign_canEncrypt_securityError_addressesFailingEncryption(
65            this: Allocated<Self>,
66            can_sign: bool,
67            can_encrypt: bool,
68            security_error: Option<&NSError>,
69            addresses_failing_encryption: &NSArray<MEEmailAddress>,
70        ) -> Retained<Self>;
71    );
72}