use objc2::__framework_prelude::*;
use crate::*;
#[cfg(feature = "NSString")]
pub type NSURLResourceKey = NSString;
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileScheme: &'static NSString;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLKeysOfUnsetValuesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLNameKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLLocalizedNameKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsRegularFileKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsDirectoryKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsSymbolicLinkKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsVolumeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsPackageKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsApplicationKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLApplicationIsScriptableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsSystemImmutableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsUserImmutableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsHiddenKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLHasHiddenExtensionKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLCreationDateKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLContentAccessDateKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLContentModificationDateKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLAttributeModificationDateKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLLinkCountKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLParentDirectoryURLKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeURLKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLTypeIdentifierKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLContentTypeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLLocalizedTypeDescriptionKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLLabelNumberKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLLabelColorKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLLocalizedLabelKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLEffectiveIconKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLCustomIconKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceIdentifierKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIdentifierKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLPreferredIOBlockSizeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsReadableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsWritableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsExecutableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileSecurityKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsExcludedFromBackupKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLTagNamesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLPathKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLCanonicalPathKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsMountTriggerKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLGenerationIdentifierKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLDocumentIdentifierKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLAddedToDirectoryDateKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLQuarantinePropertiesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceTypeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileIdentifierKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileContentIdentifierKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLMayShareFileContentKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLMayHaveExtendedAttributesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsPurgeableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsSparseKey: &'static NSURLResourceKey;
}
#[cfg(feature = "NSString")]
pub type NSURLFileResourceType = NSString;
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceTypeNamedPipe: &'static NSURLFileResourceType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceTypeCharacterSpecial: &'static NSURLFileResourceType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceTypeDirectory: &'static NSURLFileResourceType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceTypeBlockSpecial: &'static NSURLFileResourceType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceTypeRegular: &'static NSURLFileResourceType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceTypeSymbolicLink: &'static NSURLFileResourceType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceTypeSocket: &'static NSURLFileResourceType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileResourceTypeUnknown: &'static NSURLFileResourceType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLThumbnailDictionaryKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLThumbnailKey: &'static NSURLResourceKey;
}
#[cfg(feature = "NSString")]
pub type NSURLThumbnailDictionaryItem = NSString;
extern "C" {
#[cfg(feature = "NSString")]
pub static NSThumbnail1024x1024SizeKey: &'static NSURLThumbnailDictionaryItem;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileSizeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileAllocatedSizeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLTotalFileSizeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLTotalFileAllocatedSizeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsAliasFileKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileProtectionKey: &'static NSURLResourceKey;
}
#[cfg(feature = "NSString")]
pub type NSURLFileProtectionType = NSString;
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileProtectionNone: &'static NSURLFileProtectionType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileProtectionComplete: &'static NSURLFileProtectionType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileProtectionCompleteUnlessOpen: &'static NSURLFileProtectionType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileProtectionCompleteUntilFirstUserAuthentication:
&'static NSURLFileProtectionType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLFileProtectionCompleteWhenUserInactive: &'static NSURLFileProtectionType;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLDirectoryEntryCountKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeLocalizedFormatDescriptionKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeTotalCapacityKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeAvailableCapacityKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeResourceCountKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsPersistentIDsKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsSymbolicLinksKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsHardLinksKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsJournalingKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsJournalingKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsSparseFilesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsZeroRunsKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsCaseSensitiveNamesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsCasePreservedNamesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsRootDirectoryDatesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsVolumeSizesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsRenamingKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsAdvisoryFileLockingKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsExtendedSecurityKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsBrowsableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeMaximumFileSizeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsEjectableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsRemovableKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsInternalKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsAutomountedKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsLocalKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsReadOnlyKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeCreationDateKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeURLForRemountingKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeUUIDStringKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeNameKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeLocalizedNameKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsEncryptedKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeIsRootFileSystemKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsCompressionKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsFileCloningKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsSwapRenamingKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsExclusiveRenamingKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsImmutableFilesKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsAccessPermissionsKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSupportsFileProtectionKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeAvailableCapacityForImportantUsageKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeAvailableCapacityForOpportunisticUsageKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeTypeNameKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeSubtypeKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLVolumeMountFromLocationKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLIsUbiquitousItemKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemHasUnresolvedConflictsKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemIsDownloadedKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemIsDownloadingKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemIsUploadedKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemIsUploadingKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemPercentDownloadedKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemPercentUploadedKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemDownloadingStatusKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemDownloadingErrorKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemUploadingErrorKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemDownloadRequestedKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemContainerDisplayNameKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemIsExcludedFromSyncKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemIsSharedKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousSharedItemCurrentUserRoleKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousSharedItemOwnerNameComponentsKey: &'static NSURLResourceKey;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey:
&'static NSURLResourceKey;
}
#[cfg(feature = "NSString")]
pub type NSURLUbiquitousItemDownloadingStatus = NSString;
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemDownloadingStatusNotDownloaded:
&'static NSURLUbiquitousItemDownloadingStatus;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemDownloadingStatusDownloaded:
&'static NSURLUbiquitousItemDownloadingStatus;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousItemDownloadingStatusCurrent:
&'static NSURLUbiquitousItemDownloadingStatus;
}
#[cfg(feature = "NSString")]
pub type NSURLUbiquitousSharedItemRole = NSString;
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousSharedItemRoleOwner: &'static NSURLUbiquitousSharedItemRole;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousSharedItemRoleParticipant: &'static NSURLUbiquitousSharedItemRole;
}
#[cfg(feature = "NSString")]
pub type NSURLUbiquitousSharedItemPermissions = NSString;
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousSharedItemPermissionsReadOnly:
&'static NSURLUbiquitousSharedItemPermissions;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSURLUbiquitousSharedItemPermissionsReadWrite:
&'static NSURLUbiquitousSharedItemPermissions;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSURLBookmarkCreationOptions(pub NSUInteger);
bitflags::bitflags! {
impl NSURLBookmarkCreationOptions: NSUInteger {
#[deprecated = "Not supported"]
const NSURLBookmarkCreationPreferFileIDResolution = 1<<8;
const NSURLBookmarkCreationMinimalBookmark = 1<<9;
const NSURLBookmarkCreationSuitableForBookmarkFile = 1<<10;
const NSURLBookmarkCreationWithSecurityScope = 1<<11;
const NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 1<<12;
const NSURLBookmarkCreationWithoutImplicitSecurityScope = 1<<29;
}
}
unsafe impl Encode for NSURLBookmarkCreationOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSURLBookmarkCreationOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSURLBookmarkResolutionOptions(pub NSUInteger);
bitflags::bitflags! {
impl NSURLBookmarkResolutionOptions: NSUInteger {
const NSURLBookmarkResolutionWithoutUI = 1<<8;
const NSURLBookmarkResolutionWithoutMounting = 1<<9;
const NSURLBookmarkResolutionWithSecurityScope = 1<<10;
const NSURLBookmarkResolutionWithoutImplicitStartAccessing = 1<<15;
}
}
unsafe impl Encode for NSURLBookmarkResolutionOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSURLBookmarkResolutionOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type NSURLBookmarkFileCreationOptions = NSUInteger;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSURL;
unsafe impl ClassType for NSURL {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSURL {}
unsafe impl Sync for NSURL {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSURL {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSURL {}
unsafe impl NSObjectProtocol for NSURL {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSURL {}
extern_methods!(
unsafe impl NSURL {
#[cfg(feature = "NSString")]
#[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."]
#[method_id(@__retain_semantics Init initWithScheme:host:path:)]
pub unsafe fn initWithScheme_host_path(
this: Allocated<Self>,
scheme: &NSString,
host: Option<&NSString>,
path: &NSString,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initFileURLWithPath:isDirectory:relativeToURL:)]
pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL(
this: Allocated<Self>,
path: &NSString,
is_dir: bool,
base_url: Option<&NSURL>,
) -> Retained<Self>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initFileURLWithPath:relativeToURL:)]
pub unsafe fn initFileURLWithPath_relativeToURL(
this: Allocated<Self>,
path: &NSString,
base_url: Option<&NSURL>,
) -> Retained<Self>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initFileURLWithPath:isDirectory:)]
pub unsafe fn initFileURLWithPath_isDirectory(
this: Allocated<Self>,
path: &NSString,
is_dir: bool,
) -> Retained<Self>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initFileURLWithPath:)]
pub unsafe fn initFileURLWithPath(this: Allocated<Self>, path: &NSString)
-> Retained<Self>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other fileURLWithPath:isDirectory:relativeToURL:)]
pub unsafe fn fileURLWithPath_isDirectory_relativeToURL(
path: &NSString,
is_dir: bool,
base_url: Option<&NSURL>,
) -> Retained<NSURL>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other fileURLWithPath:relativeToURL:)]
pub unsafe fn fileURLWithPath_relativeToURL(
path: &NSString,
base_url: Option<&NSURL>,
) -> Retained<NSURL>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other fileURLWithPath:isDirectory:)]
pub unsafe fn fileURLWithPath_isDirectory(path: &NSString, is_dir: bool)
-> Retained<NSURL>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other fileURLWithPath:)]
pub unsafe fn fileURLWithPath(path: &NSString) -> Retained<NSURL>;
#[method_id(@__retain_semantics Init initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)]
pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL(
this: Allocated<Self>,
path: NonNull<c_char>,
is_dir: bool,
base_url: Option<&NSURL>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)]
pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL(
path: NonNull<c_char>,
is_dir: bool,
base_url: Option<&NSURL>,
) -> Retained<NSURL>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithString:)]
pub unsafe fn initWithString(
this: Allocated<Self>,
url_string: &NSString,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithString:relativeToURL:)]
pub unsafe fn initWithString_relativeToURL(
this: Allocated<Self>,
url_string: &NSString,
base_url: Option<&NSURL>,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other URLWithString:)]
pub unsafe fn URLWithString(url_string: &NSString) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other URLWithString:relativeToURL:)]
pub unsafe fn URLWithString_relativeToURL(
url_string: &NSString,
base_url: Option<&NSURL>,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithString:encodingInvalidCharacters:)]
pub unsafe fn initWithString_encodingInvalidCharacters(
this: Allocated<Self>,
url_string: &NSString,
encoding_invalid_characters: bool,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other URLWithString:encodingInvalidCharacters:)]
pub unsafe fn URLWithString_encodingInvalidCharacters(
url_string: &NSString,
encoding_invalid_characters: bool,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSData")]
#[method_id(@__retain_semantics Init initWithDataRepresentation:relativeToURL:)]
pub unsafe fn initWithDataRepresentation_relativeToURL(
this: Allocated<Self>,
data: &NSData,
base_url: Option<&NSURL>,
) -> Retained<Self>;
#[cfg(feature = "NSData")]
#[method_id(@__retain_semantics Other URLWithDataRepresentation:relativeToURL:)]
pub unsafe fn URLWithDataRepresentation_relativeToURL(
data: &NSData,
base_url: Option<&NSURL>,
) -> Retained<NSURL>;
#[cfg(feature = "NSData")]
#[method_id(@__retain_semantics Init initAbsoluteURLWithDataRepresentation:relativeToURL:)]
pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL(
this: Allocated<Self>,
data: &NSData,
base_url: Option<&NSURL>,
) -> Retained<Self>;
#[cfg(feature = "NSData")]
#[method_id(@__retain_semantics Other absoluteURLWithDataRepresentation:relativeToURL:)]
pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL(
data: &NSData,
base_url: Option<&NSURL>,
) -> Retained<NSURL>;
#[cfg(feature = "NSData")]
#[method_id(@__retain_semantics Other dataRepresentation)]
pub unsafe fn dataRepresentation(&self) -> Retained<NSData>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other absoluteString)]
pub unsafe fn absoluteString(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other relativeString)]
pub unsafe fn relativeString(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other baseURL)]
pub unsafe fn baseURL(&self) -> Option<Retained<NSURL>>;
#[method_id(@__retain_semantics Other absoluteURL)]
pub unsafe fn absoluteURL(&self) -> Option<Retained<NSURL>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other scheme)]
pub unsafe fn scheme(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other resourceSpecifier)]
pub unsafe fn resourceSpecifier(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other host)]
pub unsafe fn host(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSValue")]
#[method_id(@__retain_semantics Other port)]
pub unsafe fn port(&self) -> Option<Retained<NSNumber>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other user)]
pub unsafe fn user(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other password)]
pub unsafe fn password(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other path)]
pub unsafe fn path(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other fragment)]
pub unsafe fn fragment(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[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."]
#[method_id(@__retain_semantics Other parameterString)]
pub unsafe fn parameterString(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other query)]
pub unsafe fn query(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other relativePath)]
pub unsafe fn relativePath(&self) -> Option<Retained<NSString>>;
#[method(hasDirectoryPath)]
pub unsafe fn hasDirectoryPath(&self) -> bool;
#[method(getFileSystemRepresentation:maxLength:)]
pub unsafe fn getFileSystemRepresentation_maxLength(
&self,
buffer: NonNull<c_char>,
max_buffer_length: NSUInteger,
) -> bool;
#[method(fileSystemRepresentation)]
pub unsafe fn fileSystemRepresentation(&self) -> NonNull<c_char>;
#[method(isFileURL)]
pub unsafe fn isFileURL(&self) -> bool;
#[method_id(@__retain_semantics Other standardizedURL)]
pub unsafe fn standardizedURL(&self) -> Option<Retained<NSURL>>;
#[method(isFileReferenceURL)]
pub unsafe fn isFileReferenceURL(&self) -> bool;
#[method_id(@__retain_semantics Other fileReferenceURL)]
pub unsafe fn fileReferenceURL(&self) -> Option<Retained<NSURL>>;
#[method_id(@__retain_semantics Other filePathURL)]
pub unsafe fn filePathURL(&self) -> Option<Retained<NSURL>>;
#[cfg(all(feature = "NSError", feature = "NSString"))]
#[method(getResourceValue:forKey:error:_)]
pub unsafe fn getResourceValue_forKey_error(
&self,
value: &mut Option<Retained<AnyObject>>,
key: &NSURLResourceKey,
) -> Result<(), Retained<NSError>>;
#[cfg(all(
feature = "NSArray",
feature = "NSDictionary",
feature = "NSError",
feature = "NSString"
))]
#[method_id(@__retain_semantics Other resourceValuesForKeys:error:_)]
pub unsafe fn resourceValuesForKeys_error(
&self,
keys: &NSArray<NSURLResourceKey>,
) -> Result<Retained<NSDictionary<NSURLResourceKey, AnyObject>>, Retained<NSError>>;
#[cfg(all(feature = "NSError", feature = "NSString"))]
#[method(setResourceValue:forKey:error:_)]
pub unsafe fn setResourceValue_forKey_error(
&self,
value: Option<&AnyObject>,
key: &NSURLResourceKey,
) -> Result<(), Retained<NSError>>;
#[cfg(all(feature = "NSDictionary", feature = "NSError", feature = "NSString"))]
#[method(setResourceValues:error:_)]
pub unsafe fn setResourceValues_error(
&self,
keyed_values: &NSDictionary<NSURLResourceKey, AnyObject>,
) -> Result<(), Retained<NSError>>;
#[cfg(feature = "NSString")]
#[method(removeCachedResourceValueForKey:)]
pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey);
#[method(removeAllCachedResourceValues)]
pub unsafe fn removeAllCachedResourceValues(&self);
#[cfg(feature = "NSString")]
#[method(setTemporaryResourceValue:forKey:)]
pub unsafe fn setTemporaryResourceValue_forKey(
&self,
value: Option<&AnyObject>,
key: &NSURLResourceKey,
);
#[cfg(all(
feature = "NSArray",
feature = "NSData",
feature = "NSError",
feature = "NSString"
))]
#[method_id(@__retain_semantics Other bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:_)]
pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error(
&self,
options: NSURLBookmarkCreationOptions,
keys: Option<&NSArray<NSURLResourceKey>>,
relative_url: Option<&NSURL>,
) -> Result<Retained<NSData>, Retained<NSError>>;
#[cfg(all(feature = "NSData", feature = "NSError"))]
#[method_id(@__retain_semantics Init initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:_)]
pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error(
this: Allocated<Self>,
bookmark_data: &NSData,
options: NSURLBookmarkResolutionOptions,
relative_url: Option<&NSURL>,
is_stale: *mut Bool,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(all(feature = "NSData", feature = "NSError"))]
#[method_id(@__retain_semantics Other URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:_)]
pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error(
bookmark_data: &NSData,
options: NSURLBookmarkResolutionOptions,
relative_url: Option<&NSURL>,
is_stale: *mut Bool,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(all(
feature = "NSArray",
feature = "NSData",
feature = "NSDictionary",
feature = "NSString"
))]
#[method_id(@__retain_semantics Other resourceValuesForKeys:fromBookmarkData:)]
pub unsafe fn resourceValuesForKeys_fromBookmarkData(
keys: &NSArray<NSURLResourceKey>,
bookmark_data: &NSData,
) -> Option<Retained<NSDictionary<NSURLResourceKey, AnyObject>>>;
#[cfg(all(feature = "NSData", feature = "NSError"))]
#[method(writeBookmarkData:toURL:options:error:_)]
pub unsafe fn writeBookmarkData_toURL_options_error(
bookmark_data: &NSData,
bookmark_file_url: &NSURL,
options: NSURLBookmarkFileCreationOptions,
) -> Result<(), Retained<NSError>>;
#[cfg(all(feature = "NSData", feature = "NSError"))]
#[method_id(@__retain_semantics Other bookmarkDataWithContentsOfURL:error:_)]
pub unsafe fn bookmarkDataWithContentsOfURL_error(
bookmark_file_url: &NSURL,
) -> Result<Retained<NSData>, Retained<NSError>>;
#[cfg(feature = "NSError")]
#[method_id(@__retain_semantics Other URLByResolvingAliasFileAtURL:options:error:_)]
pub unsafe fn URLByResolvingAliasFileAtURL_options_error(
url: &NSURL,
options: NSURLBookmarkResolutionOptions,
) -> Result<Retained<Self>, Retained<NSError>>;
#[method(startAccessingSecurityScopedResource)]
pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool;
#[method(stopAccessingSecurityScopedResource)]
pub unsafe fn stopAccessingSecurityScopedResource(&self);
}
);
extern_methods!(
unsafe impl NSURL {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSURL {
#[cfg(all(feature = "NSError", feature = "NSString"))]
#[method(getPromisedItemResourceValue:forKey:error:_)]
pub unsafe fn getPromisedItemResourceValue_forKey_error(
&self,
value: &mut Option<Retained<AnyObject>>,
key: &NSURLResourceKey,
) -> Result<(), Retained<NSError>>;
#[cfg(all(
feature = "NSArray",
feature = "NSDictionary",
feature = "NSError",
feature = "NSString"
))]
#[method_id(@__retain_semantics Other promisedItemResourceValuesForKeys:error:_)]
pub unsafe fn promisedItemResourceValuesForKeys_error(
&self,
keys: &NSArray<NSURLResourceKey>,
) -> Result<Retained<NSDictionary<NSURLResourceKey, AnyObject>>, Retained<NSError>>;
#[cfg(feature = "NSError")]
#[method(checkPromisedItemIsReachableAndReturnError:_)]
pub unsafe fn checkPromisedItemIsReachableAndReturnError(
&self,
) -> Result<(), Retained<NSError>>;
}
);
extern_methods!(
unsafe impl NSURL {}
);
#[cfg(feature = "NSItemProvider")]
unsafe impl NSItemProviderReading for NSURL {}
#[cfg(feature = "NSItemProvider")]
unsafe impl NSItemProviderWriting for NSURL {}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSURLQueryItem;
unsafe impl ClassType for NSURLQueryItem {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSURLQueryItem {}
unsafe impl Sync for NSURLQueryItem {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSURLQueryItem {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSURLQueryItem {}
unsafe impl NSObjectProtocol for NSURLQueryItem {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSURLQueryItem {}
extern_methods!(
unsafe impl NSURLQueryItem {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithName:value:)]
pub unsafe fn initWithName_value(
this: Allocated<Self>,
name: &NSString,
value: Option<&NSString>,
) -> Retained<Self>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other queryItemWithName:value:)]
pub unsafe fn queryItemWithName_value(
name: &NSString,
value: Option<&NSString>,
) -> Retained<Self>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other value)]
pub unsafe fn value(&self) -> Option<Retained<NSString>>;
}
);
extern_methods!(
unsafe impl NSURLQueryItem {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSURLComponents;
unsafe impl ClassType for NSURLComponents {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSURLComponents {}
unsafe impl NSObjectProtocol for NSURLComponents {}
extern_methods!(
unsafe impl NSURLComponents {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithURL:resolvingAgainstBaseURL:)]
pub unsafe fn initWithURL_resolvingAgainstBaseURL(
this: Allocated<Self>,
url: &NSURL,
resolve: bool,
) -> Option<Retained<Self>>;
#[method_id(@__retain_semantics Other componentsWithURL:resolvingAgainstBaseURL:)]
pub unsafe fn componentsWithURL_resolvingAgainstBaseURL(
url: &NSURL,
resolve: bool,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithString:)]
pub unsafe fn initWithString(
this: Allocated<Self>,
url_string: &NSString,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other componentsWithString:)]
pub unsafe fn componentsWithString(url_string: &NSString) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithString:encodingInvalidCharacters:)]
pub unsafe fn initWithString_encodingInvalidCharacters(
this: Allocated<Self>,
url_string: &NSString,
encoding_invalid_characters: bool,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other componentsWithString:encodingInvalidCharacters:)]
pub unsafe fn componentsWithString_encodingInvalidCharacters(
url_string: &NSString,
encoding_invalid_characters: bool,
) -> Option<Retained<Self>>;
#[method_id(@__retain_semantics Other URL)]
pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
#[method_id(@__retain_semantics Other URLRelativeToURL:)]
pub unsafe fn URLRelativeToURL(&self, base_url: Option<&NSURL>) -> Option<Retained<NSURL>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other string)]
pub unsafe fn string(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other scheme)]
pub unsafe fn scheme(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setScheme:)]
pub unsafe fn setScheme(&self, scheme: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other user)]
pub unsafe fn user(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setUser:)]
pub unsafe fn setUser(&self, user: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other password)]
pub unsafe fn password(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setPassword:)]
pub unsafe fn setPassword(&self, password: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other host)]
pub unsafe fn host(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setHost:)]
pub unsafe fn setHost(&self, host: Option<&NSString>);
#[cfg(feature = "NSValue")]
#[method_id(@__retain_semantics Other port)]
pub unsafe fn port(&self) -> Option<Retained<NSNumber>>;
#[cfg(feature = "NSValue")]
#[method(setPort:)]
pub unsafe fn setPort(&self, port: Option<&NSNumber>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other path)]
pub unsafe fn path(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setPath:)]
pub unsafe fn setPath(&self, path: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other query)]
pub unsafe fn query(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setQuery:)]
pub unsafe fn setQuery(&self, query: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other fragment)]
pub unsafe fn fragment(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setFragment:)]
pub unsafe fn setFragment(&self, fragment: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other percentEncodedUser)]
pub unsafe fn percentEncodedUser(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setPercentEncodedUser:)]
pub unsafe fn setPercentEncodedUser(&self, percent_encoded_user: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other percentEncodedPassword)]
pub unsafe fn percentEncodedPassword(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setPercentEncodedPassword:)]
pub unsafe fn setPercentEncodedPassword(&self, percent_encoded_password: Option<&NSString>);
#[cfg(feature = "NSString")]
#[deprecated = "Use encodedHost instead"]
#[method_id(@__retain_semantics Other percentEncodedHost)]
pub unsafe fn percentEncodedHost(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[deprecated = "Use encodedHost instead"]
#[method(setPercentEncodedHost:)]
pub unsafe fn setPercentEncodedHost(&self, percent_encoded_host: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other percentEncodedPath)]
pub unsafe fn percentEncodedPath(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setPercentEncodedPath:)]
pub unsafe fn setPercentEncodedPath(&self, percent_encoded_path: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other percentEncodedQuery)]
pub unsafe fn percentEncodedQuery(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setPercentEncodedQuery:)]
pub unsafe fn setPercentEncodedQuery(&self, percent_encoded_query: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other percentEncodedFragment)]
pub unsafe fn percentEncodedFragment(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setPercentEncodedFragment:)]
pub unsafe fn setPercentEncodedFragment(&self, percent_encoded_fragment: Option<&NSString>);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other encodedHost)]
pub unsafe fn encodedHost(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method(setEncodedHost:)]
pub unsafe fn setEncodedHost(&self, encoded_host: Option<&NSString>);
#[cfg(feature = "NSRange")]
#[method(rangeOfScheme)]
pub unsafe fn rangeOfScheme(&self) -> NSRange;
#[cfg(feature = "NSRange")]
#[method(rangeOfUser)]
pub unsafe fn rangeOfUser(&self) -> NSRange;
#[cfg(feature = "NSRange")]
#[method(rangeOfPassword)]
pub unsafe fn rangeOfPassword(&self) -> NSRange;
#[cfg(feature = "NSRange")]
#[method(rangeOfHost)]
pub unsafe fn rangeOfHost(&self) -> NSRange;
#[cfg(feature = "NSRange")]
#[method(rangeOfPort)]
pub unsafe fn rangeOfPort(&self) -> NSRange;
#[cfg(feature = "NSRange")]
#[method(rangeOfPath)]
pub unsafe fn rangeOfPath(&self) -> NSRange;
#[cfg(feature = "NSRange")]
#[method(rangeOfQuery)]
pub unsafe fn rangeOfQuery(&self) -> NSRange;
#[cfg(feature = "NSRange")]
#[method(rangeOfFragment)]
pub unsafe fn rangeOfFragment(&self) -> NSRange;
#[cfg(feature = "NSArray")]
#[method_id(@__retain_semantics Other queryItems)]
pub unsafe fn queryItems(&self) -> Option<Retained<NSArray<NSURLQueryItem>>>;
#[cfg(feature = "NSArray")]
#[method(setQueryItems:)]
pub unsafe fn setQueryItems(&self, query_items: Option<&NSArray<NSURLQueryItem>>);
#[cfg(feature = "NSArray")]
#[method_id(@__retain_semantics Other percentEncodedQueryItems)]
pub unsafe fn percentEncodedQueryItems(&self) -> Option<Retained<NSArray<NSURLQueryItem>>>;
#[cfg(feature = "NSArray")]
#[method(setPercentEncodedQueryItems:)]
pub unsafe fn setPercentEncodedQueryItems(
&self,
percent_encoded_query_items: Option<&NSArray<NSURLQueryItem>>,
);
}
);
extern_methods!(
unsafe impl NSURLComponents {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_methods!(
#[cfg(feature = "NSCharacterSet")]
unsafe impl NSCharacterSet {
#[method_id(@__retain_semantics Other URLUserAllowedCharacterSet)]
pub unsafe fn URLUserAllowedCharacterSet() -> Retained<NSCharacterSet>;
#[method_id(@__retain_semantics Other URLPasswordAllowedCharacterSet)]
pub unsafe fn URLPasswordAllowedCharacterSet() -> Retained<NSCharacterSet>;
#[method_id(@__retain_semantics Other URLHostAllowedCharacterSet)]
pub unsafe fn URLHostAllowedCharacterSet() -> Retained<NSCharacterSet>;
#[method_id(@__retain_semantics Other URLPathAllowedCharacterSet)]
pub unsafe fn URLPathAllowedCharacterSet() -> Retained<NSCharacterSet>;
#[method_id(@__retain_semantics Other URLQueryAllowedCharacterSet)]
pub unsafe fn URLQueryAllowedCharacterSet() -> Retained<NSCharacterSet>;
#[method_id(@__retain_semantics Other URLFragmentAllowedCharacterSet)]
pub unsafe fn URLFragmentAllowedCharacterSet() -> Retained<NSCharacterSet>;
}
);
extern_methods!(
#[cfg(feature = "NSString")]
unsafe impl NSString {
#[cfg(feature = "NSCharacterSet")]
#[method_id(@__retain_semantics Other stringByAddingPercentEncodingWithAllowedCharacters:)]
pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters(
&self,
allowed_characters: &NSCharacterSet,
) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other stringByRemovingPercentEncoding)]
pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option<Retained<NSString>>;
#[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."]
#[method_id(@__retain_semantics Other stringByAddingPercentEscapesUsingEncoding:)]
pub unsafe fn stringByAddingPercentEscapesUsingEncoding(
&self,
enc: NSStringEncoding,
) -> Option<Retained<NSString>>;
#[deprecated = "Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding."]
#[method_id(@__retain_semantics Other stringByReplacingPercentEscapesUsingEncoding:)]
pub unsafe fn stringByReplacingPercentEscapesUsingEncoding(
&self,
enc: NSStringEncoding,
) -> Option<Retained<NSString>>;
}
);
extern_methods!(
unsafe impl NSURL {
#[cfg(all(feature = "NSArray", feature = "NSString"))]
#[method_id(@__retain_semantics Other fileURLWithPathComponents:)]
pub unsafe fn fileURLWithPathComponents(
components: &NSArray<NSString>,
) -> Option<Retained<NSURL>>;
#[cfg(all(feature = "NSArray", feature = "NSString"))]
#[method_id(@__retain_semantics Other pathComponents)]
pub unsafe fn pathComponents(&self) -> Option<Retained<NSArray<NSString>>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other lastPathComponent)]
pub unsafe fn lastPathComponent(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other pathExtension)]
pub unsafe fn pathExtension(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other URLByAppendingPathComponent:)]
pub unsafe fn URLByAppendingPathComponent(
&self,
path_component: &NSString,
) -> Option<Retained<NSURL>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other URLByAppendingPathComponent:isDirectory:)]
pub unsafe fn URLByAppendingPathComponent_isDirectory(
&self,
path_component: &NSString,
is_directory: bool,
) -> Option<Retained<NSURL>>;
#[method_id(@__retain_semantics Other URLByDeletingLastPathComponent)]
pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option<Retained<NSURL>>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other URLByAppendingPathExtension:)]
pub unsafe fn URLByAppendingPathExtension(
&self,
path_extension: &NSString,
) -> Option<Retained<NSURL>>;
#[method_id(@__retain_semantics Other URLByDeletingPathExtension)]
pub unsafe fn URLByDeletingPathExtension(&self) -> Option<Retained<NSURL>>;
#[cfg(feature = "NSError")]
#[method(checkResourceIsReachableAndReturnError:_)]
pub unsafe fn checkResourceIsReachableAndReturnError(
&self,
) -> Result<(), Retained<NSError>>;
#[method_id(@__retain_semantics Other URLByStandardizingPath)]
pub unsafe fn URLByStandardizingPath(&self) -> Option<Retained<NSURL>>;
#[method_id(@__retain_semantics Other URLByResolvingSymlinksInPath)]
pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option<Retained<NSURL>>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSFileSecurity;
unsafe impl ClassType for NSFileSecurity {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSFileSecurity {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSFileSecurity {}
unsafe impl NSObjectProtocol for NSFileSecurity {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSFileSecurity {}
extern_methods!(
unsafe impl NSFileSecurity {
#[cfg(feature = "NSCoder")]
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
}
);
extern_methods!(
unsafe impl NSFileSecurity {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSURL {
#[cfg(feature = "NSData")]
#[deprecated = "Use NSURLConnection instead"]
#[method_id(@__retain_semantics Other resourceDataUsingCache:)]
pub unsafe fn resourceDataUsingCache(
&self,
should_use_cache: bool,
) -> Option<Retained<NSData>>;
#[deprecated = "Use NSURLConnection instead"]
#[method(loadResourceDataNotifyingClient:usingCache:)]
pub unsafe fn loadResourceDataNotifyingClient_usingCache(
&self,
client: &AnyObject,
should_use_cache: bool,
);
#[cfg(feature = "NSString")]
#[deprecated = "Use NSURLConnection instead"]
#[method_id(@__retain_semantics Other propertyForKey:)]
pub unsafe fn propertyForKey(&self, property_key: &NSString)
-> Option<Retained<AnyObject>>;
#[cfg(feature = "NSData")]
#[deprecated = "Use NSURLConnection instead"]
#[method(setResourceData:)]
pub unsafe fn setResourceData(&self, data: &NSData) -> bool;
#[cfg(feature = "NSString")]
#[deprecated = "Use NSURLConnection instead"]
#[method(setProperty:forKey:)]
pub unsafe fn setProperty_forKey(
&self,
property: &AnyObject,
property_key: &NSString,
) -> bool;
#[cfg(feature = "NSURLHandle")]
#[deprecated = "Use NSURLConnection instead"]
#[method_id(@__retain_semantics Other URLHandleUsingCache:)]
pub unsafe fn URLHandleUsingCache(
&self,
should_use_cache: bool,
) -> Option<Retained<NSURLHandle>>;
}
);