objc2_ui_kit/generated/
UIConversationContext.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 conversation between participants, such as in an email or messaging app.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiconversationcontext?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct UIConversationContext;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for UIConversationContext {}
21);
22
23impl UIConversationContext {
24    extern_methods!(
25        /// A string that uniquely identifies a conversation.
26        /// This identifier is persistent for the life of the conversation.
27        #[unsafe(method(threadIdentifier))]
28        #[unsafe(method_family = none)]
29        pub fn threadIdentifier(&self) -> Retained<NSString>;
30
31        /// Setter for [`threadIdentifier`][Self::threadIdentifier].
32        ///
33        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
34        #[unsafe(method(setThreadIdentifier:))]
35        #[unsafe(method_family = none)]
36        pub fn setThreadIdentifier(&self, thread_identifier: &NSString);
37
38        #[cfg(feature = "UIConversationEntry")]
39        /// Array of messages in the conversation
40        #[unsafe(method(entries))]
41        #[unsafe(method_family = none)]
42        pub fn entries(&self) -> Retained<NSArray<UIConversationEntry>>;
43
44        #[cfg(feature = "UIConversationEntry")]
45        /// Setter for [`entries`][Self::entries].
46        ///
47        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
48        #[unsafe(method(setEntries:))]
49        #[unsafe(method_family = none)]
50        pub fn setEntries(&self, entries: &NSArray<UIConversationEntry>);
51
52        /// A set of strings that identifies the active person in the conversation on the current device.
53        #[unsafe(method(selfIdentifiers))]
54        #[unsafe(method_family = none)]
55        pub fn selfIdentifiers(&self) -> Retained<NSSet<NSString>>;
56
57        /// Setter for [`selfIdentifiers`][Self::selfIdentifiers].
58        ///
59        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
60        #[unsafe(method(setSelfIdentifiers:))]
61        #[unsafe(method_family = none)]
62        pub fn setSelfIdentifiers(&self, self_identifiers: &NSSet<NSString>);
63
64        /// A dictionary that relates participant identifiers to participant names.
65        #[unsafe(method(responsePrimaryRecipientIdentifiers))]
66        #[unsafe(method_family = none)]
67        pub fn responsePrimaryRecipientIdentifiers(&self) -> Retained<NSSet<NSString>>;
68
69        /// Setter for [`responsePrimaryRecipientIdentifiers`][Self::responsePrimaryRecipientIdentifiers].
70        ///
71        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
72        #[unsafe(method(setResponsePrimaryRecipientIdentifiers:))]
73        #[unsafe(method_family = none)]
74        pub fn setResponsePrimaryRecipientIdentifiers(
75            &self,
76            response_primary_recipient_identifiers: &NSSet<NSString>,
77        );
78
79        /// Map of participant identifiers to participant names
80        #[unsafe(method(participantNameByIdentifier))]
81        #[unsafe(method_family = none)]
82        pub fn participantNameByIdentifier(
83            &self,
84        ) -> Retained<NSDictionary<NSString, NSPersonNameComponents>>;
85
86        /// Setter for [`participantNameByIdentifier`][Self::participantNameByIdentifier].
87        ///
88        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
89        #[unsafe(method(setParticipantNameByIdentifier:))]
90        #[unsafe(method_family = none)]
91        pub fn setParticipantNameByIdentifier(
92            &self,
93            participant_name_by_identifier: &NSDictionary<NSString, NSPersonNameComponents>,
94        );
95    );
96}
97
98/// Methods declared on superclass `NSObject`.
99impl UIConversationContext {
100    extern_methods!(
101        #[unsafe(method(init))]
102        #[unsafe(method_family = init)]
103        pub fn init(this: Allocated<Self>) -> Retained<Self>;
104
105        #[unsafe(method(new))]
106        #[unsafe(method_family = new)]
107        pub fn new() -> Retained<Self>;
108    );
109}
110
111impl DefaultRetained for UIConversationContext {
112    #[inline]
113    fn default_retained() -> Retained<Self> {
114        Self::new()
115    }
116}