Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

File diff suppressed because one or more lines are too long

414
vendor/objc2-cloud-kit/Cargo.toml vendored Normal file
View File

@@ -0,0 +1,414 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2021"
rust-version = "1.60"
name = "objc2-cloud-kit"
version = "0.2.2"
build = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Bindings to the CloudKit framework"
readme = "README.md"
keywords = [
"cocoa",
"apple",
"framework",
"macos",
"ios",
]
categories = [
"api-bindings",
"development-tools::ffi",
"external-ffi-bindings",
"os::macos-apis",
]
license = "MIT"
repository = "https://github.com/madsmtm/objc2"
[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
features = ["all"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
]
[lib]
name = "objc2_cloud_kit"
path = "src/lib.rs"
[dependencies.bitflags]
version = "2.5.0"
optional = true
default-features = false
[dependencies.block2]
version = "0.5.1"
optional = true
default-features = false
[dependencies.objc2]
version = "0.5.2"
default-features = false
[dependencies.objc2-core-location]
version = "0.2.2"
optional = true
default-features = false
[dependencies.objc2-foundation]
version = "0.2.2"
default-features = false
[features]
CKAcceptSharesOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKAllowedSharingOptions = [
"bitflags",
"objc2-foundation/NSObject",
]
CKAsset = ["objc2-foundation/NSURL"]
CKContainer = [
"bitflags",
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
CKDatabase = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
]
CKDatabaseOperation = ["objc2-foundation/NSOperation"]
CKDefines = []
CKDiscoverAllUserIdentitiesOperation = [
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKDiscoverUserIdentitiesOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKError = ["objc2-foundation/NSString"]
CKFetchDatabaseChangesOperation = [
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKFetchNotificationChangesOperation = [
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKFetchRecordChangesOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSData",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
]
CKFetchRecordZoneChangesOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSData",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSObject",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
]
CKFetchRecordZonesOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKFetchRecordsOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
]
CKFetchShareMetadataOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
CKFetchShareParticipantsOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKFetchSubscriptionsOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
]
CKFetchWebAuthTokenOperation = [
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
]
CKLocationSortDescriptor = [
"objc2-core-location?/CLLocation",
"objc2-foundation/NSCoder",
"objc2-foundation/NSObjCRuntime",
"objc2-foundation/NSObject",
"objc2-foundation/NSSortDescriptor",
"objc2-foundation/NSString",
]
CKMarkNotificationsReadOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKModifyBadgeOperation = [
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKModifyRecordZonesOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKModifyRecordsOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSData",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
]
CKModifySubscriptionsOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
]
CKNotification = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSValue",
]
CKOperation = [
"objc2-foundation/NSDate",
"objc2-foundation/NSObjCRuntime",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
]
CKOperationGroup = [
"objc2-foundation/NSCoder",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CKQuery = [
"objc2-foundation/NSArray",
"objc2-foundation/NSCoder",
"objc2-foundation/NSObject",
"objc2-foundation/NSPredicate",
"objc2-foundation/NSSortDescriptor",
"objc2-foundation/NSString",
]
CKQueryOperation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSObject",
"objc2-foundation/NSOperation",
"objc2-foundation/NSString",
]
CKRecord = [
"objc2-core-location?/CLLocation",
"objc2-foundation/NSArray",
"objc2-foundation/NSCoder",
"objc2-foundation/NSData",
"objc2-foundation/NSDate",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSValue",
]
CKRecordID = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CKRecordZone = [
"bitflags",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CKRecordZoneID = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CKReference = ["objc2-foundation/NSObject"]
CKServerChangeToken = ["objc2-foundation/NSObject"]
CKShare = [
"objc2-foundation/NSArray",
"objc2-foundation/NSCoder",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
CKShareMetadata = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CKShareParticipant = ["objc2-foundation/NSObject"]
CKSubscription = [
"bitflags",
"objc2-foundation/NSArray",
"objc2-foundation/NSCoder",
"objc2-foundation/NSObject",
"objc2-foundation/NSPredicate",
"objc2-foundation/NSString",
]
CKSyncEngine = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSObject",
"objc2-foundation/NSSet",
]
CKSyncEngineConfiguration = ["objc2-foundation/NSString"]
CKSyncEngineEvent = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSString",
]
CKSyncEngineRecordZoneChangeBatch = ["objc2-foundation/NSArray"]
CKSyncEngineState = [
"objc2-foundation/NSArray",
"objc2-foundation/NSObject",
]
CKSystemSharingUIObserver = ["objc2-foundation/NSError"]
CKUserIdentity = [
"objc2-foundation/NSArray",
"objc2-foundation/NSObject",
"objc2-foundation/NSPersonNameComponents",
"objc2-foundation/NSString",
]
CKUserIdentityLookupInfo = [
"objc2-foundation/NSArray",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
NSItemProvider_CKSharingSupport = [
"objc2-foundation/NSError",
"objc2-foundation/NSItemProvider",
]
all = [
"CKAcceptSharesOperation",
"CKAllowedSharingOptions",
"CKAsset",
"CKContainer",
"CKDatabase",
"CKDatabaseOperation",
"CKDefines",
"CKDiscoverAllUserIdentitiesOperation",
"CKDiscoverUserIdentitiesOperation",
"CKError",
"CKFetchDatabaseChangesOperation",
"CKFetchNotificationChangesOperation",
"CKFetchRecordChangesOperation",
"CKFetchRecordZoneChangesOperation",
"CKFetchRecordZonesOperation",
"CKFetchRecordsOperation",
"CKFetchShareMetadataOperation",
"CKFetchShareParticipantsOperation",
"CKFetchSubscriptionsOperation",
"CKFetchWebAuthTokenOperation",
"CKLocationSortDescriptor",
"CKMarkNotificationsReadOperation",
"CKModifyBadgeOperation",
"CKModifyRecordZonesOperation",
"CKModifyRecordsOperation",
"CKModifySubscriptionsOperation",
"CKNotification",
"CKOperation",
"CKOperationGroup",
"CKQuery",
"CKQueryOperation",
"CKRecord",
"CKRecordID",
"CKRecordZone",
"CKRecordZoneID",
"CKReference",
"CKServerChangeToken",
"CKShare",
"CKShareMetadata",
"CKShareParticipant",
"CKSubscription",
"CKSyncEngine",
"CKSyncEngineConfiguration",
"CKSyncEngineEvent",
"CKSyncEngineRecordZoneChangeBatch",
"CKSyncEngineState",
"CKSystemSharingUIObserver",
"CKUserIdentity",
"CKUserIdentityLookupInfo",
"NSItemProvider_CKSharingSupport",
"bitflags",
"block2",
"objc2-core-location",
]
alloc = [
"block2?/alloc",
"objc2/alloc",
"objc2-core-location?/alloc",
"objc2-foundation/alloc",
]
bitflags = [
"dep:bitflags",
"objc2-foundation/bitflags",
]
block2 = [
"dep:block2",
"objc2-core-location?/block2",
"objc2-foundation/block2",
]
default = ["std"]
objc2-core-location = ["dep:objc2-core-location"]
std = [
"alloc",
"bitflags?/std",
"block2?/std",
"objc2/std",
"objc2-core-location?/std",
"objc2-foundation/std",
]
[lints.clippy]
cargo = "warn"
ptr_as_ptr = "warn"
[lints.rust]
elided_lifetimes_in_paths = "warn"
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
non_ascii_idents = "deny"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "deny"

14
vendor/objc2-cloud-kit/README.md vendored Normal file
View File

@@ -0,0 +1,14 @@
# `objc2-cloud-kit`
[![Latest version](https://badgen.net/crates/v/objc2-cloud-kit)](https://crates.io/crates/objc2-cloud-kit)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![Documentation](https://docs.rs/objc2-cloud-kit/badge.svg)](https://docs.rs/objc2-cloud-kit/)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)
Rust bindings to Apple's framework CloudKit.
This README is kept intentionally small to consolidate the documentation, see
[the Rust docs](https://docs.rs/objc2-cloud-kit/) for more details on this crate.
This crate is part of the [`objc2` project](https://github.com/madsmtm/objc2),
see that for related crates.

View File

@@ -0,0 +1,92 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKOperation")]
pub struct CKAcceptSharesOperation;
#[cfg(feature = "CKOperation")]
unsafe impl ClassType for CKAcceptSharesOperation {
#[inherits(NSOperation, NSObject)]
type Super = CKOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKOperation")]
unsafe impl NSObjectProtocol for CKAcceptSharesOperation {}
extern_methods!(
#[cfg(feature = "CKOperation")]
unsafe impl CKAcceptSharesOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKShareMetadata")]
#[method_id(@__retain_semantics Init initWithShareMetadatas:)]
pub unsafe fn initWithShareMetadatas(
this: Allocated<Self>,
share_metadatas: &NSArray<CKShareMetadata>,
) -> Retained<Self>;
#[cfg(feature = "CKShareMetadata")]
#[method_id(@__retain_semantics Other shareMetadatas)]
pub unsafe fn shareMetadatas(&self) -> Option<Retained<NSArray<CKShareMetadata>>>;
#[cfg(feature = "CKShareMetadata")]
#[method(setShareMetadatas:)]
pub unsafe fn setShareMetadatas(&self, share_metadatas: Option<&NSArray<CKShareMetadata>>);
#[cfg(all(
feature = "CKRecord",
feature = "CKShare",
feature = "CKShareMetadata",
feature = "block2"
))]
#[method(perShareCompletionBlock)]
pub unsafe fn perShareCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKShareMetadata>, *mut CKShare, *mut NSError)>;
#[cfg(all(
feature = "CKRecord",
feature = "CKShare",
feature = "CKShareMetadata",
feature = "block2"
))]
#[method(setPerShareCompletionBlock:)]
pub unsafe fn setPerShareCompletionBlock(
&self,
per_share_completion_block: Option<
&block2::Block<dyn Fn(NonNull<CKShareMetadata>, *mut CKShare, *mut NSError)>,
>,
);
#[cfg(feature = "block2")]
#[method(acceptSharesCompletionBlock)]
pub unsafe fn acceptSharesCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSError)>;
#[cfg(feature = "block2")]
#[method(setAcceptSharesCompletionBlock:)]
pub unsafe fn setAcceptSharesCompletionBlock(
&self,
accept_shares_completion_block: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CKOperation")]
unsafe impl CKAcceptSharesOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,115 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKSharingParticipantAccessOption(pub NSUInteger);
bitflags::bitflags! {
impl CKSharingParticipantAccessOption: NSUInteger {
#[doc(alias = "CKSharingParticipantAccessOptionAnyoneWithLink")]
const AnyoneWithLink = 1<<0;
#[doc(alias = "CKSharingParticipantAccessOptionSpecifiedRecipientsOnly")]
const SpecifiedRecipientsOnly = 1<<1;
#[doc(alias = "CKSharingParticipantAccessOptionAny")]
const Any = CKSharingParticipantAccessOption::AnyoneWithLink.0|CKSharingParticipantAccessOption::SpecifiedRecipientsOnly.0;
}
}
unsafe impl Encode for CKSharingParticipantAccessOption {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for CKSharingParticipantAccessOption {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKSharingParticipantPermissionOption(pub NSUInteger);
bitflags::bitflags! {
impl CKSharingParticipantPermissionOption: NSUInteger {
#[doc(alias = "CKSharingParticipantPermissionOptionReadOnly")]
const ReadOnly = 1<<0;
#[doc(alias = "CKSharingParticipantPermissionOptionReadWrite")]
const ReadWrite = 1<<1;
#[doc(alias = "CKSharingParticipantPermissionOptionAny")]
const Any = CKSharingParticipantPermissionOption::ReadOnly.0|CKSharingParticipantPermissionOption::ReadWrite.0;
}
}
unsafe impl Encode for CKSharingParticipantPermissionOption {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for CKSharingParticipantPermissionOption {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKAllowedSharingOptions;
unsafe impl ClassType for CKAllowedSharingOptions {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKAllowedSharingOptions {}
unsafe impl NSCopying for CKAllowedSharingOptions {}
unsafe impl NSObjectProtocol for CKAllowedSharingOptions {}
unsafe impl NSSecureCoding for CKAllowedSharingOptions {}
extern_methods!(
unsafe impl CKAllowedSharingOptions {
#[method_id(@__retain_semantics Init initWithAllowedParticipantPermissionOptions:allowedParticipantAccessOptions:)]
pub unsafe fn initWithAllowedParticipantPermissionOptions_allowedParticipantAccessOptions(
this: Allocated<Self>,
allowed_participant_permission_options: CKSharingParticipantPermissionOption,
allowed_participant_access_options: CKSharingParticipantAccessOption,
) -> Retained<Self>;
#[method(allowedParticipantPermissionOptions)]
pub unsafe fn allowedParticipantPermissionOptions(
&self,
) -> CKSharingParticipantPermissionOption;
#[method(setAllowedParticipantPermissionOptions:)]
pub unsafe fn setAllowedParticipantPermissionOptions(
&self,
allowed_participant_permission_options: CKSharingParticipantPermissionOption,
);
#[method(allowedParticipantAccessOptions)]
pub unsafe fn allowedParticipantAccessOptions(&self) -> CKSharingParticipantAccessOption;
#[method(setAllowedParticipantAccessOptions:)]
pub unsafe fn setAllowedParticipantAccessOptions(
&self,
allowed_participant_access_options: CKSharingParticipantAccessOption,
);
#[method_id(@__retain_semantics Other standardOptions)]
pub unsafe fn standardOptions() -> Retained<CKAllowedSharingOptions>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKAllowedSharingOptions {
#[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>;
}
);

View File

@@ -0,0 +1,34 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKAsset;
unsafe impl ClassType for CKAsset {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CKAsset {}
extern_methods!(
unsafe impl CKAsset {
#[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 initWithFileURL:)]
pub unsafe fn initWithFileURL(this: Allocated<Self>, file_url: &NSURL) -> Retained<Self>;
#[method_id(@__retain_semantics Other fileURL)]
pub unsafe fn fileURL(&self) -> Option<Retained<NSURL>>;
}
);

View File

@@ -0,0 +1,315 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static CKCurrentUserDefaultName: &'static NSString;
}
extern "C" {
pub static CKOwnerDefaultName: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKContainer;
unsafe impl ClassType for CKContainer {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKContainer {}
unsafe impl Sync for CKContainer {}
unsafe impl NSObjectProtocol for CKContainer {}
extern_methods!(
unsafe impl CKContainer {
#[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 Other defaultContainer)]
pub unsafe fn defaultContainer() -> Retained<CKContainer>;
#[method_id(@__retain_semantics Other containerWithIdentifier:)]
pub unsafe fn containerWithIdentifier(
container_identifier: &NSString,
) -> Retained<CKContainer>;
#[method_id(@__retain_semantics Other containerIdentifier)]
pub unsafe fn containerIdentifier(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "CKOperation")]
#[method(addOperation:)]
pub unsafe fn addOperation(&self, operation: &CKOperation);
}
);
extern_methods!(
/// Database
unsafe impl CKContainer {
#[cfg(feature = "CKDatabase")]
#[method_id(@__retain_semantics Other privateCloudDatabase)]
pub unsafe fn privateCloudDatabase(&self) -> Retained<CKDatabase>;
#[cfg(feature = "CKDatabase")]
#[method_id(@__retain_semantics Other publicCloudDatabase)]
pub unsafe fn publicCloudDatabase(&self) -> Retained<CKDatabase>;
#[cfg(feature = "CKDatabase")]
#[method_id(@__retain_semantics Other sharedCloudDatabase)]
pub unsafe fn sharedCloudDatabase(&self) -> Retained<CKDatabase>;
#[cfg(feature = "CKDatabase")]
#[method_id(@__retain_semantics Other databaseWithDatabaseScope:)]
pub unsafe fn databaseWithDatabaseScope(
&self,
database_scope: CKDatabaseScope,
) -> Retained<CKDatabase>;
}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKAccountStatus(pub NSInteger);
impl CKAccountStatus {
#[doc(alias = "CKAccountStatusCouldNotDetermine")]
pub const CouldNotDetermine: Self = Self(0);
#[doc(alias = "CKAccountStatusAvailable")]
pub const Available: Self = Self(1);
#[doc(alias = "CKAccountStatusRestricted")]
pub const Restricted: Self = Self(2);
#[doc(alias = "CKAccountStatusNoAccount")]
pub const NoAccount: Self = Self(3);
#[doc(alias = "CKAccountStatusTemporarilyUnavailable")]
pub const TemporarilyUnavailable: Self = Self(4);
}
unsafe impl Encode for CKAccountStatus {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKAccountStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static CKAccountChangedNotification: &'static NSString;
}
extern_methods!(
/// AccountStatus
unsafe impl CKContainer {
#[cfg(feature = "block2")]
#[method(accountStatusWithCompletionHandler:)]
pub unsafe fn accountStatusWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(CKAccountStatus, *mut NSError)>,
);
}
);
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKApplicationPermissions(pub NSUInteger);
bitflags::bitflags! {
impl CKApplicationPermissions: NSUInteger {
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
const CKApplicationPermissionUserDiscoverability = 1<<0;
}
}
unsafe impl Encode for CKApplicationPermissions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for CKApplicationPermissions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKApplicationPermissionStatus(pub NSInteger);
impl CKApplicationPermissionStatus {
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[doc(alias = "CKApplicationPermissionStatusInitialState")]
pub const InitialState: Self = Self(0);
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[doc(alias = "CKApplicationPermissionStatusCouldNotComplete")]
pub const CouldNotComplete: Self = Self(1);
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[doc(alias = "CKApplicationPermissionStatusDenied")]
pub const Denied: Self = Self(2);
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[doc(alias = "CKApplicationPermissionStatusGranted")]
pub const Granted: Self = Self(3);
}
unsafe impl Encode for CKApplicationPermissionStatus {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKApplicationPermissionStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[cfg(feature = "block2")]
pub type CKApplicationPermissionBlock =
*mut block2::Block<dyn Fn(CKApplicationPermissionStatus, *mut NSError)>;
extern_methods!(
/// ApplicationPermission
unsafe impl CKContainer {
#[cfg(feature = "block2")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(statusForApplicationPermission:completionHandler:)]
pub unsafe fn statusForApplicationPermission_completionHandler(
&self,
application_permission: CKApplicationPermissions,
completion_handler: CKApplicationPermissionBlock,
);
#[cfg(feature = "block2")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(requestApplicationPermission:completionHandler:)]
pub unsafe fn requestApplicationPermission_completionHandler(
&self,
application_permission: CKApplicationPermissions,
completion_handler: CKApplicationPermissionBlock,
);
}
);
extern_methods!(
/// UserRecords
unsafe impl CKContainer {
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[method(fetchUserRecordIDWithCompletionHandler:)]
pub unsafe fn fetchUserRecordIDWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(*mut CKRecordID, *mut NSError)>,
);
#[cfg(all(feature = "CKUserIdentity", feature = "block2"))]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(discoverAllIdentitiesWithCompletionHandler:)]
pub unsafe fn discoverAllIdentitiesWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(*mut NSArray<CKUserIdentity>, *mut NSError)>,
);
#[cfg(all(feature = "CKUserIdentity", feature = "block2"))]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(discoverUserIdentityWithEmailAddress:completionHandler:)]
pub unsafe fn discoverUserIdentityWithEmailAddress_completionHandler(
&self,
email: &NSString,
completion_handler: &block2::Block<dyn Fn(*mut CKUserIdentity, *mut NSError)>,
);
#[cfg(all(feature = "CKUserIdentity", feature = "block2"))]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(discoverUserIdentityWithPhoneNumber:completionHandler:)]
pub unsafe fn discoverUserIdentityWithPhoneNumber_completionHandler(
&self,
phone_number: &NSString,
completion_handler: &block2::Block<dyn Fn(*mut CKUserIdentity, *mut NSError)>,
);
#[cfg(all(feature = "CKRecordID", feature = "CKUserIdentity", feature = "block2"))]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(discoverUserIdentityWithUserRecordID:completionHandler:)]
pub unsafe fn discoverUserIdentityWithUserRecordID_completionHandler(
&self,
user_record_id: &CKRecordID,
completion_handler: &block2::Block<dyn Fn(*mut CKUserIdentity, *mut NSError)>,
);
}
);
extern_methods!(
/// Sharing
unsafe impl CKContainer {
#[cfg(all(feature = "CKShareParticipant", feature = "block2"))]
#[method(fetchShareParticipantWithEmailAddress:completionHandler:)]
pub unsafe fn fetchShareParticipantWithEmailAddress_completionHandler(
&self,
email_address: &NSString,
completion_handler: &block2::Block<dyn Fn(*mut CKShareParticipant, *mut NSError)>,
);
#[cfg(all(feature = "CKShareParticipant", feature = "block2"))]
#[method(fetchShareParticipantWithPhoneNumber:completionHandler:)]
pub unsafe fn fetchShareParticipantWithPhoneNumber_completionHandler(
&self,
phone_number: &NSString,
completion_handler: &block2::Block<dyn Fn(*mut CKShareParticipant, *mut NSError)>,
);
#[cfg(all(
feature = "CKRecordID",
feature = "CKShareParticipant",
feature = "block2"
))]
#[method(fetchShareParticipantWithUserRecordID:completionHandler:)]
pub unsafe fn fetchShareParticipantWithUserRecordID_completionHandler(
&self,
user_record_id: &CKRecordID,
completion_handler: &block2::Block<dyn Fn(*mut CKShareParticipant, *mut NSError)>,
);
#[cfg(all(feature = "CKShareMetadata", feature = "block2"))]
#[method(fetchShareMetadataWithURL:completionHandler:)]
pub unsafe fn fetchShareMetadataWithURL_completionHandler(
&self,
url: &NSURL,
completion_handler: &block2::Block<dyn Fn(*mut CKShareMetadata, *mut NSError)>,
);
#[cfg(all(
feature = "CKRecord",
feature = "CKShare",
feature = "CKShareMetadata",
feature = "block2"
))]
#[method(acceptShareMetadata:completionHandler:)]
pub unsafe fn acceptShareMetadata_completionHandler(
&self,
metadata: &CKShareMetadata,
completion_handler: &block2::Block<dyn Fn(*mut CKShare, *mut NSError)>,
);
}
);
extern_methods!(
/// CKLongLivedOperations
unsafe impl CKContainer {
#[cfg(all(feature = "CKOperation", feature = "block2"))]
#[method(fetchAllLongLivedOperationIDsWithCompletionHandler:)]
pub unsafe fn fetchAllLongLivedOperationIDsWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(*mut NSArray<CKOperationID>, *mut NSError)>,
);
#[cfg(all(feature = "CKOperation", feature = "block2"))]
#[method(fetchLongLivedOperationWithID:completionHandler:)]
pub unsafe fn fetchLongLivedOperationWithID_completionHandler(
&self,
operation_id: &CKOperationID,
completion_handler: &block2::Block<dyn Fn(*mut CKOperation, *mut NSError)>,
);
}
);

View File

@@ -0,0 +1,169 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKDatabaseScope(pub NSInteger);
impl CKDatabaseScope {
#[doc(alias = "CKDatabaseScopePublic")]
pub const Public: Self = Self(1);
#[doc(alias = "CKDatabaseScopePrivate")]
pub const Private: Self = Self(2);
#[doc(alias = "CKDatabaseScopeShared")]
pub const Shared: Self = Self(3);
}
unsafe impl Encode for CKDatabaseScope {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKDatabaseScope {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKDatabase;
unsafe impl ClassType for CKDatabase {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKDatabase {}
unsafe impl Sync for CKDatabase {}
unsafe impl NSObjectProtocol for CKDatabase {}
extern_methods!(
unsafe impl CKDatabase {
#[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>;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
#[method(addOperation:)]
pub unsafe fn addOperation(&self, operation: &CKDatabaseOperation);
#[method(databaseScope)]
pub unsafe fn databaseScope(&self) -> CKDatabaseScope;
}
);
extern_methods!(
/// ConvenienceMethods
unsafe impl CKDatabase {
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(fetchRecordWithID:completionHandler:)]
pub unsafe fn fetchRecordWithID_completionHandler(
&self,
record_id: &CKRecordID,
completion_handler: &block2::Block<dyn Fn(*mut CKRecord, *mut NSError)>,
);
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[method(saveRecord:completionHandler:)]
pub unsafe fn saveRecord_completionHandler(
&self,
record: &CKRecord,
completion_handler: &block2::Block<dyn Fn(*mut CKRecord, *mut NSError)>,
);
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[method(deleteRecordWithID:completionHandler:)]
pub unsafe fn deleteRecordWithID_completionHandler(
&self,
record_id: &CKRecordID,
completion_handler: &block2::Block<dyn Fn(*mut CKRecordID, *mut NSError)>,
);
#[cfg(all(
feature = "CKQuery",
feature = "CKRecord",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(performQuery:inZoneWithID:completionHandler:)]
pub unsafe fn performQuery_inZoneWithID_completionHandler(
&self,
query: &CKQuery,
zone_id: Option<&CKRecordZoneID>,
completion_handler: &block2::Block<dyn Fn(*mut NSArray<CKRecord>, *mut NSError)>,
);
#[cfg(all(feature = "CKRecordZone", feature = "block2"))]
#[method(fetchAllRecordZonesWithCompletionHandler:)]
pub unsafe fn fetchAllRecordZonesWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(*mut NSArray<CKRecordZone>, *mut NSError)>,
);
#[cfg(all(
feature = "CKRecordZone",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(fetchRecordZoneWithID:completionHandler:)]
pub unsafe fn fetchRecordZoneWithID_completionHandler(
&self,
zone_id: &CKRecordZoneID,
completion_handler: &block2::Block<dyn Fn(*mut CKRecordZone, *mut NSError)>,
);
#[cfg(all(feature = "CKRecordZone", feature = "block2"))]
#[method(saveRecordZone:completionHandler:)]
pub unsafe fn saveRecordZone_completionHandler(
&self,
zone: &CKRecordZone,
completion_handler: &block2::Block<dyn Fn(*mut CKRecordZone, *mut NSError)>,
);
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(deleteRecordZoneWithID:completionHandler:)]
pub unsafe fn deleteRecordZoneWithID_completionHandler(
&self,
zone_id: &CKRecordZoneID,
completion_handler: &block2::Block<dyn Fn(*mut CKRecordZoneID, *mut NSError)>,
);
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(fetchSubscriptionWithID:completionHandler:)]
pub unsafe fn fetchSubscriptionWithID_completionHandler(
&self,
subscription_id: &CKSubscriptionID,
completion_handler: &block2::Block<dyn Fn(*mut CKSubscription, *mut NSError)>,
);
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(fetchAllSubscriptionsWithCompletionHandler:)]
pub unsafe fn fetchAllSubscriptionsWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(*mut NSArray<CKSubscription>, *mut NSError)>,
);
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(saveSubscription:completionHandler:)]
pub unsafe fn saveSubscription_completionHandler(
&self,
subscription: &CKSubscription,
completion_handler: &block2::Block<dyn Fn(*mut CKSubscription, *mut NSError)>,
);
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(deleteSubscriptionWithID:completionHandler:)]
pub unsafe fn deleteSubscriptionWithID_completionHandler(
&self,
subscription_id: &CKSubscriptionID,
completion_handler: &block2::Block<dyn Fn(*mut CKSubscriptionID, *mut NSError)>,
);
}
);

