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

« back to all changes in this revision

Viewing changes to external/maccore/src/foundation.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:
4
4
// Authors:
5
5
//   Geoff Norton
6
6
//   Miguel de Icaza
 
7
//   Aaron Bockover
7
8
//
8
9
// Copyright 2009, Novell, Inc.
9
10
// Copyright 2010, Novell, Inc.
10
 
// Copyright 2011, Xamarin Inc.
 
11
// Copyright 2011-2013 Xamarin Inc.
11
12
//
12
13
// Permission is hereby granted, free of charge, to any person obtaining
13
14
// a copy of this software and associated documentation files (the
44
45
 
45
46
using System;
46
47
using System.Drawing;
 
48
using System.ComponentModel;
47
49
 
48
50
namespace MonoMac.Foundation
49
51
{
50
52
        public delegate int NSComparator (NSObject obj1, NSObject obj2);
51
 
        
 
53
        public delegate void NSAttributedRangeCallback (NSDictionary attrs, NSRange range, ref bool stop);
 
54
        public delegate void NSAttributedStringCallback (NSObject value, NSRange range, ref bool stop);
 
55
 
 
56
        public delegate bool NSEnumerateErrorHandler (NSUrl url, NSError error);
 
57
 
52
58
        [BaseType (typeof (NSObject))]
53
59
        public interface NSArray {
54
60
                [Export ("count")]
81
87
 
82
88
        [Since (3,2)]
83
89
        [BaseType (typeof (NSObject))]
84
 
        public interface NSAttributedString {
 
90
        public partial interface NSAttributedString {
85
91
                [Export ("string")]
86
92
                string Value { get; }
87
93
 
111
117
                IntPtr Constructor (string str);
112
118
                
113
119
                [Export ("initWithString:attributes:")]
 
120
                [EditorBrowsable (EditorBrowsableState.Advanced)]
114
121
                IntPtr Constructor (string str, NSDictionary attributes);
115
122
 
116
123
                [Export ("initWithAttributedString:")]
117
124
                IntPtr Constructor (NSAttributedString other);
118
125
 
 
126
                [Export ("enumerateAttributesInRange:options:usingBlock:")]
 
127
                void EnumerateAttributes (NSRange range, NSAttributedStringEnumeration options, NSAttributedRangeCallback callback);
 
128
 
 
129
                [Export ("enumerateAttribute:inRange:options:usingBlock:")]
 
130
                void EnumerateAttribute (NSString attributeName, NSRange inRange, NSAttributedStringEnumeration options, NSAttributedStringCallback callback);
 
131
 
119
132
#if MONOMAC
120
133
                [Export("size")]
121
134
                SizeF Size { get; }
122
 
#endif
123
 
 
124
 
 
125
 
#if MONOMAC
 
135
 
126
136
                [Field ("NSFontAttributeName", "AppKit")]
127
 
#else
128
 
                [Field ("NSFontAttributeName")]
129
 
#endif
130
137
                NSString FontAttributeName { get; }
131
138
 
132
 
#if MONOMAC
133
139
                [Field ("NSLinkAttributeName", "AppKit")]
134
 
#else
135
 
                [Field ("NSLinkAttributeName")]
136
 
#endif
137
140
                NSString LinkAttributeName { get; }
138
141
 
139
 
#if MONOMAC
140
142
                [Field ("NSUnderlineStyleAttributeName", "AppKit")]
141
 
#else
142
 
                [Field ("NSUnderlineStyleAttributeName")]
143
 
#endif
144
143
                NSString UnderlineStyleAttributeName { get; }
145
144
 
146
 
#if MONOMAC
147
145
                [Field ("NSStrikethroughStyleAttributeName", "AppKit")]
148
 
#else
149
 
                [Field ("NSStrikethroughStyleAttributeName")]
150
 
#endif
151
146
                NSString StrikethroughStyleAttributeName { get; }
152
147
 
153
 
#if MONOMAC
154
148
                [Field ("NSStrokeWidthAttributeName", "AppKit")]
155
 
#else
156
 
                [Field ("NSStrokeWidthAttributeName")]
157
 
#endif
158
149
                NSString StrokeWidthAttributeName { get; }
159
150
 
160
 
#if MONOMAC
161
151
                [Field ("NSParagraphStyleAttributeName", "AppKit")]
162
 
#else
163
 
                [Field ("NSParagraphStyleAttributeName")]
164
 
#endif
165
152
                NSString ParagraphStyleAttributeName { get; }
166
153
 
167
 
#if MONOMAC
168
154
                [Field ("NSForegroundColorAttributeName", "AppKit")]
169
 
#else
170
 
                [Field ("NSForegroundColorAttributeName")]
171
 
#endif
172
155
                NSString ForegroundColorAttributeName { get; }
173
156
 
174
 
#if MONOMAC
175
157
                [Field ("NSBackgroundColorAttributeName", "AppKit")]
176
 
#else
177
 
                [Field ("NSBackgroundColorAttributeName")]
178
 
#endif
179
158
                NSString BackgroundColorAttributeName { get; }
180
 
                
181
 
#if MONOMAC
 
159
 
182
160
                [Field ("NSLigatureAttributeName", "AppKit")]
183
 
#else
184
 
                [Field ("NSLigatureAttributeName")]
185
 
#endif
186
161
                NSString LigatureAttributeName { get; } 
187
 
#if MONOMAC
 
162
 
 
163
                [Field ("NSObliquenessAttributeName", "AppKit")]
 
164
                NSString ObliquenessAttributeName { get; }
 
165
 
 
166
                [Field ("NSSuperscriptAttributeName", "AppKit")]
 
167
                NSString SuperscriptAttributeName { get; }
 
168
 
 
169
                [Field ("NSAttachmentAttributeName", "AppKit")]
 
170
                NSString AttachmentAttributeName { get; }
 
171
                
 
172
                [Field ("NSBaselineOffsetAttributeName", "AppKit")]
 
173
                NSString BaselineOffsetAttributeName { get; }
 
174
                
 
175
                [Field ("NSKernAttributeName", "AppKit")]
 
176
                NSString KernAttributeName { get; }
 
177
                
 
178
                [Field ("NSStrokeColorAttributeName", "AppKit")]
 
179
                NSString StrokeColorAttributeName { get; }
 
180
                
 
181
                [Field ("NSUnderlineColorAttributeName", "AppKit")]
 
182
                NSString UnderlineColorAttributeName { get; }
 
183
                
 
184
                [Field ("NSStrikethroughColorAttributeName", "AppKit")]
 
185
                NSString StrikethroughColorAttributeName { get; }
 
186
                
 
187
                [Field ("NSShadowAttributeName", "AppKit")]
 
188
                NSString ShadowAttributeName { get; }
 
189
                
 
190
                [Field ("NSExpansionAttributeName", "AppKit")]
 
191
                NSString ExpansionAttributeName { get; }
 
192
                
 
193
                [Field ("NSCursorAttributeName", "AppKit")]
 
194
                NSString CursorAttributeName { get; }
 
195
                
 
196
                [Field ("NSToolTipAttributeName", "AppKit")]
 
197
                NSString ToolTipAttributeName { get; }
 
198
                
 
199
                [Field ("NSMarkedClauseSegmentAttributeName", "AppKit")]
 
200
                NSString MarkedClauseSegmentAttributeName { get; }
 
201
                
 
202
                [Field ("NSWritingDirectionAttributeName", "AppKit")]
 
203
                NSString WritingDirectionAttributeName { get; }
 
204
                
 
205
                [Field ("NSVerticalGlyphFormAttributeName", "AppKit")]
 
206
                NSString VerticalGlyphFormAttributeName { get; }
 
207
                
188
208
                [Export ("initWithData:options:documentAttributes:error:")]
189
209
                IntPtr Constructor (NSData data, NSDictionary options, out NSDictionary docAttributes, out NSError error);
190
210
 
203
223
                [Export ("drawWithRect:options:")]
204
224
                void DrawString (RectangleF rect, NSStringDrawingOptions options);
205
225
                
 
226
#else
 
227
                [Since (6,0)]
 
228
                [Export ("size")]
 
229
                SizeF Size { get; }
 
230
 
 
231
                [Since (6,0)]
 
232
                [Export ("drawAtPoint:")]
 
233
                void DrawString (PointF point);
 
234
 
 
235
                [Since (6,0)]
 
236
                [Export ("drawInRect:")]
 
237
                void DrawString (RectangleF rect);
 
238
 
 
239
                [Since (6,0)]
 
240
                [Export ("drawWithRect:options:context:")]
 
241
                void DrawString (RectangleF rect, NSStringDrawingOptions options, [NullAllowed] NSStringDrawingContext context);
 
242
 
 
243
                [Since (6,0)]
 
244
                [Export ("boundingRectWithSize:options:context:")]
 
245
                RectangleF GetBoundingRect (SizeF size, NSStringDrawingOptions options, [NullAllowed] NSStringDrawingContext context);
206
246
#endif
207
247
        }
208
248
 
248
288
 
249
289
        [BaseType (typeof (NSObject))]
250
290
        [Model]
 
291
        [Protocol]
251
292
        public interface NSCacheDelegate {
252
293
                [Export ("cache:willEvictObject:"), EventArgs ("NSObject")]
253
294
                void WillEvictObject (NSCache cache, NSObject obj);
254
295
        }
255
296
 
256
297
        [BaseType (typeof (NSObject), Name="NSCachedURLResponse")]
 
298
        // instance created with 'init' will crash when Dispose is called
 
299
        [DisableDefaultCtor]
257
300
        public interface NSCachedUrlResponse {
258
301
                [Export ("initWithResponse:data:userInfo:storagePolicy:")]
259
302
                IntPtr Constructor (NSUrlResponse response, NSData data, [NullAllowed] NSDictionary userInfo, NSUrlCacheStoragePolicy storagePolicy);
275
318
        }
276
319
        
277
320
        [BaseType (typeof (NSObject))]
 
321
        // 'init' returns NIL
 
322
        [DisableDefaultCtor]
278
323
        public interface NSCalendar {
279
324
                [Export ("initWithCalendarIdentifier:")]
280
 
                IntPtr Constructor (string identifier);
 
325
                IntPtr Constructor (NSString identifier);
281
326
 
282
327
                [Export ("calendarIdentifier")]
283
328
                string Identifier { get; }
302
347
                //- (NSRange)rangeOfUnit:(NSCalendarUnit)smaller inUnit:(NSCalendarUnit)larger forDate:(NSDate *)date;
303
348
                //- (NSUInteger)ordinalityOfUnit:(NSCalendarUnit)smaller inUnit:(NSCalendarUnit)larger forDate:(NSDate *)date;
304
349
                //- (BOOL)rangeOfUnit:(NSCalendarUnit)unit startDate:(NSDate **)datep interval:(NSTimeInterval *)tip forDate:(NSDate *)date AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
305
 
                //- (NSDate *)dateFromComponents:(NSDateComponents *)comps;
306
 
                //- (NSDateComponents *)components:(NSUInteger)unitFlags fromDate:(NSDate *)date;
307
 
                //- (NSDate *)dateByAddingComponents:(NSDateComponents *)comps toDate:(NSDate *)date options:(NSUInteger)opts;
308
 
                //- (NSDateComponents *)components:(NSUInteger)unitFlags fromDate:(NSDate *)startingDate toDate:(NSDate *)resultDate options:(NSUInteger)opts;
 
350
 
 
351
                [Export ("components:fromDate:")]
 
352
                NSDateComponents Components (NSCalendarUnit unitFlags, NSDate fromDate);
 
353
 
 
354
                [Export ("components:fromDate:toDate:options:")]
 
355
                NSDateComponents Components (NSCalendarUnit unitFlags, NSDate fromDate, NSDate toDate, NSDateComponentsWrappingBehavior opts);
 
356
 
 
357
                [Export ("dateByAddingComponents:toDate:options:")]
 
358
                NSDate DateByAddingComponents (NSDateComponents comps, NSDate date, NSDateComponentsWrappingBehavior opts);
 
359
 
 
360
                [Export ("dateFromComponents:")]
 
361
                NSDate DateFromComponents (NSDateComponents comps);
 
362
 
 
363
                [Field ("NSGregorianCalendar"), Internal]
 
364
                NSString NSGregorianCalendar { get; }
 
365
                
 
366
                [Field ("NSBuddhistCalendar"), Internal]
 
367
                NSString NSBuddhistCalendar { get; }
 
368
                
 
369
                [Field ("NSChineseCalendar"), Internal]
 
370
                NSString NSChineseCalendar { get; }
 
371
                
 
372
                [Field ("NSHebrewCalendar"), Internal]
 
373
                NSString NSHebrewCalendar { get; }
 
374
                
 
375
                [Field ("NSIslamicCalendar"), Internal]
 
376
                NSString NSIslamicCalendar { get; }
 
377
                
 
378
                [Field ("NSIslamicCivilCalendar"), Internal]
 
379
                NSString NSIslamicCivilCalendar { get; }
 
380
                
 
381
                [Field ("NSJapaneseCalendar"), Internal]
 
382
                NSString NSJapaneseCalendar { get; }
 
383
                
 
384
                [Field ("NSRepublicOfChinaCalendar"), Internal]
 
385
                NSString NSRepublicOfChinaCalendar { get; }
 
386
                
 
387
                [Field ("NSPersianCalendar"), Internal]
 
388
                NSString NSPersianCalendar { get; }
 
389
                
 
390
                [Field ("NSIndianCalendar"), Internal]
 
391
                NSString NSIndianCalendar { get; }
 
392
                
 
393
                [Field ("NSISO8601Calendar"), Internal]
 
394
                NSString NSISO8601Calendar { get; }
309
395
        }
310
396
 
311
397
        [Since (3,2)]
454
540
 
455
541
                [Internal, Export ("decodeBytesForKey:returnedLength:")]
456
542
                IntPtr DecodeBytes (string key, IntPtr length_ptr);
 
543
 
 
544
                [Since (6,0)]
 
545
                [Export ("allowedClasses")]
 
546
                NSSet AllowedClasses { get; }
 
547
 
 
548
                [Since (6,0)]
 
549
                [Export ("requiresSecureCoding")]
 
550
                bool RequiresSecureCoding ();
 
551
 
 
552
                
457
553
        }
458
554
        
459
555
        [BaseType (typeof (NSPredicate))]
490
586
        }
491
587
 
492
588
        [BaseType (typeof (NSPredicate))]
 
589
        [DisableDefaultCtor] // An uncaught exception was raised: Can't have a NOT predicate with no subpredicate.
493
590
        public interface NSCompoundPredicate {
494
591
                [Export ("initWithType:subpredicates:")]
495
592
                IntPtr Constructor (NSCompoundPredicateType type, NSPredicate[] subpredicates);
531
628
                [Static]
532
629
                NSData FromFile (string path, NSDataReadingOptions mask, out NSError error);
533
630
 
 
631
                [Export ("dataWithData:")]
 
632
                [Static]
 
633
                NSData FromData (NSData source);
 
634
 
534
635
                [Export ("dataWithBytes:length:"), Static]
535
636
                NSData FromBytes (IntPtr bytes, uint size);
536
637
 
538
639
                IntPtr Bytes { get; }
539
640
 
540
641
                [Export ("length")]
541
 
                uint Length { get; }
 
642
                uint Length { get; [NotImplemented] set; }
542
643
 
543
644
                [Export ("writeToFile:options:error:")]
544
645
                bool _Save (string file, int options, IntPtr addr);
611
712
                [Since (5,0)]
612
713
                [Export ("yearForWeekOfYear")]
613
714
                int YearForWeekOfYear { get; set; }
 
715
 
 
716
                [Since (6,0)]
 
717
                [Export ("leapMonth")]
 
718
                bool IsLeapMonth { [Bind ("isLeapMonth")] get; set; }
614
719
        }
615
720
        
 
721
        [Since (6,0)]
 
722
        [BaseType (typeof (NSFormatter))]
 
723
        interface NSByteCountFormatter {
 
724
                [Export ("allowsNonnumericFormatting")]
 
725
                bool AllowsNonnumericFormatting { get; set; }
 
726
 
 
727
                [Export ("includesUnit")]
 
728
                bool IncludesUnit { get; set; }
 
729
 
 
730
                [Export ("includesCount")]
 
731
                bool IncludesCount { get; set; }
 
732
 
 
733
                [Export ("includesActualByteCount")]
 
734
                bool IncludesActualByteCount { get; set; }
 
735
                
 
736
                [Export ("adaptive")]
 
737
                bool Adaptive { [Bind ("isAdaptive")] get; set;  }
 
738
 
 
739
                [Export ("zeroPadsFractionDigits")]
 
740
                bool ZeroPadsFractionDigits { get; set;  }
 
741
 
 
742
                [Static]
 
743
                [Export ("stringFromByteCount:countStyle:")]
 
744
                string Format (long byteCount, NSByteCountFormatterCountStyle countStyle);
 
745
 
 
746
                [Export ("stringFromByteCount:")]
 
747
                string Format (long byteCount);
 
748
 
 
749
                [Export ("allowedUnits")]
 
750
                NSByteCountFormatterUnits AllowedUnits { get; set; }
 
751
 
 
752
                [Export ("countStyle")]
 
753
                NSByteCountFormatterCountStyle CountStyle { get; set; }
 
754
        }
 
755
 
616
756
        [BaseType (typeof (NSFormatter))]
617
757
        public interface NSDateFormatter {
618
758
                [Export ("stringFromDate:")]
648
788
                [Export ("calendar")]
649
789
                NSCalendar Calendar { get; set; }
650
790
 
 
791
                // not exposed as a property in documentation
651
792
                [Export ("isLenient")]
652
 
                bool IsLenient { get; set; } 
 
793
                bool IsLenient { get; [Bind ("setLenient:")] set; } 
653
794
 
654
795
                [Export ("twoDigitStartDate")]
655
796
                NSDate TwoDigitStartDate { get; set; }
720
861
                [Export ("gregorianStartDate")]
721
862
                NSDate GregorianStartDate { get; set; }
722
863
        }
723
 
        
 
864
 
 
865
        public delegate void NSFileHandleUpdateHandler (NSFileHandle handle);
 
866
 
 
867
        public interface NSFileHandleReadEventArgs {
 
868
                [Export ("NSFileHandleNotificationDataItem")]
 
869
                NSData AvailableData { get; }
 
870
 
 
871
                [Export ("NSFileHandleError", ArgumentSemantic.Assign)]
 
872
                int UnixErrorCode { get; }
 
873
        }
 
874
 
 
875
        public interface NSFileHandleConnectionAcceptedEventArgs {
 
876
                [Export ("NSFileHandleNotificationFileHandleItem")]
 
877
                NSFileHandle NearSocketConnection { get; }
 
878
                
 
879
                [Export ("NSFileHandleError", ArgumentSemantic.Assign)]
 
880
                int UnixErrorCode { get; }
 
881
        }
 
882
        
 
883
        [BaseType (typeof (NSObject))]
 
884
        [DisableDefaultCtor] // return invalid handle
 
885
        public interface NSFileHandle 
 
886
        {
 
887
                [Export ("availableData")]
 
888
                NSData AvailableData ();
 
889
                
 
890
                [Export ("readDataToEndOfFile")]
 
891
                NSData ReadDataToEndOfFile ();
 
892
 
 
893
                [Export ("readDataOfLength:")]
 
894
                NSData ReadDataOfLength (uint length);
 
895
 
 
896
                [Export ("writeData:")]
 
897
                void WriteData (NSData data);
 
898
 
 
899
                [Export ("offsetInFile")]
 
900
                ulong OffsetInFile ();
 
901
 
 
902
                [Export ("seekToEndOfFile")]
 
903
                ulong SeekToEndOfFile ();
 
904
 
 
905
                [Export ("seekToFileOffset:")]
 
906
                void SeekToFileOffset (ulong offset);
 
907
 
 
908
                [Export ("truncateFileAtOffset:")]
 
909
                void TruncateFileAtOffset (ulong offset);
 
910
 
 
911
                [Export ("synchronizeFile")]
 
912
                void SynchronizeFile ();
 
913
 
 
914
                [Export ("closeFile")]
 
915
                void CloseFile ();
 
916
                
 
917
                [Static]
 
918
                [Export ("fileHandleWithStandardInput")]
 
919
                NSFileHandle FromStandardInput ();
 
920
                
 
921
                [Static]
 
922
                [Export ("fileHandleWithStandardOutput")]
 
923
                NSFileHandle FromStandardOutput ();
 
924
 
 
925
                [Static]
 
926
                [Export ("fileHandleWithStandardError")]
 
927
                NSFileHandle FromStandardError ();
 
928
 
 
929
                [Static]
 
930
                [Export ("fileHandleWithNullDevice")]
 
931
                NSFileHandle FromNullDevice ();
 
932
 
 
933
                [Static]
 
934
                [Export ("fileHandleForReadingAtPath:")]
 
935
                NSFileHandle OpenRead (string path);
 
936
 
 
937
                [Static]
 
938
                [Export ("fileHandleForWritingAtPath:")]
 
939
                NSFileHandle OpenWrite (string path);
 
940
 
 
941
                [Static]
 
942
                [Export ("fileHandleForUpdatingAtPath:")]
 
943
                NSFileHandle OpenUpdate (string path);
 
944
 
 
945
                [Static]
 
946
                [Export ("fileHandleForReadingFromURL:error:")]
 
947
                NSFileHandle OpenReadUrl (NSUrl url, out NSError error);
 
948
 
 
949
                [Static]
 
950
                [Export ("fileHandleForWritingToURL:error:")]
 
951
                NSFileHandle OpenWriteUrl (NSUrl url, out NSError error);
 
952
 
 
953
                [Static]
 
954
                [Export ("fileHandleForUpdatingURL:error:")]
 
955
                NSFileHandle OpenUpdateUrl (NSUrl url, out NSError error);
 
956
                
 
957
                [Export ("readInBackgroundAndNotifyForModes:")]
 
958
                void ReadInBackground (NSString [] notifyRunLoopModes);
 
959
                
 
960
                [Export ("readInBackgroundAndNotify")]
 
961
                void ReadInBackground ();
 
962
 
 
963
                [Export ("readToEndOfFileInBackgroundAndNotifyForModes:")]
 
964
                void ReadToEndOfFileInBackground (NSString [] notifyRunLoopModes);
 
965
 
 
966
                [Export ("readToEndOfFileInBackgroundAndNotify")]
 
967
                void ReadToEndOfFileInBackground ();
 
968
 
 
969
                [Export ("acceptConnectionInBackgroundAndNotifyForModes:")]
 
970
                void AcceptConnectionInBackground (NSString [] notifyRunLoopModes);
 
971
 
 
972
                [Export ("acceptConnectionInBackgroundAndNotify")]
 
973
                void AcceptConnectionInBackground ();
 
974
 
 
975
                [Export ("waitForDataInBackgroundAndNotifyForModes:")]
 
976
                void WaitForDataInBackground (NSString [] notifyRunLoopModes);
 
977
 
 
978
                [Export ("waitForDataInBackgroundAndNotify")]
 
979
                void WaitForDataInBackground ();
 
980
                
 
981
                [Export ("initWithFileDescriptor:closeOnDealloc:")]
 
982
                IntPtr Constructor (int fd, bool closeOnDealloc);
 
983
                
 
984
                [Export ("initWithFileDescriptor:")]
 
985
                IntPtr Constructor (int fd);
 
986
 
 
987
                [Export ("fileDescriptor")]
 
988
                int FileDescriptor { get; }
 
989
 
 
990
                [Export ("setReadabilityHandler:")]
 
991
                void SetReadabilityHandler ([NullAllowed] NSFileHandleUpdateHandler readCallback);
 
992
 
 
993
                [Export ("setWriteabilityHandler:")]
 
994
                void SetWriteabilityHandle ([NullAllowed] NSFileHandleUpdateHandler writeCallback);
 
995
 
 
996
                [Field ("NSFileHandleOperationException")]
 
997
                NSString OperationException { get; }
 
998
 
 
999
                [Field ("NSFileHandleReadCompletionNotification")]
 
1000
                [Notification (typeof (NSFileHandleReadEventArgs))]
 
1001
                NSString ReadCompletionNotification { get; }
 
1002
                
 
1003
                [Field ("NSFileHandleReadToEndOfFileCompletionNotification")]
 
1004
                [Notification (typeof (NSFileHandleReadEventArgs))]
 
1005
                NSString ReadToEndOfFileCompletionNotification { get; }
 
1006
                
 
1007
                [Field ("NSFileHandleConnectionAcceptedNotification")]
 
1008
                [Notification (typeof (NSFileHandleConnectionAcceptedEventArgs))]
 
1009
                NSString ConnectionAcceptedNotification { get; }
 
1010
 
 
1011
                
 
1012
                [Field ("NSFileHandleDataAvailableNotification")]
 
1013
                [Notification]
 
1014
                NSString DataAvailableNotification { get; }
 
1015
        }
 
1016
        
 
1017
        [BaseType (typeof (NSObject))]
 
1018
        public interface NSPipe {
 
1019
                
 
1020
                [Export ("fileHandleForReading")]
 
1021
                NSFileHandle ReadHandle { get; }
 
1022
                
 
1023
                [Export ("fileHandleForWriting")]
 
1024
                NSFileHandle WriteHandle { get; }
 
1025
 
 
1026
                [Static]
 
1027
                [Export ("pipe")]
 
1028
                NSPipe Create ();
 
1029
        }
 
1030
 
724
1031
        //@interface NSFormatter : NSObject <NSCopying, NSCoding>
725
1032
        [BaseType (typeof (NSObject))]
726
1033
        public interface NSFormatter {
735
1042
 
736
1043
        [BaseType (typeof (NSObject))]
737
1044
        [Model]
 
1045
        [Protocol]
738
1046
        public interface NSKeyedArchiverDelegate {
739
1047
                [Export ("archiver:didEncodeObject:"), EventArgs ("NSObject")]
740
1048
                void EncodedObject (NSKeyedArchiver archiver, NSObject obj);
754
1062
 
755
1063
        [BaseType (typeof (NSObject))]
756
1064
        [Model]
 
1065
        [Protocol]
757
1066
        public interface NSKeyedUnarchiverDelegate {
758
1067
                [Export ("unarchiver:didDecodeObject:"), DelegateName ("NSDecoderCallback"), DefaultValue (null)]
759
1068
                NSObject DecodedObject (NSKeyedUnarchiver unarchiver, NSObject obj);
774
1083
        [BaseType (typeof (NSCoder),
775
1084
                   Delegates=new string [] {"WeakDelegate"},
776
1085
                   Events=new Type [] { typeof (NSKeyedArchiverDelegate) })]
 
1086
        // Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: *** -[NSKeyedArchiver init]: cannot use -init for initialization
 
1087
        [DisableDefaultCtor]
777
1088
        public interface NSKeyedArchiver {
778
1089
                [Export ("initForWritingWithMutableData:")]
779
1090
                IntPtr Constructor (NSMutableData data);
808
1119
        [BaseType (typeof (NSCoder),
809
1120
                   Delegates=new string [] {"WeakDelegate"},
810
1121
                   Events=new Type [] { typeof (NSKeyedUnarchiverDelegate) })]
 
1122
        // Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: *** -[NSKeyedUnarchiver init]: cannot use -init for initialization
 
1123
        [DisableDefaultCtor]
811
1124
        public interface NSKeyedUnarchiver {
812
1125
                [Export ("initForReadingWithData:")]
 
1126
                [MarshalNativeExceptions]
813
1127
                IntPtr Constructor (NSData data);
814
1128
        
815
1129
                [Static, Export ("unarchiveObjectWithData:")]
 
1130
                [MarshalNativeExceptions]
816
1131
                NSObject UnarchiveObject (NSData data);
817
1132
                
818
1133
                [Static, Export ("unarchiveObjectWithFile:")]
 
1134
                [MarshalNativeExceptions]
819
1135
                NSObject UnarchiveFile (string file);
820
1136
 
821
1137
                [Export ("finishDecoding")]
923
1239
                NSString ResultContentRelevanceAttribute { get; }
924
1240
                
925
1241
                // Scope constants for defined search locations
 
1242
#if MONOMAC
926
1243
                [Field ("NSMetadataQueryUserHomeScope")]
927
1244
                NSString UserHomeScope { get; }
928
1245
                
934
1251
 
935
1252
                [Field ("NSMetadataQueryLocalDocumentsScope")]
936
1253
                NSString QueryLocalDocumentsScope { get; }
937
 
 
 
1254
#endif
938
1255
                [Field ("NSMetadataQueryUbiquitousDocumentsScope")]
939
1256
                NSString QueryUbiquitousDocumentsScope { get; }
940
1257
 
989
1306
 
990
1307
        [BaseType (typeof (NSObject))]
991
1308
        [Model]
 
1309
        [Protocol]
992
1310
        public interface NSMetadataQueryDelegate {
993
1311
                [Export ("metadataQuery:replacementObjectForResultObject:"), DelegateName ("NSMetadataQueryObject"), DefaultValue(null)]
994
1312
                NSObject ReplacementObjectForResultObject (NSMetadataQuery query, NSMetadataItem result);
1058
1376
                [Export ("insertObject:atIndex:")]
1059
1377
                void Insert (NSObject obj, int index);
1060
1378
 
1061
 
                [Export ("removeLastObject:")]
 
1379
                [Export ("removeLastObject")]
1062
1380
                void RemoveLastObject ();
1063
1381
 
1064
1382
                [Export ("removeObjectAtIndex:")]
1073
1391
                [Export ("addObjectsFromArray:")]
1074
1392
                void AddObjects (NSObject [] source);
1075
1393
 
1076
 
                [Export ("insertObjects:atIndexes")]
 
1394
                [Export ("insertObjects:atIndexes:")]
1077
1395
                void InsertObjects (NSObject [] objects, NSIndexSet atIndexes);
1078
1396
 
1079
1397
                [Export ("removeObjectsAtIndexes:")]
1131
1449
 
1132
1450
        [BaseType (typeof (NSData))]
1133
1451
        public interface NSMutableData {
1134
 
                [Static, Export ("dataWithCapacity:")]
 
1452
                [Static, Export ("dataWithCapacity:")] [Autorelease]
1135
1453
                NSMutableData FromCapacity (int capacity);
1136
1454
 
1137
 
                [Static, Export ("dataWithLength:")]
 
1455
                [Static, Export ("dataWithLength:")] [Autorelease]
1138
1456
                NSMutableData FromLength (int length);
1139
1457
                
1140
 
                [Static, Export ("data")]
 
1458
                [Static, Export ("data")] [Autorelease]
1141
1459
                NSMutableData Create ();
1142
1460
                
1143
1461
                [Export ("setLength:")]
1157
1475
 
1158
1476
                [Export ("setData:")]
1159
1477
                void SetData (NSData data);
 
1478
 
 
1479
                [Export ("length")]
 
1480
                [Override]
 
1481
                uint Length { get; set; }
1160
1482
        }
1161
1483
 
1162
1484
        [BaseType (typeof (NSObject))]
1186
1508
                [Export ("dateByAddingTimeInterval:")]
1187
1509
                NSDate AddSeconds (double seconds);
1188
1510
 
1189
 
                [Export ("description")]
1190
 
                string Description { get; }
1191
 
 
1192
1511
                [Export ("dateWithTimeIntervalSinceNow:")]
1193
1512
                [Static]
1194
1513
                NSDate FromTimeIntervalSinceNow (double secs);
1226
1545
                [Export ("initWithContentsOfFile:")]
1227
1546
                IntPtr Constructor (string fileName);
1228
1547
 
 
1548
                [Export ("initWithObjects:forKeys:"), Internal]
 
1549
                IntPtr Constructor (NSArray objects, NSArray keys);
 
1550
 
1229
1551
                [Export ("initWithContentsOfURL:")]
1230
1552
                IntPtr Constructor (NSUrl url);
1231
1553
                
1244
1566
                [Export ("allValues")]
1245
1567
                NSObject [] Values { get; }
1246
1568
 
1247
 
                [Export ("description")]
1248
 
                string Description {get; }
1249
 
 
1250
1569
                [Export ("descriptionInStringsFileFormat")]
1251
1570
                string DescriptionInStringsFileFormat { get; }
1252
1571
 
1264
1583
 
1265
1584
                [Export ("writeToURL:atomically:")]
1266
1585
                bool WriteToUrl (NSUrl url, bool atomically);
 
1586
 
 
1587
                [Since (6,0)]
 
1588
                [Static]
 
1589
                [Export ("sharedKeySetForKeys:")]
 
1590
                NSObject GetSharedKeySetForKeys (NSObject [] keys);
 
1591
 
1267
1592
        }
1268
1593
 
1269
1594
        [BaseType (typeof (NSObject))]
1334
1659
        }
1335
1660
 
1336
1661
        [BaseType (typeof (NSObject))]
 
1662
        // 'init' returns NIL
 
1663
        [DisableDefaultCtor]
1337
1664
        public interface NSException {
 
1665
                [Export ("initWithName:reason:userInfo:")]
 
1666
                IntPtr Constructor (string name, string reason, [NullAllowed] NSDictionary userInfo);
 
1667
 
1338
1668
                [Export ("name")]
1339
1669
                string Name { get; }
1340
1670
        
1351
1681
        public delegate void NSExpressionHandler (NSObject evaluatedObject, NSExpression [] expressions, NSMutableDictionary context);
1352
1682
        
1353
1683
        [BaseType (typeof (NSObject))]
 
1684
        // Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: *** -predicateFormat cannot be sent to an abstract object of class NSExpression: Create a concrete instance!
 
1685
        [DisableDefaultCtor]
1354
1686
        public interface NSExpression {
1355
1687
                [Static, Export ("expressionForConstantValue:")]
1356
1688
                NSExpression FromConstant (NSObject obj);
1371
1703
                NSExpression FromFormat (string format, NSExpression [] parameters);
1372
1704
                
1373
1705
                //+ (NSExpression *)expressionForAggregate:(NSArray *)subexpressions; 
1374
 
                [Export ("expressionForAggregate:")]
 
1706
                [Static, Export ("expressionForAggregate:")]
1375
1707
                NSExpression FromAggregate (NSExpression [] subexpressions);
1376
1708
 
1377
1709
                [Static, Export ("expressionForUnionSet:with:")]
1390
1722
                [Static, Export ("expressionForFunction:selectorName:arguments:")]
1391
1723
                NSExpression FromFunction (NSExpression target, string name, NSExpression[] parameters);
1392
1724
 
1393
 
                [Static, Export ("expressionForBlock:selectorName:arguments:")]
 
1725
                [Static, Export ("expressionForBlock:arguments:")]
1394
1726
                NSExpression FromFunction (NSExpressionHandler target, NSExpression[] parameters);
1395
1727
 
1396
1728
                [Export ("initWithExpressionType:")]
1456
1788
                [Export ("setOrthography:range:")]
1457
1789
                void SetOrthographyrange (NSOrthography orthography, NSRange range);
1458
1790
 
1459
 
                [Export ("orthographyAtIndex:effectiveRange:"), Internal]
1460
 
                NSOrthography GetOrthography (int charIndex, IntPtr effectiveRangePtr);
 
1791
                [Export ("orthographyAtIndex:effectiveRange:")]
 
1792
                NSOrthography GetOrthography (int charIndex, ref NSRange effectiveRange);
1461
1793
 
1462
1794
                [Export ("stringEditedInRange:changeInLength:")]
1463
1795
                void StringEditedInRange (NSRange newRange, int delta);
1468
1800
                [Export ("sentenceRangeForRange:")]
1469
1801
                NSRange GetSentenceRangeForRange (NSRange range);
1470
1802
 
1471
 
                [Export ("tagAtIndex:scheme:tokenRange:sentenceRange:"), Internal]
1472
 
                string GetTag (int charIndex, NSString tagScheme, IntPtr tokenRangePtr, IntPtr sentenceRangePtr);
 
1803
                [Export ("tagAtIndex:scheme:tokenRange:sentenceRange:")]
 
1804
                string GetTag (int charIndex, NSString tagScheme, ref NSRange tokenRange, ref NSRange sentenceRange);
1473
1805
 
1474
1806
                [Export ("tagsInRange:scheme:options:tokenRanges:"), Internal]
1475
 
                NSString [] GetTangsInRange (NSRange range, NSString tagScheme, NSLinguisticTaggerOptions opts, IntPtr refToNSArrayTokenRanges);
 
1807
                NSString [] GetTagsInRange (NSRange range, NSString tagScheme, NSLinguisticTaggerOptions opts, ref NSArray tokenRanges);
1476
1808
 
1477
1809
                [Export ("possibleTagsAtIndex:scheme:tokenRange:sentenceRange:scores:"), Internal]
1478
 
                NSString [] GetPossibleTags (int charIndex, NSString tagScheme, IntPtr tokenRangePointer, IntPtr sentenceRangePointer, IntPtr IntPtrToReturnArrayScores);
 
1810
                NSString [] GetPossibleTags (int charIndex, NSString tagScheme, ref NSRange tokenRange, ref NSRange sentenceRange, ref NSArray scores);
1479
1811
 
1480
1812
                //Detected properties
1481
1813
                [Export ("string")]
1600
1932
        }
1601
1933
        
1602
1934
        [BaseType (typeof (NSObject))]
 
1935
        // 'init' returns NIL so it's not usable evenif it does not throw an ObjC exception
 
1936
        [DisableDefaultCtor]
1603
1937
        public interface NSLocale {
1604
1938
                [Static]
1605
1939
                [Export ("systemLocale")]
1610
1944
                NSLocale CurrentLocale { get; }
1611
1945
 
1612
1946
                [Static]
1613
 
                [Export ("autoUpdatingCurrentLocale")]
 
1947
                [Export ("autoupdatingCurrentLocale")]
1614
1948
                NSLocale AutoUpdatingCurrentLocale { get; }
1615
1949
                
1616
1950
 
1641
1975
                [Export ("componentsFromLocaleIdentifier:")][Static]
1642
1976
                NSDictionary ComponentsFromLocaleIdentifier (string identifier);
1643
1977
 
1644
 
                [Export ("localeIdentifierFromComponents:")]
 
1978
                [Export ("localeIdentifierFromComponents:")][Static]
1645
1979
                string LocaleIdentifierFromComponents (NSDictionary dict);
1646
1980
 
1647
 
                [Export ("canonicalLanguageIdentifierFromString")]
 
1981
                [Export ("canonicalLanguageIdentifierFromString:")][Static]
1648
1982
                string CanonicalLanguageIdentifierFromString (string str);
1649
1983
 
1650
 
                [Export ("canonicalLocaleIdentifierFromString:")]
 
1984
                [Export ("canonicalLocaleIdentifierFromString:")][Static]
1651
1985
                string CanonicalLocaleIdentifierFromString (string str);
1652
1986
 
1653
 
                [Export ("characterDirectionForLanguage")]
 
1987
                [Export ("characterDirectionForLanguage:")][Static]
1654
1988
                NSLocaleLanguageDirection GetCharacterDirection (string isoLanguageCode);
1655
1989
 
1656
 
                [Export ("lineDirectionForLanguage")]
 
1990
                [Export ("lineDirectionForLanguage:")][Static]
1657
1991
                NSLocaleLanguageDirection GetLineDirection (string isoLanguageCode);
1658
1992
 
1659
1993
                [Field ("NSCurrentLocaleDidChangeNotification")]
1663
1997
                [Export ("objectForKey:"), Internal]
1664
1998
                NSObject ObjectForKey (NSString key);
1665
1999
 
 
2000
                [Export ("displayNameForKey:value:"), Internal]
 
2001
                NSString DisplayNameForKey (NSString key, string value);
 
2002
 
1666
2003
                [Internal, Field ("NSLocaleIdentifier")]
1667
2004
                NSString _Identifier { get; }
1668
2005
                
1723
2060
 
1724
2061
        
1725
2062
        [BaseType (typeof (NSObject))]
 
2063
        // init returns NIL
 
2064
        [DisableDefaultCtor]
1726
2065
        public interface NSRunLoop {
1727
2066
                [Export ("currentRunLoop")][Static][IsThreadStatic]
1728
2067
                NSRunLoop Current { get; }
1769
2108
 
1770
2109
                [Field ("NSEventTrackingRunLoopMode", "AppKit")]
1771
2110
                NSString NSRunLoopEventTracking { get; }
 
2111
#else
 
2112
                [Field ("UITrackingRunLoopMode", "UIKit")]
 
2113
                NSString UITrackingRunLoopMode { get; }
1772
2114
#endif
1773
2115
        }
1774
2116
 
1777
2119
                [Export ("set")][Static]
1778
2120
                NSSet CreateSet ();
1779
2121
 
 
2122
                [Export ("initWithSet:")]
 
2123
                IntPtr Constructor (NSSet other);
 
2124
                
1780
2125
                [Export ("initWithArray:")]
1781
2126
                IntPtr Constructor (NSArray other);
1782
2127
                
1792
2137
                [Export ("allObjects")][Internal]
1793
2138
                IntPtr _AllObjects ();
1794
2139
 
1795
 
                [Export ("description")]
1796
 
                string Description { get; }
1797
 
 
1798
2140
                [Export ("isEqualToSet:")]
1799
2141
                bool IsEqualToSet (NSSet other);
1800
2142
 
 
2143
                [Export ("objectEnumerator"), Internal]
 
2144
                NSEnumerator _GetEnumerator ();
 
2145
                
1801
2146
                [Export ("isSubsetOfSet:")]
1802
2147
                bool IsSubsetOf (NSSet other);
 
2148
                
1803
2149
                [Export ("enumerateObjectsUsingBlock:")]
1804
2150
                [Since (4,0)]
1805
2151
                void Enumerate (NSSetEnumerator enumerator);
 
2152
 
 
2153
                [Export ("setByAddingObjectsFromSet:"), Internal]
 
2154
                NSSet SetByAddingObjectsFromSet (NSSet other);
 
2155
 
 
2156
                [Export ("intersectsSet:")]
 
2157
                bool IntersectsSet (NSSet other);
1806
2158
        }
1807
2159
 
1808
2160
        [BaseType (typeof (NSObject))]
1831
2183
 
1832
2184
        [BaseType (typeof(NSObject))]
1833
2185
        [Dispose ("if (disposing) { Invalidate (); } ")]
 
2186
        // init returns NIL
 
2187
        [DisableDefaultCtor]
1834
2188
        public interface NSTimer {
1835
2189
                // TODO: scheduledTimerWithTimeInterval:invocation:repeats:
1836
2190
 
1865
2219
        }
1866
2220
 
1867
2221
        [BaseType (typeof(NSObject))]
 
2222
        // NSTimeZone is an abstract class that defines the behavior of time zone objects. -> http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSTimeZone_Class/Reference/Reference.html
 
2223
        // calling 'init' returns a NIL pointer, i.e. an unusable instance
 
2224
        [DisableDefaultCtor]
1868
2225
        public interface NSTimeZone {
1869
2226
                [Export ("initWithName:")]
1870
2227
                IntPtr Constructor (string name);
1902
2259
                [Static, Export ("localTimeZone")]
1903
2260
                NSTimeZone LocalTimeZone { get; }
1904
2261
 
1905
 
                [Export ("description")]
1906
 
                string Description { get; }
1907
 
 
1908
2262
                [Export ("secondsFromGMT")]
1909
2263
                int GetSecondsFromGMT { get; }
1910
2264
 
1927
2281
                string DataVersion { get; }
1928
2282
        }
1929
2283
 
1930
 
#if !MONOMAC
1931
2284
        interface NSUbiquitousKeyValueStoreChangeEventArgs {
1932
2285
                [Export ("NSUbiquitousKeyValueStoreChangedKeysKey")]
1933
2286
                string [] ChangedKeys { get; }
2009
2362
                [Field ("NSUbiquitousKeyValueStoreChangedKeysKey")]
2010
2363
                NSString ChangedKeysKey { get; }
2011
2364
        }
2012
 
#endif
2013
2365
        
 
2366
        [BaseType (typeof (NSObject), Name="NSUUID")]
 
2367
        public interface NSUuid {
 
2368
                [Export ("initWithUUIDString:")]
 
2369
                IntPtr Constructor (string str);
 
2370
 
 
2371
                // bound manually to keep the managed/native signatures identical
 
2372
                //[Export ("initWithUUIDBytes:"), Internal]
 
2373
                //IntPtr Constructor (IntPtr bytes, bool unused);
 
2374
 
 
2375
                [Export ("getUUIDBytes:"), Internal]
 
2376
                void GetUuidBytes (IntPtr uuid);
 
2377
 
 
2378
                [Export ("UUIDString")]
 
2379
                string AsString ();
 
2380
        }
 
2381
 
2014
2382
        [BaseType (typeof (NSObject))]
2015
2383
        public interface NSUserDefaults {
2016
2384
                [Static]
2120
2488
        }
2121
2489
        
2122
2490
        [BaseType (typeof (NSObject), Name="NSURL")]
 
2491
        // init returns NIL
 
2492
        [DisableDefaultCtor]
2123
2493
        public interface NSUrl {
2124
2494
                [Export ("initWithScheme:host:path:")]
2125
2495
                IntPtr Constructor (string scheme, string host, string path);
2131
2501
                IntPtr Constructor (string path);
2132
2502
 
2133
2503
                [Export ("initWithString:relativeToURL:")]
2134
 
                IntPtr Constructor (string path, string relativeToUrl);         
 
2504
                IntPtr Constructor (string path, NSUrl relativeToUrl);          
2135
2505
 
2136
2506
                [Export ("URLWithString:")][Static]
2137
2507
                NSUrl FromString (string s);
2197
2567
 
2198
2568
                /* These methods come from NURL_AppKitAdditions */
2199
2569
 
2200
 
                [Export ("URLFromPasteboard:")][Static]
 
2570
                [Export ("URLFromPasteboard:")]
 
2571
                [Static]
2201
2572
                NSUrl FromPasteboard (NSPasteboard pasteboard);
2202
2573
 
2203
2574
                [Export ("writeToPasteboard:")]
2204
2575
                void WriteToPasteboard (NSPasteboard pasteboard);
2205
2576
                
 
2577
                [Export("bookmarkDataWithContentsOfURL:error:")]
 
2578
                [Static]
 
2579
                NSData GetBookmarkData (NSUrl bookmarkFileUrl, out NSError error);
 
2580
 
 
2581
                [Export("URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:")]
 
2582
                [Static]
 
2583
                NSUrl FromBookmarkData (NSData data, NSUrlBookmarkResolutionOptions options, [NullAllowed] NSUrl relativeToUrl, out bool isStale, out NSError error);
 
2584
 
 
2585
                [Export("writeBookmarkData:toURL:options:error:")]
 
2586
                [Static]
 
2587
                bool WriteBookmarkData (NSData data, NSUrl bookmarkFileUrl, NSUrlBookmarkCreationOptions options, out NSError error);
 
2588
 
 
2589
                [Export("startAccessingSecurityScopedResource")]
 
2590
                bool StartAccessingSecurityScopedResource();
 
2591
 
 
2592
                [Export("stopAccessingSecurityScopedResource")]
 
2593
                void StopAccessingSecurityScopedResource();
 
2594
        
 
2595
                [Export("filePathURL")]
 
2596
                NSUrl FilePathUrl { get; }
 
2597
 
 
2598
                [Export("fileReferenceURL")]
 
2599
                NSUrl FileReferenceUrl { get; }         
 
2600
 
2206
2601
#endif
2207
2602
 
2208
2603
                [Export ("getResourceValue:forKey:error:"), Internal]
2298
2693
                [Field ("NSURLFileAllocatedSizeKey")]
2299
2694
                NSString FileAllocatedSizeKey { get; }
2300
2695
 
2301
 
                [Field ("NSURLIsAliasFileKey            ")]
2302
 
                NSString IsAliasFileKey          { get; }
 
2696
                [Field ("NSURLIsAliasFileKey")]
 
2697
                NSString IsAliasFileKey { get; }
2303
2698
 
2304
2699
                [Field ("NSURLVolumeLocalizedFormatDescriptionKey")]
2305
2700
                NSString VolumeLocalizedFormatDescriptionKey { get; }
2519
2914
 
2520
2915
                [Since (5,0)]
2521
2916
                [Field ("NSURLUbiquitousItemPercentDownloadedKey")]
 
2917
                [Obsolete ("Deprecated in iOS 6.0. Use NSMetadataQuery.UbiquitousItemPercentDownloadedKey on NSMetadataItem")]
2522
2918
                NSString UbiquitousItemPercentDownloadedKey { get; }
2523
2919
 
2524
2920
                [Since (5,0)]
 
2921
                [Obsolete ("Deprecated in iOS 6.0. Use NSMetadataQuery.NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem")]
2525
2922
                [Field ("NSURLUbiquitousItemPercentUploadedKey")]
2526
2923
                NSString UbiquitousItemPercentUploadedKey { get; }
2527
 
                
 
2924
 
2528
2925
                [Since (5,1)]
 
2926
                [MountainLion]
2529
2927
                [Field ("NSURLIsExcludedFromBackupKey")]
2530
2928
                NSString IsExcludedFromBackupKey { get; }
 
2929
 
 
2930
                [Export ("bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:")]
 
2931
                NSData CreateBookmarkData (NSUrlBookmarkCreationOptions options, string [] resourceValues, [NullAllowed] NSUrl relativeUrl, out NSError error);
 
2932
 
 
2933
                [Export ("initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:")]
 
2934
                IntPtr Constructor (NSData bookmarkData, NSUrlBookmarkResolutionOptions resolutionOptions, [NullAllowed] NSUrl relativeUrl, out bool bookmarkIsStale, out NSError error);
 
2935
 
 
2936
                [Field ("NSURLPathKey")]
 
2937
                [Since (6,0)][MountainLion]
 
2938
                NSString PathKey { get; }
2531
2939
        }
2532
2940
 
2533
2941
        [BaseType (typeof (NSObject), Name="NSURLCache")]
2564
2972
        }
2565
2973
        
2566
2974
        [BaseType (typeof (NSObject), Name="NSURLAuthenticationChallenge")]
 
2975
        // 'init' returns NIL
 
2976
        [DisableDefaultCtor]
2567
2977
        public interface NSUrlAuthenticationChallenge {
2568
2978
                [Export ("initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:")]
2569
 
                IntPtr Constructor (NSUrlProtectionSpace space, NSUrlCredential credential, int previousFailureCount, NSUrlResponse response, NSError error, NSUrlConnection sender);
 
2979
                IntPtr Constructor (NSUrlProtectionSpace space, NSUrlCredential credential, int previousFailureCount, NSUrlResponse response, [NullAllowed] NSError error, NSUrlConnection sender);
2570
2980
                
2571
2981
                [Export ("initWithAuthenticationChallenge:sender:")]
2572
2982
                IntPtr Constructor (NSUrlAuthenticationChallenge  challenge, NSUrlConnection sender);
2588
2998
        
2589
2999
                [Export ("sender")]
2590
3000
                NSUrlConnection Sender { get; }
2591
 
 
2592
 
                [Since (5,0)]
2593
 
                [Export ("performDefaultHandlingForAuthenticationChallenge:")]
2594
 
                void PerformDefaultHandlingForChallenge (NSUrlAuthenticationChallenge challenge);
2595
 
 
2596
 
                [Since (5,0)]
2597
 
                [Export ("rejectProtectionSpaceAndContinueWithChallenge:")]
2598
 
                void PejectProtectionSpaceAndContinueWithChallenge (NSUrlAuthenticationChallenge challenge);
2599
3001
        }
2600
3002
 
2601
3003
        public delegate void NSUrlConnectionDataResponse (NSUrlResponse response, NSData data, NSError error);
2606
3008
                bool CanHandleRequest (NSUrlRequest request);
2607
3009
        
2608
3010
                [Export ("connectionWithRequest:delegate:")][Static]
2609
 
                NSUrlConnection FromRequest (NSUrlRequest request, NSUrlConnectionDelegate del);
 
3011
                NSUrlConnection FromRequest (NSUrlRequest request, NSUrlConnectionDelegate connectionDelegate);
2610
3012
        
2611
3013
                [Export ("initWithRequest:delegate:")]
2612
 
                IntPtr Constructor (NSUrlRequest request, NSUrlConnectionDelegate del);
 
3014
                IntPtr Constructor (NSUrlRequest request, NSUrlConnectionDelegate connectionDelegate);
2613
3015
        
2614
3016
                [Export ("initWithRequest:delegate:startImmediately:")]
2615
 
                IntPtr Constructor (NSUrlRequest request, NSUrlConnectionDelegate del, bool startImmediately);
 
3017
                IntPtr Constructor (NSUrlRequest request, NSUrlConnectionDelegate connectionDelegate, bool startImmediately);
2616
3018
        
2617
3019
                [Export ("start")]
2618
3020
                void Start ();
2637
3039
                void CancelAuthenticationChallenge (NSUrlAuthenticationChallenge  challenge);
2638
3040
 
2639
3041
                [Since (5,0)]
 
3042
                [Export ("performDefaultHandlingForAuthenticationChallenge:")]
 
3043
                void PerformDefaultHandlingForChallenge (NSUrlAuthenticationChallenge challenge);
 
3044
                
 
3045
                [Since (5,0)]
 
3046
                [Export ("rejectProtectionSpaceAndContinueWithChallenge:")]
 
3047
                void RejectProtectionSpaceAndContinueWithChallenge (NSUrlAuthenticationChallenge challenge);
 
3048
 
 
3049
#if !MONOMAC
 
3050
                [Since (5,0)]
2640
3051
                [Export ("originalRequest")]
2641
3052
                NSUrlRequest OriginalRequest { get; }
2642
3053
 
2643
3054
                [Since (5,0)]
2644
3055
                [Export ("currentRequest")]
2645
3056
                NSUrlRequest CurrentRequest { get; }
2646
 
 
 
3057
#endif
2647
3058
                [Export ("setDelegateQueue:")]
2648
3059
                [Since (5,0)]
2649
3060
                void SetDelegateQueue (NSOperationQueue queue);
2651
3062
                [Since (5,0)]
2652
3063
                [Static]
2653
3064
                [Export ("sendAsynchronousRequest:queue:completionHandler:")]
 
3065
                [Async (ResultTypeName = "NSUrlAsyncResult")]
2654
3066
                void SendAsynchronousRequest (NSUrlRequest request, NSOperationQueue queue, NSUrlConnectionDataResponse completionHandler);
2655
3067
                
2656
3068
#if !MONOMAC
2662
3074
 
2663
3075
        [BaseType (typeof (NSObject), Name="NSURLConnectionDelegate")]
2664
3076
        [Model]
 
3077
        [Protocol]
2665
3078
        public interface NSUrlConnectionDelegate {
2666
3079
                [Export ("connection:willSendRequest:redirectResponse:")]
2667
3080
                NSUrlRequest WillSendRequest (NSUrlConnection connection, NSUrlRequest request, NSUrlResponse response);
2702
3115
 
2703
3116
        [BaseType (typeof (NSUrlConnectionDelegate), Name="NSUrlConnectionDownloadDelegate")]
2704
3117
        [Model]
 
3118
        [Protocol]
2705
3119
        public interface NSUrlConnectionDownloadDelegate {
2706
3120
                [Export ("connection:didWriteData:totalBytesWritten:expectedTotalBytes:")]
2707
3121
                void WroteData (NSUrlConnection connection, long bytesWritten, long totalBytesWritten, long expectedTotalBytes);
2715
3129
        }
2716
3130
                
2717
3131
        [BaseType (typeof (NSObject), Name="NSURLCredential")]
 
3132
        // crash when calling NSObjecg.get_Description (and likely other selectors)
 
3133
        [DisableDefaultCtor]
2718
3134
        public interface NSUrlCredential {
2719
3135
                [Export ("persistence")]
2720
3136
                NSUrlCredentialPersistence Persistence { get; }
2748
3164
                //[Export ("certificates")]
2749
3165
                //IntPtr [] Certificates { get; }
2750
3166
        
2751
 
                [Export ("initWithTrust:")]
2752
 
                IntPtr Constructor (IntPtr SecTrustRef_trust, bool ignored);
 
3167
                // bound manually to keep the managed/native signatures identical
 
3168
                //[Export ("initWithTrust:")]
 
3169
                //IntPtr Constructor (IntPtr SecTrustRef_trust, bool ignored);
2753
3170
        
2754
3171
                [Static]
2755
3172
                [Export ("credentialForTrust:")]
2758
3175
        }
2759
3176
 
2760
3177
        [BaseType (typeof (NSObject), Name="NSURLCredentialStorage")]
 
3178
        // init returns NIL -> SharedCredentialStorage
 
3179
        [DisableDefaultCtor]
2761
3180
        public interface NSUrlCredentialStorage {
 
3181
                [Static]
2762
3182
                [Export ("sharedCredentialStorage")]
2763
3183
                NSUrlCredentialStorage SharedCredentialStorage { get; }
2764
3184
 
2920
3340
        }
2921
3341
        
2922
3342
        [BaseType (typeof (NSObject), Name="NSURLProtectionSpace")]
 
3343
        // 'init' returns NIL
 
3344
        [DisableDefaultCtor]
2923
3345
        public interface NSUrlProtectionSpace {
2924
3346
                
2925
3347
                [Export ("initWithHost:port:protocol:realm:authenticationMethod:")]
2967
3389
                NSString HTTPS { get; }
2968
3390
                [Field ("NSURLProtectionSpaceFTP")]
2969
3391
                NSString FTP { get; }
2970
 
                [Field ("NSURLProtectionSpaceHTTPProxy;")]
 
3392
                [Field ("NSURLProtectionSpaceHTTPProxy")]
2971
3393
                NSString HTTPProxy { get; }
2972
 
                [Field ("NSURLProtectionSpaceHTTPSProxy;")]
 
3394
                [Field ("NSURLProtectionSpaceHTTPSProxy")]
2973
3395
                NSString HTTPSProxy { get; }
2974
 
                [Field ("NSURLProtectionSpaceFTPProxy;")]
 
3396
                [Field ("NSURLProtectionSpaceFTPProxy")]
2975
3397
                NSString FTPProxy { get; }
2976
 
                [Field ("NSURLProtectionSpaceSOCKSProxy;")]
 
3398
                [Field ("NSURLProtectionSpaceSOCKSProxy")]
2977
3399
                NSString SOCKSProxy { get; }
2978
3400
 
2979
 
                [Field ("NSURLAuthenticationMethodDefault;")]
 
3401
                [Field ("NSURLAuthenticationMethodDefault")]
2980
3402
                NSString AuthenticationMethodDefault { get; }
2981
3403
 
2982
3404
                [Field ("NSURLAuthenticationMethodHTTPBasic")]
3024
3446
                [Export ("mainDocumentURL")]
3025
3447
                NSUrl MainDocumentURL { get; }
3026
3448
 
 
3449
                [Export ("networkServiceType")]
 
3450
                NSUrlRequestNetworkServiceType NetworkServiceType { get; }
 
3451
 
 
3452
                [Export ("allowsCellularAccess")]
 
3453
                bool AllowsCellularAccess { get; }
 
3454
                
3027
3455
                [Export ("HTTPMethod")]
3028
3456
                string HttpMethod { get; }
3029
3457
 
3086
3514
 
3087
3515
                [Export ("setObject:forKey:"), Internal]
3088
3516
                void SetObject (NSObject obj, NSObject key);
 
3517
 
 
3518
                [Since (6,0)]
 
3519
                [Static]
 
3520
                [Export ("dictionaryWithSharedKeySet:")]
 
3521
                NSDictionary FromSharedKeySet (NSObject sharedKeyToken);
3089
3522
        }
3090
3523
 
3091
3524
        [BaseType (typeof (NSSet))]
3092
3525
        public interface NSMutableSet {
 
3526
                [Export ("initWithArray:")]
 
3527
                IntPtr Constructor (NSArray other);
 
3528
 
 
3529
                [Export ("initWithSet:")]
 
3530
                IntPtr Constructor (NSSet other);
 
3531
                
 
3532
                [Export ("initWithCapacity:")]
 
3533
                IntPtr Constructor (int capacity);
 
3534
 
3093
3535
                [Export ("addObject:")]
3094
3536
                void Add (NSObject nso);
3095
3537
 
3096
3538
                [Export ("removeObject:")]
3097
3539
                void Remove (NSObject nso);
 
3540
 
 
3541
                [Export ("removeAllObjects")]
 
3542
                void RemoveAll ();
 
3543
 
 
3544
                [Export ("addObjectsFromArray:")]
 
3545
                void AddObjects (NSObject [] objects);
 
3546
 
 
3547
                [Internal, Export ("minusSet:")]
 
3548
                void MinusSet (NSSet other);
3098
3549
        }
3099
3550
        
3100
3551
        [BaseType (typeof (NSUrlRequest), Name="NSMutableURLRequest")]
3134
3585
 
3135
3586
                [New][Export ("HTTPShouldHandleCookies")]
3136
3587
                bool ShouldHandleCookies { get; set; }
 
3588
 
 
3589
                [Export ("networkServiceType")]
 
3590
                NSUrlRequestNetworkServiceType NetworkServiceType { set; get; }
3137
3591
                
 
3592
                [New] [Export ("allowsCellularAccess")]
 
3593
                bool AllowsCellularAccess { get; set; }
3138
3594
        }
3139
3595
        
3140
3596
        [BaseType (typeof (NSObject), Name="NSURLResponse")]
3263
3719
 
3264
3720
        [BaseType (typeof (NSObject))]
3265
3721
        [Model]
 
3722
        [Protocol]
3266
3723
        public interface NSStreamDelegate {
3267
3724
                [Export ("stream:handleEvent:"), EventArgs ("NSStream"), EventName ("OnEvent")]
3268
3725
                void HandleEvent (NSStream theStream, NSStreamEvent streamEvent);
3349
3806
                [Export ("stringByReplacingCharactersInRange:withString:")]
3350
3807
                NSString Replace (NSRange range, NSString replacement);
3351
3808
 
3352
 
        }
3353
 
        
 
3809
                // start methods from NSStringPathExtensions category
 
3810
 
 
3811
                [Static]
 
3812
                [Export("pathWithComponents:")]
 
3813
                string[] PathWithComponents( string[] components );
 
3814
 
 
3815
                [Export("pathComponents")]
 
3816
                string[] PathComponents { get; }
 
3817
 
 
3818
                [Export("isAbsolutePath")]
 
3819
                bool IsAbsolutePath { get; }
 
3820
 
 
3821
                [Export("lastPathComponent")]
 
3822
                NSString LastPathComponent { get; }
 
3823
 
 
3824
                [Export("stringByDeletingLastPathComponent")]
 
3825
                NSString DeleteLastPathComponent();
 
3826
 
 
3827
                [Export("stringByAppendingPathComponent:")]
 
3828
                NSString AppendPathComponent( NSString str );
 
3829
 
 
3830
                [Export("pathExtension")]
 
3831
                NSString PathExtension { get; }
 
3832
 
 
3833
                [Export("stringByDeletingPathExtension")]
 
3834
                NSString DeletePathExtension();
 
3835
 
 
3836
                [Export("stringByAppendingPathExtension:")]
 
3837
                NSString AppendPathExtension( NSString str );
 
3838
 
 
3839
                [Export("stringByAbbreviatingWithTildeInPath")]
 
3840
                NSString AbbreviateTildeInPath();
 
3841
 
 
3842
                [Export("stringByExpandingTildeInPath")]
 
3843
                NSString ExpandTildeInPath();
 
3844
 
 
3845
                [Export("stringByStandardizingPath")]
 
3846
                NSString StandarizePath();
 
3847
 
 
3848
                [Export("stringByResolvingSymlinksInPath")]
 
3849
                NSString ResolveSymlinksInPath();
 
3850
 
 
3851
                [Export("stringsByAppendingPaths:")]
 
3852
                string[] AppendPaths( string[] paths );
 
3853
 
 
3854
                // end methods from NSStringPathExtensions category
 
3855
 
 
3856
                [Since (6,0)]
 
3857
                [Export ("capitalizedStringWithLocale:")]
 
3858
                string Capitalize (NSLocale locale);
 
3859
                
 
3860
                [Since (6,0)]
 
3861
                [Export ("lowercaseStringWithLocale:")]
 
3862
                string ToLower (NSLocale locale);
 
3863
                
 
3864
                [Since (6,0)]
 
3865
                [Export ("uppercaseStringWithLocale:")]
 
3866
                string ToUpper (NSLocale locale);
 
3867
        }
 
3868
#if !MONOMAC
 
3869
        [Since (6,0)]
 
3870
        [BaseType (typeof (NSObject))]
 
3871
        public interface NSStringDrawingContext {
 
3872
                [Export ("minimumScaleFactor")]
 
3873
                float MinimumScaleFactor { get; set;  }
 
3874
 
 
3875
                [Export ("minimumTrackingAdjustment")]
 
3876
                float MinimumTrackingAdjustment { get; set;  }
 
3877
 
 
3878
                [Export ("actualScaleFactor")]
 
3879
                float ActualScaleFactor { get;  }
 
3880
 
 
3881
                [Export ("actualTrackingAdjustment")]
 
3882
                float ActualTrackingAdjustment { get;  }
 
3883
 
 
3884
                [Export ("totalBounds")]
 
3885
                RectangleF TotalBounds { get;  }
 
3886
        }
 
3887
#endif
3354
3888
        [BaseType (typeof (NSStream))]
 
3889
        [DefaultCtorVisibility (Visibility.Protected)]
3355
3890
        public interface NSInputStream {
3356
3891
                [Export ("hasBytesAvailable")]
3357
3892
                bool HasBytesAvailable ();
3358
3893
        
3359
3894
                [Export ("initWithFileAtPath:")]
3360
3895
                IntPtr Constructor (string path);
3361
 
        
 
3896
 
 
3897
                [Export ("initWithData:")]
 
3898
                IntPtr Constructor (NSData data);
 
3899
 
 
3900
                [Export ("initWithURL:")]
 
3901
                IntPtr Constructor (NSUrl url);
 
3902
 
3362
3903
                [Static]
3363
3904
                [Export ("inputStreamWithData:")]
3364
3905
                NSInputStream FromData (NSData data);
3366
3907
                [Static]
3367
3908
                [Export ("inputStreamWithFileAtPath:")]
3368
3909
                NSInputStream FromFile (string  path);
3369
 
                
3370
 
                [Export ("_scheduleInCFRunLoop:forMode:")]
3371
 
                void ScheduleInCFRunLoop (IntPtr runloop, string mode);
3372
3910
 
3373
 
                [Export ("_unscheduleFromCFRunLoop:forMode:")]
3374
 
                void UnscheduleInCFRunLoop (IntPtr runloop, string mode);
 
3911
                [Static]
 
3912
                [Export ("inputStreamWithURL:")]
 
3913
                NSInputStream FromUrl (NSUrl url);
3375
3914
        }
3376
3915
 
3377
3916
        //
3455
3994
 
3456
3995
                [Field ("NSKeyValueChangeNotificationIsPriorKey")]
3457
3996
                NSString ChangeNotificationIsPriorKey { get; }
3458
 
 
 
3997
#if MONOMAC
3459
3998
                // Cocoa Bindings added by Kenneth J. Pouncey 2010/11/17
3460
3999
                [Export ("exposedBindings")]
3461
4000
                NSString[] ExposedBindings ();
3475
4014
                [Export ("optionDescriptionsForBinding:")]
3476
4015
                NSObject[] BindingOptionDescriptions (string aBinding);
3477
4016
 
 
4017
                // NSPlaceholders (informal) protocol
3478
4018
                [Static]
3479
4019
                [Export ("defaultPlaceholderForMarker:withBinding:")]
3480
4020
                NSObject GetDefaultPlaceholder (NSObject marker, string binding);
3481
4021
 
 
4022
                [Static]
 
4023
                [Export ("setDefaultPlaceholder:forMarker:withBinding:")]
 
4024
                void SetDefaultPlaceholder (NSObject placeholder, NSObject marker, string binding);
 
4025
 
3482
4026
                [Export ("objectDidEndEditing:")]
3483
4027
                void ObjectDidEndEditing (NSObject editor);
3484
4028
 
3488
4032
                [Export ("commitEditingWithDelegate:didCommitSelector:contextInfo:")]
3489
4033
                //void CommitEditingWithDelegateDidCommitSelectorContextInfo (NSObject objDelegate, Selector didCommitSelector, IntPtr contextInfo);
3490
4034
                void CommitEditing (NSObject objDelegate, Selector didCommitSelector, IntPtr contextInfo);
3491
 
 
 
4035
#endif
3492
4036
                [Export ("copy")]
3493
4037
                NSObject Copy ();
3494
4038
                
3495
4039
                [Export ("mutableCopy")]
3496
4040
                NSObject MutableCopy ();
 
4041
 
 
4042
                [Export ("description")]
 
4043
                string Description { get; }
 
4044
 
 
4045
                [Export ("debugDescription")]
 
4046
                string DebugDescription { get; }
 
4047
 
 
4048
                //
 
4049
                // Extra Perform methods, with selectors
 
4050
                //
 
4051
                [Export ("performSelector:withObject:afterDelay:inModes:")]
 
4052
                void PerformSelector (Selector selector, NSObject withObject, double afterDelay, NSString [] nsRunLoopModes);
 
4053
                
 
4054
                [Export ("performSelector:onThread:withObject:waitUntilDone:")]
 
4055
                void PerformSelector (Selector selector, NSThread onThread, NSObject withObject, bool waitUntilDone);
 
4056
                
 
4057
                [Export ("performSelector:onThread:withObject:waitUntilDone:modes:")]
 
4058
                void PerformSelector (Selector selector, NSThread onThread, NSObject withObject, bool waitUntilDone, NSString [] nsRunLoopModes);
 
4059
                
 
4060
                [Static, Export ("cancelPreviousPerformRequestsWithTarget:")]
 
4061
                void CancelPreviousPerformRequest (NSObject aTarget);
 
4062
 
 
4063
                [Static, Export ("cancelPreviousPerformRequestsWithTarget:selector:object:")]
 
4064
                void CancelPreviousPerformRequest (NSObject aTarget, Selector selector, [NullAllowed] NSObject argument);
3497
4065
        }
3498
4066
        
3499
4067
        [BaseType (typeof (NSObject))]
3600
4168
                bool Suspended { [Bind ("isSuspended")]get; set; }
3601
4169
        }
3602
4170
 
3603
 
#if !MONOMAC
3604
4171
        [BaseType (typeof (NSObject))]
3605
 
        interface NSOrthography {
 
4172
        // Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
 
4173
        [DisableDefaultCtor]
 
4174
        public interface NSOrthography {
3606
4175
                [Export ("dominantScript")]
3607
4176
                string DominantScript { get;  }
3608
4177
 
3625
4194
                string DominantLanguageForScript (string script);
3626
4195
 
3627
4196
                [Export ("initWithDominantScript:languageMap:")]
3628
 
                IntPtr Constructor (string dominantScript, NSDictionary languageMap);
 
4197
                IntPtr Constructor (string dominantScript, [NullAllowed] NSDictionary languageMap);
3629
4198
        }
3630
 
#endif
3631
4199
        
3632
4200
        [BaseType (typeof (NSStream))]
 
4201
        [DisableDefaultCtor] // crash when used
3633
4202
        public interface NSOutputStream {
 
4203
                [Export ("initToMemory")]
 
4204
                IntPtr Constructor ();
 
4205
 
3634
4206
                [Export ("hasSpaceAvailable")]
3635
4207
                bool HasSpaceAvailable ();
3636
4208
        
3654
4226
        }
3655
4227
 
3656
4228
        [BaseType (typeof (NSObject), Name="NSHTTPCookie")]
 
4229
        // default 'init' crash both simulator and devices
 
4230
        [DisableDefaultCtor]
3657
4231
        public interface NSHttpCookie {
3658
4232
                [Export ("initWithProperties:")]
3659
4233
                IntPtr Constructor (NSDictionary properties);
3708
4282
        }
3709
4283
 
3710
4284
        [BaseType (typeof (NSObject), Name="NSHTTPCookieStorage")]
 
4285
        // NSHTTPCookieStorage implements a singleton object -> use SharedStorage since 'init' returns NIL
 
4286
        [DisableDefaultCtor]
3711
4287
        public interface NSHttpCookieStorage {
3712
4288
                [Export ("sharedHTTPCookieStorage"), Static]
3713
4289
                NSHttpCookieStorage SharedStorage { get; }
3752
4328
        }
3753
4329
        
3754
4330
        [BaseType (typeof (NSObject))]
3755
 
        public interface NSBundle {
 
4331
#if MONOMAC
 
4332
        [DisableDefaultCtor] // An uncaught exception was raised: -[__NSCFDictionary removeObjectForKey:]: attempt to remove nil key
 
4333
#endif
 
4334
        public partial interface NSBundle {
3756
4335
                [Export ("mainBundle")][Static]
3757
4336
                NSBundle MainBundle { get; }
3758
4337
 
3775
4354
                NSBundle [] AllFrameworks { get; }
3776
4355
 
3777
4356
                [Export ("load")]
3778
 
                void Load ();
 
4357
                bool Load ();
3779
4358
 
3780
4359
                [Export ("isLoaded")]
3781
4360
                bool IsLoaded { get; }
3782
4361
 
3783
4362
                [Export ("unload")]
3784
 
                void Unload ();
 
4363
                bool Unload ();
3785
4364
 
3786
4365
                [Export ("bundlePath")]
3787
4366
                string BundlePath { get; }
3854
4433
 
3855
4434
                [Export ("pathForSoundResource:")]
3856
4435
                string PathForSoundResource (string resource);
 
4436
 
 
4437
                [Export("appStoreReceiptURL")]
 
4438
                NSUrl AppStoreReceiptUrl { get; }
 
4439
 
3857
4440
#else
3858
4441
                // http://developer.apple.com/library/ios/#documentation/uikit/reference/NSBundle_UIKitAdditions/Introduction/Introduction.html
3859
4442
                [Export ("loadNibNamed:owner:options:")]
3860
 
                NSArray LoadNib (string nibName, NSObject owner, [NullAllowed] NSDictionary options);
 
4443
                NSArray LoadNib (string nibName, [NullAllowed] NSObject owner, [NullAllowed] NSDictionary options);
3861
4444
#endif
3862
4445
                [Export ("bundleURL")]
3863
4446
                [Since (4,0)]
3898
4481
                [Static, Export ("bundleWithURL:")]
3899
4482
                [Since (4,0)]
3900
4483
                NSBundle FromUrl (NSUrl url);
 
4484
 
 
4485
                [Export ("preferredLocalizations")]
 
4486
                string [] PreferredLocalizations { get; }
 
4487
 
 
4488
                [Export ("localizations")]
 
4489
                string [] Localizations { get; }
3901
4490
        }
3902
4491
 
3903
4492
        [BaseType (typeof (NSObject))]
3926
4515
                [Export ("compare:")]
3927
4516
                int Compare (NSIndexPath other);
3928
4517
 
3929
 
                [Export ("indexPathForRow:inSection:")][Static]
3930
 
                NSIndexPath FromRowSection (int row, int section);
3931
 
                
 
4518
#if !MONOMAC
 
4519
                // NSIndexPath UIKit Additions Reference
 
4520
                // https://developer.apple.com/library/ios/#documentation/UIKit/Reference/NSIndexPath_UIKitAdditions/Reference/Reference.html
3932
4521
                [Export ("row")]
3933
4522
                int Row { get; }
3934
4523
 
3935
4524
                [Export ("section")]
3936
4525
                int Section { get; }
 
4526
 
 
4527
                [Static]
 
4528
                [Export ("indexPathForRow:inSection:")]
 
4529
                NSIndexPath FromRowSection (int row, int section);
 
4530
 
 
4531
                [Export ("item")]
 
4532
                [Since (6,0)]
 
4533
                int Item { get; }
 
4534
 
 
4535
                [Static]
 
4536
                [Since (6,0)]
 
4537
                [Export ("indexPathForItem:inSection:")]
 
4538
                NSIndexPath FromItemSection (int item, int section);
 
4539
#endif
3937
4540
                
3938
4541
        }
3939
4542
 
3994
4597
        }
3995
4598
 
3996
4599
        [BaseType (typeof (NSObject), Name="NSJSONSerialization")]
 
4600
        // Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: *** +[NSJSONSerialization allocWithZone:]: Do not create instances of NSJSONSerialization in this release
 
4601
        [DisableDefaultCtor]
3997
4602
        interface NSJsonSerialization {
3998
4603
                [Static]
3999
4604
                [Export ("isValidJSONObject:")]
4041
4646
                void Remove (uint index);
4042
4647
 
4043
4648
                [Export ("shiftIndexesStartingAtIndex:by:")]
4044
 
                void ShiftIndexes (uint startIndex, uint delta);
 
4649
                void ShiftIndexes (uint startIndex, int delta);
4045
4650
        }
4046
4651
        
4047
4652
        [BaseType (typeof (NSObject), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (NSNetServiceDelegate)})]
4086
4691
                [Export ("publishWithOptions:")]
4087
4692
                void Publish (NSNetServiceOptions options);
4088
4693
 
 
4694
                [Obsolete ("Deprecated in iOS 2.0 / OSX 10.4, use Resolve(double)")]
4089
4695
                [Export ("resolve")]
4090
4696
                void Resolve ();
4091
4697
 
4108
4714
                bool GetStreams (IntPtr ptrToInputStorage, IntPtr ptrToOutputStorage);
4109
4715
                
4110
4716
                [Export ("TXTRecordData")]
4111
 
                NSData TxtRecordData { get; set; }
 
4717
                NSData GetTxtRecordData ();
 
4718
 
 
4719
                [Export ("setTXTRecordData:")]
 
4720
                bool SetTxtRecordData (NSData data);
 
4721
 
 
4722
                //NSData TxtRecordData { get; set; }
4112
4723
 
4113
4724
                [Export ("startMonitoring")]
4114
4725
                void StartMonitoring ();
4118
4729
        }
