Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Cyberdog Programmer's Kit / Part 3 - Cyberdog Reference
Chapter 6 - Types, Constants, and Global Functions / Programmer-Defined Functions


MyDownloadCompleted

Responds to notification that a request to download data referenced by a Cyberdog item and save it to disk has been completed.

void MyDownloadCompleted (Environment* ev,
CyberItem* item,
CDDownloadEvent eventCode,
FSSpec* destFile,
Ptr userDataPtr);
ev
A pointer to the SOM environment parameter used to pass exceptions.
item
A pointer to the Cyberdog item whose data was to be downloaded.
eventCode
A code that indicates whether the data referenced by the Cyberdog item was downloaded and saved to a file successfully.
destFile
A pointer to the file specification where the data referenced by the Cyberdog item was stored.
userDataPtr
A pointer to data that may be useful when a download operation has completed.
DISCUSSION
The download part calls your download notification function when it is finished trying to download the content referenced by a Cyberdog item and save it to disk. You register your download notification function when you call the PostDownloadRequest method. Your notification function can test the eventCode parameter to determine whether the download operation succeeded, failed, or was canceled.

The userDataPtr parameter contains a pointer to data that may be useful when responding to notification that a download request has been completed. For example, this parameter might point to a C++ class that defines a method that is called if the Cyberdog item is downloaded successfully.

SEE ALSO
The CDDownloadEvent type (page 175).
The CyberDownloadExtension::PostDownloadRequest method (page 215).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996