View File

@@ -0,0 +1,53 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKOperation")]
pub struct CKDatabaseOperation;
#[cfg(feature = "CKOperation")]
unsafe impl ClassType for CKDatabaseOperation {
#[inherits(NSOperation, NSObject)]
type Super = CKOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKOperation")]
unsafe impl NSObjectProtocol for CKDatabaseOperation {}
extern_methods!(
#[cfg(feature = "CKOperation")]
unsafe impl CKDatabaseOperation {
#[cfg(feature = "CKDatabase")]
#[method_id(@__retain_semantics Other database)]
pub unsafe fn database(&self) -> Option<Retained<CKDatabase>>;
#[cfg(feature = "CKDatabase")]
#[method(setDatabase:)]
pub unsafe fn setDatabase(&self, database: Option<&CKDatabase>);
}
);
extern_methods!(
/// Methods declared on superclass `CKOperation`
#[cfg(feature = "CKOperation")]
unsafe impl CKDatabaseOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CKOperation")]
unsafe impl CKDatabaseOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,2 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT

View File

@@ -0,0 +1,73 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKOperation")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
pub struct CKDiscoverAllUserIdentitiesOperation;
#[cfg(feature = "CKOperation")]
unsafe impl ClassType for CKDiscoverAllUserIdentitiesOperation {
#[inherits(NSOperation, NSObject)]
type Super = CKOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKOperation")]
unsafe impl NSObjectProtocol for CKDiscoverAllUserIdentitiesOperation {}
extern_methods!(
#[cfg(feature = "CKOperation")]
unsafe impl CKDiscoverAllUserIdentitiesOperation {
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(all(feature = "CKUserIdentity", feature = "block2"))]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(userIdentityDiscoveredBlock)]
pub unsafe fn userIdentityDiscoveredBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKUserIdentity>)>;
#[cfg(all(feature = "CKUserIdentity", feature = "block2"))]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(setUserIdentityDiscoveredBlock:)]
pub unsafe fn setUserIdentityDiscoveredBlock(
&self,
user_identity_discovered_block: Option<&block2::Block<dyn Fn(NonNull<CKUserIdentity>)>>,
);
#[cfg(feature = "block2")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(discoverAllUserIdentitiesCompletionBlock)]
pub unsafe fn discoverAllUserIdentitiesCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSError)>;
#[cfg(feature = "block2")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(setDiscoverAllUserIdentitiesCompletionBlock:)]
pub unsafe fn setDiscoverAllUserIdentitiesCompletionBlock(
&self,
discover_all_user_identities_completion_block: Option<
&block2::Block<dyn Fn(*mut NSError)>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CKOperation")]
unsafe impl CKDiscoverAllUserIdentitiesOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,103 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKOperation")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
pub struct CKDiscoverUserIdentitiesOperation;
#[cfg(feature = "CKOperation")]
unsafe impl ClassType for CKDiscoverUserIdentitiesOperation {
#[inherits(NSOperation, NSObject)]
type Super = CKOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKOperation")]
unsafe impl NSObjectProtocol for CKDiscoverUserIdentitiesOperation {}
extern_methods!(
#[cfg(feature = "CKOperation")]
unsafe impl CKDiscoverUserIdentitiesOperation {
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKUserIdentityLookupInfo")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method_id(@__retain_semantics Init initWithUserIdentityLookupInfos:)]
pub unsafe fn initWithUserIdentityLookupInfos(
this: Allocated<Self>,
user_identity_lookup_infos: &NSArray<CKUserIdentityLookupInfo>,
) -> Retained<Self>;
#[cfg(feature = "CKUserIdentityLookupInfo")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method_id(@__retain_semantics Other userIdentityLookupInfos)]
pub unsafe fn userIdentityLookupInfos(&self)
-> Retained<NSArray<CKUserIdentityLookupInfo>>;
#[cfg(feature = "CKUserIdentityLookupInfo")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(setUserIdentityLookupInfos:)]
pub unsafe fn setUserIdentityLookupInfos(
&self,
user_identity_lookup_infos: &NSArray<CKUserIdentityLookupInfo>,
);
#[cfg(all(
feature = "CKUserIdentity",
feature = "CKUserIdentityLookupInfo",
feature = "block2"
))]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(userIdentityDiscoveredBlock)]
pub unsafe fn userIdentityDiscoveredBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKUserIdentity>, NonNull<CKUserIdentityLookupInfo>)>;
#[cfg(all(
feature = "CKUserIdentity",
feature = "CKUserIdentityLookupInfo",
feature = "block2"
))]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(setUserIdentityDiscoveredBlock:)]
pub unsafe fn setUserIdentityDiscoveredBlock(
&self,
user_identity_discovered_block: Option<
&block2::Block<dyn Fn(NonNull<CKUserIdentity>, NonNull<CKUserIdentityLookupInfo>)>,
>,
);
#[cfg(feature = "block2")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(discoverUserIdentitiesCompletionBlock)]
pub unsafe fn discoverUserIdentitiesCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSError)>;
#[cfg(feature = "block2")]
#[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
#[method(setDiscoverUserIdentitiesCompletionBlock:)]
pub unsafe fn setDiscoverUserIdentitiesCompletionBlock(
&self,
discover_user_identities_completion_block: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CKOperation")]
unsafe impl CKDiscoverUserIdentitiesOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,86 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static CKErrorDomain: &'static NSString;
}
extern "C" {
pub static CKPartialErrorsByItemIDKey: &'static NSString;
}
extern "C" {
pub static CKRecordChangedErrorAncestorRecordKey: &'static NSString;
}
extern "C" {
pub static CKRecordChangedErrorServerRecordKey: &'static NSString;
}
extern "C" {
pub static CKRecordChangedErrorClientRecordKey: &'static NSString;
}
extern "C" {
pub static CKErrorUserDidResetEncryptedDataKey: &'static NSString;
}
extern "C" {
pub static CKErrorRetryAfterKey: &'static NSString;
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKErrorCode(pub NSInteger);
impl CKErrorCode {
pub const CKErrorInternalError: Self = Self(1);
pub const CKErrorPartialFailure: Self = Self(2);
pub const CKErrorNetworkUnavailable: Self = Self(3);
pub const CKErrorNetworkFailure: Self = Self(4);
pub const CKErrorBadContainer: Self = Self(5);
pub const CKErrorServiceUnavailable: Self = Self(6);
pub const CKErrorRequestRateLimited: Self = Self(7);
pub const CKErrorMissingEntitlement: Self = Self(8);
pub const CKErrorNotAuthenticated: Self = Self(9);
pub const CKErrorPermissionFailure: Self = Self(10);
pub const CKErrorUnknownItem: Self = Self(11);
pub const CKErrorInvalidArguments: Self = Self(12);
#[deprecated = "Will not be returned"]
pub const CKErrorResultsTruncated: Self = Self(13);
pub const CKErrorServerRecordChanged: Self = Self(14);
pub const CKErrorServerRejectedRequest: Self = Self(15);
pub const CKErrorAssetFileNotFound: Self = Self(16);
pub const CKErrorAssetFileModified: Self = Self(17);
pub const CKErrorIncompatibleVersion: Self = Self(18);
pub const CKErrorConstraintViolation: Self = Self(19);
pub const CKErrorOperationCancelled: Self = Self(20);
pub const CKErrorChangeTokenExpired: Self = Self(21);
pub const CKErrorBatchRequestFailed: Self = Self(22);
pub const CKErrorZoneBusy: Self = Self(23);
pub const CKErrorBadDatabase: Self = Self(24);
pub const CKErrorQuotaExceeded: Self = Self(25);
pub const CKErrorZoneNotFound: Self = Self(26);
pub const CKErrorLimitExceeded: Self = Self(27);
pub const CKErrorUserDeletedZone: Self = Self(28);
pub const CKErrorTooManyParticipants: Self = Self(29);
pub const CKErrorAlreadyShared: Self = Self(30);
pub const CKErrorReferenceViolation: Self = Self(31);
pub const CKErrorManagedAccountRestricted: Self = Self(32);
pub const CKErrorParticipantMayNeedVerification: Self = Self(33);
pub const CKErrorServerResponseLost: Self = Self(34);
pub const CKErrorAssetNotAvailable: Self = Self(35);
pub const CKErrorAccountTemporarilyUnavailable: Self = Self(36);
}
unsafe impl Encode for CKErrorCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKErrorCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

View File

@@ -0,0 +1,159 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKFetchDatabaseChangesOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKFetchDatabaseChangesOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKFetchDatabaseChangesOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchDatabaseChangesOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKServerChangeToken")]
#[method_id(@__retain_semantics Init initWithPreviousServerChangeToken:)]
pub unsafe fn initWithPreviousServerChangeToken(
this: Allocated<Self>,
previous_server_change_token: Option<&CKServerChangeToken>,
) -> Retained<Self>;
#[cfg(feature = "CKServerChangeToken")]
#[method_id(@__retain_semantics Other previousServerChangeToken)]
pub unsafe fn previousServerChangeToken(&self) -> Option<Retained<CKServerChangeToken>>;
#[cfg(feature = "CKServerChangeToken")]
#[method(setPreviousServerChangeToken:)]
pub unsafe fn setPreviousServerChangeToken(
&self,
previous_server_change_token: Option<&CKServerChangeToken>,
);
#[method(resultsLimit)]
pub unsafe fn resultsLimit(&self) -> NSUInteger;
#[method(setResultsLimit:)]
pub unsafe fn setResultsLimit(&self, results_limit: NSUInteger);
#[method(fetchAllChanges)]
pub unsafe fn fetchAllChanges(&self) -> bool;
#[method(setFetchAllChanges:)]
pub unsafe fn setFetchAllChanges(&self, fetch_all_changes: bool);
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(recordZoneWithIDChangedBlock)]
pub unsafe fn recordZoneWithIDChangedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordZoneID>)>;
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(setRecordZoneWithIDChangedBlock:)]
pub unsafe fn setRecordZoneWithIDChangedBlock(
&self,
record_zone_with_id_changed_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordZoneID>)>,
>,
);
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(recordZoneWithIDWasDeletedBlock)]
pub unsafe fn recordZoneWithIDWasDeletedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordZoneID>)>;
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(setRecordZoneWithIDWasDeletedBlock:)]
pub unsafe fn setRecordZoneWithIDWasDeletedBlock(
&self,
record_zone_with_id_was_deleted_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordZoneID>)>,
>,
);
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(recordZoneWithIDWasPurgedBlock)]
pub unsafe fn recordZoneWithIDWasPurgedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordZoneID>)>;
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(setRecordZoneWithIDWasPurgedBlock:)]
pub unsafe fn setRecordZoneWithIDWasPurgedBlock(
&self,
record_zone_with_id_was_purged_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordZoneID>)>,
>,
);
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(recordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock)]
pub unsafe fn recordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordZoneID>)>;
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(setRecordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock:)]
pub unsafe fn setRecordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock(
&self,
record_zone_with_id_was_deleted_due_to_user_encrypted_data_reset_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordZoneID>)>,
>,
);
#[cfg(all(feature = "CKServerChangeToken", feature = "block2"))]
#[method(changeTokenUpdatedBlock)]
pub unsafe fn changeTokenUpdatedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKServerChangeToken>)>;
#[cfg(all(feature = "CKServerChangeToken", feature = "block2"))]
#[method(setChangeTokenUpdatedBlock:)]
pub unsafe fn setChangeTokenUpdatedBlock(
&self,
change_token_updated_block: Option<
&block2::Block<dyn Fn(NonNull<CKServerChangeToken>)>,
>,
);
#[cfg(all(feature = "CKServerChangeToken", feature = "block2"))]
#[method(fetchDatabaseChangesCompletionBlock)]
pub unsafe fn fetchDatabaseChangesCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut CKServerChangeToken, Bool, *mut NSError)>;
#[cfg(all(feature = "CKServerChangeToken", feature = "block2"))]
#[method(setFetchDatabaseChangesCompletionBlock:)]
pub unsafe fn setFetchDatabaseChangesCompletionBlock(
&self,
fetch_database_changes_completion_block: Option<
&block2::Block<dyn Fn(*mut CKServerChangeToken, Bool, *mut NSError)>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchDatabaseChangesOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,106 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKOperation")]
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
pub struct CKFetchNotificationChangesOperation;
#[cfg(feature = "CKOperation")]
unsafe impl ClassType for CKFetchNotificationChangesOperation {
#[inherits(NSOperation, NSObject)]
type Super = CKOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKOperation")]
unsafe impl NSObjectProtocol for CKFetchNotificationChangesOperation {}
extern_methods!(
#[cfg(feature = "CKOperation")]
unsafe impl CKFetchNotificationChangesOperation {
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKServerChangeToken")]
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method_id(@__retain_semantics Init initWithPreviousServerChangeToken:)]
pub unsafe fn initWithPreviousServerChangeToken(
this: Allocated<Self>,
previous_server_change_token: Option<&CKServerChangeToken>,
) -> Retained<Self>;
#[cfg(feature = "CKServerChangeToken")]
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method_id(@__retain_semantics Other previousServerChangeToken)]
pub unsafe fn previousServerChangeToken(&self) -> Option<Retained<CKServerChangeToken>>;
#[cfg(feature = "CKServerChangeToken")]
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method(setPreviousServerChangeToken:)]
pub unsafe fn setPreviousServerChangeToken(
&self,
previous_server_change_token: Option<&CKServerChangeToken>,
);
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method(resultsLimit)]
pub unsafe fn resultsLimit(&self) -> NSUInteger;
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method(setResultsLimit:)]
pub unsafe fn setResultsLimit(&self, results_limit: NSUInteger);
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method(moreComing)]
pub unsafe fn moreComing(&self) -> bool;
#[cfg(all(feature = "CKNotification", feature = "block2"))]
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method(notificationChangedBlock)]
pub unsafe fn notificationChangedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKNotification>)>;
#[cfg(all(feature = "CKNotification", feature = "block2"))]
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method(setNotificationChangedBlock:)]
pub unsafe fn setNotificationChangedBlock(
&self,
notification_changed_block: Option<&block2::Block<dyn Fn(NonNull<CKNotification>)>>,
);
#[cfg(all(feature = "CKServerChangeToken", feature = "block2"))]
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method(fetchNotificationChangesCompletionBlock)]
pub unsafe fn fetchNotificationChangesCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut CKServerChangeToken, *mut NSError)>;
#[cfg(all(feature = "CKServerChangeToken", feature = "block2"))]
#[deprecated = "Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation"]
#[method(setFetchNotificationChangesCompletionBlock:)]
pub unsafe fn setFetchNotificationChangesCompletionBlock(
&self,
fetch_notification_changes_completion_block: Option<
&block2::Block<dyn Fn(*mut CKServerChangeToken, *mut NSError)>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CKOperation")]
unsafe impl CKFetchNotificationChangesOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,140 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
#[deprecated]
pub struct CKFetchRecordChangesOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKFetchRecordChangesOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKFetchRecordChangesOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchRecordChangesOperation {
#[deprecated]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(all(feature = "CKRecordZoneID", feature = "CKServerChangeToken"))]
#[deprecated]
#[method_id(@__retain_semantics Init initWithRecordZoneID:previousServerChangeToken:)]
pub unsafe fn initWithRecordZoneID_previousServerChangeToken(
this: Allocated<Self>,
record_zone_id: &CKRecordZoneID,
previous_server_change_token: Option<&CKServerChangeToken>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[deprecated]
#[method_id(@__retain_semantics Other recordZoneID)]
pub unsafe fn recordZoneID(&self) -> Option<Retained<CKRecordZoneID>>;
#[cfg(feature = "CKRecordZoneID")]
#[deprecated]
#[method(setRecordZoneID:)]
pub unsafe fn setRecordZoneID(&self, record_zone_id: Option<&CKRecordZoneID>);
#[cfg(feature = "CKServerChangeToken")]
#[deprecated]
#[method_id(@__retain_semantics Other previousServerChangeToken)]
pub unsafe fn previousServerChangeToken(&self) -> Option<Retained<CKServerChangeToken>>;
#[cfg(feature = "CKServerChangeToken")]
#[deprecated]
#[method(setPreviousServerChangeToken:)]
pub unsafe fn setPreviousServerChangeToken(
&self,
previous_server_change_token: Option<&CKServerChangeToken>,
);
#[deprecated]
#[method(resultsLimit)]
pub unsafe fn resultsLimit(&self) -> NSUInteger;
#[deprecated]
#[method(setResultsLimit:)]
pub unsafe fn setResultsLimit(&self, results_limit: NSUInteger);
#[cfg(feature = "CKRecord")]
#[deprecated]
#[method_id(@__retain_semantics Other desiredKeys)]
pub unsafe fn desiredKeys(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[deprecated]
#[method(setDesiredKeys:)]
pub unsafe fn setDesiredKeys(&self, desired_keys: Option<&NSArray<CKRecordFieldKey>>);
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[deprecated]
#[method(recordChangedBlock)]
pub unsafe fn recordChangedBlock(&self) -> *mut block2::Block<dyn Fn(NonNull<CKRecord>)>;
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[deprecated]
#[method(setRecordChangedBlock:)]
pub unsafe fn setRecordChangedBlock(
&self,
record_changed_block: Option<&block2::Block<dyn Fn(NonNull<CKRecord>)>>,
);
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[deprecated]
#[method(recordWithIDWasDeletedBlock)]
pub unsafe fn recordWithIDWasDeletedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordID>)>;
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[deprecated]
#[method(setRecordWithIDWasDeletedBlock:)]
pub unsafe fn setRecordWithIDWasDeletedBlock(
&self,
record_with_id_was_deleted_block: Option<&block2::Block<dyn Fn(NonNull<CKRecordID>)>>,
);
#[deprecated]
#[method(moreComing)]
pub unsafe fn moreComing(&self) -> bool;
#[cfg(all(feature = "CKServerChangeToken", feature = "block2"))]
#[deprecated]
#[method(fetchRecordChangesCompletionBlock)]
pub unsafe fn fetchRecordChangesCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut CKServerChangeToken, *mut NSData, *mut NSError)>;
#[cfg(all(feature = "CKServerChangeToken", feature = "block2"))]
#[deprecated]
#[method(setFetchRecordChangesCompletionBlock:)]
pub unsafe fn setFetchRecordChangesCompletionBlock(
&self,
fetch_record_changes_completion_block: Option<
&block2::Block<dyn Fn(*mut CKServerChangeToken, *mut NSData, *mut NSError)>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchRecordChangesOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,359 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKFetchRecordZoneChangesOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKFetchRecordZoneChangesOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKFetchRecordZoneChangesOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchRecordZoneChangesOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithRecordZoneIDs:configurationsByRecordZoneID:)]
pub unsafe fn initWithRecordZoneIDs_configurationsByRecordZoneID(
this: Allocated<Self>,
record_zone_i_ds: &NSArray<CKRecordZoneID>,
configurations_by_record_zone_id: Option<
&NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>,
>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other recordZoneIDs)]
pub unsafe fn recordZoneIDs(&self) -> Option<Retained<NSArray<CKRecordZoneID>>>;
#[cfg(feature = "CKRecordZoneID")]
#[method(setRecordZoneIDs:)]
pub unsafe fn setRecordZoneIDs(&self, record_zone_i_ds: Option<&NSArray<CKRecordZoneID>>);
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other configurationsByRecordZoneID)]
pub unsafe fn configurationsByRecordZoneID(
&self,
) -> Option<Retained<NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>>>;
#[cfg(feature = "CKRecordZoneID")]
#[method(setConfigurationsByRecordZoneID:)]
pub unsafe fn setConfigurationsByRecordZoneID(
&self,
configurations_by_record_zone_id: Option<
&NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>,
>,
);
#[method(fetchAllChanges)]
pub unsafe fn fetchAllChanges(&self) -> bool;
#[method(setFetchAllChanges:)]
pub unsafe fn setFetchAllChanges(&self, fetch_all_changes: bool);
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[deprecated = "Use recordWasChangedBlock instead, which surfaces per-record errors"]
#[method(recordChangedBlock)]
pub unsafe fn recordChangedBlock(&self) -> *mut block2::Block<dyn Fn(NonNull<CKRecord>)>;
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[deprecated = "Use recordWasChangedBlock instead, which surfaces per-record errors"]
#[method(setRecordChangedBlock:)]
pub unsafe fn setRecordChangedBlock(
&self,
record_changed_block: Option<&block2::Block<dyn Fn(NonNull<CKRecord>)>>,
);
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(recordWasChangedBlock)]
pub unsafe fn recordWasChangedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordID>, *mut CKRecord, *mut NSError)>;
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(setRecordWasChangedBlock:)]
pub unsafe fn setRecordWasChangedBlock(
&self,
record_was_changed_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordID>, *mut CKRecord, *mut NSError)>,
>,
);
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(recordWithIDWasDeletedBlock)]
pub unsafe fn recordWithIDWasDeletedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordID>, NonNull<CKRecordType>)>;
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(setRecordWithIDWasDeletedBlock:)]
pub unsafe fn setRecordWithIDWasDeletedBlock(
&self,
record_with_id_was_deleted_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordID>, NonNull<CKRecordType>)>,
>,
);
#[cfg(all(
feature = "CKRecordZoneID",
feature = "CKServerChangeToken",
feature = "block2"
))]
#[method(recordZoneChangeTokensUpdatedBlock)]
pub unsafe fn recordZoneChangeTokensUpdatedBlock(
&self,
) -> *mut block2::Block<
dyn Fn(NonNull<CKRecordZoneID>, *mut CKServerChangeToken, *mut NSData),
>;
#[cfg(all(
feature = "CKRecordZoneID",
feature = "CKServerChangeToken",
feature = "block2"
))]
#[method(setRecordZoneChangeTokensUpdatedBlock:)]
pub unsafe fn setRecordZoneChangeTokensUpdatedBlock(
&self,
record_zone_change_tokens_updated_block: Option<
&block2::Block<
dyn Fn(NonNull<CKRecordZoneID>, *mut CKServerChangeToken, *mut NSData),
>,
>,
);
#[cfg(all(
feature = "CKRecordZoneID",
feature = "CKServerChangeToken",
feature = "block2"
))]
#[method(recordZoneFetchCompletionBlock)]
pub unsafe fn recordZoneFetchCompletionBlock(
&self,
) -> *mut block2::Block<
dyn Fn(
NonNull<CKRecordZoneID>,
*mut CKServerChangeToken,
*mut NSData,
Bool,
*mut NSError,
),
>;
#[cfg(all(
feature = "CKRecordZoneID",
feature = "CKServerChangeToken",
feature = "block2"
))]
#[method(setRecordZoneFetchCompletionBlock:)]
pub unsafe fn setRecordZoneFetchCompletionBlock(
&self,
record_zone_fetch_completion_block: Option<
&block2::Block<
dyn Fn(
NonNull<CKRecordZoneID>,
*mut CKServerChangeToken,
*mut NSData,
Bool,
*mut NSError,
),
>,
>,
);
#[cfg(feature = "block2")]
#[method(fetchRecordZoneChangesCompletionBlock)]
pub unsafe fn fetchRecordZoneChangesCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSError)>;
#[cfg(feature = "block2")]
#[method(setFetchRecordZoneChangesCompletionBlock:)]
pub unsafe fn setFetchRecordZoneChangesCompletionBlock(
&self,
fetch_record_zone_changes_completion_block: Option<
&block2::Block<dyn Fn(*mut NSError)>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchRecordZoneChangesOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_methods!(
/// Deprecated
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchRecordZoneChangesOperation {
#[cfg(feature = "CKRecordZoneID")]
#[deprecated]
#[method_id(@__retain_semantics Init initWithRecordZoneIDs:optionsByRecordZoneID:)]
pub unsafe fn initWithRecordZoneIDs_optionsByRecordZoneID(
this: Allocated<Self>,
record_zone_i_ds: &NSArray<CKRecordZoneID>,
options_by_record_zone_id: Option<
&NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesOptions>,
>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[deprecated]
#[method_id(@__retain_semantics Other optionsByRecordZoneID)]
pub unsafe fn optionsByRecordZoneID(
&self,
) -> Option<Retained<NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesOptions>>>;
#[cfg(feature = "CKRecordZoneID")]
#[deprecated]
#[method(setOptionsByRecordZoneID:)]
pub unsafe fn setOptionsByRecordZoneID(
&self,
options_by_record_zone_id: Option<
&NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesOptions>,
>,
);
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKFetchRecordZoneChangesConfiguration;
unsafe impl ClassType for CKFetchRecordZoneChangesConfiguration {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKFetchRecordZoneChangesConfiguration {}
unsafe impl NSCopying for CKFetchRecordZoneChangesConfiguration {}
unsafe impl NSObjectProtocol for CKFetchRecordZoneChangesConfiguration {}
unsafe impl NSSecureCoding for CKFetchRecordZoneChangesConfiguration {}
extern_methods!(
unsafe impl CKFetchRecordZoneChangesConfiguration {
#[cfg(feature = "CKServerChangeToken")]
#[method_id(@__retain_semantics Other previousServerChangeToken)]
pub unsafe fn previousServerChangeToken(&self) -> Option<Retained<CKServerChangeToken>>;
#[cfg(feature = "CKServerChangeToken")]
#[method(setPreviousServerChangeToken:)]
pub unsafe fn setPreviousServerChangeToken(
&self,
previous_server_change_token: Option<&CKServerChangeToken>,
);
#[method(resultsLimit)]
pub unsafe fn resultsLimit(&self) -> NSUInteger;
#[method(setResultsLimit:)]
pub unsafe fn setResultsLimit(&self, results_limit: NSUInteger);
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other desiredKeys)]
pub unsafe fn desiredKeys(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[method(setDesiredKeys:)]
pub unsafe fn setDesiredKeys(&self, desired_keys: Option<&NSArray<CKRecordFieldKey>>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKFetchRecordZoneChangesConfiguration {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[deprecated]
pub struct CKFetchRecordZoneChangesOptions;
unsafe impl ClassType for CKFetchRecordZoneChangesOptions {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKFetchRecordZoneChangesOptions {}
unsafe impl NSCopying for CKFetchRecordZoneChangesOptions {}
unsafe impl NSObjectProtocol for CKFetchRecordZoneChangesOptions {}
unsafe impl NSSecureCoding for CKFetchRecordZoneChangesOptions {}
extern_methods!(
unsafe impl CKFetchRecordZoneChangesOptions {
#[cfg(feature = "CKServerChangeToken")]
#[deprecated]
#[method_id(@__retain_semantics Other previousServerChangeToken)]
pub unsafe fn previousServerChangeToken(&self) -> Option<Retained<CKServerChangeToken>>;
#[cfg(feature = "CKServerChangeToken")]
#[deprecated]
#[method(setPreviousServerChangeToken:)]
pub unsafe fn setPreviousServerChangeToken(
&self,
previous_server_change_token: Option<&CKServerChangeToken>,
);
#[deprecated]
#[method(resultsLimit)]
pub unsafe fn resultsLimit(&self) -> NSUInteger;
#[deprecated]
#[method(setResultsLimit:)]
pub unsafe fn setResultsLimit(&self, results_limit: NSUInteger);
#[cfg(feature = "CKRecord")]
#[deprecated]
#[method_id(@__retain_semantics Other desiredKeys)]
pub unsafe fn desiredKeys(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[deprecated]
#[method(setDesiredKeys:)]
pub unsafe fn setDesiredKeys(&self, desired_keys: Option<&NSArray<CKRecordFieldKey>>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKFetchRecordZoneChangesOptions {
#[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>;
}
);

View File

@@ -0,0 +1,105 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKFetchRecordZonesOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKFetchRecordZonesOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKFetchRecordZonesOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchRecordZonesOperation {
#[method_id(@__retain_semantics Other fetchAllRecordZonesOperation)]
pub unsafe fn fetchAllRecordZonesOperation() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithRecordZoneIDs:)]
pub unsafe fn initWithRecordZoneIDs(
this: Allocated<Self>,
zone_i_ds: &NSArray<CKRecordZoneID>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other recordZoneIDs)]
pub unsafe fn recordZoneIDs(&self) -> Option<Retained<NSArray<CKRecordZoneID>>>;
#[cfg(feature = "CKRecordZoneID")]
#[method(setRecordZoneIDs:)]
pub unsafe fn setRecordZoneIDs(&self, record_zone_i_ds: Option<&NSArray<CKRecordZoneID>>);
#[cfg(all(
feature = "CKRecordZone",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(perRecordZoneCompletionBlock)]
pub unsafe fn perRecordZoneCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordZoneID>, *mut CKRecordZone, *mut NSError)>;
#[cfg(all(
feature = "CKRecordZone",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(setPerRecordZoneCompletionBlock:)]
pub unsafe fn setPerRecordZoneCompletionBlock(
&self,
per_record_zone_completion_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordZoneID>, *mut CKRecordZone, *mut NSError)>,
>,
);
#[cfg(all(
feature = "CKRecordZone",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(fetchRecordZonesCompletionBlock)]
pub unsafe fn fetchRecordZonesCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSDictionary<CKRecordZoneID, CKRecordZone>, *mut NSError)>;
#[cfg(all(
feature = "CKRecordZone",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(setFetchRecordZonesCompletionBlock:)]
pub unsafe fn setFetchRecordZonesCompletionBlock(
&self,
fetch_record_zones_completion_block: Option<
&block2::Block<
dyn Fn(*mut NSDictionary<CKRecordZoneID, CKRecordZone>, *mut NSError),
>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchRecordZonesOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,110 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKFetchRecordsOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKFetchRecordsOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKFetchRecordsOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchRecordsOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Init initWithRecordIDs:)]
pub unsafe fn initWithRecordIDs(
this: Allocated<Self>,
record_i_ds: &NSArray<CKRecordID>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other fetchCurrentUserRecordOperation)]
pub unsafe fn fetchCurrentUserRecordOperation() -> Retained<Self>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other recordIDs)]
pub unsafe fn recordIDs(&self) -> Option<Retained<NSArray<CKRecordID>>>;
#[cfg(feature = "CKRecordID")]
#[method(setRecordIDs:)]
pub unsafe fn setRecordIDs(&self, record_i_ds: Option<&NSArray<CKRecordID>>);
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other desiredKeys)]
pub unsafe fn desiredKeys(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[method(setDesiredKeys:)]
pub unsafe fn setDesiredKeys(&self, desired_keys: Option<&NSArray<CKRecordFieldKey>>);
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[method(perRecordProgressBlock)]
pub unsafe fn perRecordProgressBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordID>, c_double)>;
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[method(setPerRecordProgressBlock:)]
pub unsafe fn setPerRecordProgressBlock(
&self,
per_record_progress_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordID>, c_double)>,
>,
);
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(perRecordCompletionBlock)]
pub unsafe fn perRecordCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut CKRecord, *mut CKRecordID, *mut NSError)>;
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(setPerRecordCompletionBlock:)]
pub unsafe fn setPerRecordCompletionBlock(
&self,
per_record_completion_block: Option<
&block2::Block<dyn Fn(*mut CKRecord, *mut CKRecordID, *mut NSError)>,
>,
);
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(fetchRecordsCompletionBlock)]
pub unsafe fn fetchRecordsCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSDictionary<CKRecordID, CKRecord>, *mut NSError)>;
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(setFetchRecordsCompletionBlock:)]
pub unsafe fn setFetchRecordsCompletionBlock(
&self,
fetch_records_completion_block: Option<
&block2::Block<dyn Fn(*mut NSDictionary<CKRecordID, CKRecord>, *mut NSError)>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchRecordsOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,96 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKOperation")]
pub struct CKFetchShareMetadataOperation;
#[cfg(feature = "CKOperation")]
unsafe impl ClassType for CKFetchShareMetadataOperation {
#[inherits(NSOperation, NSObject)]
type Super = CKOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKOperation")]
unsafe impl NSObjectProtocol for CKFetchShareMetadataOperation {}
extern_methods!(
#[cfg(feature = "CKOperation")]
unsafe impl CKFetchShareMetadataOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithShareURLs:)]
pub unsafe fn initWithShareURLs(
this: Allocated<Self>,
share_ur_ls: &NSArray<NSURL>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other shareURLs)]
pub unsafe fn shareURLs(&self) -> Option<Retained<NSArray<NSURL>>>;
#[method(setShareURLs:)]
pub unsafe fn setShareURLs(&self, share_ur_ls: Option<&NSArray<NSURL>>);
#[method(shouldFetchRootRecord)]
pub unsafe fn shouldFetchRootRecord(&self) -> bool;
#[method(setShouldFetchRootRecord:)]
pub unsafe fn setShouldFetchRootRecord(&self, should_fetch_root_record: bool);
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other rootRecordDesiredKeys)]
pub unsafe fn rootRecordDesiredKeys(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[method(setRootRecordDesiredKeys:)]
pub unsafe fn setRootRecordDesiredKeys(
&self,
root_record_desired_keys: Option<&NSArray<CKRecordFieldKey>>,
);
#[cfg(all(feature = "CKShareMetadata", feature = "block2"))]
#[method(perShareMetadataBlock)]
pub unsafe fn perShareMetadataBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<NSURL>, *mut CKShareMetadata, *mut NSError)>;
#[cfg(all(feature = "CKShareMetadata", feature = "block2"))]
#[method(setPerShareMetadataBlock:)]
pub unsafe fn setPerShareMetadataBlock(
&self,
per_share_metadata_block: Option<
&block2::Block<dyn Fn(NonNull<NSURL>, *mut CKShareMetadata, *mut NSError)>,
>,
);
#[cfg(feature = "block2")]
#[method(fetchShareMetadataCompletionBlock)]
pub unsafe fn fetchShareMetadataCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSError)>;
#[cfg(feature = "block2")]
#[method(setFetchShareMetadataCompletionBlock:)]
pub unsafe fn setFetchShareMetadataCompletionBlock(
&self,
fetch_share_metadata_completion_block: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CKOperation")]
unsafe impl CKFetchShareMetadataOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,120 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKOperation")]
pub struct CKFetchShareParticipantsOperation;
#[cfg(feature = "CKOperation")]
unsafe impl ClassType for CKFetchShareParticipantsOperation {
#[inherits(NSOperation, NSObject)]
type Super = CKOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKOperation")]
unsafe impl NSObjectProtocol for CKFetchShareParticipantsOperation {}
extern_methods!(
#[cfg(feature = "CKOperation")]
unsafe impl CKFetchShareParticipantsOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKUserIdentityLookupInfo")]
#[method_id(@__retain_semantics Init initWithUserIdentityLookupInfos:)]
pub unsafe fn initWithUserIdentityLookupInfos(
this: Allocated<Self>,
user_identity_lookup_infos: &NSArray<CKUserIdentityLookupInfo>,
) -> Retained<Self>;
#[cfg(feature = "CKUserIdentityLookupInfo")]
#[method_id(@__retain_semantics Other userIdentityLookupInfos)]
pub unsafe fn userIdentityLookupInfos(
&self,
) -> Option<Retained<NSArray<CKUserIdentityLookupInfo>>>;
#[cfg(feature = "CKUserIdentityLookupInfo")]
#[method(setUserIdentityLookupInfos:)]
pub unsafe fn setUserIdentityLookupInfos(
&self,
user_identity_lookup_infos: Option<&NSArray<CKUserIdentityLookupInfo>>,
);
#[cfg(all(feature = "CKShareParticipant", feature = "block2"))]
#[deprecated = "Use perShareParticipantCompletionBlock instead, which surfaces per-share-participant errors"]
#[method(shareParticipantFetchedBlock)]
pub unsafe fn shareParticipantFetchedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKShareParticipant>)>;
#[cfg(all(feature = "CKShareParticipant", feature = "block2"))]
#[deprecated = "Use perShareParticipantCompletionBlock instead, which surfaces per-share-participant errors"]
#[method(setShareParticipantFetchedBlock:)]
pub unsafe fn setShareParticipantFetchedBlock(
&self,
share_participant_fetched_block: Option<
&block2::Block<dyn Fn(NonNull<CKShareParticipant>)>,
>,
);
#[cfg(all(
feature = "CKShareParticipant",
feature = "CKUserIdentityLookupInfo",
feature = "block2"
))]
#[method(perShareParticipantCompletionBlock)]
pub unsafe fn perShareParticipantCompletionBlock(
&self,
) -> *mut block2::Block<
dyn Fn(NonNull<CKUserIdentityLookupInfo>, *mut CKShareParticipant, *mut NSError),
>;
#[cfg(all(
feature = "CKShareParticipant",
feature = "CKUserIdentityLookupInfo",
feature = "block2"
))]
#[method(setPerShareParticipantCompletionBlock:)]
pub unsafe fn setPerShareParticipantCompletionBlock(
&self,
per_share_participant_completion_block: Option<
&block2::Block<
dyn Fn(
NonNull<CKUserIdentityLookupInfo>,
*mut CKShareParticipant,
*mut NSError,
),
>,
>,
);
#[cfg(feature = "block2")]
#[method(fetchShareParticipantsCompletionBlock)]
pub unsafe fn fetchShareParticipantsCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSError)>;
#[cfg(feature = "block2")]
#[method(setFetchShareParticipantsCompletionBlock:)]
pub unsafe fn setFetchShareParticipantsCompletionBlock(
&self,
fetch_share_participants_completion_block: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CKOperation")]
unsafe impl CKFetchShareParticipantsOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,96 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKFetchSubscriptionsOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKFetchSubscriptionsOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKFetchSubscriptionsOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchSubscriptionsOperation {
#[method_id(@__retain_semantics Other fetchAllSubscriptionsOperation)]
pub unsafe fn fetchAllSubscriptionsOperation() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKSubscription")]
#[method_id(@__retain_semantics Init initWithSubscriptionIDs:)]
pub unsafe fn initWithSubscriptionIDs(
this: Allocated<Self>,
subscription_i_ds: &NSArray<CKSubscriptionID>,
) -> Retained<Self>;
#[cfg(feature = "CKSubscription")]
#[method_id(@__retain_semantics Other subscriptionIDs)]
pub unsafe fn subscriptionIDs(&self) -> Option<Retained<NSArray<CKSubscriptionID>>>;
#[cfg(feature = "CKSubscription")]
#[method(setSubscriptionIDs:)]
pub unsafe fn setSubscriptionIDs(
&self,
subscription_i_ds: Option<&NSArray<CKSubscriptionID>>,
);
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(perSubscriptionCompletionBlock)]
pub unsafe fn perSubscriptionCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKSubscriptionID>, *mut CKSubscription, *mut NSError)>;
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(setPerSubscriptionCompletionBlock:)]
pub unsafe fn setPerSubscriptionCompletionBlock(
&self,
per_subscription_completion_block: Option<
&block2::Block<
dyn Fn(NonNull<CKSubscriptionID>, *mut CKSubscription, *mut NSError),
>,
>,
);
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(fetchSubscriptionCompletionBlock)]
pub unsafe fn fetchSubscriptionCompletionBlock(
&self,
) -> *mut block2::Block<
dyn Fn(*mut NSDictionary<CKSubscriptionID, CKSubscription>, *mut NSError),
>;
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(setFetchSubscriptionCompletionBlock:)]
pub unsafe fn setFetchSubscriptionCompletionBlock(
&self,
fetch_subscription_completion_block: Option<
&block2::Block<
dyn Fn(*mut NSDictionary<CKSubscriptionID, CKSubscription>, *mut NSError),
>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchSubscriptionsOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,66 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKFetchWebAuthTokenOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKFetchWebAuthTokenOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKFetchWebAuthTokenOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchWebAuthTokenOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithAPIToken:)]
pub unsafe fn initWithAPIToken(
this: Allocated<Self>,
api_token: &NSString,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other APIToken)]
pub unsafe fn APIToken(&self) -> Option<Retained<NSString>>;
#[method(setAPIToken:)]
pub unsafe fn setAPIToken(&self, api_token: Option<&NSString>);
#[cfg(feature = "block2")]
#[method(fetchWebAuthTokenCompletionBlock)]
pub unsafe fn fetchWebAuthTokenCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSString, *mut NSError)>;
#[cfg(feature = "block2")]
#[method(setFetchWebAuthTokenCompletionBlock:)]
pub unsafe fn setFetchWebAuthTokenCompletionBlock(
&self,
fetch_web_auth_token_completion_block: Option<
&block2::Block<dyn Fn(*mut NSString, *mut NSError)>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKFetchWebAuthTokenOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,102 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKLocationSortDescriptor;
unsafe impl ClassType for CKLocationSortDescriptor {
#[inherits(NSObject)]
type Super = NSSortDescriptor;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKLocationSortDescriptor {}
unsafe impl NSCopying for CKLocationSortDescriptor {}
unsafe impl NSObjectProtocol for CKLocationSortDescriptor {}
unsafe impl NSSecureCoding for CKLocationSortDescriptor {}
extern_methods!(
unsafe impl CKLocationSortDescriptor {
#[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>;
#[cfg(feature = "objc2-core-location")]
#[method_id(@__retain_semantics Init initWithKey:relativeLocation:)]
pub unsafe fn initWithKey_relativeLocation(
this: Allocated<Self>,
key: &NSString,
relative_location: &CLLocation,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
#[cfg(feature = "objc2-core-location")]
#[method_id(@__retain_semantics Other relativeLocation)]
pub unsafe fn relativeLocation(&self) -> Retained<CLLocation>;
}
);
extern_methods!(
/// Methods declared on superclass `NSSortDescriptor`
unsafe impl CKLocationSortDescriptor {
#[method_id(@__retain_semantics Other sortDescriptorWithKey:ascending:)]
pub unsafe fn sortDescriptorWithKey_ascending(
key: Option<&NSString>,
ascending: bool,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other sortDescriptorWithKey:ascending:selector:)]
pub unsafe fn sortDescriptorWithKey_ascending_selector(
key: Option<&NSString>,
ascending: bool,
selector: Option<Sel>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithKey:ascending:)]
pub unsafe fn initWithKey_ascending(
this: Allocated<Self>,
key: Option<&NSString>,
ascending: bool,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithKey:ascending:selector:)]
pub unsafe fn initWithKey_ascending_selector(
this: Allocated<Self>,
key: Option<&NSString>,
ascending: bool,
selector: Option<Sel>,
) -> Retained<Self>;
#[cfg(feature = "block2")]
#[method_id(@__retain_semantics Other sortDescriptorWithKey:ascending:comparator:)]
pub unsafe fn sortDescriptorWithKey_ascending_comparator(
key: Option<&NSString>,
ascending: bool,
cmptr: NSComparator,
) -> Retained<Self>;
#[cfg(feature = "block2")]
#[method_id(@__retain_semantics Init initWithKey:ascending:comparator:)]
pub unsafe fn initWithKey_ascending_comparator(
this: Allocated<Self>,
key: Option<&NSString>,
ascending: bool,
cmptr: NSComparator,
) -> Retained<Self>;
}
);