4119
4730
 
4120
4731
        [Model, BaseType (typeof (NSObject))]
 
4732
        [Protocol]
4121
4733
        public interface NSNetServiceDelegate {
4122
4734
                [Export ("netServiceWillPublish:")]
4123
4735
                void WillPublish (NSNetService sender);
4175
4787
        }
4176
4788
 
4177
4789
        [Model, BaseType (typeof (NSObject))]
 
4790
        [Protocol]
4178
4791
        public interface NSNetServiceBrowserDelegate {
4179
4792
                [Export ("netServiceBrowserWillSearch:")]
4180
4793
                void SearchStarted (NSNetServiceBrowser sender);
4199
4812
        }
4200
4813
        
4201
4814
        [BaseType (typeof (NSObject))]
 
4815
        // Objective-C exception thrown.  Name: NSGenericException Reason: *** -[NSConcreteNotification init]: should never be used
 
4816
        [DisableDefaultCtor]
4202
4817
        public interface NSNotification {
4203
4818
                [Export ("name")]
4204
4819
                string Name { get; }
4244
4859
 
4245
4860
                [Since (4,0)]
4246
4861
                [Export ("addObserverForName:object:queue:usingBlock:")]
4247
 
                void AddObserver (string name, NSObject obj, NSOperationQueue queue, NSNotificationHandler handler);
 
4862
                NSObject AddObserver (string name, NSObject obj, NSOperationQueue queue, NSNotificationHandler handler);
4248
4863
        }
