gi-webkit-3.0.12: WebKit bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit.Objects.Download

Contents

Description

Download carries information about a download request, including a NetworkRequest object. The application may use this object to control the download process, or to simply figure out what is to be downloaded, and do it itself.

Synopsis

Exported types

newtype Download Source #

Constructors

Download (ManagedPtr Download) 

Instances

GObject Download Source # 
IsObject Download Source # 
IsDownload Download Source # 
((~) * info (ResolveDownloadMethod t Download), MethodInfo * info Download p) => IsLabel t (Download -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Download -> p #

((~) * info (ResolveDownloadMethod t Download), MethodInfo * info Download p) => IsLabelProxy t (Download -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Download -> p #

HasAttributeList * Download Source # 
type AttributeList Download Source # 
type SignalList Download Source # 

Methods

cancel

data DownloadCancelMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsDownload a) => MethodInfo * DownloadCancelMethodInfo a signature Source # 

downloadCancel Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m () 

Cancels the download. Calling this will not free the Download object, so you still need to call objectUnref on it, if you are the owner of a reference. Notice that cancelling the download provokes the emission of the WebKitDownload::error signal, reporting that the download was cancelled.

Since: 1.1.2

getCurrentSize

downloadGetCurrentSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m Word64

Returns: the already downloaded size

Current already downloaded size.

Since: 1.1.2

getDestinationUri

downloadGetDestinationUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m Text

Returns: the destination URI or Nothing

Obtains the URI to which the downloaded file will be written. This must have been set by the application before calling downloadStart, and may be Nothing.

Since: 1.1.2

getElapsedTime

downloadGetElapsedTime Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: a Download

-> m Double

Returns: seconds since the download was started, as a gdouble

Elapsed time for the download in seconds, including any fractional part. If the download is finished, had an error or was cancelled this is the time between its start and the event.

Since: 1.1.2

getNetworkRequest

downloadGetNetworkRequest Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m NetworkRequest

Returns: the NetworkRequest instance

Retrieves the NetworkRequest object that backs the download process.

Since: 1.1.2

getNetworkResponse

downloadGetNetworkResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m NetworkResponse

Returns: the NetworkResponse instance

Retrieves the NetworkResponse object that backs the download process.

Since: 1.1.16

getProgress

downloadGetProgress Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: a Download

-> m Double

Returns: a gdouble ranging from 0.0 to 1.0.

Determines the current progress of the download.

Since: 1.1.2

getStatus

downloadGetStatus Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m DownloadStatus

Returns: the current DownloadStatus

Obtains the current status of the download, as a DownloadStatus.

Since: 1.1.2

getSuggestedFilename

downloadGetSuggestedFilename Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m Text

Returns: the suggested filename

Retrieves the filename that was suggested by the server, or the one derived by WebKit from the URI.

Since: 1.1.2

getTotalSize

downloadGetTotalSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m Word64

Returns: the expected total size of the downloaded file

Returns the expected 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, as it will be always the same as current_size in the cases where current size surpasses it.

Since: 1.1.2

getUri

data DownloadGetUriMethodInfo Source #

Instances

((~) * signature (m Text), MonadIO m, IsDownload a) => MethodInfo * DownloadGetUriMethodInfo a signature Source # 

downloadGetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m Text

Returns: the URI

Convenience method to retrieve the URI from the NetworkRequest which is being downloaded.

Since: 1.1.2

new

downloadNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkRequest a) 
=> a

request: a NetworkRequest

-> m Download

Returns: the new Download

Creates a new Download object for the given NetworkRequest object.

Since: 1.1.2

setDestinationUri

downloadSetDestinationUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> Text

destinationUri: the destination URI

-> m () 

Defines the URI that should be used to save the downloaded file to.

Since: 1.1.2

start

data DownloadStartMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsDownload a) => MethodInfo * DownloadStartMethodInfo a signature Source # 

downloadStart Source #

Arguments

:: (HasCallStack, MonadIO m, IsDownload a) 
=> a

download: the Download

-> m () 

Initiates the download. Notice that you must have set the destination-uri property before calling this method.

Since: 1.1.2

Properties

currentSize

data DownloadCurrentSizePropertyInfo Source #

Instances

AttrInfo DownloadCurrentSizePropertyInfo Source # 
type AttrOrigin DownloadCurrentSizePropertyInfo Source # 
type AttrLabel DownloadCurrentSizePropertyInfo Source # 
type AttrGetType DownloadCurrentSizePropertyInfo Source # 
type AttrBaseTypeConstraint DownloadCurrentSizePropertyInfo Source # 
type AttrSetTypeConstraint DownloadCurrentSizePropertyInfo Source # 
type AttrAllowedOps DownloadCurrentSizePropertyInfo Source # 

