objc2_mail_kit/generated/
MEMessageSigner.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 a message signer
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/mailkit/memessagesigner?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct MEMessageSigner;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for MEMessageSigner {}
20);
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for MEMessageSigner {}
24);
25
26extern_conformance!(
27    unsafe impl NSSecureCoding for MEMessageSigner {}
28);
29
30impl MEMessageSigner {
31    extern_methods!(
32        #[cfg(feature = "MEEmailAddress")]
33        /// Email addresses associated with the signature.
34        #[unsafe(method(emailAddresses))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn emailAddresses(&self) -> Retained<NSArray<MEEmailAddress>>;
37
38        /// The message signers label. Shown in the message header view. For instance, "John Smith".
39        #[unsafe(method(label))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn label(&self) -> Retained<NSString>;
42
43        /// The context for the message signature. This might include the signing certificate. This will be passed back to the extension for
44        /// either verifying the signature or if the user wishes to view signature information.
45        #[unsafe(method(context))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn context(&self) -> Retained<NSData>;
48
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub unsafe fn new() -> Retained<Self>;
52
53        #[unsafe(method(init))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57        #[cfg(feature = "MEEmailAddress")]
58        #[unsafe(method(initWithEmailAddresses:signatureLabel:context:))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn initWithEmailAddresses_signatureLabel_context(
61            this: Allocated<Self>,
62            email_addresses: &NSArray<MEEmailAddress>,
63            label: &NSString,
64            context: Option<&NSData>,
65        ) -> Retained<Self>;
66    );
67}