use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
#[cfg(feature = "CKRecord")]
pub static CKRecordTypeShare: &'static CKRecordType;
}
extern "C" {
pub static CKRecordNameZoneWideShare: &'static NSString;
}
extern "C" {
#[cfg(feature = "CKRecord")]
pub static CKShareTitleKey: &'static CKRecordFieldKey;
}
extern "C" {
#[cfg(feature = "CKRecord")]
pub static CKShareThumbnailImageDataKey: &'static CKRecordFieldKey;
}
extern "C" {
#[cfg(feature = "CKRecord")]
pub static CKShareTypeKey: &'static CKRecordFieldKey;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKRecord")]
pub struct CKShare;
#[cfg(feature = "CKRecord")]
unsafe impl ClassType for CKShare {
#[inherits(NSObject)]
type Super = CKRecord;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKRecord")]
unsafe impl NSCoding for CKShare {}
#[cfg(feature = "CKRecord")]
unsafe impl NSCopying for CKShare {}
#[cfg(feature = "CKRecord")]
unsafe impl NSObjectProtocol for CKShare {}
#[cfg(feature = "CKRecord")]
unsafe impl NSSecureCoding for CKShare {}
extern_methods!(
#[cfg(feature = "CKRecord")]
unsafe impl CKShare {
#[method_id(@__retain_semantics Init initWithRootRecord:)]
pub unsafe fn initWithRootRecord(
this: Allocated<Self>,
root_record: &CKRecord,
) -> Retained<Self>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Init initWithRootRecord:shareID:)]
pub unsafe fn initWithRootRecord_shareID(
this: Allocated<Self>,
root_record: &CKRecord,
share_id: &CKRecordID,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithRecordZoneID:)]
pub unsafe fn initWithRecordZoneID(
this: Allocated<Self>,
record_zone_id: &CKRecordZoneID,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
#[cfg(feature = "CKShareParticipant")]
#[method(publicPermission)]
pub unsafe fn publicPermission(&self) -> CKShareParticipantPermission;
#[cfg(feature = "CKShareParticipant")]
#[method(setPublicPermission:)]
pub unsafe fn setPublicPermission(&self, public_permission: CKShareParticipantPermission);
#[method_id(@__retain_semantics Other URL)]
pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
#[cfg(feature = "CKShareParticipant")]
#[method_id(@__retain_semantics Other participants)]
pub unsafe fn participants(&self) -> Retained<NSArray<CKShareParticipant>>;
#[cfg(feature = "CKShareParticipant")]
#[method_id(@__retain_semantics Other owner)]
pub unsafe fn owner(&self) -> Retained<CKShareParticipant>;
#[cfg(feature = "CKShareParticipant")]
#[method_id(@__retain_semantics Other currentUserParticipant)]
pub unsafe fn currentUserParticipant(&self) -> Option<Retained<CKShareParticipant>>;
#[cfg(feature = "CKShareParticipant")]
#[method(addParticipant:)]
pub unsafe fn addParticipant(&self, participant: &CKShareParticipant);
#[cfg(feature = "CKShareParticipant")]
#[method(removeParticipant:)]
pub unsafe fn removeParticipant(&self, participant: &CKShareParticipant);
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithRecordType:)]
pub unsafe fn initWithRecordType(
this: Allocated<Self>,
record_type: &CKRecordType,
) -> Retained<Self>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Init initWithRecordType:recordID:)]
pub unsafe fn initWithRecordType_recordID(
this: Allocated<Self>,
record_type: &CKRecordType,
record_id: &CKRecordID,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithRecordType:zoneID:)]
pub unsafe fn initWithRecordType_zoneID(
this: Allocated<Self>,
record_type: &CKRecordType,
zone_id: &CKRecordZoneID,
) -> Retained<Self>;
}
);