use crate::common::*;
use crate::CoreData::*;
use crate::Foundation::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentStore;
unsafe impl ClassType for NSPersistentStore {
type Super = NSObject;
}
);
extern_methods!(
unsafe impl NSPersistentStore {
#[method_id(@__retain_semantics Other metadataForPersistentStoreWithURL:error:)]
pub unsafe fn metadataForPersistentStoreWithURL_error(
url: &NSURL,
) -> Result<Id<NSDictionary<NSString, Object>, Shared>, Id<NSError, Shared>>;
#[method(setMetadata:forPersistentStoreWithURL:error:)]
pub unsafe fn setMetadata_forPersistentStoreWithURL_error(
metadata: Option<&NSDictionary<NSString, Object>>,
url: &NSURL,
) -> Result<(), Id<NSError, Shared>>;
#[method(migrationManagerClass)]
pub unsafe fn migrationManagerClass() -> &'static Class;
#[method_id(@__retain_semantics Init initWithPersistentStoreCoordinator:configurationName:URL:options:)]
pub unsafe fn initWithPersistentStoreCoordinator_configurationName_URL_options(
this: Option<Allocated<Self>>,
root: Option<&NSPersistentStoreCoordinator>,
name: Option<&NSString>,
url: &NSURL,
options: Option<&NSDictionary>,
) -> Id<Self, Shared>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self, Shared>;
#[method(loadMetadata:)]
pub unsafe fn loadMetadata(&self) -> Result<(), Id<NSError, Shared>>;
#[method_id(@__retain_semantics Other persistentStoreCoordinator)]
pub unsafe fn persistentStoreCoordinator(
&self,
) -> Option<Id<NSPersistentStoreCoordinator, Shared>>;
#[method_id(@__retain_semantics Other configurationName)]
pub unsafe fn configurationName(&self) -> Id<NSString, Shared>;
#[method_id(@__retain_semantics Other options)]
pub unsafe fn options(&self) -> Option<Id<NSDictionary, Shared>>;
#[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 identifier)]
pub unsafe fn identifier(&self) -> Id<NSString, Shared>;
#[method(setIdentifier:)]
pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>);
#[method_id(@__retain_semantics Other type)]
pub unsafe fn type_(&self) -> Id<NSString, Shared>;
#[method(isReadOnly)]
pub unsafe fn isReadOnly(&self) -> bool;
#[method(setReadOnly:)]
pub unsafe fn setReadOnly(&self, readOnly: bool);
#[method_id(@__retain_semantics Other metadata)]
pub unsafe fn metadata(&self) -> Option<Id<NSDictionary<NSString, Object>, Shared>>;
#[method(setMetadata:)]
pub unsafe fn setMetadata(&self, metadata: Option<&NSDictionary<NSString, Object>>);
#[method(didAddToPersistentStoreCoordinator:)]
pub unsafe fn didAddToPersistentStoreCoordinator(
&self,
coordinator: &NSPersistentStoreCoordinator,
);
#[method(willRemoveFromPersistentStoreCoordinator:)]
pub unsafe fn willRemoveFromPersistentStoreCoordinator(
&self,
coordinator: Option<&NSPersistentStoreCoordinator>,
);
#[method_id(@__retain_semantics Other coreSpotlightExporter)]
pub unsafe fn coreSpotlightExporter(&self) -> Id<NSCoreDataCoreSpotlightDelegate, Shared>;
}
);