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 unsafe fn threadIdentifier(&self) -> Retained<NSString>;
30
31        /// Setter for [`threadIdentifier`][Self::threadIdentifier].
32        #[unsafe(method(setThreadIdentifier:))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn setThreadIdentifier(&self, thread_identifier: &NSString);
35
36        #[cfg(feature = "UIConversationEntry")]
37        /// Array of messages in the conversation
38        #[unsafe(method(entries))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn entries(&self) -> Retained<NSArray<UIConversationEntry>>;
41
42        #[cfg(feature = "UIConversationEntry")]
43        /// Setter for [`entries`][Self::entries].
44        #[unsafe(method(setEntries:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn setEntries(&self, entries: &NSArray<UIConversationEntry>);
47
48        /// A set of strings that identifies the active person in the conversation on the current device.
49        #[unsafe(method(selfIdentifiers))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn selfIdentifiers(&self) -> Retained<NSSet<NSString>>;
52
53        /// Setter for [`selfIdentifiers`][Self::selfIdentifiers].
54        #[unsafe(method(setSelfIdentifiers:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn setSelfIdentifiers(&self, self_identifiers: &NSSet<NSString>);
57
58        /// A dictionary that relates participant identifiers to participant names.
59        #[unsafe(method(responsePrimaryRecipientIdentifiers))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn responsePrimaryRecipientIdentifiers(&self) -> Retained<NSSet<NSString>>;
62
63        /// Setter for [`responsePrimaryRecipientIdentifiers`][Self::responsePrimaryRecipientIdentifiers].
64        #[unsafe(method(setResponsePrimaryRecipientIdentifiers:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn setResponsePrimaryRecipientIdentifiers(
67            &self,
68            response_primary_recipient_identifiers: &NSSet<NSString>,
69        );
70
71        /// Map of participant identifiers to participant names
72        #[unsafe(method(participantNameByIdentifier))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn participantNameByIdentifier(
75            &self,
76        ) -> Retained<NSDictionary<NSString, NSPersonNameComponents>>;
77
78        /// Setter for [`participantNameByIdentifier`][Self::participantNameByIdentifier].
79        #[unsafe(method(setParticipantNameByIdentifier:))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn setParticipantNameByIdentifier(
82            &self,
83            participant_name_by_identifier: &NSDictionary<NSString, NSPersonNameComponents>,
84        );
85    );
86}
87
88/// Methods declared on superclass `NSObject`.
89impl UIConversationContext {
90    extern_methods!(
91        #[unsafe(method(init))]
92        #[unsafe(method_family = init)]
93        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
94
95        #[unsafe(method(new))]
96        #[unsafe(method_family = new)]
97        pub unsafe fn new() -> Retained<Self>;
98    );
99}