objc2_cloud_kit/generated/
CKSyncEngineEvent.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct CKSyncEngineEventType(pub NSInteger);
17impl CKSyncEngineEventType {
18 #[doc(alias = "CKSyncEngineEventTypeStateUpdate")]
20 pub const StateUpdate: Self = Self(0);
21 #[doc(alias = "CKSyncEngineEventTypeAccountChange")]
23 pub const AccountChange: Self = Self(1);
24 #[doc(alias = "CKSyncEngineEventTypeFetchedDatabaseChanges")]
26 pub const FetchedDatabaseChanges: Self = Self(2);
27 #[doc(alias = "CKSyncEngineEventTypeFetchedRecordZoneChanges")]
29 pub const FetchedRecordZoneChanges: Self = Self(3);
30 #[doc(alias = "CKSyncEngineEventTypeSentDatabaseChanges")]
32 pub const SentDatabaseChanges: Self = Self(4);
33 #[doc(alias = "CKSyncEngineEventTypeSentRecordZoneChanges")]
35 pub const SentRecordZoneChanges: Self = Self(5);
36 #[doc(alias = "CKSyncEngineEventTypeWillFetchChanges")]
38 pub const WillFetchChanges: Self = Self(6);
39 #[doc(alias = "CKSyncEngineEventTypeWillFetchRecordZoneChanges")]
41 pub const WillFetchRecordZoneChanges: Self = Self(7);
42 #[doc(alias = "CKSyncEngineEventTypeDidFetchRecordZoneChanges")]
44 pub const DidFetchRecordZoneChanges: Self = Self(8);
45 #[doc(alias = "CKSyncEngineEventTypeDidFetchChanges")]
47 pub const DidFetchChanges: Self = Self(9);
48 #[doc(alias = "CKSyncEngineEventTypeWillSendChanges")]
50 pub const WillSendChanges: Self = Self(10);
51 #[doc(alias = "CKSyncEngineEventTypeDidSendChanges")]
53 pub const DidSendChanges: Self = Self(11);
54}
55
56unsafe impl Encode for CKSyncEngineEventType {
57 const ENCODING: Encoding = NSInteger::ENCODING;
58}
59
60unsafe impl RefEncode for CKSyncEngineEventType {
61 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
62}
63
64extern_class!(
65 #[unsafe(super(NSObject))]
103 #[derive(Debug, PartialEq, Eq, Hash)]
104 pub struct CKSyncEngineEvent;
105);
106
107unsafe impl Send for CKSyncEngineEvent {}
108
109unsafe impl Sync for CKSyncEngineEvent {}
110
111unsafe impl NSObjectProtocol for CKSyncEngineEvent {}
112
113impl CKSyncEngineEvent {
114 extern_methods!(
115 #[unsafe(method(type))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn r#type(&self) -> CKSyncEngineEventType;
118
119 #[unsafe(method(stateUpdateEvent))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn stateUpdateEvent(&self) -> Retained<CKSyncEngineStateUpdateEvent>;
122
123 #[unsafe(method(accountChangeEvent))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn accountChangeEvent(&self) -> Retained<CKSyncEngineAccountChangeEvent>;
126
127 #[unsafe(method(fetchedDatabaseChangesEvent))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn fetchedDatabaseChangesEvent(
130 &self,
131 ) -> Retained<CKSyncEngineFetchedDatabaseChangesEvent>;
132
133 #[unsafe(method(fetchedRecordZoneChangesEvent))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn fetchedRecordZoneChangesEvent(
136 &self,
137 ) -> Retained<CKSyncEngineFetchedRecordZoneChangesEvent>;
138
139 #[unsafe(method(sentDatabaseChangesEvent))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn sentDatabaseChangesEvent(
142 &self,
143 ) -> Retained<CKSyncEngineSentDatabaseChangesEvent>;
144
145 #[unsafe(method(sentRecordZoneChangesEvent))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn sentRecordZoneChangesEvent(
148 &self,
149 ) -> Retained<CKSyncEngineSentRecordZoneChangesEvent>;
150
151 #[unsafe(method(willFetchChangesEvent))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn willFetchChangesEvent(&self) -> Retained<CKSyncEngineWillFetchChangesEvent>;
154
155 #[unsafe(method(willFetchRecordZoneChangesEvent))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn willFetchRecordZoneChangesEvent(
158 &self,
159 ) -> Retained<CKSyncEngineWillFetchRecordZoneChangesEvent>;
160
161 #[unsafe(method(didFetchRecordZoneChangesEvent))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn didFetchRecordZoneChangesEvent(
164 &self,
165 ) -> Retained<CKSyncEngineDidFetchRecordZoneChangesEvent>;
166
167 #[unsafe(method(didFetchChangesEvent))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn didFetchChangesEvent(&self) -> Retained<CKSyncEngineDidFetchChangesEvent>;
170
171 #[unsafe(method(willSendChangesEvent))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn willSendChangesEvent(&self) -> Retained<CKSyncEngineWillSendChangesEvent>;
174
175 #[unsafe(method(didSendChangesEvent))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn didSendChangesEvent(&self) -> Retained<CKSyncEngineDidSendChangesEvent>;
178
179 #[unsafe(method(init))]
180 #[unsafe(method_family = init)]
181 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
182
183 #[unsafe(method(new))]
184 #[unsafe(method_family = new)]
185 pub unsafe fn new() -> Retained<Self>;
186 );
187}
188
189extern_class!(
190 #[unsafe(super(CKSyncEngineEvent, NSObject))]
205 #[derive(Debug, PartialEq, Eq, Hash)]
206 pub struct CKSyncEngineStateUpdateEvent;
207);
208
209unsafe impl Send for CKSyncEngineStateUpdateEvent {}
210
211unsafe impl Sync for CKSyncEngineStateUpdateEvent {}
212
213unsafe impl NSObjectProtocol for CKSyncEngineStateUpdateEvent {}
214
215impl CKSyncEngineStateUpdateEvent {
216 extern_methods!(
217 #[cfg(feature = "CKSyncEngineState")]
218 #[unsafe(method(stateSerialization))]
219 #[unsafe(method_family = none)]
220 pub unsafe fn stateSerialization(&self) -> Retained<CKSyncEngineStateSerialization>;
221 );
222}
223
224impl CKSyncEngineStateUpdateEvent {
226 extern_methods!(
227 #[unsafe(method(init))]
228 #[unsafe(method_family = init)]
229 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
230
231 #[unsafe(method(new))]
232 #[unsafe(method_family = new)]
233 pub unsafe fn new() -> Retained<Self>;
234 );
235}
236
237#[repr(transparent)]
240#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
241pub struct CKSyncEngineAccountChangeType(pub NSInteger);
242impl CKSyncEngineAccountChangeType {
243 #[doc(alias = "CKSyncEngineAccountChangeTypeSignIn")]
252 pub const SignIn: Self = Self(0);
253 #[doc(alias = "CKSyncEngineAccountChangeTypeSignOut")]
257 pub const SignOut: Self = Self(1);
258 #[doc(alias = "CKSyncEngineAccountChangeTypeSwitchAccounts")]
263 pub const SwitchAccounts: Self = Self(2);
264}
265
266unsafe impl Encode for CKSyncEngineAccountChangeType {
267 const ENCODING: Encoding = NSInteger::ENCODING;
268}
269
270unsafe impl RefEncode for CKSyncEngineAccountChangeType {
271 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
272}
273
274extern_class!(
275 #[unsafe(super(CKSyncEngineEvent, NSObject))]
288 #[derive(Debug, PartialEq, Eq, Hash)]
289 pub struct CKSyncEngineAccountChangeEvent;
290);
291
292unsafe impl Send for CKSyncEngineAccountChangeEvent {}
293
294unsafe impl Sync for CKSyncEngineAccountChangeEvent {}
295
296unsafe impl NSObjectProtocol for CKSyncEngineAccountChangeEvent {}
297
298impl CKSyncEngineAccountChangeEvent {
299 extern_methods!(
300 #[unsafe(method(changeType))]
302 #[unsafe(method_family = none)]
303 pub unsafe fn changeType(&self) -> CKSyncEngineAccountChangeType;
304
305 #[cfg(feature = "CKRecordID")]
306 #[unsafe(method(previousUser))]
311 #[unsafe(method_family = none)]
312 pub unsafe fn previousUser(&self) -> Option<Retained<CKRecordID>>;
313
314 #[cfg(feature = "CKRecordID")]
315 #[unsafe(method(currentUser))]
320 #[unsafe(method_family = none)]
321 pub unsafe fn currentUser(&self) -> Option<Retained<CKRecordID>>;
322 );
323}
324
325impl CKSyncEngineAccountChangeEvent {
327 extern_methods!(
328 #[unsafe(method(init))]
329 #[unsafe(method_family = init)]
330 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
331
332 #[unsafe(method(new))]
333 #[unsafe(method_family = new)]
334 pub unsafe fn new() -> Retained<Self>;
335 );
336}
337
338extern_class!(
339 #[unsafe(super(CKSyncEngineEvent, NSObject))]
347 #[derive(Debug, PartialEq, Eq, Hash)]
348 pub struct CKSyncEngineFetchedDatabaseChangesEvent;
349);
350
351unsafe impl Send for CKSyncEngineFetchedDatabaseChangesEvent {}
352
353unsafe impl Sync for CKSyncEngineFetchedDatabaseChangesEvent {}
354
355unsafe impl NSObjectProtocol for CKSyncEngineFetchedDatabaseChangesEvent {}
356
357impl CKSyncEngineFetchedDatabaseChangesEvent {
358 extern_methods!(
359 #[cfg(feature = "CKRecordZone")]
360 #[unsafe(method(modifications))]
361 #[unsafe(method_family = none)]
362 pub unsafe fn modifications(&self) -> Retained<NSArray<CKRecordZone>>;
363
364 #[unsafe(method(deletions))]
365 #[unsafe(method_family = none)]
366 pub unsafe fn deletions(&self) -> Retained<NSArray<CKSyncEngineFetchedZoneDeletion>>;
367 );
368}
369
370impl CKSyncEngineFetchedDatabaseChangesEvent {
372 extern_methods!(
373 #[unsafe(method(init))]
374 #[unsafe(method_family = init)]
375 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
376
377 #[unsafe(method(new))]
378 #[unsafe(method_family = new)]
379 pub unsafe fn new() -> Retained<Self>;
380 );
381}
382
383extern_class!(
384 #[unsafe(super(CKSyncEngineEvent, NSObject))]
392 #[derive(Debug, PartialEq, Eq, Hash)]
393 pub struct CKSyncEngineFetchedRecordZoneChangesEvent;
394);
395
396unsafe impl Send for CKSyncEngineFetchedRecordZoneChangesEvent {}
397
398unsafe impl Sync for CKSyncEngineFetchedRecordZoneChangesEvent {}
399
400unsafe impl NSObjectProtocol for CKSyncEngineFetchedRecordZoneChangesEvent {}
401
402impl CKSyncEngineFetchedRecordZoneChangesEvent {
403 extern_methods!(
404 #[cfg(feature = "CKRecord")]
405 #[unsafe(method(modifications))]
406 #[unsafe(method_family = none)]
407 pub unsafe fn modifications(&self) -> Retained<NSArray<CKRecord>>;
408
409 #[unsafe(method(deletions))]
410 #[unsafe(method_family = none)]
411 pub unsafe fn deletions(&self) -> Retained<NSArray<CKSyncEngineFetchedRecordDeletion>>;
412 );
413}
414
415impl CKSyncEngineFetchedRecordZoneChangesEvent {
417 extern_methods!(
418 #[unsafe(method(init))]
419 #[unsafe(method_family = init)]
420 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
421
422 #[unsafe(method(new))]
423 #[unsafe(method_family = new)]
424 pub unsafe fn new() -> Retained<Self>;
425 );
426}
427
428extern_class!(
429 #[unsafe(super(CKSyncEngineEvent, NSObject))]
435 #[derive(Debug, PartialEq, Eq, Hash)]
436 pub struct CKSyncEngineSentDatabaseChangesEvent;
437);
438
439unsafe impl Send for CKSyncEngineSentDatabaseChangesEvent {}
440
441unsafe impl Sync for CKSyncEngineSentDatabaseChangesEvent {}
442
443unsafe impl NSObjectProtocol for CKSyncEngineSentDatabaseChangesEvent {}
444
445impl CKSyncEngineSentDatabaseChangesEvent {
446 extern_methods!(
447 #[cfg(feature = "CKRecordZone")]
448 #[unsafe(method(savedZones))]
449 #[unsafe(method_family = none)]
450 pub unsafe fn savedZones(&self) -> Retained<NSArray<CKRecordZone>>;
451
452 #[unsafe(method(failedZoneSaves))]
453 #[unsafe(method_family = none)]
454 pub unsafe fn failedZoneSaves(&self) -> Retained<NSArray<CKSyncEngineFailedZoneSave>>;
455
456 #[cfg(feature = "CKRecordZoneID")]
457 #[unsafe(method(deletedZoneIDs))]
458 #[unsafe(method_family = none)]
459 pub unsafe fn deletedZoneIDs(&self) -> Retained<NSArray<CKRecordZoneID>>;
460
461 #[cfg(feature = "CKRecordZoneID")]
462 #[unsafe(method(failedZoneDeletes))]
463 #[unsafe(method_family = none)]
464 pub unsafe fn failedZoneDeletes(&self) -> Retained<NSDictionary<CKRecordZoneID, NSError>>;
465 );
466}
467
468impl CKSyncEngineSentDatabaseChangesEvent {
470 extern_methods!(
471 #[unsafe(method(init))]
472 #[unsafe(method_family = init)]
473 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
474
475 #[unsafe(method(new))]
476 #[unsafe(method_family = new)]
477 pub unsafe fn new() -> Retained<Self>;
478 );
479}
480
481extern_class!(
482 #[unsafe(super(CKSyncEngineEvent, NSObject))]
492 #[derive(Debug, PartialEq, Eq, Hash)]
493 pub struct CKSyncEngineSentRecordZoneChangesEvent;
494);
495
496unsafe impl Send for CKSyncEngineSentRecordZoneChangesEvent {}
497
498unsafe impl Sync for CKSyncEngineSentRecordZoneChangesEvent {}
499
500unsafe impl NSObjectProtocol for CKSyncEngineSentRecordZoneChangesEvent {}
501
502impl CKSyncEngineSentRecordZoneChangesEvent {
503 extern_methods!(
504 #[cfg(feature = "CKRecord")]
505 #[unsafe(method(savedRecords))]
506 #[unsafe(method_family = none)]
507 pub unsafe fn savedRecords(&self) -> Retained<NSArray<CKRecord>>;
508
509 #[unsafe(method(failedRecordSaves))]
510 #[unsafe(method_family = none)]
511 pub unsafe fn failedRecordSaves(&self) -> Retained<NSArray<CKSyncEngineFailedRecordSave>>;
512
513 #[cfg(feature = "CKRecordID")]
514 #[unsafe(method(deletedRecordIDs))]
515 #[unsafe(method_family = none)]
516 pub unsafe fn deletedRecordIDs(&self) -> Retained<NSArray<CKRecordID>>;
517
518 #[cfg(feature = "CKRecordID")]
519 #[unsafe(method(failedRecordDeletes))]
520 #[unsafe(method_family = none)]
521 pub unsafe fn failedRecordDeletes(&self) -> Retained<NSDictionary<CKRecordID, NSError>>;
522 );
523}
524
525impl CKSyncEngineSentRecordZoneChangesEvent {
527 extern_methods!(
528 #[unsafe(method(init))]
529 #[unsafe(method_family = init)]
530 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
531
532 #[unsafe(method(new))]
533 #[unsafe(method_family = new)]
534 pub unsafe fn new() -> Retained<Self>;
535 );
536}
537
538extern_class!(
539 #[unsafe(super(CKSyncEngineEvent, NSObject))]
550 #[derive(Debug, PartialEq, Eq, Hash)]
551 pub struct CKSyncEngineWillFetchChangesEvent;
552);
553
554unsafe impl Send for CKSyncEngineWillFetchChangesEvent {}
555
556unsafe impl Sync for CKSyncEngineWillFetchChangesEvent {}
557
558unsafe impl NSObjectProtocol for CKSyncEngineWillFetchChangesEvent {}
559
560impl CKSyncEngineWillFetchChangesEvent {
561 extern_methods!(
562 #[cfg(feature = "CKSyncEngine")]
563 #[unsafe(method(context))]
564 #[unsafe(method_family = none)]
565 pub unsafe fn context(&self) -> Retained<CKSyncEngineFetchChangesContext>;
566 );
567}
568
569impl CKSyncEngineWillFetchChangesEvent {
571 extern_methods!(
572 #[unsafe(method(init))]
573 #[unsafe(method_family = init)]
574 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
575
576 #[unsafe(method(new))]
577 #[unsafe(method_family = new)]
578 pub unsafe fn new() -> Retained<Self>;
579 );
580}
581
582extern_class!(
583 #[unsafe(super(CKSyncEngineEvent, NSObject))]
589 #[derive(Debug, PartialEq, Eq, Hash)]
590 pub struct CKSyncEngineWillFetchRecordZoneChangesEvent;
591);
592
593unsafe impl Send for CKSyncEngineWillFetchRecordZoneChangesEvent {}
594
595unsafe impl Sync for CKSyncEngineWillFetchRecordZoneChangesEvent {}
596
597unsafe impl NSObjectProtocol for CKSyncEngineWillFetchRecordZoneChangesEvent {}
598
599impl CKSyncEngineWillFetchRecordZoneChangesEvent {
600 extern_methods!(
601 #[cfg(feature = "CKRecordZoneID")]
602 #[unsafe(method(zoneID))]
603 #[unsafe(method_family = none)]
604 pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
605 );
606}
607
608impl CKSyncEngineWillFetchRecordZoneChangesEvent {
610 extern_methods!(
611 #[unsafe(method(init))]
612 #[unsafe(method_family = init)]
613 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
614
615 #[unsafe(method(new))]
616 #[unsafe(method_family = new)]
617 pub unsafe fn new() -> Retained<Self>;
618 );
619}
620
621extern_class!(
622 #[unsafe(super(CKSyncEngineEvent, NSObject))]
630 #[derive(Debug, PartialEq, Eq, Hash)]
631 pub struct CKSyncEngineDidFetchRecordZoneChangesEvent;
632);
633
634unsafe impl Send for CKSyncEngineDidFetchRecordZoneChangesEvent {}
635
636unsafe impl Sync for CKSyncEngineDidFetchRecordZoneChangesEvent {}
637
638unsafe impl NSObjectProtocol for CKSyncEngineDidFetchRecordZoneChangesEvent {}
639
640impl CKSyncEngineDidFetchRecordZoneChangesEvent {
641 extern_methods!(
642 #[cfg(feature = "CKRecordZoneID")]
643 #[unsafe(method(zoneID))]
644 #[unsafe(method_family = none)]
645 pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
646
647 #[unsafe(method(error))]
648 #[unsafe(method_family = none)]
649 pub unsafe fn error(&self) -> Option<Retained<NSError>>;
650 );
651}
652
653impl CKSyncEngineDidFetchRecordZoneChangesEvent {
655 extern_methods!(
656 #[unsafe(method(init))]
657 #[unsafe(method_family = init)]
658 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
659
660 #[unsafe(method(new))]
661 #[unsafe(method_family = new)]
662 pub unsafe fn new() -> Retained<Self>;
663 );
664}
665
666extern_class!(
667 #[unsafe(super(CKSyncEngineEvent, NSObject))]
675 #[derive(Debug, PartialEq, Eq, Hash)]
676 pub struct CKSyncEngineDidFetchChangesEvent;
677);
678
679unsafe impl Send for CKSyncEngineDidFetchChangesEvent {}
680
681unsafe impl Sync for CKSyncEngineDidFetchChangesEvent {}
682
683unsafe impl NSObjectProtocol for CKSyncEngineDidFetchChangesEvent {}
684
685impl CKSyncEngineDidFetchChangesEvent {
686 extern_methods!(
687 #[cfg(feature = "CKSyncEngine")]
688 #[unsafe(method(context))]
689 #[unsafe(method_family = none)]
690 pub unsafe fn context(&self) -> Retained<CKSyncEngineFetchChangesContext>;
691 );
692}
693
694impl CKSyncEngineDidFetchChangesEvent {
696 extern_methods!(
697 #[unsafe(method(init))]
698 #[unsafe(method_family = init)]
699 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
700
701 #[unsafe(method(new))]
702 #[unsafe(method_family = new)]
703 pub unsafe fn new() -> Retained<Self>;
704 );
705}
706
707extern_class!(
708 #[unsafe(super(CKSyncEngineEvent, NSObject))]
712 #[derive(Debug, PartialEq, Eq, Hash)]
713 pub struct CKSyncEngineWillSendChangesEvent;
714);
715
716unsafe impl Send for CKSyncEngineWillSendChangesEvent {}
717
718unsafe impl Sync for CKSyncEngineWillSendChangesEvent {}
719
720unsafe impl NSObjectProtocol for CKSyncEngineWillSendChangesEvent {}
721
722impl CKSyncEngineWillSendChangesEvent {
723 extern_methods!(
724 #[cfg(feature = "CKSyncEngine")]
725 #[unsafe(method(context))]
726 #[unsafe(method_family = none)]
727 pub unsafe fn context(&self) -> Retained<CKSyncEngineSendChangesContext>;
728 );
729}
730
731impl CKSyncEngineWillSendChangesEvent {
733 extern_methods!(
734 #[unsafe(method(init))]
735 #[unsafe(method_family = init)]
736 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
737
738 #[unsafe(method(new))]
739 #[unsafe(method_family = new)]
740 pub unsafe fn new() -> Retained<Self>;
741 );
742}
743
744extern_class!(
745 #[unsafe(super(CKSyncEngineEvent, NSObject))]
751 #[derive(Debug, PartialEq, Eq, Hash)]
752 pub struct CKSyncEngineDidSendChangesEvent;
753);
754
755unsafe impl Send for CKSyncEngineDidSendChangesEvent {}
756
757unsafe impl Sync for CKSyncEngineDidSendChangesEvent {}
758
759unsafe impl NSObjectProtocol for CKSyncEngineDidSendChangesEvent {}
760
761impl CKSyncEngineDidSendChangesEvent {
762 extern_methods!(
763 #[cfg(feature = "CKSyncEngine")]
764 #[unsafe(method(context))]
765 #[unsafe(method_family = none)]
766 pub unsafe fn context(&self) -> Retained<CKSyncEngineSendChangesContext>;
767 );
768}
769
770impl CKSyncEngineDidSendChangesEvent {
772 extern_methods!(
773 #[unsafe(method(init))]
774 #[unsafe(method_family = init)]
775 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
776
777 #[unsafe(method(new))]
778 #[unsafe(method_family = new)]
779 pub unsafe fn new() -> Retained<Self>;
780 );
781}
782
783extern_class!(
784 #[unsafe(super(NSObject))]
786 #[derive(Debug, PartialEq, Eq, Hash)]
787 pub struct CKSyncEngineFetchedRecordDeletion;
788);
789
790unsafe impl Send for CKSyncEngineFetchedRecordDeletion {}
791
792unsafe impl Sync for CKSyncEngineFetchedRecordDeletion {}
793
794unsafe impl NSObjectProtocol for CKSyncEngineFetchedRecordDeletion {}
795
796impl CKSyncEngineFetchedRecordDeletion {
797 extern_methods!(
798 #[unsafe(method(init))]
799 #[unsafe(method_family = init)]
800 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
801
802 #[unsafe(method(new))]
803 #[unsafe(method_family = new)]
804 pub unsafe fn new() -> Retained<Self>;
805
806 #[cfg(feature = "CKRecordID")]
807 #[unsafe(method(recordID))]
808 #[unsafe(method_family = none)]
809 pub unsafe fn recordID(&self) -> Retained<CKRecordID>;
810
811 #[cfg(feature = "CKRecord")]
812 #[unsafe(method(recordType))]
813 #[unsafe(method_family = none)]
814 pub unsafe fn recordType(&self) -> Retained<CKRecordType>;
815 );
816}
817
818#[repr(transparent)]
821#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
822pub struct CKSyncEngineZoneDeletionReason(pub NSInteger);
823impl CKSyncEngineZoneDeletionReason {
824 #[doc(alias = "CKSyncEngineZoneDeletionReasonDeleted")]
826 pub const Deleted: Self = Self(0);
827 #[doc(alias = "CKSyncEngineZoneDeletionReasonPurged")]
830 pub const Purged: Self = Self(1);
831 #[doc(alias = "CKSyncEngineZoneDeletionReasonEncryptedDataReset")]
834 pub const EncryptedDataReset: Self = Self(2);
835}
836
837unsafe impl Encode for CKSyncEngineZoneDeletionReason {
838 const ENCODING: Encoding = NSInteger::ENCODING;
839}
840
841unsafe impl RefEncode for CKSyncEngineZoneDeletionReason {
842 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
843}
844
845extern_class!(
846 #[unsafe(super(NSObject))]
848 #[derive(Debug, PartialEq, Eq, Hash)]
849 pub struct CKSyncEngineFetchedZoneDeletion;
850);
851
852unsafe impl Send for CKSyncEngineFetchedZoneDeletion {}
853
854unsafe impl Sync for CKSyncEngineFetchedZoneDeletion {}
855
856unsafe impl NSObjectProtocol for CKSyncEngineFetchedZoneDeletion {}
857
858impl CKSyncEngineFetchedZoneDeletion {
859 extern_methods!(
860 #[unsafe(method(init))]
861 #[unsafe(method_family = init)]
862 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
863
864 #[unsafe(method(new))]
865 #[unsafe(method_family = new)]
866 pub unsafe fn new() -> Retained<Self>;
867
868 #[cfg(feature = "CKRecordZoneID")]
869 #[unsafe(method(zoneID))]
870 #[unsafe(method_family = none)]
871 pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
872
873 #[unsafe(method(reason))]
874 #[unsafe(method_family = none)]
875 pub unsafe fn reason(&self) -> CKSyncEngineZoneDeletionReason;
876 );
877}
878
879extern_class!(
880 #[unsafe(super(NSObject))]
882 #[derive(Debug, PartialEq, Eq, Hash)]
883 pub struct CKSyncEngineFailedRecordSave;
884);
885
886unsafe impl Send for CKSyncEngineFailedRecordSave {}
887
888unsafe impl Sync for CKSyncEngineFailedRecordSave {}
889
890unsafe impl NSObjectProtocol for CKSyncEngineFailedRecordSave {}
891
892impl CKSyncEngineFailedRecordSave {
893 extern_methods!(
894 #[unsafe(method(init))]
895 #[unsafe(method_family = init)]
896 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
897
898 #[unsafe(method(new))]
899 #[unsafe(method_family = new)]
900 pub unsafe fn new() -> Retained<Self>;
901
902 #[cfg(feature = "CKRecord")]
903 #[unsafe(method(record))]
904 #[unsafe(method_family = none)]
905 pub unsafe fn record(&self) -> Retained<CKRecord>;
906
907 #[unsafe(method(error))]
908 #[unsafe(method_family = none)]
909 pub unsafe fn error(&self) -> Retained<NSError>;
910 );
911}
912
913extern_class!(
914 #[unsafe(super(NSObject))]
916 #[derive(Debug, PartialEq, Eq, Hash)]
917 pub struct CKSyncEngineFailedZoneSave;
918);
919
920unsafe impl Send for CKSyncEngineFailedZoneSave {}
921
922unsafe impl Sync for CKSyncEngineFailedZoneSave {}
923
924unsafe impl NSObjectProtocol for CKSyncEngineFailedZoneSave {}
925
926impl CKSyncEngineFailedZoneSave {
927 extern_methods!(
928 #[unsafe(method(init))]
929 #[unsafe(method_family = init)]
930 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
931
932 #[unsafe(method(new))]
933 #[unsafe(method_family = new)]
934 pub unsafe fn new() -> Retained<Self>;
935
936 #[cfg(feature = "CKRecordZone")]
937 #[unsafe(method(recordZone))]
938 #[unsafe(method_family = none)]
939 pub unsafe fn recordZone(&self) -> Retained<CKRecordZone>;
940
941 #[unsafe(method(error))]
942 #[unsafe(method_family = none)]
943 pub unsafe fn error(&self) -> Retained<NSError>;
944 );
945}