destinationUri

data DownloadDestinationUriPropertyInfo Source #

Instances

AttrInfo DownloadDestinationUriPropertyInfo Source # 
type AttrOrigin DownloadDestinationUriPropertyInfo Source # 
type AttrLabel DownloadDestinationUriPropertyInfo Source # 
type AttrGetType DownloadDestinationUriPropertyInfo Source # 
type AttrBaseTypeConstraint DownloadDestinationUriPropertyInfo Source # 
type AttrSetTypeConstraint DownloadDestinationUriPropertyInfo Source # 
type AttrAllowedOps DownloadDestinationUriPropertyInfo Source # 

networkRequest

data DownloadNetworkRequestPropertyInfo Source #

Instances

AttrInfo DownloadNetworkRequestPropertyInfo Source # 
type AttrOrigin DownloadNetworkRequestPropertyInfo Source # 
type AttrLabel DownloadNetworkRequestPropertyInfo Source # 
type AttrGetType DownloadNetworkRequestPropertyInfo Source # 
type AttrBaseTypeConstraint DownloadNetworkRequestPropertyInfo Source # 
type AttrSetTypeConstraint DownloadNetworkRequestPropertyInfo Source # 
type AttrAllowedOps DownloadNetworkRequestPropertyInfo Source # 

networkResponse

data DownloadNetworkResponsePropertyInfo Source #

Instances

AttrInfo DownloadNetworkResponsePropertyInfo Source # 
type AttrOrigin DownloadNetworkResponsePropertyInfo Source # 
type AttrLabel DownloadNetworkResponsePropertyInfo Source # 
type AttrGetType DownloadNetworkResponsePropertyInfo Source # 
type AttrBaseTypeConstraint DownloadNetworkResponsePropertyInfo Source # 
type AttrSetTypeConstraint DownloadNetworkResponsePropertyInfo Source # 
type AttrAllowedOps DownloadNetworkResponsePropertyInfo Source # 

progress

data DownloadProgressPropertyInfo Source #

Instances

AttrInfo DownloadProgressPropertyInfo Source # 
type AttrOrigin DownloadProgressPropertyInfo Source # 
type AttrLabel DownloadProgressPropertyInfo Source # 
type AttrGetType DownloadProgressPropertyInfo Source # 
type AttrBaseTypeConstraint DownloadProgressPropertyInfo Source # 
type AttrSetTypeConstraint DownloadProgressPropertyInfo Source # 
type AttrAllowedOps DownloadProgressPropertyInfo Source # 

status

data DownloadStatusPropertyInfo Source #

Instances

AttrInfo DownloadStatusPropertyInfo Source # 
type AttrOrigin DownloadStatusPropertyInfo Source # 
type AttrLabel DownloadStatusPropertyInfo Source # 
type AttrGetType DownloadStatusPropertyInfo Source # 
type AttrBaseTypeConstraint DownloadStatusPropertyInfo Source # 
type AttrSetTypeConstraint DownloadStatusPropertyInfo Source # 
type AttrAllowedOps DownloadStatusPropertyInfo Source # 

suggestedFilename

data DownloadSuggestedFilenamePropertyInfo Source #

Instances

AttrInfo DownloadSuggestedFilenamePropertyInfo Source # 
type AttrOrigin DownloadSuggestedFilenamePropertyInfo Source # 
type AttrLabel DownloadSuggestedFilenamePropertyInfo Source # 
type AttrGetType DownloadSuggestedFilenamePropertyInfo Source # 
type AttrBaseTypeConstraint DownloadSuggestedFilenamePropertyInfo Source # 
type AttrSetTypeConstraint DownloadSuggestedFilenamePropertyInfo Source # 
type AttrAllowedOps DownloadSuggestedFilenamePropertyInfo Source # 

totalSize

data DownloadTotalSizePropertyInfo Source #

Instances

AttrInfo DownloadTotalSizePropertyInfo Source # 
type AttrOrigin DownloadTotalSizePropertyInfo Source # 
type AttrLabel DownloadTotalSizePropertyInfo Source # 
type AttrGetType DownloadTotalSizePropertyInfo Source # 
type AttrBaseTypeConstraint DownloadTotalSizePropertyInfo Source # 
type AttrSetTypeConstraint DownloadTotalSizePropertyInfo Source # 
type AttrAllowedOps DownloadTotalSizePropertyInfo Source # 

Signals

error