View File

@@ -0,0 +1,79 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKOperation")]
#[deprecated = "Instead of iterating notifications, consider using CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation as appropriate"]
pub struct CKMarkNotificationsReadOperation;
#[cfg(feature = "CKOperation")]
unsafe impl ClassType for CKMarkNotificationsReadOperation {
#[inherits(NSOperation, NSObject)]
type Super = CKOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKOperation")]
unsafe impl NSObjectProtocol for CKMarkNotificationsReadOperation {}
extern_methods!(
#[cfg(feature = "CKOperation")]
unsafe impl CKMarkNotificationsReadOperation {
#[deprecated = "Instead of iterating notifications, consider using CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation as appropriate"]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKNotification")]
#[deprecated = "Instead of iterating notifications, consider using CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation as appropriate"]
#[method_id(@__retain_semantics Init initWithNotificationIDsToMarkRead:)]
pub unsafe fn initWithNotificationIDsToMarkRead(
this: Allocated<Self>,
notification_i_ds: &NSArray<CKNotificationID>,
) -> Retained<Self>;
#[cfg(feature = "CKNotification")]
#[deprecated = "Instead of iterating notifications, consider using CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation as appropriate"]
#[method_id(@__retain_semantics Other notificationIDs)]
pub unsafe fn notificationIDs(&self) -> Option<Retained<NSArray<CKNotificationID>>>;
#[cfg(feature = "CKNotification")]
#[deprecated = "Instead of iterating notifications, consider using CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation as appropriate"]
#[method(setNotificationIDs:)]
pub unsafe fn setNotificationIDs(
&self,
notification_i_ds: Option<&NSArray<CKNotificationID>>,
);
#[cfg(all(feature = "CKNotification", feature = "block2"))]
#[deprecated = "Instead of iterating notifications, consider using CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation as appropriate"]
#[method(markNotificationsReadCompletionBlock)]
pub unsafe fn markNotificationsReadCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut NSArray<CKNotificationID>, *mut NSError)>;
#[cfg(all(feature = "CKNotification", feature = "block2"))]
#[deprecated = "Instead of iterating notifications, consider using CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation as appropriate"]
#[method(setMarkNotificationsReadCompletionBlock:)]
pub unsafe fn setMarkNotificationsReadCompletionBlock(
&self,
mark_notifications_read_completion_block: Option<
&block2::Block<dyn Fn(*mut NSArray<CKNotificationID>, *mut NSError)>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CKOperation")]
unsafe impl CKMarkNotificationsReadOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,70 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CKOperation")]
#[deprecated = "No longer supported, will cease working at some point in the future"]
pub struct CKModifyBadgeOperation;
#[cfg(feature = "CKOperation")]
unsafe impl ClassType for CKModifyBadgeOperation {
#[inherits(NSOperation, NSObject)]
type Super = CKOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CKOperation")]
unsafe impl NSObjectProtocol for CKModifyBadgeOperation {}
extern_methods!(
#[cfg(feature = "CKOperation")]
unsafe impl CKModifyBadgeOperation {
#[deprecated = "No longer supported, will cease working at some point in the future"]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[deprecated = "No longer supported, will cease working at some point in the future"]
#[method_id(@__retain_semantics Init initWithBadgeValue:)]
pub unsafe fn initWithBadgeValue(
this: Allocated<Self>,
badge_value: NSUInteger,
) -> Retained<Self>;
#[deprecated = "No longer supported, will cease working at some point in the future"]
#[method(badgeValue)]
pub unsafe fn badgeValue(&self) -> NSUInteger;
#[deprecated = "No longer supported, will cease working at some point in the future"]
#[method(setBadgeValue:)]
pub unsafe fn setBadgeValue(&self, badge_value: NSUInteger);
#[cfg(feature = "block2")]
#[deprecated = "No longer supported, will cease working at some point in the future"]
#[method(modifyBadgeCompletionBlock)]
pub unsafe fn modifyBadgeCompletionBlock(&self)
-> *mut block2::Block<dyn Fn(*mut NSError)>;
#[cfg(feature = "block2")]
#[deprecated = "No longer supported, will cease working at some point in the future"]
#[method(setModifyBadgeCompletionBlock:)]
pub unsafe fn setModifyBadgeCompletionBlock(
&self,
modify_badge_completion_block: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CKOperation")]
unsafe impl CKModifyBadgeOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,134 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKModifyRecordZonesOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKModifyRecordZonesOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKModifyRecordZonesOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKModifyRecordZonesOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(all(feature = "CKRecordZone", feature = "CKRecordZoneID"))]
#[method_id(@__retain_semantics Init initWithRecordZonesToSave:recordZoneIDsToDelete:)]
pub unsafe fn initWithRecordZonesToSave_recordZoneIDsToDelete(
this: Allocated<Self>,
record_zones_to_save: Option<&NSArray<CKRecordZone>>,
record_zone_i_ds_to_delete: Option<&NSArray<CKRecordZoneID>>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZone")]
#[method_id(@__retain_semantics Other recordZonesToSave)]
pub unsafe fn recordZonesToSave(&self) -> Option<Retained<NSArray<CKRecordZone>>>;
#[cfg(feature = "CKRecordZone")]
#[method(setRecordZonesToSave:)]
pub unsafe fn setRecordZonesToSave(
&self,
record_zones_to_save: Option<&NSArray<CKRecordZone>>,
);
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other recordZoneIDsToDelete)]
pub unsafe fn recordZoneIDsToDelete(&self) -> Option<Retained<NSArray<CKRecordZoneID>>>;
#[cfg(feature = "CKRecordZoneID")]
#[method(setRecordZoneIDsToDelete:)]
pub unsafe fn setRecordZoneIDsToDelete(
&self,
record_zone_i_ds_to_delete: Option<&NSArray<CKRecordZoneID>>,
);
#[cfg(all(
feature = "CKRecordZone",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(perRecordZoneSaveBlock)]
pub unsafe fn perRecordZoneSaveBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordZoneID>, *mut CKRecordZone, *mut NSError)>;
#[cfg(all(
feature = "CKRecordZone",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(setPerRecordZoneSaveBlock:)]
pub unsafe fn setPerRecordZoneSaveBlock(
&self,
per_record_zone_save_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordZoneID>, *mut CKRecordZone, *mut NSError)>,
>,
);
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(perRecordZoneDeleteBlock)]
pub unsafe fn perRecordZoneDeleteBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordZoneID>, *mut NSError)>;
#[cfg(all(feature = "CKRecordZoneID", feature = "block2"))]
#[method(setPerRecordZoneDeleteBlock:)]
pub unsafe fn setPerRecordZoneDeleteBlock(
&self,
per_record_zone_delete_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordZoneID>, *mut NSError)>,
>,
);
#[cfg(all(
feature = "CKRecordZone",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(modifyRecordZonesCompletionBlock)]
pub unsafe fn modifyRecordZonesCompletionBlock(
&self,
) -> *mut block2::Block<
dyn Fn(*mut NSArray<CKRecordZone>, *mut NSArray<CKRecordZoneID>, *mut NSError),
>;
#[cfg(all(
feature = "CKRecordZone",
feature = "CKRecordZoneID",
feature = "block2"
))]
#[method(setModifyRecordZonesCompletionBlock:)]
pub unsafe fn setModifyRecordZonesCompletionBlock(
&self,
modify_record_zones_completion_block: Option<
&block2::Block<
dyn Fn(*mut NSArray<CKRecordZone>, *mut NSArray<CKRecordZoneID>, *mut NSError),
>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKModifyRecordZonesOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,181 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKRecordSavePolicy(pub NSInteger);
impl CKRecordSavePolicy {
pub const CKRecordSaveIfServerRecordUnchanged: Self = Self(0);
pub const CKRecordSaveChangedKeys: Self = Self(1);
pub const CKRecordSaveAllKeys: Self = Self(2);
}
unsafe impl Encode for CKRecordSavePolicy {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKRecordSavePolicy {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKModifyRecordsOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKModifyRecordsOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKModifyRecordsOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKModifyRecordsOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(all(feature = "CKRecord", feature = "CKRecordID"))]
#[method_id(@__retain_semantics Init initWithRecordsToSave:recordIDsToDelete:)]
pub unsafe fn initWithRecordsToSave_recordIDsToDelete(
this: Allocated<Self>,
records: Option<&NSArray<CKRecord>>,
record_i_ds: Option<&NSArray<CKRecordID>>,
) -> Retained<Self>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other recordsToSave)]
pub unsafe fn recordsToSave(&self) -> Option<Retained<NSArray<CKRecord>>>;
#[cfg(feature = "CKRecord")]
#[method(setRecordsToSave:)]
pub unsafe fn setRecordsToSave(&self, records_to_save: Option<&NSArray<CKRecord>>);
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other recordIDsToDelete)]
pub unsafe fn recordIDsToDelete(&self) -> Option<Retained<NSArray<CKRecordID>>>;
#[cfg(feature = "CKRecordID")]
#[method(setRecordIDsToDelete:)]
pub unsafe fn setRecordIDsToDelete(
&self,
record_i_ds_to_delete: Option<&NSArray<CKRecordID>>,
);
#[method(savePolicy)]
pub unsafe fn savePolicy(&self) -> CKRecordSavePolicy;
#[method(setSavePolicy:)]
pub unsafe fn setSavePolicy(&self, save_policy: CKRecordSavePolicy);
#[method_id(@__retain_semantics Other clientChangeTokenData)]
pub unsafe fn clientChangeTokenData(&self) -> Option<Retained<NSData>>;
#[method(setClientChangeTokenData:)]
pub unsafe fn setClientChangeTokenData(&self, client_change_token_data: Option<&NSData>);
#[method(atomic)]
pub unsafe fn atomic(&self) -> bool;
#[method(setAtomic:)]
pub unsafe fn setAtomic(&self, atomic: bool);
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[method(perRecordProgressBlock)]
pub unsafe fn perRecordProgressBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecord>, c_double)>;
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[method(setPerRecordProgressBlock:)]
pub unsafe fn setPerRecordProgressBlock(
&self,
per_record_progress_block: Option<&block2::Block<dyn Fn(NonNull<CKRecord>, c_double)>>,
);
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[deprecated]
#[method(perRecordCompletionBlock)]
pub unsafe fn perRecordCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecord>, *mut NSError)>;
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[deprecated]
#[method(setPerRecordCompletionBlock:)]
pub unsafe fn setPerRecordCompletionBlock(
&self,
per_record_completion_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecord>, *mut NSError)>,
>,
);
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(perRecordSaveBlock)]
pub unsafe fn perRecordSaveBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordID>, *mut CKRecord, *mut NSError)>;
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(setPerRecordSaveBlock:)]
pub unsafe fn setPerRecordSaveBlock(
&self,
per_record_save_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordID>, *mut CKRecord, *mut NSError)>,
>,
);
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[method(perRecordDeleteBlock)]
pub unsafe fn perRecordDeleteBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordID>, *mut NSError)>;
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[method(setPerRecordDeleteBlock:)]
pub unsafe fn setPerRecordDeleteBlock(
&self,
per_record_delete_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordID>, *mut NSError)>,
>,
);
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(modifyRecordsCompletionBlock)]
pub unsafe fn modifyRecordsCompletionBlock(
&self,
) -> *mut block2::Block<
dyn Fn(*mut NSArray<CKRecord>, *mut NSArray<CKRecordID>, *mut NSError),
>;
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(setModifyRecordsCompletionBlock:)]
pub unsafe fn setModifyRecordsCompletionBlock(
&self,
modify_records_completion_block: Option<
&block2::Block<
dyn Fn(*mut NSArray<CKRecord>, *mut NSArray<CKRecordID>, *mut NSError),
>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKModifyRecordsOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,125 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKModifySubscriptionsOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKModifySubscriptionsOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKModifySubscriptionsOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKModifySubscriptionsOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKSubscription")]
#[method_id(@__retain_semantics Init initWithSubscriptionsToSave:subscriptionIDsToDelete:)]
pub unsafe fn initWithSubscriptionsToSave_subscriptionIDsToDelete(
this: Allocated<Self>,
subscriptions_to_save: Option<&NSArray<CKSubscription>>,
subscription_i_ds_to_delete: Option<&NSArray<CKSubscriptionID>>,
) -> Retained<Self>;
#[cfg(feature = "CKSubscription")]
#[method_id(@__retain_semantics Other subscriptionsToSave)]
pub unsafe fn subscriptionsToSave(&self) -> Option<Retained<NSArray<CKSubscription>>>;
#[cfg(feature = "CKSubscription")]
#[method(setSubscriptionsToSave:)]
pub unsafe fn setSubscriptionsToSave(
&self,
subscriptions_to_save: Option<&NSArray<CKSubscription>>,
);
#[cfg(feature = "CKSubscription")]
#[method_id(@__retain_semantics Other subscriptionIDsToDelete)]
pub unsafe fn subscriptionIDsToDelete(&self)
-> Option<Retained<NSArray<CKSubscriptionID>>>;
#[cfg(feature = "CKSubscription")]
#[method(setSubscriptionIDsToDelete:)]
pub unsafe fn setSubscriptionIDsToDelete(
&self,
subscription_i_ds_to_delete: Option<&NSArray<CKSubscriptionID>>,
);
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(perSubscriptionSaveBlock)]
pub unsafe fn perSubscriptionSaveBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKSubscriptionID>, *mut CKSubscription, *mut NSError)>;
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(setPerSubscriptionSaveBlock:)]
pub unsafe fn setPerSubscriptionSaveBlock(
&self,
per_subscription_save_block: Option<
&block2::Block<
dyn Fn(NonNull<CKSubscriptionID>, *mut CKSubscription, *mut NSError),
>,
>,
);
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(perSubscriptionDeleteBlock)]
pub unsafe fn perSubscriptionDeleteBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKSubscriptionID>, *mut NSError)>;
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(setPerSubscriptionDeleteBlock:)]
pub unsafe fn setPerSubscriptionDeleteBlock(
&self,
per_subscription_delete_block: Option<
&block2::Block<dyn Fn(NonNull<CKSubscriptionID>, *mut NSError)>,
>,
);
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(modifySubscriptionsCompletionBlock)]
pub unsafe fn modifySubscriptionsCompletionBlock(
&self,
) -> *mut block2::Block<
dyn Fn(*mut NSArray<CKSubscription>, *mut NSArray<CKSubscriptionID>, *mut NSError),
>;
#[cfg(all(feature = "CKSubscription", feature = "block2"))]
#[method(setModifySubscriptionsCompletionBlock:)]
pub unsafe fn setModifySubscriptionsCompletionBlock(
&self,
modify_subscriptions_completion_block: Option<
&block2::Block<
dyn Fn(
*mut NSArray<CKSubscription>,
*mut NSArray<CKSubscriptionID>,
*mut NSError,
),
>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKModifySubscriptionsOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,325 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKNotificationID;
unsafe impl ClassType for CKNotificationID {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKNotificationID {}
unsafe impl NSCopying for CKNotificationID {}
unsafe impl NSObjectProtocol for CKNotificationID {}
unsafe impl NSSecureCoding for CKNotificationID {}
extern_methods!(
unsafe impl CKNotificationID {}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKNotificationID {
#[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>;
}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKNotificationType(pub NSInteger);
impl CKNotificationType {
#[doc(alias = "CKNotificationTypeQuery")]
pub const Query: Self = Self(1);
#[doc(alias = "CKNotificationTypeRecordZone")]
pub const RecordZone: Self = Self(2);
#[doc(alias = "CKNotificationTypeReadNotification")]
pub const ReadNotification: Self = Self(3);
#[doc(alias = "CKNotificationTypeDatabase")]
pub const Database: Self = Self(4);
}
unsafe impl Encode for CKNotificationType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKNotificationType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKNotification;
unsafe impl ClassType for CKNotification {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKNotification {}
unsafe impl Sync for CKNotification {}
unsafe impl NSObjectProtocol for CKNotification {}
extern_methods!(
unsafe impl CKNotification {
#[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 Other notificationFromRemoteNotificationDictionary:)]
pub unsafe fn notificationFromRemoteNotificationDictionary(
notification_dictionary: &NSDictionary,
) -> Option<Retained<Self>>;
#[method(notificationType)]
pub unsafe fn notificationType(&self) -> CKNotificationType;
#[method_id(@__retain_semantics Other notificationID)]
pub unsafe fn notificationID(&self) -> Option<Retained<CKNotificationID>>;
#[method_id(@__retain_semantics Other containerIdentifier)]
pub unsafe fn containerIdentifier(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other subscriptionOwnerUserRecordID)]
pub unsafe fn subscriptionOwnerUserRecordID(&self) -> Option<Retained<CKRecordID>>;
#[method(isPruned)]
pub unsafe fn isPruned(&self) -> bool;
#[cfg(feature = "CKSubscription")]
#[method_id(@__retain_semantics Other subscriptionID)]
pub unsafe fn subscriptionID(&self) -> Option<Retained<CKSubscriptionID>>;
}
);
extern_methods!(
/// DeprecatedAPSProperties
unsafe impl CKNotification {
#[deprecated = "Interact with UI elements of a CloudKit-server-generated push message via UserNotifications.framework"]
#[method_id(@__retain_semantics Other alertBody)]
pub unsafe fn alertBody(&self) -> Option<Retained<NSString>>;
#[deprecated = "Interact with UI elements of a CloudKit-server-generated push message via UserNotifications.framework"]
#[method_id(@__retain_semantics Other alertLocalizationKey)]
pub unsafe fn alertLocalizationKey(&self) -> Option<Retained<NSString>>;
#[deprecated = "Interact with UI elements of a CloudKit-server-generated push message via UserNotifications.framework"]
#[method_id(@__retain_semantics Other alertLocalizationArgs)]
pub unsafe fn alertLocalizationArgs(&self) -> Option<Retained<NSArray<NSString>>>;
#[method_id(@__retain_semantics Other title)]
pub unsafe fn title(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other titleLocalizationKey)]
pub unsafe fn titleLocalizationKey(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other titleLocalizationArgs)]
pub unsafe fn titleLocalizationArgs(&self) -> Option<Retained<NSArray<NSString>>>;
#[method_id(@__retain_semantics Other subtitle)]
pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other subtitleLocalizationKey)]
pub unsafe fn subtitleLocalizationKey(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other subtitleLocalizationArgs)]
pub unsafe fn subtitleLocalizationArgs(&self) -> Option<Retained<NSArray<NSString>>>;
#[deprecated = "Interact with UI elements of a CloudKit-server-generated push message via UserNotifications.framework"]
#[method_id(@__retain_semantics Other alertActionLocalizationKey)]
pub unsafe fn alertActionLocalizationKey(&self) -> Option<Retained<NSString>>;
#[deprecated = "Interact with UI elements of a CloudKit-server-generated push message via UserNotifications.framework"]
#[method_id(@__retain_semantics Other alertLaunchImage)]
pub unsafe fn alertLaunchImage(&self) -> Option<Retained<NSString>>;
#[deprecated = "Interact with UI elements of a CloudKit-server-generated push message via UserNotifications.framework"]
#[method_id(@__retain_semantics Other badge)]
pub unsafe fn badge(&self) -> Option<Retained<NSNumber>>;
#[deprecated = "Interact with UI elements of a CloudKit-server-generated push message via UserNotifications.framework"]
#[method_id(@__retain_semantics Other soundName)]
pub unsafe fn soundName(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other category)]
pub unsafe fn category(&self) -> Option<Retained<NSString>>;
}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKQueryNotificationReason(pub NSInteger);
impl CKQueryNotificationReason {
#[doc(alias = "CKQueryNotificationReasonRecordCreated")]
pub const RecordCreated: Self = Self(1);
#[doc(alias = "CKQueryNotificationReasonRecordUpdated")]
pub const RecordUpdated: Self = Self(2);
#[doc(alias = "CKQueryNotificationReasonRecordDeleted")]
pub const RecordDeleted: Self = Self(3);
}
unsafe impl Encode for CKQueryNotificationReason {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKQueryNotificationReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKQueryNotification;
unsafe impl ClassType for CKQueryNotification {
#[inherits(NSObject)]
type Super = CKNotification;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKQueryNotification {}
unsafe impl Sync for CKQueryNotification {}
unsafe impl NSObjectProtocol for CKQueryNotification {}
extern_methods!(
unsafe impl CKQueryNotification {
#[method(queryNotificationReason)]
pub unsafe fn queryNotificationReason(&self) -> CKQueryNotificationReason;
#[method_id(@__retain_semantics Other recordFields)]
pub unsafe fn recordFields(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other recordID)]
pub unsafe fn recordID(&self) -> Option<Retained<CKRecordID>>;
#[cfg(feature = "CKDatabase")]
#[method(databaseScope)]
pub unsafe fn databaseScope(&self) -> CKDatabaseScope;
}
);
extern_methods!(
/// Methods declared on superclass `CKNotification`
unsafe impl CKQueryNotification {
#[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 Other notificationFromRemoteNotificationDictionary:)]
pub unsafe fn notificationFromRemoteNotificationDictionary(
notification_dictionary: &NSDictionary,
) -> Option<Retained<Self>>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKRecordZoneNotification;
unsafe impl ClassType for CKRecordZoneNotification {
#[inherits(NSObject)]
type Super = CKNotification;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKRecordZoneNotification {}
unsafe impl Sync for CKRecordZoneNotification {}
unsafe impl NSObjectProtocol for CKRecordZoneNotification {}
extern_methods!(
unsafe impl CKRecordZoneNotification {
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other recordZoneID)]
pub unsafe fn recordZoneID(&self) -> Option<Retained<CKRecordZoneID>>;
#[cfg(feature = "CKDatabase")]
#[method(databaseScope)]
pub unsafe fn databaseScope(&self) -> CKDatabaseScope;
}
);
extern_methods!(
/// Methods declared on superclass `CKNotification`
unsafe impl CKRecordZoneNotification {
#[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 Other notificationFromRemoteNotificationDictionary:)]
pub unsafe fn notificationFromRemoteNotificationDictionary(
notification_dictionary: &NSDictionary,
) -> Option<Retained<Self>>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKDatabaseNotification;
unsafe impl ClassType for CKDatabaseNotification {
#[inherits(NSObject)]
type Super = CKNotification;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKDatabaseNotification {}
unsafe impl Sync for CKDatabaseNotification {}
unsafe impl NSObjectProtocol for CKDatabaseNotification {}
extern_methods!(
unsafe impl CKDatabaseNotification {
#[cfg(feature = "CKDatabase")]
#[method(databaseScope)]
pub unsafe fn databaseScope(&self) -> CKDatabaseScope;
}
);
extern_methods!(
/// Methods declared on superclass `CKNotification`
unsafe impl CKDatabaseNotification {
#[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 Other notificationFromRemoteNotificationDictionary:)]
pub unsafe fn notificationFromRemoteNotificationDictionary(
notification_dictionary: &NSDictionary,
) -> Option<Retained<Self>>;
}
);

View File

@@ -0,0 +1,188 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type CKOperationID = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKOperation;
unsafe impl ClassType for CKOperation {
#[inherits(NSObject)]
type Super = NSOperation;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CKOperation {}
extern_methods!(
unsafe impl CKOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Other configuration)]
pub unsafe fn configuration(&self) -> Retained<CKOperationConfiguration>;
#[method(setConfiguration:)]
pub unsafe fn setConfiguration(&self, configuration: Option<&CKOperationConfiguration>);
#[cfg(feature = "CKOperationGroup")]
#[method_id(@__retain_semantics Other group)]
pub unsafe fn group(&self) -> Option<Retained<CKOperationGroup>>;
#[cfg(feature = "CKOperationGroup")]
#[method(setGroup:)]
pub unsafe fn setGroup(&self, group: Option<&CKOperationGroup>);
#[method_id(@__retain_semantics Other operationID)]
pub unsafe fn operationID(&self) -> Retained<CKOperationID>;
#[cfg(feature = "block2")]
#[method(longLivedOperationWasPersistedBlock)]
pub unsafe fn longLivedOperationWasPersistedBlock(&self) -> *mut block2::Block<dyn Fn()>;
#[cfg(feature = "block2")]
#[method(setLongLivedOperationWasPersistedBlock:)]
pub unsafe fn setLongLivedOperationWasPersistedBlock(
&self,
long_lived_operation_was_persisted_block: Option<&block2::Block<dyn Fn()>>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKOperationConfiguration;
unsafe impl ClassType for CKOperationConfiguration {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CKOperationConfiguration {}
extern_methods!(
unsafe impl CKOperationConfiguration {
#[cfg(feature = "CKContainer")]
#[method_id(@__retain_semantics Other container)]
pub unsafe fn container(&self) -> Option<Retained<CKContainer>>;
#[cfg(feature = "CKContainer")]
#[method(setContainer:)]
pub unsafe fn setContainer(&self, container: Option<&CKContainer>);
#[method(qualityOfService)]
pub unsafe fn qualityOfService(&self) -> NSQualityOfService;
#[method(setQualityOfService:)]
pub unsafe fn setQualityOfService(&self, quality_of_service: NSQualityOfService);
#[method(allowsCellularAccess)]
pub unsafe fn allowsCellularAccess(&self) -> bool;
#[method(setAllowsCellularAccess:)]
pub unsafe fn setAllowsCellularAccess(&self, allows_cellular_access: bool);
#[method(isLongLived)]
pub unsafe fn isLongLived(&self) -> bool;
#[method(setLongLived:)]
pub unsafe fn setLongLived(&self, long_lived: bool);
#[method(timeoutIntervalForRequest)]
pub unsafe fn timeoutIntervalForRequest(&self) -> NSTimeInterval;
#[method(setTimeoutIntervalForRequest:)]
pub unsafe fn setTimeoutIntervalForRequest(
&self,
timeout_interval_for_request: NSTimeInterval,
);
#[method(timeoutIntervalForResource)]
pub unsafe fn timeoutIntervalForResource(&self) -> NSTimeInterval;
#[method(setTimeoutIntervalForResource:)]
pub unsafe fn setTimeoutIntervalForResource(
&self,
timeout_interval_for_resource: NSTimeInterval,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKOperationConfiguration {
#[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>;
}
);
extern_methods!(
/// CKOperationDeprecated
unsafe impl CKOperation {
#[cfg(feature = "CKContainer")]
#[deprecated = "Use CKOperationConfiguration"]
#[method_id(@__retain_semantics Other container)]
pub unsafe fn container(&self) -> Option<Retained<CKContainer>>;
#[cfg(feature = "CKContainer")]
#[deprecated = "Use CKOperationConfiguration"]
#[method(setContainer:)]
pub unsafe fn setContainer(&self, container: Option<&CKContainer>);
#[deprecated = "Use CKOperationConfiguration"]
#[method(allowsCellularAccess)]
pub unsafe fn allowsCellularAccess(&self) -> bool;
#[deprecated = "Use CKOperationConfiguration"]
#[method(setAllowsCellularAccess:)]
pub unsafe fn setAllowsCellularAccess(&self, allows_cellular_access: bool);
#[deprecated = "Use CKOperationConfiguration"]
#[method(isLongLived)]
pub unsafe fn isLongLived(&self) -> bool;
#[deprecated = "Use CKOperationConfiguration"]
#[method(setLongLived:)]
pub unsafe fn setLongLived(&self, long_lived: bool);
#[deprecated = "Use CKOperationConfiguration"]
#[method(timeoutIntervalForRequest)]
pub unsafe fn timeoutIntervalForRequest(&self) -> NSTimeInterval;
#[deprecated = "Use CKOperationConfiguration"]
#[method(setTimeoutIntervalForRequest:)]
pub unsafe fn setTimeoutIntervalForRequest(
&self,
timeout_interval_for_request: NSTimeInterval,
);
#[deprecated = "Use CKOperationConfiguration"]
#[method(timeoutIntervalForResource)]
pub unsafe fn timeoutIntervalForResource(&self) -> NSTimeInterval;
#[deprecated = "Use CKOperationConfiguration"]
#[method(setTimeoutIntervalForResource:)]
pub unsafe fn setTimeoutIntervalForResource(
&self,
timeout_interval_for_resource: NSTimeInterval,
);
}
);

View File

@@ -0,0 +1,112 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKOperationGroupTransferSize(pub NSInteger);
impl CKOperationGroupTransferSize {
#[doc(alias = "CKOperationGroupTransferSizeUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "CKOperationGroupTransferSizeKilobytes")]
pub const Kilobytes: Self = Self(1);
#[doc(alias = "CKOperationGroupTransferSizeMegabytes")]
pub const Megabytes: Self = Self(2);
#[doc(alias = "CKOperationGroupTransferSizeTensOfMegabytes")]
pub const TensOfMegabytes: Self = Self(3);
#[doc(alias = "CKOperationGroupTransferSizeHundredsOfMegabytes")]
pub const HundredsOfMegabytes: Self = Self(4);
#[doc(alias = "CKOperationGroupTransferSizeGigabytes")]
pub const Gigabytes: Self = Self(5);
#[doc(alias = "CKOperationGroupTransferSizeTensOfGigabytes")]
pub const TensOfGigabytes: Self = Self(6);
#[doc(alias = "CKOperationGroupTransferSizeHundredsOfGigabytes")]
pub const HundredsOfGigabytes: Self = Self(7);
}
unsafe impl Encode for CKOperationGroupTransferSize {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKOperationGroupTransferSize {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKOperationGroup;
unsafe impl ClassType for CKOperationGroup {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKOperationGroup {}
unsafe impl NSObjectProtocol for CKOperationGroup {}
unsafe impl NSSecureCoding for CKOperationGroup {}
extern_methods!(
unsafe impl CKOperationGroup {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
#[method_id(@__retain_semantics Other operationGroupID)]
pub unsafe fn operationGroupID(&self) -> Retained<NSString>;
#[cfg(feature = "CKOperation")]
#[method_id(@__retain_semantics Other defaultConfiguration)]
pub unsafe fn defaultConfiguration(&self) -> Retained<CKOperationConfiguration>;
#[cfg(feature = "CKOperation")]
#[method(setDefaultConfiguration:)]
pub unsafe fn setDefaultConfiguration(
&self,
default_configuration: Option<&CKOperationConfiguration>,
);
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Option<Retained<NSString>>;
#[method(setName:)]
pub unsafe fn setName(&self, name: Option<&NSString>);
#[method(quantity)]
pub unsafe fn quantity(&self) -> NSUInteger;
#[method(setQuantity:)]
pub unsafe fn setQuantity(&self, quantity: NSUInteger);
#[method(expectedSendSize)]
pub unsafe fn expectedSendSize(&self) -> CKOperationGroupTransferSize;
#[method(setExpectedSendSize:)]
pub unsafe fn setExpectedSendSize(&self, expected_send_size: CKOperationGroupTransferSize);
#[method(expectedReceiveSize)]
pub unsafe fn expectedReceiveSize(&self) -> CKOperationGroupTransferSize;
#[method(setExpectedReceiveSize:)]
pub unsafe fn setExpectedReceiveSize(
&self,
expected_receive_size: CKOperationGroupTransferSize,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKOperationGroup {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,61 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKQuery;
unsafe impl ClassType for CKQuery {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKQuery {}
unsafe impl NSCopying for CKQuery {}
unsafe impl NSObjectProtocol for CKQuery {}
unsafe impl NSSecureCoding for CKQuery {}
extern_methods!(
unsafe impl CKQuery {
#[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 initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Init initWithRecordType:predicate:)]
pub unsafe fn initWithRecordType_predicate(
this: Allocated<Self>,
record_type: &CKRecordType,
predicate: &NSPredicate,
) -> Retained<Self>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other recordType)]
pub unsafe fn recordType(&self) -> Retained<CKRecordType>;
#[method_id(@__retain_semantics Other predicate)]
pub unsafe fn predicate(&self) -> Retained<NSPredicate>;
#[method_id(@__retain_semantics Other sortDescriptors)]
pub unsafe fn sortDescriptors(&self) -> Option<Retained<NSArray<NSSortDescriptor>>>;
#[method(setSortDescriptors:)]
pub unsafe fn setSortDescriptors(
&self,
sort_descriptors: Option<&NSArray<NSSortDescriptor>>,
);
}
);

View File

@@ -0,0 +1,160 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKQueryCursor;
unsafe impl ClassType for CKQueryCursor {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKQueryCursor {}
unsafe impl NSCopying for CKQueryCursor {}
unsafe impl NSObjectProtocol for CKQueryCursor {}
unsafe impl NSSecureCoding for CKQueryCursor {}
extern_methods!(
unsafe impl CKQueryCursor {
#[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>;
}
);
extern "C" {
pub static CKQueryOperationMaximumResults: NSUInteger;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub struct CKQueryOperation;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl ClassType for CKQueryOperation {
#[inherits(CKOperation, NSOperation, NSObject)]
type Super = CKDatabaseOperation;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl NSObjectProtocol for CKQueryOperation {}
extern_methods!(
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKQueryOperation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "CKQuery")]
#[method_id(@__retain_semantics Init initWithQuery:)]
pub unsafe fn initWithQuery(this: Allocated<Self>, query: &CKQuery) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCursor:)]
pub unsafe fn initWithCursor(
this: Allocated<Self>,
cursor: &CKQueryCursor,
) -> Retained<Self>;
#[cfg(feature = "CKQuery")]
#[method_id(@__retain_semantics Other query)]
pub unsafe fn query(&self) -> Option<Retained<CKQuery>>;
#[cfg(feature = "CKQuery")]
#[method(setQuery:)]
pub unsafe fn setQuery(&self, query: Option<&CKQuery>);
#[method_id(@__retain_semantics Other cursor)]
pub unsafe fn cursor(&self) -> Option<Retained<CKQueryCursor>>;
#[method(setCursor:)]
pub unsafe fn setCursor(&self, cursor: Option<&CKQueryCursor>);
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneID)]
pub unsafe fn zoneID(&self) -> Option<Retained<CKRecordZoneID>>;
#[cfg(feature = "CKRecordZoneID")]
#[method(setZoneID:)]
pub unsafe fn setZoneID(&self, zone_id: Option<&CKRecordZoneID>);
#[method(resultsLimit)]
pub unsafe fn resultsLimit(&self) -> NSUInteger;
#[method(setResultsLimit:)]
pub unsafe fn setResultsLimit(&self, results_limit: NSUInteger);
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other desiredKeys)]
pub unsafe fn desiredKeys(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[method(setDesiredKeys:)]
pub unsafe fn setDesiredKeys(&self, desired_keys: Option<&NSArray<CKRecordFieldKey>>);
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[deprecated = "Use recordMatchedBlock instead, which surfaces per-record errors"]
#[method(recordFetchedBlock)]
pub unsafe fn recordFetchedBlock(&self) -> *mut block2::Block<dyn Fn(NonNull<CKRecord>)>;
#[cfg(all(feature = "CKRecord", feature = "block2"))]
#[deprecated = "Use recordMatchedBlock instead, which surfaces per-record errors"]
#[method(setRecordFetchedBlock:)]
pub unsafe fn setRecordFetchedBlock(
&self,
record_fetched_block: Option<&block2::Block<dyn Fn(NonNull<CKRecord>)>>,
);
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(recordMatchedBlock)]
pub unsafe fn recordMatchedBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordID>, *mut CKRecord, *mut NSError)>;
#[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
#[method(setRecordMatchedBlock:)]
pub unsafe fn setRecordMatchedBlock(
&self,
record_matched_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordID>, *mut CKRecord, *mut NSError)>,
>,
);
#[cfg(feature = "block2")]
#[method(queryCompletionBlock)]
pub unsafe fn queryCompletionBlock(
&self,
) -> *mut block2::Block<dyn Fn(*mut CKQueryCursor, *mut NSError)>;
#[cfg(feature = "block2")]
#[method(setQueryCompletionBlock:)]
pub unsafe fn setQueryCompletionBlock(
&self,
query_completion_block: Option<
&block2::Block<dyn Fn(*mut CKQueryCursor, *mut NSError)>,
>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
unsafe impl CKQueryOperation {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,262 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;
use crate::*;
pub type CKRecordType = NSString;
pub type CKRecordFieldKey = NSString;
extern "C" {
pub static CKRecordTypeUserRecord: &'static CKRecordType;
}
extern "C" {
pub static CKRecordRecordIDKey: &'static CKRecordFieldKey;
}
extern "C" {
pub static CKRecordCreatorUserRecordIDKey: &'static CKRecordFieldKey;
}
extern "C" {
pub static CKRecordCreationDateKey: &'static CKRecordFieldKey;
}
extern "C" {
pub static CKRecordLastModifiedUserRecordIDKey: &'static CKRecordFieldKey;
}
extern "C" {
pub static CKRecordModificationDateKey: &'static CKRecordFieldKey;
}
extern "C" {
pub static CKRecordParentKey: &'static CKRecordFieldKey;
}
extern "C" {
pub static CKRecordShareKey: &'static CKRecordFieldKey;
}
extern_protocol!(
pub unsafe trait CKRecordValue: NSObjectProtocol {}
unsafe impl ProtocolType for dyn CKRecordValue {}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKRecord;
unsafe impl ClassType for CKRecord {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKRecord {}
unsafe impl NSCopying for CKRecord {}
unsafe impl NSObjectProtocol for CKRecord {}
unsafe impl NSSecureCoding for CKRecord {}
extern_methods!(
unsafe impl CKRecord {
#[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>;
#[method_id(@__retain_semantics Other recordType)]
pub unsafe fn recordType(&self) -> Retained<CKRecordType>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other recordID)]
pub unsafe fn recordID(&self) -> Retained<CKRecordID>;
#[method_id(@__retain_semantics Other recordChangeTag)]
pub unsafe fn recordChangeTag(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other creatorUserRecordID)]
pub unsafe fn creatorUserRecordID(&self) -> Option<Retained<CKRecordID>>;
#[method_id(@__retain_semantics Other creationDate)]
pub unsafe fn creationDate(&self) -> Option<Retained<NSDate>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other lastModifiedUserRecordID)]
pub unsafe fn lastModifiedUserRecordID(&self) -> Option<Retained<CKRecordID>>;
#[method_id(@__retain_semantics Other modificationDate)]
pub unsafe fn modificationDate(&self) -> Option<Retained<NSDate>>;
#[method_id(@__retain_semantics Other objectForKey:)]
pub unsafe fn objectForKey(
&self,
key: &CKRecordFieldKey,
) -> Option<Retained<ProtocolObject<dyn CKRecordValue>>>;
#[method(setObject:forKey:)]
pub unsafe fn setObject_forKey(
&self,
object: Option<&ProtocolObject<dyn CKRecordValue>>,
key: &CKRecordFieldKey,
);
#[method_id(@__retain_semantics Other allKeys)]
pub unsafe fn allKeys(&self) -> Retained<NSArray<CKRecordFieldKey>>;
#[method_id(@__retain_semantics Other allTokens)]
pub unsafe fn allTokens(&self) -> Retained<NSArray<NSString>>;
#[method_id(@__retain_semantics Other objectForKeyedSubscript:)]
pub unsafe fn objectForKeyedSubscript(
&self,
key: &CKRecordFieldKey,
) -> Option<Retained<ProtocolObject<dyn CKRecordValue>>>;
#[method(setObject:forKeyedSubscript:)]
pub unsafe fn setObject_forKeyedSubscript(
&self,
object: Option<&ProtocolObject<dyn CKRecordValue>>,
key: &CKRecordFieldKey,
);
#[method_id(@__retain_semantics Other changedKeys)]
pub unsafe fn changedKeys(&self) -> Retained<NSArray<CKRecordFieldKey>>;
#[method(encodeSystemFieldsWithCoder:)]
pub unsafe fn encodeSystemFieldsWithCoder(&self, coder: &NSCoder);
#[cfg(feature = "CKReference")]
#[method_id(@__retain_semantics Other share)]
pub unsafe fn share(&self) -> Option<Retained<CKReference>>;
#[cfg(feature = "CKReference")]
#[method_id(@__retain_semantics Other parent)]
pub unsafe fn parent(&self) -> Option<Retained<CKReference>>;
#[cfg(feature = "CKReference")]
#[method(setParent:)]
pub unsafe fn setParent(&self, parent: Option<&CKReference>);
#[method(setParentReferenceFromRecord:)]
pub unsafe fn setParentReferenceFromRecord(&self, parent_record: Option<&CKRecord>);
#[cfg(feature = "CKRecordID")]
#[method(setParentReferenceFromRecordID:)]
pub unsafe fn setParentReferenceFromRecordID(&self, parent_record_id: Option<&CKRecordID>);
}
);
unsafe impl CKRecordValue for NSString {}
unsafe impl CKRecordValue for NSNumber {}
unsafe impl CKRecordValue for NSArray {}
unsafe impl CKRecordValue for NSDate {}
unsafe impl CKRecordValue for NSData {}
extern_methods!(
/// CKRecordValue
#[cfg(feature = "CKReference")]
unsafe impl CKReference {}
);
#[cfg(feature = "CKReference")]
unsafe impl CKRecordValue for CKReference {}
extern_methods!(
/// CKRecordValue
#[cfg(feature = "CKAsset")]
unsafe impl CKAsset {}
);
#[cfg(feature = "CKAsset")]
unsafe impl CKRecordValue for CKAsset {}
#[cfg(feature = "objc2-core-location")]
unsafe impl CKRecordValue for CLLocation {}
extern_protocol!(
pub unsafe trait CKRecordKeyValueSetting: NSObjectProtocol {
#[method_id(@__retain_semantics Other objectForKey:)]
unsafe fn objectForKey(
&self,
key: &CKRecordFieldKey,
) -> Option<Retained<ProtocolObject<dyn CKRecordValue>>>;
#[method(setObject:forKey:)]
unsafe fn setObject_forKey(
&self,
object: Option<&ProtocolObject<dyn CKRecordValue>>,
key: &CKRecordFieldKey,
);
#[method_id(@__retain_semantics Other objectForKeyedSubscript:)]
unsafe fn objectForKeyedSubscript(
&self,
key: &CKRecordFieldKey,
) -> Option<Retained<ProtocolObject<dyn CKRecordValue>>>;
#[method(setObject:forKeyedSubscript:)]
unsafe fn setObject_forKeyedSubscript(
&self,
object: Option<&ProtocolObject<dyn CKRecordValue>>,
key: &CKRecordFieldKey,
);
#[method_id(@__retain_semantics Other allKeys)]
unsafe fn allKeys(&self) -> Retained<NSArray<CKRecordFieldKey>>;
#[method_id(@__retain_semantics Other changedKeys)]
unsafe fn changedKeys(&self) -> Retained<NSArray<CKRecordFieldKey>>;
}
unsafe impl ProtocolType for dyn CKRecordKeyValueSetting {}
);
extern_methods!(
/// CKRecordKeyValueSettingConformance
unsafe impl CKRecord {
#[method_id(@__retain_semantics Other encryptedValues)]
pub unsafe fn encryptedValues(
&self,
) -> Retained<ProtocolObject<dyn CKRecordKeyValueSetting>>;
}
);
unsafe impl CKRecordKeyValueSetting for CKRecord {}

View File

@@ -0,0 +1,59 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKRecordID;
unsafe impl ClassType for CKRecordID {
type Super = NSObject;
type Mutability = Immutable;
}
);
unsafe impl Send for CKRecordID {}
unsafe impl Sync for CKRecordID {}
unsafe impl NSCoding for CKRecordID {}
unsafe impl NSCopying for CKRecordID {}
unsafe impl NSObjectProtocol for CKRecordID {}
unsafe impl NSSecureCoding for CKRecordID {}
extern_methods!(
unsafe impl CKRecordID {
#[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 initWithRecordName:)]
pub unsafe fn initWithRecordName(
this: Allocated<Self>,
record_name: &NSString,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithRecordName:zoneID:)]
pub unsafe fn initWithRecordName_zoneID(
this: Allocated<Self>,
record_name: &NSString,
zone_id: &CKRecordZoneID,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other recordName)]
pub unsafe fn recordName(&self) -> Retained<NSString>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneID)]
pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
}
);

View File

@@ -0,0 +1,86 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKRecordZoneCapabilities(pub NSUInteger);
bitflags::bitflags! {
impl CKRecordZoneCapabilities: NSUInteger {
const CKRecordZoneCapabilityFetchChanges = 1<<0;
const CKRecordZoneCapabilityAtomic = 1<<1;
const CKRecordZoneCapabilitySharing = 1<<2;
const CKRecordZoneCapabilityZoneWideSharing = 1<<3;
}
}
unsafe impl Encode for CKRecordZoneCapabilities {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for CKRecordZoneCapabilities {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static CKRecordZoneDefaultName: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKRecordZone;
unsafe impl ClassType for CKRecordZone {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKRecordZone {}
unsafe impl NSCopying for CKRecordZone {}
unsafe impl NSObjectProtocol for CKRecordZone {}
unsafe impl NSSecureCoding for CKRecordZone {}
extern_methods!(
unsafe impl CKRecordZone {
#[method_id(@__retain_semantics Other defaultRecordZone)]
pub unsafe fn defaultRecordZone() -> Retained<CKRecordZone>;
#[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 initWithZoneName:)]
pub unsafe fn initWithZoneName(
this: Allocated<Self>,
zone_name: &NSString,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithZoneID:)]
pub unsafe fn initWithZoneID(
this: Allocated<Self>,
zone_id: &CKRecordZoneID,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneID)]
pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
#[method(capabilities)]
pub unsafe fn capabilities(&self) -> CKRecordZoneCapabilities;
#[cfg(feature = "CKReference")]
#[method_id(@__retain_semantics Other share)]
pub unsafe fn share(&self) -> Option<Retained<CKReference>>;
}
);

View File

@@ -0,0 +1,47 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKRecordZoneID;
unsafe impl ClassType for CKRecordZoneID {
type Super = NSObject;
type Mutability = Immutable;
}
);
unsafe impl NSCoding for CKRecordZoneID {}
unsafe impl NSCopying for CKRecordZoneID {}
unsafe impl NSObjectProtocol for CKRecordZoneID {}
unsafe impl NSSecureCoding for CKRecordZoneID {}
extern_methods!(
unsafe impl CKRecordZoneID {
#[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 initWithZoneName:ownerName:)]
pub unsafe fn initWithZoneName_ownerName(
this: Allocated<Self>,
zone_name: &NSString,
owner_name: &NSString,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other zoneName)]
pub unsafe fn zoneName(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other ownerName)]
pub unsafe fn ownerName(&self) -> Retained<NSString>;
}
);

View File

@@ -0,0 +1,80 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKReferenceAction(pub NSUInteger);
impl CKReferenceAction {
#[doc(alias = "CKReferenceActionNone")]
pub const None: Self = Self(0);
#[doc(alias = "CKReferenceActionDeleteSelf")]
pub const DeleteSelf: Self = Self(1);
}
unsafe impl Encode for CKReferenceAction {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for CKReferenceAction {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKReference;
unsafe impl ClassType for CKReference {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKReference {}
unsafe impl Sync for CKReference {}
unsafe impl NSCoding for CKReference {}
unsafe impl NSCopying for CKReference {}
unsafe impl NSObjectProtocol for CKReference {}
unsafe impl NSSecureCoding for CKReference {}
extern_methods!(
unsafe impl CKReference {
#[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>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Init initWithRecordID:action:)]
pub unsafe fn initWithRecordID_action(
this: Allocated<Self>,
record_id: &CKRecordID,
action: CKReferenceAction,
) -> Retained<Self>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Init initWithRecord:action:)]
pub unsafe fn initWithRecord_action(
this: Allocated<Self>,
record: &CKRecord,
action: CKReferenceAction,
) -> Retained<Self>;
#[method(referenceAction)]
pub unsafe fn referenceAction(&self) -> CKReferenceAction;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other recordID)]
pub unsafe fn recordID(&self) -> Retained<CKRecordID>;
}
);

