| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
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
- newtype WebsiteDataManager = WebsiteDataManager (ManagedPtr WebsiteDataManager)
- class (GObject o, IsDescendantOf WebsiteDataManager o) => IsWebsiteDataManager o
- toWebsiteDataManager :: (MonadIO m, IsWebsiteDataManager o) => o -> m WebsiteDataManager
- websiteDataManagerClear :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsCancellable b) => a -> [WebsiteDataTypes] -> Int64 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- websiteDataManagerClearFinish :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsAsyncResult b) => a -> b -> m ()
- websiteDataManagerFetch :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsCancellable b) => a -> [WebsiteDataTypes] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- websiteDataManagerFetchFinish :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsAsyncResult b) => a -> b -> m [WebsiteData]
- websiteDataManagerGetBaseCacheDirectory :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) => a -> m (Maybe Text)
- websiteDataManagerGetBaseDataDirectory :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) => a -> m (Maybe Text)
- websiteDataManagerGetFaviconDatabase :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) => a -> m (Maybe FaviconDatabase)
- websiteDataManagerGetFaviconsEnabled :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) => a -> m Bool
- websiteDataManagerGetItpSummary :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- websiteDataManagerGetItpSummaryFinish :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsAsyncResult b) => a -> b -> m [ITPThirdParty]
- websiteDataManagerIsEphemeral :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) => a -> m Bool
- websiteDataManagerRemove :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsCancellable b) => a -> [WebsiteDataTypes] -> [WebsiteData] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- websiteDataManagerRemoveFinish :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsAsyncResult b) => a -> b -> m ()
- websiteDataManagerSetFaviconsEnabled :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) => a -> Bool -> m ()
- constructWebsiteDataManagerBaseCacheDirectory :: (IsWebsiteDataManager o, MonadIO m) => Text -> m (GValueConstruct o)
- getWebsiteDataManagerBaseCacheDirectory :: (MonadIO m, IsWebsiteDataManager o) => o -> m (Maybe Text)
- constructWebsiteDataManagerBaseDataDirectory :: (IsWebsiteDataManager o, MonadIO m) => Text -> m (GValueConstruct o)
- getWebsiteDataManagerBaseDataDirectory :: (MonadIO m, IsWebsiteDataManager o) => o -> m (Maybe Text)
- constructWebsiteDataManagerIsEphemeral :: (IsWebsiteDataManager o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWebsiteDataManagerIsEphemeral :: (MonadIO m, IsWebsiteDataManager o) => o -> m Bool
Exported types
newtype WebsiteDataManager Source #
Memory-managed wrapper type.
Constructors
| WebsiteDataManager (ManagedPtr WebsiteDataManager) |
Instances
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
| (GObject o, IsDescendantOf WebsiteDataManager o) => IsWebsiteDataManager o Source # | |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, clear, clearFinish, fetch, fetchFinish, forceFloating, freezeNotify, getv, isEphemeral, isFloating, notify, notifyByPspec, ref, refSink, remove, removeFinish, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getBaseCacheDirectory, getBaseDataDirectory, getData, getFaviconDatabase, getFaviconsEnabled, getItpSummary, getItpSummaryFinish, getProperty, getQdata.
Setters
clear
websiteDataManagerClear Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsCancellable b) | |
| => a |
|
| -> [WebsiteDataTypes] |
|
| -> Int64 |
|
| -> Maybe b |
|
| -> Maybe AsyncReadyCallback |
|
| -> 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 |
|
| -> b |
|
| -> m () | (Can throw |
Finish an asynchronous operation started with websiteDataManagerClear
Since: 2.16
fetch
websiteDataManagerFetch Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsCancellable b) | |
| => a |
|
| -> [WebsiteDataTypes] |
|
| -> Maybe b |
|
| -> Maybe AsyncReadyCallback |
|
| -> 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 |
|
| -> b |
|
| -> m [WebsiteData] | Returns: a |
Finish an asynchronous operation started with websiteDataManagerFetch.
Since: 2.16
getBaseCacheDirectory
websiteDataManagerGetBaseCacheDirectory Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) | |
| => a |
|
| -> m (Maybe Text) | Returns: the base directory for caches, or |
Get the WebsiteDataManager:baseCacheDirectory property.
Since: 2.10
getBaseDataDirectory
websiteDataManagerGetBaseDataDirectory Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) | |
| => a |
|
| -> m (Maybe Text) | Returns: the base directory for website data, or |
Get the WebsiteDataManager:baseDataDirectory property.
Since: 2.10
getFaviconDatabase
websiteDataManagerGetFaviconDatabase Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) | |
| => a |
|
| -> m (Maybe FaviconDatabase) | Returns: a |
Get the FaviconDatabase of manager.
Since: 2.40
getFaviconsEnabled
websiteDataManagerGetFaviconsEnabled Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) | |
| => a |
|
| -> m Bool | Returns: |
Get whether website icons are enabled.
Since: 2.40
getItpSummary
websiteDataManagerGetItpSummary Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a, IsCancellable b) | |
| => a |
|
| -> Maybe b |
|
| -> Maybe AsyncReadyCallback |
|
| -> 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 |
|
| -> b |
|
| -> m [ITPThirdParty] | Returns: a |
Finish an asynchronous operation started with websiteDataManagerGetItpSummary.
Since: 2.30
isEphemeral
websiteDataManagerIsEphemeral Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) | |
| => a |
|
| -> m Bool |
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 |
|
| -> [WebsiteDataTypes] |
|
| -> [WebsiteData] |
|
| -> Maybe b |
|
| -> Maybe AsyncReadyCallback |
|
| -> 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 |
|
| -> b |
|
| -> m () | (Can throw |
Finish an asynchronous operation started with websiteDataManagerRemove.
Since: 2.16
setFaviconsEnabled
websiteDataManagerSetFaviconsEnabled Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) | |
| => a |
|
| -> Bool |
|
| -> 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