objc2_ui_kit/generated/
UIConversationEntry.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    /// A base class that represents a message in a conversation.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiconversationentry?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct UIConversationEntry;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for UIConversationEntry {}
21);
22
23impl UIConversationEntry {
24    extern_methods!(
25        /// A string that contains the message’s text.
26        #[unsafe(method(text))]
27        #[unsafe(method_family = none)]
28        pub fn text(&self) -> Retained<NSString>;
29
30        /// Setter for [`text`][Self::text].
31        ///
32        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
33        #[unsafe(method(setText:))]
34        #[unsafe(method_family = none)]
35        pub fn setText(&self, text: &NSString);
36
37        /// A string that identifies the message’s sender.
38        #[unsafe(method(senderIdentifier))]
39        #[unsafe(method_family = none)]
40        pub fn senderIdentifier(&self) -> Retained<NSString>;
41
42        /// Setter for [`senderIdentifier`][Self::senderIdentifier].
43        ///
44        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
45        #[unsafe(method(setSenderIdentifier:))]
46        #[unsafe(method_family = none)]
47        pub fn setSenderIdentifier(&self, sender_identifier: &NSString);
48
49        /// A date that notes when the sender added the message to the conversation.
50        #[unsafe(method(sentDate))]
51        #[unsafe(method_family = none)]
52        pub fn sentDate(&self) -> Retained<NSDate>;
53
54        /// Setter for [`sentDate`][Self::sentDate].
55        ///
56        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
57        #[unsafe(method(setSentDate:))]
58        #[unsafe(method_family = none)]
59        pub fn setSentDate(&self, sent_date: &NSDate);
60
61        /// A string that uniquely identifies this specific entry in the conversation.
62        #[unsafe(method(entryIdentifier))]
63        #[unsafe(method_family = none)]
64        pub fn entryIdentifier(&self) -> Retained<NSString>;
65
66        /// Setter for [`entryIdentifier`][Self::entryIdentifier].
67        ///
68        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
69        #[unsafe(method(setEntryIdentifier:))]
70        #[unsafe(method_family = none)]
71        pub fn setEntryIdentifier(&self, entry_identifier: &NSString);
72
73        /// An optional string that identifies another message in a conversation, when this entry is a reply to that message.
74        ///
75        /// When an entry is a reply to another conversation entry, this contains the identifier of the conversation entry that the person replied to.
76        #[unsafe(method(replyThreadIdentifier))]
77        #[unsafe(method_family = none)]
78        pub fn replyThreadIdentifier(&self) -> Option<Retained<NSString>>;
79
80        /// Setter for [`replyThreadIdentifier`][Self::replyThreadIdentifier].
81        ///
82        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
83        #[unsafe(method(setReplyThreadIdentifier:))]
84        #[unsafe(method_family = none)]
85        pub fn setReplyThreadIdentifier(&self, reply_thread_identifier: Option<&NSString>);
86
87        /// A set of strings that identifies the primary recipients of the message.
88        #[unsafe(method(primaryRecipientIdentifiers))]
89        #[unsafe(method_family = none)]
90        pub fn primaryRecipientIdentifiers(&self) -> Retained<NSSet<NSString>>;
91
92        /// Setter for [`primaryRecipientIdentifiers`][Self::primaryRecipientIdentifiers].
93        ///
94        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
95        #[unsafe(method(setPrimaryRecipientIdentifiers:))]
96        #[unsafe(method_family = none)]
97        pub fn setPrimaryRecipientIdentifiers(
98            &self,
99            primary_recipient_identifiers: &NSSet<NSString>,
100        );
101    );
102}
103
104/// Methods declared on superclass `NSObject`.
105impl UIConversationEntry {
106    extern_methods!(
107        #[unsafe(method(init))]
108        #[unsafe(method_family = init)]
109        pub fn init(this: Allocated<Self>) -> Retained<Self>;
110
111        #[unsafe(method(new))]
112        #[unsafe(method_family = new)]
113        pub fn new() -> Retained<Self>;
114    );
115}
116
117impl DefaultRetained for UIConversationEntry {
118    #[inline]
119    fn default_retained() -> Retained<Self> {
120        Self::new()
121    }
122}