WebsiteDataManager

WebKitWebsiteDataManager allows you to manage the data that websites can store in the client file system like databases or caches. You can use WebKitWebsiteDataManager to configure the local directories where the Website data will be stored, by creating a new manager with webkit_website_data_manager_new() passing the values you want to set. You can set all the possible configuration values or only some of them, a default value will be used automatically for the configuration options not provided. #WebKitWebsiteDataManager:base-data-directory and #WebKitWebsiteDataManager:base-cache-directory are two special properties that can be used to set a common base directory for all Website data and caches. It's possible to provide both, a base directory and a specific value, but in that case, the specific value takes precedence over the base directory. The newly created WebKitWebsiteDataManager must be passed as a construct property to a #WebKitWebContext, you can use webkit_web_context_new_with_website_data_manager() to create a new #WebKitWebContext with a WebKitWebsiteDataManager. In case you don't want to set any specific configuration, you don't need to create a WebKitWebsiteDataManager, the #WebKitWebContext will create a WebKitWebsiteDataManager with the default configuration. To get the WebKitWebsiteDataManager of a #WebKitWebContext you can use webkit_web_context_get_website_data_manager().

A WebKitWebsiteDataManager can also be ephemeral and then all the directories configuration is not needed because website data will never persist. You can create an ephemeral WebKitWebsiteDataManager with webkit_website_data_manager_new_ephemeral(). Then you can pass an ephemeral WebKitWebsiteDataManager to a #WebKitWebContext to make it ephemeral or use webkit_web_context_new_ephemeral() and the WebKitWebsiteDataManager will be automatically created by the #WebKitWebContext.

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

class WebsiteDataManager : ObjectG {}

Constructors

this
this(WebKitWebsiteDataManager* webKitWebsiteDataManager, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates an ephemeral #WebKitWebsiteDataManager. See #WebKitWebsiteDataManager:is-ephemeral for more details.

Members

Functions

clear
void clear(WebKitWebsiteDataTypes types, GTimeSpan timespan, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously clear the website data of the given @types modified in the past @timespan. If @timespan is 0, all website data will be removed.

clearFinish
bool clearFinish(AsyncResultIF result)

Finish an asynchronous operation started with webkit_website_data_manager_clear()

fetch
void fetch(WebKitWebsiteDataTypes types, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously get the list of #WebKitWebsiteData for the given @types.

fetchFinish
ListG fetchFinish(AsyncResultIF result)

Finish an asynchronous operation started with webkit_website_data_manager_fetch().

getBaseCacheDirectory
string getBaseCacheDirectory()

Get the #WebKitWebsiteDataManager:base-cache-directory property.

getBaseDataDirectory
string getBaseDataDirectory()

Get the #WebKitWebsiteDataManager:base-data-directory property.

getCookieManager
CookieManager getCookieManager()

Get the #WebKitCookieManager of @manager.

getDiskCacheDirectory
string getDiskCacheDirectory()

Get the #WebKitWebsiteDataManager:disk-cache-directory property.

getDomCacheDirectory
string getDomCacheDirectory()

Get the #WebKitWebsiteDataManager:dom-cache-directory property.

getHstsCacheDirectory
string getHstsCacheDirectory()

Get the #WebKitWebsiteDataManager:hsts-cache-directory property.

getIndexeddbDirectory
string getIndexeddbDirectory()

Get the #WebKitWebsiteDataManager:indexeddb-directory property.

getItpDirectory
string getItpDirectory()

Get the #WebKitWebsiteDataManager:itp-directory property.

getItpEnabled
bool getItpEnabled()

Get whether Intelligent Tracking Prevention (ITP) is enabled or not.

getItpSummary
void getItpSummary(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously get the list of #WebKitITPThirdParty seen for @manager. Every #WebKitITPThirdParty contains the list of #WebKitITPFirstParty under which it has been seen.

getItpSummaryFinish
ListG getItpSummaryFinish(AsyncResultIF result)

Finish an asynchronous operation started with webkit_website_data_manager_get_itp_summary().

getLocalStorageDirectory
string getLocalStorageDirectory()

Get the #WebKitWebsiteDataManager:local-storage-directory property.

getOfflineApplicationCacheDirectory
string getOfflineApplicationCacheDirectory()

Get the #WebKitWebsiteDataManager:offline-application-cache-directory property.

getPersistentCredentialStorageEnabled
bool getPersistentCredentialStorageEnabled()

Get whether persistent credential storage is enabled or not. See also webkit_website_data_manager_set_persistent_credential_storage_enabled().

getServiceWorkerRegistrationsDirectory
string getServiceWorkerRegistrationsDirectory()

Get the #WebKitWebsiteDataManager:service-worker-registrations-directory property.

getStruct
void* getStruct()

the main Gtk struct as a void*

getWebsiteDataManagerStruct
WebKitWebsiteDataManager* getWebsiteDataManagerStruct(bool transferOwnership)

Get the main Gtk struct

getWebsqlDirectory
string getWebsqlDirectory()

Get the #WebKitWebsiteDataManager:websql-directory property.

isEphemeral
bool isEphemeral()

Get whether a #WebKitWebsiteDataManager is ephemeral. See #WebKitWebsiteDataManager:is-ephemeral for more details.

remove
void remove(WebKitWebsiteDataTypes types, ListG websiteData, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously removes the website data of the for the given @types for websites in the given @website_data list. Use webkit_website_data_manager_clear() if you want to remove the website data for all sites.

removeFinish
bool removeFinish(AsyncResultIF result)

Finish an asynchronous operation started with webkit_website_data_manager_remove().

setItpEnabled
void setItpEnabled(bool enabled)

Enable or disable Intelligent Tracking Prevention (ITP). When ITP is enabled resource load statistics are collected and used to decide whether to allow or block third-party cookies and prevent user tracking. Note that while ITP is enabled the accept policy %WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY is ignored and %WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS is used instead. See also webkit_cookie_manager_set_accept_policy().

setPersistentCredentialStorageEnabled
void setPersistentCredentialStorageEnabled(bool enabled)

Enable or disable persistent credential storage. When enabled, which is the default for non-ephemeral sessions, the network process will try to read and write HTTP authentiacation credentials from persistent storage.

Static functions

getType
GType getType()

Variables

webKitWebsiteDataManager
WebKitWebsiteDataManager* webKitWebsiteDataManager;

the main Gtk struct

Meta

Since

2.10