gi-webkit-6.0.2: WebKit bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit.Objects.WebsiteDataManager

Description

Manages data stored locally by web sites.

You can use WebKitWebsiteDataManager to configure the local directories where website data will be stored. Use WebsiteDataManager:baseDataDirectory and WebsiteDataManager:baseCacheDirectory set a common base directory for all website data and caches. The newly created WebKitWebsiteDataManager must be passed as a construct property to a WebContext; you can use webkit_web_context_new_with_website_data_manager() to create a new WebContext with a WebKitWebsiteDataManager. If you don't want to set any specific configuration, you don't need to create a WebKitWebsiteDataManager: the WebContext will create a WebKitWebsiteDataManager with the default configuration. To get the WebKitWebsiteDataManager of a WebContext, you can use webkit_web_context_get_website_data_manager().

A WebKitWebsiteDataManager can also be ephemeral, in which case all the directory configuration is not needed because website data will never persist. You can create an ephemeral WebKitWebsiteDataManager with webkit_website_data_manager_new_ephemeral() and pass the ephemeral WebKitWebsiteDataManager to a WebContext, or simply use webkit_web_context_new_ephemeral().

WebKitWebsiteDataManager can also be used to fetch website data, remove data stored by particular websites, or clear data for all websites modified since a given period of time.

Since: 2.10

Synopsis

Exported types

newtype WebsiteDataManager Source #

Memory-managed wrapper type.

Constructors

WebsiteDataManager (ManagedPtr WebsiteDataManager) 

Instances

Instances details
Eq WebsiteDataManager Source # 
Instance details

Defined in GI.WebKit.Objects.WebsiteDataManager

GObject WebsiteDataManager Source # 
Instance details

Defined in GI.WebKit.Objects.WebsiteDataManager

ManagedPtrNewtype WebsiteDataManager Source # 
Instance details

Defined in GI.WebKit.Objects.WebsiteDataManager

TypedObject WebsiteDataManager Source # 
Instance details

Defined in GI.WebKit.Objects.WebsiteDataManager

Methods

glibType :: IO GType

HasParentTypes WebsiteDataManager Source # 
Instance details

Defined in GI.WebKit.Objects.WebsiteDataManager

IsGValue (Maybe WebsiteDataManager) Source #

Convert WebsiteDataManager to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit.Objects.WebsiteDataManager

type ParentTypes WebsiteDataManager Source # 
Instance details

Defined in GI.WebKit.Objects.WebsiteDataManager

type ParentTypes WebsiteDataManager = '[Object]

class (GObject o, IsDescendantOf WebsiteDataManager o) => IsWebsiteDataManager o Source #

Type class for types which can be safely cast to WebsiteDataManager, for instance with toWebsiteDataManager.

Instances

Instances details
(GObject o, IsDescendantOf WebsiteDataManager o) => IsWebsiteDataManager o Source # 
Instance details

Defined in GI.WebKit.Objects.WebsiteDataManager

toWebsiteDataManager :: (MonadIO m, IsWebsiteDataManager o) => o -> m WebsiteDataManager Source #

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

Methods

clear

websiteDataManagerClear Source #

Arguments

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

manager: a WebsiteDataManager

-> [WebsiteDataTypes]

types: WebsiteDataTypes

-> Int64

timespan: a GTimeSpan

-> Maybe b

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the request is satisfied

-> m () 

Asynchronously clear the website data of the given types modified in the past timespan.

If timespan is 0, all website data will be removed.

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

Due to implementation limitations, this function does not currently delete any stored cookies if timespan is nonzero. This behavior may change in the future.

Since: 2.16

clearFinish

websiteDataManagerClearFinish Source #

Arguments

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

manager: a WebsiteDataManager

-> b

result: a AsyncResult

-> m ()

(Can throw GError)

Finish an asynchronous operation started with websiteDataManagerClear

Since: 2.16

fetch

websiteDataManagerFetch Source #

Arguments

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

manager: a WebsiteDataManager

-> [WebsiteDataTypes]

types: WebsiteDataTypes

-> 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 list of WebsiteData for the given types.

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

Since: 2.16

fetchFinish

websiteDataManagerFetchFinish Source #

Arguments

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

manager: a WebsiteDataManager

-> b

result: a AsyncResult

-> m [WebsiteData]

Returns: a List of WebsiteData. You must free the List with g_list_free() and unref the WebsiteDatas with websiteDataUnref when you're done with them. (Can throw GError)

Finish an asynchronous operation started with websiteDataManagerFetch.

Since: 2.16

getBaseCacheDirectory

websiteDataManagerGetBaseCacheDirectory Source #

Arguments

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

manager: a WebsiteDataManager

-> m (Maybe Text)

Returns: the base directory for caches, or Nothing if WebsiteDataManager:baseCacheDirectory was not provided or manager is ephemeral.

