icrate/generated/MailKit/
MEComposeContext.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::Foundation::*;
6use crate::MailKit::*;
7
8ns_enum!(
9 #[underlying(NSInteger)]
10 pub enum MEComposeUserAction {
11 MEComposeUserActionNewMessage = 1,
12 MEComposeUserActionReply = 2,
13 MEComposeUserActionReplyAll = 3,
14 MEComposeUserActionForward = 4,
15 }
16);
17
18extern_class!(
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[cfg(feature = "MailKit_MEComposeContext")]
21 pub struct MEComposeContext;
22
23 #[cfg(feature = "MailKit_MEComposeContext")]
24 unsafe impl ClassType for MEComposeContext {
25 type Super = NSObject;
26 type Mutability = InteriorMutable;
27 }
28);
29
30#[cfg(feature = "MailKit_MEComposeContext")]
31unsafe impl NSObjectProtocol for MEComposeContext {}
32
33extern_methods!(
34 #[cfg(feature = "MailKit_MEComposeContext")]
35 unsafe impl MEComposeContext {
36 #[cfg(feature = "Foundation_NSUUID")]
37 #[method_id(@__retain_semantics Other contextID)]
38 pub unsafe fn contextID(&self) -> Id<NSUUID>;
39
40 #[cfg(feature = "MailKit_MEMessage")]
41 #[method_id(@__retain_semantics Other originalMessage)]
42 pub unsafe fn originalMessage(&self) -> Option<Id<MEMessage>>;
43
44 #[method(action)]
45 pub unsafe fn action(&self) -> MEComposeUserAction;
46
47 #[method(isEncrypted)]
48 pub unsafe fn isEncrypted(&self) -> bool;
49
50 #[method(shouldEncrypt)]
51 pub unsafe fn shouldEncrypt(&self) -> bool;
52
53 #[method(isSigned)]
54 pub unsafe fn isSigned(&self) -> bool;
55
56 #[method(shouldSign)]
57 pub unsafe fn shouldSign(&self) -> bool;
58 }
59);
60
61extern_methods!(
62 #[cfg(feature = "MailKit_MEComposeContext")]
64 unsafe impl MEComposeContext {
65 #[method_id(@__retain_semantics Init init)]
66 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
67
68 #[method_id(@__retain_semantics New new)]
69 pub unsafe fn new() -> Id<Self>;
70 }
71);