![]() |
Data Transfer Options Mask Constants |
Header: URLAccess.h |
Represent a mask that identifies the data transfer options to use when uploading or downloading data.
enum URLOpenFlags { kURLReplaceExistingFlag = 1, kURLBinHexFileFlag = 2, kURLExpandFileFlag = 4, kURLDisplayProgressFlag = 8, kURLDisplayAuthFlag = 16, kURLUploadFlag = 32, kURLIsDirectoryHintFlag = 64, kURLDoNotTryAnonymousFlag = 128, kURLDirectoryListingFlag = 256, kURLExpandAndVerifyFlag = 512, kURLNoAutoRedirectFlag = 1024, kURLDebinhexOnlyFlag = 2048, kURLReservedFlag = -2147483648 };
If the bit specified by this mask is set and the destination file or directory exists, the file or directory contents are replaced by the newly downloaded or uploaded data. If this bit is not set and the name of the file is specified and does exist, the URL Access Manager returns the result code kURLDestinationExistsError. If the name of the file or directory is not specified, the file or directory already exists, and the bit specified by this mask is not set, a number is appended to the name before any extension until a unique name is created, and the data is transferred to the new file or directory name without notifying the calling application that the name has changed. In the case of a download operation, your application can check the destination parameter of the functions URLDownload
to obtain the new filename.
If the bit specified by this mask is set, the URL Access Manager converts a nontext file that has a resource fork to BinHex format before uploading it.
If the bit specified by this mask is set, files in BinHex format are decoded. If version 5.0 of the Stuffit Engine is installed in the System Folder, the URL Access Manager uses it to expand the file.
If the bit specified by this mask is set, the URL Access Manager displays a nonmovable modal progress indicator during data transfer operations only if you have not provided a system event notification callback. On Mac OS X, dialog boxes will always be moveable. To handle data transfer events that occur while a progress indicator is being displayed, pass a UPP to your data transfer event notification callback in the eventProc parameter of the functions URLDownload
,
If the bit specified by this mask is set, the URL Access Manager displays a nonmovable modal authentication dialog box when user authentication is required only if you have not provided a system event notification callback. On Mac OS X, dialog boxes will always be moveable. To handle data transfer events that occur while an authentication dialog box is being displayed, pass a UPP to your data transfer event notification callback in the eventProc parameter of the functions URLDownload
,
If the bit specified by this mask is set, the function
If the bit specified by this mask is set, download operations assume that the URL points to a directory. Note that if you pass a pathname that specifies a file in the url parameter of the function
If the bits specified by this mask is set, when FTP authentication occurs, the functions URLDownload
,
If the bit specified by this mask is set, a listing of the directory, rather than the entire directory, is downloaded. If the URL points to a file instead of a directory, the file is downloaded. Note that if you pass a pathname that specifies a file in the url parameter of the function
If this flag is available (that is, the File Signing shared library is available) and the bit specified by this mask is set, the signature attached to the file is verified. Success indicates that the file was signed by the certificate authority, but the certificate will not be displayed until after the file is downloaded.
If the bit specified by this mask is set, if an HTTP request returns a redirect status (300, 301, or 302), the transfer will complete without attempting to redirect to the next URL. Otherwise, redirects are followed until actual data is encountered or an error is returned.
If the bit specified by this mask is set, the internal engine is used to decode files, rather than the external Stuffit Engine, even if Stuffit is installed. This prevents the display of the Stuffit progress user interface. If you set this bit, you must also set the kURLExpandAndVerifyFlag mask.
Reserved for internal use.
The URLOpenFlags enumeration defines masks you can use to identify the data transfer options you want used when performing data transfer operations. You pass this mask in the openFlags parameter of the functions URLSimpleDownload, URLDownload, URLSimpleUpload, URLUpload, and URLOpen.
For upload operations, you can specify any of the following masks: kURLReplaceExistingFlag, kURLBinHexFileFlag, kURLDisplayProgressFlag, kURLDisplayAuthFlag, and kURLDoNotTryAnonymousFlag. For download operations, you can specify any of the following masks: kURLReplaceExistingFlag, kURLExpandFileFlag, kURLExpandAndVerifyFlag, kURLDisplayProgressFlag, kURLDisplayAuthFlag, kURLIsDirectoryHintFlag, kURLDoNotTryAnonymousFlag, and kURLDirectoryListingFlag.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)