objc2_foundation/generated/
NSURL.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlresourcekey?language=objc)
10// NS_TYPED_EXTENSIBLE_ENUM
11#[cfg(feature = "NSString")]
12pub type NSURLResourceKey = NSString;
13
14extern "C" {
15    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfilescheme?language=objc)
16    #[cfg(feature = "NSString")]
17    pub static NSURLFileScheme: &'static NSString;
18}
19
20extern "C" {
21    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlkeysofunsetvalueskey?language=objc)
22    #[cfg(feature = "NSString")]
23    pub static NSURLKeysOfUnsetValuesKey: &'static NSURLResourceKey;
24}
25
26extern "C" {
27    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlnamekey?language=objc)
28    #[cfg(feature = "NSString")]
29    pub static NSURLNameKey: &'static NSURLResourceKey;
30}
31
32extern "C" {
33    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurllocalizednamekey?language=objc)
34    #[cfg(feature = "NSString")]
35    pub static NSURLLocalizedNameKey: &'static NSURLResourceKey;
36}
37
38extern "C" {
39    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisregularfilekey?language=objc)
40    #[cfg(feature = "NSString")]
41    pub static NSURLIsRegularFileKey: &'static NSURLResourceKey;
42}
43
44extern "C" {
45    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisdirectorykey?language=objc)
46    #[cfg(feature = "NSString")]
47    pub static NSURLIsDirectoryKey: &'static NSURLResourceKey;
48}
49
50extern "C" {
51    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlissymboliclinkkey?language=objc)
52    #[cfg(feature = "NSString")]
53    pub static NSURLIsSymbolicLinkKey: &'static NSURLResourceKey;
54}
55
56extern "C" {
57    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisvolumekey?language=objc)
58    #[cfg(feature = "NSString")]
59    pub static NSURLIsVolumeKey: &'static NSURLResourceKey;
60}
61
62extern "C" {
63    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlispackagekey?language=objc)
64    #[cfg(feature = "NSString")]
65    pub static NSURLIsPackageKey: &'static NSURLResourceKey;
66}
67
68extern "C" {
69    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisapplicationkey?language=objc)
70    #[cfg(feature = "NSString")]
71    pub static NSURLIsApplicationKey: &'static NSURLResourceKey;
72}
73
74extern "C" {
75    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlapplicationisscriptablekey?language=objc)
76    #[cfg(feature = "NSString")]
77    pub static NSURLApplicationIsScriptableKey: &'static NSURLResourceKey;
78}
79
80extern "C" {
81    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlissystemimmutablekey?language=objc)
82    #[cfg(feature = "NSString")]
83    pub static NSURLIsSystemImmutableKey: &'static NSURLResourceKey;
84}
85
86extern "C" {
87    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisuserimmutablekey?language=objc)
88    #[cfg(feature = "NSString")]
89    pub static NSURLIsUserImmutableKey: &'static NSURLResourceKey;
90}
91
92extern "C" {
93    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlishiddenkey?language=objc)
94    #[cfg(feature = "NSString")]
95    pub static NSURLIsHiddenKey: &'static NSURLResourceKey;
96}
97
98extern "C" {
99    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlhashiddenextensionkey?language=objc)
100    #[cfg(feature = "NSString")]
101    pub static NSURLHasHiddenExtensionKey: &'static NSURLResourceKey;
102}
103
104extern "C" {
105    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlcreationdatekey?language=objc)
106    #[cfg(feature = "NSString")]
107    pub static NSURLCreationDateKey: &'static NSURLResourceKey;
108}
109
110extern "C" {
111    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlcontentaccessdatekey?language=objc)
112    #[cfg(feature = "NSString")]
113    pub static NSURLContentAccessDateKey: &'static NSURLResourceKey;
114}
115
116extern "C" {
117    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlcontentmodificationdatekey?language=objc)
118    #[cfg(feature = "NSString")]
119    pub static NSURLContentModificationDateKey: &'static NSURLResourceKey;
120}
121
122extern "C" {
123    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlattributemodificationdatekey?language=objc)
124    #[cfg(feature = "NSString")]
125    pub static NSURLAttributeModificationDateKey: &'static NSURLResourceKey;
126}
127
128extern "C" {
129    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurllinkcountkey?language=objc)
130    #[cfg(feature = "NSString")]
131    pub static NSURLLinkCountKey: &'static NSURLResourceKey;
132}
133
134extern "C" {
135    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlparentdirectoryurlkey?language=objc)
136    #[cfg(feature = "NSString")]
137    pub static NSURLParentDirectoryURLKey: &'static NSURLResourceKey;
138}
139
140extern "C" {
141    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeurlkey?language=objc)
142    #[cfg(feature = "NSString")]
143    pub static NSURLVolumeURLKey: &'static NSURLResourceKey;
144}
145
146extern "C" {
147    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurltypeidentifierkey?language=objc)
148    #[cfg(feature = "NSString")]
149    pub static NSURLTypeIdentifierKey: &'static NSURLResourceKey;
150}
151
152extern "C" {
153    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlcontenttypekey?language=objc)
154    #[cfg(feature = "NSString")]
155    pub static NSURLContentTypeKey: &'static NSURLResourceKey;
156}
157
158extern "C" {
159    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurllocalizedtypedescriptionkey?language=objc)
160    #[cfg(feature = "NSString")]
161    pub static NSURLLocalizedTypeDescriptionKey: &'static NSURLResourceKey;
162}
163
164extern "C" {
165    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurllabelnumberkey?language=objc)
166    #[cfg(feature = "NSString")]
167    pub static NSURLLabelNumberKey: &'static NSURLResourceKey;
168}
169
170extern "C" {
171    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurllabelcolorkey?language=objc)
172    #[cfg(feature = "NSString")]
173    pub static NSURLLabelColorKey: &'static NSURLResourceKey;
174}
175
176extern "C" {
177    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurllocalizedlabelkey?language=objc)
178    #[cfg(feature = "NSString")]
179    pub static NSURLLocalizedLabelKey: &'static NSURLResourceKey;
180}
181
182extern "C" {
183    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurleffectiveiconkey?language=objc)
184    #[cfg(feature = "NSString")]
185    pub static NSURLEffectiveIconKey: &'static NSURLResourceKey;
186}
187
188extern "C" {
189    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlcustomiconkey?language=objc)
190    #[cfg(feature = "NSString")]
191    pub static NSURLCustomIconKey: &'static NSURLResourceKey;
192}
193
194extern "C" {
195    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourceidentifierkey?language=objc)
196    #[cfg(feature = "NSString")]
197    pub static NSURLFileResourceIdentifierKey: &'static NSURLResourceKey;
198}
199
200extern "C" {
201    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeidentifierkey?language=objc)
202    #[cfg(feature = "NSString")]
203    pub static NSURLVolumeIdentifierKey: &'static NSURLResourceKey;
204}
205
206extern "C" {
207    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlpreferredioblocksizekey?language=objc)
208    #[cfg(feature = "NSString")]
209    pub static NSURLPreferredIOBlockSizeKey: &'static NSURLResourceKey;
210}
211
212extern "C" {
213    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisreadablekey?language=objc)
214    #[cfg(feature = "NSString")]
215    pub static NSURLIsReadableKey: &'static NSURLResourceKey;
216}
217
218extern "C" {
219    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurliswritablekey?language=objc)
220    #[cfg(feature = "NSString")]
221    pub static NSURLIsWritableKey: &'static NSURLResourceKey;
222}
223
224extern "C" {
225    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisexecutablekey?language=objc)
226    #[cfg(feature = "NSString")]
227    pub static NSURLIsExecutableKey: &'static NSURLResourceKey;
228}
229
230extern "C" {
231    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfilesecuritykey?language=objc)
232    #[cfg(feature = "NSString")]
233    pub static NSURLFileSecurityKey: &'static NSURLResourceKey;
234}
235
236extern "C" {
237    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisexcludedfrombackupkey?language=objc)
238    #[cfg(feature = "NSString")]
239    pub static NSURLIsExcludedFromBackupKey: &'static NSURLResourceKey;
240}
241
242extern "C" {
243    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurltagnameskey?language=objc)
244    #[cfg(feature = "NSString")]
245    pub static NSURLTagNamesKey: &'static NSURLResourceKey;
246}
247
248extern "C" {
249    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlpathkey?language=objc)
250    #[cfg(feature = "NSString")]
251    pub static NSURLPathKey: &'static NSURLResourceKey;
252}
253
254extern "C" {
255    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlcanonicalpathkey?language=objc)
256    #[cfg(feature = "NSString")]
257    pub static NSURLCanonicalPathKey: &'static NSURLResourceKey;
258}
259
260extern "C" {
261    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlismounttriggerkey?language=objc)
262    #[cfg(feature = "NSString")]
263    pub static NSURLIsMountTriggerKey: &'static NSURLResourceKey;
264}
265
266extern "C" {
267    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlgenerationidentifierkey?language=objc)
268    #[cfg(feature = "NSString")]
269    pub static NSURLGenerationIdentifierKey: &'static NSURLResourceKey;
270}
271
272extern "C" {
273    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurldocumentidentifierkey?language=objc)
274    #[cfg(feature = "NSString")]
275    pub static NSURLDocumentIdentifierKey: &'static NSURLResourceKey;
276}
277
278extern "C" {
279    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurladdedtodirectorydatekey?language=objc)
280    #[cfg(feature = "NSString")]
281    pub static NSURLAddedToDirectoryDateKey: &'static NSURLResourceKey;
282}
283
284extern "C" {
285    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlquarantinepropertieskey?language=objc)
286    #[cfg(feature = "NSString")]
287    pub static NSURLQuarantinePropertiesKey: &'static NSURLResourceKey;
288}
289
290extern "C" {
291    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetypekey?language=objc)
292    #[cfg(feature = "NSString")]
293    pub static NSURLFileResourceTypeKey: &'static NSURLResourceKey;
294}
295
296extern "C" {
297    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileidentifierkey?language=objc)
298    #[cfg(feature = "NSString")]
299    pub static NSURLFileIdentifierKey: &'static NSURLResourceKey;
300}
301
302extern "C" {
303    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfilecontentidentifierkey?language=objc)
304    #[cfg(feature = "NSString")]
305    pub static NSURLFileContentIdentifierKey: &'static NSURLResourceKey;
306}
307
308extern "C" {
309    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlmaysharefilecontentkey?language=objc)
310    #[cfg(feature = "NSString")]
311    pub static NSURLMayShareFileContentKey: &'static NSURLResourceKey;
312}
313
314extern "C" {
315    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlmayhaveextendedattributeskey?language=objc)
316    #[cfg(feature = "NSString")]
317    pub static NSURLMayHaveExtendedAttributesKey: &'static NSURLResourceKey;
318}
319
320extern "C" {
321    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlispurgeablekey?language=objc)
322    #[cfg(feature = "NSString")]
323    pub static NSURLIsPurgeableKey: &'static NSURLResourceKey;
324}
325
326extern "C" {
327    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlissparsekey?language=objc)
328    #[cfg(feature = "NSString")]
329    pub static NSURLIsSparseKey: &'static NSURLResourceKey;
330}
331
332/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetype?language=objc)
333// NS_TYPED_ENUM
334#[cfg(feature = "NSString")]
335pub type NSURLFileResourceType = NSString;
336
337extern "C" {
338    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetypenamedpipe?language=objc)
339    #[cfg(feature = "NSString")]
340    pub static NSURLFileResourceTypeNamedPipe: &'static NSURLFileResourceType;
341}
342
343extern "C" {
344    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetypecharacterspecial?language=objc)
345    #[cfg(feature = "NSString")]
346    pub static NSURLFileResourceTypeCharacterSpecial: &'static NSURLFileResourceType;
347}
348
349extern "C" {
350    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetypedirectory?language=objc)
351    #[cfg(feature = "NSString")]
352    pub static NSURLFileResourceTypeDirectory: &'static NSURLFileResourceType;
353}
354
355extern "C" {
356    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetypeblockspecial?language=objc)
357    #[cfg(feature = "NSString")]
358    pub static NSURLFileResourceTypeBlockSpecial: &'static NSURLFileResourceType;
359}
360
361extern "C" {
362    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetyperegular?language=objc)
363    #[cfg(feature = "NSString")]
364    pub static NSURLFileResourceTypeRegular: &'static NSURLFileResourceType;
365}
366
367extern "C" {
368    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetypesymboliclink?language=objc)
369    #[cfg(feature = "NSString")]
370    pub static NSURLFileResourceTypeSymbolicLink: &'static NSURLFileResourceType;
371}
372
373extern "C" {
374    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetypesocket?language=objc)
375    #[cfg(feature = "NSString")]
376    pub static NSURLFileResourceTypeSocket: &'static NSURLFileResourceType;
377}
378
379extern "C" {
380    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileresourcetypeunknown?language=objc)
381    #[cfg(feature = "NSString")]
382    pub static NSURLFileResourceTypeUnknown: &'static NSURLFileResourceType;
383}
384
385extern "C" {
386    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlthumbnaildictionarykey?language=objc)
387    #[cfg(feature = "NSString")]
388    pub static NSURLThumbnailDictionaryKey: &'static NSURLResourceKey;
389}
390
391extern "C" {
392    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlthumbnailkey?language=objc)
393    #[cfg(feature = "NSString")]
394    pub static NSURLThumbnailKey: &'static NSURLResourceKey;
395}
396
397/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlthumbnaildictionaryitem?language=objc)
398// NS_TYPED_EXTENSIBLE_ENUM
399#[cfg(feature = "NSString")]
400pub type NSURLThumbnailDictionaryItem = NSString;
401
402extern "C" {
403    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsthumbnail1024x1024sizekey?language=objc)
404    #[cfg(feature = "NSString")]
405    pub static NSThumbnail1024x1024SizeKey: &'static NSURLThumbnailDictionaryItem;
406}
407
408extern "C" {
409    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfilesizekey?language=objc)
410    #[cfg(feature = "NSString")]
411    pub static NSURLFileSizeKey: &'static NSURLResourceKey;
412}
413
414extern "C" {
415    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileallocatedsizekey?language=objc)
416    #[cfg(feature = "NSString")]
417    pub static NSURLFileAllocatedSizeKey: &'static NSURLResourceKey;
418}
419
420extern "C" {
421    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurltotalfilesizekey?language=objc)
422    #[cfg(feature = "NSString")]
423    pub static NSURLTotalFileSizeKey: &'static NSURLResourceKey;
424}
425
426extern "C" {
427    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurltotalfileallocatedsizekey?language=objc)
428    #[cfg(feature = "NSString")]
429    pub static NSURLTotalFileAllocatedSizeKey: &'static NSURLResourceKey;
430}
431
432extern "C" {
433    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisaliasfilekey?language=objc)
434    #[cfg(feature = "NSString")]
435    pub static NSURLIsAliasFileKey: &'static NSURLResourceKey;
436}
437
438extern "C" {
439    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileprotectionkey?language=objc)
440    #[cfg(feature = "NSString")]
441    pub static NSURLFileProtectionKey: &'static NSURLResourceKey;
442}
443
444/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileprotectiontype?language=objc)
445// NS_TYPED_ENUM
446#[cfg(feature = "NSString")]
447pub type NSURLFileProtectionType = NSString;
448
449extern "C" {
450    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileprotectionnone?language=objc)
451    #[cfg(feature = "NSString")]
452    pub static NSURLFileProtectionNone: &'static NSURLFileProtectionType;
453}
454
455extern "C" {
456    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileprotectioncomplete?language=objc)
457    #[cfg(feature = "NSString")]
458    pub static NSURLFileProtectionComplete: &'static NSURLFileProtectionType;
459}
460
461extern "C" {
462    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileprotectioncompleteunlessopen?language=objc)
463    #[cfg(feature = "NSString")]
464    pub static NSURLFileProtectionCompleteUnlessOpen: &'static NSURLFileProtectionType;
465}
466
467extern "C" {
468    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileprotectioncompleteuntilfirstuserauthentication?language=objc)
469    #[cfg(feature = "NSString")]
470    pub static NSURLFileProtectionCompleteUntilFirstUserAuthentication:
471        &'static NSURLFileProtectionType;
472}
473
474extern "C" {
475    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlfileprotectioncompletewhenuserinactive?language=objc)
476    #[cfg(feature = "NSString")]
477    pub static NSURLFileProtectionCompleteWhenUserInactive: &'static NSURLFileProtectionType;
478}
479
480extern "C" {
481    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurldirectoryentrycountkey?language=objc)
482    #[cfg(feature = "NSString")]
483    pub static NSURLDirectoryEntryCountKey: &'static NSURLResourceKey;
484}
485
486extern "C" {
487    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumelocalizedformatdescriptionkey?language=objc)
488    #[cfg(feature = "NSString")]
489    pub static NSURLVolumeLocalizedFormatDescriptionKey: &'static NSURLResourceKey;
490}
491
492extern "C" {
493    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumetotalcapacitykey?language=objc)
494    #[cfg(feature = "NSString")]
495    pub static NSURLVolumeTotalCapacityKey: &'static NSURLResourceKey;
496}
497
498extern "C" {
499    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeavailablecapacitykey?language=objc)
500    #[cfg(feature = "NSString")]
501    pub static NSURLVolumeAvailableCapacityKey: &'static NSURLResourceKey;
502}
503
504extern "C" {
505    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeresourcecountkey?language=objc)
506    #[cfg(feature = "NSString")]
507    pub static NSURLVolumeResourceCountKey: &'static NSURLResourceKey;
508}
509
510extern "C" {
511    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportspersistentidskey?language=objc)
512    #[cfg(feature = "NSString")]
513    pub static NSURLVolumeSupportsPersistentIDsKey: &'static NSURLResourceKey;
514}
515
516extern "C" {
517    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportssymboliclinkskey?language=objc)
518    #[cfg(feature = "NSString")]
519    pub static NSURLVolumeSupportsSymbolicLinksKey: &'static NSURLResourceKey;
520}
521
522extern "C" {
523    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportshardlinkskey?language=objc)
524    #[cfg(feature = "NSString")]
525    pub static NSURLVolumeSupportsHardLinksKey: &'static NSURLResourceKey;
526}
527
528extern "C" {
529    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsjournalingkey?language=objc)
530    #[cfg(feature = "NSString")]
531    pub static NSURLVolumeSupportsJournalingKey: &'static NSURLResourceKey;
532}
533
534extern "C" {
535    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeisjournalingkey?language=objc)
536    #[cfg(feature = "NSString")]
537    pub static NSURLVolumeIsJournalingKey: &'static NSURLResourceKey;
538}
539
540extern "C" {
541    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportssparsefileskey?language=objc)
542    #[cfg(feature = "NSString")]
543    pub static NSURLVolumeSupportsSparseFilesKey: &'static NSURLResourceKey;
544}
545
546extern "C" {
547    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportszerorunskey?language=objc)
548    #[cfg(feature = "NSString")]
549    pub static NSURLVolumeSupportsZeroRunsKey: &'static NSURLResourceKey;
550}
551
552extern "C" {
553    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportscasesensitivenameskey?language=objc)
554    #[cfg(feature = "NSString")]
555    pub static NSURLVolumeSupportsCaseSensitiveNamesKey: &'static NSURLResourceKey;
556}
557
558extern "C" {
559    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportscasepreservednameskey?language=objc)
560    #[cfg(feature = "NSString")]
561    pub static NSURLVolumeSupportsCasePreservedNamesKey: &'static NSURLResourceKey;
562}
563
564extern "C" {
565    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsrootdirectorydateskey?language=objc)
566    #[cfg(feature = "NSString")]
567    pub static NSURLVolumeSupportsRootDirectoryDatesKey: &'static NSURLResourceKey;
568}
569
570extern "C" {
571    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsvolumesizeskey?language=objc)
572    #[cfg(feature = "NSString")]
573    pub static NSURLVolumeSupportsVolumeSizesKey: &'static NSURLResourceKey;
574}
575
576extern "C" {
577    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsrenamingkey?language=objc)
578    #[cfg(feature = "NSString")]
579    pub static NSURLVolumeSupportsRenamingKey: &'static NSURLResourceKey;
580}
581
582extern "C" {
583    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsadvisoryfilelockingkey?language=objc)
584    #[cfg(feature = "NSString")]
585    pub static NSURLVolumeSupportsAdvisoryFileLockingKey: &'static NSURLResourceKey;
586}
587
588extern "C" {
589    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsextendedsecuritykey?language=objc)
590    #[cfg(feature = "NSString")]
591    pub static NSURLVolumeSupportsExtendedSecurityKey: &'static NSURLResourceKey;
592}
593
594extern "C" {
595    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeisbrowsablekey?language=objc)
596    #[cfg(feature = "NSString")]
597    pub static NSURLVolumeIsBrowsableKey: &'static NSURLResourceKey;
598}
599
600extern "C" {
601    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumemaximumfilesizekey?language=objc)
602    #[cfg(feature = "NSString")]
603    pub static NSURLVolumeMaximumFileSizeKey: &'static NSURLResourceKey;
604}
605
606extern "C" {
607    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeisejectablekey?language=objc)
608    #[cfg(feature = "NSString")]
609    pub static NSURLVolumeIsEjectableKey: &'static NSURLResourceKey;
610}
611
612extern "C" {
613    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeisremovablekey?language=objc)
614    #[cfg(feature = "NSString")]
615    pub static NSURLVolumeIsRemovableKey: &'static NSURLResourceKey;
616}
617
618extern "C" {
619    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeisinternalkey?language=objc)
620    #[cfg(feature = "NSString")]
621    pub static NSURLVolumeIsInternalKey: &'static NSURLResourceKey;
622}
623
624extern "C" {
625    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeisautomountedkey?language=objc)
626    #[cfg(feature = "NSString")]
627    pub static NSURLVolumeIsAutomountedKey: &'static NSURLResourceKey;
628}
629
630extern "C" {
631    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeislocalkey?language=objc)
632    #[cfg(feature = "NSString")]
633    pub static NSURLVolumeIsLocalKey: &'static NSURLResourceKey;
634}
635
636extern "C" {
637    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeisreadonlykey?language=objc)
638    #[cfg(feature = "NSString")]
639    pub static NSURLVolumeIsReadOnlyKey: &'static NSURLResourceKey;
640}
641
642extern "C" {
643    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumecreationdatekey?language=objc)
644    #[cfg(feature = "NSString")]
645    pub static NSURLVolumeCreationDateKey: &'static NSURLResourceKey;
646}
647
648extern "C" {
649    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeurlforremountingkey?language=objc)
650    #[cfg(feature = "NSString")]
651    pub static NSURLVolumeURLForRemountingKey: &'static NSURLResourceKey;
652}
653
654extern "C" {
655    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeuuidstringkey?language=objc)
656    #[cfg(feature = "NSString")]
657    pub static NSURLVolumeUUIDStringKey: &'static NSURLResourceKey;
658}
659
660extern "C" {
661    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumenamekey?language=objc)
662    #[cfg(feature = "NSString")]
663    pub static NSURLVolumeNameKey: &'static NSURLResourceKey;
664}
665
666extern "C" {
667    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumelocalizednamekey?language=objc)
668    #[cfg(feature = "NSString")]
669    pub static NSURLVolumeLocalizedNameKey: &'static NSURLResourceKey;
670}
671
672extern "C" {
673    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeisencryptedkey?language=objc)
674    #[cfg(feature = "NSString")]
675    pub static NSURLVolumeIsEncryptedKey: &'static NSURLResourceKey;
676}
677
678extern "C" {
679    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeisrootfilesystemkey?language=objc)
680    #[cfg(feature = "NSString")]
681    pub static NSURLVolumeIsRootFileSystemKey: &'static NSURLResourceKey;
682}
683
684extern "C" {
685    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportscompressionkey?language=objc)
686    #[cfg(feature = "NSString")]
687    pub static NSURLVolumeSupportsCompressionKey: &'static NSURLResourceKey;
688}
689
690extern "C" {
691    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsfilecloningkey?language=objc)
692    #[cfg(feature = "NSString")]
693    pub static NSURLVolumeSupportsFileCloningKey: &'static NSURLResourceKey;
694}
695
696extern "C" {
697    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsswaprenamingkey?language=objc)
698    #[cfg(feature = "NSString")]
699    pub static NSURLVolumeSupportsSwapRenamingKey: &'static NSURLResourceKey;
700}
701
702extern "C" {
703    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsexclusiverenamingkey?language=objc)
704    #[cfg(feature = "NSString")]
705    pub static NSURLVolumeSupportsExclusiveRenamingKey: &'static NSURLResourceKey;
706}
707
708extern "C" {
709    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsimmutablefileskey?language=objc)
710    #[cfg(feature = "NSString")]
711    pub static NSURLVolumeSupportsImmutableFilesKey: &'static NSURLResourceKey;
712}
713
714extern "C" {
715    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsaccesspermissionskey?language=objc)
716    #[cfg(feature = "NSString")]
717    pub static NSURLVolumeSupportsAccessPermissionsKey: &'static NSURLResourceKey;
718}
719
720extern "C" {
721    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesupportsfileprotectionkey?language=objc)
722    #[cfg(feature = "NSString")]
723    pub static NSURLVolumeSupportsFileProtectionKey: &'static NSURLResourceKey;
724}
725
726extern "C" {
727    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeavailablecapacityforimportantusagekey?language=objc)
728    #[cfg(feature = "NSString")]
729    pub static NSURLVolumeAvailableCapacityForImportantUsageKey: &'static NSURLResourceKey;
730}
731
732extern "C" {
733    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumeavailablecapacityforopportunisticusagekey?language=objc)
734    #[cfg(feature = "NSString")]
735    pub static NSURLVolumeAvailableCapacityForOpportunisticUsageKey: &'static NSURLResourceKey;
736}
737
738extern "C" {
739    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumetypenamekey?language=objc)
740    #[cfg(feature = "NSString")]
741    pub static NSURLVolumeTypeNameKey: &'static NSURLResourceKey;
742}
743
744extern "C" {
745    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumesubtypekey?language=objc)
746    #[cfg(feature = "NSString")]
747    pub static NSURLVolumeSubtypeKey: &'static NSURLResourceKey;
748}
749
750extern "C" {
751    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlvolumemountfromlocationkey?language=objc)
752    #[cfg(feature = "NSString")]
753    pub static NSURLVolumeMountFromLocationKey: &'static NSURLResourceKey;
754}
755
756extern "C" {
757    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlisubiquitousitemkey?language=objc)
758    #[cfg(feature = "NSString")]
759    pub static NSURLIsUbiquitousItemKey: &'static NSURLResourceKey;
760}
761
762extern "C" {
763    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemhasunresolvedconflictskey?language=objc)
764    #[cfg(feature = "NSString")]
765    pub static NSURLUbiquitousItemHasUnresolvedConflictsKey: &'static NSURLResourceKey;
766}
767
768extern "C" {
769    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemisdownloadedkey?language=objc)
770    #[cfg(feature = "NSString")]
771    pub static NSURLUbiquitousItemIsDownloadedKey: &'static NSURLResourceKey;
772}
773
774extern "C" {
775    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemisdownloadingkey?language=objc)
776    #[cfg(feature = "NSString")]
777    pub static NSURLUbiquitousItemIsDownloadingKey: &'static NSURLResourceKey;
778}
779
780extern "C" {
781    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemisuploadedkey?language=objc)
782    #[cfg(feature = "NSString")]
783    pub static NSURLUbiquitousItemIsUploadedKey: &'static NSURLResourceKey;
784}
785
786extern "C" {
787    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemisuploadingkey?language=objc)
788    #[cfg(feature = "NSString")]
789    pub static NSURLUbiquitousItemIsUploadingKey: &'static NSURLResourceKey;
790}
791
792extern "C" {
793    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitempercentdownloadedkey?language=objc)
794    #[cfg(feature = "NSString")]
795    pub static NSURLUbiquitousItemPercentDownloadedKey: &'static NSURLResourceKey;
796}
797
798extern "C" {
799    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitempercentuploadedkey?language=objc)
800    #[cfg(feature = "NSString")]
801    pub static NSURLUbiquitousItemPercentUploadedKey: &'static NSURLResourceKey;
802}
803
804extern "C" {
805    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemdownloadingstatuskey?language=objc)
806    #[cfg(feature = "NSString")]
807    pub static NSURLUbiquitousItemDownloadingStatusKey: &'static NSURLResourceKey;
808}
809
810extern "C" {
811    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemdownloadingerrorkey?language=objc)
812    #[cfg(feature = "NSString")]
813    pub static NSURLUbiquitousItemDownloadingErrorKey: &'static NSURLResourceKey;
814}
815
816extern "C" {
817    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemuploadingerrorkey?language=objc)
818    #[cfg(feature = "NSString")]
819    pub static NSURLUbiquitousItemUploadingErrorKey: &'static NSURLResourceKey;
820}
821
822extern "C" {
823    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemdownloadrequestedkey?language=objc)
824    #[cfg(feature = "NSString")]
825    pub static NSURLUbiquitousItemDownloadRequestedKey: &'static NSURLResourceKey;
826}
827
828extern "C" {
829    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemcontainerdisplaynamekey?language=objc)
830    #[cfg(feature = "NSString")]
831    pub static NSURLUbiquitousItemContainerDisplayNameKey: &'static NSURLResourceKey;
832}
833
834extern "C" {
835    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemisexcludedfromsynckey?language=objc)
836    #[cfg(feature = "NSString")]
837    pub static NSURLUbiquitousItemIsExcludedFromSyncKey: &'static NSURLResourceKey;
838}
839
840extern "C" {
841    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemissharedkey?language=objc)
842    #[cfg(feature = "NSString")]
843    pub static NSURLUbiquitousItemIsSharedKey: &'static NSURLResourceKey;
844}
845
846extern "C" {
847    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditemcurrentuserrolekey?language=objc)
848    #[cfg(feature = "NSString")]
849    pub static NSURLUbiquitousSharedItemCurrentUserRoleKey: &'static NSURLResourceKey;
850}
851
852extern "C" {
853    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditemcurrentuserpermissionskey?language=objc)
854    #[cfg(feature = "NSString")]
855    pub static NSURLUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSURLResourceKey;
856}
857
858extern "C" {
859    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditemownernamecomponentskey?language=objc)
860    #[cfg(feature = "NSString")]
861    pub static NSURLUbiquitousSharedItemOwnerNameComponentsKey: &'static NSURLResourceKey;
862}
863
864extern "C" {
865    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditemmostrecenteditornamecomponentskey?language=objc)
866    #[cfg(feature = "NSString")]
867    pub static NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey:
868        &'static NSURLResourceKey;
869}
870
871/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemdownloadingstatus?language=objc)
872// NS_TYPED_ENUM
873#[cfg(feature = "NSString")]
874pub type NSURLUbiquitousItemDownloadingStatus = NSString;
875
876extern "C" {
877    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemdownloadingstatusnotdownloaded?language=objc)
878    #[cfg(feature = "NSString")]
879    pub static NSURLUbiquitousItemDownloadingStatusNotDownloaded:
880        &'static NSURLUbiquitousItemDownloadingStatus;
881}
882
883extern "C" {
884    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemdownloadingstatusdownloaded?language=objc)
885    #[cfg(feature = "NSString")]
886    pub static NSURLUbiquitousItemDownloadingStatusDownloaded:
887        &'static NSURLUbiquitousItemDownloadingStatus;
888}
889
890extern "C" {
891    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousitemdownloadingstatuscurrent?language=objc)
892    #[cfg(feature = "NSString")]
893    pub static NSURLUbiquitousItemDownloadingStatusCurrent:
894        &'static NSURLUbiquitousItemDownloadingStatus;
895}
896
897/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditemrole?language=objc)
898// NS_TYPED_ENUM
899#[cfg(feature = "NSString")]
900pub type NSURLUbiquitousSharedItemRole = NSString;
901
902extern "C" {
903    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditemroleowner?language=objc)
904    #[cfg(feature = "NSString")]
905    pub static NSURLUbiquitousSharedItemRoleOwner: &'static NSURLUbiquitousSharedItemRole;
906}
907
908extern "C" {
909    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditemroleparticipant?language=objc)
910    #[cfg(feature = "NSString")]
911    pub static NSURLUbiquitousSharedItemRoleParticipant: &'static NSURLUbiquitousSharedItemRole;
912}
913
914/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditempermissions?language=objc)
915// NS_TYPED_ENUM
916#[cfg(feature = "NSString")]
917pub type NSURLUbiquitousSharedItemPermissions = NSString;
918
919extern "C" {
920    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditempermissionsreadonly?language=objc)
921    #[cfg(feature = "NSString")]
922    pub static NSURLUbiquitousSharedItemPermissionsReadOnly:
923        &'static NSURLUbiquitousSharedItemPermissions;
924}
925
926extern "C" {
927    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlubiquitousshareditempermissionsreadwrite?language=objc)
928    #[cfg(feature = "NSString")]
929    pub static NSURLUbiquitousSharedItemPermissionsReadWrite:
930        &'static NSURLUbiquitousSharedItemPermissions;
931}
932
933/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlbookmarkcreationoptions?language=objc)
934// NS_OPTIONS
935#[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/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlbookmarkresolutionoptions?language=objc)
965// NS_OPTIONS
966#[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
990/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlbookmarkfilecreationoptions?language=objc)
991pub type NSURLBookmarkFileCreationOptions = NSUInteger;
992
993extern_class!(
994    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurl?language=objc)
995    #[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        /// Initializes an `NSURL` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters.
1152        /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned.
1153        /// If `encodingInvalidCharacters` is true, `NSURL` will try to encode the string to create a valid URL.
1154        /// If the URL string is still invalid after encoding, `nil` is returned.
1155        ///
1156        /// - Parameter URLString: The URL string.
1157        /// - Parameter encodingInvalidCharacters: True if `NSURL` should try to encode an invalid URL string, false otherwise.
1158        /// - Returns: An `NSURL` instance for a valid URL, or `nil` if the URL is invalid.
1159        #[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        /// Initializes and returns a newly created `NSURL` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters.
1169        /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned.
1170        /// If `encodingInvalidCharacters` is true, `NSURL` will try to encode the string to create a valid URL.
1171        /// If the URL string is still invalid after encoding, `nil` is returned.
1172        ///
1173        /// - Parameter URLString: The URL string.
1174        /// - Parameter encodingInvalidCharacters: True if `NSURL` should try to encode an invalid URL string, false otherwise.
1175        /// - Returns: An `NSURL` instance for a valid URL, or `nil` if the URL is invalid.
1176        #[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
1472/// Methods declared on superclass `NSObject`.
1473impl 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
1485/// NSPromisedItems.
1486impl 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
1519/// NSItemProvider.
1520impl 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    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlqueryitem?language=objc)
1536    #[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
1600/// Methods declared on superclass `NSObject`.
1601impl 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    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsurlcomponents?language=objc)
1615    #[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        /// Initializes an `NSURLComponents` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters.
1670        /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned.
1671        /// If `encodingInvalidCharacters` is true, `NSURLComponents` will try to encode the string to create a valid URL.
1672        /// If the URL string is still invalid after encoding, `nil` is returned.
1673        ///
1674        /// - Parameter URLString: The URL string.
1675        /// - Parameter encodingInvalidCharacters: True if `NSURLComponents` should try to encode an invalid URL string, false otherwise.
1676        /// - Returns: An `NSURLComponents` instance for a valid URL, or `nil` if the URL is invalid.
1677        #[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        /// Initializes and returns a newly created `NSURLComponents` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters.
1687        /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned.
1688        /// If `encodingInvalidCharacters` is true, `NSURLComponents` will try to encode the string to create a valid URL.
1689        /// If the URL string is still invalid after encoding, nil is returned.
1690        ///
1691        /// - Parameter URLString: The URL string.
1692        /// - Parameter encodingInvalidCharacters: True if `NSURLComponents` should try to encode an invalid URL string, false otherwise.
1693        /// - Returns: An `NSURLComponents` instance for a valid URL, or `nil` if the URL is invalid.
1694        #[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        /// Setter for [`scheme`][Self::scheme].
1721        #[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        /// Setter for [`user`][Self::user].
1732        #[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        /// Setter for [`password`][Self::password].
1743        #[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        /// Setter for [`host`][Self::host].
1754        #[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        /// Setter for [`port`][Self::port].
1765        #[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        /// Setter for [`path`][Self::path].
1776        #[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        /// Setter for [`query`][Self::query].
1787        #[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        /// Setter for [`fragment`][Self::fragment].
1798        #[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        /// Setter for [`percentEncodedUser`][Self::percentEncodedUser].
1809        #[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        /// Setter for [`percentEncodedPassword`][Self::percentEncodedPassword].
1820        #[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        /// Setter for [`percentEncodedHost`][Self::percentEncodedHost].
1832        #[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        /// Setter for [`percentEncodedPath`][Self::percentEncodedPath].
1844        #[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        /// Setter for [`percentEncodedQuery`][Self::percentEncodedQuery].
1855        #[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        /// Setter for [`percentEncodedFragment`][Self::percentEncodedFragment].
1866        #[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        /// Setter for [`encodedHost`][Self::encodedHost].
1877        #[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        /// Setter for [`queryItems`][Self::queryItems].
1928        #[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        /// Setter for [`percentEncodedQueryItems`][Self::percentEncodedQueryItems].
1939        #[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
1948/// Methods declared on superclass `NSObject`.
1949impl NSURLComponents {
1950    extern_methods!(
1951        #[unsafe(method(new))]
1952        #[unsafe(method_family = new)]
1953        pub unsafe fn new() -> Retained<Self>;
1954    );
1955}
1956
1957/// NSURLUtilities.
1958#[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/// NSURLUtilities.
1988#[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
2021/// NSURLPathUtilities.
2022impl 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    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfilesecurity?language=objc)
2098    #[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
2139/// Methods declared on superclass `NSObject`.
2140impl 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
2152/// NSURLLoading.
2153impl 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}