WebKit.WebsiteDataManager¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
w/co |
|||
w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class WebKit.WebsiteDataManager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Manages data stored locally by web sites.
You can use
WebKit.WebsiteDataManagerto configure the local directories where website data will be stored. UseWebKit.WebsiteDataManager:base-data-directoryandWebKit.WebsiteDataManager:base-cache-directoryset a common base directory for all website data and caches.A
WebKit.WebsiteDataManagercan be ephemeral, in which case all the directory configuration is not needed because website data will never persist. You can create an ephemeralWebKit.WebsiteDataManagerwith webkit_website_data_manager_new_ephemeral().WebKit.WebsiteDataManagercan 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.New in version 2.10.
- clear(types, timespan, cancellable, callback, *user_data)¶
- Parameters:
timespan (
int) – a #GTimeSpancancellable (
Gio.CancellableorNone) – aGio.CancellableorNoneto ignorecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – the data to pass to callback function
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
WebKit.WebsiteDataManager.clear_finish() 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.
New in version 2.16.
- clear_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
Trueif website data was successfully cleared, orFalseotherwise.- Return type:
Finish an asynchronous operation started with
WebKit.WebsiteDataManager.clear()New in version 2.16.
- fetch(types, cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.CancellableorNoneto ignorecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – the data to pass to callback function
Asynchronously get the list of
WebKit.WebsiteDatafor the given types.When the operation is finished, callback will be called. You can then call
WebKit.WebsiteDataManager.fetch_finish() to get the result of the operation.New in version 2.16.
- fetch_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
a
GLib.ListofWebKit.WebsiteData. You must free theGLib.Listwith g_list_free() and unref theWebKit.WebsiteDatas withWebKit.WebsiteData.unref() when you’re done with them.- Return type:
Finish an asynchronous operation started with
WebKit.WebsiteDataManager.fetch().New in version 2.16.
- get_base_cache_directory()¶
- Returns:
the base directory for caches, or
NoneifWebKit.WebsiteDataManager:base-cache-directorywas not provided or self is ephemeral.- Return type:
Get the
WebKit.WebsiteDataManager:base-cache-directoryproperty.New in version 2.10.
- get_base_data_directory()¶
- Returns:
the base directory for website data, or
NoneifWebKit.WebsiteDataManager:base-data-directorywas not provided or self is ephemeral.- Return type:
Get the
WebKit.WebsiteDataManager:base-data-directoryproperty.New in version 2.10.
- get_favicon_database()¶
- Returns:
a
WebKit.FaviconDatabase, orNoneif website icons are disabled- Return type:
Get the
WebKit.FaviconDatabaseof self.New in version 2.40.
- get_favicons_enabled()¶
-
Get whether website icons are enabled.
New in version 2.40.
- get_itp_summary(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.CancellableorNoneto ignorecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – the data to pass to callback function
Asynchronously get the list of
WebKit.ITPThirdPartyseen for self.Every
WebKit.ITPThirdPartycontains the list ofWebKit.ITPFirstPartyunder which it has been seen.When the operation is finished, callback will be called. You can then call
WebKit.WebsiteDataManager.get_itp_summary_finish() to get the result of the operation.New in version 2.30.
- get_itp_summary_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
a
GLib.ListofWebKit.ITPThirdParty. You must free theGLib.Listwith g_list_free() and unref theWebKit.ITPThirdPartys withWebKit.ITPThirdParty.unref() when you’re done with them.- Return type:
Finish an asynchronous operation started with
WebKit.WebsiteDataManager.get_itp_summary().New in version 2.30.
- is_ephemeral()¶
-
Get whether a
WebKit.WebsiteDataManageris ephemeral.See
WebKit.WebsiteDataManager:is-ephemeralfor more details.New in version 2.16.
- remove(types, website_data, cancellable, callback, *user_data)¶
- Parameters:
website_data ([
WebKit.WebsiteData]) – aGLib.ListofWebKit.WebsiteDatacancellable (
Gio.CancellableorNone) – aGio.CancellableorNoneto ignorecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – the data to pass to callback function
Asynchronously removes the website data in the given website_data list.
Asynchronously removes the website data of the given types for websites in the given website_data list. Use
WebKit.WebsiteDataManager.clear() if you want to remove the website data for all sites.When the operation is finished, callback will be called. You can then call
WebKit.WebsiteDataManager.remove_finish() to get the result of the operation.New in version 2.16.
- remove_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
Trueif website data resources were successfully removed, orFalseotherwise.- Return type:
Finish an asynchronous operation started with
WebKit.WebsiteDataManager.remove().New in version 2.16.
- set_favicons_enabled(enabled)¶
- Parameters:
enabled (
bool) – value to set
Set whether website icons are enabled. Website icons are disabled by default. When website icons are disabled, the
WebKit.FaviconDatabaseof self is closed and its reference removed, soWebKit.WebsiteDataManager.get_favicon_database() will returnNone. If website icons are enabled again, a newWebKit.FaviconDatabasewill be created.New in version 2.40.
Property Details¶
- WebKit.WebsiteDataManager.props.base_cache_directory¶
- Name:
base-cache-directory- Type:
- Default Value:
- Flags:
The base directory for caches. If
None, a default location will be used.New in version 2.10.
- WebKit.WebsiteDataManager.props.base_data_directory¶
- Name:
base-data-directory- Type:
- Default Value:
- Flags:
The base directory for website data. If
None, a default location will be used.New in version 2.10.
- WebKit.WebsiteDataManager.props.is_ephemeral¶
- Name:
is-ephemeral- Type:
- Default Value:
- Flags:
Whether the
WebKit.WebsiteDataManageris ephemeral. An ephemeralWebKit.WebsiteDataManagerhandles all websites data as non-persistent, and nothing will be written to the client storage. Note that if you create an ephemeralWebKit.WebsiteDataManagerall other construction parameters to configure data directories will be ignored.New in version 2.16.
- WebKit.WebsiteDataManager.props.origin_storage_ratio¶
- Name:
origin-storage-ratio- Type:
- Default Value:
-1.0- Flags:
The percentage of volume space that can be used for data storage for every domain. If the maximum storage is reached the storage request will fail with a QuotaExceededError exception. A value of 0.0 means that data storage is not allowed. A value of -1.0, which is the default, means WebKit will use the default quota (1 GiB).
New in version 2.42.
- WebKit.WebsiteDataManager.props.total_storage_ratio¶
- Name:
total-storage-ratio- Type:
- Default Value:
-1.0- Flags:
The percentage of volume space that can be used for data storage for all domains. If the maximum storage is reached the eviction will happen. A value of 0.0 means that data storage is not allowed. A value of -1.0, which is the default, means there’s no limit for the total storage.
New in version 2.42.