View File

@@ -0,0 +1,38 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKServerChangeToken;
unsafe impl ClassType for CKServerChangeToken {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKServerChangeToken {}
unsafe impl Sync for CKServerChangeToken {}
unsafe impl NSCoding for CKServerChangeToken {}
unsafe impl NSCopying for CKServerChangeToken {}
unsafe impl NSObjectProtocol for CKServerChangeToken {}
unsafe impl NSSecureCoding for CKServerChangeToken {}
extern_methods!(
unsafe impl CKServerChangeToken {
#[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>;
}
);

View File

@@ -0,0 +1,143 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
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>;
}
);

View File

@@ -0,0 +1,75 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKShareMetadata;
unsafe impl ClassType for CKShareMetadata {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKShareMetadata {}
unsafe impl NSCopying for CKShareMetadata {}
unsafe impl NSObjectProtocol for CKShareMetadata {}
unsafe impl NSSecureCoding for CKShareMetadata {}
extern_methods!(
unsafe impl CKShareMetadata {
#[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 Other containerIdentifier)]
pub unsafe fn containerIdentifier(&self) -> Retained<NSString>;
#[cfg(all(feature = "CKRecord", feature = "CKShare"))]
#[method_id(@__retain_semantics Other share)]
pub unsafe fn share(&self) -> Retained<CKShare>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other hierarchicalRootRecordID)]
pub unsafe fn hierarchicalRootRecordID(&self) -> Option<Retained<CKRecordID>>;
#[cfg(feature = "CKShareParticipant")]
#[method(participantRole)]
pub unsafe fn participantRole(&self) -> CKShareParticipantRole;
#[cfg(feature = "CKShareParticipant")]
#[method(participantStatus)]
pub unsafe fn participantStatus(&self) -> CKShareParticipantAcceptanceStatus;
#[cfg(feature = "CKShareParticipant")]
#[method(participantPermission)]
pub unsafe fn participantPermission(&self) -> CKShareParticipantPermission;
#[cfg(feature = "CKUserIdentity")]
#[method_id(@__retain_semantics Other ownerIdentity)]
pub unsafe fn ownerIdentity(&self) -> Retained<CKUserIdentity>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other rootRecord)]
pub unsafe fn rootRecord(&self) -> Option<Retained<CKRecord>>;
#[cfg(feature = "CKShareParticipant")]
#[deprecated]
#[method(participantType)]
pub unsafe fn participantType(&self) -> CKShareParticipantType;
#[cfg(feature = "CKRecordID")]
#[deprecated]
#[method_id(@__retain_semantics Other rootRecordID)]
pub unsafe fn rootRecordID(&self) -> Retained<CKRecordID>;
}
);

