|
Graphics.UI.Gtk.WebKit.Download | Portability | portable (depends on GHC) | Stability | provisional | Maintainer | gtk2hs-users@lists.sourceforge.net |
|
|
|
|
|
Description |
Object used to communicate with the application when downloading
|
|
Synopsis |
|
|
|
|
Types
|
|
|
|
Enums
|
|
|
Constructors | DownloadErrorCancelledByUser | | DownloadErrorDestination | | DownloadErrorNetwork | |
|
|
|
|
Constructors | DownloadStatusError | | DownloadStatusCreated | | DownloadStatusStarted | | DownloadStatusCancelled | | DownloadStatusFinished | |
|
|
|
Constructors
|
|
|
Create a new Download instance for the given NetworkRequest
Object used to communicate with the application when downloading.
|
|
Methods
|
|
downloadStart :: DownloadClass self => self -> IO () | Source |
|
Initiates the Download.
Notice that you must have set the destination-uri property before
calling this function.
|
|
downloadCancel :: DownloadClass self => self -> IO () | Source |
|
Cancels the Download.
|
|
|
:: DownloadClass self | | => self | the uri or Nothing in case of failed
| -> IO (Maybe String) | | Retrieves the URI from Download which is being downloaded.
|
|
|
|
Retrieves the NetworkRequest that backs the download process.
|
|
downloadGetSuggestedFilename | Source |
|
:: DownloadClass self | | => self | the suggested filename or Nothing in case of failed
| -> IO (Maybe String) | | Retrieves the filename that was suggested by the server,
or the one derived from the URI.
|
|
|
|
Obtains the URI to which the downloaded file will be written.
It is set by Application before call downloadStart
|
|
|
:: DownloadClass self | | => self | a Double ranging from 0.0 to 1.0
| -> IO Double | | Determines the current progress of the Download
|
|
|
|
:: DownloadClass self | | => self | seconds since the Download was started.
| -> IO Double | | Return elapsed time for the Download in seconds.
includeing any fractional part.
If the Download is finished, had an error or was cancelled,
this is the time between its start and the event.
|
|
|
|
:: DownloadClass self | | => self | the expected total size of the downloaded file.
| -> IO Int | | Returns the excepted total size of the download.
This is expected because the server may provide incorrect or missing
Content-Length.
Notice that this may grow over time.
|
|
|
|
:: DownloadClass self | | => self | the already downloaded size.
| -> IO Int | | Returns the current already downleaded size
|
|
|
|
|
|
downloadSetDestinationUri | Source |
|
:: DownloadClass self | | => self | destination_uri - the destination URI
| -> String | | -> IO () | | Defines the URI that should be used to save the downloaded file to.
|
|
|
Attributes
|
|
|
The length of the data already downloaded
Default value: 0
|
|
|
The URI of the save location for this download.
Default value: ""
|
|
|
The NetworkRequest instance associated with the download.
|
|
|
The NetworkResponse instance associated with the download.
|
|
|
Determines the current progress of the download.
Notice that, although the progress changes are reported as soon as possible,
the emission of the notify signal for this property is throttled, for the benefit of download managers.
If you care about every update, use Download : currentSize.
Allowed values: [0,1]
Default value: 1
|
|
|
Determines the current status of the download.
Default value: DownloadStatusCreated
|
|
|
The file name suggested as default when saving
Default value: ""
|
|
|
The total size of the file
Default value: 0
|
|
Signals
|
|
|
Emitted when download is interrupted either by user action or by network errors,
errorDetail will take any value of DownloadError.
download: the object on which the signal is emitted
errorCode: the corresponding error code
errorDetail: detailed error code for the error, see DownloadError
reason: a string describing the error
Since 1.1.2
|
|
Produced by Haddock version 2.6.0 |