diff --git a/src/coredata.cs b/src/coredata.cs index 40a9e19263c3..fcc993103e02 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -22,6 +22,16 @@ public enum NSPersistentStoreUbiquitousTransitionType : nuint_compat_int { InitialImportCompleted } + [Native] + public enum NSSnapshotEventType : nuint_compat_int { + UndoInsertion = 1 << 1, + UndoDeletion = 1 << 2, + UndoUpdate = 1 << 3, + Rollback = 1 << 4, + Refresh = 1 << 5, + MergePolicy = 1 << 6 + } + [BaseType (typeof (NSPersistentStore))] // Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: NSMappedObjectStore must be initialized with initWithPersistentStoreCoordinator:configurationName:URL:options [DisableDefaultCtor] @@ -127,6 +137,9 @@ public interface NSEntityDescription : NSCoding, NSCopying { [Export ("managedObjectClassName")] string ManagedObjectClassName { get; set; } + [Export ("renamingIdentifier")] + string RenamingIdentifier { get; set; } + [NullAllowed] // by default this property is null [Export ("name")] string Name { get; set; } @@ -252,6 +265,16 @@ public interface NSEntityMigrationPolicy { bool EndEntityMapping (NSEntityMapping mapping, NSMigrationManager manager, out NSError error); } + [BaseType (typeof (NSPropertyDescription))] + public interface NSExpressionDescription { + + [Export ("expression")] + NSExpression Expression { get; set; } + + [Export ("expressionResultType")] + NSAttributeType ResultType { get; set; } + } + [BaseType (typeof (NSPropertyDescription))] public interface NSFetchedPropertyDescription { @@ -260,6 +283,28 @@ public interface NSFetchedPropertyDescription { NSFetchRequest FetchRequest { get; set; } } + [DisableDefaultCtor] + [BaseType (typeof (NSExpression))] + public interface NSFetchRequestExpression { + + [Internal] + [DesignatedInitializer] + [Export ("initWithExpressionType:")] + IntPtr Constructor (NSExpressionType type); + + [Static, Export ("expressionForFetch:context:countOnly:")] + NSFetchRequestExpression FromFetch (NSExpression fetch, NSExpression context, bool countOnly); + + [Export ("requestExpression")] + NSExpression Request { get; } + + [Export ("contextExpression")] + NSExpression Context { get; } + + [Export ("countOnlyRequest")] + bool IsCountOnly { [Bind ("isCountOnlyRequest")] get;} + } + [BaseType (typeof (NSPersistentStoreRequest))] public interface NSFetchRequest : NSCoding { @@ -548,6 +593,9 @@ public interface NSManagedObject { [Export ("isFault")] bool IsFault { get; } + [Export ("faultingState")] + nuint FaultingState { get; } + [Export ("hasFaultForRelationshipNamed:")] bool HasFaultForRelationshipNamed (string key); @@ -926,6 +974,9 @@ public interface NSMappingModel { [Static, Export ("mappingModelFromBundles:forSourceModel:destinationModel:")] NSMappingModel MappingModelFromBundles (NSBundle[] bundles, NSManagedObjectModel sourceModel, NSManagedObjectModel destinationModel); + [Static, Export ("inferredMappingModelForSourceModel:destinationModel:error:")] + NSMappingModel GetInferredMappingModel (NSManagedObjectModel source, NSManagedObjectModel destination, out NSError error); + [Export ("initWithContentsOfURL:")] IntPtr Constructor (NSUrl url); @@ -1451,6 +1502,9 @@ public interface NSPropertyDescription : NSCoding, NSCopying { [Export ("versionHashModifier")] string VersionHashModifier { get; set; } + [Export ("renamingIdentifier")] + string RenamingIdentifier { get; set; } + // 5.0 [Since (5,0)] [Export ("indexedBySpotlight")]