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 7 - Classes and Methods


CyberDownloadExtension

Superclasses
CyberExtension --> ODExtension --> ODRefCntObject --> ODObject
Subclasses
none
The CyberDownloadExtension class defines extra behaviors for a part that is to be used as a download part.

Description

The CyberDownloadExtension class is an extension that allows a part to be used as a download part, which downloads content referenced by a Cyberdog item to disk. A Cyberdog download part has two extensions: a CyberDownloadExtension subclass extension and a CyberPartExtension subclass extension.

CyberDownloadExtension is an abstract superclass that you must subclass and implement to create your own customized download part. Cyberdog provides a fully implemented download part; to use this download part, you do not need to subclass this class.

The download part is used in several situations, such as the following:

The CyberDownloadExtension interface provides two different methods for queuing requests to download the content referenced by a Cyberdog item and save it to a file: DownloadCyberItem and PostDownloadRequest. Both methods add a request to download data to the download part's queue. You initiate pending download requests by calling StartDownloads.

The DownloadCyberItem method is the simplest method to use; when you call it, you pass the Cyberdog item and the specification of the destination file. The PostDownloadRequest method allows you to register a function that Cyberdog can call to notify you when the download is complete. In addition, the PostDownloadRequest method allows you to specify whether you want the downloaded file to be decompressed before it is saved.

The download part requests and uses a Cyberdog item's associated stream to download the Cyberdog item. When the download part is finished processing its download requests, it destroys itself.

Methods

This section presents summary descriptions of the CyberDownloadExtension methods grouped according to purpose, followed by detailed descriptions.

Requesting a Download

CancelRequest
Cancels a request to download data to disk.
DownloadCyberItem
Requests the download of data referenced by a Cyberdog item to disk.
PostDownloadRequest
Requests the download of data referenced by Cyberdog item to disk and registers a completion notification function.
Initiating a Download Request

StartDownloads
Initiates the download requests queued for a download part.

Methods
CancelRequest
DownloadCyberItem
PostDownloadRequest
StartDownloads

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996