webkit.download
Module for [Download] class
Types 3
Object used to communicate with the application when downloading.
#WebKitDownload carries information about a download request and response, including a #WebKitURIRequest and a #WebKitURIResponse objects. The application may use this object to control the download process, or to simply figure out what is to be downloaded, and handle the download process itself.
Methods
DownloadGidBuilder builder()Get builder for [webkit.download.Download] Returns: New builder objectbool allowOverwrite() @propertyGet `allowOverwrite` property. Returns: Whether or not the download is allowed to overwrite an existing file on disk. If this property is false and the destination already exists, the download will...void allowOverwrite(bool propval) @propertySet `allowOverwrite` property. Params: propval = Whether or not the download is allowed to overwrite an existing file on disk. If this property is false and the destination already exists, the down...string destination() @propertyGet `destination` property. Returns: The local path to where the download will be saved.double estimatedProgress() @propertyGet `estimatedProgress` property. Returns: An estimate of the percent completion for the download operation. This value will range from 0.0 to 1.0. The value is an estimate based on the total numbe...webkit.uriresponse.URIResponse response() @propertyGet `response` property. Returns: The #WebKitURIResponse associated with this download.void cancel()Cancels the download.bool getAllowOverwrite()Returns the current value of the #WebKitDownload:allow-overwrite property.string getDestination()Obtains the destination to which the downloaded file will be written.double getElapsedTime()Gets the elapsed time in seconds, including any fractional part.double getEstimatedProgress()Gets the value of the #WebKitDownload:estimated-progress property. Gets the value of the #WebKitDownload:estimated-progress property. You can monitor the estimated progress of the download operatio...ulong getReceivedDataLength()Gets the length of the data already downloaded for download.webkit.urirequest.URIRequest getRequest()Retrieves the #WebKitURIRequest object that backs the download process. Returns: the #WebKitURIRequest of downloadwebkit.uriresponse.URIResponse getResponse()Retrieves the #WebKitURIResponse object that backs the download process.webkit.web_view.WebView getWebView()Get the #WebKitWebView that initiated the download. Returns: the #WebKitWebView that initiated download, or null if download was not initiated by a #WebKitWebView.void setAllowOverwrite(bool allowed)Sets the #WebKitDownload:allow-overwrite property.void setDestination(string destination)Sets the destination to which the downloaded file will be written.gulong connectCreatedDestination(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == string)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : webkit.download.Download)))
&& Parameters!T.length < 3)Connect to `CreatedDestination` signal.gulong connectDecideDestination(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == string)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : webkit.download.Download)))
&& Parameters!T.length < 3)Connect to `DecideDestination` signal.gulong connectFailed(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == glib.error.ErrorWrap)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : webkit.download.Download)))
&& Parameters!T.length < 3)Connect to `Failed` signal.gulong connectFinished(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : webkit.download.Download)))
&& Parameters!T.length < 2)Connect to `Finished` signal.gulong connectReceivedData(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == ulong)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : webkit.download.Download)))
&& Parameters!T.length < 3)Connect to `ReceivedData` signal.Methods
T allowOverwrite(bool propval)Set `allowOverwrite` property. Params: propval = Whether or not the download is allowed to overwrite an existing file on disk. If this property is false and the destination already exists, the down...