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 #[doc(alias = "NSURLBookmarkCreationPreferFileIDResolution")]
941#[deprecated = "Not supported"]
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")]
1005extern_conformance!(
1006 unsafe impl NSCoding for NSURL {}
1007);
1008
1009#[cfg(feature = "NSObject")]
1010extern_conformance!(
1011 unsafe impl NSCopying for NSURL {}
1012);
1013
1014#[cfg(feature = "NSObject")]
1015unsafe impl CopyingHelper for NSURL {
1016 type Result = Self;
1017}
1018
1019extern_conformance!(
1020 unsafe impl NSObjectProtocol for NSURL {}
1021);
1022
1023#[cfg(feature = "NSObject")]
1024extern_conformance!(
1025 unsafe impl NSSecureCoding for NSURL {}
1026);
1027
1028impl NSURL {
1029 extern_methods!(
1030 #[cfg(feature = "NSString")]
1031 #[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."]
1032 #[unsafe(method(initWithScheme:host:path:))]
1033 #[unsafe(method_family = init)]
1034 pub unsafe fn initWithScheme_host_path(
1035 this: Allocated<Self>,
1036 scheme: &NSString,
1037 host: Option<&NSString>,
1038 path: &NSString,
1039 ) -> Option<Retained<Self>>;
1040
1041 #[cfg(feature = "NSString")]
1042 #[unsafe(method(initFileURLWithPath:isDirectory:relativeToURL:))]
1043 #[unsafe(method_family = init)]
1044 pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL(
1045 this: Allocated<Self>,
1046 path: &NSString,
1047 is_dir: bool,
1048 base_url: Option<&NSURL>,
1049 ) -> Retained<Self>;
1050
1051 #[cfg(feature = "NSString")]
1052 #[unsafe(method(initFileURLWithPath:relativeToURL:))]
1053 #[unsafe(method_family = init)]
1054 pub unsafe fn initFileURLWithPath_relativeToURL(
1055 this: Allocated<Self>,
1056 path: &NSString,
1057 base_url: Option<&NSURL>,
1058 ) -> Retained<Self>;
1059
1060 #[cfg(feature = "NSString")]
1061 #[unsafe(method(initFileURLWithPath:isDirectory:))]
1062 #[unsafe(method_family = init)]
1063 pub unsafe fn initFileURLWithPath_isDirectory(
1064 this: Allocated<Self>,
1065 path: &NSString,
1066 is_dir: bool,
1067 ) -> Retained<Self>;
1068
1069 #[cfg(feature = "NSString")]
1070 #[unsafe(method(initFileURLWithPath:))]
1071 #[unsafe(method_family = init)]
1072 pub unsafe fn initFileURLWithPath(this: Allocated<Self>, path: &NSString)
1073 -> Retained<Self>;
1074
1075 #[cfg(feature = "NSString")]
1076 #[unsafe(method(fileURLWithPath:isDirectory:relativeToURL:))]
1077 #[unsafe(method_family = none)]
1078 pub unsafe fn fileURLWithPath_isDirectory_relativeToURL(
1079 path: &NSString,
1080 is_dir: bool,
1081 base_url: Option<&NSURL>,
1082 ) -> Retained<NSURL>;
1083
1084 #[cfg(feature = "NSString")]
1085 #[unsafe(method(fileURLWithPath:relativeToURL:))]
1086 #[unsafe(method_family = none)]
1087 pub unsafe fn fileURLWithPath_relativeToURL(
1088 path: &NSString,
1089 base_url: Option<&NSURL>,
1090 ) -> Retained<NSURL>;
1091
1092 #[cfg(feature = "NSString")]
1093 #[unsafe(method(fileURLWithPath:isDirectory:))]
1094 #[unsafe(method_family = none)]
1095 pub unsafe fn fileURLWithPath_isDirectory(path: &NSString, is_dir: bool)
1096 -> Retained<NSURL>;
1097
1098 #[cfg(feature = "NSString")]
1099 #[unsafe(method(fileURLWithPath:))]
1100 #[unsafe(method_family = none)]
1101 pub unsafe fn fileURLWithPath(path: &NSString) -> Retained<NSURL>;
1102
1103 #[unsafe(method(initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:))]
1104 #[unsafe(method_family = init)]
1105 pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL(
1106 this: Allocated<Self>,
1107 path: NonNull<c_char>,
1108 is_dir: bool,
1109 base_url: Option<&NSURL>,
1110 ) -> Retained<Self>;
1111
1112 #[unsafe(method(fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:))]
1113 #[unsafe(method_family = none)]
1114 pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL(
1115 path: NonNull<c_char>,
1116 is_dir: bool,
1117 base_url: Option<&NSURL>,
1118 ) -> Retained<NSURL>;
1119
1120 #[cfg(feature = "NSString")]
1121 #[unsafe(method(initWithString:))]
1122 #[unsafe(method_family = init)]
1123 pub unsafe fn initWithString(
1124 this: Allocated<Self>,
1125 url_string: &NSString,
1126 ) -> Option<Retained<Self>>;
1127
1128 #[cfg(feature = "NSString")]
1129 #[unsafe(method(initWithString:relativeToURL:))]
1130 #[unsafe(method_family = init)]
1131 pub unsafe fn initWithString_relativeToURL(
1132 this: Allocated<Self>,
1133 url_string: &NSString,
1134 base_url: Option<&NSURL>,
1135 ) -> Option<Retained<Self>>;
1136
1137 #[cfg(feature = "NSString")]
1138 #[unsafe(method(URLWithString:))]
1139 #[unsafe(method_family = none)]
1140 pub unsafe fn URLWithString(url_string: &NSString) -> Option<Retained<Self>>;
1141
1142 #[cfg(feature = "NSString")]
1143 #[unsafe(method(URLWithString:relativeToURL:))]
1144 #[unsafe(method_family = none)]
1145 pub unsafe fn URLWithString_relativeToURL(
1146 url_string: &NSString,
1147 base_url: Option<&NSURL>,
1148 ) -> Option<Retained<Self>>;
1149
1150 #[cfg(feature = "NSString")]
1151 #[unsafe(method(initWithString:encodingInvalidCharacters:))]
1160 #[unsafe(method_family = init)]
1161 pub unsafe fn initWithString_encodingInvalidCharacters(
1162 this: Allocated<Self>,
1163 url_string: &NSString,
1164 encoding_invalid_characters: bool,
1165 ) -> Option<Retained<Self>>;
1166
1167 #[cfg(feature = "NSString")]
1168 #[unsafe(method(URLWithString:encodingInvalidCharacters:))]
1177 #[unsafe(method_family = none)]
1178 pub unsafe fn URLWithString_encodingInvalidCharacters(
1179 url_string: &NSString,
1180 encoding_invalid_characters: bool,
1181 ) -> Option<Retained<Self>>;
1182
1183 #[cfg(feature = "NSData")]
1184 #[unsafe(method(initWithDataRepresentation:relativeToURL:))]
1185 #[unsafe(method_family = init)]
1186 pub unsafe fn initWithDataRepresentation_relativeToURL(
1187 this: Allocated<Self>,
1188 data: &NSData,
1189 base_url: Option<&NSURL>,
1190 ) -> Retained<Self>;
1191
1192 #[cfg(feature = "NSData")]
1193 #[unsafe(method(URLWithDataRepresentation:relativeToURL:))]
1194 #[unsafe(method_family = none)]
1195 pub unsafe fn URLWithDataRepresentation_relativeToURL(
1196 data: &NSData,
1197 base_url: Option<&NSURL>,
1198 ) -> Retained<NSURL>;
1199
1200 #[cfg(feature = "NSData")]
1201 #[unsafe(method(initAbsoluteURLWithDataRepresentation:relativeToURL:))]
1202 #[unsafe(method_family = init)]
1203 pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL(
1204 this: Allocated<Self>,
1205 data: &NSData,
1206 base_url: Option<&NSURL>,
1207 ) -> Retained<Self>;
1208
1209 #[cfg(feature = "NSData")]
1210 #[unsafe(method(absoluteURLWithDataRepresentation:relativeToURL:))]
1211 #[unsafe(method_family = none)]
1212 pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL(
1213 data: &NSData,
1214 base_url: Option<&NSURL>,
1215 ) -> Retained<NSURL>;
1216
1217 #[cfg(feature = "NSData")]
1218 #[unsafe(method(dataRepresentation))]
1219 #[unsafe(method_family = none)]
1220 pub unsafe fn dataRepresentation(&self) -> Retained<NSData>;
1221
1222 #[cfg(feature = "NSString")]
1223 #[unsafe(method(absoluteString))]
1224 #[unsafe(method_family = none)]
1225 pub unsafe fn absoluteString(&self) -> Option<Retained<NSString>>;
1226
1227 #[cfg(feature = "NSString")]
1228 #[unsafe(method(relativeString))]
1229 #[unsafe(method_family = none)]
1230 pub unsafe fn relativeString(&self) -> Retained<NSString>;
1231
1232 #[unsafe(method(baseURL))]
1233 #[unsafe(method_family = none)]
1234 pub unsafe fn baseURL(&self) -> Option<Retained<NSURL>>;
1235
1236 #[unsafe(method(absoluteURL))]
1237 #[unsafe(method_family = none)]
1238 pub unsafe fn absoluteURL(&self) -> Option<Retained<NSURL>>;
1239
1240 #[cfg(feature = "NSString")]
1241 #[unsafe(method(scheme))]
1242 #[unsafe(method_family = none)]
1243 pub unsafe fn scheme(&self) -> Option<Retained<NSString>>;
1244
1245 #[cfg(feature = "NSString")]
1246 #[unsafe(method(resourceSpecifier))]
1247 #[unsafe(method_family = none)]
1248 pub unsafe fn resourceSpecifier(&self) -> Option<Retained<NSString>>;
1249
1250 #[cfg(feature = "NSString")]
1251 #[unsafe(method(host))]
1252 #[unsafe(method_family = none)]
1253 pub unsafe fn host(&self) -> Option<Retained<NSString>>;
1254
1255 #[cfg(feature = "NSValue")]
1256 #[unsafe(method(port))]
1257 #[unsafe(method_family = none)]
1258 pub unsafe fn port(&self) -> Option<Retained<NSNumber>>;
1259
1260 #[cfg(feature = "NSString")]
1261 #[unsafe(method(user))]
1262 #[unsafe(method_family = none)]
1263 pub unsafe fn user(&self) -> Option<Retained<NSString>>;
1264
1265 #[cfg(feature = "NSString")]
1266 #[unsafe(method(password))]
1267 #[unsafe(method_family = none)]
1268 pub unsafe fn password(&self) -> Option<Retained<NSString>>;
1269
1270 #[cfg(feature = "NSString")]
1271 #[unsafe(method(path))]
1272 #[unsafe(method_family = none)]
1273 pub unsafe fn path(&self) -> Option<Retained<NSString>>;
1274
1275 #[cfg(feature = "NSString")]
1276 #[unsafe(method(fragment))]
1277 #[unsafe(method_family = none)]
1278 pub unsafe fn fragment(&self) -> Option<Retained<NSString>>;
1279
1280 #[cfg(feature = "NSString")]
1281 #[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."]
1282 #[unsafe(method(parameterString))]
1283 #[unsafe(method_family = none)]
1284 pub unsafe fn parameterString(&self) -> Option<Retained<NSString>>;
1285
1286 #[cfg(feature = "NSString")]
1287 #[unsafe(method(query))]
1288 #[unsafe(method_family = none)]
1289 pub unsafe fn query(&self) -> Option<Retained<NSString>>;
1290
1291 #[cfg(feature = "NSString")]
1292 #[unsafe(method(relativePath))]
1293 #[unsafe(method_family = none)]
1294 pub unsafe fn relativePath(&self) -> Option<Retained<NSString>>;
1295
1296 #[unsafe(method(hasDirectoryPath))]
1297 #[unsafe(method_family = none)]
1298 pub unsafe fn hasDirectoryPath(&self) -> bool;
1299
1300 #[unsafe(method(getFileSystemRepresentation:maxLength:))]
1301 #[unsafe(method_family = none)]
1302 pub unsafe fn getFileSystemRepresentation_maxLength(
1303 &self,
1304 buffer: NonNull<c_char>,
1305 max_buffer_length: NSUInteger,
1306 ) -> bool;
1307
1308 #[unsafe(method(fileSystemRepresentation))]
1309 #[unsafe(method_family = none)]
1310 pub unsafe fn fileSystemRepresentation(&self) -> NonNull<c_char>;
1311
1312 #[unsafe(method(isFileURL))]
1313 #[unsafe(method_family = none)]
1314 pub unsafe fn isFileURL(&self) -> bool;
1315
1316 #[unsafe(method(standardizedURL))]
1317 #[unsafe(method_family = none)]
1318 pub unsafe fn standardizedURL(&self) -> Option<Retained<NSURL>>;
1319
1320 #[unsafe(method(isFileReferenceURL))]
1321 #[unsafe(method_family = none)]
1322 pub unsafe fn isFileReferenceURL(&self) -> bool;
1323
1324 #[unsafe(method(fileReferenceURL))]
1325 #[unsafe(method_family = none)]
1326 pub unsafe fn fileReferenceURL(&self) -> Option<Retained<NSURL>>;
1327
1328 #[unsafe(method(filePathURL))]
1329 #[unsafe(method_family = none)]
1330 pub unsafe fn filePathURL(&self) -> Option<Retained<NSURL>>;
1331
1332 #[cfg(all(feature = "NSError", feature = "NSString"))]
1333 #[unsafe(method(getResourceValue:forKey:error:_))]
1334 #[unsafe(method_family = none)]
1335 pub unsafe fn getResourceValue_forKey_error(
1336 &self,
1337 value: &mut Option<Retained<AnyObject>>,
1338 key: &NSURLResourceKey,
1339 ) -> Result<(), Retained<NSError>>;
1340
1341 #[cfg(all(
1342 feature = "NSArray",
1343 feature = "NSDictionary",
1344 feature = "NSError",
1345 feature = "NSString"
1346 ))]
1347 #[unsafe(method(resourceValuesForKeys:error:_))]
1348 #[unsafe(method_family = none)]
1349 pub unsafe fn resourceValuesForKeys_error(
1350 &self,
1351 keys: &NSArray<NSURLResourceKey>,
1352 ) -> Result<Retained<NSDictionary<NSURLResourceKey, AnyObject>>, Retained<NSError>>;
1353
1354 #[cfg(all(feature = "NSError", feature = "NSString"))]
1355 #[unsafe(method(setResourceValue:forKey:error:_))]
1356 #[unsafe(method_family = none)]
1357 pub unsafe fn setResourceValue_forKey_error(
1358 &self,
1359 value: Option<&AnyObject>,
1360 key: &NSURLResourceKey,
1361 ) -> Result<(), Retained<NSError>>;
1362
1363 #[cfg(all(feature = "NSDictionary", feature = "NSError", feature = "NSString"))]
1364 #[unsafe(method(setResourceValues:error:_))]
1365 #[unsafe(method_family = none)]
1366 pub unsafe fn setResourceValues_error(
1367 &self,
1368 keyed_values: &NSDictionary<NSURLResourceKey, AnyObject>,
1369 ) -> Result<(), Retained<NSError>>;
1370
1371 #[cfg(feature = "NSString")]
1372 #[unsafe(method(removeCachedResourceValueForKey:))]
1373 #[unsafe(method_family = none)]
1374 pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey);
1375
1376 #[unsafe(method(removeAllCachedResourceValues))]
1377 #[unsafe(method_family = none)]
1378 pub unsafe fn removeAllCachedResourceValues(&self);
1379
1380 #[cfg(feature = "NSString")]
1381 #[unsafe(method(setTemporaryResourceValue:forKey:))]
1382 #[unsafe(method_family = none)]
1383 pub unsafe fn setTemporaryResourceValue_forKey(
1384 &self,
1385 value: Option<&AnyObject>,
1386 key: &NSURLResourceKey,
1387 );
1388
1389 #[cfg(all(
1390 feature = "NSArray",
1391 feature = "NSData",
1392 feature = "NSError",
1393 feature = "NSString"
1394 ))]
1395 #[unsafe(method(bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:_))]
1396 #[unsafe(method_family = none)]
1397 pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error(
1398 &self,
1399 options: NSURLBookmarkCreationOptions,
1400 keys: Option<&NSArray<NSURLResourceKey>>,
1401 relative_url: Option<&NSURL>,
1402 ) -> Result<Retained<NSData>, Retained<NSError>>;
1403
1404 #[cfg(all(feature = "NSData", feature = "NSError"))]
1405 #[unsafe(method(initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:_))]
1406 #[unsafe(method_family = init)]
1407 pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error(
1408 this: Allocated<Self>,
1409 bookmark_data: &NSData,
1410 options: NSURLBookmarkResolutionOptions,
1411 relative_url: Option<&NSURL>,
1412 is_stale: *mut Bool,
1413 ) -> Result<Retained<Self>, Retained<NSError>>;
1414
1415 #[cfg(all(feature = "NSData", feature = "NSError"))]
1416 #[unsafe(method(URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:_))]
1417 #[unsafe(method_family = none)]
1418 pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error(
1419 bookmark_data: &NSData,
1420 options: NSURLBookmarkResolutionOptions,
1421 relative_url: Option<&NSURL>,
1422 is_stale: *mut Bool,
1423 ) -> Result<Retained<Self>, Retained<NSError>>;
1424
1425 #[cfg(all(
1426 feature = "NSArray",
1427 feature = "NSData",
1428 feature = "NSDictionary",
1429 feature = "NSString"
1430 ))]
1431 #[unsafe(method(resourceValuesForKeys:fromBookmarkData:))]
1432 #[unsafe(method_family = none)]
1433 pub unsafe fn resourceValuesForKeys_fromBookmarkData(
1434 keys: &NSArray<NSURLResourceKey>,
1435 bookmark_data: &NSData,
1436 ) -> Option<Retained<NSDictionary<NSURLResourceKey, AnyObject>>>;
1437
1438 #[cfg(all(feature = "NSData", feature = "NSError"))]
1439 #[unsafe(method(writeBookmarkData:toURL:options:error:_))]
1440 #[unsafe(method_family = none)]
1441 pub unsafe fn writeBookmarkData_toURL_options_error(
1442 bookmark_data: &NSData,
1443 bookmark_file_url: &NSURL,
1444 options: NSURLBookmarkFileCreationOptions,
1445 ) -> Result<(), Retained<NSError>>;
1446
1447 #[cfg(all(feature = "NSData", feature = "NSError"))]
1448 #[unsafe(method(bookmarkDataWithContentsOfURL:error:_))]
1449 #[unsafe(method_family = none)]
1450 pub unsafe fn bookmarkDataWithContentsOfURL_error(
1451 bookmark_file_url: &NSURL,
1452 ) -> Result<Retained<NSData>, Retained<NSError>>;
1453
1454 #[cfg(feature = "NSError")]
1455 #[unsafe(method(URLByResolvingAliasFileAtURL:options:error:_))]
1456 #[unsafe(method_family = none)]
1457 pub unsafe fn URLByResolvingAliasFileAtURL_options_error(
1458 url: &NSURL,
1459 options: NSURLBookmarkResolutionOptions,
1460 ) -> Result<Retained<Self>, Retained<NSError>>;
1461
1462 #[unsafe(method(startAccessingSecurityScopedResource))]
1463 #[unsafe(method_family = none)]
1464 pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool;
1465
1466 #[unsafe(method(stopAccessingSecurityScopedResource))]
1467 #[unsafe(method_family = none)]
1468 pub unsafe fn stopAccessingSecurityScopedResource(&self);
1469 );
1470}
1471
1472impl NSURL {
1474 extern_methods!(
1475 #[unsafe(method(init))]
1476 #[unsafe(method_family = init)]
1477 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1478
1479 #[unsafe(method(new))]
1480 #[unsafe(method_family = new)]
1481 pub unsafe fn new() -> Retained<Self>;
1482 );
1483}
1484
1485impl NSURL {
1487 extern_methods!(
1488 #[cfg(all(feature = "NSError", feature = "NSString"))]
1489 #[unsafe(method(getPromisedItemResourceValue:forKey:error:_))]
1490 #[unsafe(method_family = none)]
1491 pub unsafe fn getPromisedItemResourceValue_forKey_error(
1492 &self,
1493 value: &mut Option<Retained<AnyObject>>,
1494 key: &NSURLResourceKey,
1495 ) -> Result<(), Retained<NSError>>;
1496
1497 #[cfg(all(
1498 feature = "NSArray",
1499 feature = "NSDictionary",
1500 feature = "NSError",
1501 feature = "NSString"
1502 ))]
1503 #[unsafe(method(promisedItemResourceValuesForKeys:error:_))]
1504 #[unsafe(method_family = none)]
1505 pub unsafe fn promisedItemResourceValuesForKeys_error(
1506 &self,
1507 keys: &NSArray<NSURLResourceKey>,
1508 ) -> Result<Retained<NSDictionary<NSURLResourceKey, AnyObject>>, Retained<NSError>>;
1509
1510 #[cfg(feature = "NSError")]
1511 #[unsafe(method(checkPromisedItemIsReachableAndReturnError:_))]
1512 #[unsafe(method_family = none)]
1513 pub unsafe fn checkPromisedItemIsReachableAndReturnError(
1514 &self,
1515 ) -> Result<(), Retained<NSError>>;
1516 );
1517}
1518
1519impl NSURL {
1521 extern_methods!();
1522}
1523
1524#[cfg(feature = "NSItemProvider")]
1525extern_conformance!(
1526 unsafe impl NSItemProviderReading for NSURL {}
1527);
1528
1529#[cfg(feature = "NSItemProvider")]
1530extern_conformance!(
1531 unsafe impl NSItemProviderWriting for NSURL {}
1532);
1533
1534extern_class!(
1535 #[unsafe(super(NSObject))]
1537 #[derive(Debug, PartialEq, Eq, Hash)]
1538 pub struct NSURLQueryItem;
1539);
1540
1541unsafe impl Send for NSURLQueryItem {}
1542
1543unsafe impl Sync for NSURLQueryItem {}
1544
1545#[cfg(feature = "NSObject")]
1546extern_conformance!(
1547 unsafe impl NSCoding for NSURLQueryItem {}
1548);
1549
1550#[cfg(feature = "NSObject")]
1551extern_conformance!(
1552 unsafe impl NSCopying for NSURLQueryItem {}
1553);
1554
1555#[cfg(feature = "NSObject")]
1556unsafe impl CopyingHelper for NSURLQueryItem {
1557 type Result = Self;
1558}
1559
1560extern_conformance!(
1561 unsafe impl NSObjectProtocol for NSURLQueryItem {}
1562);
1563
1564#[cfg(feature = "NSObject")]
1565extern_conformance!(
1566 unsafe impl NSSecureCoding for NSURLQueryItem {}
1567);
1568
1569impl NSURLQueryItem {
1570 extern_methods!(
1571 #[cfg(feature = "NSString")]
1572 #[unsafe(method(initWithName:value:))]
1573 #[unsafe(method_family = init)]
1574 pub unsafe fn initWithName_value(
1575 this: Allocated<Self>,
1576 name: &NSString,
1577 value: Option<&NSString>,
1578 ) -> Retained<Self>;
1579
1580 #[cfg(feature = "NSString")]
1581 #[unsafe(method(queryItemWithName:value:))]
1582 #[unsafe(method_family = none)]
1583 pub unsafe fn queryItemWithName_value(
1584 name: &NSString,
1585 value: Option<&NSString>,
1586 ) -> Retained<Self>;
1587
1588 #[cfg(feature = "NSString")]
1589 #[unsafe(method(name))]
1590 #[unsafe(method_family = none)]
1591 pub unsafe fn name(&self) -> Retained<NSString>;
1592
1593 #[cfg(feature = "NSString")]
1594 #[unsafe(method(value))]
1595 #[unsafe(method_family = none)]
1596 pub unsafe fn value(&self) -> Option<Retained<NSString>>;
1597 );
1598}
1599
1600impl NSURLQueryItem {
1602 extern_methods!(
1603 #[unsafe(method(init))]
1604 #[unsafe(method_family = init)]
1605 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1606
1607 #[unsafe(method(new))]
1608 #[unsafe(method_family = new)]
1609 pub unsafe fn new() -> Retained<Self>;
1610 );
1611}
1612
1613extern_class!(
1614 #[unsafe(super(NSObject))]
1616 #[derive(Debug, PartialEq, Eq, Hash)]
1617 pub struct NSURLComponents;
1618);
1619
1620#[cfg(feature = "NSObject")]
1621extern_conformance!(
1622 unsafe impl NSCopying for NSURLComponents {}
1623);
1624
1625#[cfg(feature = "NSObject")]
1626unsafe impl CopyingHelper for NSURLComponents {
1627 type Result = Self;
1628}
1629
1630extern_conformance!(
1631 unsafe impl NSObjectProtocol for NSURLComponents {}
1632);
1633
1634impl NSURLComponents {
1635 extern_methods!(
1636 #[unsafe(method(init))]
1637 #[unsafe(method_family = init)]
1638 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1639
1640 #[unsafe(method(initWithURL:resolvingAgainstBaseURL:))]
1641 #[unsafe(method_family = init)]
1642 pub unsafe fn initWithURL_resolvingAgainstBaseURL(
1643 this: Allocated<Self>,
1644 url: &NSURL,
1645 resolve: bool,
1646 ) -> Option<Retained<Self>>;
1647
1648 #[unsafe(method(componentsWithURL:resolvingAgainstBaseURL:))]
1649 #[unsafe(method_family = none)]
1650 pub unsafe fn componentsWithURL_resolvingAgainstBaseURL(
1651 url: &NSURL,
1652 resolve: bool,
1653 ) -> Option<Retained<Self>>;
1654
1655 #[cfg(feature = "NSString")]
1656 #[unsafe(method(initWithString:))]
1657 #[unsafe(method_family = init)]
1658 pub unsafe fn initWithString(
1659 this: Allocated<Self>,
1660 url_string: &NSString,
1661 ) -> Option<Retained<Self>>;
1662
1663 #[cfg(feature = "NSString")]
1664 #[unsafe(method(componentsWithString:))]
1665 #[unsafe(method_family = none)]
1666 pub unsafe fn componentsWithString(url_string: &NSString) -> Option<Retained<Self>>;
1667
1668 #[cfg(feature = "NSString")]
1669 #[unsafe(method(initWithString:encodingInvalidCharacters:))]
1678 #[unsafe(method_family = init)]
1679 pub unsafe fn initWithString_encodingInvalidCharacters(
1680 this: Allocated<Self>,
1681 url_string: &NSString,
1682 encoding_invalid_characters: bool,
1683 ) -> Option<Retained<Self>>;
1684
1685 #[cfg(feature = "NSString")]
1686 #[unsafe(method(componentsWithString:encodingInvalidCharacters:))]
1695 #[unsafe(method_family = none)]
1696 pub unsafe fn componentsWithString_encodingInvalidCharacters(
1697 url_string: &NSString,
1698 encoding_invalid_characters: bool,
1699 ) -> Option<Retained<Self>>;
1700
1701 #[unsafe(method(URL))]
1702 #[unsafe(method_family = none)]
1703 pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
1704
1705 #[unsafe(method(URLRelativeToURL:))]
1706 #[unsafe(method_family = none)]
1707 pub unsafe fn URLRelativeToURL(&self, base_url: Option<&NSURL>) -> Option<Retained<NSURL>>;
1708
1709 #[cfg(feature = "NSString")]
1710 #[unsafe(method(string))]
1711 #[unsafe(method_family = none)]
1712 pub unsafe fn string(&self) -> Option<Retained<NSString>>;
1713
1714 #[cfg(feature = "NSString")]
1715 #[unsafe(method(scheme))]
1716 #[unsafe(method_family = none)]
1717 pub unsafe fn scheme(&self) -> Option<Retained<NSString>>;
1718
1719 #[cfg(feature = "NSString")]
1720 #[unsafe(method(setScheme:))]
1722 #[unsafe(method_family = none)]
1723 pub unsafe fn setScheme(&self, scheme: Option<&NSString>);
1724
1725 #[cfg(feature = "NSString")]
1726 #[unsafe(method(user))]
1727 #[unsafe(method_family = none)]
1728 pub unsafe fn user(&self) -> Option<Retained<NSString>>;
1729
1730 #[cfg(feature = "NSString")]
1731 #[unsafe(method(setUser:))]
1733 #[unsafe(method_family = none)]
1734 pub unsafe fn setUser(&self, user: Option<&NSString>);
1735
1736 #[cfg(feature = "NSString")]
1737 #[unsafe(method(password))]
1738 #[unsafe(method_family = none)]
1739 pub unsafe fn password(&self) -> Option<Retained<NSString>>;
1740
1741 #[cfg(feature = "NSString")]
1742 #[unsafe(method(setPassword:))]
1744 #[unsafe(method_family = none)]
1745 pub unsafe fn setPassword(&self, password: Option<&NSString>);
1746
1747 #[cfg(feature = "NSString")]
1748 #[unsafe(method(host))]
1749 #[unsafe(method_family = none)]
1750 pub unsafe fn host(&self) -> Option<Retained<NSString>>;
1751
1752 #[cfg(feature = "NSString")]
1753 #[unsafe(method(setHost:))]
1755 #[unsafe(method_family = none)]
1756 pub unsafe fn setHost(&self, host: Option<&NSString>);
1757
1758 #[cfg(feature = "NSValue")]
1759 #[unsafe(method(port))]
1760 #[unsafe(method_family = none)]
1761 pub unsafe fn port(&self) -> Option<Retained<NSNumber>>;
1762
1763 #[cfg(feature = "NSValue")]
1764 #[unsafe(method(setPort:))]
1766 #[unsafe(method_family = none)]
1767 pub unsafe fn setPort(&self, port: Option<&NSNumber>);
1768
1769 #[cfg(feature = "NSString")]
1770 #[unsafe(method(path))]
1771 #[unsafe(method_family = none)]
1772 pub unsafe fn path(&self) -> Option<Retained<NSString>>;
1773
1774 #[cfg(feature = "NSString")]
1775 #[unsafe(method(setPath:))]
1777 #[unsafe(method_family = none)]
1778 pub unsafe fn setPath(&self, path: Option<&NSString>);
1779
1780 #[cfg(feature = "NSString")]
1781 #[unsafe(method(query))]
1782 #[unsafe(method_family = none)]
1783 pub unsafe fn query(&self) -> Option<Retained<NSString>>;
1784
1785 #[cfg(feature = "NSString")]
1786 #[unsafe(method(setQuery:))]
1788 #[unsafe(method_family = none)]
1789 pub unsafe fn setQuery(&self, query: Option<&NSString>);
1790
1791 #[cfg(feature = "NSString")]
1792 #[unsafe(method(fragment))]
1793 #[unsafe(method_family = none)]
1794 pub unsafe fn fragment(&self) -> Option<Retained<NSString>>;
1795
1796 #[cfg(feature = "NSString")]
1797 #[unsafe(method(setFragment:))]
1799 #[unsafe(method_family = none)]
1800 pub unsafe fn setFragment(&self, fragment: Option<&NSString>);
1801
1802 #[cfg(feature = "NSString")]
1803 #[unsafe(method(percentEncodedUser))]
1804 #[unsafe(method_family = none)]
1805 pub unsafe fn percentEncodedUser(&self) -> Option<Retained<NSString>>;
1806
1807 #[cfg(feature = "NSString")]
1808 #[unsafe(method(setPercentEncodedUser:))]
1810 #[unsafe(method_family = none)]
1811 pub unsafe fn setPercentEncodedUser(&self, percent_encoded_user: Option<&NSString>);
1812
1813 #[cfg(feature = "NSString")]
1814 #[unsafe(method(percentEncodedPassword))]
1815 #[unsafe(method_family = none)]
1816 pub unsafe fn percentEncodedPassword(&self) -> Option<Retained<NSString>>;
1817
1818 #[cfg(feature = "NSString")]
1819 #[unsafe(method(setPercentEncodedPassword:))]
1821 #[unsafe(method_family = none)]
1822 pub unsafe fn setPercentEncodedPassword(&self, percent_encoded_password: Option<&NSString>);
1823
1824 #[cfg(feature = "NSString")]
1825 #[deprecated = "Use encodedHost instead"]
1826 #[unsafe(method(percentEncodedHost))]
1827 #[unsafe(method_family = none)]
1828 pub unsafe fn percentEncodedHost(&self) -> Option<Retained<NSString>>;
1829
1830 #[cfg(feature = "NSString")]
1831 #[deprecated = "Use encodedHost instead"]
1833 #[unsafe(method(setPercentEncodedHost:))]
1834 #[unsafe(method_family = none)]
1835 pub unsafe fn setPercentEncodedHost(&self, percent_encoded_host: Option<&NSString>);
1836
1837 #[cfg(feature = "NSString")]
1838 #[unsafe(method(percentEncodedPath))]
1839 #[unsafe(method_family = none)]
1840 pub unsafe fn percentEncodedPath(&self) -> Option<Retained<NSString>>;
1841
1842 #[cfg(feature = "NSString")]
1843 #[unsafe(method(setPercentEncodedPath:))]
1845 #[unsafe(method_family = none)]
1846 pub unsafe fn setPercentEncodedPath(&self, percent_encoded_path: Option<&NSString>);
1847
1848 #[cfg(feature = "NSString")]
1849 #[unsafe(method(percentEncodedQuery))]
1850 #[unsafe(method_family = none)]
1851 pub unsafe fn percentEncodedQuery(&self) -> Option<Retained<NSString>>;
1852
1853 #[cfg(feature = "NSString")]
1854 #[unsafe(method(setPercentEncodedQuery:))]
1856 #[unsafe(method_family = none)]
1857 pub unsafe fn setPercentEncodedQuery(&self, percent_encoded_query: Option<&NSString>);
1858
1859 #[cfg(feature = "NSString")]
1860 #[unsafe(method(percentEncodedFragment))]
1861 #[unsafe(method_family = none)]
1862 pub unsafe fn percentEncodedFragment(&self) -> Option<Retained<NSString>>;
1863
1864 #[cfg(feature = "NSString")]
1865 #[unsafe(method(setPercentEncodedFragment:))]
1867 #[unsafe(method_family = none)]
1868 pub unsafe fn setPercentEncodedFragment(&self, percent_encoded_fragment: Option<&NSString>);
1869
1870 #[cfg(feature = "NSString")]
1871 #[unsafe(method(encodedHost))]
1872 #[unsafe(method_family = none)]
1873 pub unsafe fn encodedHost(&self) -> Option<Retained<NSString>>;
1874
1875 #[cfg(feature = "NSString")]
1876 #[unsafe(method(setEncodedHost:))]
1878 #[unsafe(method_family = none)]
1879 pub unsafe fn setEncodedHost(&self, encoded_host: Option<&NSString>);
1880
1881 #[cfg(feature = "NSRange")]
1882 #[unsafe(method(rangeOfScheme))]
1883 #[unsafe(method_family = none)]
1884 pub unsafe fn rangeOfScheme(&self) -> NSRange;
1885
1886 #[cfg(feature = "NSRange")]
1887 #[unsafe(method(rangeOfUser))]
1888 #[unsafe(method_family = none)]
1889 pub unsafe fn rangeOfUser(&self) -> NSRange;
1890
1891 #[cfg(feature = "NSRange")]
1892 #[unsafe(method(rangeOfPassword))]
1893 #[unsafe(method_family = none)]
1894 pub unsafe fn rangeOfPassword(&self) -> NSRange;
1895
1896 #[cfg(feature = "NSRange")]
1897 #[unsafe(method(rangeOfHost))]
1898 #[unsafe(method_family = none)]
1899 pub unsafe fn rangeOfHost(&self) -> NSRange;
1900
1901 #[cfg(feature = "NSRange")]
1902 #[unsafe(method(rangeOfPort))]
1903 #[unsafe(method_family = none)]
1904 pub unsafe fn rangeOfPort(&self) -> NSRange;
1905
1906 #[cfg(feature = "NSRange")]
1907 #[unsafe(method(rangeOfPath))]
1908 #[unsafe(method_family = none)]
1909 pub unsafe fn rangeOfPath(&self) -> NSRange;
1910
1911 #[cfg(feature = "NSRange")]
1912 #[unsafe(method(rangeOfQuery))]
1913 #[unsafe(method_family = none)]
1914 pub unsafe fn rangeOfQuery(&self) -> NSRange;
1915
1916 #[cfg(feature = "NSRange")]
1917 #[unsafe(method(rangeOfFragment))]
1918 #[unsafe(method_family = none)]
1919 pub unsafe fn rangeOfFragment(&self) -> NSRange;
1920
1921 #[cfg(feature = "NSArray")]
1922 #[unsafe(method(queryItems))]
1923 #[unsafe(method_family = none)]
1924 pub unsafe fn queryItems(&self) -> Option<Retained<NSArray<NSURLQueryItem>>>;
1925
1926 #[cfg(feature = "NSArray")]
1927 #[unsafe(method(setQueryItems:))]
1929 #[unsafe(method_family = none)]
1930 pub unsafe fn setQueryItems(&self, query_items: Option<&NSArray<NSURLQueryItem>>);
1931
1932 #[cfg(feature = "NSArray")]
1933 #[unsafe(method(percentEncodedQueryItems))]
1934 #[unsafe(method_family = none)]
1935 pub unsafe fn percentEncodedQueryItems(&self) -> Option<Retained<NSArray<NSURLQueryItem>>>;
1936
1937 #[cfg(feature = "NSArray")]
1938 #[unsafe(method(setPercentEncodedQueryItems:))]
1940 #[unsafe(method_family = none)]
1941 pub unsafe fn setPercentEncodedQueryItems(
1942 &self,
1943 percent_encoded_query_items: Option<&NSArray<NSURLQueryItem>>,
1944 );
1945 );
1946}
1947
1948impl NSURLComponents {
1950 extern_methods!(
1951 #[unsafe(method(new))]
1952 #[unsafe(method_family = new)]
1953 pub unsafe fn new() -> Retained<Self>;
1954 );
1955}
1956
1957#[cfg(feature = "NSCharacterSet")]
1959impl NSCharacterSet {
1960 extern_methods!(
1961 #[unsafe(method(URLUserAllowedCharacterSet))]
1962 #[unsafe(method_family = none)]
1963 pub unsafe fn URLUserAllowedCharacterSet() -> Retained<NSCharacterSet>;
1964
1965 #[unsafe(method(URLPasswordAllowedCharacterSet))]
1966 #[unsafe(method_family = none)]
1967 pub unsafe fn URLPasswordAllowedCharacterSet() -> Retained<NSCharacterSet>;
1968
1969 #[unsafe(method(URLHostAllowedCharacterSet))]
1970 #[unsafe(method_family = none)]
1971 pub unsafe fn URLHostAllowedCharacterSet() -> Retained<NSCharacterSet>;
1972
1973 #[unsafe(method(URLPathAllowedCharacterSet))]
1974 #[unsafe(method_family = none)]
1975 pub unsafe fn URLPathAllowedCharacterSet() -> Retained<NSCharacterSet>;
1976
1977 #[unsafe(method(URLQueryAllowedCharacterSet))]
1978 #[unsafe(method_family = none)]
1979 pub unsafe fn URLQueryAllowedCharacterSet() -> Retained<NSCharacterSet>;
1980
1981 #[unsafe(method(URLFragmentAllowedCharacterSet))]
1982 #[unsafe(method_family = none)]
1983 pub unsafe fn URLFragmentAllowedCharacterSet() -> Retained<NSCharacterSet>;
1984 );
1985}
1986
1987#[cfg(feature = "NSString")]
1989impl NSString {
1990 extern_methods!(
1991 #[cfg(feature = "NSCharacterSet")]
1992 #[unsafe(method(stringByAddingPercentEncodingWithAllowedCharacters:))]
1993 #[unsafe(method_family = none)]
1994 pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters(
1995 &self,
1996 allowed_characters: &NSCharacterSet,
1997 ) -> Option<Retained<NSString>>;
1998
1999 #[unsafe(method(stringByRemovingPercentEncoding))]
2000 #[unsafe(method_family = none)]
2001 pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option<Retained<NSString>>;
2002
2003 #[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."]
2004 #[unsafe(method(stringByAddingPercentEscapesUsingEncoding:))]
2005 #[unsafe(method_family = none)]
2006 pub unsafe fn stringByAddingPercentEscapesUsingEncoding(
2007 &self,
2008 enc: NSStringEncoding,
2009 ) -> Option<Retained<NSString>>;
2010
2011 #[deprecated = "Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding."]
2012 #[unsafe(method(stringByReplacingPercentEscapesUsingEncoding:))]
2013 #[unsafe(method_family = none)]
2014 pub unsafe fn stringByReplacingPercentEscapesUsingEncoding(
2015 &self,
2016 enc: NSStringEncoding,
2017 ) -> Option<Retained<NSString>>;
2018 );
2019}
2020
2021impl NSURL {
2023 extern_methods!(
2024 #[cfg(all(feature = "NSArray", feature = "NSString"))]
2025 #[unsafe(method(fileURLWithPathComponents:))]
2026 #[unsafe(method_family = none)]
2027 pub unsafe fn fileURLWithPathComponents(
2028 components: &NSArray<NSString>,
2029 ) -> Option<Retained<NSURL>>;
2030
2031 #[cfg(all(feature = "NSArray", feature = "NSString"))]
2032 #[unsafe(method(pathComponents))]
2033 #[unsafe(method_family = none)]
2034 pub unsafe fn pathComponents(&self) -> Option<Retained<NSArray<NSString>>>;
2035
2036 #[cfg(feature = "NSString")]
2037 #[unsafe(method(lastPathComponent))]
2038 #[unsafe(method_family = none)]
2039 pub unsafe fn lastPathComponent(&self) -> Option<Retained<NSString>>;
2040
2041 #[cfg(feature = "NSString")]
2042 #[unsafe(method(pathExtension))]
2043 #[unsafe(method_family = none)]
2044 pub unsafe fn pathExtension(&self) -> Option<Retained<NSString>>;
2045
2046 #[cfg(feature = "NSString")]
2047 #[unsafe(method(URLByAppendingPathComponent:))]
2048 #[unsafe(method_family = none)]
2049 pub unsafe fn URLByAppendingPathComponent(
2050 &self,
2051 path_component: &NSString,
2052 ) -> Option<Retained<NSURL>>;
2053
2054 #[cfg(feature = "NSString")]
2055 #[unsafe(method(URLByAppendingPathComponent:isDirectory:))]
2056 #[unsafe(method_family = none)]
2057 pub unsafe fn URLByAppendingPathComponent_isDirectory(
2058 &self,
2059 path_component: &NSString,
2060 is_directory: bool,
2061 ) -> Option<Retained<NSURL>>;
2062
2063 #[unsafe(method(URLByDeletingLastPathComponent))]
2064 #[unsafe(method_family = none)]
2065 pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option<Retained<NSURL>>;
2066
2067 #[cfg(feature = "NSString")]
2068 #[unsafe(method(URLByAppendingPathExtension:))]
2069 #[unsafe(method_family = none)]
2070 pub unsafe fn URLByAppendingPathExtension(
2071 &self,
2072 path_extension: &NSString,
2073 ) -> Option<Retained<NSURL>>;
2074
2075 #[unsafe(method(URLByDeletingPathExtension))]
2076 #[unsafe(method_family = none)]
2077 pub unsafe fn URLByDeletingPathExtension(&self) -> Option<Retained<NSURL>>;
2078
2079 #[cfg(feature = "NSError")]
2080 #[unsafe(method(checkResourceIsReachableAndReturnError:_))]
2081 #[unsafe(method_family = none)]
2082 pub unsafe fn checkResourceIsReachableAndReturnError(
2083 &self,
2084 ) -> Result<(), Retained<NSError>>;
2085
2086 #[unsafe(method(URLByStandardizingPath))]
2087 #[unsafe(method_family = none)]
2088 pub unsafe fn URLByStandardizingPath(&self) -> Option<Retained<NSURL>>;
2089
2090 #[unsafe(method(URLByResolvingSymlinksInPath))]
2091 #[unsafe(method_family = none)]
2092 pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option<Retained<NSURL>>;
2093 );
2094}
2095
2096extern_class!(
2097 #[unsafe(super(NSObject))]
2099 #[derive(Debug, PartialEq, Eq, Hash)]
2100 pub struct NSFileSecurity;
2101);
2102
2103#[cfg(feature = "NSObject")]
2104extern_conformance!(
2105 unsafe impl NSCoding for NSFileSecurity {}
2106);
2107
2108#[cfg(feature = "NSObject")]
2109extern_conformance!(
2110 unsafe impl NSCopying for NSFileSecurity {}
2111);
2112
2113#[cfg(feature = "NSObject")]
2114unsafe impl CopyingHelper for NSFileSecurity {
2115 type Result = Self;
2116}
2117
2118extern_conformance!(
2119 unsafe impl NSObjectProtocol for NSFileSecurity {}
2120);
2121
2122#[cfg(feature = "NSObject")]
2123extern_conformance!(
2124 unsafe impl NSSecureCoding for NSFileSecurity {}
2125);
2126
2127impl NSFileSecurity {
2128 extern_methods!(
2129 #[cfg(feature = "NSCoder")]
2130 #[unsafe(method(initWithCoder:))]
2131 #[unsafe(method_family = init)]
2132 pub unsafe fn initWithCoder(
2133 this: Allocated<Self>,
2134 coder: &NSCoder,
2135 ) -> Option<Retained<Self>>;
2136 );
2137}
2138
2139impl NSFileSecurity {
2141 extern_methods!(
2142 #[unsafe(method(init))]
2143 #[unsafe(method_family = init)]
2144 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2145
2146 #[unsafe(method(new))]
2147 #[unsafe(method_family = new)]
2148 pub unsafe fn new() -> Retained<Self>;
2149 );
2150}
2151
2152impl NSURL {
2154 extern_methods!(
2155 #[cfg(feature = "NSData")]
2156 #[deprecated = "Use NSURLConnection instead"]
2157 #[unsafe(method(resourceDataUsingCache:))]
2158 #[unsafe(method_family = none)]
2159 pub unsafe fn resourceDataUsingCache(
2160 &self,
2161 should_use_cache: bool,
2162 ) -> Option<Retained<NSData>>;
2163
2164 #[deprecated = "Use NSURLConnection instead"]
2165 #[unsafe(method(loadResourceDataNotifyingClient:usingCache:))]
2166 #[unsafe(method_family = none)]
2167 pub unsafe fn loadResourceDataNotifyingClient_usingCache(
2168 &self,
2169 client: &AnyObject,
2170 should_use_cache: bool,
2171 );
2172
2173 #[cfg(feature = "NSString")]
2174 #[deprecated = "Use NSURLConnection instead"]
2175 #[unsafe(method(propertyForKey:))]
2176 #[unsafe(method_family = none)]
2177 pub unsafe fn propertyForKey(&self, property_key: &NSString)
2178 -> Option<Retained<AnyObject>>;
2179
2180 #[cfg(feature = "NSData")]
2181 #[deprecated = "Use NSURLConnection instead"]
2182 #[unsafe(method(setResourceData:))]
2183 #[unsafe(method_family = none)]
2184 pub unsafe fn setResourceData(&self, data: &NSData) -> bool;
2185
2186 #[cfg(feature = "NSString")]
2187 #[deprecated = "Use NSURLConnection instead"]
2188 #[unsafe(method(setProperty:forKey:))]
2189 #[unsafe(method_family = none)]
2190 pub unsafe fn setProperty_forKey(
2191 &self,
2192 property: &AnyObject,
2193 property_key: &NSString,
2194 ) -> bool;
2195
2196 #[cfg(feature = "NSURLHandle")]
2197 #[deprecated = "Use NSURLConnection instead"]
2198 #[unsafe(method(URLHandleUsingCache:))]
2199 #[unsafe(method_family = none)]
2200 pub unsafe fn URLHandleUsingCache(
2201 &self,
2202 should_use_cache: bool,
2203 ) -> Option<Retained<NSURLHandle>>;
2204 );
2205}