Fix indentation

This commit is contained in:
Nuntius 2021-08-17 13:57:37 +00:00
parent 0e6f3b7739
commit c3daa41f2d
2 changed files with 1481 additions and 1470 deletions

View file

@ -1,21 +1,21 @@
/* NSURL.h - Class NSURL
Copyright (C) 1999 Free Software Foundation, Inc.
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
Date: Jan 1999
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@ -24,16 +24,16 @@
#ifndef __NSURL_h_GNUSTEP_BASE_INCLUDE
#define __NSURL_h_GNUSTEP_BASE_INCLUDE
#import <GNUstepBase/GSVersionMacros.h>
#import <GNUstepBase/GSVersionMacros.h>
#import <Foundation/NSURLHandle.h>
#import <Foundation/NSURLHandle.h>
#import <Foundation/NSRange.h>
#if defined(__cplusplus)
#if defined(__cplusplus)
extern "C" {
#endif
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
@class NSError;
@class NSNumber;
@ -44,7 +44,7 @@ extern "C" {
/**
* URL scheme constant for use with [NSURL-initWithScheme:host:path:].
*/
GS_EXPORT NSString *const NSURLFileScheme;
GS_EXPORT NSString* const NSURLFileScheme;
/** URL Bookmark Resolution Options **/
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
@ -69,46 +69,45 @@ enum
* objects, but NSURL provides a simplified API wrapping these objects.
*/
GS_EXPORT_CLASS
@interface NSURL : NSObject <NSCoding, NSCopying, NSURLHandleClient>
@interface NSURL: NSObject <NSCoding, NSCopying, NSURLHandleClient>
{
#if GS_EXPOSE(NSURL)
#if GS_EXPOSE(NSURL)
@private
NSString *_urlString;
NSURL * _baseURL;
void * _clients;
void * _data;
NSString *_urlString;
NSURL *_baseURL;
void *_clients;
void *_data;
#endif
}
/**
* Create and return a file URL with the supplied path.<br />
* The value of aPath must be a valid filesystem path.<br />
* Calls -initFileURLWithPath: which escapes characters in the
* path where necessary.
*/
+ (instancetype)fileURLWithPath:(NSString *)aPath;
+ (instancetype) fileURLWithPath: (NSString*)aPath;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
/** Creates a file URL using a path built from components.
*/
+ (instancetype) fileURLWithPathComponents: (NSArray*)components;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
+ (instancetype)fileURLWithPath:(NSString *)aPath isDirectory:(BOOL)isDir;
+ (instancetype) fileURLWithPath: (NSString*)aPath isDirectory: (BOOL)isDir;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST)
+ (instancetype)fileURLWithPath:(NSString *)aPath
isDirectory:(BOOL)isDir
relativeToURL:(NSURL *)baseURL;
+ (instancetype) fileURLWithPath: (NSString *)aPath
isDirectory: (BOOL)isDir
relativeToURL: (NSURL *)baseURL;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST)
/** Create and return a file URL with the supplied path, relative to a base URL.
*/
+ (instancetype)fileURLWithPath:(NSString *)aPath relativeToURL:(NSURL *)baseURL;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
/** Creates a file URL using a path built from components.
*/
+ (instancetype)fileURLWithPathComponents:(NSArray *)components;
+ (instancetype) fileURLWithPath:(NSString *)aPath relativeToURL:(NSURL *)baseURL;
#endif
/**
@ -117,13 +116,12 @@ GS_EXPORT_CLASS
* conforming to the description (in RFC2396) of an absolute URL.<br />
* Calls -initWithString:
*/
+ (instancetype)URLWithString:(NSString *)aUrlString;
+ (instancetype) URLWithString: (NSString*)aUrlString;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
+ (instancetype)URLByResolvingAliasFileAtURL:(NSURL *)url
options:
(NSURLBookmarkResolutionOptions)options
error:(NSError **)error;
+ (instancetype) URLByResolvingAliasFileAtURL: (NSURL*)url
options: (NSURLBookmarkResolutionOptions)options
error: (NSError**)error;
#endif
/**
@ -132,8 +130,8 @@ GS_EXPORT_CLASS
* conforming to the description (in RFC2396) of a relative URL.<br />
* Calls -initWithString:relativeToURL:
*/
+ (instancetype)URLWithString:(NSString *)aUrlString
relativeToURL:(NSURL *)aBaseUrl;
+ (instancetype) URLWithString: (NSString*)aUrlString
relativeToURL: (NSURL*)aBaseUrl;
/**
* Initialise as a file URL with the specified path (which must
@ -144,9 +142,9 @@ GS_EXPORT_CLASS
* specifies a directory.<br />
* Calls -initWithScheme:host:path:
*/
- (instancetype)initFileURLWithPath:(NSString *)aPath;
- (instancetype) initFileURLWithPath: (NSString*)aPath;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
/**
* Initialise as a file URL with the specified path (which must
* be a valid path on the local filesystem).<br />
@ -156,7 +154,8 @@ GS_EXPORT_CLASS
* specifies a directory.<br />
* Calls -initWithScheme:host:path:
*/
- (instancetype)initFileURLWithPath:(NSString *)aPath isDirectory:(BOOL)isDir;
- (instancetype) initFileURLWithPath: (NSString*)aPath
isDirectory: (BOOL)isDir;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST)
@ -169,8 +168,8 @@ GS_EXPORT_CLASS
* specifies a directory.<br />
* Calls -initWithScheme:host:path:
*/
- (instancetype)initFileURLWithPath:(NSString *)aPath
relativeToURL:(NSURL *)baseURL;
- (instancetype) initFileURLWithPath: (NSString *)aPath
relativeToURL: (NSURL *)baseURL;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST)
@ -183,9 +182,9 @@ GS_EXPORT_CLASS
* specifies a directory.<br />
* Calls -initWithScheme:host:path:
*/
- (instancetype)initFileURLWithPath:(NSString *)aPath
isDirectory:(BOOL)isDir
relativeToURL:(NSURL *)baseURL;
- (instancetype) initFileURLWithPath: (NSString *)aPath
isDirectory: (BOOL)isDir
relativeToURL: (NSURL *)baseURL;
#endif
/**
@ -199,15 +198,15 @@ GS_EXPORT_CLASS
* Permits the 'aHost' part to contain 'username:password@host:port' or
* 'host:port' in addition to a simple host name or address.
*/
- (instancetype)initWithScheme:(NSString *)aScheme
host:(NSString *)aHost
path:(NSString *)aPath;
- (instancetype) initWithScheme: (NSString*)aScheme
host: (NSString*)aHost
path: (NSString*)aPath;
/**
* Initialise as an absolute URL.<br />
* Calls -initWithString:relativeToURL:
*/
- (instancetype)initWithString:(NSString *)aUrlString;
- (instancetype) initWithString: (NSString*)aUrlString;
/** <init />
* Initialised using aUrlString and aBaseUrl. The value of aBaseUrl
@ -217,38 +216,38 @@ GS_EXPORT_CLASS
* Parses an empty string as an empty path.<br />
* If the string cannot be parsed the method returns nil.
*/
- (instancetype)initWithString:(NSString *)aUrlString
relativeToURL:(NSURL *)aBaseUrl;
- (instancetype) initWithString: (NSString*)aUrlString
relativeToURL: (NSURL*)aBaseUrl;
#if GS_HAS_DECLARED_PROPERTIES
@property (readonly, getter=isFileURL) BOOL fileURL;
#else
- (BOOL)isFileURL;
- (BOOL) isFileURL;
#endif
/**
* Returns the full string describing the receiver resolved against its base.
*/
- (NSString *)absoluteString;
- (NSString*) absoluteString;
/**
* If the receiver is an absolute URL, returns self. Otherwise returns an
* absolute URL referring to the same resource as the receiver.
*/
- (NSURL *)absoluteURL;
- (NSURL*) absoluteURL;
/**
* If the receiver is a relative URL, returns its base URL.<br />
* Otherwise, returns nil.
*/
- (NSURL *)baseURL;
- (NSURL*) baseURL;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
/** Attempts to load from the specified URL and provides an error
* response if the data is unrachable.<br />
* Returns YES on success, NO on failure.
*/
- (BOOL)checkResourceIsReachableAndReturnError:(NSError **)error;
- (BOOL) checkResourceIsReachableAndReturnError: (NSError **)error;
#endif
/**
@ -257,7 +256,7 @@ GS_EXPORT_CLASS
* The fragment is everything in the original URL string after a '#'<br />
* File URLs do not have fragments.
*/
- (NSString *)fragment;
- (NSString*) fragment;
/**
* Returns the host portion of the receiver or nil if there is no
@ -267,12 +266,12 @@ GS_EXPORT_CLASS
* Returns IPv6 addresses <em>without</em> the enclosing square brackets
* required (by RFC2732) in URL strings.
*/
- (NSString *)host;
- (NSString*) host;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
/** Returns the last (rightmost) path component of the receiver.
*/
- (NSString *)lastPathComponent;
- (NSString*) lastPathComponent;
#endif
/**
@ -297,8 +296,8 @@ GS_EXPORT_CLASS
* background load operation to operate!
* </p>
*/
- (void)loadResourceDataNotifyingClient:(id)client
usingCache:(BOOL)shouldUseCache;
- (void) loadResourceDataNotifyingClient: (id)client
usingCache: (BOOL)shouldUseCache;
/**
* Returns the parameter portion of the receiver or nil if there is no
@ -307,7 +306,7 @@ GS_EXPORT_CLASS
* but before the query.<br />
* File URLs do not have parameters.
*/
- (NSString *)parameterString;
- (NSString*) parameterString;
/**
* Returns the password portion of the receiver or nil if there is no
@ -317,7 +316,7 @@ GS_EXPORT_CLASS
* NB. because of its security implications it is recommended that you
* do not use URLs with users and passwords unless necessary.
*/
- (NSString *)password;
- (NSString*) password;
/**
* Returns the path portion of the receiver.<br />
@ -330,19 +329,19 @@ GS_EXPORT_CLASS
* Also, this breaks strict conformance in that a URL of file scheme is
* treated as having a path (contrary to RFCs)
*/
- (NSString *)path;
- (NSString*) path;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
/** Returns thepath components of the receiver.<br />
* See [NSString-pathComponents].
*/
- (NSArray *)pathComponents;
- (NSArray*) pathComponents;
/** Returns the file extension (text after the rightmost dot in the path)
* of the receiver.<br />
* see [NSString-pathExtension].
*/
- (NSString *)pathExtension;
- (NSString*) pathExtension;
#endif
/**
@ -351,13 +350,13 @@ GS_EXPORT_CLASS
* Percent escape sequences in the user string are translated in GNUstep
* but this appears to be broken in MacOS-X.
*/
- (NSNumber *)port;
- (NSNumber*) port;
/**
* Asks a URL handle to return the property for the specified key and
* returns the result.
*/
- (id)propertyForKey:(NSString *)propertyKey;
- (id) propertyForKey: (NSString*)propertyKey;
/**
* Returns the query portion of the receiver or nil if there is no
@ -366,20 +365,20 @@ GS_EXPORT_CLASS
* but before the fragment.<br />
* File URLs do not have queries.
*/
- (NSString *)query;
- (NSString*) query;
/**
* Returns the path of the receiver, without taking any base URL into account.
* If the receiver is an absolute URL, -relativePath is the same as -path.<br />
* Returns nil if there is no path specified for the URL.
*/
- (NSString *)relativePath;
- (NSString*) relativePath;
/**
* Returns the relative portion of the URL string. If the receiver is not
* a relative URL, this returns the same as absoluteString.
*/
- (NSString *)relativeString;
- (NSString*) relativeString;
/**
* Loads the resource data for the represented URL and returns the result.
@ -387,93 +386,94 @@ GS_EXPORT_CLASS
* an existing NSURLHandle can be used to provide the data, or if it should
* be refetched.
*/
- (NSData *)resourceDataUsingCache:(BOOL)shouldUseCache;
- (NSData*) resourceDataUsingCache: (BOOL)shouldUseCache;
/**
* Returns the resource specifier of the URL ... the part which lies
* after the scheme.
*/
- (NSString *)resourceSpecifier;
- (NSString*) resourceSpecifier;
/**
* Returns the scheme of the receiver.
*/
- (NSString *)scheme;
- (NSString*) scheme;
/**
* Calls [NSURLHandle-writeProperty:forKey:] to set the named property.
*/
- (BOOL)setProperty:(id)property forKey:(NSString *)propertyKey;
- (BOOL) setProperty: (id)property
forKey: (NSString*)propertyKey;
/**
* Calls [NSURLHandle-writeData:] to write the specified data object
* to the resource identified by the receiver URL.<br />
* Returns the result.
*/
- (BOOL)setResourceData:(NSData *)data;
- (BOOL) setResourceData: (NSData*)data;
/**
* Returns a URL with '/./' and '/../' sequences resolved etc.
*/
- (NSURL *)standardizedURL;
- (NSURL*) standardizedURL;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
/** Returns a URL formed by adding a path component to the path of the
* receiver.<br />
* See [NSString-stringByAppendingPathComponent:].
*/
- (NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent;
- (NSURL*) URLByAppendingPathComponent: (NSString*)pathComponent;
/** Returns a URL formed by adding a path extension to the path of the
* receiver.<br />
* See [NSString-stringByAppendingPathExtension:].
*/
- (NSURL *)URLByAppendingPathExtension:(NSString *)pathExtension;
- (NSURL*) URLByAppendingPathExtension: (NSString*)pathExtension;
/** Returns a URL formed by removing a path component from the path of the
* receiver.<br />
* See [NSString-stringByDeletingLastPathComponent].
*/
- (NSURL *)URLByDeletingLastPathComponent;
- (NSURL*) URLByDeletingLastPathComponent;
/** Returns a URL formed by removing an extension from the path of the
* receiver.<br />
* See [NSString-stringByDeletingPathExtension].
*/
- (NSURL *)URLByDeletingPathExtension;
- (NSURL*) URLByDeletingPathExtension;
/** Returns self unless the receiver is a file URL, in which case it returns
* a URL formed by calling [NSString-stringByResolvingSymlinksInPath].
*/
- (NSURL *)URLByResolvingSymlinksInPath;
- (NSURL*) URLByResolvingSymlinksInPath;
/** Returns self unless the receiver is a file URL, in which case it returns
* a URL formed by calling [NSString-stringByStandardizingPath].
*/
- (NSURL *)URLByStandardizingPath;
- (NSURL*) URLByStandardizingPath;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
/** Returns a URL formed by adding a path component to the path of the
* receiver, along with a trailing slash if the component is designated a
* directory.<br />
* See [NSString-stringByAppendingPathComponent:].
*/
- (NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent
isDirectory:(BOOL)isDirectory;
- (NSURL *) URLByAppendingPathComponent:(NSString *)pathComponent
isDirectory:(BOOL)isDirectory;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
- (BOOL)isFileReferenceURL;
- (BOOL) isFileReferenceURL;
- (NSURL *)fileReferenceURL;
- (NSURL *) fileReferenceURL;
- (NSURL *)filePathURL;
- (NSURL *) filePathURL;
- (BOOL)getResourceValue:(id *)value
forKey:(NSString *)key
error:(NSError **)error;
- (BOOL) getResourceValue: (id*)value
forKey: (NSString *)key
error: (NSError**)error;
#endif
/**
* Returns an NSURLHandle instance which may be used to write data to the
@ -481,7 +481,7 @@ GS_EXPORT_CLASS
* The shouldUseCache flag indicates whether a cached handle may be returned
* or a new one should be created.
*/
- (NSURLHandle *)URLHandleUsingCache:(BOOL)shouldUseCache;
- (NSURLHandle*)URLHandleUsingCache: (BOOL)shouldUseCache;
/**
* Returns the user portion of the receiver or nil if there is no
@ -491,7 +491,7 @@ GS_EXPORT_CLASS
* NB. because of its security implications it is recommended that you
* do not use URLs with users and passwords unless necessary.
*/
- (NSString *)user;
- (NSString*) user;
@end
@ -501,151 +501,153 @@ GS_EXPORT_CLASS
* Some data has become available. Note that this does not mean that all data
* has become available, only that a chunk of data has arrived.
*/
- (void)URL:(NSURL *)sender resourceDataDidBecomeAvailable:(NSData *)newBytes;
- (void) URL: (NSURL*)sender
resourceDataDidBecomeAvailable: (NSData*)newBytes;
/** <override-dummy />
* Loading of resource data is complete.
*/
- (void)URLResourceDidFinishLoading:(NSURL *)sender;
- (void) URLResourceDidFinishLoading: (NSURL*)sender;
/** <override-dummy />
* Loading of resource data was cancelled by programmatic request
* (not an error).
*/
- (void)URLResourceDidCancelLoading:(NSURL *)sender;
- (void) URLResourceDidCancelLoading: (NSURL*)sender;
/** <override-dummy />
* Loading of resource data has failed, for given human-readable reason.
*/
- (void)URL:(NSURL *)sender resourceDidFailLoadingWithReason:(NSString *)reason;
- (void) URL: (NSURL*)sender
resourceDidFailLoadingWithReason: (NSString*)reason;
@end
/** URL Resource Value Constants **/
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
GS_EXPORT NSString *const NSURLNameKey;
GS_EXPORT NSString *const NSURLLocalizedNameKey;
GS_EXPORT NSString *const NSURLIsRegularFileKey;
GS_EXPORT NSString *const NSURLIsDirectoryKey;
GS_EXPORT NSString *const NSURLIsSymbolicLinkKey;
GS_EXPORT NSString *const NSURLIsVolumeKey;
GS_EXPORT NSString *const NSURLIsPackageKey;
GS_EXPORT NSString *const NSURLIsSystemImmutableKey;
GS_EXPORT NSString *const NSURLIsUserImmutableKey;
GS_EXPORT NSString *const NSURLIsHiddenKey;
GS_EXPORT NSString *const NSURLHasHiddenExtensionKey;
GS_EXPORT NSString *const NSURLCreationDateKey;
GS_EXPORT NSString *const NSURLContentAccessDateKey;
GS_EXPORT NSString *const NSURLContentModificationDateKey;
GS_EXPORT NSString *const NSURLAttributeModificationDateKey;
GS_EXPORT NSString *const NSURLLinkCountKey;
GS_EXPORT NSString *const NSURLParentDirectoryURLKey;
GS_EXPORT NSString *const NSURLVolumeURLKey;
GS_EXPORT NSString *const NSURLTypeIdentifierKey;
GS_EXPORT NSString *const NSURLLocalizedTypeDescriptionKey;
GS_EXPORT NSString *const NSURLLabelNumberKey;
GS_EXPORT NSString *const NSURLLabelColorKey;
GS_EXPORT NSString *const NSURLLocalizedLabelKey;
GS_EXPORT NSString *const NSURLEffectiveIconKey;
GS_EXPORT NSString *const NSURLCustomIconKey;
GS_EXPORT NSString *const NSURLFileSizeKey;
GS_EXPORT NSString *const NSURLFileAllocatedSizeKey;
GS_EXPORT NSString *const NSURLIsAliasFileKey;
GS_EXPORT NSString *const NSURLVolumeLocalizedFormatDescriptionKey;
GS_EXPORT NSString *const NSURLVolumeTotalCapacityKey;
GS_EXPORT NSString *const NSURLVolumeAvailableCapacityKey;
GS_EXPORT NSString *const NSURLVolumeResourceCountKey;
GS_EXPORT NSString *const NSURLVolumeSupportsPersistentIDsKey;
GS_EXPORT NSString *const NSURLVolumeSupportsSymbolicLinksKey;
GS_EXPORT NSString *const NSURLVolumeSupportsHardLinksKey;
GS_EXPORT NSString *const NSURLVolumeSupportsJournalingKey;
GS_EXPORT NSString *const NSURLVolumeIsJournalingKey;
GS_EXPORT NSString *const NSURLVolumeSupportsSparseFilesKey;
GS_EXPORT NSString *const NSURLVolumeSupportsZeroRunsKey;
GS_EXPORT NSString *const NSURLVolumeSupportsCaseSensitiveNamesKey;
GS_EXPORT NSString *const NSURLVolumeSupportsCasePreservedNamesKey;
GS_EXPORT NSString* const NSURLNameKey;
GS_EXPORT NSString* const NSURLLocalizedNameKey;
GS_EXPORT NSString* const NSURLIsRegularFileKey;
GS_EXPORT NSString* const NSURLIsDirectoryKey;
GS_EXPORT NSString* const NSURLIsSymbolicLinkKey;
GS_EXPORT NSString* const NSURLIsVolumeKey;
GS_EXPORT NSString* const NSURLIsPackageKey;
GS_EXPORT NSString* const NSURLIsSystemImmutableKey;
GS_EXPORT NSString* const NSURLIsUserImmutableKey;
GS_EXPORT NSString* const NSURLIsHiddenKey;
GS_EXPORT NSString* const NSURLHasHiddenExtensionKey;
GS_EXPORT NSString* const NSURLCreationDateKey;
GS_EXPORT NSString* const NSURLContentAccessDateKey;
GS_EXPORT NSString* const NSURLContentModificationDateKey;
GS_EXPORT NSString* const NSURLAttributeModificationDateKey;
GS_EXPORT NSString* const NSURLLinkCountKey;
GS_EXPORT NSString* const NSURLParentDirectoryURLKey;
GS_EXPORT NSString* const NSURLVolumeURLKey;
GS_EXPORT NSString* const NSURLTypeIdentifierKey;
GS_EXPORT NSString* const NSURLLocalizedTypeDescriptionKey;
GS_EXPORT NSString* const NSURLLabelNumberKey;
GS_EXPORT NSString* const NSURLLabelColorKey;
GS_EXPORT NSString* const NSURLLocalizedLabelKey;
GS_EXPORT NSString* const NSURLEffectiveIconKey;
GS_EXPORT NSString* const NSURLCustomIconKey;
GS_EXPORT NSString* const NSURLFileSizeKey;
GS_EXPORT NSString* const NSURLFileAllocatedSizeKey;
GS_EXPORT NSString* const NSURLIsAliasFileKey;
GS_EXPORT NSString* const NSURLVolumeLocalizedFormatDescriptionKey;
GS_EXPORT NSString* const NSURLVolumeTotalCapacityKey;
GS_EXPORT NSString* const NSURLVolumeAvailableCapacityKey;
GS_EXPORT NSString* const NSURLVolumeResourceCountKey;
GS_EXPORT NSString* const NSURLVolumeSupportsPersistentIDsKey;
GS_EXPORT NSString* const NSURLVolumeSupportsSymbolicLinksKey;
GS_EXPORT NSString* const NSURLVolumeSupportsHardLinksKey;
GS_EXPORT NSString* const NSURLVolumeSupportsJournalingKey;
GS_EXPORT NSString* const NSURLVolumeIsJournalingKey;
GS_EXPORT NSString* const NSURLVolumeSupportsSparseFilesKey;
GS_EXPORT NSString* const NSURLVolumeSupportsZeroRunsKey;
GS_EXPORT NSString* const NSURLVolumeSupportsCaseSensitiveNamesKey;
GS_EXPORT NSString* const NSURLVolumeSupportsCasePreservedNamesKey;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
GS_EXPORT NSString *const NSURLFileResourceIdentifierKey;
GS_EXPORT NSString *const NSURLVolumeIdentifierKey;
GS_EXPORT NSString *const NSURLPreferredIOBlockSizeKey;
GS_EXPORT NSString *const NSURLIsReadableKey;
GS_EXPORT NSString *const NSURLIsWritableKey;
GS_EXPORT NSString *const NSURLIsExecutableKey;
GS_EXPORT NSString *const NSURLFileSecurityKey;
GS_EXPORT NSString *const NSURLIsMountTriggerKey;
GS_EXPORT NSString *const NSURLFileResourceTypeKey;
GS_EXPORT NSString *const NSURLTotalFileSizeKey;
GS_EXPORT NSString *const NSURLTotalFileAllocatedSizeKey;
GS_EXPORT NSString *const NSURLVolumeSupportsRootDirectoryDatesKey;
GS_EXPORT NSString *const NSURLVolumeSupportsVolumeSizesKey;
GS_EXPORT NSString *const NSURLVolumeSupportsRenamingKey;
GS_EXPORT NSString *const NSURLVolumeSupportsAdvisoryFileLockingKey;
GS_EXPORT NSString *const NSURLVolumeSupportsExtendedSecurityKey;
GS_EXPORT NSString *const NSURLVolumeIsBrowsableKey;
GS_EXPORT NSString *const NSURLVolumeMaximumFileSizeKey;
GS_EXPORT NSString *const NSURLVolumeIsEjectableKey;
GS_EXPORT NSString *const NSURLVolumeIsRemovableKey;
GS_EXPORT NSString *const NSURLVolumeIsInternalKey;
GS_EXPORT NSString *const NSURLVolumeIsAutomountedKey;
GS_EXPORT NSString *const NSURLVolumeIsLocalKey;
GS_EXPORT NSString *const NSURLVolumeIsReadOnlyKey;
GS_EXPORT NSString *const NSURLVolumeCreationDateKey;
GS_EXPORT NSString *const NSURLVolumeURLForRemountingKey;
GS_EXPORT NSString *const NSURLVolumeUUIDStringKey;
GS_EXPORT NSString *const NSURLVolumeNameKey;
GS_EXPORT NSString *const NSURLVolumeLocalizedNameKey;
GS_EXPORT NSString *const NSURLIsUbiquitousItemKey;
GS_EXPORT NSString *const NSURLUbiquitousItemHasUnresolvedConflictsKey;
GS_EXPORT NSString *const NSURLUbiquitousItemIsDownloadingKey;
GS_EXPORT NSString *const NSURLUbiquitousItemIsUploadedKey;
GS_EXPORT NSString *const NSURLUbiquitousItemIsUploadingKey;
GS_EXPORT NSString* const NSURLFileResourceIdentifierKey;
GS_EXPORT NSString* const NSURLVolumeIdentifierKey;
GS_EXPORT NSString* const NSURLPreferredIOBlockSizeKey;
GS_EXPORT NSString* const NSURLIsReadableKey;
GS_EXPORT NSString* const NSURLIsWritableKey;
GS_EXPORT NSString* const NSURLIsExecutableKey;
GS_EXPORT NSString* const NSURLFileSecurityKey;
GS_EXPORT NSString* const NSURLIsMountTriggerKey;
GS_EXPORT NSString* const NSURLFileResourceTypeKey;
GS_EXPORT NSString* const NSURLTotalFileSizeKey;
GS_EXPORT NSString* const NSURLTotalFileAllocatedSizeKey;
GS_EXPORT NSString* const NSURLVolumeSupportsRootDirectoryDatesKey;
GS_EXPORT NSString* const NSURLVolumeSupportsVolumeSizesKey;
GS_EXPORT NSString* const NSURLVolumeSupportsRenamingKey;
GS_EXPORT NSString* const NSURLVolumeSupportsAdvisoryFileLockingKey;
GS_EXPORT NSString* const NSURLVolumeSupportsExtendedSecurityKey;
GS_EXPORT NSString* const NSURLVolumeIsBrowsableKey;
GS_EXPORT NSString* const NSURLVolumeMaximumFileSizeKey;
GS_EXPORT NSString* const NSURLVolumeIsEjectableKey;
GS_EXPORT NSString* const NSURLVolumeIsRemovableKey;
GS_EXPORT NSString* const NSURLVolumeIsInternalKey;
GS_EXPORT NSString* const NSURLVolumeIsAutomountedKey;
GS_EXPORT NSString* const NSURLVolumeIsLocalKey;
GS_EXPORT NSString* const NSURLVolumeIsReadOnlyKey;
GS_EXPORT NSString* const NSURLVolumeCreationDateKey;
GS_EXPORT NSString* const NSURLVolumeURLForRemountingKey;
GS_EXPORT NSString* const NSURLVolumeUUIDStringKey;
GS_EXPORT NSString* const NSURLVolumeNameKey;
GS_EXPORT NSString* const NSURLVolumeLocalizedNameKey;
GS_EXPORT NSString* const NSURLIsUbiquitousItemKey;
GS_EXPORT NSString* const NSURLUbiquitousItemHasUnresolvedConflictsKey;
GS_EXPORT NSString* const NSURLUbiquitousItemIsDownloadingKey;
GS_EXPORT NSString* const NSURLUbiquitousItemIsUploadedKey;
GS_EXPORT NSString* const NSURLUbiquitousItemIsUploadingKey;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_8, GS_API_LATEST)
GS_EXPORT NSString *const NSURLIsExcludedFromBackupKey;
GS_EXPORT NSString *const NSURLPathKey;
GS_EXPORT NSString* const NSURLIsExcludedFromBackupKey;
GS_EXPORT NSString* const NSURLPathKey;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST)
GS_EXPORT NSString *const NSURLTagNamesKey;
GS_EXPORT NSString *const NSURLUbiquitousItemDownloadingStatusKey;
GS_EXPORT NSString *const NSURLUbiquitousItemDownloadingErrorKey;
GS_EXPORT NSString *const NSURLUbiquitousItemUploadingErrorKey;
GS_EXPORT NSString* const NSURLTagNamesKey;
GS_EXPORT NSString* const NSURLUbiquitousItemDownloadingStatusKey;
GS_EXPORT NSString* const NSURLUbiquitousItemDownloadingErrorKey;
GS_EXPORT NSString* const NSURLUbiquitousItemUploadingErrorKey;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
GS_EXPORT NSString *const NSURLGenerationIdentifierKey;
GS_EXPORT NSString *const NSURLDocumentIdentifierKey;
GS_EXPORT NSString *const NSURLAddedToDirectoryDateKey;
GS_EXPORT NSString *const NSURLQuarantinePropertiesKey;
GS_EXPORT NSString *const NSThumbnail1024x1024SizeKey;
GS_EXPORT NSString *const NSURLUbiquitousItemDownloadRequestedKey;
GS_EXPORT NSString *const NSURLUbiquitousItemContainerDisplayNameKey;
GS_EXPORT NSString* const NSURLGenerationIdentifierKey;
GS_EXPORT NSString* const NSURLDocumentIdentifierKey;
GS_EXPORT NSString* const NSURLAddedToDirectoryDateKey;
GS_EXPORT NSString* const NSURLQuarantinePropertiesKey;
GS_EXPORT NSString* const NSThumbnail1024x1024SizeKey;
GS_EXPORT NSString* const NSURLUbiquitousItemDownloadRequestedKey;
GS_EXPORT NSString* const NSURLUbiquitousItemContainerDisplayNameKey;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST)
GS_EXPORT NSString *const NSURLIsApplicationKey;
GS_EXPORT NSString *const NSURLApplicationIsScriptableKey;
GS_EXPORT NSString* const NSURLIsApplicationKey;
GS_EXPORT NSString* const NSURLApplicationIsScriptableKey;
#endif
/** Possible values for File Resource Type Key **/
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
GS_EXPORT NSString *const NSURLFileResourceTypeNamedPipe;
GS_EXPORT NSString *const NSURLFileResourceTypeCharacterSpecial;
GS_EXPORT NSString *const NSURLFileResourceTypeDirectory;
GS_EXPORT NSString *const NSURLFileResourceTypeBlockSpecial;
GS_EXPORT NSString *const NSURLFileResourceTypeRegular;
GS_EXPORT NSString *const NSURLFileResourceTypeSymbolicLink;
GS_EXPORT NSString *const NSURLFileResourceTypeSocket;
GS_EXPORT NSString *const NSURLFileResourceTypeUnknown;
GS_EXPORT NSString* const NSURLFileResourceTypeNamedPipe;
GS_EXPORT NSString* const NSURLFileResourceTypeCharacterSpecial;
GS_EXPORT NSString* const NSURLFileResourceTypeDirectory;
GS_EXPORT NSString* const NSURLFileResourceTypeBlockSpecial;
GS_EXPORT NSString* const NSURLFileResourceTypeRegular;
GS_EXPORT NSString* const NSURLFileResourceTypeSymbolicLink;
GS_EXPORT NSString* const NSURLFileResourceTypeSocket;
GS_EXPORT NSString* const NSURLFileResourceTypeUnknown;
#endif
/** Possible values for Ubiquitous Item Downloading Key **/
#if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST)
GS_EXPORT NSString *const NSURLUbiquitousItemDownloadingStatusNotDownloaded;
GS_EXPORT NSString *const NSURLUbiquitousItemDownloadingStatusDownloaded;
GS_EXPORT NSString *const NSURLUbiquitousItemDownloadingStatusCurrent;
GS_EXPORT NSString* const NSURLUbiquitousItemDownloadingStatusNotDownloaded;
GS_EXPORT NSString* const NSURLUbiquitousItemDownloadingStatusDownloaded;
GS_EXPORT NSString* const NSURLUbiquitousItemDownloadingStatusCurrent;
#endif
#endif /* GS_API_MACOSX */
#endif /* GS_API_MACOSX */
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
#import <GNUstepBase/NSURL+GNUstepBase.h>
#endif
@ -654,31 +656,32 @@ GS_EXPORT NSString *const NSURLUbiquitousItemDownloadingStatusCurrent;
GS_EXPORT_CLASS
@interface NSURLQueryItem : NSObject <NSCopying, NSCoding>
{
#if GS_EXPOSE(NSURLQueryItem)
#if GS_EXPOSE(NSURLQueryItem)
#endif
#if GS_NONFRAGILE
#if defined(GS_NSURLQueryItem_IVARS)
#if GS_NONFRAGILE
# if defined(GS_NSURLQueryItem_IVARS)
@public
GS_NSURLQueryItem_IVARS;
#endif
GS_NSURLQueryItem_IVARS;
# endif
#else
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private
id _internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
// Creating query items.
+ (instancetype)queryItemWithName:(NSString *)name value:(NSString *)value;
- (instancetype)initWithName:(NSString *)name value:(NSString *)value;
+ (instancetype)queryItemWithName:(NSString *)name
value:(NSString *)value;
- (instancetype)initWithName:(NSString *)name
value:(NSString *)value;
// Reading a name and value from a query
- (NSString *)name;
- (NSString *)value;
- (NSString *) name;
- (NSString *) value;
@end
#endif // OS_API_VERSION
@ -688,96 +691,99 @@ GS_EXPORT_CLASS
GS_EXPORT_CLASS
@interface NSURLComponents : NSObject <NSCopying>
{
#if GS_EXPOSE(NSURLComponents)
#if GS_EXPOSE(NSURLComponents)
#endif
#if GS_NONFRAGILE
#if defined(GS_NSURLComponents_IVARS)
#if GS_NONFRAGILE
# if defined(GS_NSURLComponents_IVARS)
@public
GS_NSURLComponents_IVARS;
#endif
GS_NSURLComponents_IVARS;
# endif
#else
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private
id _internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
// Creating URL components...
+ (instancetype)componentsWithString:(NSString *)URLString;
+ (instancetype)componentsWithURL:(NSURL *)url
resolvingAgainstBaseURL:(BOOL)resolve;
- (instancetype)init;
// Creating URL components...
+ (instancetype) componentsWithString:(NSString *)URLString;
+ (instancetype) componentsWithURL:(NSURL *)url
resolvingAgainstBaseURL:(BOOL)resolve;
- (instancetype) init;
- (instancetype)initWithString:(NSString *)URLString;
- (instancetype)initWithURL:(NSURL *)url resolvingAgainstBaseURL:(BOOL)resolve;
- (instancetype)initWithURL:(NSURL *)url
resolvingAgainstBaseURL:(BOOL)resolve;
// Getting the URL
- (NSString *)string;
- (void)setString:(NSString *)urlString;
- (NSURL *)URL;
- (void)setURL:(NSURL *)url;
- (NSURL *)URLRelativeToURL:(NSURL *)baseURL;
- (NSString *) string;
- (void) setString: (NSString *)urlString;
- (NSURL *) URL;
- (void) setURL: (NSURL *)url;
- (NSURL *)URLRelativeToURL: (NSURL *)baseURL;
// Accessing Components in Native Format
- (NSString *)fragment;
- (void)setFragment:(NSString *)fragment;
- (NSString *)host;
- (void)setHost:(NSString *)host;
- (NSString *)password;
- (void)setPassword:(NSString *)password;
- (NSString *)path;
- (void)setPath:(NSString *)path;
- (NSNumber *)port;
- (void)setPort:(NSNumber *)port;
- (NSString *)query;
- (void)setQuery:(NSString *)query;
- (NSString *) fragment;
- (void) setFragment: (NSString *)fragment;
- (NSString *) host;
- (void) setHost: (NSString *)host;
- (NSString *) password;
- (void) setPassword: (NSString *)password;
- (NSString *) path;
- (void) setPath: (NSString *)path;
- (NSNumber *) port;
- (void) setPort: (NSNumber *)port;
- (NSString *) query;
- (void) setQuery: (NSString *)query;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
- (NSArray *)queryItems;
- (void)setQueryItems:(NSArray *)queryItems;
- (NSArray *) queryItems;
- (void) setQueryItems: (NSArray *)queryItems;
#endif
- (NSString *)scheme;
- (void)setScheme:(NSString *)scheme;
- (NSString *)user;
- (void)setUser:(NSString *)user;
- (NSString *) scheme;
- (void) setScheme: (NSString *)scheme;
- (NSString *) user;
- (void) setUser: (NSString *)user;
// Accessing Components in PercentEncoded Format
- (NSString *)percentEncodedFragment;
- (void)setPercentEncodedFragment:(NSString *)fragment;
- (NSString *)percentEncodedHost;
- (void)setPercentEncodedHost:(NSString *)host;
- (NSString *)percentEncodedPassword;
- (void)setPercentEncodedPassword:(NSString *)password;
- (NSString *)percentEncodedPath;
- (void)setPercentEncodedPath:(NSString *)path;
- (NSString *)percentEncodedQuery;
- (void)setPercentEncodedQuery:(NSString *)query;
- (NSString *) percentEncodedFragment;
- (void) setPercentEncodedFragment: (NSString *)fragment;
- (NSString *) percentEncodedHost;
- (void) setPercentEncodedHost: (NSString *)host;
- (NSString *) percentEncodedPassword;
- (void) setPercentEncodedPassword: (NSString *)password;
- (NSString *) percentEncodedPath;
- (void) setPercentEncodedPath: (NSString *)path;
- (NSString *) percentEncodedQuery;
- (void) setPercentEncodedQuery: (NSString *)query;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
- (NSArray *)percentEncodedQueryItems;
- (void)setPercentEncodedQueryItems:(NSArray *)queryItems;
- (NSArray *) percentEncodedQueryItems;
- (void) setPercentEncodedQueryItems: (NSArray *)queryItems;
#endif
- (NSString *)percentEncodedUser;
- (void)setPercentEncodedUser:(NSString *)user;
- (NSString *) percentEncodedUser;
- (void) setPercentEncodedUser: (NSString *)user;
// Locating components of the URL string representation
- (NSRange)rangeOfFragment;
- (NSRange)rangeOfHost;
- (NSRange)rangeOfPassword;
- (NSRange)rangeOfPath;
- (NSRange)rangeOfPort;
- (NSRange)rangeOfQuery;
- (NSRange)rangeOfScheme;
- (NSRange)rangeOfUser;
- (NSRange) rangeOfFragment;
- (NSRange) rangeOfHost;
- (NSRange) rangeOfPassword;
- (NSRange) rangeOfPath;
- (NSRange) rangeOfPort;
- (NSRange) rangeOfQuery;
- (NSRange) rangeOfScheme;
- (NSRange) rangeOfUser;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* GS_API_MACOSX */
#endif /* __NSURL_h_GNUSTEP_BASE_INCLUDE */
#endif /* __NSURL_h_GNUSTEP_BASE_INCLUDE */

File diff suppressed because it is too large Load diff