View File

@@ -0,0 +1,158 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKShareParticipantAcceptanceStatus(pub NSInteger);
impl CKShareParticipantAcceptanceStatus {
#[doc(alias = "CKShareParticipantAcceptanceStatusUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "CKShareParticipantAcceptanceStatusPending")]
pub const Pending: Self = Self(1);
#[doc(alias = "CKShareParticipantAcceptanceStatusAccepted")]
pub const Accepted: Self = Self(2);
#[doc(alias = "CKShareParticipantAcceptanceStatusRemoved")]
pub const Removed: Self = Self(3);
}
unsafe impl Encode for CKShareParticipantAcceptanceStatus {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKShareParticipantAcceptanceStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKShareParticipantPermission(pub NSInteger);
impl CKShareParticipantPermission {
#[doc(alias = "CKShareParticipantPermissionUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "CKShareParticipantPermissionNone")]
pub const None: Self = Self(1);
#[doc(alias = "CKShareParticipantPermissionReadOnly")]
pub const ReadOnly: Self = Self(2);
#[doc(alias = "CKShareParticipantPermissionReadWrite")]
pub const ReadWrite: Self = Self(3);
}
unsafe impl Encode for CKShareParticipantPermission {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKShareParticipantPermission {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKShareParticipantRole(pub NSInteger);
impl CKShareParticipantRole {
#[doc(alias = "CKShareParticipantRoleUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "CKShareParticipantRoleOwner")]
pub const Owner: Self = Self(1);
#[doc(alias = "CKShareParticipantRolePrivateUser")]
pub const PrivateUser: Self = Self(3);
#[doc(alias = "CKShareParticipantRolePublicUser")]
pub const PublicUser: Self = Self(4);
}
unsafe impl Encode for CKShareParticipantRole {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKShareParticipantRole {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[deprecated]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKShareParticipantType(pub NSInteger);
impl CKShareParticipantType {
#[deprecated]
#[doc(alias = "CKShareParticipantTypeUnknown")]
pub const Unknown: Self = Self(0);
#[deprecated]
#[doc(alias = "CKShareParticipantTypeOwner")]
pub const Owner: Self = Self(1);
#[deprecated]
#[doc(alias = "CKShareParticipantTypePrivateUser")]
pub const PrivateUser: Self = Self(3);
#[deprecated]
#[doc(alias = "CKShareParticipantTypePublicUser")]
pub const PublicUser: Self = Self(4);
}
unsafe impl Encode for CKShareParticipantType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKShareParticipantType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKShareParticipant;
unsafe impl ClassType for CKShareParticipant {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKShareParticipant {}
unsafe impl NSCopying for CKShareParticipant {}
unsafe impl NSObjectProtocol for CKShareParticipant {}
unsafe impl NSSecureCoding for CKShareParticipant {}
extern_methods!(
unsafe impl 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>;
#[cfg(feature = "CKUserIdentity")]
#[method_id(@__retain_semantics Other userIdentity)]
pub unsafe fn userIdentity(&self) -> Retained<CKUserIdentity>;
#[method(role)]
pub unsafe fn role(&self) -> CKShareParticipantRole;
#[method(setRole:)]
pub unsafe fn setRole(&self, role: CKShareParticipantRole);
#[deprecated]
#[method(type)]
pub unsafe fn r#type(&self) -> CKShareParticipantType;
#[deprecated]
#[method(setType:)]
pub unsafe fn setType(&self, r#type: CKShareParticipantType);
#[method(acceptanceStatus)]
pub unsafe fn acceptanceStatus(&self) -> CKShareParticipantAcceptanceStatus;
#[method(permission)]
pub unsafe fn permission(&self) -> CKShareParticipantPermission;
#[method(setPermission:)]
pub unsafe fn setPermission(&self, permission: CKShareParticipantPermission);
}
);

View File

@@ -0,0 +1,447 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKSubscriptionType(pub NSInteger);
impl CKSubscriptionType {
#[doc(alias = "CKSubscriptionTypeQuery")]
pub const Query: Self = Self(1);
#[doc(alias = "CKSubscriptionTypeRecordZone")]
pub const RecordZone: Self = Self(2);
#[doc(alias = "CKSubscriptionTypeDatabase")]
pub const Database: Self = Self(3);
}
unsafe impl Encode for CKSubscriptionType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKSubscriptionType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type CKSubscriptionID = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSubscription;
unsafe impl ClassType for CKSubscription {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKSubscription {}
unsafe impl NSCopying for CKSubscription {}
unsafe impl NSObjectProtocol for CKSubscription {}
unsafe impl NSSecureCoding for CKSubscription {}
extern_methods!(
unsafe impl CKSubscription {
#[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 Other subscriptionID)]
pub unsafe fn subscriptionID(&self) -> Retained<CKSubscriptionID>;
#[method(subscriptionType)]
pub unsafe fn subscriptionType(&self) -> CKSubscriptionType;
#[method_id(@__retain_semantics Other notificationInfo)]
pub unsafe fn notificationInfo(&self) -> Option<Retained<CKNotificationInfo>>;
#[method(setNotificationInfo:)]
pub unsafe fn setNotificationInfo(&self, notification_info: Option<&CKNotificationInfo>);
}
);
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKQuerySubscriptionOptions(pub NSUInteger);
bitflags::bitflags! {
impl CKQuerySubscriptionOptions: NSUInteger {
#[doc(alias = "CKQuerySubscriptionOptionsFiresOnRecordCreation")]
const FiresOnRecordCreation = 1<<0;
#[doc(alias = "CKQuerySubscriptionOptionsFiresOnRecordUpdate")]
const FiresOnRecordUpdate = 1<<1;
#[doc(alias = "CKQuerySubscriptionOptionsFiresOnRecordDeletion")]
const FiresOnRecordDeletion = 1<<2;
#[doc(alias = "CKQuerySubscriptionOptionsFiresOnce")]
const FiresOnce = 1<<3;
}
}
unsafe impl Encode for CKQuerySubscriptionOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for CKQuerySubscriptionOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKQuerySubscription;
unsafe impl ClassType for CKQuerySubscription {
#[inherits(NSObject)]
type Super = CKSubscription;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKQuerySubscription {}
unsafe impl NSCopying for CKQuerySubscription {}
unsafe impl NSObjectProtocol for CKQuerySubscription {}
unsafe impl NSSecureCoding for CKQuerySubscription {}
extern_methods!(
unsafe impl CKQuerySubscription {
#[cfg(feature = "CKRecord")]
#[deprecated]
#[method_id(@__retain_semantics Init initWithRecordType:predicate:options:)]
pub unsafe fn initWithRecordType_predicate_options(
this: Allocated<Self>,
record_type: &CKRecordType,
predicate: &NSPredicate,
query_subscription_options: CKQuerySubscriptionOptions,
) -> Retained<Self>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Init initWithRecordType:predicate:subscriptionID:options:)]
pub unsafe fn initWithRecordType_predicate_subscriptionID_options(
this: Allocated<Self>,
record_type: &CKRecordType,
predicate: &NSPredicate,
subscription_id: &CKSubscriptionID,
query_subscription_options: CKQuerySubscriptionOptions,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other recordType)]
pub unsafe fn recordType(&self) -> Retained<CKRecordType>;
#[method_id(@__retain_semantics Other predicate)]
pub unsafe fn predicate(&self) -> Retained<NSPredicate>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneID)]
pub unsafe fn zoneID(&self) -> Option<Retained<CKRecordZoneID>>;
#[cfg(feature = "CKRecordZoneID")]
#[method(setZoneID:)]
pub unsafe fn setZoneID(&self, zone_id: Option<&CKRecordZoneID>);
#[method(querySubscriptionOptions)]
pub unsafe fn querySubscriptionOptions(&self) -> CKQuerySubscriptionOptions;
}
);
extern_methods!(
/// Methods declared on superclass `CKSubscription`
unsafe impl CKQuerySubscription {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKRecordZoneSubscription;
unsafe impl ClassType for CKRecordZoneSubscription {
#[inherits(NSObject)]
type Super = CKSubscription;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKRecordZoneSubscription {}
unsafe impl NSCopying for CKRecordZoneSubscription {}
unsafe impl NSObjectProtocol for CKRecordZoneSubscription {}
unsafe impl NSSecureCoding for CKRecordZoneSubscription {}
extern_methods!(
unsafe impl CKRecordZoneSubscription {
#[cfg(feature = "CKRecordZoneID")]
#[deprecated]
#[method_id(@__retain_semantics Init initWithZoneID:)]
pub unsafe fn initWithZoneID(
this: Allocated<Self>,
zone_id: &CKRecordZoneID,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithZoneID:subscriptionID:)]
pub unsafe fn initWithZoneID_subscriptionID(
this: Allocated<Self>,
zone_id: &CKRecordZoneID,
subscription_id: &CKSubscriptionID,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneID)]
pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other recordType)]
pub unsafe fn recordType(&self) -> Option<Retained<CKRecordType>>;
#[cfg(feature = "CKRecord")]
#[method(setRecordType:)]
pub unsafe fn setRecordType(&self, record_type: Option<&CKRecordType>);
}
);
extern_methods!(
/// Methods declared on superclass `CKSubscription`
unsafe impl CKRecordZoneSubscription {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKDatabaseSubscription;
unsafe impl ClassType for CKDatabaseSubscription {
#[inherits(NSObject)]
type Super = CKSubscription;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKDatabaseSubscription {}
unsafe impl NSCopying for CKDatabaseSubscription {}
unsafe impl NSObjectProtocol for CKDatabaseSubscription {}
unsafe impl NSSecureCoding for CKDatabaseSubscription {}
extern_methods!(
unsafe impl CKDatabaseSubscription {
#[deprecated]
#[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 initWithSubscriptionID:)]
pub unsafe fn initWithSubscriptionID(
this: Allocated<Self>,
subscription_id: &CKSubscriptionID,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other recordType)]
pub unsafe fn recordType(&self) -> Option<Retained<CKRecordType>>;
#[cfg(feature = "CKRecord")]
#[method(setRecordType:)]
pub unsafe fn setRecordType(&self, record_type: Option<&CKRecordType>);
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKNotificationInfo;
unsafe impl ClassType for CKNotificationInfo {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKNotificationInfo {}
unsafe impl NSCopying for CKNotificationInfo {}
unsafe impl NSObjectProtocol for CKNotificationInfo {}
unsafe impl NSSecureCoding for CKNotificationInfo {}
extern_methods!(
unsafe impl CKNotificationInfo {
#[method_id(@__retain_semantics Other alertBody)]
pub unsafe fn alertBody(&self) -> Option<Retained<NSString>>;
#[method(setAlertBody:)]
pub unsafe fn setAlertBody(&self, alert_body: Option<&NSString>);
#[method_id(@__retain_semantics Other alertLocalizationKey)]
pub unsafe fn alertLocalizationKey(&self) -> Option<Retained<NSString>>;
#[method(setAlertLocalizationKey:)]
pub unsafe fn setAlertLocalizationKey(&self, alert_localization_key: Option<&NSString>);
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other alertLocalizationArgs)]
pub unsafe fn alertLocalizationArgs(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[method(setAlertLocalizationArgs:)]
pub unsafe fn setAlertLocalizationArgs(
&self,
alert_localization_args: Option<&NSArray<CKRecordFieldKey>>,
);
#[method_id(@__retain_semantics Other title)]
pub unsafe fn title(&self) -> Option<Retained<NSString>>;
#[method(setTitle:)]
pub unsafe fn setTitle(&self, title: Option<&NSString>);
#[method_id(@__retain_semantics Other titleLocalizationKey)]
pub unsafe fn titleLocalizationKey(&self) -> Option<Retained<NSString>>;
#[method(setTitleLocalizationKey:)]
pub unsafe fn setTitleLocalizationKey(&self, title_localization_key: Option<&NSString>);
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other titleLocalizationArgs)]
pub unsafe fn titleLocalizationArgs(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[method(setTitleLocalizationArgs:)]
pub unsafe fn setTitleLocalizationArgs(
&self,
title_localization_args: Option<&NSArray<CKRecordFieldKey>>,
);
#[method_id(@__retain_semantics Other subtitle)]
pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
#[method(setSubtitle:)]
pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
#[method_id(@__retain_semantics Other subtitleLocalizationKey)]
pub unsafe fn subtitleLocalizationKey(&self) -> Option<Retained<NSString>>;
#[method(setSubtitleLocalizationKey:)]
pub unsafe fn setSubtitleLocalizationKey(
&self,
subtitle_localization_key: Option<&NSString>,
);
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other subtitleLocalizationArgs)]
pub unsafe fn subtitleLocalizationArgs(
&self,
) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[method(setSubtitleLocalizationArgs:)]
pub unsafe fn setSubtitleLocalizationArgs(
&self,
subtitle_localization_args: Option<&NSArray<CKRecordFieldKey>>,
);
#[method_id(@__retain_semantics Other alertActionLocalizationKey)]
pub unsafe fn alertActionLocalizationKey(&self) -> Option<Retained<NSString>>;
#[method(setAlertActionLocalizationKey:)]
pub unsafe fn setAlertActionLocalizationKey(
&self,
alert_action_localization_key: Option<&NSString>,
);
#[method_id(@__retain_semantics Other alertLaunchImage)]
pub unsafe fn alertLaunchImage(&self) -> Option<Retained<NSString>>;
#[method(setAlertLaunchImage:)]
pub unsafe fn setAlertLaunchImage(&self, alert_launch_image: Option<&NSString>);
#[method_id(@__retain_semantics Other soundName)]
pub unsafe fn soundName(&self) -> Option<Retained<NSString>>;
#[method(setSoundName:)]
pub unsafe fn setSoundName(&self, sound_name: Option<&NSString>);
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other desiredKeys)]
pub unsafe fn desiredKeys(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
#[cfg(feature = "CKRecord")]
#[method(setDesiredKeys:)]
pub unsafe fn setDesiredKeys(&self, desired_keys: Option<&NSArray<CKRecordFieldKey>>);
#[method(shouldBadge)]
pub unsafe fn shouldBadge(&self) -> bool;
#[method(setShouldBadge:)]
pub unsafe fn setShouldBadge(&self, should_badge: bool);
#[method(shouldSendContentAvailable)]
pub unsafe fn shouldSendContentAvailable(&self) -> bool;
#[method(setShouldSendContentAvailable:)]
pub unsafe fn setShouldSendContentAvailable(&self, should_send_content_available: bool);
#[method(shouldSendMutableContent)]
pub unsafe fn shouldSendMutableContent(&self) -> bool;
#[method(setShouldSendMutableContent:)]
pub unsafe fn setShouldSendMutableContent(&self, should_send_mutable_content: bool);
#[method_id(@__retain_semantics Other category)]
pub unsafe fn category(&self) -> Option<Retained<NSString>>;
#[method(setCategory:)]
pub unsafe fn setCategory(&self, category: Option<&NSString>);
#[method_id(@__retain_semantics Other collapseIDKey)]
pub unsafe fn collapseIDKey(&self) -> Option<Retained<NSString>>;
#[method(setCollapseIDKey:)]
pub unsafe fn setCollapseIDKey(&self, collapse_id_key: Option<&NSString>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKNotificationInfo {
#[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>;
}
);

View File

@@ -0,0 +1,447 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngine;
unsafe impl ClassType for CKSyncEngine {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngine {}
unsafe impl Sync for CKSyncEngine {}
unsafe impl NSObjectProtocol for CKSyncEngine {}
extern_methods!(
unsafe impl CKSyncEngine {
#[cfg(feature = "CKSyncEngineConfiguration")]
#[method_id(@__retain_semantics Init initWithConfiguration:)]
pub unsafe fn initWithConfiguration(
this: Allocated<Self>,
configuration: &CKSyncEngineConfiguration,
) -> Retained<Self>;
#[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>;
#[cfg(feature = "CKDatabase")]
#[method_id(@__retain_semantics Other database)]
pub unsafe fn database(&self) -> Retained<CKDatabase>;
#[cfg(feature = "CKSyncEngineState")]
#[method_id(@__retain_semantics Other state)]
pub unsafe fn state(&self) -> Retained<CKSyncEngineState>;
#[cfg(feature = "block2")]
#[method(fetchChangesWithCompletionHandler:)]
pub unsafe fn fetchChangesWithCompletionHandler(
&self,
completion_handler: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
#[cfg(feature = "block2")]
#[method(fetchChangesWithOptions:completionHandler:)]
pub unsafe fn fetchChangesWithOptions_completionHandler(
&self,
options: &CKSyncEngineFetchChangesOptions,
completion_handler: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
#[cfg(feature = "block2")]
#[method(sendChangesWithCompletionHandler:)]
pub unsafe fn sendChangesWithCompletionHandler(
&self,
completion_handler: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
#[cfg(feature = "block2")]
#[method(sendChangesWithOptions:completionHandler:)]
pub unsafe fn sendChangesWithOptions_completionHandler(
&self,
options: &CKSyncEngineSendChangesOptions,
completion_handler: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
#[cfg(feature = "block2")]
#[method(cancelOperationsWithCompletionHandler:)]
pub unsafe fn cancelOperationsWithCompletionHandler(
&self,
completion_handler: Option<&block2::Block<dyn Fn()>>,
);
}
);
extern_protocol!(
pub unsafe trait CKSyncEngineDelegate: NSObjectProtocol {
#[cfg(feature = "CKSyncEngineEvent")]
#[method(syncEngine:handleEvent:)]
unsafe fn syncEngine_handleEvent(
&self,
sync_engine: &CKSyncEngine,
event: &CKSyncEngineEvent,
);
#[cfg(feature = "CKSyncEngineRecordZoneChangeBatch")]
#[method_id(@__retain_semantics Other syncEngine:nextRecordZoneChangeBatchForContext:)]
unsafe fn syncEngine_nextRecordZoneChangeBatchForContext(
&self,
sync_engine: &CKSyncEngine,
context: &CKSyncEngineSendChangesContext,
) -> Option<Retained<CKSyncEngineRecordZoneChangeBatch>>;
#[optional]
#[method_id(@__retain_semantics Other syncEngine:nextFetchChangesOptionsForContext:)]
unsafe fn syncEngine_nextFetchChangesOptionsForContext(
&self,
sync_engine: &CKSyncEngine,
context: &CKSyncEngineFetchChangesContext,
) -> Retained<CKSyncEngineFetchChangesOptions>;
}
unsafe impl ProtocolType for dyn CKSyncEngineDelegate {}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineFetchChangesOptions;
unsafe impl ClassType for CKSyncEngineFetchChangesOptions {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineFetchChangesOptions {}
unsafe impl Sync for CKSyncEngineFetchChangesOptions {}
unsafe impl NSCopying for CKSyncEngineFetchChangesOptions {}
unsafe impl NSObjectProtocol for CKSyncEngineFetchChangesOptions {}
extern_methods!(
unsafe impl CKSyncEngineFetchChangesOptions {
#[method_id(@__retain_semantics Other scope)]
pub unsafe fn scope(&self) -> Retained<CKSyncEngineFetchChangesScope>;
#[method(setScope:)]
pub unsafe fn setScope(&self, scope: &CKSyncEngineFetchChangesScope);
#[cfg(feature = "CKOperationGroup")]
#[method_id(@__retain_semantics Other operationGroup)]
pub unsafe fn operationGroup(&self) -> Retained<CKOperationGroup>;
#[cfg(feature = "CKOperationGroup")]
#[method(setOperationGroup:)]
pub unsafe fn setOperationGroup(&self, operation_group: &CKOperationGroup);
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other prioritizedZoneIDs)]
pub unsafe fn prioritizedZoneIDs(&self) -> Retained<NSArray<CKRecordZoneID>>;
#[cfg(feature = "CKRecordZoneID")]
#[method(setPrioritizedZoneIDs:)]
pub unsafe fn setPrioritizedZoneIDs(&self, prioritized_zone_i_ds: &NSArray<CKRecordZoneID>);
#[method_id(@__retain_semantics Init initWithScope:)]
pub unsafe fn initWithScope(
this: Allocated<Self>,
scope: Option<&CKSyncEngineFetchChangesScope>,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKSyncEngineFetchChangesOptions {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineFetchChangesScope;
unsafe impl ClassType for CKSyncEngineFetchChangesScope {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineFetchChangesScope {}
unsafe impl Sync for CKSyncEngineFetchChangesScope {}
unsafe impl NSCopying for CKSyncEngineFetchChangesScope {}
unsafe impl NSObjectProtocol for CKSyncEngineFetchChangesScope {}
extern_methods!(
unsafe impl CKSyncEngineFetchChangesScope {
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneIDs)]
pub unsafe fn zoneIDs(&self) -> Option<Retained<NSSet<CKRecordZoneID>>>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other excludedZoneIDs)]
pub unsafe fn excludedZoneIDs(&self) -> Retained<NSSet<CKRecordZoneID>>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithZoneIDs:)]
pub unsafe fn initWithZoneIDs(
this: Allocated<Self>,
zone_i_ds: Option<&NSSet<CKRecordZoneID>>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithExcludedZoneIDs:)]
pub unsafe fn initWithExcludedZoneIDs(
this: Allocated<Self>,
zone_i_ds: &NSSet<CKRecordZoneID>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method(containsZoneID:)]
pub unsafe fn containsZoneID(&self, zone_id: &CKRecordZoneID) -> bool;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKSyncEngineFetchChangesScope {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineSendChangesOptions;
unsafe impl ClassType for CKSyncEngineSendChangesOptions {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineSendChangesOptions {}
unsafe impl Sync for CKSyncEngineSendChangesOptions {}
unsafe impl NSCopying for CKSyncEngineSendChangesOptions {}
unsafe impl NSObjectProtocol for CKSyncEngineSendChangesOptions {}
extern_methods!(
unsafe impl CKSyncEngineSendChangesOptions {
#[method_id(@__retain_semantics Other scope)]
pub unsafe fn scope(&self) -> Retained<CKSyncEngineSendChangesScope>;
#[method(setScope:)]
pub unsafe fn setScope(&self, scope: &CKSyncEngineSendChangesScope);
#[cfg(feature = "CKOperationGroup")]
#[method_id(@__retain_semantics Other operationGroup)]
pub unsafe fn operationGroup(&self) -> Retained<CKOperationGroup>;
#[cfg(feature = "CKOperationGroup")]
#[method(setOperationGroup:)]
pub unsafe fn setOperationGroup(&self, operation_group: &CKOperationGroup);
#[method_id(@__retain_semantics Init initWithScope:)]
pub unsafe fn initWithScope(
this: Allocated<Self>,
scope: Option<&CKSyncEngineSendChangesScope>,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKSyncEngineSendChangesOptions {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineSendChangesScope;
unsafe impl ClassType for CKSyncEngineSendChangesScope {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineSendChangesScope {}
unsafe impl Sync for CKSyncEngineSendChangesScope {}
unsafe impl NSCopying for CKSyncEngineSendChangesScope {}
unsafe impl NSObjectProtocol for CKSyncEngineSendChangesScope {}
extern_methods!(
unsafe impl CKSyncEngineSendChangesScope {
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneIDs)]
pub unsafe fn zoneIDs(&self) -> Option<Retained<NSSet<CKRecordZoneID>>>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other excludedZoneIDs)]
pub unsafe fn excludedZoneIDs(&self) -> Retained<NSSet<CKRecordZoneID>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other recordIDs)]
pub unsafe fn recordIDs(&self) -> Option<Retained<NSSet<CKRecordID>>>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithZoneIDs:)]
pub unsafe fn initWithZoneIDs(
this: Allocated<Self>,
zone_i_ds: Option<&NSSet<CKRecordZoneID>>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithExcludedZoneIDs:)]
pub unsafe fn initWithExcludedZoneIDs(
this: Allocated<Self>,
excluded_zone_i_ds: &NSSet<CKRecordZoneID>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Init initWithRecordIDs:)]
pub unsafe fn initWithRecordIDs(
this: Allocated<Self>,
record_i_ds: Option<&NSSet<CKRecordID>>,
) -> Retained<Self>;
#[cfg(feature = "CKRecordID")]
#[method(containsRecordID:)]
pub unsafe fn containsRecordID(&self, record_id: &CKRecordID) -> bool;
#[cfg(feature = "CKSyncEngineState")]
#[method(containsPendingRecordZoneChange:)]
pub unsafe fn containsPendingRecordZoneChange(
&self,
pending_record_zone_change: &CKSyncEnginePendingRecordZoneChange,
) -> bool;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CKSyncEngineSendChangesScope {
#[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>;
}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKSyncEngineSyncReason(pub NSInteger);
impl CKSyncEngineSyncReason {
#[doc(alias = "CKSyncEngineSyncReasonScheduled")]
pub const Scheduled: Self = Self(0);
#[doc(alias = "CKSyncEngineSyncReasonManual")]
pub const Manual: Self = Self(1);
}
unsafe impl Encode for CKSyncEngineSyncReason {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKSyncEngineSyncReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineFetchChangesContext;
unsafe impl ClassType for CKSyncEngineFetchChangesContext {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineFetchChangesContext {}
unsafe impl Sync for CKSyncEngineFetchChangesContext {}
unsafe impl NSObjectProtocol for CKSyncEngineFetchChangesContext {}
extern_methods!(
unsafe impl CKSyncEngineFetchChangesContext {
#[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(reason)]
pub unsafe fn reason(&self) -> CKSyncEngineSyncReason;
#[method_id(@__retain_semantics Other options)]
pub unsafe fn options(&self) -> Retained<CKSyncEngineFetchChangesOptions>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineSendChangesContext;
unsafe impl ClassType for CKSyncEngineSendChangesContext {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineSendChangesContext {}
unsafe impl Sync for CKSyncEngineSendChangesContext {}
unsafe impl NSObjectProtocol for CKSyncEngineSendChangesContext {}
extern_methods!(
unsafe impl CKSyncEngineSendChangesContext {
#[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(reason)]
pub unsafe fn reason(&self) -> CKSyncEngineSyncReason;
#[method_id(@__retain_semantics Other options)]
pub unsafe fn options(&self) -> Retained<CKSyncEngineSendChangesOptions>;
}
);

View File

@@ -0,0 +1,91 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineConfiguration;
unsafe impl ClassType for CKSyncEngineConfiguration {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineConfiguration {}
unsafe impl Sync for CKSyncEngineConfiguration {}
unsafe impl NSObjectProtocol for CKSyncEngineConfiguration {}
extern_methods!(
unsafe impl CKSyncEngineConfiguration {
#[cfg(all(
feature = "CKDatabase",
feature = "CKSyncEngine",
feature = "CKSyncEngineState"
))]
#[method_id(@__retain_semantics Init initWithDatabase:stateSerialization:delegate:)]
pub unsafe fn initWithDatabase_stateSerialization_delegate(
this: Allocated<Self>,
database: &CKDatabase,
state_serialization: Option<&CKSyncEngineStateSerialization>,
delegate: &ProtocolObject<dyn CKSyncEngineDelegate>,
) -> Retained<Self>;
#[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>;
#[cfg(feature = "CKDatabase")]
#[method_id(@__retain_semantics Other database)]
pub unsafe fn database(&self) -> Retained<CKDatabase>;
#[cfg(feature = "CKDatabase")]
#[method(setDatabase:)]
pub unsafe fn setDatabase(&self, database: &CKDatabase);
#[cfg(feature = "CKSyncEngineState")]
#[method_id(@__retain_semantics Other stateSerialization)]
pub unsafe fn stateSerialization(&self)
-> Option<Retained<CKSyncEngineStateSerialization>>;
#[cfg(feature = "CKSyncEngineState")]
#[method(setStateSerialization:)]
pub unsafe fn setStateSerialization(
&self,
state_serialization: Option<&CKSyncEngineStateSerialization>,
);
#[cfg(feature = "CKSyncEngine")]
#[method_id(@__retain_semantics Other delegate)]
pub unsafe fn delegate(&self)
-> Option<Retained<ProtocolObject<dyn CKSyncEngineDelegate>>>;
#[cfg(feature = "CKSyncEngine")]
#[method(setDelegate:)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn CKSyncEngineDelegate>>,
);
#[method(automaticallySync)]
pub unsafe fn automaticallySync(&self) -> bool;
#[method(setAutomaticallySync:)]
pub unsafe fn setAutomaticallySync(&self, automatically_sync: bool);
#[cfg(feature = "CKSubscription")]
#[method_id(@__retain_semantics Other subscriptionID)]
pub unsafe fn subscriptionID(&self) -> Option<Retained<CKSubscriptionID>>;
#[cfg(feature = "CKSubscription")]
#[method(setSubscriptionID:)]
pub unsafe fn setSubscriptionID(&self, subscription_id: Option<&CKSubscriptionID>);
}
);

View File

@@ -0,0 +1,767 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKSyncEngineEventType(pub NSInteger);
impl CKSyncEngineEventType {
#[doc(alias = "CKSyncEngineEventTypeStateUpdate")]
pub const StateUpdate: Self = Self(0);
#[doc(alias = "CKSyncEngineEventTypeAccountChange")]
pub const AccountChange: Self = Self(1);
#[doc(alias = "CKSyncEngineEventTypeFetchedDatabaseChanges")]
pub const FetchedDatabaseChanges: Self = Self(2);
#[doc(alias = "CKSyncEngineEventTypeFetchedRecordZoneChanges")]
pub const FetchedRecordZoneChanges: Self = Self(3);
#[doc(alias = "CKSyncEngineEventTypeSentDatabaseChanges")]
pub const SentDatabaseChanges: Self = Self(4);
#[doc(alias = "CKSyncEngineEventTypeSentRecordZoneChanges")]
pub const SentRecordZoneChanges: Self = Self(5);
#[doc(alias = "CKSyncEngineEventTypeWillFetchChanges")]
pub const WillFetchChanges: Self = Self(6);
#[doc(alias = "CKSyncEngineEventTypeWillFetchRecordZoneChanges")]
pub const WillFetchRecordZoneChanges: Self = Self(7);
#[doc(alias = "CKSyncEngineEventTypeDidFetchRecordZoneChanges")]
pub const DidFetchRecordZoneChanges: Self = Self(8);
#[doc(alias = "CKSyncEngineEventTypeDidFetchChanges")]
pub const DidFetchChanges: Self = Self(9);
#[doc(alias = "CKSyncEngineEventTypeWillSendChanges")]
pub const WillSendChanges: Self = Self(10);
#[doc(alias = "CKSyncEngineEventTypeDidSendChanges")]
pub const DidSendChanges: Self = Self(11);
}
unsafe impl Encode for CKSyncEngineEventType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKSyncEngineEventType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineEvent;
unsafe impl ClassType for CKSyncEngineEvent {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineEvent {}
unsafe impl Sync for CKSyncEngineEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineEvent {}
extern_methods!(
unsafe impl CKSyncEngineEvent {
#[method(type)]
pub unsafe fn r#type(&self) -> CKSyncEngineEventType;
#[method_id(@__retain_semantics Other stateUpdateEvent)]
pub unsafe fn stateUpdateEvent(&self) -> Retained<CKSyncEngineStateUpdateEvent>;
#[method_id(@__retain_semantics Other accountChangeEvent)]
pub unsafe fn accountChangeEvent(&self) -> Retained<CKSyncEngineAccountChangeEvent>;
#[method_id(@__retain_semantics Other fetchedDatabaseChangesEvent)]
pub unsafe fn fetchedDatabaseChangesEvent(
&self,
) -> Retained<CKSyncEngineFetchedDatabaseChangesEvent>;
#[method_id(@__retain_semantics Other fetchedRecordZoneChangesEvent)]
pub unsafe fn fetchedRecordZoneChangesEvent(
&self,
) -> Retained<CKSyncEngineFetchedRecordZoneChangesEvent>;
#[method_id(@__retain_semantics Other sentDatabaseChangesEvent)]
pub unsafe fn sentDatabaseChangesEvent(
&self,
) -> Retained<CKSyncEngineSentDatabaseChangesEvent>;
#[method_id(@__retain_semantics Other sentRecordZoneChangesEvent)]
pub unsafe fn sentRecordZoneChangesEvent(
&self,
) -> Retained<CKSyncEngineSentRecordZoneChangesEvent>;
#[method_id(@__retain_semantics Other willFetchChangesEvent)]
pub unsafe fn willFetchChangesEvent(&self) -> Retained<CKSyncEngineWillFetchChangesEvent>;
#[method_id(@__retain_semantics Other willFetchRecordZoneChangesEvent)]
pub unsafe fn willFetchRecordZoneChangesEvent(
&self,
) -> Retained<CKSyncEngineWillFetchRecordZoneChangesEvent>;
#[method_id(@__retain_semantics Other didFetchRecordZoneChangesEvent)]
pub unsafe fn didFetchRecordZoneChangesEvent(
&self,
) -> Retained<CKSyncEngineDidFetchRecordZoneChangesEvent>;
#[method_id(@__retain_semantics Other didFetchChangesEvent)]
pub unsafe fn didFetchChangesEvent(&self) -> Retained<CKSyncEngineDidFetchChangesEvent>;
#[method_id(@__retain_semantics Other willSendChangesEvent)]
pub unsafe fn willSendChangesEvent(&self) -> Retained<CKSyncEngineWillSendChangesEvent>;
#[method_id(@__retain_semantics Other didSendChangesEvent)]
pub unsafe fn didSendChangesEvent(&self) -> Retained<CKSyncEngineDidSendChangesEvent>;
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineStateUpdateEvent;
unsafe impl ClassType for CKSyncEngineStateUpdateEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineStateUpdateEvent {}
unsafe impl Sync for CKSyncEngineStateUpdateEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineStateUpdateEvent {}
extern_methods!(
unsafe impl CKSyncEngineStateUpdateEvent {
#[cfg(feature = "CKSyncEngineState")]
#[method_id(@__retain_semantics Other stateSerialization)]
pub unsafe fn stateSerialization(&self) -> Retained<CKSyncEngineStateSerialization>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineStateUpdateEvent {
#[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>;
}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKSyncEngineAccountChangeType(pub NSInteger);
impl CKSyncEngineAccountChangeType {
#[doc(alias = "CKSyncEngineAccountChangeTypeSignIn")]
pub const SignIn: Self = Self(0);
#[doc(alias = "CKSyncEngineAccountChangeTypeSignOut")]
pub const SignOut: Self = Self(1);
#[doc(alias = "CKSyncEngineAccountChangeTypeSwitchAccounts")]
pub const SwitchAccounts: Self = Self(2);
}
unsafe impl Encode for CKSyncEngineAccountChangeType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKSyncEngineAccountChangeType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineAccountChangeEvent;
unsafe impl ClassType for CKSyncEngineAccountChangeEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineAccountChangeEvent {}
unsafe impl Sync for CKSyncEngineAccountChangeEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineAccountChangeEvent {}
extern_methods!(
unsafe impl CKSyncEngineAccountChangeEvent {
#[method(changeType)]
pub unsafe fn changeType(&self) -> CKSyncEngineAccountChangeType;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other previousUser)]
pub unsafe fn previousUser(&self) -> Option<Retained<CKRecordID>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other currentUser)]
pub unsafe fn currentUser(&self) -> Option<Retained<CKRecordID>>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineAccountChangeEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineFetchedDatabaseChangesEvent;
unsafe impl ClassType for CKSyncEngineFetchedDatabaseChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineFetchedDatabaseChangesEvent {}
unsafe impl Sync for CKSyncEngineFetchedDatabaseChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineFetchedDatabaseChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineFetchedDatabaseChangesEvent {
#[cfg(feature = "CKRecordZone")]
#[method_id(@__retain_semantics Other modifications)]
pub unsafe fn modifications(&self) -> Retained<NSArray<CKRecordZone>>;
#[method_id(@__retain_semantics Other deletions)]
pub unsafe fn deletions(&self) -> Retained<NSArray<CKSyncEngineFetchedZoneDeletion>>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineFetchedDatabaseChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineFetchedRecordZoneChangesEvent;
unsafe impl ClassType for CKSyncEngineFetchedRecordZoneChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineFetchedRecordZoneChangesEvent {}
unsafe impl Sync for CKSyncEngineFetchedRecordZoneChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineFetchedRecordZoneChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineFetchedRecordZoneChangesEvent {
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other modifications)]
pub unsafe fn modifications(&self) -> Retained<NSArray<CKRecord>>;
#[method_id(@__retain_semantics Other deletions)]
pub unsafe fn deletions(&self) -> Retained<NSArray<CKSyncEngineFetchedRecordDeletion>>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineFetchedRecordZoneChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineSentDatabaseChangesEvent;
unsafe impl ClassType for CKSyncEngineSentDatabaseChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineSentDatabaseChangesEvent {}
unsafe impl Sync for CKSyncEngineSentDatabaseChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineSentDatabaseChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineSentDatabaseChangesEvent {
#[cfg(feature = "CKRecordZone")]
#[method_id(@__retain_semantics Other savedZones)]
pub unsafe fn savedZones(&self) -> Retained<NSArray<CKRecordZone>>;
#[method_id(@__retain_semantics Other failedZoneSaves)]
pub unsafe fn failedZoneSaves(&self) -> Retained<NSArray<CKSyncEngineFailedZoneSave>>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other deletedZoneIDs)]
pub unsafe fn deletedZoneIDs(&self) -> Retained<NSArray<CKRecordZoneID>>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other failedZoneDeletes)]
pub unsafe fn failedZoneDeletes(&self) -> Retained<NSDictionary<CKRecordZoneID, NSError>>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineSentDatabaseChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineSentRecordZoneChangesEvent;
unsafe impl ClassType for CKSyncEngineSentRecordZoneChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineSentRecordZoneChangesEvent {}
unsafe impl Sync for CKSyncEngineSentRecordZoneChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineSentRecordZoneChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineSentRecordZoneChangesEvent {
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other savedRecords)]
pub unsafe fn savedRecords(&self) -> Retained<NSArray<CKRecord>>;
#[method_id(@__retain_semantics Other failedRecordSaves)]
pub unsafe fn failedRecordSaves(&self) -> Retained<NSArray<CKSyncEngineFailedRecordSave>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other deletedRecordIDs)]
pub unsafe fn deletedRecordIDs(&self) -> Retained<NSArray<CKRecordID>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other failedRecordDeletes)]
pub unsafe fn failedRecordDeletes(&self) -> Retained<NSDictionary<CKRecordID, NSError>>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineSentRecordZoneChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineWillFetchChangesEvent;
unsafe impl ClassType for CKSyncEngineWillFetchChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineWillFetchChangesEvent {}
unsafe impl Sync for CKSyncEngineWillFetchChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineWillFetchChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineWillFetchChangesEvent {
#[cfg(feature = "CKSyncEngine")]
#[method_id(@__retain_semantics Other context)]
pub unsafe fn context(&self) -> Retained<CKSyncEngineFetchChangesContext>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineWillFetchChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineWillFetchRecordZoneChangesEvent;
unsafe impl ClassType for CKSyncEngineWillFetchRecordZoneChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineWillFetchRecordZoneChangesEvent {}
unsafe impl Sync for CKSyncEngineWillFetchRecordZoneChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineWillFetchRecordZoneChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineWillFetchRecordZoneChangesEvent {
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneID)]
pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineWillFetchRecordZoneChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineDidFetchRecordZoneChangesEvent;
unsafe impl ClassType for CKSyncEngineDidFetchRecordZoneChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineDidFetchRecordZoneChangesEvent {}
unsafe impl Sync for CKSyncEngineDidFetchRecordZoneChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineDidFetchRecordZoneChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineDidFetchRecordZoneChangesEvent {
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneID)]
pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
#[method_id(@__retain_semantics Other error)]
pub unsafe fn error(&self) -> Option<Retained<NSError>>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineDidFetchRecordZoneChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineDidFetchChangesEvent;
unsafe impl ClassType for CKSyncEngineDidFetchChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineDidFetchChangesEvent {}
unsafe impl Sync for CKSyncEngineDidFetchChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineDidFetchChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineDidFetchChangesEvent {
#[cfg(feature = "CKSyncEngine")]
#[method_id(@__retain_semantics Other context)]
pub unsafe fn context(&self) -> Retained<CKSyncEngineFetchChangesContext>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineDidFetchChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineWillSendChangesEvent;
unsafe impl ClassType for CKSyncEngineWillSendChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineWillSendChangesEvent {}
unsafe impl Sync for CKSyncEngineWillSendChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineWillSendChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineWillSendChangesEvent {
#[cfg(feature = "CKSyncEngine")]
#[method_id(@__retain_semantics Other context)]
pub unsafe fn context(&self) -> Retained<CKSyncEngineSendChangesContext>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineWillSendChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineDidSendChangesEvent;
unsafe impl ClassType for CKSyncEngineDidSendChangesEvent {
#[inherits(NSObject)]
type Super = CKSyncEngineEvent;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineDidSendChangesEvent {}
unsafe impl Sync for CKSyncEngineDidSendChangesEvent {}
unsafe impl NSObjectProtocol for CKSyncEngineDidSendChangesEvent {}
extern_methods!(
unsafe impl CKSyncEngineDidSendChangesEvent {
#[cfg(feature = "CKSyncEngine")]
#[method_id(@__retain_semantics Other context)]
pub unsafe fn context(&self) -> Retained<CKSyncEngineSendChangesContext>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEngineEvent`
unsafe impl CKSyncEngineDidSendChangesEvent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineFetchedRecordDeletion;
unsafe impl ClassType for CKSyncEngineFetchedRecordDeletion {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineFetchedRecordDeletion {}
unsafe impl Sync for CKSyncEngineFetchedRecordDeletion {}
unsafe impl NSObjectProtocol for CKSyncEngineFetchedRecordDeletion {}
extern_methods!(
unsafe impl CKSyncEngineFetchedRecordDeletion {
#[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>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other recordID)]
pub unsafe fn recordID(&self) -> Retained<CKRecordID>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other recordType)]
pub unsafe fn recordType(&self) -> Retained<CKRecordType>;
}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKSyncEngineZoneDeletionReason(pub NSInteger);
impl CKSyncEngineZoneDeletionReason {
#[doc(alias = "CKSyncEngineZoneDeletionReasonDeleted")]
pub const Deleted: Self = Self(0);
#[doc(alias = "CKSyncEngineZoneDeletionReasonPurged")]
pub const Purged: Self = Self(1);
#[doc(alias = "CKSyncEngineZoneDeletionReasonEncryptedDataReset")]
pub const EncryptedDataReset: Self = Self(2);
}
unsafe impl Encode for CKSyncEngineZoneDeletionReason {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKSyncEngineZoneDeletionReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineFetchedZoneDeletion;
unsafe impl ClassType for CKSyncEngineFetchedZoneDeletion {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineFetchedZoneDeletion {}
unsafe impl Sync for CKSyncEngineFetchedZoneDeletion {}
unsafe impl NSObjectProtocol for CKSyncEngineFetchedZoneDeletion {}
extern_methods!(
unsafe impl CKSyncEngineFetchedZoneDeletion {
#[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>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneID)]
pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
#[method(reason)]
pub unsafe fn reason(&self) -> CKSyncEngineZoneDeletionReason;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineFailedRecordSave;
unsafe impl ClassType for CKSyncEngineFailedRecordSave {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineFailedRecordSave {}
unsafe impl Sync for CKSyncEngineFailedRecordSave {}
unsafe impl NSObjectProtocol for CKSyncEngineFailedRecordSave {}
extern_methods!(
unsafe impl CKSyncEngineFailedRecordSave {
#[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>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other record)]
pub unsafe fn record(&self) -> Retained<CKRecord>;
#[method_id(@__retain_semantics Other error)]
pub unsafe fn error(&self) -> Retained<NSError>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineFailedZoneSave;
unsafe impl ClassType for CKSyncEngineFailedZoneSave {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineFailedZoneSave {}
unsafe impl Sync for CKSyncEngineFailedZoneSave {}
unsafe impl NSObjectProtocol for CKSyncEngineFailedZoneSave {}
extern_methods!(
unsafe impl CKSyncEngineFailedZoneSave {
#[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>;
#[cfg(feature = "CKRecordZone")]
#[method_id(@__retain_semantics Other recordZone)]
pub unsafe fn recordZone(&self) -> Retained<CKRecordZone>;
#[method_id(@__retain_semantics Other error)]
pub unsafe fn error(&self) -> Retained<NSError>;
}
);

View File

@@ -0,0 +1,68 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineRecordZoneChangeBatch;
unsafe impl ClassType for CKSyncEngineRecordZoneChangeBatch {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineRecordZoneChangeBatch {}
unsafe impl Sync for CKSyncEngineRecordZoneChangeBatch {}
unsafe impl NSObjectProtocol for CKSyncEngineRecordZoneChangeBatch {}
extern_methods!(
unsafe impl CKSyncEngineRecordZoneChangeBatch {
#[cfg(all(
feature = "CKRecord",
feature = "CKRecordID",
feature = "CKSyncEngineState",
feature = "block2"
))]
#[method_id(@__retain_semantics Init initWithPendingChanges:recordProvider:)]
pub unsafe fn initWithPendingChanges_recordProvider(
this: Allocated<Self>,
pending_changes: &NSArray<CKSyncEnginePendingRecordZoneChange>,
record_provider: &block2::Block<dyn Fn(NonNull<CKRecordID>) -> *mut CKRecord + '_>,
) -> Option<Retained<Self>>;
#[cfg(all(feature = "CKRecord", feature = "CKRecordID"))]
#[method_id(@__retain_semantics Init initWithRecordsToSave:recordIDsToDelete:atomicByZone:)]
pub unsafe fn initWithRecordsToSave_recordIDsToDelete_atomicByZone(
this: Allocated<Self>,
records_to_save: Option<&NSArray<CKRecord>>,
record_i_ds_to_delete: Option<&NSArray<CKRecordID>>,
atomic_by_zone: bool,
) -> Retained<Self>;
#[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>;
#[cfg(feature = "CKRecord")]
#[method_id(@__retain_semantics Other recordsToSave)]
pub unsafe fn recordsToSave(&self) -> Retained<NSArray<CKRecord>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other recordIDsToDelete)]
pub unsafe fn recordIDsToDelete(&self) -> Retained<NSArray<CKRecordID>>;
#[method(atomicByZone)]
pub unsafe fn atomicByZone(&self) -> bool;
#[method(setAtomicByZone:)]
pub unsafe fn setAtomicByZone(&self, atomic_by_zone: bool);
}
);

View File

@@ -0,0 +1,298 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineState;
unsafe impl ClassType for CKSyncEngineState {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineState {}
unsafe impl Sync for CKSyncEngineState {}
unsafe impl NSObjectProtocol for CKSyncEngineState {}
extern_methods!(
unsafe impl CKSyncEngineState {
#[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 Other pendingRecordZoneChanges)]
pub unsafe fn pendingRecordZoneChanges(
&self,
) -> Retained<NSArray<CKSyncEnginePendingRecordZoneChange>>;
#[method_id(@__retain_semantics Other pendingDatabaseChanges)]
pub unsafe fn pendingDatabaseChanges(
&self,
) -> Retained<NSArray<CKSyncEnginePendingDatabaseChange>>;
#[method(hasPendingUntrackedChanges)]
pub unsafe fn hasPendingUntrackedChanges(&self) -> bool;
#[method(setHasPendingUntrackedChanges:)]
pub unsafe fn setHasPendingUntrackedChanges(&self, has_pending_untracked_changes: bool);
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneIDsWithUnfetchedServerChanges)]
pub unsafe fn zoneIDsWithUnfetchedServerChanges(&self)
-> Retained<NSArray<CKRecordZoneID>>;
#[method(addPendingRecordZoneChanges:)]
pub unsafe fn addPendingRecordZoneChanges(
&self,
changes: &NSArray<CKSyncEnginePendingRecordZoneChange>,
);
#[method(removePendingRecordZoneChanges:)]
pub unsafe fn removePendingRecordZoneChanges(
&self,
changes: &NSArray<CKSyncEnginePendingRecordZoneChange>,
);
#[method(addPendingDatabaseChanges:)]
pub unsafe fn addPendingDatabaseChanges(
&self,
changes: &NSArray<CKSyncEnginePendingDatabaseChange>,
);
#[method(removePendingDatabaseChanges:)]
pub unsafe fn removePendingDatabaseChanges(
&self,
changes: &NSArray<CKSyncEnginePendingDatabaseChange>,
);
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEngineStateSerialization;
unsafe impl ClassType for CKSyncEngineStateSerialization {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEngineStateSerialization {}
unsafe impl Sync for CKSyncEngineStateSerialization {}
unsafe impl NSCoding for CKSyncEngineStateSerialization {}
unsafe impl NSObjectProtocol for CKSyncEngineStateSerialization {}
unsafe impl NSSecureCoding for CKSyncEngineStateSerialization {}
extern_methods!(
unsafe impl CKSyncEngineStateSerialization {
#[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>;
}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKSyncEnginePendingRecordZoneChangeType(pub NSInteger);
impl CKSyncEnginePendingRecordZoneChangeType {
#[doc(alias = "CKSyncEnginePendingRecordZoneChangeTypeSaveRecord")]
pub const SaveRecord: Self = Self(0);
#[doc(alias = "CKSyncEnginePendingRecordZoneChangeTypeDeleteRecord")]
pub const DeleteRecord: Self = Self(1);
}
unsafe impl Encode for CKSyncEnginePendingRecordZoneChangeType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKSyncEnginePendingRecordZoneChangeType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEnginePendingRecordZoneChange;
unsafe impl ClassType for CKSyncEnginePendingRecordZoneChange {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEnginePendingRecordZoneChange {}
unsafe impl Sync for CKSyncEnginePendingRecordZoneChange {}
unsafe impl NSObjectProtocol for CKSyncEnginePendingRecordZoneChange {}
extern_methods!(
unsafe impl CKSyncEnginePendingRecordZoneChange {
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Init initWithRecordID:type:)]
pub unsafe fn initWithRecordID_type(
this: Allocated<Self>,
record_id: &CKRecordID,
r#type: CKSyncEnginePendingRecordZoneChangeType,
) -> Retained<Self>;
#[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>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other recordID)]
pub unsafe fn recordID(&self) -> Retained<CKRecordID>;
#[method(type)]
pub unsafe fn r#type(&self) -> CKSyncEnginePendingRecordZoneChangeType;
}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CKSyncEnginePendingDatabaseChangeType(pub NSInteger);
impl CKSyncEnginePendingDatabaseChangeType {
#[doc(alias = "CKSyncEnginePendingDatabaseChangeTypeSaveZone")]
pub const SaveZone: Self = Self(0);
#[doc(alias = "CKSyncEnginePendingDatabaseChangeTypeDeleteZone")]
pub const DeleteZone: Self = Self(1);
}
unsafe impl Encode for CKSyncEnginePendingDatabaseChangeType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CKSyncEnginePendingDatabaseChangeType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEnginePendingDatabaseChange;
unsafe impl ClassType for CKSyncEnginePendingDatabaseChange {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEnginePendingDatabaseChange {}
unsafe impl Sync for CKSyncEnginePendingDatabaseChange {}
unsafe impl NSObjectProtocol for CKSyncEnginePendingDatabaseChange {}
extern_methods!(
unsafe impl CKSyncEnginePendingDatabaseChange {
#[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>;
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Other zoneID)]
pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
#[method(type)]
pub unsafe fn r#type(&self) -> CKSyncEnginePendingDatabaseChangeType;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEnginePendingZoneSave;
unsafe impl ClassType for CKSyncEnginePendingZoneSave {
#[inherits(NSObject)]
type Super = CKSyncEnginePendingDatabaseChange;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEnginePendingZoneSave {}
unsafe impl Sync for CKSyncEnginePendingZoneSave {}
unsafe impl NSObjectProtocol for CKSyncEnginePendingZoneSave {}
extern_methods!(
unsafe impl CKSyncEnginePendingZoneSave {
#[cfg(feature = "CKRecordZone")]
#[method_id(@__retain_semantics Init initWithZone:)]
pub unsafe fn initWithZone(this: Allocated<Self>, zone: &CKRecordZone) -> Retained<Self>;
#[cfg(feature = "CKRecordZone")]
#[method_id(@__retain_semantics Other zone)]
pub unsafe fn zone(&self) -> Retained<CKRecordZone>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEnginePendingDatabaseChange`
unsafe impl CKSyncEnginePendingZoneSave {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSyncEnginePendingZoneDelete;
unsafe impl ClassType for CKSyncEnginePendingZoneDelete {
#[inherits(NSObject)]
type Super = CKSyncEnginePendingDatabaseChange;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CKSyncEnginePendingZoneDelete {}
unsafe impl Sync for CKSyncEnginePendingZoneDelete {}
unsafe impl NSObjectProtocol for CKSyncEnginePendingZoneDelete {}
extern_methods!(
unsafe impl CKSyncEnginePendingZoneDelete {
#[cfg(feature = "CKRecordZoneID")]
#[method_id(@__retain_semantics Init initWithZoneID:)]
pub unsafe fn initWithZoneID(
this: Allocated<Self>,
zone_id: &CKRecordZoneID,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `CKSyncEnginePendingDatabaseChange`
unsafe impl CKSyncEnginePendingZoneDelete {
#[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>;
}
);

View File

@@ -0,0 +1,75 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKSystemSharingUIObserver;
unsafe impl ClassType for CKSystemSharingUIObserver {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CKSystemSharingUIObserver {}
extern_methods!(
unsafe impl CKSystemSharingUIObserver {
#[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>;
#[cfg(feature = "CKContainer")]
#[method_id(@__retain_semantics Init initWithContainer:)]
pub unsafe fn initWithContainer(
this: Allocated<Self>,
container: &CKContainer,
) -> Retained<Self>;
#[cfg(all(
feature = "CKRecord",
feature = "CKRecordID",
feature = "CKShare",
feature = "block2"
))]
#[method(systemSharingUIDidSaveShareBlock)]
pub unsafe fn systemSharingUIDidSaveShareBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordID>, *mut CKShare, *mut NSError)>;
#[cfg(all(
feature = "CKRecord",
feature = "CKRecordID",
feature = "CKShare",
feature = "block2"
))]
#[method(setSystemSharingUIDidSaveShareBlock:)]
pub unsafe fn setSystemSharingUIDidSaveShareBlock(
&self,
system_sharing_ui_did_save_share_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordID>, *mut CKShare, *mut NSError)>,
>,
);
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[method(systemSharingUIDidStopSharingBlock)]
pub unsafe fn systemSharingUIDidStopSharingBlock(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<CKRecordID>, *mut NSError)>;
#[cfg(all(feature = "CKRecordID", feature = "block2"))]
#[method(setSystemSharingUIDidStopSharingBlock:)]
pub unsafe fn setSystemSharingUIDidStopSharingBlock(
&self,
system_sharing_ui_did_stop_sharing_block: Option<
&block2::Block<dyn Fn(NonNull<CKRecordID>, *mut NSError)>,
>,
);
}
);

View File

@@ -0,0 +1,51 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKUserIdentity;
unsafe impl ClassType for CKUserIdentity {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKUserIdentity {}
unsafe impl NSCopying for CKUserIdentity {}
unsafe impl NSObjectProtocol for CKUserIdentity {}
unsafe impl NSSecureCoding for CKUserIdentity {}
extern_methods!(
unsafe impl CKUserIdentity {
#[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>;
#[cfg(feature = "CKUserIdentityLookupInfo")]
#[method_id(@__retain_semantics Other lookupInfo)]
pub unsafe fn lookupInfo(&self) -> Option<Retained<CKUserIdentityLookupInfo>>;
#[method_id(@__retain_semantics Other nameComponents)]
pub unsafe fn nameComponents(&self) -> Option<Retained<NSPersonNameComponents>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other userRecordID)]
pub unsafe fn userRecordID(&self) -> Option<Retained<CKRecordID>>;
#[method_id(@__retain_semantics Other contactIdentifiers)]
pub unsafe fn contactIdentifiers(&self) -> Retained<NSArray<NSString>>;
#[method(hasiCloudAccount)]
pub unsafe fn hasiCloudAccount(&self) -> bool;
}
);

View File

@@ -0,0 +1,79 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKUserIdentityLookupInfo;
unsafe impl ClassType for CKUserIdentityLookupInfo {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CKUserIdentityLookupInfo {}
unsafe impl NSCopying for CKUserIdentityLookupInfo {}
unsafe impl NSObjectProtocol for CKUserIdentityLookupInfo {}
unsafe impl NSSecureCoding for CKUserIdentityLookupInfo {}
extern_methods!(
unsafe impl CKUserIdentityLookupInfo {
#[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 initWithEmailAddress:)]
pub unsafe fn initWithEmailAddress(
this: Allocated<Self>,
email_address: &NSString,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithPhoneNumber:)]
pub unsafe fn initWithPhoneNumber(
this: Allocated<Self>,
phone_number: &NSString,
) -> Retained<Self>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Init initWithUserRecordID:)]
pub unsafe fn initWithUserRecordID(
this: Allocated<Self>,
user_record_id: &CKRecordID,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other lookupInfosWithEmails:)]
pub unsafe fn lookupInfosWithEmails(
emails: &NSArray<NSString>,
) -> Retained<NSArray<CKUserIdentityLookupInfo>>;
#[method_id(@__retain_semantics Other lookupInfosWithPhoneNumbers:)]
pub unsafe fn lookupInfosWithPhoneNumbers(
phone_numbers: &NSArray<NSString>,
) -> Retained<NSArray<CKUserIdentityLookupInfo>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other lookupInfosWithRecordIDs:)]
pub unsafe fn lookupInfosWithRecordIDs(
record_i_ds: &NSArray<CKRecordID>,
) -> Retained<NSArray<CKUserIdentityLookupInfo>>;
#[method_id(@__retain_semantics Other emailAddress)]
pub unsafe fn emailAddress(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other phoneNumber)]
pub unsafe fn phoneNumber(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "CKRecordID")]
#[method_id(@__retain_semantics Other userRecordID)]
pub unsafe fn userRecordID(&self) -> Option<Retained<CKRecordID>>;
}
);

