gi-webkit2-4.0.26: WebKit2 bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2.Objects.WebResource

Description

No description available in the introspection data.

Synopsis

Exported types

newtype WebResource Source #

Memory-managed wrapper type.

Constructors

WebResource (ManagedPtr WebResource) 

Instances

Instances details
Eq WebResource Source # 
Instance details

Defined in GI.WebKit2.Objects.WebResource

Methods

(==) :: WebResource -> WebResource -> Bool

(/=) :: WebResource -> WebResource -> Bool

GObject WebResource Source # 
Instance details

Defined in GI.WebKit2.Objects.WebResource

ManagedPtrNewtype WebResource Source # 
Instance details

Defined in GI.WebKit2.Objects.WebResource

Methods

toManagedPtr :: WebResource -> ManagedPtr WebResource

TypedObject WebResource Source # 
Instance details

Defined in GI.WebKit2.Objects.WebResource

Methods

glibType :: IO GType

IsGValue WebResource Source #

Convert WebResource to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.WebKit2.Objects.WebResource

Methods

toGValue :: WebResource -> IO GValue

fromGValue :: GValue -> IO WebResource

HasParentTypes WebResource Source # 
Instance details

Defined in GI.WebKit2.Objects.WebResource

type ParentTypes WebResource Source # 
Instance details

Defined in GI.WebKit2.Objects.WebResource

type ParentTypes WebResource = '[Object]

class (GObject o, IsDescendantOf WebResource o) => IsWebResource o Source #

Type class for types which can be safely cast to WebResource, for instance with toWebResource.

Instances

Instances details
(GObject o, IsDescendantOf WebResource o) => IsWebResource o Source # 
Instance details

Defined in GI.WebKit2.Objects.WebResource

toWebResource :: (MonadIO m, IsWebResource o) => o -> m WebResource Source #

Cast to WebResource, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

getData

webResourceGetData Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebResource a, IsCancellable b) 
=> a

resource: a WebResource

-> Maybe b

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the request is satisfied

-> m () 

Asynchronously get the raw data for resource.

When the operation is finished, callback will be called. You can then call webResourceGetDataFinish to get the result of the operation.

getDataFinish

webResourceGetDataFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebResource a, IsAsyncResult b) 
=> a

resource: a WebResource

-> b

result: a AsyncResult

-> m ByteString

Returns: a string with the data of resource, or Nothing in case of error. if length is not Nothing, the size of the data will be assigned to it. (Can throw GError)

Finish an asynchronous operation started with webResourceGetData.

getResponse

webResourceGetResponse Source #

Arguments

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

resource: a WebResource

-> m (Maybe URIResponse)

Returns: the URIResponse, or Nothing if the response hasn't been received yet.

