icrate 0.0.1

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::CoreData::*;
use crate::Foundation::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSPersistentStoreDescription;

    unsafe impl ClassType for NSPersistentStoreDescription {
        type Super = NSObject;
    }
);

extern_methods!(
    unsafe impl NSPersistentStoreDescription {
        #[method_id(@__retain_semantics Other persistentStoreDescriptionWithURL:)]
        pub unsafe fn persistentStoreDescriptionWithURL(URL: &NSURL) -> Id<Self, Shared>;

        #[method_id(@__retain_semantics Other type)]
        pub unsafe fn type_(&self) -> Id<NSString, Shared>;

        #[method(setType:)]
        pub unsafe fn setType(&self, type_: &NSString);

        #[method_id(@__retain_semantics Other configuration)]
        pub unsafe fn configuration(&self) -> Option<Id<NSString, Shared>>;

        #[method(setConfiguration:)]
        pub unsafe fn setConfiguration(&self, configuration: Option<&NSString>);

        #[method_id(@__retain_semantics Other URL)]
        pub unsafe fn URL(&self) -> Option<Id<NSURL, Shared>>;

        #[method(setURL:)]
        pub unsafe fn setURL(&self, URL: Option<&NSURL>);

        #[method_id(@__retain_semantics Other options)]
        pub unsafe fn options(&self) -> Id<NSDictionary<NSString, NSObject>, Shared>;

        #[method(setOption:forKey:)]
        pub unsafe fn setOption_forKey(&self, option: Option<&NSObject>, key: &NSString);

        #[method(isReadOnly)]
        pub unsafe fn isReadOnly(&self) -> bool;

        #[method(setReadOnly:)]
        pub unsafe fn setReadOnly(&self, readOnly: bool);

        #[method(timeout)]
        pub unsafe fn timeout(&self) -> NSTimeInterval;

        #[method(setTimeout:)]
        pub unsafe fn setTimeout(&self, timeout: NSTimeInterval);

        #[method_id(@__retain_semantics Other sqlitePragmas)]
        pub unsafe fn sqlitePragmas(&self) -> Id<NSDictionary<NSString, NSObject>, Shared>;

        #[method(setValue:forPragmaNamed:)]
        pub unsafe fn setValue_forPragmaNamed(&self, value: Option<&NSObject>, name: &NSString);

        #[method(shouldAddStoreAsynchronously)]
        pub unsafe fn shouldAddStoreAsynchronously(&self) -> bool;

        #[method(setShouldAddStoreAsynchronously:)]
        pub unsafe fn setShouldAddStoreAsynchronously(&self, shouldAddStoreAsynchronously: bool);

        #[method(shouldMigrateStoreAutomatically)]
        pub unsafe fn shouldMigrateStoreAutomatically(&self) -> bool;

        #[method(setShouldMigrateStoreAutomatically:)]
        pub unsafe fn setShouldMigrateStoreAutomatically(
            &self,
            shouldMigrateStoreAutomatically: bool,
        );

        #[method(shouldInferMappingModelAutomatically)]
        pub unsafe fn shouldInferMappingModelAutomatically(&self) -> bool;

        #[method(setShouldInferMappingModelAutomatically:)]
        pub unsafe fn setShouldInferMappingModelAutomatically(
            &self,
            shouldInferMappingModelAutomatically: bool,
        );

        #[method_id(@__retain_semantics Init initWithURL:)]
        pub unsafe fn initWithURL(this: Option<Allocated<Self>>, url: &NSURL) -> Id<Self, Shared>;
    }
);

extern_methods!(
    /// NSPersistentCloudKitContainerAdditions
    unsafe impl NSPersistentStoreDescription {
        #[method_id(@__retain_semantics Other cloudKitContainerOptions)]
        pub unsafe fn cloudKitContainerOptions(
            &self,
        ) -> Option<Id<NSPersistentCloudKitContainerOptions, Shared>>;

        #[method(setCloudKitContainerOptions:)]
        pub unsafe fn setCloudKitContainerOptions(
            &self,
            cloudKitContainerOptions: Option<&NSPersistentCloudKitContainerOptions>,
        );
    }
);