rust_macios/contacts/
cn_change_history_add_group_event.rs

1use objc::{msg_send, sel, sel_impl};
2
3use crate::{
4    foundation::NSString,
5    object,
6    objective_c_runtime::{macros::interface_impl, traits::FromId},
7};
8
9use super::{CNGroup, ICNChangeHistoryEvent};
10
11object! {
12    ///
13    unsafe pub struct CNChangeHistoryAddGroupEvent;
14}
15
16impl ICNChangeHistoryEvent for CNChangeHistoryAddGroupEvent {}
17
18#[interface_impl(CNChangeHistoryEvent)]
19impl CNChangeHistoryAddGroupEvent {
20    ///
21    #[property]
22    pub fn group(&self) -> CNGroup {
23        unsafe { CNGroup::from_id(msg_send![self.m_self(), group]) }
24    }
25
26    ///
27    #[property]
28    pub fn container_identifier(&self) -> NSString {
29        unsafe { NSString::from_id(msg_send![self.m_self(), containerIdentifier]) }
30    }
31}