View File

@@ -0,0 +1,51 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[cfg(all(feature = "CKRecord", feature = "CKShare", feature = "block2"))]
pub type CKSharePreparationCompletionHandler =
*mut block2::Block<dyn Fn(*mut CKShare, *mut NSError)>;
#[cfg(all(feature = "CKRecord", feature = "CKShare", feature = "block2"))]
pub type CKSharePreparationHandler =
*mut block2::Block<dyn Fn(CKSharePreparationCompletionHandler)>;
extern_category!(
/// Category "CKSharingSupport" on [`NSItemProvider`].
#[doc(alias = "CKSharingSupport")]
pub unsafe trait NSItemProviderCKSharingSupport {
#[cfg(all(
feature = "CKAllowedSharingOptions",
feature = "CKContainer",
feature = "CKRecord",
feature = "CKShare",
feature = "block2"
))]
#[method(registerCKShareWithContainer:allowedSharingOptions:preparationHandler:)]
unsafe fn registerCKShareWithContainer_allowedSharingOptions_preparationHandler(
&self,
container: &CKContainer,
allowed_options: &CKAllowedSharingOptions,
preparation_handler: CKSharePreparationHandler,
);
#[cfg(all(
feature = "CKAllowedSharingOptions",
feature = "CKContainer",
feature = "CKRecord",
feature = "CKShare"
))]
#[method(registerCKShare:container:allowedSharingOptions:)]
unsafe fn registerCKShare_container_allowedSharingOptions(
&self,
share: &CKShare,
container: &CKContainer,
allowed_options: &CKAllowedSharingOptions,
);
}
unsafe impl NSItemProviderCKSharingSupport for NSItemProvider {}
);