4249
4864
 
4250
4865
#if MONOMAC
4306
4921
        public delegate void NSNotificationHandler (NSNotification notification);
4307
4922
        
4308
4923
        [BaseType (typeof (NSObject))]
4309
 
        public interface NSValue {
 
4924
        // init returns NIL
 
4925
        [DisableDefaultCtor]
 
4926
        public partial interface NSValue {
4310
4927
                [Export ("getValue:")]
4311
4928
                void StoreValueAtAddress (IntPtr value);
4312
4929
 
4335
4952
        
4336
4953
                [Export ("isEqualToValue:")]
4337
4954
                bool IsEqualTo (NSValue value);
 
4955
                
 
4956
                [Export ("valueWithRange:")][Static]
 
4957
                NSValue FromRange(NSRange range);
4338
4958
        
4339
4959
#if MONOMAC
4340
4960
                [Static, Export ("valueWithCMTime:"), Lion]
4436
5056
                [Export ("CATransform3DValue")]
4437
5057
                MonoMac.CoreAnimation.CATransform3D CATransform3DValue { get; }
4438
5058
 
 
5059
                [Static, Export ("valueWithMKCoordinate:")]
 
5060
                NSValue FromMKCoordinate (MonoTouch.CoreLocation.CLLocationCoordinate2D coordinate);
 
5061
 
 
5062
                [Static, Export ("valueWithMKCoordinateSpan:")]
 
5063
                NSValue FromMKCoordinateSpan (MonoTouch.MapKit.MKCoordinateSpan coordinateSpan);
 
5064
 
 
5065
                [Export ("MKCoordinateValue")]
 
5066
                MonoTouch.CoreLocation.CLLocationCoordinate2D CoordinateValue { get; }
4439
5067
                
 
5068
                [Export ("MKCoordinateSpanValue")]
 
5069
                MonoTouch.MapKit.MKCoordinateSpan CoordinateSpanValue { get; }
4440
5070
#endif
4441
5071
        }
4442
5072
        
4443
5073
        [BaseType (typeof (NSValue))]
 
5074
        // init returns NIL
 
5075
        [DisableDefaultCtor]
4444
5076
        public interface NSNumber {
4445
5077
                [Export ("charValue")]
4446
5078
                sbyte SByteValue { get; }
4602
5234
                [Export ("numberFromString:")]
4603
5235
                NSNumber NumberFromString (string text);
4604
5236
 
 
5237
                [Static]
4605
5238
                [Export ("localizedStringFromNumber:numberStyle:")]
4606
5239
                string LocalizedStringFromNumbernumberStyle (NSNumber num, NSNumberFormatterStyle nstyle);
4607
5240
 
4811
5444
                [Export ("maximumDecimalNumber")][Static]
4812
5445
                NSDecimalNumber MaxValue { get; }
4813
5446
 
4814
 
                [Export ("notANumber")]
 
5447
                [Export ("notANumber")][Static]
4815
5448
                NSDecimalNumber NaN { get; }
4816
5449
 
4817
5450
                //
4843
5476
                NSDecimalNumber Divide (NSDecimalNumber d, NSObject Behavior);
4844
5477
 
4845
5478
                [Export ("decimalNumberByRaisingToPower:")]
4846
 
                NSDecimalNumber RaiseTo (NSDecimalNumber d);
 
5479
                NSDecimalNumber RaiseTo (uint power);
4847
5480
 
4848
5481
                [Export ("decimalNumberByRaisingToPower:withBehavior:")]
4849
 
                NSDecimalNumber RaiseTo (NSDecimalNumber d, NSObject Behavior);
 
5482
                NSDecimalNumber RaiseTo (uint power, NSObject Behavior);
4850
5483
                
4851
5484
                [Export ("decimalNumberByMultiplyingByPowerOf10:")]
4852
 
                NSDecimalNumber MultiplyPowerOf10 (NSDecimalNumber d);
 
5485
                NSDecimalNumber MultiplyPowerOf10 (short power);
4853
5486
 
4854
5487
                [Export ("decimalNumberByMultiplyingByPowerOf10:withBehavior:")]
4855
 
                NSDecimalNumber MultiplyPowerOf10 (NSDecimalNumber d, NSObject Behavior);
 
5488
                NSDecimalNumber MultiplyPowerOf10 (short power, NSObject Behavior);
4856
5489
 
4857
5490
                [Export ("decimalNumberByRoundingAccordingToBehavior:")]
4858
5491
                NSDecimalNumber Rounding (NSObject behavior);
4888
5521
                [Static, Export ("exit")]
4889
5522
                void Exit ();
4890
5523
 
4891
 
                [Static, Export ("threadPriority")]
4892
 
                double Priority { get; set; }
 
5524
                [Static, Export ("threadPriority"), Internal]
 
5525
                double _GetPriority ();
 
5526
 
 
5527
                [Static, Export ("setThreadPriority:"), Internal]
 
5528
                bool _SetPriority (double priority);
4893
5529
 
4894
5530
                //+ (NSArray *)callStackReturnAddresses;
4895
5531
 
4902
5538
                [Export ("isMainThread")]
4903
5539
                bool IsMainThread { get; }
4904
5540
 
 
5541
                // MainThread is already used for the instance selector and we can't reuse the same name
 
5542
                [Static]
 
5543
                [Export ("isMainThread")]
 
5544
                bool IsMain { get; }
 
5545
 
 
5546
                [Static]
4905
5547
                [Export ("mainThread")]
4906
5548
                NSThread MainThread { get; }
4907
5549
 
4908
5550
                [Export ("initWithTarget:selector:object:")]
4909
 
                IntPtr Constructor (NSObject target, Selector selector, NSObject argument);
 
5551
                IntPtr Constructor (NSObject target, Selector selector, [NullAllowed] NSObject argument);
4910
5552
 
4911
5553
                [Export ("isExecuting")]
4912
5554
                bool IsExecuting { get; }
4960
5602
                string OperatingSystemVersionString { get; }
4961
5603
 
4962
5604
                [Export ("physicalMemory")]
4963
 
                long PhysicalMemory { get; }
 
5605
                ulong PhysicalMemory { get; }
4964
5606
                
4965
5607
                [Export ("processorCount")]
4966
5608
                int ProcessorCount { get; }
4967
5609
                
4968
5610
                [Export ("activeProcessorCount")]
4969
5611
                int ActiveProcessorCount { get; }
 
5612
 
 
5613
                [Export ("systemUptime")]
 
5614
                double SystemUptime { get; }
 
5615
 
 
5616
                [Export ("enableSuddenTermination")]
 
5617
                void EnableSuddenTermination  ();
 
5618
        
 
5619
                [Export ("disableSuddenTermination")]
 
5620
                void DisableSuddenTermination ();
 
5621
 
 
5622
                [Export ("enableAutomaticTermination:")]
 
5623
                void EnableAutomaticTermination (string reason);
 
5624
 
 
5625
                [Export ("disableAutomaticTermination:")]
 
5626
                void DisableAutomaticTermination (string reason);
 
5627
 
 
5628
                [Export ("automaticTerminationSupportEnabled")]
 
5629
                bool AutomaticTerminationSupportEnabled { get; set; }
4970
5630
        }
4971
5631
 
4972
5632
        [BaseType (typeof (NSMutableData))]
4975
5635
                
4976
5636
        }
