gi-webkit2-4.0.24: WebKit2 bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2.Objects.UserContentFilterStore

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

toUserContentFilterStore :: (MonadIO m, IsUserContentFilterStore o) => o -> m UserContentFilterStore Source #

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

Methods

fetchIdentifiers

userContentFilterStoreFetchIdentifiers Source #

Arguments

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

store: a UserContentFilterStore

-> Maybe b

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the removal is completed

-> m () 

Asynchronously retrieve a list of the identifiers for all the stored filters.

When the operation is finished, callback will be invoked, which then can use userContentFilterStoreFetchIdentifiersFinish to obtain the list of filter identifiers.

Since: 2.24

fetchIdentifiersFinish

userContentFilterStoreFetchIdentifiersFinish Source #

Arguments

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

store: a UserContentFilterStore

-> b

result: a AsyncResult

-> m [Text]

Returns: a Nothing-terminated list of filter identifiers.

Finishes an asynchronous fetch of the list of identifiers for the stored filters previously started with userContentFilterStoreFetchIdentifiers.

Since: 2.24

getPath

userContentFilterStoreGetPath Source #

Arguments

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

store: a UserContentFilterStore

-> m Text

Returns: The storage path for user content filters.

No description available in the introspection data.

Since: 2.24

load

userContentFilterStoreLoad Source #

Arguments

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

store: a UserContentFilterStore

-> Text

identifier: a filter identifier

-> Maybe b

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the load is completed

-> m () 

Asynchronously load a content filter given its identifier. The filter must have been previously stored using userContentFilterStoreSave.

When the operation is finished, callback will be invoked, which then can use userContentFilterStoreLoadFinish to obtain the resulting filter.

Since: 2.24

loadFinish

userContentFilterStoreLoadFinish Source #

Arguments

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

store: a UserContentFilterStore

-> b

result: a AsyncResult

-> m UserContentFilter

Returns: a UserContentFilter, or Nothing if the load failed (Can throw GError)

Finishes an asynchronous filter load previously started with userContentFilterStoreLoad.

Since: 2.24

new

userContentFilterStoreNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

storagePath: path where data for filters will be stored on disk

-> m UserContentFilterStore

Returns: a newly created UserContentFilterStore

Create a new UserContentFilterStore to manipulate filters stored at storagePath. The path must point to a local filesystem, and will be created if needed.

Since: 2.24

remove

userContentFilterStoreRemove Source #

Arguments

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

store: a UserContentFilterStore

-> Text

identifier: a filter identifier

-> Maybe b

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the removal is completed

-> m () 

Asynchronously remove a content filter given its identifier.

When the operation is finished, callback will be invoked, which then can use userContentFilterStoreRemoveFinish to check whether the removal was successful.

Since: 2.24

removeFinish

userContentFilterStoreRemoveFinish Source #

Arguments

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

store: a UserContentFilterStore

-> b

result: a AsyncResult

-> m ()

(Can throw GError)

Finishes an asynchronous filter removal previously started with userContentFilterStoreRemove.

Since: 2.24

save

userContentFilterStoreSave Source #

Arguments

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

store: a UserContentFilterStore

-> Text

identifier: a string used to identify the saved filter

-> Bytes

source: Bytes containing the rule set in JSON format

-> Maybe b

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when saving is completed

-> m () 

Asynchronously save a content filter from a source rule set in the WebKit content extesions JSON format.

The identifier can be used afterwards to refer to the filter when using userContentFilterStoreRemove and userContentFilterStoreLoad. When the identifier has been used in the past, the new filter source will replace the one saved beforehand for the same identifier.

When the operation is finished, callback will be invoked, which then can use userContentFilterStoreSaveFinish to obtain the resulting filter.

Since: 2.24

saveFinish

userContentFilterStoreSaveFinish Source #

Arguments

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

store: a UserContentFilterStore

-> b

result: a AsyncResult

-> m UserContentFilter

Returns: a UserContentFilter, or Nothing if saving failed (Can throw GError)

Finishes an asynchronous filter save previously started with userContentFilterStoreSave.

Since: 2.24

saveFromFile

userContentFilterStoreSaveFromFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsUserContentFilterStore a, IsFile b, IsCancellable c) 
=> a

store: a UserContentFilterStore

-> Text

identifier: a string used to identify the saved filter

-> b

file: a File containing the rule set in JSON format

-> Maybe c

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when saving is completed

-> m () 

Asynchronously save a content filter from the contents of a file, which must be native to the platform, as checked by fileIsNative. See userContentFilterStoreSave for more details.

When the operation is finished, callback will be invoked, which then can use userContentFilterStoreSaveFinish to obtain the resulting filter.

Since: 2.24

saveFromFileFinish

userContentFilterStoreSaveFromFileFinish Source #

Arguments

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

store: a UserContentFilterStore

-> b

result: a AsyncResult

-> m UserContentFilter

Returns: a UserContentFilter, or Nothing if saving failed. (Can throw GError)

Finishes and asynchronous filter save previously started with userContentFilterStoreSaveFromFile.

Since: 2.24

Properties

path

The directory used for filter storage. This path is used as the base directory where user content filters are stored on disk.

Since: 2.24

constructUserContentFilterStorePath :: IsUserContentFilterStore o => Text -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “path” property. This is rarely needed directly, but it is used by new.

getUserContentFilterStorePath :: (MonadIO m, IsUserContentFilterStore o) => o -> m Text Source #

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

get userContentFilterStore #path