~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/maccore/src/coredata.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
namespace MonoMac.CoreData
15
15
{
16
16
        [BaseType (typeof (NSPersistentStore))]
 
17
        // Objective-C exception thrown.  Name: NSInternalInconsistencyException Reason: NSMappedObjectStore must be initialized with initWithPersistentStoreCoordinator:configurationName:URL:options
 
18
        [DisableDefaultCtor]
17
19
        public interface NSAtomicStore {
18
20
 
19
21
                [Export ("initWithPersistentStoreCoordinator:configurationName:URL:options:")]
20
 
                IntPtr Constructor (NSPersistentStoreCoordinator coordinator, string configurationName, NSUrl url, NSDictionary options);
 
22
                IntPtr Constructor (NSPersistentStoreCoordinator coordinator, string configurationName, NSUrl url, [NullAllowed] NSDictionary options);
21
23
 
22
24
                [Export ("load:")]
23
25
                bool Load (out NSError error);
54
56
 
55
57
        }
56
58
        [BaseType (typeof (NSObject))]
 
59
        // Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: NSAtomicStoreCacheNodes must be initialized using initWithObjectID:(NSManagedObjectID *)
 
60
        [DisableDefaultCtor]
57
61
        public interface NSAtomicStoreCacheNode {
58
62
 
59
63
                [Export ("initWithObjectID:")]
82
86
                string AttributeValueClassName { get; set; }
83
87
 
84
88
                [Export ("defaultValue")]
85
 
                NSAttributeDescription DefaultValue { get; }
86
 
 
87
 
                [Export ("setDefaultValue:")]
88
 
                void SetDefaultValue (NSObject value);
 
89
                NSObject DefaultValue { get; set; }
89
90
 
90
91
                [Export ("versionHash")]
91
92
                NSData VersionHash { get; }
115
116
                [Export ("name")]
116
117
                string Name { get; set; }
117
118
 
118
 
                [Export ("isAbstract")]
 
119
                [Export ("Abstract")]
119
120
                bool Abstract { [Bind("isAbstract")] get; set; }
120
121
 
121
122
                [Export ("subentitiesByName")]
291
292
                [Export ("propertiesToGroupBy")]
292
293
                NSPropertyDescription [] PropertiesToGroupBy { get; set; }
293
294
        }
294
 
 
 
295
#if !MONOMAC
 
296
        [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" })]
 
297
        interface NSFetchedResultsController {
 
298
 
 
299
                [Export ("initWithFetchRequest:managedObjectContext:sectionNameKeyPath:cacheName:")]
 
300
                IntPtr Constructor (NSFetchRequest fetchRequest, NSManagedObjectContext context, [NullAllowed] string sectionNameKeyPath, [NullAllowed] string name);
 
301
 
 
302
                [Wrap ("WeakDelegate")]
 
303
                NSFetchedResultsControllerDelegate Delegate { get; set; }
 
304
 
 
305
                [Export ("delegate", ArgumentSemantic.Assign)][NullAllowed]
 
306
                NSObject WeakDelegate { get; set; }
 
307
 
 
308
                [Export ("cacheName")]
 
309
                string CacheName { get; }
 
310
 
 
311
                [Export ("fetchedObjects")]
 
312
                NSObject[] FetchedObjects { get; }
 
313
 
 
314
                [Export ("fetchRequest")]
 
315
                NSFetchRequest FetchRequest { get; }
 
316
 
 
317
                [Export ("managedObjectContext")]
 
318
                NSManagedObjectContext ManagedObjectContext { get; }
 
319
 
 
320
                [Export ("sectionNameKeyPath")]
 
321
                string SectionNameKeyPath { get; }
 
322
 
 
323
                [Export ("sections")]
 
324
                NSFetchedResultsSectionInfo[] Sections { get; }
 
325
 
 
326
                [Export ("performFetch:")]
 
327
                bool PerformFetch (out NSError error);
 
328
 
 
329
                [Export ("indexPathForObject:")]
 
330
                NSIndexPath FromObject (NSObject obj);
 
331
 
 
332
                [Export ("objectAtIndexPath:")]
 
333
                NSObject ObjectAt (NSIndexPath path);
 
334
 
 
335
                [Export ("sectionForSectionIndexTitle:atIndex:")]
 
336
                // name like UITableViewSource's similar (and linked) selector
 
337
                int SectionFor (string title, int atIndex);
 
338
 
 
339
                [Export ("sectionIndexTitleForSectionName:")]
 
340
                // again named like UITableViewSource
 
341
                string SectionIndexTitles (string sectionName);
 
342
 
 
343
                [Static]
 
344
                [Export ("deleteCacheWithName:")]
 
345
                void DeleteCache ([NullAllowed] string name);
 
346
        }
 
347
 
 
348
        [BaseType (typeof (NSObject))]
 
349
        [Model]
 
350
        [Protocol]
 
351
        interface NSFetchedResultsControllerDelegate {
 
352
                [Export ("controllerWillChangeContent:")]
 
353
                void WillChangeContent (NSFetchedResultsController controller);
 
354
 
 
355
                [Export ("controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:")]
 
356
                void DidChangeObject (NSFetchedResultsController controller, NSObject anObject, NSIndexPath indexPath, NSFetchedResultsChangeType type, NSIndexPath newIndexPath);
 
357
 
 
358
                [Export ("controller:didChangeSection:atIndex:forChangeType:")]
 
359
                void DidChangeSection (NSFetchedResultsController controller, NSFetchedResultsSectionInfo sectionInfo, uint sectionIndex, NSFetchedResultsChangeType type);
 
360
 
 
361
                [Export ("controllerDidChangeContent:")]
 
362
                void DidChangeContent (NSFetchedResultsController controller);
 
363
 
 
364
                [Export ("controller:sectionIndexTitleForSectionName:")]
 
365
                string SectionFor (NSFetchedResultsController controller, string sectionName);
 
366
        }
 
367
 
 
368
        [BaseType (typeof (NSObject))]
 
369
        [Model]
 
370
        [Protocol]
 
371
        interface NSFetchedResultsSectionInfo {
 
372
                [Export ("numberOfObjects")]
 
373
                int Count { get; }
 
374
 
 
375
                [Export ("objects")]
 
376
                NSObject[] Objects { get; }
 
377
 
 
378
                [Export ("name")]
 
379
                string Name { get; }
 
380
 
 
381
                [Export ("indexTitle")]
 
382
                string IndexTitle { get; }
 
383
        }
 
384
#endif
295
385
        [Since(5,0)]
296
386
        [BaseType (typeof (NSPersistentStore))]
297
387
        interface NSIncrementalStore {
348
438
        }
349
439
 
350
440
        [BaseType (typeof (NSObject))]
 
441
        // 'init' issues a warning: CoreData: error: Failed to call designated initializer on NSManagedObject class 'NSManagedObject' 
 
442
        // then crash while disposing the instance
 
443
        [DisableDefaultCtor]
351
444
        public interface NSManagedObject {
352
445
                [Export ("initWithEntity:insertIntoManagedObjectContext:")]
353
446
                IntPtr Constructor (NSEntityDescription entity, NSManagedObjectContext context);
557
650
                IntPtr Constructor (NSManagedObjectContextConcurrencyType ct);
558
651
 
559
652
                [Export ("performBlock:")]
 
653
                [Async]
560
654
                void Perform (/* non null */ NSAction action);
561
655
 
562
656
                [Export ("performBlockAndWait:")]
572
666
                [Export ("parentContext")]
573
667
                NSManagedObjectContext ParentContext { get; set; }
574
668
        }
 
669
 
575
670
        [BaseType (typeof (NSObject))]
 
671
        // Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: *** -URIRepresentation cannot be sent to an abstract object of class NSManagedObjectID: Create a concrete instance!
 
672
        [DisableDefaultCtor]
576
673
        public interface NSManagedObjectID {
577
674
 
578
675
                [Export ("entity")]
597
694
                [Static, Export ("modelByMergingModels:")]
598
695
                NSManagedObjectModel ModelByMergingModels (NSManagedObjectModel[] models);
599
696
 
600
 
                [Export ("init")]
601
 
                IntPtr Init { get; }
602
 
 
603
697
                [Export ("initWithContentsOfURL:")]
604
698
                IntPtr Constructor (NSUrl url);
605
699
 
868
962
                [Export ("tryLock")]
869
963
                bool TryLock { get; }
870
964
 
 
965
#if MONOMAC
871
966
                [Obsolete("Deprecated in MAC OSX 10.5 and later")]
872
967
                [Static, Export ("metadataForPersistentStoreWithURL:error:")]
873
968
                NSDictionary MetadataForPersistentStoreWithUrl (NSUrl url, out NSError error);
874
 
 
 
969
#endif
875
970
                [Field ("NSSQLiteStoreType")]
876
971
                NSString SQLiteStoreType { get; }
877
 
                
 
972
#if MONOMAC
878
973
                [Field ("NSXMLStoreType")]
879
974
                NSString XMLStoreType { get; }
880
 
                
 
975
#endif  
881
976
                [Field ("NSBinaryStoreType")]
882
977
                NSString BinaryStoreType { get; }
883
978
                
898
993
 
899
994
                [Field ("NSReadOnlyPersistentStoreOption")]
900
995
                NSString ReadOnlyPersistentStoreOption { get; }
901
 
 
 
996
#if MONOMAC
902
997
                [Field ("NSValidateXMLStoreOption")]
903
998
                NSString ValidateXMLStoreOption { get; }
904
 
 
 
999
#endif
905
1000
                [Field ("NSPersistentStoreTimeoutOption")]
906
1001
                NSString PersistentStoreTimeoutOption { get; }
907
1002
 
953
1048
                [Field ("NSPersistentStoreUbiquitousContentNameKey")]
954
1049
                NSString PersistentStoreUbiquitousContentNameKey { get; }
955
1050
 
956
 
                [Field ("NSPersistentStoreUbiquitousContentUrlLKey")]
 
1051
                [Field ("NSPersistentStoreUbiquitousContentURLKey")]
957
1052
                NSString PersistentStoreUbiquitousContentUrlLKey { get; }
958
 
 
 
1053
#if !MONOMAC
959
1054
                [Field ("NSPersistentStoreFileProtectionKey")]
960
1055
                NSString PersistentStoreFileProtectionKey { get; }
 
1056
#endif
961
1057
        }
962
1058
 
963
1059
        [BaseType (typeof (NSObject))]