Get the WebsiteDataManager:baseCacheDirectory property.

Since: 2.10

getBaseDataDirectory

websiteDataManagerGetBaseDataDirectory Source #

Arguments

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

manager: a WebsiteDataManager

-> m (Maybe Text)

Returns: the base directory for website data, or Nothing if WebsiteDataManager:baseDataDirectory was not provided or manager is ephemeral.

Get the WebsiteDataManager:baseDataDirectory property.

Since: 2.10

getFaviconDatabase

websiteDataManagerGetFaviconDatabase Source #

Arguments

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

manager: a WebsiteDataManager

-> m (Maybe FaviconDatabase)

Returns: a FaviconDatabase, or Nothing if website icons are disabled

Get the FaviconDatabase of manager.

Since: 2.40

getFaviconsEnabled

websiteDataManagerGetFaviconsEnabled Source #

Arguments

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

manager: a WebsiteDataManager

-> m Bool

Returns: True if website icons are enabled, or False otherwise.

Get whether website icons are enabled.

Since: 2.40

getItpSummary

websiteDataManagerGetItpSummary Source #

Arguments

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

manager: a WebsiteDataManager

-> 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 list of ITPThirdParty seen for manager.

Every ITPThirdParty contains the list of ITPFirstParty under which it has been seen.

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

Since: 2.30

getItpSummaryFinish

websiteDataManagerGetItpSummaryFinish Source #

Arguments

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

manager: a WebsiteDataManager

-> b

result: a AsyncResult

-> m [ITPThirdParty]

Returns: a List of ITPThirdParty. You must free the List with g_list_free() and unref the ITPThirdPartys with iTPThirdPartyUnref when you're done with them. (Can throw GError)

Finish an asynchronous operation started with websiteDataManagerGetItpSummary.

Since: 2.30

isEphemeral

websiteDataManagerIsEphemeral Source #

Arguments

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

manager: a WebsiteDataManager

-> m Bool

Returns: True if manager is ephemeral or False otherwise.

Get whether a WebsiteDataManager is ephemeral.

See WebsiteDataManager:isEphemeral for more details.

Since: 2.16

remove

websiteDataManagerRemove Source #

Arguments

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

manager: a WebsiteDataManager

-> [WebsiteDataTypes]

types: WebsiteDataTypes

-> [WebsiteData]

websiteData: a List of WebsiteData

-> Maybe b

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the request is satisfied

-> m () 

Asynchronously removes the website data in the given websiteData list.

Asynchronously removes the website data of the given types for websites in the given websiteData list. Use websiteDataManagerClear if you want to remove the website data for all sites.

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

Since: 2.16

removeFinish

websiteDataManagerRemoveFinish Source #

Arguments

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

manager: a WebsiteDataManager

-> b

result: a AsyncResult

-> m ()

(Can throw GError)

Finish an asynchronous operation started with websiteDataManagerRemove.

Since: 2.16

setFaviconsEnabled

websiteDataManagerSetFaviconsEnabled Source #

Arguments

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

manager: a WebsiteDataManager

-> Bool

enabled: value to set

-> m () 

Set whether website icons are enabled. Website icons are disabled by default. When website icons are disabled, the FaviconDatabase of manager is closed and its reference removed, so websiteDataManagerGetFaviconDatabase will return Nothing. If website icons are enabled again, a new FaviconDatabase will be created.

Since: 2.40

Properties

baseCacheDirectory

The base directory for caches. If Nothing, a default location will be used.

Since: 2.10

constructWebsiteDataManagerBaseCacheDirectory :: (IsWebsiteDataManager o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getWebsiteDataManagerBaseCacheDirectory :: (MonadIO m, IsWebsiteDataManager o) => o -> m (Maybe Text) Source #

Get the value of the “base-cache-directory” property. When overloading is enabled, this is equivalent to

get websiteDataManager #baseCacheDirectory

baseDataDirectory

The base directory for website data. If Nothing, a default location will be used.

Since: 2.10

constructWebsiteDataManagerBaseDataDirectory :: (IsWebsiteDataManager o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getWebsiteDataManagerBaseDataDirectory :: (MonadIO m, IsWebsiteDataManager o) => o -> m (Maybe Text) Source #

Get the value of the “base-data-directory” property. When overloading is enabled, this is equivalent to

get websiteDataManager #baseDataDirectory

isEphemeral

Whether the WebsiteDataManager is ephemeral. An ephemeral WebsiteDataManager handles all websites data as non-persistent, and nothing will be written to the client storage. Note that if you create an ephemeral WebsiteDataManager all other construction parameters to configure data directories will be ignored.

Since: 2.16

constructWebsiteDataManagerIsEphemeral :: (IsWebsiteDataManager o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWebsiteDataManagerIsEphemeral :: (MonadIO m, IsWebsiteDataManager o) => o -> m Bool Source #

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

get websiteDataManager #isEphemeral