Carbon


URLEvent

Header: URLAccess.h

enum URLEvent {
    kURLInitiatedEvent = 1,
    kURLResourceFoundEvent = 4,
    kURLDownloadingEvent = 5,
    kURLAbortInitiatedEvent = 8,
    kURLCompletedEvent = 9,
    kURLErrorOccurredEvent = 7,
    kURLDataAvailableEvent = 21,
    kURLTransactionCompleteEvent = 6,
    kURLUploadingEvent = 10,
    kURLSystemEvent = 29,
    kURLPercentEvent = 30,
    kURLPeriodicEvent = 31,
    kURLPropertyChangedEvent = 32
};

Constant descriptions

kURLInitiatedEvent

Indicates the function URLOpen has been called but the location specified by the URL reference has not yet been accessed.

kURLResourceFoundEvent

Indicates that the location specified by the URL reference has been accessed and is valid.

kURLDownloadingEvent

Indicates that a download operation is in progress.

kURLAbortInitiatedEvent

Indicates that a data transfer operation has been aborted. When your application calls the function URLAbort, the URL Access Manager changes the state returned by the function URLGetCurrentState to kURLAbortingState and passes the constant kURLAbortInitiatedEvent to your notification callback function. When data transfer is terminated, the URL Access Manager changes the state returned by URLGetCurrentState to kURLCompletedState and passes the constant kURLCompletedEvent in the event parameter of your notification callback function.

kURLCompletedEvent

Indicates that all operations associated with a call to URLOpen have been completed. This includes the successful completion of a download or upload operation or the completion of cleanup work after aborting a download or upload operation. For example, when a data transfer operation is aborted, the URL Access Manager changes the state returned by the function URLGetCurrentState to kURLCompletedState and passes the constant kURLCompletedEvent in the event parameter of your notification callback function.

kURLErrorOccurredEvent

Indicates that an error occurred during data transfer. If you receive this event, you may wish to call the function URLGetError to determine the nature of the error.

kURLDataAvailableEvent

Indicates that data is available in buffers. If you receive this event, you can call the function URLGetBuffer to obtain the next buffer of data. You may wish to call the function URLGetDataAvailable to determine the amount of data available for retrieval in a download operation. Note that if you pass a valid file specification in the fileSpec parameter of URLOpen, your notification callback function will not be called for data available events.

kURLTransactionCompleteEvent

Indicates that a download operation is complete because there is no more data to retrieve from buffers. Note that if you pass a valid file specification in the fileSpec parameter of URLOpen, your notification callback function will not be called for transaction completed events.

kURLUploadingEvent

Indicates that an upload operation is in progress.

kURLSystemEvent

Indicates that a system event has occurred.

kURLPercentEvent

Indicates that the size of the data being downloaded is known. In this case, an increment of one percent of the data was transferred into buffers.

kURLPeriodicEvent

Indicates that a time interval of approximately one quarter of a second has passed.

kURLPropertyChangedEvent

Indicates that a property such as a filename has become known or changed. In this case, the name of the changed property will be passed to your notification function via the property field of the callbackInfo structure.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)