4977
5637
 
4978
 
#if !MONOMAC
4979
5638
        public delegate void NSFileCoordinatorWorker (NSUrl newUrl);
4980
5639
        public delegate void NSFileCoordinatorWorkerRW (NSUrl newReadingUrl, NSUrl newWritingUrl);
4981
5640
        
5015
5674
 
5016
5675
                [Export ("cancel")]
5017
5676
                void Cancel ();
 
5677
 
 
5678
                [Since (6,0)]
 
5679
                [MountainLion]
 
5680
                [Export ("itemAtURL:willMoveToURL:")]
 
5681
                void WillMove (NSUrl oldUrl, NSUrl newUrl);
5018
5682
        }
5019
 
#endif
5020
5683
        
5021
5684
        [BaseType (typeof (NSObject))]
5022
 
        public interface NSFileManager {
 
5685
        public partial interface NSFileManager {
5023
5686
                [Field("NSFileType")]
5024
5687
                NSString NSFileType { get; }
5025
5688
 
5097
5760
 
5098
5761
                [Field("NSFileBusy")]
5099
5762
                NSString Busy { get; }
5100
 
 
 
5763
#if !MONOMAC
5101
5764
                [Field ("NSFileProtectionKey")]
5102
5765
                NSString FileProtectionKey { get; }
5103
5766
 
5112
5775
                NSString FileProtectionCompleteUnlessOpen { get; }
5113
5776
 
5114
5777
                [Since (5,0)]
5115
 
                [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication ")]
 
5778
                [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication")]
5116
5779
                NSString FileProtectionCompleteUntilFirstUserAuthentication  { get; }
5117
 
                
 
5780
#endif
5118
5781
                [Field("NSFileSystemSize")]
5119
5782
                NSString SystemSize { get; }
5120
5783
 
5140
5803
                bool SetAttributes (NSDictionary attributes, string path, out NSError error);
5141
5804
 
5142
5805
                [Export ("createDirectoryAtPath:withIntermediateDirectories:attributes:error:")]
5143
 
                bool CreateDirectory (string path, bool createIntermediates, NSDictionary attributes, out NSError error);
 
5806
                bool CreateDirectory (string path, bool createIntermediates, [NullAllowed] NSDictionary attributes, out NSError error);
5144
5807
 
5145
5808
                [Export ("contentsOfDirectoryAtPath:error:")]
5146
5809
                string[] GetDirectoryContent (string path, out NSError error);
5170
5833
                bool Link (string srcPath, string dstPath, out NSError error);
5171
5834
 
5172
5835
                [Export ("removeItemAtPath:error:")]
5173
 
                bool Remove (string path, out NSError error);
 
5836
                bool Remove ([NullAllowed] string path, out NSError error);
5174
5837
 
5175
5838
#if DEPRECATED
5176
5839
                // These are not available on iOS, and deprecated on OSX.
5187
5850
                bool RemoveFileAtPath (string path, IntPtr handler);
5188
5851
#endif
5189
5852
                [Export ("currentDirectoryPath")]
5190
 
                string CurrentDirectory { get; [Bind ("changeCurrentDirectoryPath:")] set; }
 
5853
                string GetCurrentDirectory ();
 
5854
 
 
5855
                [Export ("changeCurrentDirectoryPath:")]
 
5856
                bool ChangeCurrentDirectory (string path);
5191
5857
 
5192
5858
                [Export ("fileExistsAtPath:")]
5193
5859
                bool FileExists (string path);
5194
5860
 
5195
5861
                [Export ("fileExistsAtPath:isDirectory:")]
5196
 
                bool FileExists (string path, bool isDirectory);
 
5862
                bool FileExists (string path, ref bool isDirectory);
5197
5863
 
5198
5864
                [Export ("isReadableFileAtPath:")]
5199
5865
                bool IsReadableFile (string path);
5226
5892
                NSData Contents (string path);
5227
5893
 
5228
5894
                [Export ("createFileAtPath:contents:attributes:")]
5229
 
                bool CreateFile (string path, NSData data, NSDictionary attr);
 
5895
                bool CreateFile (string path, NSData data, [NullAllowed] NSDictionary attr);
5230
5896
 
5231
5897
                [Since (4,0)]
5232
5898
                [Export ("contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:")]
5246
5912
 
5247
5913
                [Since (4,0)]
5248
5914
                [Export ("removeItemAtURL:error:")]
5249
 
                bool Remove (NSUrl url, out NSError error);
 
5915
                bool Remove ([NullAllowed] NSUrl url, out NSError error);
5250
5916
 
5251
5917
                [Since (4,0)]
5252
5918
                [Export ("enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:")]
5253
 
                NSDirectoryEnumerator GetEnumerator (NSUrl url, NSArray properties, NSDirectoryEnumerationOptions options, out NSError error);
 
5919
                NSDirectoryEnumerator GetEnumerator (NSUrl url, [NullAllowed] NSArray properties, NSDirectoryEnumerationOptions options, [NullAllowed] NSEnumerateErrorHandler handler);
5254
5920
 
5255
5921
                [Since (4,0)]
5256
5922
                [Export ("URLForDirectory:inDomain:appropriateForURL:create:error:")]
5262
5928
 
5263
5929
                [Since (4,0)]
5264
5930
                [Export ("replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:")]
5265
 
                bool Replace (NSUrl originalItem, NSUrl newItem, string backupItemName, NSFileManagerItemReplacementOptions options, out NSUrl resultingURL, out NSError error);
 
5931
                bool Replace (NSUrl originalItem, NSUrl newItem, [NullAllowed] string backupItemName, NSFileManagerItemReplacementOptions options, out NSUrl resultingURL, out NSError error);
5266
5932
 
5267
5933
                [Since (4,0)]
5268
5934
                [Export ("mountedVolumeURLsIncludingResourceValuesForKeys:options:")]
5269
 
                NSUrl[] GetMountedVolumes(NSArray properties, NSVolumeEnumerationOptions options);
 
5935
                NSUrl[] GetMountedVolumes ([NullAllowed] NSArray properties, NSVolumeEnumerationOptions options);
5270
5936
 
5271
5937
                // Methods to convert paths to/from C strings for passing to system calls - Not implemented
5272
5938
                ////- (const char *)fileSystemRepresentationWithPath:(NSString *)path;
5278
5944
                //string StringWithFileSystemRepresentation (const char str, uint len);
5279
5945
 
5280
5946
                [Since (5,0)]
5281
 
                [Export ("createDirectoryAtURL:withIntermediateDirectories:attributes:error:")]
5282
 
                bool CreateDirectory (NSUrl url, bool createIntermediates, NSDictionary attributes, out NSError error);
 
5947
                [Export ("createDirectoryAtURL:withIntermediateDirectories:attributes:error:")]
 
5948
                bool CreateDirectory (NSUrl url, bool createIntermediates, [NullAllowed] NSDictionary attributes, out NSError error);
5283
5949
 
5284
5950
                [Since (5,0)]
5285
5951
                [Export ("createSymbolicLinkAtURL:withDestinationURL:error:")]
5308
5974
                [Since (5,0)]
5309
5975
                [Export ("URLForPublishingUbiquitousItemAtURL:expirationDate:error:")]
5310
5976
                NSUrl GetUrlForPublishingUbiquitousItem (NSUrl url, out NSDate expirationDate, out NSError error);
 
5977
 
 
5978
                [Since (6,0)]
 
5979
                [MountainLion]
 
5980
                [Export ("ubiquityIdentityToken")]
 
5981
                NSObject UbiquityIdentityToken { get; }
 
5982
 
 
5983
                [Since (6,0)]
 
5984
                [MountainLion]
 
5985
                [Field ("NSUbiquityIdentityDidChangeNotification")]
 
5986
                [Notification]
 
5987
                NSString UbiquityIdentityDidChangeNotification { get; }
5311
5988
        }
5312
5989
 
5313
5990
        [BaseType(typeof(NSObject))]
5314
5991
        [Model]
 
5992
        [Protocol]
5315
5993
        public interface NSFileManagerDelegate {
5316
5994
                [Export("fileManager:shouldCopyItemAtPath:toPath:")]
5317
5995
                bool ShouldCopyItemAtPath(NSFileManager fm, NSString srcPath, NSString dstPath);
5374
6052
                bool ShouldProceedAfterErrorRemovingItem (NSFileManager fileManager, NSError error, string path);
5375
6053
        }
5376
6054
 
5377
 
#if !MONOMAC
5378
6055
        [BaseType (typeof (NSObject))]
5379
6056
        [Model]
5380
 
        interface NSFilePresenter {
 
6057
        [Protocol]
 
6058
        partial interface NSFilePresenter {
5381
6059
                [Abstract]
5382
6060
                [Export ("presentedItemURL")]
5383
6061
                NSUrl PresentedItemURL { get; }
5438
6116
        }
5439
6117
                
5440
6118
        [BaseType (typeof (NSObject))]
 
6119
        // Objective-C exception thrown.  Name: NSGenericException Reason: -[NSFileVersion init]: You have to use one of the factory methods to instantiate NSFileVersion.
 
6120
        [DisableDefaultCtor]
5441
6121
        interface NSFileVersion {
5442
6122
                [Export ("URL")]
5443
6123
                NSUrl Url { get;  }
5459
6139
 
5460
6140
                [Export ("resolved")]
5461
6141
                bool Resolved { [Bind ("isResolved")] get; set;  }
5462
 
 
 
6142
#if MONOMAC
5463
6143
                [Export ("discardable")]
5464
6144
                bool Discardable { [Bind ("isDiscardable")] get; set;  }
5465
 
 
 
6145
#endif
5466
6146
                [Static]
5467
6147
                [Export ("currentVersionOfItemAtURL:")]
5468
6148
                NSFileVersion GetCurrentVersion (NSUrl url);
5499
6179
                [Export ("removeOtherVersionsOfItemAtURL:error:")]
5500
6180
                bool RemoveOtherVersions (NSUrl url, out NSError outError);
5501
6181
        }
5502
 
#endif
5503
6182
 
5504
6183
        [BaseType (typeof (NSObject))]
5505
6184
        public interface NSFileWrapper {
5643
6322
        
5644
6323
        [BaseType (typeof (NSObject))]
5645
6324
        [Since (4,0)]
 
6325
        // 'init' returns NIL
 
6326
        [DisableDefaultCtor]
5646
6327
        public interface NSPredicate {
5647
6328
                [Static]
5648
6329
                [Export ("predicateWithFormat:argumentArray:")]
5749
6430
                IntPtr Constructor (NSUrlRequest request, [NullAllowed] NSCachedUrlResponse cachedResponse, NSUrlProtocolClient client);
5750
6431
 
5751
6432
                [Export ("client")]
5752
 
                NSObject WeakClient { get; set; }
 
6433
                NSObject WeakClient { get; }
5753
6434
 
5754
6435
                [Export ("request")]
5755
6436
                NSUrlRequest Request { get; }
5757
6438
                [Export ("cachedResponse")]
5758
6439
                NSCachedUrlResponse CachedResponse { get; }
5759
6440
 
 
6441
                [Static]
5760
6442
                [Export ("canInitWithRequest:")]
5761
6443
                bool CanInitWithRequest (NSUrlRequest request);
5762
6444
 
5795
6477
                void UnregisterClass (Class protocolClass);
5796
6478
        }
5797
6479
 
 
6480
        [BaseType (typeof(NSObject))]
 
6481
        [DisableDefaultCtor]
 
6482
        public interface NSPropertyListSerialization {
 
6483
                [Static, Export ("dataWithPropertyList:format:options:error:")]
 
6484
                NSData DataWithPropertyList (NSObject plist, NSPropertyListFormat format,
 
6485
                        NSPropertyListWriteOptions options, out NSError error);
 
6486
 
 
6487
                [Static, Export ("writePropertyList:toStream:format:options:error:")]
 
6488
                int WritePropertyList (NSObject plist, NSOutputStream stream, NSPropertyListFormat format,
 
6489
                        NSPropertyListWriteOptions options, out NSError error);
 
6490
 
 
6491
                [Static, Export ("propertyListWithData:options:format:error:")]
 
6492
                NSObject PropertyListWithData (NSData data, NSPropertyListReadOptions options,
 
6493
                        ref NSPropertyListFormat format, out NSError error);
 
6494
 
 
6495
                [Static, Export ("propertyListWithStream:options:format:error:")]
 
6496
                NSObject PropertyListWithStream (NSInputStream stream, NSPropertyListReadOptions options,
 
6497
                        ref NSPropertyListFormat format, out NSError error);
 
6498
 
 
6499
                [Static, Export ("propertyList:isValidForFormat:")]
 
6500
                bool IsValidForFormat (NSObject plist, NSPropertyListFormat format);
 
6501
        }
5798
6502
}
5799
6503