use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryEvent {}
);
impl CNChangeHistoryEvent {
extern_methods!(
#[unsafe(method(acceptEventVisitor:))]
#[unsafe(method_family = none)]
pub unsafe fn acceptEventVisitor(
&self,
visitor: &ProtocolObject<dyn CNChangeHistoryEventVisitor>,
);
);
}
impl CNChangeHistoryEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryDropEverythingEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryDropEverythingEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryDropEverythingEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryDropEverythingEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryDropEverythingEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryDropEverythingEvent {}
);
impl CNChangeHistoryDropEverythingEvent {
extern_methods!();
}
impl CNChangeHistoryDropEverythingEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryAddContactEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryAddContactEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryAddContactEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryAddContactEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryAddContactEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryAddContactEvent {}
);
impl CNChangeHistoryAddContactEvent {
extern_methods!(
#[cfg(feature = "CNContact")]
#[unsafe(method(contact))]
#[unsafe(method_family = none)]
pub unsafe fn contact(&self) -> Retained<CNContact>;
#[unsafe(method(containerIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn containerIdentifier(&self) -> Option<Retained<NSString>>;
);
}
impl CNChangeHistoryAddContactEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryUpdateContactEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryUpdateContactEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryUpdateContactEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryUpdateContactEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryUpdateContactEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryUpdateContactEvent {}
);
impl CNChangeHistoryUpdateContactEvent {
extern_methods!(
#[cfg(feature = "CNContact")]
#[unsafe(method(contact))]
#[unsafe(method_family = none)]
pub unsafe fn contact(&self) -> Retained<CNContact>;
);
}
impl CNChangeHistoryUpdateContactEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryDeleteContactEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryDeleteContactEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryDeleteContactEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryDeleteContactEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryDeleteContactEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryDeleteContactEvent {}
);
impl CNChangeHistoryDeleteContactEvent {
extern_methods!(
#[unsafe(method(contactIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn contactIdentifier(&self) -> Retained<NSString>;
);
}
impl CNChangeHistoryDeleteContactEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryAddGroupEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryAddGroupEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryAddGroupEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryAddGroupEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryAddGroupEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryAddGroupEvent {}
);
impl CNChangeHistoryAddGroupEvent {
extern_methods!(
#[cfg(feature = "CNGroup")]
#[unsafe(method(group))]
#[unsafe(method_family = none)]
pub unsafe fn group(&self) -> Retained<CNGroup>;
#[unsafe(method(containerIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn containerIdentifier(&self) -> Retained<NSString>;
);
}
impl CNChangeHistoryAddGroupEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryUpdateGroupEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryUpdateGroupEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryUpdateGroupEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryUpdateGroupEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryUpdateGroupEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryUpdateGroupEvent {}
);
impl CNChangeHistoryUpdateGroupEvent {
extern_methods!(
#[cfg(feature = "CNGroup")]
#[unsafe(method(group))]
#[unsafe(method_family = none)]
pub unsafe fn group(&self) -> Retained<CNGroup>;
);
}
impl CNChangeHistoryUpdateGroupEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryDeleteGroupEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryDeleteGroupEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryDeleteGroupEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryDeleteGroupEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryDeleteGroupEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryDeleteGroupEvent {}
);
impl CNChangeHistoryDeleteGroupEvent {
extern_methods!(
#[unsafe(method(groupIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn groupIdentifier(&self) -> Retained<NSString>;
);
}
impl CNChangeHistoryDeleteGroupEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryAddMemberToGroupEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryAddMemberToGroupEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryAddMemberToGroupEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryAddMemberToGroupEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryAddMemberToGroupEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryAddMemberToGroupEvent {}
);
impl CNChangeHistoryAddMemberToGroupEvent {
extern_methods!(
#[cfg(feature = "CNContact")]
#[unsafe(method(member))]
#[unsafe(method_family = none)]
pub unsafe fn member(&self) -> Retained<CNContact>;
#[cfg(feature = "CNGroup")]
#[unsafe(method(group))]
#[unsafe(method_family = none)]
pub unsafe fn group(&self) -> Retained<CNGroup>;
);
}
impl CNChangeHistoryAddMemberToGroupEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryRemoveMemberFromGroupEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryRemoveMemberFromGroupEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryRemoveMemberFromGroupEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryRemoveMemberFromGroupEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryRemoveMemberFromGroupEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryRemoveMemberFromGroupEvent {}
);
impl CNChangeHistoryRemoveMemberFromGroupEvent {
extern_methods!(
#[cfg(feature = "CNContact")]
#[unsafe(method(member))]
#[unsafe(method_family = none)]
pub unsafe fn member(&self) -> Retained<CNContact>;
#[cfg(feature = "CNGroup")]
#[unsafe(method(group))]
#[unsafe(method_family = none)]
pub unsafe fn group(&self) -> Retained<CNGroup>;
);
}
impl CNChangeHistoryRemoveMemberFromGroupEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryAddSubgroupToGroupEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryAddSubgroupToGroupEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryAddSubgroupToGroupEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryAddSubgroupToGroupEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryAddSubgroupToGroupEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryAddSubgroupToGroupEvent {}
);
impl CNChangeHistoryAddSubgroupToGroupEvent {
extern_methods!(
#[cfg(feature = "CNGroup")]
#[unsafe(method(subgroup))]
#[unsafe(method_family = none)]
pub unsafe fn subgroup(&self) -> Retained<CNGroup>;
#[cfg(feature = "CNGroup")]
#[unsafe(method(group))]
#[unsafe(method_family = none)]
pub unsafe fn group(&self) -> Retained<CNGroup>;
);
}
impl CNChangeHistoryAddSubgroupToGroupEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(CNChangeHistoryEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNChangeHistoryRemoveSubgroupFromGroupEvent;
);
extern_conformance!(
unsafe impl NSCoding for CNChangeHistoryRemoveSubgroupFromGroupEvent {}
);
extern_conformance!(
unsafe impl NSCopying for CNChangeHistoryRemoveSubgroupFromGroupEvent {}
);
unsafe impl CopyingHelper for CNChangeHistoryRemoveSubgroupFromGroupEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNChangeHistoryRemoveSubgroupFromGroupEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNChangeHistoryRemoveSubgroupFromGroupEvent {}
);
impl CNChangeHistoryRemoveSubgroupFromGroupEvent {
extern_methods!(
#[cfg(feature = "CNGroup")]
#[unsafe(method(subgroup))]
#[unsafe(method_family = none)]
pub unsafe fn subgroup(&self) -> Retained<CNGroup>;
#[cfg(feature = "CNGroup")]
#[unsafe(method(group))]
#[unsafe(method_family = none)]
pub unsafe fn group(&self) -> Retained<CNGroup>;
);
}
impl CNChangeHistoryRemoveSubgroupFromGroupEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_protocol!(
pub unsafe trait CNChangeHistoryEventVisitor: NSObjectProtocol {
#[unsafe(method(visitDropEverythingEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitDropEverythingEvent(&self, event: &CNChangeHistoryDropEverythingEvent);
#[unsafe(method(visitAddContactEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitAddContactEvent(&self, event: &CNChangeHistoryAddContactEvent);
#[unsafe(method(visitUpdateContactEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitUpdateContactEvent(&self, event: &CNChangeHistoryUpdateContactEvent);
#[unsafe(method(visitDeleteContactEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitDeleteContactEvent(&self, event: &CNChangeHistoryDeleteContactEvent);
#[optional]
#[unsafe(method(visitAddGroupEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitAddGroupEvent(&self, event: &CNChangeHistoryAddGroupEvent);
#[optional]
#[unsafe(method(visitUpdateGroupEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitUpdateGroupEvent(&self, event: &CNChangeHistoryUpdateGroupEvent);
#[optional]
#[unsafe(method(visitDeleteGroupEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitDeleteGroupEvent(&self, event: &CNChangeHistoryDeleteGroupEvent);
#[optional]
#[unsafe(method(visitAddMemberToGroupEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitAddMemberToGroupEvent(&self, event: &CNChangeHistoryAddMemberToGroupEvent);
#[optional]
#[unsafe(method(visitRemoveMemberFromGroupEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitRemoveMemberFromGroupEvent(
&self,
event: &CNChangeHistoryRemoveMemberFromGroupEvent,
);
#[optional]
#[unsafe(method(visitAddSubgroupToGroupEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitAddSubgroupToGroupEvent(
&self,
event: &CNChangeHistoryAddSubgroupToGroupEvent,
);
#[optional]
#[unsafe(method(visitRemoveSubgroupFromGroupEvent:))]
#[unsafe(method_family = none)]
unsafe fn visitRemoveSubgroupFromGroupEvent(
&self,
event: &CNChangeHistoryRemoveSubgroupFromGroupEvent,
);
}
);