|
|
NSObject(XGFileDownloadDelegate) |
| Extends Class: | |
| Declared In: |
The XGFileDownloadDelegate delegate is used to receive the content data and report the progress of the download.
This method is called when enough information has been loaded to decide a destination for the downloaded file.
This method is called if the download creates a downloaded file.
This method is called when the download has failed.
This method is called when the download has loaded the attributes of the file.
This method is called when the download has loaded data.
This method is called immediately after the download has started.
This method is called when the download has finished downloading.
fileDownload:decideDestinationWithSuggestedPath: |
This method is called when enough information has been loaded to decide a destination for the downloaded file.
- (void)fileDownload:(XGFileDownload *)fileDownload decideDestinationWithSuggestedPath:(NSString *)path;
fileDownloadThe download that requests the download path.
filenameThe suggested relative path for deciding the path of the downloaded file.
Once the delegate has decided a path, it should call setDestination:allowOverwrite:. This delegate method will not be called if setDestination:allowOverwrite: has already been called. If the destination is not set, or if the destination is set to nil, no file will be saved to disk.
fileDownload:didCreateDestination: |
This method is called if the download creates a downloaded file.
- (void)fileDownload:(XGFileDownload *)fileDownload didCreateDestination:(NSString *)destination;
fileDownloadThe download that created the downloaded file.
pathThe path of the downloaded file.
fileDownload:didFailWithError: |
This method is called when the download has failed.
- (void)fileDownload:(XGFileDownload *)fileDownload didFailWithError:(NSError *)error;
fileDownloadThe download that ended in error.
errorThe error caused the download to fail.
This method is called when the download encounters a network or file I/O related error. This method or downloadDidFinish: will only be called once.
fileDownload:didReceiveAttributes: |
This method is called when the download has loaded the attributes of the file.
- (void)fileDownload:(XGFileDownload *)fileDownload didReceiveAttributes:(NSDictionary *)attributes;
fileDownloadThe download that has received the attributes.
dataThe received attributes.
This method will be called once.
fileDownload:didReceiveData: |
This method is called when the download has loaded data.
- (void)fileDownload:(XGFileDownload *)fileDownload didReceiveData:(NSData *)data;
fileDownloadThe download that has received data.
dataThe received data.
This method will be called one or more times. If the download is also being written to disk then this method will be called immediately after the data is written to disk.
fileDownloadDidBegin: |
This method is called immediately after the download has started.
- (void)fileDownloadDidBegin:(XGFileDownload *)fileDownload;
fileDownloadThe download that just started downloading.
fileDownloadDidFinish: |
This method is called when the download has finished downloading.
- (void)fileDownloadDidFinish:(XGFileDownload *)fileDownload;
fileDownloadThe download that has finished downloading.
This method is called after all the data has been received and written to disk. This method or download:didFailWithError: will only be called once.
Last Updated: 2009-08-12