View File

@@ -0,0 +1,523 @@
// This file has been automatically generated by `objc2`'s `header-translator`.
// DO NOT EDIT
#![allow(unused_imports)]
#![allow(deprecated)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(missing_docs)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::identity_op)]
#![allow(clippy::missing_safety_doc)]
#[link(name = "CloudKit", kind = "framework")]
extern "C" {}
#[cfg(feature = "CKAcceptSharesOperation")]
#[path = "CKAcceptSharesOperation.rs"]
mod __CKAcceptSharesOperation;
#[cfg(feature = "CKAllowedSharingOptions")]
#[path = "CKAllowedSharingOptions.rs"]
mod __CKAllowedSharingOptions;
#[cfg(feature = "CKAsset")]
#[path = "CKAsset.rs"]
mod __CKAsset;
#[cfg(feature = "CKContainer")]
#[path = "CKContainer.rs"]
mod __CKContainer;
#[cfg(feature = "CKDatabase")]
#[path = "CKDatabase.rs"]
mod __CKDatabase;
#[cfg(feature = "CKDatabaseOperation")]
#[path = "CKDatabaseOperation.rs"]
mod __CKDatabaseOperation;
#[cfg(feature = "CKDefines")]
#[path = "CKDefines.rs"]
mod __CKDefines;
#[cfg(feature = "CKDiscoverAllUserIdentitiesOperation")]
#[path = "CKDiscoverAllUserIdentitiesOperation.rs"]
mod __CKDiscoverAllUserIdentitiesOperation;
#[cfg(feature = "CKDiscoverUserIdentitiesOperation")]
#[path = "CKDiscoverUserIdentitiesOperation.rs"]
mod __CKDiscoverUserIdentitiesOperation;
#[cfg(feature = "CKError")]
#[path = "CKError.rs"]
mod __CKError;
#[cfg(feature = "CKFetchDatabaseChangesOperation")]
#[path = "CKFetchDatabaseChangesOperation.rs"]
mod __CKFetchDatabaseChangesOperation;
#[cfg(feature = "CKFetchNotificationChangesOperation")]
#[path = "CKFetchNotificationChangesOperation.rs"]
mod __CKFetchNotificationChangesOperation;
#[cfg(feature = "CKFetchRecordChangesOperation")]
#[path = "CKFetchRecordChangesOperation.rs"]
mod __CKFetchRecordChangesOperation;
#[cfg(feature = "CKFetchRecordZoneChangesOperation")]
#[path = "CKFetchRecordZoneChangesOperation.rs"]
mod __CKFetchRecordZoneChangesOperation;
#[cfg(feature = "CKFetchRecordZonesOperation")]
#[path = "CKFetchRecordZonesOperation.rs"]
mod __CKFetchRecordZonesOperation;
#[cfg(feature = "CKFetchRecordsOperation")]
#[path = "CKFetchRecordsOperation.rs"]
mod __CKFetchRecordsOperation;
#[cfg(feature = "CKFetchShareMetadataOperation")]
#[path = "CKFetchShareMetadataOperation.rs"]
mod __CKFetchShareMetadataOperation;
#[cfg(feature = "CKFetchShareParticipantsOperation")]
#[path = "CKFetchShareParticipantsOperation.rs"]
mod __CKFetchShareParticipantsOperation;
#[cfg(feature = "CKFetchSubscriptionsOperation")]
#[path = "CKFetchSubscriptionsOperation.rs"]
mod __CKFetchSubscriptionsOperation;
#[cfg(feature = "CKFetchWebAuthTokenOperation")]
#[path = "CKFetchWebAuthTokenOperation.rs"]
mod __CKFetchWebAuthTokenOperation;
#[cfg(feature = "CKLocationSortDescriptor")]
#[path = "CKLocationSortDescriptor.rs"]
mod __CKLocationSortDescriptor;
#[cfg(feature = "CKMarkNotificationsReadOperation")]
#[path = "CKMarkNotificationsReadOperation.rs"]
mod __CKMarkNotificationsReadOperation;
#[cfg(feature = "CKModifyBadgeOperation")]
#[path = "CKModifyBadgeOperation.rs"]
mod __CKModifyBadgeOperation;
#[cfg(feature = "CKModifyRecordZonesOperation")]
#[path = "CKModifyRecordZonesOperation.rs"]
mod __CKModifyRecordZonesOperation;
#[cfg(feature = "CKModifyRecordsOperation")]
#[path = "CKModifyRecordsOperation.rs"]
mod __CKModifyRecordsOperation;
#[cfg(feature = "CKModifySubscriptionsOperation")]
#[path = "CKModifySubscriptionsOperation.rs"]
mod __CKModifySubscriptionsOperation;
#[cfg(feature = "CKNotification")]
#[path = "CKNotification.rs"]
mod __CKNotification;
#[cfg(feature = "CKOperation")]
#[path = "CKOperation.rs"]
mod __CKOperation;
#[cfg(feature = "CKOperationGroup")]
#[path = "CKOperationGroup.rs"]
mod __CKOperationGroup;
#[cfg(feature = "CKQuery")]
#[path = "CKQuery.rs"]
mod __CKQuery;
#[cfg(feature = "CKQueryOperation")]
#[path = "CKQueryOperation.rs"]
mod __CKQueryOperation;
#[cfg(feature = "CKRecord")]
#[path = "CKRecord.rs"]
mod __CKRecord;
#[cfg(feature = "CKRecordID")]
#[path = "CKRecordID.rs"]
mod __CKRecordID;
#[cfg(feature = "CKRecordZone")]
#[path = "CKRecordZone.rs"]
mod __CKRecordZone;
#[cfg(feature = "CKRecordZoneID")]
#[path = "CKRecordZoneID.rs"]
mod __CKRecordZoneID;
#[cfg(feature = "CKReference")]
#[path = "CKReference.rs"]
mod __CKReference;
#[cfg(feature = "CKServerChangeToken")]
#[path = "CKServerChangeToken.rs"]
mod __CKServerChangeToken;
#[cfg(feature = "CKShare")]
#[path = "CKShare.rs"]
mod __CKShare;
#[cfg(feature = "CKShareMetadata")]
#[path = "CKShareMetadata.rs"]
mod __CKShareMetadata;
#[cfg(feature = "CKShareParticipant")]
#[path = "CKShareParticipant.rs"]
mod __CKShareParticipant;
#[cfg(feature = "CKSubscription")]
#[path = "CKSubscription.rs"]
mod __CKSubscription;
#[cfg(feature = "CKSyncEngine")]
#[path = "CKSyncEngine.rs"]
mod __CKSyncEngine;
#[cfg(feature = "CKSyncEngineConfiguration")]
#[path = "CKSyncEngineConfiguration.rs"]
mod __CKSyncEngineConfiguration;
#[cfg(feature = "CKSyncEngineEvent")]
#[path = "CKSyncEngineEvent.rs"]
mod __CKSyncEngineEvent;
#[cfg(feature = "CKSyncEngineRecordZoneChangeBatch")]
#[path = "CKSyncEngineRecordZoneChangeBatch.rs"]
mod __CKSyncEngineRecordZoneChangeBatch;
#[cfg(feature = "CKSyncEngineState")]
#[path = "CKSyncEngineState.rs"]
mod __CKSyncEngineState;
#[cfg(feature = "CKSystemSharingUIObserver")]
#[path = "CKSystemSharingUIObserver.rs"]
mod __CKSystemSharingUIObserver;
#[cfg(feature = "CKUserIdentity")]
#[path = "CKUserIdentity.rs"]
mod __CKUserIdentity;
#[cfg(feature = "CKUserIdentityLookupInfo")]
#[path = "CKUserIdentityLookupInfo.rs"]
mod __CKUserIdentityLookupInfo;
#[cfg(feature = "NSItemProvider_CKSharingSupport")]
#[path = "NSItemProvider_CKSharingSupport.rs"]
mod __NSItemProvider_CKSharingSupport;
#[cfg(all(feature = "CKAcceptSharesOperation", feature = "CKOperation"))]
pub use self::__CKAcceptSharesOperation::CKAcceptSharesOperation;
#[cfg(feature = "CKAllowedSharingOptions")]
pub use self::__CKAllowedSharingOptions::CKAllowedSharingOptions;
#[cfg(feature = "CKAllowedSharingOptions")]
pub use self::__CKAllowedSharingOptions::CKSharingParticipantAccessOption;
#[cfg(feature = "CKAllowedSharingOptions")]
pub use self::__CKAllowedSharingOptions::CKSharingParticipantPermissionOption;
#[cfg(feature = "CKAsset")]
pub use self::__CKAsset::CKAsset;
#[cfg(feature = "CKContainer")]
pub use self::__CKContainer::CKAccountChangedNotification;
#[cfg(feature = "CKContainer")]
pub use self::__CKContainer::CKAccountStatus;
#[cfg(all(feature = "CKContainer", feature = "block2"))]
pub use self::__CKContainer::CKApplicationPermissionBlock;
#[cfg(feature = "CKContainer")]
pub use self::__CKContainer::CKApplicationPermissionStatus;
#[cfg(feature = "CKContainer")]
pub use self::__CKContainer::CKApplicationPermissions;
#[cfg(feature = "CKContainer")]
pub use self::__CKContainer::CKContainer;
#[cfg(feature = "CKContainer")]
pub use self::__CKContainer::CKCurrentUserDefaultName;
#[cfg(feature = "CKContainer")]
pub use self::__CKContainer::CKOwnerDefaultName;
#[cfg(feature = "CKDatabase")]
pub use self::__CKDatabase::CKDatabase;
#[cfg(feature = "CKDatabase")]
pub use self::__CKDatabase::CKDatabaseScope;
#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
pub use self::__CKDatabaseOperation::CKDatabaseOperation;
#[cfg(all(
feature = "CKDiscoverAllUserIdentitiesOperation",
feature = "CKOperation"
))]
pub use self::__CKDiscoverAllUserIdentitiesOperation::CKDiscoverAllUserIdentitiesOperation;
#[cfg(all(feature = "CKDiscoverUserIdentitiesOperation", feature = "CKOperation"))]
pub use self::__CKDiscoverUserIdentitiesOperation::CKDiscoverUserIdentitiesOperation;
#[cfg(feature = "CKError")]
pub use self::__CKError::CKErrorCode;
#[cfg(feature = "CKError")]
pub use self::__CKError::CKErrorDomain;
#[cfg(feature = "CKError")]
pub use self::__CKError::CKErrorRetryAfterKey;
#[cfg(feature = "CKError")]
pub use self::__CKError::CKErrorUserDidResetEncryptedDataKey;
#[cfg(feature = "CKError")]
pub use self::__CKError::CKPartialErrorsByItemIDKey;
#[cfg(feature = "CKError")]
pub use self::__CKError::CKRecordChangedErrorAncestorRecordKey;
#[cfg(feature = "CKError")]
pub use self::__CKError::CKRecordChangedErrorClientRecordKey;
#[cfg(feature = "CKError")]
pub use self::__CKError::CKRecordChangedErrorServerRecordKey;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKFetchDatabaseChangesOperation",
feature = "CKOperation"
))]
pub use self::__CKFetchDatabaseChangesOperation::CKFetchDatabaseChangesOperation;
#[cfg(all(
feature = "CKFetchNotificationChangesOperation",
feature = "CKOperation"
))]
pub use self::__CKFetchNotificationChangesOperation::CKFetchNotificationChangesOperation;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKFetchRecordChangesOperation",
feature = "CKOperation"
))]
pub use self::__CKFetchRecordChangesOperation::CKFetchRecordChangesOperation;
#[cfg(feature = "CKFetchRecordZoneChangesOperation")]
pub use self::__CKFetchRecordZoneChangesOperation::CKFetchRecordZoneChangesConfiguration;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKFetchRecordZoneChangesOperation",
feature = "CKOperation"
))]
pub use self::__CKFetchRecordZoneChangesOperation::CKFetchRecordZoneChangesOperation;
#[cfg(feature = "CKFetchRecordZoneChangesOperation")]
pub use self::__CKFetchRecordZoneChangesOperation::CKFetchRecordZoneChangesOptions;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKFetchRecordZonesOperation",
feature = "CKOperation"
))]
pub use self::__CKFetchRecordZonesOperation::CKFetchRecordZonesOperation;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKFetchRecordsOperation",
feature = "CKOperation"
))]
pub use self::__CKFetchRecordsOperation::CKFetchRecordsOperation;
#[cfg(all(feature = "CKFetchShareMetadataOperation", feature = "CKOperation"))]
pub use self::__CKFetchShareMetadataOperation::CKFetchShareMetadataOperation;
#[cfg(all(feature = "CKFetchShareParticipantsOperation", feature = "CKOperation"))]
pub use self::__CKFetchShareParticipantsOperation::CKFetchShareParticipantsOperation;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKFetchSubscriptionsOperation",
feature = "CKOperation"
))]
pub use self::__CKFetchSubscriptionsOperation::CKFetchSubscriptionsOperation;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKFetchWebAuthTokenOperation",
feature = "CKOperation"
))]
pub use self::__CKFetchWebAuthTokenOperation::CKFetchWebAuthTokenOperation;
#[cfg(feature = "CKLocationSortDescriptor")]
pub use self::__CKLocationSortDescriptor::CKLocationSortDescriptor;
#[cfg(all(feature = "CKMarkNotificationsReadOperation", feature = "CKOperation"))]
pub use self::__CKMarkNotificationsReadOperation::CKMarkNotificationsReadOperation;
#[cfg(all(feature = "CKModifyBadgeOperation", feature = "CKOperation"))]
pub use self::__CKModifyBadgeOperation::CKModifyBadgeOperation;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKModifyRecordZonesOperation",
feature = "CKOperation"
))]
pub use self::__CKModifyRecordZonesOperation::CKModifyRecordZonesOperation;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKModifyRecordsOperation",
feature = "CKOperation"
))]
pub use self::__CKModifyRecordsOperation::CKModifyRecordsOperation;
#[cfg(feature = "CKModifyRecordsOperation")]
pub use self::__CKModifyRecordsOperation::CKRecordSavePolicy;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKModifySubscriptionsOperation",
feature = "CKOperation"
))]
pub use self::__CKModifySubscriptionsOperation::CKModifySubscriptionsOperation;
#[cfg(feature = "CKNotification")]
pub use self::__CKNotification::CKDatabaseNotification;
#[cfg(feature = "CKNotification")]
pub use self::__CKNotification::CKNotification;
#[cfg(feature = "CKNotification")]
pub use self::__CKNotification::CKNotificationID;
#[cfg(feature = "CKNotification")]
pub use self::__CKNotification::CKNotificationType;
#[cfg(feature = "CKNotification")]
pub use self::__CKNotification::CKQueryNotification;
#[cfg(feature = "CKNotification")]
pub use self::__CKNotification::CKQueryNotificationReason;
#[cfg(feature = "CKNotification")]
pub use self::__CKNotification::CKRecordZoneNotification;
#[cfg(feature = "CKOperation")]
pub use self::__CKOperation::CKOperation;
#[cfg(feature = "CKOperation")]
pub use self::__CKOperation::CKOperationConfiguration;
#[cfg(feature = "CKOperation")]
pub use self::__CKOperation::CKOperationID;
#[cfg(feature = "CKOperationGroup")]
pub use self::__CKOperationGroup::CKOperationGroup;
#[cfg(feature = "CKOperationGroup")]
pub use self::__CKOperationGroup::CKOperationGroupTransferSize;
#[cfg(feature = "CKQuery")]
pub use self::__CKQuery::CKQuery;
#[cfg(feature = "CKQueryOperation")]
pub use self::__CKQueryOperation::CKQueryCursor;
#[cfg(all(
feature = "CKDatabaseOperation",
feature = "CKOperation",
feature = "CKQueryOperation"
))]
pub use self::__CKQueryOperation::CKQueryOperation;
#[cfg(feature = "CKQueryOperation")]
pub use self::__CKQueryOperation::CKQueryOperationMaximumResults;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecord;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordCreationDateKey;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordCreatorUserRecordIDKey;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordFieldKey;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordKeyValueSetting;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordLastModifiedUserRecordIDKey;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordModificationDateKey;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordParentKey;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordRecordIDKey;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordShareKey;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordType;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordTypeUserRecord;
#[cfg(feature = "CKRecord")]
pub use self::__CKRecord::CKRecordValue;
#[cfg(feature = "CKRecordID")]
pub use self::__CKRecordID::CKRecordID;
#[cfg(feature = "CKRecordZone")]
pub use self::__CKRecordZone::CKRecordZone;
#[cfg(feature = "CKRecordZone")]
pub use self::__CKRecordZone::CKRecordZoneCapabilities;
#[cfg(feature = "CKRecordZone")]
pub use self::__CKRecordZone::CKRecordZoneDefaultName;
#[cfg(feature = "CKRecordZoneID")]
pub use self::__CKRecordZoneID::CKRecordZoneID;
#[cfg(feature = "CKReference")]
pub use self::__CKReference::CKReference;
#[cfg(feature = "CKReference")]
pub use self::__CKReference::CKReferenceAction;
#[cfg(feature = "CKServerChangeToken")]
pub use self::__CKServerChangeToken::CKServerChangeToken;
#[cfg(feature = "CKShare")]
pub use self::__CKShare::CKRecordNameZoneWideShare;
#[cfg(all(feature = "CKRecord", feature = "CKShare"))]
pub use self::__CKShare::CKRecordTypeShare;
#[cfg(all(feature = "CKRecord", feature = "CKShare"))]
pub use self::__CKShare::CKShare;
#[cfg(all(feature = "CKRecord", feature = "CKShare"))]
pub use self::__CKShare::CKShareThumbnailImageDataKey;
#[cfg(all(feature = "CKRecord", feature = "CKShare"))]
pub use self::__CKShare::CKShareTitleKey;
#[cfg(all(feature = "CKRecord", feature = "CKShare"))]
pub use self::__CKShare::CKShareTypeKey;
#[cfg(feature = "CKShareMetadata")]
pub use self::__CKShareMetadata::CKShareMetadata;
#[cfg(feature = "CKShareParticipant")]
pub use self::__CKShareParticipant::CKShareParticipant;
#[cfg(feature = "CKShareParticipant")]
pub use self::__CKShareParticipant::CKShareParticipantAcceptanceStatus;
#[cfg(feature = "CKShareParticipant")]
pub use self::__CKShareParticipant::CKShareParticipantPermission;
#[cfg(feature = "CKShareParticipant")]
pub use self::__CKShareParticipant::CKShareParticipantRole;
#[cfg(feature = "CKShareParticipant")]
pub use self::__CKShareParticipant::CKShareParticipantType;
#[cfg(feature = "CKSubscription")]
pub use self::__CKSubscription::CKDatabaseSubscription;
#[cfg(feature = "CKSubscription")]
pub use self::__CKSubscription::CKNotificationInfo;
#[cfg(feature = "CKSubscription")]
pub use self::__CKSubscription::CKQuerySubscription;
#[cfg(feature = "CKSubscription")]
pub use self::__CKSubscription::CKQuerySubscriptionOptions;
#[cfg(feature = "CKSubscription")]
pub use self::__CKSubscription::CKRecordZoneSubscription;
#[cfg(feature = "CKSubscription")]
pub use self::__CKSubscription::CKSubscription;
#[cfg(feature = "CKSubscription")]
pub use self::__CKSubscription::CKSubscriptionID;
#[cfg(feature = "CKSubscription")]
pub use self::__CKSubscription::CKSubscriptionType;
#[cfg(feature = "CKSyncEngine")]
pub use self::__CKSyncEngine::CKSyncEngine;
#[cfg(feature = "CKSyncEngine")]
pub use self::__CKSyncEngine::CKSyncEngineDelegate;
#[cfg(feature = "CKSyncEngine")]
pub use self::__CKSyncEngine::CKSyncEngineFetchChangesContext;
#[cfg(feature = "CKSyncEngine")]
pub use self::__CKSyncEngine::CKSyncEngineFetchChangesOptions;
#[cfg(feature = "CKSyncEngine")]
pub use self::__CKSyncEngine::CKSyncEngineFetchChangesScope;
#[cfg(feature = "CKSyncEngine")]
pub use self::__CKSyncEngine::CKSyncEngineSendChangesContext;
#[cfg(feature = "CKSyncEngine")]
pub use self::__CKSyncEngine::CKSyncEngineSendChangesOptions;
#[cfg(feature = "CKSyncEngine")]
pub use self::__CKSyncEngine::CKSyncEngineSendChangesScope;
#[cfg(feature = "CKSyncEngine")]
pub use self::__CKSyncEngine::CKSyncEngineSyncReason;
#[cfg(feature = "CKSyncEngineConfiguration")]
pub use self::__CKSyncEngineConfiguration::CKSyncEngineConfiguration;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineAccountChangeEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineAccountChangeType;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineDidFetchChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineDidFetchRecordZoneChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineDidSendChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineEventType;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineFailedRecordSave;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineFailedZoneSave;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineFetchedDatabaseChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineFetchedRecordDeletion;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineFetchedRecordZoneChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineFetchedZoneDeletion;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineSentDatabaseChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineSentRecordZoneChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineStateUpdateEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineWillFetchChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineWillFetchRecordZoneChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineWillSendChangesEvent;
#[cfg(feature = "CKSyncEngineEvent")]
pub use self::__CKSyncEngineEvent::CKSyncEngineZoneDeletionReason;
#[cfg(feature = "CKSyncEngineRecordZoneChangeBatch")]
pub use self::__CKSyncEngineRecordZoneChangeBatch::CKSyncEngineRecordZoneChangeBatch;
#[cfg(feature = "CKSyncEngineState")]
pub use self::__CKSyncEngineState::CKSyncEnginePendingDatabaseChange;
#[cfg(feature = "CKSyncEngineState")]
pub use self::__CKSyncEngineState::CKSyncEnginePendingDatabaseChangeType;
#[cfg(feature = "CKSyncEngineState")]
pub use self::__CKSyncEngineState::CKSyncEnginePendingRecordZoneChange;
#[cfg(feature = "CKSyncEngineState")]
pub use self::__CKSyncEngineState::CKSyncEnginePendingRecordZoneChangeType;
#[cfg(feature = "CKSyncEngineState")]
pub use self::__CKSyncEngineState::CKSyncEnginePendingZoneDelete;
#[cfg(feature = "CKSyncEngineState")]
pub use self::__CKSyncEngineState::CKSyncEnginePendingZoneSave;
#[cfg(feature = "CKSyncEngineState")]
pub use self::__CKSyncEngineState::CKSyncEngineState;
#[cfg(feature = "CKSyncEngineState")]
pub use self::__CKSyncEngineState::CKSyncEngineStateSerialization;
#[cfg(feature = "CKSystemSharingUIObserver")]
pub use self::__CKSystemSharingUIObserver::CKSystemSharingUIObserver;
#[cfg(feature = "CKUserIdentity")]
pub use self::__CKUserIdentity::CKUserIdentity;
#[cfg(feature = "CKUserIdentityLookupInfo")]
pub use self::__CKUserIdentityLookupInfo::CKUserIdentityLookupInfo;
#[cfg(all(
feature = "CKRecord",
feature = "CKShare",
feature = "NSItemProvider_CKSharingSupport",
feature = "block2"
))]
pub use self::__NSItemProvider_CKSharingSupport::CKSharePreparationCompletionHandler;
#[cfg(all(
feature = "CKRecord",
feature = "CKShare",
feature = "NSItemProvider_CKSharingSupport",
feature = "block2"
))]
pub use self::__NSItemProvider_CKSharingSupport::CKSharePreparationHandler;
#[cfg(feature = "NSItemProvider_CKSharingSupport")]
pub use self::__NSItemProvider_CKSharingSupport::NSItemProviderCKSharingSupport;

20
vendor/objc2-cloud-kit/src/lib.rs vendored Normal file
View File

@@ -0,0 +1,20 @@
//! # Bindings to the `CloudKit` framework
//!
//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information.
//!
//! [apple-doc]: https://developer.apple.com/documentation/cloudkit/
//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Update in Cargo.toml as well.
#![doc(html_root_url = "https://docs.rs/objc2-cloud-kit/0.2.2")]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;

View File

@@ -0,0 +1,12 @@
framework = "CloudKit"
crate = "objc2-cloud-kit"
required-dependencies = ["objc2-foundation"]
macos = "10.10"
maccatalyst = "13.0"
ios = "8.0"
tvos = "9.0"
watchos = "3.0"
visionos = "1.0"
class.CKRecordID.mutability = "Immutable"
class.CKRecordZoneID.mutability = "Immutable"