Retrieves the URIResponse of the resource load operation. This method returns Nothing if called before the response is received from the server. You can connect to notify[response](#g:signal:response) signal to be notified when the response is received.

getUri

webResourceGetUri Source #

Arguments

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

resource: a WebResource

-> m Text

Returns: the current active URI of resource

Returns the current active URI of resource. The active URI might change during a load operation:

<orderedlist> <listitem><para> When the resource load starts, the active URI is the requested URI </para></listitem> <listitem><para> When the initial request is sent to the server, sentRequest signal is emitted without a redirected response, the active URI is the URI of the request sent to the server. </para></listitem> <listitem><para> In case of a server redirection, sentRequest signal is emitted again with a redirected response, the active URI is the URI the request was redirected to. </para></listitem> <listitem><para> When the response is received from the server, the active URI is the final one and it will not change again. </para></listitem> </orderedlist>

You can monitor the active URI by connecting to the notify[uri](#g:signal:uri) signal of resource.

Properties

response

The URIResponse associated with this resource.

getWebResourceResponse :: (MonadIO m, IsWebResource o) => o -> m (Maybe URIResponse) Source #

Get the value of the “response” property. When overloading is enabled, this is equivalent to

get webResource #response

uri

The current active URI of the WebResource. See webResourceGetUri for more details.

getWebResourceUri :: (MonadIO m, IsWebResource o) => o -> m Text Source #

Get the value of the “uri” property. When overloading is enabled, this is equivalent to

get webResource #uri

Signals

failed

type C_WebResourceFailedCallback = Ptr () -> Ptr GError -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WebResourceFailedCallback Source #

Arguments

 = GError

error: the GError that was triggered

-> IO () 

This signal is emitted when an error occurs during the resource load operation.

afterWebResourceFailed :: (IsWebResource a, MonadIO m) => a -> WebResourceFailedCallback -> m SignalHandlerId Source #

Connect a signal handler for the failed signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webResource #failed callback

genClosure_WebResourceFailed :: MonadIO m => WebResourceFailedCallback -> m (GClosure C_WebResourceFailedCallback) Source #

Wrap the callback into a GClosure.

mk_WebResourceFailedCallback :: C_WebResourceFailedCallback -> IO (FunPtr C_WebResourceFailedCallback) Source #

Generate a function pointer callable from C code, from a C_WebResourceFailedCallback.

noWebResourceFailedCallback :: Maybe WebResourceFailedCallback Source #

A convenience synonym for Nothing :: Maybe WebResourceFailedCallback.

onWebResourceFailed :: (IsWebResource a, MonadIO m) => a -> WebResourceFailedCallback -> m SignalHandlerId Source #

Connect a signal handler for the failed signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webResource #failed callback

failedWithTlsErrors

type C_WebResourceFailedWithTlsErrorsCallback = Ptr () -> Ptr TlsCertificate -> CUInt -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WebResourceFailedWithTlsErrorsCallback Source #

Arguments

 = TlsCertificate

certificate: a TlsCertificate

-> [TlsCertificateFlags]

errors: a TlsCertificateFlags with the verification status of certificate

-> IO () 

This signal is emitted when a TLS error occurs during the resource load operation.

Since: 2.8

afterWebResourceFailedWithTlsErrors :: (IsWebResource a, MonadIO m) => a -> WebResourceFailedWithTlsErrorsCallback -> m SignalHandlerId Source #

Connect a signal handler for the failedWithTlsErrors signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webResource #failedWithTlsErrors callback

onWebResourceFailedWithTlsErrors :: (IsWebResource a, MonadIO m) => a -> WebResourceFailedWithTlsErrorsCallback -> m SignalHandlerId Source #

Connect a signal handler for the failedWithTlsErrors signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webResource #failedWithTlsErrors callback

finished

type C_WebResourceFinishedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WebResourceFinishedCallback = IO () Source #

This signal is emitted when the resource load finishes successfully or due to an error. In case of errors failed signal is emitted before this one.

afterWebResourceFinished :: (IsWebResource a, MonadIO m) => a -> WebResourceFinishedCallback -> m SignalHandlerId Source #

Connect a signal handler for the finished signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webResource #finished callback

onWebResourceFinished :: (IsWebResource a, MonadIO m) => a -> WebResourceFinishedCallback -> m SignalHandlerId Source #

Connect a signal handler for the finished signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webResource #finished callback

receivedData

type C_WebResourceReceivedDataCallback = Ptr () -> Word64 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WebResourceReceivedDataCallback Source #

Arguments

 = Word64

dataLength: the length of data received in bytes

-> IO () 

This signal is emitted after response is received, every time new data has been received. It's useful to know the progress of the resource load operation.

afterWebResourceReceivedData :: (IsWebResource a, MonadIO m) => a -> WebResourceReceivedDataCallback -> m SignalHandlerId Source #

Connect a signal handler for the receivedData signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webResource #receivedData callback

onWebResourceReceivedData :: (IsWebResource a, MonadIO m) => a -> WebResourceReceivedDataCallback -> m SignalHandlerId Source #

Connect a signal handler for the receivedData signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webResource #receivedData callback

sentRequest

type C_WebResourceSentRequestCallback = Ptr () -> Ptr URIRequest -> Ptr URIResponse -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WebResourceSentRequestCallback Source #

Arguments

 = URIRequest

request: a URIRequest

-> URIResponse

redirectedResponse: a URIResponse, or Nothing

-> IO () 

This signal is emitted when request has been sent to the server. In case of a server redirection this signal is emitted again with the request argument containing the new request sent to the server due to the redirection and the redirectedResponse parameter containing the response received by the server for the initial request.

afterWebResourceSentRequest :: (IsWebResource a, MonadIO m) => a -> WebResourceSentRequestCallback -> m SignalHandlerId Source #

Connect a signal handler for the sentRequest signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webResource #sentRequest callback

onWebResourceSentRequest :: (IsWebResource a, MonadIO m) => a -> WebResourceSentRequestCallback -> m SignalHandlerId Source #

Connect a signal handler for the sentRequest signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webResource #sentRequest callback