1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[cfg(feature = "NSString")]
12pub type NSURLResourceKey = NSString;
13
14extern "C" {
15 #[cfg(feature = "NSString")]
17 pub static NSURLFileScheme: &'static NSString;
18}
19
20extern "C" {
21 #[cfg(feature = "NSString")]
23 pub static NSURLKeysOfUnsetValuesKey: &'static NSURLResourceKey;
24}
25
26extern "C" {
27 #[cfg(feature = "NSString")]
29 pub static NSURLNameKey: &'static NSURLResourceKey;
30}
31
32extern "C" {
33 #[cfg(feature = "NSString")]
35 pub static NSURLLocalizedNameKey: &'static NSURLResourceKey;
36}
37
38extern "C" {
39 #[cfg(feature = "NSString")]
41 pub static NSURLIsRegularFileKey: &'static NSURLResourceKey;
42}
43
44extern "C" {
45 #[cfg(feature = "NSString")]
47 pub static NSURLIsDirectoryKey: &'static NSURLResourceKey;
48}
49
50extern "C" {
51 #[cfg(feature = "NSString")]
53 pub static NSURLIsSymbolicLinkKey: &'static NSURLResourceKey;
54}
55
56extern "C" {
57 #[cfg(feature = "NSString")]
59 pub static NSURLIsVolumeKey: &'static NSURLResourceKey;
60}
61
62extern "C" {
63 #[cfg(feature = "NSString")]
65 pub static NSURLIsPackageKey: &'static NSURLResourceKey;
66}
67
68extern "C" {
69 #[cfg(feature = "NSString")]
71 pub static NSURLIsApplicationKey: &'static NSURLResourceKey;
72}
73
74extern "C" {
75 #[cfg(feature = "NSString")]
77 pub static NSURLApplicationIsScriptableKey: &'static NSURLResourceKey;
78}
79
80extern "C" {
81 #[cfg(feature = "NSString")]
83 pub static NSURLIsSystemImmutableKey: &'static NSURLResourceKey;
84}
85
86extern "C" {
87 #[cfg(feature = "NSString")]
89 pub static NSURLIsUserImmutableKey: &'static NSURLResourceKey;
90}
91
92extern "C" {
93 #[cfg(feature = "NSString")]
95 pub static NSURLIsHiddenKey: &'static NSURLResourceKey;
96}
97
98extern "C" {
99 #[cfg(feature = "NSString")]
101 pub static NSURLHasHiddenExtensionKey: &'static NSURLResourceKey;
102}
103
104extern "C" {
105 #[cfg(feature = "NSString")]
107 pub static NSURLCreationDateKey: &'static NSURLResourceKey;
108}
109
110extern "C" {
111 #[cfg(feature = "NSString")]
113 pub static NSURLContentAccessDateKey: &'static NSURLResourceKey;
114}
115
116extern "C" {
117 #[cfg(feature = "NSString")]
119 pub static NSURLContentModificationDateKey: &'static NSURLResourceKey;
120}
121
122extern "C" {
123 #[cfg(feature = "NSString")]
125 pub static NSURLAttributeModificationDateKey: &'static NSURLResourceKey;
126}
127
128extern "C" {
129 #[cfg(feature = "NSString")]
131 pub static NSURLLinkCountKey: &'static NSURLResourceKey;
132}
133
134extern "C" {
135 #[cfg(feature = "NSString")]
137 pub static NSURLParentDirectoryURLKey: &'static NSURLResourceKey;
138}
139
140extern "C" {
141 #[cfg(feature = "NSString")]
143 pub static NSURLVolumeURLKey: &'static NSURLResourceKey;
144}
145
146extern "C" {
147 #[cfg(feature = "NSString")]
149 pub static NSURLTypeIdentifierKey: &'static NSURLResourceKey;
150}
151
152extern "C" {
153 #[cfg(feature = "NSString")]
155 pub static NSURLContentTypeKey: &'static NSURLResourceKey;
156}
157
158extern "C" {
159 #[cfg(feature = "NSString")]
161 pub static NSURLLocalizedTypeDescriptionKey: &'static NSURLResourceKey;
162}
163
164extern "C" {
165 #[cfg(feature = "NSString")]
167 pub static NSURLLabelNumberKey: &'static NSURLResourceKey;
168}
169
170extern "C" {
171 #[cfg(feature = "NSString")]
173 pub static NSURLLabelColorKey: &'static NSURLResourceKey;
174}
175
176extern "C" {
177 #[cfg(feature = "NSString")]
179 pub static NSURLLocalizedLabelKey: &'static NSURLResourceKey;
180}
181
182extern "C" {
183 #[cfg(feature = "NSString")]
185 pub static NSURLEffectiveIconKey: &'static NSURLResourceKey;
186}
187
188extern "C" {
189 #[cfg(feature = "NSString")]
191 pub static NSURLCustomIconKey: &'static NSURLResourceKey;
192}
193
194extern "C" {
195 #[cfg(feature = "NSString")]
197 pub static NSURLFileResourceIdentifierKey: &'static NSURLResourceKey;
198}
199
200extern "C" {
201 #[cfg(feature = "NSString")]
203 pub static NSURLVolumeIdentifierKey: &'static NSURLResourceKey;
204}
205
206extern "C" {
207 #[cfg(feature = "NSString")]
209 pub static NSURLPreferredIOBlockSizeKey: &'static NSURLResourceKey;
210}
211
212extern "C" {
213 #[cfg(feature = "NSString")]
215 pub static NSURLIsReadableKey: &'static NSURLResourceKey;
216}
217
218extern "C" {
219 #[cfg(feature = "NSString")]
221 pub static NSURLIsWritableKey: &'static NSURLResourceKey;
222}
223
224extern "C" {
225 #[cfg(feature = "NSString")]
227 pub static NSURLIsExecutableKey: &'static NSURLResourceKey;
228}
229
230extern "C" {
231 #[cfg(feature = "NSString")]
233 pub static NSURLFileSecurityKey: &'static NSURLResourceKey;
234}
235
236extern "C" {
237 #[cfg(feature = "NSString")]
239 pub static NSURLIsExcludedFromBackupKey: &'static NSURLResourceKey;
240}
241
242extern "C" {
243 #[cfg(feature = "NSString")]
245 pub static NSURLTagNamesKey: &'static NSURLResourceKey;
246}
247
248extern "C" {
249 #[cfg(feature = "NSString")]
251 pub static NSURLPathKey: &'static NSURLResourceKey;
252}
253
254extern "C" {
255 #[cfg(feature = "NSString")]
257 pub static NSURLCanonicalPathKey: &'static NSURLResourceKey;
258}
259
260extern "C" {
261 #[cfg(feature = "NSString")]
263 pub static NSURLIsMountTriggerKey: &'static NSURLResourceKey;
264}
265
266extern "C" {
267 #[cfg(feature = "NSString")]
269 pub static NSURLGenerationIdentifierKey: &'static NSURLResourceKey;
270}
271
272extern "C" {
273 #[cfg(feature = "NSString")]
275 pub static NSURLDocumentIdentifierKey: &'static NSURLResourceKey;
276}
277
278extern "C" {
279 #[cfg(feature = "NSString")]
281 pub static NSURLAddedToDirectoryDateKey: &'static NSURLResourceKey;
282}
283
284extern "C" {
285 #[cfg(feature = "NSString")]
287 pub static NSURLQuarantinePropertiesKey: &'static NSURLResourceKey;
288}
289
290extern "C" {
291 #[cfg(feature = "NSString")]
293 pub static NSURLFileResourceTypeKey: &'static NSURLResourceKey;
294}
295
296extern "C" {
297 #[cfg(feature = "NSString")]
299 pub static NSURLFileIdentifierKey: &'static NSURLResourceKey;
300}
301
302extern "C" {
303 #[cfg(feature = "NSString")]
305 pub static NSURLFileContentIdentifierKey: &'static NSURLResourceKey;
306}
307
308extern "C" {
309 #[cfg(feature = "NSString")]
311 pub static NSURLMayShareFileContentKey: &'static NSURLResourceKey;
312}
313
314extern "C" {
315 #[cfg(feature = "NSString")]
317 pub static NSURLMayHaveExtendedAttributesKey: &'static NSURLResourceKey;
318}
319
320extern "C" {
321 #[cfg(feature = "NSString")]
323 pub static NSURLIsPurgeableKey: &'static NSURLResourceKey;
324}
325
326extern "C" {
327 #[cfg(feature = "NSString")]
329 pub static NSURLIsSparseKey: &'static NSURLResourceKey;
330}
331
332#[cfg(feature = "NSString")]
335pub type NSURLFileResourceType = NSString;
336
337extern "C" {
338 #[cfg(feature = "NSString")]
340 pub static NSURLFileResourceTypeNamedPipe: &'static NSURLFileResourceType;
341}
342
343extern "C" {
344 #[cfg(feature = "NSString")]
346 pub static NSURLFileResourceTypeCharacterSpecial: &'static NSURLFileResourceType;
347}
348
349extern "C" {
350 #[cfg(feature = "NSString")]
352 pub static NSURLFileResourceTypeDirectory: &'static NSURLFileResourceType;
353}
354
355extern "C" {
356 #[cfg(feature = "NSString")]
358 pub static NSURLFileResourceTypeBlockSpecial: &'static NSURLFileResourceType;
359}
360
361extern "C" {
362 #[cfg(feature = "NSString")]
364 pub static NSURLFileResourceTypeRegular: &'static NSURLFileResourceType;
365}
366
367extern "C" {
368 #[cfg(feature = "NSString")]
370 pub static NSURLFileResourceTypeSymbolicLink: &'static NSURLFileResourceType;
371}
372
373extern "C" {
374 #[cfg(feature = "NSString")]
376 pub static NSURLFileResourceTypeSocket: &'static NSURLFileResourceType;
377}
378
379extern "C" {
380 #[cfg(feature = "NSString")]
382 pub static NSURLFileResourceTypeUnknown: &'static NSURLFileResourceType;
383}
384
385extern "C" {
386 #[cfg(feature = "NSString")]
388 pub static NSURLThumbnailDictionaryKey: &'static NSURLResourceKey;
389}
390
391extern "C" {
392 #[cfg(feature = "NSString")]
394 pub static NSURLThumbnailKey: &'static NSURLResourceKey;
395}
396
397#[cfg(feature = "NSString")]
400pub type NSURLThumbnailDictionaryItem = NSString;
401
402extern "C" {
403 #[cfg(feature = "NSString")]
405 pub static NSThumbnail1024x1024SizeKey: &'static NSURLThumbnailDictionaryItem;
406}
407
408extern "C" {
409 #[cfg(feature = "NSString")]
411 pub static NSURLFileSizeKey: &'static NSURLResourceKey;
412}
413
414extern "C" {
415 #[cfg(feature = "NSString")]
417 pub static NSURLFileAllocatedSizeKey: &'static NSURLResourceKey;
418}
419
420extern "C" {
421 #[cfg(feature = "NSString")]
423 pub static NSURLTotalFileSizeKey: &'static NSURLResourceKey;
424}
425
426extern "C" {
427 #[cfg(feature = "NSString")]
429 pub static NSURLTotalFileAllocatedSizeKey: &'static NSURLResourceKey;
430}
431
432extern "C" {
433 #[cfg(feature = "NSString")]
435 pub static NSURLIsAliasFileKey: &'static NSURLResourceKey;
436}
437
438extern "C" {
439 #[cfg(feature = "NSString")]
441 pub static NSURLFileProtectionKey: &'static NSURLResourceKey;
442}
443
444#[cfg(feature = "NSString")]
447pub type NSURLFileProtectionType = NSString;
448
449extern "C" {
450 #[cfg(feature = "NSString")]
452 pub static NSURLFileProtectionNone: &'static NSURLFileProtectionType;
453}
454
455extern "C" {
456 #[cfg(feature = "NSString")]
458 pub static NSURLFileProtectionComplete: &'static NSURLFileProtectionType;
459}
460
461extern "C" {
462 #[cfg(feature = "NSString")]
464 pub static NSURLFileProtectionCompleteUnlessOpen: &'static NSURLFileProtectionType;
465}
466
467extern "C" {
468 #[cfg(feature = "NSString")]
470 pub static NSURLFileProtectionCompleteUntilFirstUserAuthentication:
471 &'static NSURLFileProtectionType;
472}
473
474extern "C" {
475 #[cfg(feature = "NSString")]
477 pub static NSURLFileProtectionCompleteWhenUserInactive: &'static NSURLFileProtectionType;
478}
479
480extern "C" {
481 #[cfg(feature = "NSString")]
483 pub static NSURLDirectoryEntryCountKey: &'static NSURLResourceKey;
484}
485
486extern "C" {
487 #[cfg(feature = "NSString")]
489 pub static NSURLVolumeLocalizedFormatDescriptionKey: &'static NSURLResourceKey;
490}
491
492extern "C" {
493 #[cfg(feature = "NSString")]
495 pub static NSURLVolumeTotalCapacityKey: &'static NSURLResourceKey;
496}
497
498extern "C" {
499 #[cfg(feature = "NSString")]
501 pub static NSURLVolumeAvailableCapacityKey: &'static NSURLResourceKey;
502}
503
504extern "C" {
505 #[cfg(feature = "NSString")]
507 pub static NSURLVolumeResourceCountKey: &'static NSURLResourceKey;
508}
509
510extern "C" {
511 #[cfg(feature = "NSString")]
513 pub static NSURLVolumeSupportsPersistentIDsKey: &'static NSURLResourceKey;
514}
515
516extern "C" {
517 #[cfg(feature = "NSString")]
519 pub static NSURLVolumeSupportsSymbolicLinksKey: &'static NSURLResourceKey;
520}
521
522extern "C" {
523 #[cfg(feature = "NSString")]
525 pub static NSURLVolumeSupportsHardLinksKey: &'static NSURLResourceKey;
526}
527
528extern "C" {
529 #[cfg(feature = "NSString")]
531 pub static NSURLVolumeSupportsJournalingKey: &'static NSURLResourceKey;
532}
533
534extern "C" {
535 #[cfg(feature = "NSString")]
537 pub static NSURLVolumeIsJournalingKey: &'static NSURLResourceKey;
538}
539
540extern "C" {
541 #[cfg(feature = "NSString")]
543 pub static NSURLVolumeSupportsSparseFilesKey: &'static NSURLResourceKey;
544}
545
546extern "C" {
547 #[cfg(feature = "NSString")]
549 pub static NSURLVolumeSupportsZeroRunsKey: &'static NSURLResourceKey;
550}
551
552extern "C" {
553 #[cfg(feature = "NSString")]
555 pub static NSURLVolumeSupportsCaseSensitiveNamesKey: &'static NSURLResourceKey;
556}
557
558extern "C" {
559 #[cfg(feature = "NSString")]
561 pub static NSURLVolumeSupportsCasePreservedNamesKey: &'static NSURLResourceKey;
562}
563
564extern "C" {
565 #[cfg(feature = "NSString")]
567 pub static NSURLVolumeSupportsRootDirectoryDatesKey: &'static NSURLResourceKey;
568}
569
570extern "C" {
571 #[cfg(feature = "NSString")]
573 pub static NSURLVolumeSupportsVolumeSizesKey: &'static NSURLResourceKey;
574}
575
576extern "C" {
577 #[cfg(feature = "NSString")]
579 pub static NSURLVolumeSupportsRenamingKey: &'static NSURLResourceKey;
580}
581
582extern "C" {
583 #[cfg(feature = "NSString")]
585 pub static NSURLVolumeSupportsAdvisoryFileLockingKey: &'static NSURLResourceKey;
586}
587
588extern "C" {
589 #[cfg(feature = "NSString")]
591 pub static NSURLVolumeSupportsExtendedSecurityKey: &'static NSURLResourceKey;
592}
593
594extern "C" {
595 #[cfg(feature = "NSString")]
597 pub static NSURLVolumeIsBrowsableKey: &'static NSURLResourceKey;
598}
599
600extern "C" {
601 #[cfg(feature = "NSString")]
603 pub static NSURLVolumeMaximumFileSizeKey: &'static NSURLResourceKey;
604}
605
606extern "C" {
607 #[cfg(feature = "NSString")]
609 pub static NSURLVolumeIsEjectableKey: &'static NSURLResourceKey;
610}
611
612extern "C" {
613 #[cfg(feature = "NSString")]
615 pub static NSURLVolumeIsRemovableKey: &'static NSURLResourceKey;
616}
617
618extern "C" {
619 #[cfg(feature = "NSString")]
621 pub static NSURLVolumeIsInternalKey: &'static NSURLResourceKey;
622}
623
624extern "C" {
625 #[cfg(feature = "NSString")]
627 pub static NSURLVolumeIsAutomountedKey: &'static NSURLResourceKey;
628}
629
630extern "C" {
631 #[cfg(feature = "NSString")]
633 pub static NSURLVolumeIsLocalKey: &'static NSURLResourceKey;
634}
635
636extern "C" {
637 #[cfg(feature = "NSString")]
639 pub static NSURLVolumeIsReadOnlyKey: &'static NSURLResourceKey;
640}
641
642extern "C" {
643 #[cfg(feature = "NSString")]
645 pub static NSURLVolumeCreationDateKey: &'static NSURLResourceKey;
646}
647
648extern "C" {
649 #[cfg(feature = "NSString")]
651 pub static NSURLVolumeURLForRemountingKey: &'static NSURLResourceKey;
652}
653
654extern "C" {
655 #[cfg(feature = "NSString")]
657 pub static NSURLVolumeUUIDStringKey: &'static NSURLResourceKey;
658}
659
660extern "C" {
661 #[cfg(feature = "NSString")]
663 pub static NSURLVolumeNameKey: &'static NSURLResourceKey;
664}
665
666extern "C" {
667 #[cfg(feature = "NSString")]
669 pub static NSURLVolumeLocalizedNameKey: &'static NSURLResourceKey;
670}
671
672extern "C" {
673 #[cfg(feature = "NSString")]
675 pub static NSURLVolumeIsEncryptedKey: &'static NSURLResourceKey;
676}
677
678extern "C" {
679 #[cfg(feature = "NSString")]
681 pub static NSURLVolumeIsRootFileSystemKey: &'static NSURLResourceKey;
682}
683
684extern "C" {
685 #[cfg(feature = "NSString")]
687 pub static NSURLVolumeSupportsCompressionKey: &'static NSURLResourceKey;
688}
689
690extern "C" {
691 #[cfg(feature = "NSString")]
693 pub static NSURLVolumeSupportsFileCloningKey: &'static NSURLResourceKey;
694}
695
696extern "C" {
697 #[cfg(feature = "NSString")]
699 pub static NSURLVolumeSupportsSwapRenamingKey: &'static NSURLResourceKey;
700}
701
702extern "C" {
703 #[cfg(feature = "NSString")]
705 pub static NSURLVolumeSupportsExclusiveRenamingKey: &'static NSURLResourceKey;
706}
707
708extern "C" {
709 #[cfg(feature = "NSString")]
711 pub static NSURLVolumeSupportsImmutableFilesKey: &'static NSURLResourceKey;
712}
713
714extern "C" {
715 #[cfg(feature = "NSString")]
717 pub static NSURLVolumeSupportsAccessPermissionsKey: &'static NSURLResourceKey;
718}
719
720extern "C" {
721 #[cfg(feature = "NSString")]
723 pub static NSURLVolumeSupportsFileProtectionKey: &'static NSURLResourceKey;
724}
725
726extern "C" {
727 #[cfg(feature = "NSString")]
729 pub static NSURLVolumeAvailableCapacityForImportantUsageKey: &'static NSURLResourceKey;
730}
731
732extern "C" {
733 #[cfg(feature = "NSString")]
735 pub static NSURLVolumeAvailableCapacityForOpportunisticUsageKey: &'static NSURLResourceKey;
736}
737
738extern "C" {
739 #[cfg(feature = "NSString")]
741 pub static NSURLVolumeTypeNameKey: &'static NSURLResourceKey;
742}
743
744extern "C" {
745 #[cfg(feature = "NSString")]
747 pub static NSURLVolumeSubtypeKey: &'static NSURLResourceKey;
748}
749
750extern "C" {
751 #[cfg(feature = "NSString")]
753 pub static NSURLVolumeMountFromLocationKey: &'static NSURLResourceKey;
754}
755
756extern "C" {
757 #[cfg(feature = "NSString")]
759 pub static NSURLIsUbiquitousItemKey: &'static NSURLResourceKey;
760}
761
762extern "C" {
763 #[cfg(feature = "NSString")]
765 pub static NSURLUbiquitousItemHasUnresolvedConflictsKey: &'static NSURLResourceKey;
766}
767
768extern "C" {
769 #[cfg(feature = "NSString")]
771 pub static NSURLUbiquitousItemIsDownloadedKey: &'static NSURLResourceKey;
772}
773
774extern "C" {
775 #[cfg(feature = "NSString")]
777 pub static NSURLUbiquitousItemIsDownloadingKey: &'static NSURLResourceKey;
778}
779
780extern "C" {
781 #[cfg(feature = "NSString")]
783 pub static NSURLUbiquitousItemIsUploadedKey: &'static NSURLResourceKey;
784}
785
786extern "C" {
787 #[cfg(feature = "NSString")]
789 pub static NSURLUbiquitousItemIsUploadingKey: &'static NSURLResourceKey;
790}
791
792extern "C" {
793 #[cfg(feature = "NSString")]
795 pub static NSURLUbiquitousItemPercentDownloadedKey: &'static NSURLResourceKey;
796}
797
798extern "C" {
799 #[cfg(feature = "NSString")]
801 pub static NSURLUbiquitousItemPercentUploadedKey: &'static NSURLResourceKey;
802}
803
804extern "C" {
805 #[cfg(feature = "NSString")]
807 pub static NSURLUbiquitousItemDownloadingStatusKey: &'static NSURLResourceKey;
808}
809
810extern "C" {
811 #[cfg(feature = "NSString")]
813 pub static NSURLUbiquitousItemDownloadingErrorKey: &'static NSURLResourceKey;
814}
815
816extern "C" {
817 #[cfg(feature = "NSString")]
819 pub static NSURLUbiquitousItemUploadingErrorKey: &'static NSURLResourceKey;
820}
821
822extern "C" {
823 #[cfg(feature = "NSString")]
825 pub static NSURLUbiquitousItemDownloadRequestedKey: &'static NSURLResourceKey;
826}
827
828extern "C" {
829 #[cfg(feature = "NSString")]
831 pub static NSURLUbiquitousItemContainerDisplayNameKey: &'static NSURLResourceKey;
832}
833
834extern "C" {
835 #[cfg(feature = "NSString")]
837 pub static NSURLUbiquitousItemIsExcludedFromSyncKey: &'static NSURLResourceKey;
838}
839
840extern "C" {
841 #[cfg(feature = "NSString")]
843 pub static NSURLUbiquitousItemIsSharedKey: &'static NSURLResourceKey;
844}
845
846extern "C" {
847 #[cfg(feature = "NSString")]
849 pub static NSURLUbiquitousSharedItemCurrentUserRoleKey: &'static NSURLResourceKey;
850}
851
852extern "C" {
853 #[cfg(feature = "NSString")]
855 pub static NSURLUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSURLResourceKey;
856}
857
858extern "C" {
859 #[cfg(feature = "NSString")]
861 pub static NSURLUbiquitousSharedItemOwnerNameComponentsKey: &'static NSURLResourceKey;
862}
863
864extern "C" {
865 #[cfg(feature = "NSString")]
867 pub static NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey:
868 &'static NSURLResourceKey;
869}
870
871#[cfg(feature = "NSString")]
874pub type NSURLUbiquitousItemDownloadingStatus = NSString;
875
876extern "C" {
877 #[cfg(feature = "NSString")]
879 pub static NSURLUbiquitousItemDownloadingStatusNotDownloaded:
880 &'static NSURLUbiquitousItemDownloadingStatus;
881}
882
883extern "C" {
884 #[cfg(feature = "NSString")]
886 pub static NSURLUbiquitousItemDownloadingStatusDownloaded:
887 &'static NSURLUbiquitousItemDownloadingStatus;
888}
889
890extern "C" {
891 #[cfg(feature = "NSString")]
893 pub static NSURLUbiquitousItemDownloadingStatusCurrent:
894 &'static NSURLUbiquitousItemDownloadingStatus;
895}
896
897#[cfg(feature = "NSString")]
900pub type NSURLUbiquitousSharedItemRole = NSString;
901
902extern "C" {
903 #[cfg(feature = "NSString")]
905 pub static NSURLUbiquitousSharedItemRoleOwner: &'static NSURLUbiquitousSharedItemRole;
906}
907
908extern "C" {
909 #[cfg(feature = "NSString")]
911 pub static NSURLUbiquitousSharedItemRoleParticipant: &'static NSURLUbiquitousSharedItemRole;
912}
913
914#[cfg(feature = "NSString")]
917pub type NSURLUbiquitousSharedItemPermissions = NSString;
918
919extern "C" {
920 #[cfg(feature = "NSString")]
922 pub static NSURLUbiquitousSharedItemPermissionsReadOnly:
923 &'static NSURLUbiquitousSharedItemPermissions;
924}
925
926extern "C" {
927 #[cfg(feature = "NSString")]
929 pub static NSURLUbiquitousSharedItemPermissionsReadWrite:
930 &'static NSURLUbiquitousSharedItemPermissions;
931}
932
933#[repr(transparent)]
936#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
937pub struct NSURLBookmarkCreationOptions(pub NSUInteger);
938bitflags::bitflags! {
939 impl NSURLBookmarkCreationOptions: NSUInteger {
940#[deprecated = "Not supported"]
941 #[doc(alias = "NSURLBookmarkCreationPreferFileIDResolution")]
942 const PreferFileIDResolution = 1<<8;
943 #[doc(alias = "NSURLBookmarkCreationMinimalBookmark")]
944 const MinimalBookmark = 1<<9;
945 #[doc(alias = "NSURLBookmarkCreationSuitableForBookmarkFile")]
946 const SuitableForBookmarkFile = 1<<10;
947 #[doc(alias = "NSURLBookmarkCreationWithSecurityScope")]
948 const WithSecurityScope = 1<<11;
949 #[doc(alias = "NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess")]
950 const SecurityScopeAllowOnlyReadAccess = 1<<12;
951 #[doc(alias = "NSURLBookmarkCreationWithoutImplicitSecurityScope")]
952 const WithoutImplicitSecurityScope = 1<<29;
953 }
954}
955
956unsafe impl Encode for NSURLBookmarkCreationOptions {
957 const ENCODING: Encoding = NSUInteger::ENCODING;
958}
959
960unsafe impl RefEncode for NSURLBookmarkCreationOptions {
961 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
962}
963
964#[repr(transparent)]
967#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
968pub struct NSURLBookmarkResolutionOptions(pub NSUInteger);
969bitflags::bitflags! {
970 impl NSURLBookmarkResolutionOptions: NSUInteger {
971 #[doc(alias = "NSURLBookmarkResolutionWithoutUI")]
972 const WithoutUI = 1<<8;
973 #[doc(alias = "NSURLBookmarkResolutionWithoutMounting")]
974 const WithoutMounting = 1<<9;
975 #[doc(alias = "NSURLBookmarkResolutionWithSecurityScope")]
976 const WithSecurityScope = 1<<10;
977 #[doc(alias = "NSURLBookmarkResolutionWithoutImplicitStartAccessing")]
978 const WithoutImplicitStartAccessing = 1<<15;
979 }
980}
981
982unsafe impl Encode for NSURLBookmarkResolutionOptions {
983 const ENCODING: Encoding = NSUInteger::ENCODING;
984}
985
986unsafe impl RefEncode for NSURLBookmarkResolutionOptions {
987 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
988}
989
990pub type NSURLBookmarkFileCreationOptions = NSUInteger;
992
993extern_class!(
994 #[unsafe(super(NSObject))]
996 #[derive(Debug, PartialEq, Eq, Hash)]
997 pub struct NSURL;
998);
999
1000unsafe impl Send for NSURL {}
1001
1002unsafe impl Sync for NSURL {}
1003
1004#[cfg(feature = "NSObject")]
1005unsafe impl NSCoding for NSURL {}
1006
1007#[cfg(feature = "NSObject")]
1008unsafe impl NSCopying for NSURL {}
1009
1010#[cfg(feature = "NSObject")]
1011unsafe impl CopyingHelper for NSURL {
1012 type Result = Self;
1013}
1014
1015unsafe impl NSObjectProtocol for NSURL {}
1016
1017#[cfg(feature = "NSObject")]
1018unsafe impl NSSecureCoding for NSURL {}
1019
1020impl NSURL {
1021 extern_methods!(
1022 #[cfg(feature = "NSString")]
1023 #[deprecated = "Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings."]
1024 #[unsafe(method(initWithScheme:host:path:))]
1025 #[unsafe(method_family = init)]
1026 pub unsafe fn initWithScheme_host_path(
1027 this: Allocated<Self>,
1028 scheme: &NSString,
1029 host: Option<&NSString>,
1030 path: &NSString,
1031 ) -> Option<Retained<Self>>;
1032
1033 #[cfg(feature = "NSString")]
1034 #[unsafe(method(initFileURLWithPath:isDirectory:relativeToURL:))]
1035 #[unsafe(method_family = init)]
1036 pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL(
1037 this: Allocated<Self>,
1038 path: &NSString,
1039 is_dir: bool,
1040 base_url: Option<&NSURL>,
1041 ) -> Retained<Self>;
1042
1043 #[cfg(feature = "NSString")]
1044 #[unsafe(method(initFileURLWithPath:relativeToURL:))]
1045 #[unsafe(method_family = init)]
1046 pub unsafe fn initFileURLWithPath_relativeToURL(
1047 this: Allocated<Self>,
1048 path: &NSString,
1049 base_url: Option<&NSURL>,
1050 ) -> Retained<Self>;
1051
1052 #[cfg(feature = "NSString")]
1053 #[unsafe(method(initFileURLWithPath:isDirectory:))]
1054 #[unsafe(method_family = init)]
1055 pub unsafe fn initFileURLWithPath_isDirectory(
1056 this: Allocated<Self>,
1057 path: &NSString,
1058 is_dir: bool,
1059 ) -> Retained<Self>;
1060
1061 #[cfg(feature = "NSString")]
1062 #[unsafe(method(initFileURLWithPath:))]
1063 #[unsafe(method_family = init)]
1064 pub unsafe fn initFileURLWithPath(this: Allocated<Self>, path: &NSString)
1065 -> Retained<Self>;
1066
1067 #[cfg(feature = "NSString")]
1068 #[unsafe(method(fileURLWithPath:isDirectory:relativeToURL:))]
1069 #[unsafe(method_family = none)]
1070 pub unsafe fn fileURLWithPath_isDirectory_relativeToURL(
1071 path: &NSString,
1072 is_dir: bool,
1073 base_url: Option<&NSURL>,
1074 ) -> Retained<NSURL>;
1075
1076 #[cfg(feature = "NSString")]
1077 #[unsafe(method(fileURLWithPath:relativeToURL:))]
1078 #[unsafe(method_family = none)]
1079 pub unsafe fn fileURLWithPath_relativeToURL(
1080 path: &NSString,
1081 base_url: Option<&NSURL>,
1082 ) -> Retained<NSURL>;
1083
1084 #[cfg(feature = "NSString")]
1085 #[unsafe(method(fileURLWithPath:isDirectory:))]
1086 #[unsafe(method_family = none)]
1087 pub unsafe fn fileURLWithPath_isDirectory(path: &NSString, is_dir: bool)
1088 -> Retained<NSURL>;
1089
1090 #[cfg(feature = "NSString")]
1091 #[unsafe(method(fileURLWithPath:))]
1092 #[unsafe(method_family = none)]
1093 pub unsafe fn fileURLWithPath(path: &NSString) -> Retained<NSURL>;
1094
1095 #[unsafe(method(initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:))]
1096 #[unsafe(method_family = init)]
1097 pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL(
1098 this: Allocated<Self>,
1099 path: NonNull<c_char>,
1100 is_dir: bool,
1101 base_url: Option<&NSURL>,
1102 ) -> Retained<Self>;
1103
1104 #[unsafe(method(fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:))]
1105 #[unsafe(method_family = none)]
1106 pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL(
1107 path: NonNull<c_char>,
1108 is_dir: bool,
1109 base_url: Option<&NSURL>,
1110 ) -> Retained<NSURL>;
1111
1112 #[cfg(feature = "NSString")]
1113 #[unsafe(method(initWithString:))]
1114 #[unsafe(method_family = init)]
1115 pub unsafe fn initWithString(
1116 this: Allocated<Self>,
1117 url_string: &NSString,
1118 ) -> Option<Retained<Self>>;
1119
1120 #[cfg(feature = "NSString")]
1121 #[unsafe(method(initWithString:relativeToURL:))]
1122 #[unsafe(method_family = init)]
1123 pub unsafe fn initWithString_relativeToURL(
1124 this: Allocated<Self>,
1125 url_string: &NSString,
1126 base_url: Option<&NSURL>,
1127 ) -> Option<Retained<Self>>;
1128
1129 #[cfg(feature = "NSString")]
1130 #[unsafe(method(URLWithString:))]
1131 #[unsafe(method_family = none)]
1132 pub unsafe fn URLWithString(url_string: &NSString) -> Option<Retained<Self>>;
1133
1134 #[cfg(feature = "NSString")]
1135 #[unsafe(method(URLWithString:relativeToURL:))]
1136 #[unsafe(method_family = none)]
1137 pub unsafe fn URLWithString_relativeToURL(
1138 url_string: &NSString,
1139 base_url: Option<&NSURL>,
1140 ) -> Option<Retained<Self>>;
1141
1142 #[cfg(feature = "NSString")]
1143 #[unsafe(method(initWithString:encodingInvalidCharacters:))]
1152 #[unsafe(method_family = init)]
1153 pub unsafe fn initWithString_encodingInvalidCharacters(
1154 this: Allocated<Self>,
1155 url_string: &NSString,
1156 encoding_invalid_characters: bool,
1157 ) -> Option<Retained<Self>>;
1158
1159 #[cfg(feature = "NSString")]
1160 #[unsafe(method(URLWithString:encodingInvalidCharacters:))]
1169 #[unsafe(method_family = none)]
1170 pub unsafe fn URLWithString_encodingInvalidCharacters(
1171 url_string: &NSString,
1172 encoding_invalid_characters: bool,
1173 ) -> Option<Retained<Self>>;
1174
1175 #[cfg(feature = "NSData")]
1176 #[unsafe(method(initWithDataRepresentation:relativeToURL:))]
1177 #[unsafe(method_family = init)]
1178 pub unsafe fn initWithDataRepresentation_relativeToURL(
1179 this: Allocated<Self>,
1180 data: &NSData,
1181 base_url: Option<&NSURL>,
1182 ) -> Retained<Self>;
1183
1184 #[cfg(feature = "NSData")]
1185 #[unsafe(method(URLWithDataRepresentation:relativeToURL:))]
1186 #[unsafe(method_family = none)]
1187 pub unsafe fn URLWithDataRepresentation_relativeToURL(
1188 data: &NSData,
1189 base_url: Option<&NSURL>,
1190 ) -> Retained<NSURL>;
1191
1192 #[cfg(feature = "NSData")]
1193 #[unsafe(method(initAbsoluteURLWithDataRepresentation:relativeToURL:))]
1194 #[unsafe(method_family = init)]
1195 pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL(
1196 this: Allocated<Self>,
1197 data: &NSData,
1198 base_url: Option<&NSURL>,
1199 ) -> Retained<Self>;
1200
1201 #[cfg(feature = "NSData")]
1202 #[unsafe(method(absoluteURLWithDataRepresentation:relativeToURL:))]
1203 #[unsafe(method_family = none)]
1204 pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL(
1205 data: &NSData,
1206 base_url: Option<&NSURL>,
1207 ) -> Retained<NSURL>;
1208
1209 #[cfg(feature = "NSData")]
1210 #[unsafe(method(dataRepresentation))]
1211 #[unsafe(method_family = none)]
1212 pub unsafe fn dataRepresentation(&self) -> Retained<NSData>;
1213
1214 #[cfg(feature = "NSString")]
1215 #[unsafe(method(absoluteString))]
1216 #[unsafe(method_family = none)]
1217 pub unsafe fn absoluteString(&self) -> Option<Retained<NSString>>;
1218
1219 #[cfg(feature = "NSString")]
1220 #[unsafe(method(relativeString))]
1221 #[unsafe(method_family = none)]
1222 pub unsafe fn relativeString(&self) -> Retained<NSString>;
1223
1224 #[unsafe(method(baseURL))]
1225 #[unsafe(method_family = none)]
1226 pub unsafe fn baseURL(&self) -> Option<Retained<NSURL>>;
1227
1228 #[unsafe(method(absoluteURL))]
1229 #[unsafe(method_family = none)]
1230 pub unsafe fn absoluteURL(&self) -> Option<Retained<NSURL>>;
1231
1232 #[cfg(feature = "NSString")]
1233 #[unsafe(method(scheme))]
1234 #[unsafe(method_family = none)]
1235 pub unsafe fn scheme(&self) -> Option<Retained<NSString>>;
1236
1237 #[cfg(feature = "NSString")]
1238 #[unsafe(method(resourceSpecifier))]
1239 #[unsafe(method_family = none)]
1240 pub unsafe fn resourceSpecifier(&self) -> Option<Retained<NSString>>;
1241
1242 #[cfg(feature = "NSString")]
1243 #[unsafe(method(host))]
1244 #[unsafe(method_family = none)]
1245 pub unsafe fn host(&self) -> Option<Retained<NSString>>;
1246
1247 #[cfg(feature = "NSValue")]
1248 #[unsafe(method(port))]
1249 #[unsafe(method_family = none)]
1250 pub unsafe fn port(&self) -> Option<Retained<NSNumber>>;
1251
1252 #[cfg(feature = "NSString")]
1253 #[unsafe(method(user))]
1254 #[unsafe(method_family = none)]
1255 pub unsafe fn user(&self) -> Option<Retained<NSString>>;
1256
1257 #[cfg(feature = "NSString")]
1258 #[unsafe(method(password))]
1259 #[unsafe(method_family = none)]
1260 pub unsafe fn password(&self) -> Option<Retained<NSString>>;
1261
1262 #[cfg(feature = "NSString")]
1263 #[unsafe(method(path))]
1264 #[unsafe(method_family = none)]
1265 pub unsafe fn path(&self) -> Option<Retained<NSString>>;
1266
1267 #[cfg(feature = "NSString")]
1268 #[unsafe(method(fragment))]
1269 #[unsafe(method_family = none)]
1270 pub unsafe fn fragment(&self) -> Option<Retained<NSString>>;
1271
1272 #[cfg(feature = "NSString")]
1273 #[deprecated = "The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them."]
1274 #[unsafe(method(parameterString))]
1275 #[unsafe(method_family = none)]
1276 pub unsafe fn parameterString(&self) -> Option<Retained<NSString>>;
1277
1278 #[cfg(feature = "NSString")]
1279 #[unsafe(method(query))]
1280 #[unsafe(method_family = none)]
1281 pub unsafe fn query(&self) -> Option<Retained<NSString>>;
1282
1283 #[cfg(feature = "NSString")]
1284 #[unsafe(method(relativePath))]
1285 #[unsafe(method_family = none)]
1286 pub unsafe fn relativePath(&self) -> Option<Retained<NSString>>;
1287
1288 #[unsafe(method(hasDirectoryPath))]
1289 #[unsafe(method_family = none)]
1290 pub unsafe fn hasDirectoryPath(&self) -> bool;
1291
1292 #[unsafe(method(getFileSystemRepresentation:maxLength:))]
1293 #[unsafe(method_family = none)]
1294 pub unsafe fn getFileSystemRepresentation_maxLength(
1295 &self,
1296 buffer: NonNull<c_char>,
1297 max_buffer_length: NSUInteger,
1298 ) -> bool;
1299
1300 #[unsafe(method(fileSystemRepresentation))]
1301 #[unsafe(method_family = none)]
1302 pub unsafe fn fileSystemRepresentation(&self) -> NonNull<c_char>;
1303
1304 #[unsafe(method(isFileURL))]
1305 #[unsafe(method_family = none)]
1306 pub unsafe fn isFileURL(&self) -> bool;
1307
1308 #[unsafe(method(standardizedURL))]
1309 #[unsafe(method_family = none)]
1310 pub unsafe fn standardizedURL(&self) -> Option<Retained<NSURL>>;
1311
1312 #[unsafe(method(isFileReferenceURL))]
1313 #[unsafe(method_family = none)]
1314 pub unsafe fn isFileReferenceURL(&self) -> bool;
1315
1316 #[unsafe(method(fileReferenceURL))]
1317 #[unsafe(method_family = none)]
1318 pub unsafe fn fileReferenceURL(&self) -> Option<Retained<NSURL>>;
1319
1320 #[unsafe(method(filePathURL))]
1321 #[unsafe(method_family = none)]
1322 pub unsafe fn filePathURL(&self) -> Option<Retained<NSURL>>;
1323
1324 #[cfg(all(feature = "NSError", feature = "NSString"))]
1325 #[unsafe(method(getResourceValue:forKey:error:_))]
1326 #[unsafe(method_family = none)]
1327 pub unsafe fn getResourceValue_forKey_error(
1328 &self,
1329 value: &mut Option<Retained<AnyObject>>,
1330 key: &NSURLResourceKey,
1331 ) -> Result<(), Retained<NSError>>;
1332
1333 #[cfg(all(
1334 feature = "NSArray",
1335 feature = "NSDictionary",
1336 feature = "NSError",
1337 feature = "NSString"
1338 ))]
1339 #[unsafe(method(resourceValuesForKeys:error:_))]
1340 #[unsafe(method_family = none)]
1341 pub unsafe fn resourceValuesForKeys_error(
1342 &self,
1343 keys: &NSArray<NSURLResourceKey>,
1344 ) -> Result<Retained<NSDictionary<NSURLResourceKey, AnyObject>>, Retained<NSError>>;
1345
1346 #[cfg(all(feature = "NSError", feature = "NSString"))]
1347 #[unsafe(method(setResourceValue:forKey:error:_))]
1348 #[unsafe(method_family = none)]
1349 pub unsafe fn setResourceValue_forKey_error(
1350 &self,
1351 value: Option<&AnyObject>,
1352 key: &NSURLResourceKey,
1353 ) -> Result<(), Retained<NSError>>;
1354
1355 #[cfg(all(feature = "NSDictionary", feature = "NSError", feature = "NSString"))]
1356 #[unsafe(method(setResourceValues:error:_))]
1357 #[unsafe(method_family = none)]
1358 pub unsafe fn setResourceValues_error(
1359 &self,
1360 keyed_values: &NSDictionary<NSURLResourceKey, AnyObject>,
1361 ) -> Result<(), Retained<NSError>>;
1362
1363 #[cfg(feature = "NSString")]
1364 #[unsafe(method(removeCachedResourceValueForKey:))]
1365 #[unsafe(method_family = none)]
1366 pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey);
1367
1368 #[unsafe(method(removeAllCachedResourceValues))]
1369 #[unsafe(method_family = none)]
1370 pub unsafe fn removeAllCachedResourceValues(&self);
1371
1372 #[cfg(feature = "NSString")]
1373 #[unsafe(method(setTemporaryResourceValue:forKey:))]
1374 #[unsafe(method_family = none)]
1375 pub unsafe fn setTemporaryResourceValue_forKey(
1376 &self,
1377 value: Option<&AnyObject>,
1378 key: &NSURLResourceKey,
1379 );
1380
1381 #[cfg(all(
1382 feature = "NSArray",
1383 feature = "NSData",
1384 feature = "NSError",
1385 feature = "NSString"
1386 ))]
1387 #[unsafe(method(bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:_))]
1388 #[unsafe(method_family = none)]
1389 pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error(
1390 &self,
1391 options: NSURLBookmarkCreationOptions,
1392 keys: Option<&NSArray<NSURLResourceKey>>,
1393 relative_url: Option<&NSURL>,
1394 ) -> Result<Retained<NSData>, Retained<NSError>>;
1395
1396 #[cfg(all(feature = "NSData", feature = "NSError"))]
1397 #[unsafe(method(initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:_))]
1398 #[unsafe(method_family = init)]
1399 pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error(
1400 this: Allocated<Self>,
1401 bookmark_data: &NSData,
1402 options: NSURLBookmarkResolutionOptions,
1403 relative_url: Option<&NSURL>,
1404 is_stale: *mut Bool,
1405 ) -> Result<Retained<Self>, Retained<NSError>>;
1406
1407 #[cfg(all(feature = "NSData", feature = "NSError"))]
1408 #[unsafe(method(URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:_))]
1409 #[unsafe(method_family = none)]
1410 pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error(
1411 bookmark_data: &NSData,
1412 options: NSURLBookmarkResolutionOptions,
1413 relative_url: Option<&NSURL>,
1414 is_stale: *mut Bool,
1415 ) -> Result<Retained<Self>, Retained<NSError>>;
1416
1417 #[cfg(all(
1418 feature = "NSArray",
1419 feature = "NSData",
1420 feature = "NSDictionary",
1421 feature = "NSString"
1422 ))]
1423 #[unsafe(method(resourceValuesForKeys:fromBookmarkData:))]
1424 #[unsafe(method_family = none)]
1425 pub unsafe fn resourceValuesForKeys_fromBookmarkData(
1426 keys: &NSArray<NSURLResourceKey>,
1427 bookmark_data: &NSData,
1428 ) -> Option<Retained<NSDictionary<NSURLResourceKey, AnyObject>>>;
1429
1430 #[cfg(all(feature = "NSData", feature = "NSError"))]
1431 #[unsafe(method(writeBookmarkData:toURL:options:error:_))]
1432 #[unsafe(method_family = none)]
1433 pub unsafe fn writeBookmarkData_toURL_options_error(
1434 bookmark_data: &NSData,
1435 bookmark_file_url: &NSURL,
1436 options: NSURLBookmarkFileCreationOptions,
1437 ) -> Result<(), Retained<NSError>>;
1438
1439 #[cfg(all(feature = "NSData", feature = "NSError"))]
1440 #[unsafe(method(bookmarkDataWithContentsOfURL:error:_))]
1441 #[unsafe(method_family = none)]
1442 pub unsafe fn bookmarkDataWithContentsOfURL_error(
1443 bookmark_file_url: &NSURL,
1444 ) -> Result<Retained<NSData>, Retained<NSError>>;
1445
1446 #[cfg(feature = "NSError")]
1447 #[unsafe(method(URLByResolvingAliasFileAtURL:options:error:_))]
1448 #[unsafe(method_family = none)]
1449 pub unsafe fn URLByResolvingAliasFileAtURL_options_error(
1450 url: &NSURL,
1451 options: NSURLBookmarkResolutionOptions,
1452 ) -> Result<Retained<Self>, Retained<NSError>>;
1453
1454 #[unsafe(method(startAccessingSecurityScopedResource))]
1455 #[unsafe(method_family = none)]
1456 pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool;
1457
1458 #[unsafe(method(stopAccessingSecurityScopedResource))]
1459 #[unsafe(method_family = none)]
1460 pub unsafe fn stopAccessingSecurityScopedResource(&self);
1461 );
1462}
1463
1464impl NSURL {
1466 extern_methods!(
1467 #[unsafe(method(init))]
1468 #[unsafe(method_family = init)]
1469 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1470
1471 #[unsafe(method(new))]
1472 #[unsafe(method_family = new)]
1473 pub unsafe fn new() -> Retained<Self>;
1474 );
1475}
1476
1477impl NSURL {
1479 extern_methods!(
1480 #[cfg(all(feature = "NSError", feature = "NSString"))]
1481 #[unsafe(method(getPromisedItemResourceValue:forKey:error:_))]
1482 #[unsafe(method_family = none)]
1483 pub unsafe fn getPromisedItemResourceValue_forKey_error(
1484 &self,
1485 value: &mut Option<Retained<AnyObject>>,
1486 key: &NSURLResourceKey,
1487 ) -> Result<(), Retained<NSError>>;
1488
1489 #[cfg(all(
1490 feature = "NSArray",
1491 feature = "NSDictionary",
1492 feature = "NSError",
1493 feature = "NSString"
1494 ))]
1495 #[unsafe(method(promisedItemResourceValuesForKeys:error:_))]
1496 #[unsafe(method_family = none)]
1497 pub unsafe fn promisedItemResourceValuesForKeys_error(
1498 &self,
1499 keys: &NSArray<NSURLResourceKey>,
1500 ) -> Result<Retained<NSDictionary<NSURLResourceKey, AnyObject>>, Retained<NSError>>;
1501
1502 #[cfg(feature = "NSError")]
1503 #[unsafe(method(checkPromisedItemIsReachableAndReturnError:_))]
1504 #[unsafe(method_family = none)]
1505 pub unsafe fn checkPromisedItemIsReachableAndReturnError(
1506 &self,
1507 ) -> Result<(), Retained<NSError>>;
1508 );
1509}
1510
1511impl NSURL {
1513 extern_methods!();
1514}
1515
1516#[cfg(feature = "NSItemProvider")]
1517unsafe impl NSItemProviderReading for NSURL {}
1518
1519#[cfg(feature = "NSItemProvider")]
1520unsafe impl NSItemProviderWriting for NSURL {}
1521
1522extern_class!(
1523 #[unsafe(super(NSObject))]
1525 #[derive(Debug, PartialEq, Eq, Hash)]
1526 pub struct NSURLQueryItem;
1527);
1528
1529unsafe impl Send for NSURLQueryItem {}
1530
1531unsafe impl Sync for NSURLQueryItem {}
1532
1533#[cfg(feature = "NSObject")]
1534unsafe impl NSCoding for NSURLQueryItem {}
1535
1536#[cfg(feature = "NSObject")]
1537unsafe impl NSCopying for NSURLQueryItem {}
1538
1539#[cfg(feature = "NSObject")]
1540unsafe impl CopyingHelper for NSURLQueryItem {
1541 type Result = Self;
1542}
1543
1544unsafe impl NSObjectProtocol for NSURLQueryItem {}
1545
1546#[cfg(feature = "NSObject")]
1547unsafe impl NSSecureCoding for NSURLQueryItem {}
1548
1549impl NSURLQueryItem {
1550 extern_methods!(
1551 #[cfg(feature = "NSString")]
1552 #[unsafe(method(initWithName:value:))]
1553 #[unsafe(method_family = init)]
1554 pub unsafe fn initWithName_value(
1555 this: Allocated<Self>,
1556 name: &NSString,
1557 value: Option<&NSString>,
1558 ) -> Retained<Self>;
1559
1560 #[cfg(feature = "NSString")]
1561 #[unsafe(method(queryItemWithName:value:))]
1562 #[unsafe(method_family = none)]
1563 pub unsafe fn queryItemWithName_value(
1564 name: &NSString,
1565 value: Option<&NSString>,
1566 ) -> Retained<Self>;
1567
1568 #[cfg(feature = "NSString")]
1569 #[unsafe(method(name))]
1570 #[unsafe(method_family = none)]
1571 pub unsafe fn name(&self) -> Retained<NSString>;
1572
1573 #[cfg(feature = "NSString")]
1574 #[unsafe(method(value))]
1575 #[unsafe(method_family = none)]
1576 pub unsafe fn value(&self) -> Option<Retained<NSString>>;
1577 );
1578}
1579
1580impl NSURLQueryItem {
1582 extern_methods!(
1583 #[unsafe(method(init))]
1584 #[unsafe(method_family = init)]
1585 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1586
1587 #[unsafe(method(new))]
1588 #[unsafe(method_family = new)]
1589 pub unsafe fn new() -> Retained<Self>;
1590 );
1591}
1592
1593extern_class!(
1594 #[unsafe(super(NSObject))]
1596 #[derive(Debug, PartialEq, Eq, Hash)]
1597 pub struct NSURLComponents;
1598);
1599
1600#[cfg(feature = "NSObject")]
1601unsafe impl NSCopying for NSURLComponents {}
1602
1603#[cfg(feature = "NSObject")]
1604unsafe impl CopyingHelper for NSURLComponents {
1605 type Result = Self;
1606}
1607
1608unsafe impl NSObjectProtocol for NSURLComponents {}
1609
1610impl NSURLComponents {
1611 extern_methods!(
1612 #[unsafe(method(init))]
1613 #[unsafe(method_family = init)]
1614 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1615
1616 #[unsafe(method(initWithURL:resolvingAgainstBaseURL:))]
1617 #[unsafe(method_family = init)]
1618 pub unsafe fn initWithURL_resolvingAgainstBaseURL(
1619 this: Allocated<Self>,
1620 url: &NSURL,
1621 resolve: bool,
1622 ) -> Option<Retained<Self>>;
1623
1624 #[unsafe(method(componentsWithURL:resolvingAgainstBaseURL:))]
1625 #[unsafe(method_family = none)]
1626 pub unsafe fn componentsWithURL_resolvingAgainstBaseURL(
1627 url: &NSURL,
1628 resolve: bool,
1629 ) -> Option<Retained<Self>>;
1630
1631 #[cfg(feature = "NSString")]
1632 #[unsafe(method(initWithString:))]
1633 #[unsafe(method_family = init)]
1634 pub unsafe fn initWithString(
1635 this: Allocated<Self>,
1636 url_string: &NSString,
1637 ) -> Option<Retained<Self>>;
1638
1639 #[cfg(feature = "NSString")]
1640 #[unsafe(method(componentsWithString:))]
1641 #[unsafe(method_family = none)]
1642 pub unsafe fn componentsWithString(url_string: &NSString) -> Option<Retained<Self>>;
1643
1644 #[cfg(feature = "NSString")]
1645 #[unsafe(method(initWithString:encodingInvalidCharacters:))]
1654 #[unsafe(method_family = init)]
1655 pub unsafe fn initWithString_encodingInvalidCharacters(
1656 this: Allocated<Self>,
1657 url_string: &NSString,
1658 encoding_invalid_characters: bool,
1659 ) -> Option<Retained<Self>>;
1660
1661 #[cfg(feature = "NSString")]
1662 #[unsafe(method(componentsWithString:encodingInvalidCharacters:))]
1671 #[unsafe(method_family = none)]
1672 pub unsafe fn componentsWithString_encodingInvalidCharacters(
1673 url_string: &NSString,
1674 encoding_invalid_characters: bool,
1675 ) -> Option<Retained<Self>>;
1676
1677 #[unsafe(method(URL))]
1678 #[unsafe(method_family = none)]
1679 pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
1680
1681 #[unsafe(method(URLRelativeToURL:))]
1682 #[unsafe(method_family = none)]
1683 pub unsafe fn URLRelativeToURL(&self, base_url: Option<&NSURL>) -> Option<Retained<NSURL>>;
1684
1685 #[cfg(feature = "NSString")]
1686 #[unsafe(method(string))]
1687 #[unsafe(method_family = none)]
1688 pub unsafe fn string(&self) -> Option<Retained<NSString>>;
1689
1690 #[cfg(feature = "NSString")]
1691 #[unsafe(method(scheme))]
1692 #[unsafe(method_family = none)]
1693 pub unsafe fn scheme(&self) -> Option<Retained<NSString>>;
1694
1695 #[cfg(feature = "NSString")]
1696 #[unsafe(method(setScheme:))]
1698 #[unsafe(method_family = none)]
1699 pub unsafe fn setScheme(&self, scheme: Option<&NSString>);
1700
1701 #[cfg(feature = "NSString")]
1702 #[unsafe(method(user))]
1703 #[unsafe(method_family = none)]
1704 pub unsafe fn user(&self) -> Option<Retained<NSString>>;
1705
1706 #[cfg(feature = "NSString")]
1707 #[unsafe(method(setUser:))]
1709 #[unsafe(method_family = none)]
1710 pub unsafe fn setUser(&self, user: Option<&NSString>);
1711
1712 #[cfg(feature = "NSString")]
1713 #[unsafe(method(password))]
1714 #[unsafe(method_family = none)]
1715 pub unsafe fn password(&self) -> Option<Retained<NSString>>;
1716
1717 #[cfg(feature = "NSString")]
1718 #[unsafe(method(setPassword:))]
1720 #[unsafe(method_family = none)]
1721 pub unsafe fn setPassword(&self, password: Option<&NSString>);
1722
1723 #[cfg(feature = "NSString")]
1724 #[unsafe(method(host))]
1725 #[unsafe(method_family = none)]
1726 pub unsafe fn host(&self) -> Option<Retained<NSString>>;
1727
1728 #[cfg(feature = "NSString")]
1729 #[unsafe(method(setHost:))]
1731 #[unsafe(method_family = none)]
1732 pub unsafe fn setHost(&self, host: Option<&NSString>);
1733
1734 #[cfg(feature = "NSValue")]
1735 #[unsafe(method(port))]
1736 #[unsafe(method_family = none)]
1737 pub unsafe fn port(&self) -> Option<Retained<NSNumber>>;
1738
1739 #[cfg(feature = "NSValue")]
1740 #[unsafe(method(setPort:))]
1742 #[unsafe(method_family = none)]
1743 pub unsafe fn setPort(&self, port: Option<&NSNumber>);
1744
1745 #[cfg(feature = "NSString")]
1746 #[unsafe(method(path))]
1747 #[unsafe(method_family = none)]
1748 pub unsafe fn path(&self) -> Option<Retained<NSString>>;
1749
1750 #[cfg(feature = "NSString")]
1751 #[unsafe(method(setPath:))]
1753 #[unsafe(method_family = none)]
1754 pub unsafe fn setPath(&self, path: Option<&NSString>);
1755
1756 #[cfg(feature = "NSString")]
1757 #[unsafe(method(query))]
1758 #[unsafe(method_family = none)]
1759 pub unsafe fn query(&self) -> Option<Retained<NSString>>;
1760
1761 #[cfg(feature = "NSString")]
1762 #[unsafe(method(setQuery:))]
1764 #[unsafe(method_family = none)]
1765 pub unsafe fn setQuery(&self, query: Option<&NSString>);
1766
1767 #[cfg(feature = "NSString")]
1768 #[unsafe(method(fragment))]
1769 #[unsafe(method_family = none)]
1770 pub unsafe fn fragment(&self) -> Option<Retained<NSString>>;
1771
1772 #[cfg(feature = "NSString")]
1773 #[unsafe(method(setFragment:))]
1775 #[unsafe(method_family = none)]
1776 pub unsafe fn setFragment(&self, fragment: Option<&NSString>);
1777
1778 #[cfg(feature = "NSString")]
1779 #[unsafe(method(percentEncodedUser))]
1780 #[unsafe(method_family = none)]
1781 pub unsafe fn percentEncodedUser(&self) -> Option<Retained<NSString>>;
1782
1783 #[cfg(feature = "NSString")]
1784 #[unsafe(method(setPercentEncodedUser:))]
1786 #[unsafe(method_family = none)]
1787 pub unsafe fn setPercentEncodedUser(&self, percent_encoded_user: Option<&NSString>);
1788
1789 #[cfg(feature = "NSString")]
1790 #[unsafe(method(percentEncodedPassword))]
1791 #[unsafe(method_family = none)]
1792 pub unsafe fn percentEncodedPassword(&self) -> Option<Retained<NSString>>;
1793
1794 #[cfg(feature = "NSString")]
1795 #[unsafe(method(setPercentEncodedPassword:))]
1797 #[unsafe(method_family = none)]
1798 pub unsafe fn setPercentEncodedPassword(&self, percent_encoded_password: Option<&NSString>);
1799
1800 #[cfg(feature = "NSString")]
1801 #[deprecated = "Use encodedHost instead"]
1802 #[unsafe(method(percentEncodedHost))]
1803 #[unsafe(method_family = none)]
1804 pub unsafe fn percentEncodedHost(&self) -> Option<Retained<NSString>>;
1805
1806 #[cfg(feature = "NSString")]
1807 #[deprecated = "Use encodedHost instead"]
1809 #[unsafe(method(setPercentEncodedHost:))]
1810 #[unsafe(method_family = none)]
1811 pub unsafe fn setPercentEncodedHost(&self, percent_encoded_host: Option<&NSString>);
1812
1813 #[cfg(feature = "NSString")]
1814 #[unsafe(method(percentEncodedPath))]
1815 #[unsafe(method_family = none)]
1816 pub unsafe fn percentEncodedPath(&self) -> Option<Retained<NSString>>;
1817
1818 #[cfg(feature = "NSString")]
1819 #[unsafe(method(setPercentEncodedPath:))]
1821 #[unsafe(method_family = none)]
1822 pub unsafe fn setPercentEncodedPath(&self, percent_encoded_path: Option<&NSString>);
1823
1824 #[cfg(feature = "NSString")]
1825 #[unsafe(method(percentEncodedQuery))]
1826 #[unsafe(method_family = none)]
1827 pub unsafe fn percentEncodedQuery(&self) -> Option<Retained<NSString>>;
1828
1829 #[cfg(feature = "NSString")]
1830 #[unsafe(method(setPercentEncodedQuery:))]
1832 #[unsafe(method_family = none)]
1833 pub unsafe fn setPercentEncodedQuery(&self, percent_encoded_query: Option<&NSString>);
1834
1835 #[cfg(feature = "NSString")]
1836 #[unsafe(method(percentEncodedFragment))]
1837 #[unsafe(method_family = none)]
1838 pub unsafe fn percentEncodedFragment(&self) -> Option<Retained<NSString>>;
1839
1840 #[cfg(feature = "NSString")]
1841 #[unsafe(method(setPercentEncodedFragment:))]
1843 #[unsafe(method_family = none)]
1844 pub unsafe fn setPercentEncodedFragment(&self, percent_encoded_fragment: Option<&NSString>);
1845
1846 #[cfg(feature = "NSString")]
1847 #[unsafe(method(encodedHost))]
1848 #[unsafe(method_family = none)]
1849 pub unsafe fn encodedHost(&self) -> Option<Retained<NSString>>;
1850
1851 #[cfg(feature = "NSString")]
1852 #[unsafe(method(setEncodedHost:))]
1854 #[unsafe(method_family = none)]
1855 pub unsafe fn setEncodedHost(&self, encoded_host: Option<&NSString>);
1856
1857 #[cfg(feature = "NSRange")]
1858 #[unsafe(method(rangeOfScheme))]
1859 #[unsafe(method_family = none)]
1860 pub unsafe fn rangeOfScheme(&self) -> NSRange;
1861
1862 #[cfg(feature = "NSRange")]
1863 #[unsafe(method(rangeOfUser))]
1864 #[unsafe(method_family = none)]
1865 pub unsafe fn rangeOfUser(&self) -> NSRange;
1866
1867 #[cfg(feature = "NSRange")]
1868 #[unsafe(method(rangeOfPassword))]
1869 #[unsafe(method_family = none)]
1870 pub unsafe fn rangeOfPassword(&self) -> NSRange;
1871
1872 #[cfg(feature = "NSRange")]
1873 #[unsafe(method(rangeOfHost))]
1874 #[unsafe(method_family = none)]
1875 pub unsafe fn rangeOfHost(&self) -> NSRange;
1876
1877 #[cfg(feature = "NSRange")]
1878 #[unsafe(method(rangeOfPort))]
1879 #[unsafe(method_family = none)]
1880 pub unsafe fn rangeOfPort(&self) -> NSRange;
1881
1882 #[cfg(feature = "NSRange")]
1883 #[unsafe(method(rangeOfPath))]
1884 #[unsafe(method_family = none)]
1885 pub unsafe fn rangeOfPath(&self) -> NSRange;
1886
1887 #[cfg(feature = "NSRange")]
1888 #[unsafe(method(rangeOfQuery))]
1889 #[unsafe(method_family = none)]
1890 pub unsafe fn rangeOfQuery(&self) -> NSRange;
1891
1892 #[cfg(feature = "NSRange")]
1893 #[unsafe(method(rangeOfFragment))]
1894 #[unsafe(method_family = none)]
1895 pub unsafe fn rangeOfFragment(&self) -> NSRange;
1896
1897 #[cfg(feature = "NSArray")]
1898 #[unsafe(method(queryItems))]
1899 #[unsafe(method_family = none)]
1900 pub unsafe fn queryItems(&self) -> Option<Retained<NSArray<NSURLQueryItem>>>;
1901
1902 #[cfg(feature = "NSArray")]
1903 #[unsafe(method(setQueryItems:))]
1905 #[unsafe(method_family = none)]
1906 pub unsafe fn setQueryItems(&self, query_items: Option<&NSArray<NSURLQueryItem>>);
1907
1908 #[cfg(feature = "NSArray")]
1909 #[unsafe(method(percentEncodedQueryItems))]
1910 #[unsafe(method_family = none)]
1911 pub unsafe fn percentEncodedQueryItems(&self) -> Option<Retained<NSArray<NSURLQueryItem>>>;
1912
1913 #[cfg(feature = "NSArray")]
1914 #[unsafe(method(setPercentEncodedQueryItems:))]
1916 #[unsafe(method_family = none)]
1917 pub unsafe fn setPercentEncodedQueryItems(
1918 &self,
1919 percent_encoded_query_items: Option<&NSArray<NSURLQueryItem>>,
1920 );
1921 );
1922}
1923
1924impl NSURLComponents {
1926 extern_methods!(
1927 #[unsafe(method(new))]
1928 #[unsafe(method_family = new)]
1929 pub unsafe fn new() -> Retained<Self>;
1930 );
1931}
1932
1933#[cfg(feature = "NSCharacterSet")]
1935impl NSCharacterSet {
1936 extern_methods!(
1937 #[unsafe(method(URLUserAllowedCharacterSet))]
1938 #[unsafe(method_family = none)]
1939 pub unsafe fn URLUserAllowedCharacterSet() -> Retained<NSCharacterSet>;
1940
1941 #[unsafe(method(URLPasswordAllowedCharacterSet))]
1942 #[unsafe(method_family = none)]
1943 pub unsafe fn URLPasswordAllowedCharacterSet() -> Retained<NSCharacterSet>;
1944
1945 #[unsafe(method(URLHostAllowedCharacterSet))]
1946 #[unsafe(method_family = none)]
1947 pub unsafe fn URLHostAllowedCharacterSet() -> Retained<NSCharacterSet>;
1948
1949 #[unsafe(method(URLPathAllowedCharacterSet))]
1950 #[unsafe(method_family = none)]
1951 pub unsafe fn URLPathAllowedCharacterSet() -> Retained<NSCharacterSet>;
1952
1953 #[unsafe(method(URLQueryAllowedCharacterSet))]
1954 #[unsafe(method_family = none)]
1955 pub unsafe fn URLQueryAllowedCharacterSet() -> Retained<NSCharacterSet>;
1956
1957 #[unsafe(method(URLFragmentAllowedCharacterSet))]
1958 #[unsafe(method_family = none)]
1959 pub unsafe fn URLFragmentAllowedCharacterSet() -> Retained<NSCharacterSet>;
1960 );
1961}
1962
1963#[cfg(feature = "NSString")]
1965impl NSString {
1966 extern_methods!(
1967 #[cfg(feature = "NSCharacterSet")]
1968 #[unsafe(method(stringByAddingPercentEncodingWithAllowedCharacters:))]
1969 #[unsafe(method_family = none)]
1970 pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters(
1971 &self,
1972 allowed_characters: &NSCharacterSet,
1973 ) -> Option<Retained<NSString>>;
1974
1975 #[unsafe(method(stringByRemovingPercentEncoding))]
1976 #[unsafe(method_family = none)]
1977 pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option<Retained<NSString>>;
1978
1979 #[deprecated = "Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid."]
1980 #[unsafe(method(stringByAddingPercentEscapesUsingEncoding:))]
1981 #[unsafe(method_family = none)]
1982 pub unsafe fn stringByAddingPercentEscapesUsingEncoding(
1983 &self,
1984 enc: NSStringEncoding,
1985 ) -> Option<Retained<NSString>>;
1986
1987 #[deprecated = "Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding."]
1988 #[unsafe(method(stringByReplacingPercentEscapesUsingEncoding:))]
1989 #[unsafe(method_family = none)]
1990 pub unsafe fn stringByReplacingPercentEscapesUsingEncoding(
1991 &self,
1992 enc: NSStringEncoding,
1993 ) -> Option<Retained<NSString>>;
1994 );
1995}
1996
1997impl NSURL {
1999 extern_methods!(
2000 #[cfg(all(feature = "NSArray", feature = "NSString"))]
2001 #[unsafe(method(fileURLWithPathComponents:))]
2002 #[unsafe(method_family = none)]
2003 pub unsafe fn fileURLWithPathComponents(
2004 components: &NSArray<NSString>,
2005 ) -> Option<Retained<NSURL>>;
2006
2007 #[cfg(all(feature = "NSArray", feature = "NSString"))]
2008 #[unsafe(method(pathComponents))]
2009 #[unsafe(method_family = none)]
2010 pub unsafe fn pathComponents(&self) -> Option<Retained<NSArray<NSString>>>;
2011
2012 #[cfg(feature = "NSString")]
2013 #[unsafe(method(lastPathComponent))]
2014 #[unsafe(method_family = none)]
2015 pub unsafe fn lastPathComponent(&self) -> Option<Retained<NSString>>;
2016
2017 #[cfg(feature = "NSString")]
2018 #[unsafe(method(pathExtension))]
2019 #[unsafe(method_family = none)]
2020 pub unsafe fn pathExtension(&self) -> Option<Retained<NSString>>;
2021
2022 #[cfg(feature = "NSString")]
2023 #[unsafe(method(URLByAppendingPathComponent:))]
2024 #[unsafe(method_family = none)]
2025 pub unsafe fn URLByAppendingPathComponent(
2026 &self,
2027 path_component: &NSString,
2028 ) -> Option<Retained<NSURL>>;
2029
2030 #[cfg(feature = "NSString")]
2031 #[unsafe(method(URLByAppendingPathComponent:isDirectory:))]
2032 #[unsafe(method_family = none)]
2033 pub unsafe fn URLByAppendingPathComponent_isDirectory(
2034 &self,
2035 path_component: &NSString,
2036 is_directory: bool,
2037 ) -> Option<Retained<NSURL>>;
2038
2039 #[unsafe(method(URLByDeletingLastPathComponent))]
2040 #[unsafe(method_family = none)]
2041 pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option<Retained<NSURL>>;
2042
2043 #[cfg(feature = "NSString")]
2044 #[unsafe(method(URLByAppendingPathExtension:))]
2045 #[unsafe(method_family = none)]
2046 pub unsafe fn URLByAppendingPathExtension(
2047 &self,
2048 path_extension: &NSString,
2049 ) -> Option<Retained<NSURL>>;
2050
2051 #[unsafe(method(URLByDeletingPathExtension))]
2052 #[unsafe(method_family = none)]
2053 pub unsafe fn URLByDeletingPathExtension(&self) -> Option<Retained<NSURL>>;
2054
2055 #[cfg(feature = "NSError")]
2056 #[unsafe(method(checkResourceIsReachableAndReturnError:_))]
2057 #[unsafe(method_family = none)]
2058 pub unsafe fn checkResourceIsReachableAndReturnError(
2059 &self,
2060 ) -> Result<(), Retained<NSError>>;
2061
2062 #[unsafe(method(URLByStandardizingPath))]
2063 #[unsafe(method_family = none)]
2064 pub unsafe fn URLByStandardizingPath(&self) -> Option<Retained<NSURL>>;
2065
2066 #[unsafe(method(URLByResolvingSymlinksInPath))]
2067 #[unsafe(method_family = none)]
2068 pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option<Retained<NSURL>>;
2069 );
2070}
2071
2072extern_class!(
2073 #[unsafe(super(NSObject))]
2075 #[derive(Debug, PartialEq, Eq, Hash)]
2076 pub struct NSFileSecurity;
2077);
2078
2079#[cfg(feature = "NSObject")]
2080unsafe impl NSCoding for NSFileSecurity {}
2081
2082#[cfg(feature = "NSObject")]
2083unsafe impl NSCopying for NSFileSecurity {}
2084
2085#[cfg(feature = "NSObject")]
2086unsafe impl CopyingHelper for NSFileSecurity {
2087 type Result = Self;
2088}
2089
2090unsafe impl NSObjectProtocol for NSFileSecurity {}
2091
2092#[cfg(feature = "NSObject")]
2093unsafe impl NSSecureCoding for NSFileSecurity {}
2094
2095impl NSFileSecurity {
2096 extern_methods!(
2097 #[cfg(feature = "NSCoder")]
2098 #[unsafe(method(initWithCoder:))]
2099 #[unsafe(method_family = init)]
2100 pub unsafe fn initWithCoder(
2101 this: Allocated<Self>,
2102 coder: &NSCoder,
2103 ) -> Option<Retained<Self>>;
2104 );
2105}
2106
2107impl NSFileSecurity {
2109 extern_methods!(
2110 #[unsafe(method(init))]
2111 #[unsafe(method_family = init)]
2112 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2113
2114 #[unsafe(method(new))]
2115 #[unsafe(method_family = new)]
2116 pub unsafe fn new() -> Retained<Self>;
2117 );
2118}
2119
2120impl NSURL {
2122 extern_methods!(
2123 #[cfg(feature = "NSData")]
2124 #[deprecated = "Use NSURLConnection instead"]
2125 #[unsafe(method(resourceDataUsingCache:))]
2126 #[unsafe(method_family = none)]
2127 pub unsafe fn resourceDataUsingCache(
2128 &self,
2129 should_use_cache: bool,
2130 ) -> Option<Retained<NSData>>;
2131
2132 #[deprecated = "Use NSURLConnection instead"]
2133 #[unsafe(method(loadResourceDataNotifyingClient:usingCache:))]
2134 #[unsafe(method_family = none)]
2135 pub unsafe fn loadResourceDataNotifyingClient_usingCache(
2136 &self,
2137 client: &AnyObject,
2138 should_use_cache: bool,
2139 );
2140
2141 #[cfg(feature = "NSString")]
2142 #[deprecated = "Use NSURLConnection instead"]
2143 #[unsafe(method(propertyForKey:))]
2144 #[unsafe(method_family = none)]
2145 pub unsafe fn propertyForKey(&self, property_key: &NSString)
2146 -> Option<Retained<AnyObject>>;
2147
2148 #[cfg(feature = "NSData")]
2149 #[deprecated = "Use NSURLConnection instead"]
2150 #[unsafe(method(setResourceData:))]
2151 #[unsafe(method_family = none)]
2152 pub unsafe fn setResourceData(&self, data: &NSData) -> bool;
2153
2154 #[cfg(feature = "NSString")]
2155 #[deprecated = "Use NSURLConnection instead"]
2156 #[unsafe(method(setProperty:forKey:))]
2157 #[unsafe(method_family = none)]
2158 pub unsafe fn setProperty_forKey(
2159 &self,
2160 property: &AnyObject,
2161 property_key: &NSString,
2162 ) -> bool;
2163
2164 #[cfg(feature = "NSURLHandle")]
2165 #[deprecated = "Use NSURLConnection instead"]
2166 #[unsafe(method(URLHandleUsingCache:))]
2167 #[unsafe(method_family = none)]
2168 pub unsafe fn URLHandleUsingCache(
2169 &self,
2170 should_use_cache: bool,
2171 ) -> Option<Retained<NSURLHandle>>;
2172 );
2173}